summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-07-20 20:34:31 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2015-07-21 17:36:08 +0300
commit3c7a7b538e8ca8b310ae9778ae9ace5ae937a4f1 (patch)
treea3d8e93b88cbb4d90dad02cb981f1d33e7547d20
parent01eea7fe40c939311bf1920b6e8b4391a93c2e82 (diff)
Simplify
Change-Id: I6fff5af5d623bff6f8adedf6f3d42d849ea4d24b
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx3
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx6
-rw-r--r--sw/inc/view.hxx5
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx1
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx5
5 files changed, 2 insertions, 18 deletions
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 3a2536d7f9c4..ce3c4a5b7e49 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -168,9 +168,6 @@ private:
SfxBroadcaster* pAccessibilityBroadcaster;
- static const int MASTERENUMCOMMANDS = 6;
- OUString aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
-
// ugly hack for Add button in ScNameDlg
boost::ptr_map<OUString, ScRangeName> maRangeMap;
bool mbInSwitch;
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index fefe124b4b15..6bf6439cbbeb 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -310,7 +310,6 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
SFX_REQUEST_ARG( rReq, pEnumCommand, SfxStringItem, nNewId, false );
if ( pEnumCommand )
{
- aCurrShapeEnumCommand[ nNewId - SID_DRAWTBX_CS_BASIC ] = pEnumCommand->GetValue();
SfxBindings& rBind = GetViewFrame()->GetBindings();
rBind.Invalidate( nNewId );
rBind.Update( nNewId );
@@ -441,10 +440,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_DRAWTBX_CS_FLOWCHART:
case SID_DRAWTBX_CS_CALLOUT:
case SID_DRAWTBX_CS_STAR:
- {
- bool bCurrentActive = (nDrawSfxId == nWhich) && (aCurrShapeEnumCommand[ nWhich - SID_DRAWTBX_CS_BASIC ] == sDrawCustom);
- rSet.Put( SfxBoolItem( nWhich, bCurrentActive ) );
- }
+ rSet.Put( SfxBoolItem( nWhich, nDrawSfxId == nWhich ) );
break;
}
nWhich = aIter.NextWhich();
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index cd7114fda8aa..1c09a8b8a909 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -218,11 +218,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
int m_nSelectionType;
VclPtr<FloatingWindow> m_pFieldPopup;
-
- static const int m_nMASTERENUMCOMMANDS = 6;
-
- OUString m_aCurrShapeEnumCommand[ m_nMASTERENUMCOMMANDS ];
-
sal_uInt16 m_nPageCnt;
// current draw mode
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index b81cf88835d9..d342512ac89f 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -320,7 +320,6 @@ void SwView::ExecDraw(SfxRequest& rReq)
if ( pStringItem )
{
m_sDrawCustom = pStringItem->GetValue();
- m_aCurrShapeEnumCommand[ nSlotId - SID_DRAWTBX_CS_BASIC ] = m_sDrawCustom;
SfxBindings& rBind = GetViewFrame()->GetBindings();
rBind.Invalidate( nSlotId );
rBind.Update( nSlotId );
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index a7d2c16a8539..43b0c0fd4a2d 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -520,10 +520,7 @@ void SwView::GetDrawState(SfxItemSet &rSet)
if ( bWeb )
rSet.DisableItem( nWhich );
else
- {
- bool bCurrentActive = (m_nDrawSfxId == nWhich) && (m_aCurrShapeEnumCommand[ nWhich - SID_DRAWTBX_CS_BASIC ] == m_sDrawCustom);
- rSet.Put( SfxBoolItem( nWhich, bCurrentActive ) );
- }
+ rSet.Put( SfxBoolItem( nWhich, m_nDrawSfxId == nWhich ) );
}
break;