diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-07-09 08:36:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-07-09 12:08:52 +0200 |
commit | f5940dbd719be738ad25f4e9e03d87cd491896cc (patch) | |
tree | 9fc60fd9ac2ee99c5697b5e590c7a6693750e82f /vcl/source | |
parent | aac1adf9c5dca96906a2bd206479af767f01f105 (diff) |
cid#1554702 COPY_INSTEAD_OF_MOVE
and
cid#1554729 COPY_INSTEAD_OF_MOVE
Change-Id: I39b5e679ea0adf7d3ab543d828730067aef273f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170191
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/WidgetDefinitionReader.cxx | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx index 66a6976622b5..cb5d3a83828f 100644 --- a/vcl/source/gdi/WidgetDefinitionReader.cxx +++ b/vcl/source/gdi/WidgetDefinitionReader.cxx @@ -364,80 +364,80 @@ bool WidgetDefinitionReader::read(WidgetDefinition& rWidgetDefinition) if (!lcl_fileExists(m_rDefinitionFile)) return false; - auto pStyle = std::make_shared<WidgetDefinitionStyle>(); + rWidgetDefinition.mpStyle = std::make_shared<WidgetDefinitionStyle>(); std::unordered_map<std::string_view, Color*> aStyleColorMap = { - { "faceColor", &pStyle->maFaceColor }, - { "checkedColor", &pStyle->maCheckedColor }, - { "lightColor", &pStyle->maLightColor }, - { "lightBorderColor", &pStyle->maLightBorderColor }, - { "shadowColor", &pStyle->maShadowColor }, - { "darkShadowColor", &pStyle->maDarkShadowColor }, - { "buttonTextColor", &pStyle->maButtonTextColor }, - { "defaultActionButtonTextColor", &pStyle->maDefaultActionButtonTextColor }, - { "actionButtonTextColor", &pStyle->maActionButtonTextColor }, - { "actionButtonRolloverTextColor", &pStyle->maActionButtonRolloverTextColor }, - { "buttonRolloverTextColor", &pStyle->maButtonRolloverTextColor }, - { "radioCheckTextColor", &pStyle->maRadioCheckTextColor }, - { "groupTextColor", &pStyle->maGroupTextColor }, - { "labelTextColor", &pStyle->maLabelTextColor }, - { "windowColor", &pStyle->maWindowColor }, - { "windowTextColor", &pStyle->maWindowTextColor }, - { "dialogColor", &pStyle->maDialogColor }, - { "dialogTextColor", &pStyle->maDialogTextColor }, - { "workspaceColor", &pStyle->maWorkspaceColor }, - { "monoColor", &pStyle->maMonoColor }, - { "fieldColor", &pStyle->maFieldColor }, - { "fieldTextColor", &pStyle->maFieldTextColor }, - { "fieldRolloverTextColor", &pStyle->maFieldRolloverTextColor }, - { "activeColor", &pStyle->maActiveColor }, - { "activeTextColor", &pStyle->maActiveTextColor }, - { "activeBorderColor", &pStyle->maActiveBorderColor }, - { "deactiveColor", &pStyle->maDeactiveColor }, - { "deactiveTextColor", &pStyle->maDeactiveTextColor }, - { "deactiveBorderColor", &pStyle->maDeactiveBorderColor }, - { "menuColor", &pStyle->maMenuColor }, - { "menuBarColor", &pStyle->maMenuBarColor }, - { "menuBarRolloverColor", &pStyle->maMenuBarRolloverColor }, - { "menuBorderColor", &pStyle->maMenuBorderColor }, - { "menuTextColor", &pStyle->maMenuTextColor }, - { "menuBarTextColor", &pStyle->maMenuBarTextColor }, - { "menuBarRolloverTextColor", &pStyle->maMenuBarRolloverTextColor }, - { "menuBarHighlightTextColor", &pStyle->maMenuBarHighlightTextColor }, - { "menuHighlightColor", &pStyle->maMenuHighlightColor }, - { "menuHighlightTextColor", &pStyle->maMenuHighlightTextColor }, - { "highlightColor", &pStyle->maHighlightColor }, - { "highlightTextColor", &pStyle->maHighlightTextColor }, - { "activeTabColor", &pStyle->maActiveTabColor }, - { "inactiveTabColor", &pStyle->maInactiveTabColor }, - { "tabTextColor", &pStyle->maTabTextColor }, - { "tabRolloverTextColor", &pStyle->maTabRolloverTextColor }, - { "tabHighlightTextColor", &pStyle->maTabHighlightTextColor }, - { "disableColor", &pStyle->maDisableColor }, - { "helpColor", &pStyle->maHelpColor }, - { "helpTextColor", &pStyle->maHelpTextColor }, - { "linkColor", &pStyle->maLinkColor }, - { "visitedLinkColor", &pStyle->maVisitedLinkColor }, - { "toolTextColor", &pStyle->maToolTextColor }, + { "faceColor", &rWidgetDefinition.mpStyle->maFaceColor }, + { "checkedColor", &rWidgetDefinition.mpStyle->maCheckedColor }, + { "lightColor", &rWidgetDefinition.mpStyle->maLightColor }, + { "lightBorderColor", &rWidgetDefinition.mpStyle->maLightBorderColor }, + { "shadowColor", &rWidgetDefinition.mpStyle->maShadowColor }, + { "darkShadowColor", &rWidgetDefinition.mpStyle->maDarkShadowColor }, + { "buttonTextColor", &rWidgetDefinition.mpStyle->maButtonTextColor }, + { "defaultActionButtonTextColor", + &rWidgetDefinition.mpStyle->maDefaultActionButtonTextColor }, + { "actionButtonTextColor", &rWidgetDefinition.mpStyle->maActionButtonTextColor }, + { "actionButtonRolloverTextColor", + &rWidgetDefinition.mpStyle->maActionButtonRolloverTextColor }, + { "buttonRolloverTextColor", &rWidgetDefinition.mpStyle->maButtonRolloverTextColor }, + { "radioCheckTextColor", &rWidgetDefinition.mpStyle->maRadioCheckTextColor }, + { "groupTextColor", &rWidgetDefinition.mpStyle->maGroupTextColor }, + { "labelTextColor", &rWidgetDefinition.mpStyle->maLabelTextColor }, + { "windowColor", &rWidgetDefinition.mpStyle->maWindowColor }, + { "windowTextColor", &rWidgetDefinition.mpStyle->maWindowTextColor }, + { "dialogColor", &rWidgetDefinition.mpStyle->maDialogColor }, + { "dialogTextColor", &rWidgetDefinition.mpStyle->maDialogTextColor }, + { "workspaceColor", &rWidgetDefinition.mpStyle->maWorkspaceColor }, + { "monoColor", &rWidgetDefinition.mpStyle->maMonoColor }, + { "fieldColor", &rWidgetDefinition.mpStyle->maFieldColor }, + { "fieldTextColor", &rWidgetDefinition.mpStyle->maFieldTextColor }, + { "fieldRolloverTextColor", &rWidgetDefinition.mpStyle->maFieldRolloverTextColor }, + { "activeColor", &rWidgetDefinition.mpStyle->maActiveColor }, + { "activeTextColor", &rWidgetDefinition.mpStyle->maActiveTextColor }, + { "activeBorderColor", &rWidgetDefinition.mpStyle->maActiveBorderColor }, + { "deactiveColor", &rWidgetDefinition.mpStyle->maDeactiveColor }, + { "deactiveTextColor", &rWidgetDefinition.mpStyle->maDeactiveTextColor }, + { "deactiveBorderColor", &rWidgetDefinition.mpStyle->maDeactiveBorderColor }, + { "menuColor", &rWidgetDefinition.mpStyle->maMenuColor }, + { "menuBarColor", &rWidgetDefinition.mpStyle->maMenuBarColor }, + { "menuBarRolloverColor", &rWidgetDefinition.mpStyle->maMenuBarRolloverColor }, + { "menuBorderColor", &rWidgetDefinition.mpStyle->maMenuBorderColor }, + { "menuTextColor", &rWidgetDefinition.mpStyle->maMenuTextColor }, + { "menuBarTextColor", &rWidgetDefinition.mpStyle->maMenuBarTextColor }, + { "menuBarRolloverTextColor", &rWidgetDefinition.mpStyle->maMenuBarRolloverTextColor }, + { "menuBarHighlightTextColor", &rWidgetDefinition.mpStyle->maMenuBarHighlightTextColor }, + { "menuHighlightColor", &rWidgetDefinition.mpStyle->maMenuHighlightColor }, + { "menuHighlightTextColor", &rWidgetDefinition.mpStyle->maMenuHighlightTextColor }, + { "highlightColor", &rWidgetDefinition.mpStyle->maHighlightColor }, + { "highlightTextColor", &rWidgetDefinition.mpStyle->maHighlightTextColor }, + { "activeTabColor", &rWidgetDefinition.mpStyle->maActiveTabColor }, + { "inactiveTabColor", &rWidgetDefinition.mpStyle->maInactiveTabColor }, + { "tabTextColor", &rWidgetDefinition.mpStyle->maTabTextColor }, + { "tabRolloverTextColor", &rWidgetDefinition.mpStyle->maTabRolloverTextColor }, + { "tabHighlightTextColor", &rWidgetDefinition.mpStyle->maTabHighlightTextColor }, + { "disableColor", &rWidgetDefinition.mpStyle->maDisableColor }, + { "helpColor", &rWidgetDefinition.mpStyle->maHelpColor }, + { "helpTextColor", &rWidgetDefinition.mpStyle->maHelpTextColor }, + { "linkColor", &rWidgetDefinition.mpStyle->maLinkColor }, + { "visitedLinkColor", &rWidgetDefinition.mpStyle->maVisitedLinkColor }, + { "toolTextColor", &rWidgetDefinition.mpStyle->maToolTextColor }, }; - rWidgetDefinition.mpStyle = pStyle; - - auto pSettings = std::make_shared<WidgetDefinitionSettings>(); + rWidgetDefinition.mpSettings = std::make_shared<WidgetDefinitionSettings>(); std::unordered_map<std::string_view, OString*> aSettingMap = { - { "noActiveTabTextRaise", &pSettings->msNoActiveTabTextRaise }, - { "centeredTabs", &pSettings->msCenteredTabs }, - { "listBoxEntryMargin", &pSettings->msListBoxEntryMargin }, - { "defaultFontSize", &pSettings->msDefaultFontSize }, - { "titleHeight", &pSettings->msTitleHeight }, - { "floatTitleHeight", &pSettings->msFloatTitleHeight }, - { "listBoxPreviewDefaultLogicWidth", &pSettings->msListBoxPreviewDefaultLogicWidth }, - { "listBoxPreviewDefaultLogicHeight", &pSettings->msListBoxPreviewDefaultLogicHeight }, + { "noActiveTabTextRaise", &rWidgetDefinition.mpSettings->msNoActiveTabTextRaise }, + { "centeredTabs", &rWidgetDefinition.mpSettings->msCenteredTabs }, + { "listBoxEntryMargin", &rWidgetDefinition.mpSettings->msListBoxEntryMargin }, + { "defaultFontSize", &rWidgetDefinition.mpSettings->msDefaultFontSize }, + { "titleHeight", &rWidgetDefinition.mpSettings->msTitleHeight }, + { "floatTitleHeight", &rWidgetDefinition.mpSettings->msFloatTitleHeight }, + { "listBoxPreviewDefaultLogicWidth", + &rWidgetDefinition.mpSettings->msListBoxPreviewDefaultLogicWidth }, + { "listBoxPreviewDefaultLogicHeight", + &rWidgetDefinition.mpSettings->msListBoxPreviewDefaultLogicHeight }, }; - rWidgetDefinition.mpSettings = pSettings; - SvFileStream aFileStream(m_rDefinitionFile, StreamMode::READ); tools::XmlWalker aWalker; |