| 70 | } |
| 71 | |
| 72 | bool ProfileSetting::GetSettings(Setting& info) const |
| 73 | { |
| 74 | bool bRetVal = true; |
| 75 | |
| 76 | int nVal = 0; |
| 77 | bRetVal = bRetVal && ReadValue(STR_INI_FORMATTING_SEC, STR_INI_FORMATTING_EOL, nVal, static_cast<int>(info.lineEnding)); |
| 78 | if (bRetVal) |
| 79 | info.lineEnding = static_cast<LineEnding>(nVal); |
| 80 | |
| 81 | bRetVal = bRetVal && ReadValue(STR_INI_FORMATTING_SEC, STR_INI_FORMATTING_LINE, nVal, static_cast<int>(info.lineFormat)); |
| 82 | if (bRetVal) |
| 83 | info.lineFormat = static_cast<LineFormat>(nVal); |
| 84 | |
| 85 | bRetVal = bRetVal && ReadValue(STR_INI_FORMATTING_SEC, STR_INI_FORMATTING_INDENT, nVal, static_cast<int>(info.indent.style)); |
| 86 | if (bRetVal) |
| 87 | info.indent.style = static_cast<IndentStyle>(nVal); |
| 88 | |
| 89 | bRetVal = bRetVal && ReadValue(STR_INI_FORMATTING_SEC, STR_INI_FORMATTING_INDENTCOUNT, nVal, info.indent.len); |
| 90 | if (bRetVal) |
| 91 | info.indent.len = nVal; |
| 92 | |
| 93 | bRetVal = bRetVal && ReadValue(STR_INI_OTHER_SEC, STR_INI_OTHER_FOLLOW_TAB, nVal, info.bFollowCurrentTab); |
| 94 | if (bRetVal) |
| 95 | info.bFollowCurrentTab = static_cast<bool>(nVal); |
| 96 | |
| 97 | bRetVal = bRetVal && ReadValue(STR_INI_OTHER_SEC, STR_INI_OTHER_AUTO_FORMAT, nVal, info.bAutoFormat); |
| 98 | if (bRetVal) |
| 99 | info.bAutoFormat = static_cast<bool>(nVal); |
| 100 | |
| 101 | bRetVal = bRetVal && ReadValue(STR_INI_OTHER_SEC, STR_INI_OTHER_USE_HIGHLIGHT, nVal, info.bUseJsonHighlight); |
| 102 | if (bRetVal) |
| 103 | info.bUseJsonHighlight = static_cast<bool>(nVal); |
| 104 | |
| 105 | bRetVal = bRetVal && ReadValue(STR_INI_OTHER_SEC, STR_INI_OTHER_IGNORE_COMMENT, nVal, info.parseOptions.bIgnoreComment); |
| 106 | if (bRetVal) |
| 107 | info.parseOptions.bIgnoreComment = static_cast<bool>(nVal); |
| 108 | |
| 109 | bRetVal = bRetVal && ReadValue(STR_INI_OTHER_SEC, STR_INI_OTHER_IGNORE_COMMA, nVal, info.parseOptions.bIgnoreTrailingComma); |
| 110 | if (bRetVal) |
| 111 | info.parseOptions.bIgnoreTrailingComma = static_cast<bool>(nVal); |
| 112 | |
| 113 | bRetVal = bRetVal && ReadValue(STR_INI_OTHER_SEC, STR_INI_OTHER_REPLACE_UNDEFINED, nVal, info.parseOptions.bReplaceUndefined); |
| 114 | if (bRetVal) |
| 115 | info.parseOptions.bReplaceUndefined = static_cast<bool>(nVal); |
| 116 | |
| 117 | return bRetVal; |
| 118 | } |
| 119 | |
| 120 | bool ProfileSetting::SetSettings(const Setting& info) const |
| 121 | { |
no outgoing calls