diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-01-06 14:33:59 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-01-08 16:07:27 +0200 |
commit | b5b4ad78a455efcb3a810016b33293deed5e145d (patch) | |
tree | b8f62e8d87fe99a253d38331cf41f052a7bc81c1 /sw | |
parent | c30f9cdda1d94d1089bd4411d3a25e81a470c624 (diff) |
These don't have to be static
Change-Id: I448d1f2f292ce379cbce0083dc2c5230a7f6ce1b
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/inc/edtwin.hxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 12 |
3 files changed, 12 insertions, 20 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 26e501496fcb..17b60d9898d1 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -185,12 +185,6 @@ QuickHelpData* SwEditWin::m_pQuickHlpData = nullptr; long SwEditWin::m_nDDStartPosY = 0; long SwEditWin::m_nDDStartPosX = 0; -/** - * The actual color used by the button is set in svx/source/tbxctrls/tbxcolorupdate.cxx - * (ToolboxButtonColorUpdater::ToolboxButtonColorUpdater()) . - */ -Color SwEditWin::m_aWaterCanTextBackColor(COL_YELLOW); -Color SwEditWin::m_aWaterCanTextColor(COL_RED); extern bool g_bExecuteDrag; diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index bc390609a41b..a6596b91c3ff 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -73,8 +73,8 @@ friend void PageNumNotify( SwViewShell* pVwSh, static long m_nDDStartPosX, m_nDDStartPosY; - static Color m_aWaterCanTextColor; // text color; for the watering can - static Color m_aWaterCanTextBackColor; // text background; for the watering can + Color m_aWaterCanTextColor; // text color; for the watering can + Color m_aWaterCanTextBackColor; // text background; for the watering can /* * timer and handler for scrolling on when the mousepointer @@ -249,14 +249,12 @@ public: void StartExecuteDrag(); void DragFinished(); - static const Color& GetWaterCanTextColor() { return m_aWaterCanTextColor; } + const Color& GetWaterCanTextColor() { return m_aWaterCanTextColor; } + void SetWaterCanTextColor(const Color& rCol ) { m_aWaterCanTextColor = rCol; } - static void SetWaterCanTextColor(const Color& rCol ) { m_aWaterCanTextColor = rCol; } + const Color& GetWaterCanTextBackColor() { return m_aWaterCanTextBackColor; } + void SetWaterCanTextBackColor(const Color& rCol ) { m_aWaterCanTextBackColor = rCol; } - static const Color& GetWaterCanTextBackColor() - { return m_aWaterCanTextBackColor; } - static void SetWaterCanTextBackColor(const Color& rCol ) - { m_aWaterCanTextBackColor = rCol; } void LockKeyInput(bool bSet){m_bLockInput = bSet;} const SwView &GetView() const { return m_rView; } diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 32161257622f..081b3c347002 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1177,7 +1177,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { Color aSet = static_cast<const SvxColorItem*>(pItem)->GetValue(); SwEditWin& rEditWin = GetView().GetEditWin(); - SwEditWin::SetWaterCanTextColor(aSet); + rEditWin.SetWaterCanTextColor(aSet); SwApplyTemplate* pApply = rEditWin.GetApplyTemplate(); // If there is a selection, then set the color on it @@ -1200,7 +1200,7 @@ void SwTextShell::Execute(SfxRequest &rReq) aSet = COL_TRANSPARENT; SwEditWin& rEdtWin = GetView().GetEditWin(); - SwEditWin::SetWaterCanTextBackColor(aSet); + rEdtWin.SetWaterCanTextBackColor(aSet); SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI())) @@ -1249,9 +1249,9 @@ void SwTextShell::Execute(SfxRequest &rReq) // and reopened, its color resets, while SwEditWin still holds the old one. Color aSet = static_cast<const SvxColorItem*>(pItem)->GetValue(); if( nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ) - SwEditWin::SetWaterCanTextBackColor(aSet); + rEdtWin.SetWaterCanTextBackColor(aSet); else - SwEditWin::SetWaterCanTextColor(aSet); + rEdtWin.SetWaterCanTextColor(aSet); } SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); @@ -1262,7 +1262,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { rWrtSh.StartUndo( UNDO_INSATTR ); rWrtSh.SetAttrItem( - SvxBrushItem( SwEditWin::GetWaterCanTextBackColor(), RES_CHRATR_BACKGROUND) ); + SvxBrushItem( rEdtWin.GetWaterCanTextBackColor(), RES_CHRATR_BACKGROUND) ); // Remove MS specific highlight when background is set rWrtSh.SetAttrItem( SvxBrushItem(RES_CHRATR_HIGHLIGHT) ); @@ -1287,7 +1287,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } else rWrtSh.SetAttrItem( - SvxColorItem( SwEditWin::GetWaterCanTextColor(), RES_CHRATR_COLOR) ); + SvxColorItem( rEdtWin.GetWaterCanTextColor(), RES_CHRATR_COLOR) ); } else { |