| 226 | std::wstring Settings::get_default_hunspell_path() { return m_ini_filepath.substr(0, m_ini_filepath.rfind(L'\\')) + L"\\Hunspell"; } |
| 227 | |
| 228 | void Settings::process(IniWorker &worker) { |
| 229 | worker.process(L"Aspell_Path", data.aspell_dll_path, get_default_aspell_path()); |
| 230 | worker.process(L"Aspell_Personal_Dictionary_Path", data.aspell_personal_dictionary_path, L""); |
| 231 | worker.process(L"User_Hunspell_Path", data.hunspell_user_path, get_default_hunspell_path()); |
| 232 | worker.process(L"System_Hunspell_Path", data.hunspell_system_path, L".\\plugins\\config\\Hunspell"); |
| 233 | worker.process(L"Aspell_Allow_Run_Together_Words", data.aspell_allow_run_together_words, false); |
| 234 | worker.process(L"Suggestions_Control", data.suggestions_mode, SuggestionMode::context_menu); |
| 235 | worker.process(L"Autocheck", data.auto_check_text, true); |
| 236 | for (auto id : enum_range<SpellerId>()) { |
| 237 | worker.process(wstring_printf(L"%s_Multiple_Languages", to_string(id)).c_str(), data.speller_multi_languages[id], L""); |
| 238 | worker.process(wstring_printf(L"%s_Language", to_string(id)).c_str(), data.speller_language[id], default_language(id)); |
| 239 | } |
| 240 | worker.process(L"Tokenization_Style", data.tokenization_style, TokenizationStyle::by_non_alphabetic); |
| 241 | worker.process(L"Split_CamelCase", data.split_camel_case, false); |
| 242 | worker.process(L"Delimiter_Exclusions", data.delimiter_exclusions, default_delimiter_exclusions()); |
| 243 | worker.process(L"Delimiters", data.delimiters, default_delimiters(), true); |
| 244 | worker.process(L"Suggestions_Number", data.suggestion_count, 5); |
| 245 | worker.process(L"Ignore_Yo", data.ignore_yo, false); |
| 246 | worker.process(L"Convert_Single_Quotes_To_Apostrophe", data.convert_single_quotes, true); |
| 247 | worker.process(L"Remove_Ending_And_Beginning_Apostrophe", data.remove_boundary_apostrophes, true); |
| 248 | worker.process(L"Check_Those_\\_Not_Those", data.check_those, true); |
| 249 | worker.process(L"File_Types", data.file_types, L"*.*"); |
| 250 | worker.process(L"Check_Comments", data.check_comments, true); |
| 251 | worker.process(L"Check_String", data.check_strings, true); |
| 252 | worker.process(L"Check_Variable_Function_Names", data.check_variable_functions, false); |
| 253 | worker.process(L"Underline_Color", data.underline_color, 0x0000ff); // red |
| 254 | worker.process(L"Underline_Style", data.underline_style, INDIC_SQUIGGLE); |
| 255 | worker.process(L"Ignore_Having_Number", data.ignore_containing_digit, true); |
| 256 | worker.process(L"Ignore_Start_Capital", data.ignore_starting_with_capital, false); |
| 257 | worker.process(L"Ignore_Have_Capital", data.ignore_having_a_capital, true); |
| 258 | worker.process(L"Ignore_All_Capital", data.ignore_all_capital, true); |
| 259 | worker.process(L"Ignore_One_Letter", data.ignore_one_letter, false); |
| 260 | worker.process(L"Ignore_Regular_Expression", data.ignore_regexp_str, L""); |
| 261 | worker.process(L"Word_Minimum_Length", data.word_minimum_length, false); |
| 262 | worker.process(L"Check_Default_UDL_style", data.check_default_udl_style, true); |
| 263 | worker.process(L"Ignore_With_", data.ignore_having_underscore, true); |
| 264 | worker.process(L"United_User_Dictionary(Hunspell)", data.use_unified_dictionary, false); |
| 265 | worker.process(L"Ignore_That_Start_or_End_with_", data.ignore_starting_or_ending_with_apostrophe, false); |
| 266 | worker.process(L"Library", data.active_speller_lib_id, SpellerId::hunspell); |
| 267 | worker.process(L"Suggestions_Button_Size", data.suggestion_button_size, 15); |
| 268 | worker.process(L"Suggestions_Button_Opacity", data.suggestion_button_opacity, 70); |
| 269 | worker.process(L"Show_Only_Known", data.download_show_only_recognized_dictionaries, false); |
| 270 | worker.process(L"Install_Dictionaries_For_All_Users", data.download_install_dictionaries_for_all_users, false); |
| 271 | worker.process(L"Recheck_Delay", data.recheck_delay, 500); |
| 272 | for (int i = 0; i < static_cast<int>(data.server_names.size()); ++i) |
| 273 | worker.process(wstring_printf(L"Server_Address[%d]", i).c_str(), data.server_names[i], L""); |
| 274 | worker.process(L"Last_Used_Address_Index", data.last_used_address_index, 0); |
| 275 | worker.process(L"Remove_User_Dics_On_Dic_Remove", data.remove_user_dictionaries, false); |
| 276 | worker.process(L"Remove_Dics_For_All_Users", data.remove_system_dictionaries, false); |
| 277 | worker.process(L"Language_Name_Style", data.language_name_style, LanguageNameStyle::english); |
| 278 | if (worker.get_action() == IniWorker::Action::load) { |
| 279 | bool use_language_name_aliases; |
| 280 | worker.process(L"Decode_Language_Names", use_language_name_aliases, true); |
| 281 | if (!use_language_name_aliases) |
| 282 | data.language_name_style = LanguageNameStyle::original; |
| 283 | } |
| 284 | worker.process(L"Use_Proxy", data.use_proxy, false); |
| 285 | worker.process(L"Proxy_User_Name", data.proxy_user_name, L"anonymous"); |
no test coverage detected