| 886 | } |
| 887 | |
| 888 | void CMainFrame::SaveConfiguration(const std::wstring& fileName) |
| 889 | { |
| 890 | #if BOOST_VERSION < 105600 |
| 891 | boost::property_tree::xml_writer_settings<char> settings('\t', 1); |
| 892 | #else |
| 893 | boost::property_tree::xml_writer_settings<std::string> settings('\t', 1); |
| 894 | #endif |
| 895 | |
| 896 | boost::property_tree::ptree mainPt; |
| 897 | mainPt.put("AutoNewline", m_logSources.GetAutoNewLine()); |
| 898 | mainPt.put("LinkViews", m_linkViews); |
| 899 | |
| 900 | int views = GetViewCount(); |
| 901 | for (int i = 0; i < views; ++i) |
| 902 | { |
| 903 | auto& logView = GetView(i); |
| 904 | auto filters = logView.GetFilters(); |
| 905 | boost::property_tree::ptree viewPt; |
| 906 | viewPt.put("Index", i); |
| 907 | viewPt.put("Name", Str(logView.GetName()).str()); |
| 908 | viewPt.put("ClockTime", logView.GetClockTime()); |
| 909 | viewPt.put("ProcessColors", logView.GetViewProcessColors()); |
| 910 | viewPt.put_child("MessageFilters", MakePTree(filters.messageFilters)); |
| 911 | viewPt.put_child("ProcessFilters", MakePTree(filters.processFilters)); |
| 912 | mainPt.add_child("Views.View", viewPt); |
| 913 | } |
| 914 | |
| 915 | boost::property_tree::ptree pt; |
| 916 | pt.add_child("DebugViewPP", mainPt); |
| 917 | |
| 918 | boost::property_tree::write_xml(Str(fileName), pt, std::locale(), settings); |
| 919 | } |
| 920 | |
| 921 | void CMainFrame::OnFileOpen(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wndCtl*/) |
| 922 | { |
nothing calls this directly
no test coverage detected