diff options
| -rw-r--r-- | include/svx/colorbox.hxx | 8 | ||||
| -rw-r--r-- | include/vcl/button.hxx | 4 | ||||
| -rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 10 | ||||
| -rw-r--r-- | vcl/source/control/button.cxx | 1 |
4 files changed, 6 insertions, 17 deletions
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx index a813d545fb01..e2cb74962aad 100644 --- a/include/svx/colorbox.hxx +++ b/include/svx/colorbox.hxx @@ -35,6 +35,7 @@ private: Link<SvxColorListBox&, void> m_aSelectedLink; SvxListBoxColorWrapper m_aColorWrapper; Color m_aAutoDisplayColor; + Color m_aSaveColor; NamedColor m_aSelectedColor; sal_uInt16 m_nSlotId; bool m_bShowNoneButton; @@ -58,8 +59,8 @@ public: void SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton = false); - NamedColor GetSelectEntry() const; - Color GetSelectEntryColor() const; + Color GetSelectEntryColor() const { return m_aSelectedColor.first; } + NamedColor GetSelectEntry() const { return m_aSelectedColor; } void SelectEntry(const NamedColor& rColor); void SelectEntry(const Color& rColor); @@ -70,6 +71,9 @@ public: void SetAutoDisplayColor(const Color &rColor) { m_aAutoDisplayColor = rColor; } void ShowPreview(const NamedColor &rColor); void EnsurePaletteManager(); + + void SaveValue() { m_aSaveColor = GetSelectEntryColor(); } + bool IsValueChangedFromSaved() const { return m_aSaveColor != GetSelectEntryColor(); } }; /** A wrapper for SvxColorListBox. */ diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 6de11784086d..3ec0d467bf85 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -157,9 +157,6 @@ public: void EndSelection(); - void SaveValue() { meSaveValue = GetState(); } - bool IsValueChangedFromSaved() const { return meSaveValue != GetState(); } - Size CalcMinimumSize() const; virtual Size GetOptimalSize() const override; @@ -200,7 +197,6 @@ protected: private: SymbolType meSymbol; TriState meState; - TriState meSaveValue; bool mbPressed; }; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 0050682096f3..4908ecb1d577 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3382,16 +3382,6 @@ void SvxColorListBox::SelectEntry(const Color& rColor) ShowPreview(m_aSelectedColor); } -Color SvxColorListBox::GetSelectEntryColor() const -{ - return m_aSelectedColor.first; -} - -NamedColor SvxColorListBox::GetSelectEntry() const -{ - return m_aSelectedColor; -} - SvxColorListBoxWrapper::SvxColorListBoxWrapper(SvxColorListBox& rListBox) : sfx::SingleControlWrapper<SvxColorListBox, Color>(rListBox) { diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index bf0432c2e143..b97809572d62 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -622,7 +622,6 @@ void PushButton::ImplInitPushButtonData() meSymbol = SymbolType::DONTKNOW; meState = TRISTATE_FALSE; - meSaveValue = TRISTATE_FALSE; mnDDStyle = PushButtonDropdownStyle::NONE; mbIsActive = false; mbPressed = false; |
