diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-07-27 09:41:55 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 21:52:27 +0200 |
commit | 97067f73b3c9d0eb3ce3a4bb50bf8dc045c2da47 (patch) | |
tree | 30b909e5a800b89f8fbda1c82bc8deca3db504f9 /sw | |
parent | 0976d2764f27d7ed3db26a74d263d1a3e663d3fb (diff) |
Fix indentation/format
Change-Id: Ic1dbc6ba261da23be2a0a6f715cd79e68b168c6c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/navsh.cxx | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/sw/source/uibase/shells/navsh.cxx b/sw/source/uibase/shells/navsh.cxx index fad00297e9ef..4073dca09855 100644 --- a/sw/source/uibase/shells/navsh.cxx +++ b/sw/source/uibase/shells/navsh.cxx @@ -35,28 +35,27 @@ void SwNavigationShell::InitInterface_Impl() { } -SwNavigationShell::SwNavigationShell(SwView &_rView): - SwBaseShell( _rView ) - +SwNavigationShell::SwNavigationShell(SwView &_rView) + : SwBaseShell( _rView ) { - SetName(OUString("Navigation")); - SetHelpId(SW_NAVIGATIONSHELL); + SetName(OUString("Navigation")); + SetHelpId(SW_NAVIGATIONSHELL); } void SwNavigationShell::Execute(SfxRequest &rReq) { SwWrtShell *pSh = &GetShell(); - SdrView* pSdrView = pSh->GetDrawView(); + SdrView* pSdrView = pSh->GetDrawView(); const SfxItemSet *pArgs = rReq.GetArgs(); const sal_uInt16 nSlotId = rReq.GetSlot(); - bool bChanged = pSdrView->GetModel()->IsChanged(); + bool bChanged = pSdrView->GetModel()->IsChanged(); pSdrView->GetModel()->SetChanged(false); SwNavigationMgr& aSwNavigationMgr = pSh->GetNavigationMgr(); const SfxPoolItem* pItem; if(pArgs) pArgs->GetItemState(nSlotId, false, &pItem); switch (nSlotId) - { + { case FN_NAVIGATION_BACK: aSwNavigationMgr.goBack(); break; @@ -66,7 +65,7 @@ void SwNavigationShell::Execute(SfxRequest &rReq) break; default: break; - } + } if (pSdrView->GetModel()->IsChanged()) GetShell().SetModified(); else if (bChanged) @@ -77,31 +76,30 @@ void SwNavigationShell::Execute(SfxRequest &rReq) void SwNavigationShell::GetState(SfxItemSet &rSet) { - SwWrtShell *pSh = &GetShell(); - SfxWhichIter aIter( rSet ); - sal_uInt16 nWhich = aIter.FirstWhich(); - SwNavigationMgr& aNavigationMgr = pSh->GetNavigationMgr(); - while( nWhich ) - { - switch( nWhich ) + SwWrtShell *pSh = &GetShell(); + SfxWhichIter aIter( rSet ); + sal_uInt16 nWhich = aIter.FirstWhich(); + SwNavigationMgr& aNavigationMgr = pSh->GetNavigationMgr(); + while( nWhich ) { - case FN_NAVIGATION_BACK: - { - if (!aNavigationMgr.backEnabled()) { - rSet.DisableItem(FN_NAVIGATION_BACK); + switch( nWhich ) + { + case FN_NAVIGATION_BACK: + if (!aNavigationMgr.backEnabled()) + { + rSet.DisableItem(FN_NAVIGATION_BACK); + } + break; + case FN_NAVIGATION_FORWARD: + if (!aNavigationMgr.forwardEnabled()) + { + rSet.DisableItem(FN_NAVIGATION_FORWARD); + } + break; + default: + break; } - } - break; - case FN_NAVIGATION_FORWARD: - { - if (!aNavigationMgr.forwardEnabled()) - rSet.DisableItem(FN_NAVIGATION_FORWARD); - } - break; - default: - break; - } - nWhich = aIter.NextWhich(); + nWhich = aIter.NextWhich(); } } |