Kaydet (Commit) c5154a17 authored tarafından Ivan Timofeev's avatar Ivan Timofeev

SfxViewShell::GetScrollingMode always returns SCROLLING_DEFAULT

üst dc2fe18e
......@@ -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;
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment