sc/source/ui/view/tabview.cxx | 25 +------------------------ sfx2/inc/sfx2/viewsh.hxx | 11 ----------- sfx2/source/view/viewimp.hxx | 3 --- sfx2/source/view/viewsh.cxx | 8 -------- sw/source/ui/uiview/viewport.cxx | 38 ++++++++++---------------------------- 5 files changed, 11 insertions(+), 74 deletions(-)
New commits: commit c5154a179f435cc23798057895b0db8312bcd6f6 Author: Ivan Timofeev <timofeev....@gmail.com> Date: Thu Apr 5 21:08:26 2012 +0400 SfxViewShell::GetScrollingMode always returns SCROLLING_DEFAULT diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index a2784e1..219f9d2 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -407,13 +407,6 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); - // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: - SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); - if ( eMode == SCROLLING_NO ) - bHScroll = bVScroll = false; - else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScroll = bVScroll = true; - if ( aViewData.GetDocShell()->IsPreview() ) bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = false; @@ -899,16 +892,7 @@ void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ ) IMPL_LINK_NOARG(ScTabView, TabBarResize) { - sal_Bool bHScrollMode = aViewData.IsHScrollMode(); - - // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: - SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); - if ( eMode == SCROLLING_NO ) - bHScrollMode = false; - else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScrollMode = sal_True; - - if( bHScrollMode ) + if (aViewData.IsHScrollMode()) { const long nOverlap = 0; // ScrollBar::GetWindowOverlapPixel(); long nSize = pTabControl->GetSplitSize(); @@ -1572,13 +1556,6 @@ void ScTabView::UpdateShow() sal_Bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); sal_Bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); - // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: - SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); - if ( eMode == SCROLLING_NO ) - bHScrollMode = bVScrollMode = false; - else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScrollMode = bVScrollMode = sal_True; - if ( aViewData.GetDocShell()->IsPreview() ) bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = false; diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index 869de36..d2da4cb 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -83,14 +83,6 @@ class NotifyEvent; #define SFX_PRINTERROR_NONE 0 #define SFX_PRINTERROR_BUSY 1 -enum SfxScrollingMode -{ - SCROLLING_NO, - SCROLLING_YES, - SCROLLING_AUTO, - SCROLLING_DEFAULT -}; - // "Verified" using www.apple.com and Netscape 3.01 #define DEFAULT_MARGIN_WIDTH 8 #define DEFAULT_MARGIN_HEIGHT 12 @@ -207,9 +199,6 @@ public: virtual void JumpToMark( const String& rMark ); void VisAreaChanged(const Rectangle& rRect); - // Behavior Flags - SfxScrollingMode GetScrollingMode() const; - // Misc virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False ); diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx index 3d77c18..31dfdc7 100644 --- a/sfx2/source/view/viewimp.hxx +++ b/sfx2/source/view/viewimp.hxx @@ -63,11 +63,8 @@ struct SfxViewShell_Impl bool m_bHasPrintOptions; bool m_bPlugInsActive; bool m_bIsShowView; - // FIXME UNUSED ??? - //bool m_bOwnsMenu; bool m_bGotOwnership; bool m_bGotFrameOwnership; - SfxScrollingMode m_eScroll; sal_uInt16 m_nFamily; ::rtl::Reference<SfxBaseController> m_pController; ::std::auto_ptr< ::svt::AcceleratorExecute > m_pAccExec; diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 3c6a2de..dc7cdf6 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -301,7 +301,6 @@ SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const nFlags) , m_bIsShowView(SFX_VIEW_NO_SHOW != (nFlags & SFX_VIEW_NO_SHOW)) , m_bGotOwnership(false) , m_bGotFrameOwnership(false) -, m_eScroll(SCROLLING_DEFAULT) , m_nFamily(0xFFFF) // undefined, default set by TemplateDialog , m_pController(0) , m_pAccExec(0) @@ -1842,13 +1841,6 @@ void SfxViewShell::DiscardClients_Impl() //-------------------------------------------------------------------- -SfxScrollingMode SfxViewShell::GetScrollingMode() const -{ - return pImp->m_eScroll; -} - -//-------------------------------------------------------------------- - SfxObjectShell* SfxViewShell::GetObjectShell() { return pFrame ? pFrame->GetObjectShell() : NULL; diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index e28d63e..44bd8c4 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -1076,36 +1076,18 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) bInOuterResizePixel = sal_True; // feststellen, ob Scrollbars angezeigt werden duerfen - sal_Bool bBrowse = pWrtShell->GetViewOptions()->getBrowseMode(); - sal_Bool bShowH = sal_False, - bShowV = sal_False, - bAuto = sal_False, - bHAuto = bBrowse; - switch( GetScrollingMode() ) + sal_Bool bShowH = sal_True, + bShowV = sal_True, + bAuto = sal_True, + bHAuto = sal_True; + + const SwViewOption *pVOpt = pWrtShell->GetViewOptions(); + if ( !pVOpt->IsReadonly() || pVOpt->IsStarOneSetting() ) { - case SCROLLING_DEFAULT: - { - const SwViewOption *pVOpt = pWrtShell->GetViewOptions(); - if ( !pVOpt->IsReadonly() || pVOpt->IsStarOneSetting() ) - { - bShowH = pVOpt->IsViewHScrollBar(); - bShowV = pVOpt->IsViewVScrollBar(); - bAuto = bHAuto = sal_True; - break; - } - } - /* kein break hier */ - case SCROLLING_AUTO: - bAuto = bHAuto = sal_True; - bShowH = bShowV = sal_True; - break; - case SCROLLING_YES: - bShowH = bShowV = sal_True; - break; - case SCROLLING_NO: - bShowH = bShowV = bHAuto = sal_False; - break; + bShowH = pVOpt->IsViewHScrollBar(); + bShowV = pVOpt->IsViewVScrollBar(); } + SwDocShell* pDocSh = GetDocShell(); sal_Bool bIsPreview = pDocSh->IsPreview(); if( bIsPreview ) _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits