diff --git a/include/svtools/scrolladaptor.hxx b/include/svtools/scrolladaptor.hxx new file mode 100644 index 000000000000..8e94d3ee603d --- /dev/null +++ b/include/svtools/scrolladaptor.hxx @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include + +#include +#include + +class SVT_DLLPUBLIC ScrollAdaptor : public InterimItemWindow, public Scrollable +{ +protected: + std::unique_ptr m_xScrollBar; + Link m_aLink; + bool m_bHori; + +public: + virtual void SetRange(const Range& rRange) override; + virtual Range GetRange() const override; + + virtual void SetRangeMin(tools::Long nNewRange) override; + virtual tools::Long GetRangeMin() const override; + + virtual void SetRangeMax(tools::Long nNewRange) override; + virtual tools::Long GetRangeMax() const override; + + virtual void SetLineSize(tools::Long nNewSize) override; + virtual tools::Long GetLineSize() const override; + + virtual void SetPageSize(tools::Long nNewSize) override; + virtual tools::Long GetPageSize() const override; + + virtual void SetVisibleSize(tools::Long nNewSize) override; + virtual tools::Long GetVisibleSize() const override; + + virtual void SetThumbPos(tools::Long nThumbPos) override; + virtual tools::Long GetThumbPos() const override; + + void SetScrollHdl(const Link& rLink); + + // what is it + bool IsHoriScroll() const { return m_bHori; } + + virtual tools::Long DoScroll(tools::Long nNewPos) override; + + virtual bool Inactive() const override { return !m_xScrollBar->get_sensitive(); } + + ScrollAdaptor(vcl::Window* pParent, bool bHori); + virtual void dispose() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index 5c814cfcb7e1..9050425d3dd8 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -99,6 +99,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/control/inettbc \ svtools/source/control/ruler \ svtools/source/control/scriptedtext \ + svtools/source/control/scrolladaptor \ svtools/source/control/tabbar \ svtools/source/control/toolbarmenu \ svtools/source/control/valueacc \ diff --git a/svtools/UIConfig_svt.mk b/svtools/UIConfig_svt.mk index 82a494f249ee..04ce14b67658 100644 --- a/svtools/UIConfig_svt.mk +++ b/svtools/UIConfig_svt.mk @@ -31,6 +31,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svt,\ svtools/uiconfig/ui/printersetupdialog \ svtools/uiconfig/ui/querydeletedialog \ svtools/uiconfig/ui/restartdialog \ + svtools/uiconfig/ui/scrollbars \ svtools/uiconfig/ui/spinfieldcontrol \ svtools/uiconfig/ui/subtoolbar \ svtools/uiconfig/ui/tabbuttons \ diff --git a/svtools/source/control/scrolladaptor.cxx b/svtools/source/control/scrolladaptor.cxx new file mode 100644 index 000000000000..ebf9d9dea14a --- /dev/null +++ b/svtools/source/control/scrolladaptor.cxx @@ -0,0 +1,112 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include + +ScrollAdaptor::ScrollAdaptor(vcl::Window* pWin, bool bHoriz) + : InterimItemWindow(pWin, "svt/ui/scrollbars.ui", "ScrollBars") + , m_xScrollBar(m_xBuilder->weld_scrollbar(bHoriz ? "horizontal" : "vertical")) + , m_bHori(bHoriz) +{ + m_xScrollBar->show(); +} + +void ScrollAdaptor::dispose() +{ + m_xScrollBar.reset(); + InterimItemWindow::dispose(); +} + +void ScrollAdaptor::SetRange(const Range& rRange) +{ + m_xScrollBar->adjustment_set_lower(rRange.Min()); + m_xScrollBar->adjustment_set_upper(rRange.Max()); +} + +Range ScrollAdaptor::GetRange() const +{ + return Range(m_xScrollBar->adjustment_get_lower(), m_xScrollBar->adjustment_get_upper()); +} + +void ScrollAdaptor::SetRangeMin(tools::Long nNewRange) +{ + m_xScrollBar->adjustment_set_lower(nNewRange); +} + +tools::Long ScrollAdaptor::GetRangeMin() const { return m_xScrollBar->adjustment_get_lower(); } + +void ScrollAdaptor::SetRangeMax(tools::Long nNewRange) +{ + m_xScrollBar->adjustment_set_upper(nNewRange); +} + +tools::Long ScrollAdaptor::GetRangeMax() const { return m_xScrollBar->adjustment_get_upper(); } + +void ScrollAdaptor::SetLineSize(tools::Long nNewSize) +{ + m_xScrollBar->adjustment_set_step_increment(nNewSize); +} + +tools::Long ScrollAdaptor::GetLineSize() const +{ + return m_xScrollBar->adjustment_get_step_increment(); +} + +void ScrollAdaptor::SetPageSize(tools::Long nNewSize) +{ + m_xScrollBar->adjustment_set_page_increment(nNewSize); +} + +tools::Long ScrollAdaptor::GetPageSize() const +{ + return m_xScrollBar->adjustment_get_page_increment(); +} + +void ScrollAdaptor::SetVisibleSize(tools::Long nNewSize) +{ + m_xScrollBar->adjustment_set_page_size(nNewSize); +} + +tools::Long ScrollAdaptor::GetVisibleSize() const +{ + return m_xScrollBar->adjustment_get_page_size(); +} + +void ScrollAdaptor::SetThumbPos(tools::Long nThumbPos) +{ + m_xScrollBar->adjustment_set_value(nThumbPos); +} + +tools::Long ScrollAdaptor::GetThumbPos() const { return m_xScrollBar->adjustment_get_value(); } + +void ScrollAdaptor::SetScrollHdl(const Link& rLink) +{ + m_aLink = rLink; + m_xScrollBar->connect_adjustment_changed(rLink); +} + +tools::Long ScrollAdaptor::DoScroll(tools::Long nNewPos) +{ + const auto nOrig = m_xScrollBar->adjustment_get_value(); + m_xScrollBar->adjustment_set_value(nNewPos); + m_aLink.Call(*m_xScrollBar); + return m_xScrollBar->adjustment_get_value() - nOrig; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/uiconfig/swriter/ui/scrollbars.ui b/svtools/uiconfig/ui/scrollbars.ui similarity index 98% rename from sw/uiconfig/swriter/ui/scrollbars.ui rename to svtools/uiconfig/ui/scrollbars.ui index d29d1645d573..f2c9ac728376 100644 --- a/sw/uiconfig/swriter/ui/scrollbars.ui +++ b/svtools/uiconfig/ui/scrollbars.ui @@ -1,6 +1,6 @@ - + 100 diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 43543e964d33..f4e003e37243 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -282,7 +282,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/pageheaderpanel \ sw/uiconfig/swriter/ui/pagefooterpanel \ sw/uiconfig/swriter/ui/poseditbox \ - sw/uiconfig/swriter/ui/scrollbars \ sw/uiconfig/swriter/ui/sidebarwrap \ sw/uiconfig/swriter/ui/sidebarstylepresets \ sw/uiconfig/swriter/ui/sidebartableedit \ diff --git a/sw/source/uibase/inc/scroll.hxx b/sw/source/uibase/inc/scroll.hxx index f473d025b17b..dcf8bd174b7e 100644 --- a/sw/source/uibase/inc/scroll.hxx +++ b/sw/source/uibase/inc/scroll.hxx @@ -18,72 +18,31 @@ */ #pragma once -#include -#include +#include -class SwScrollbar final : public InterimItemWindow - , public Scrollable +class SwScrollbar final : public ScrollAdaptor { Size m_aDocSz; - bool m_bHori :1; // horizontal = true, otherwise vertical bool m_bAuto :1; // for scrolling mode bool m_bVisible :1; // show/hide should only set this flag bool m_bSizeSet :1; // was the size already set? - std::unique_ptr m_xScrollBar; - Link m_aLink; void AutoShow(); - using Window::Hide; - using Window::IsVisible; - public: void ExtendedShow( bool bVisible = true ); void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) override; - bool IsVisible(bool bReal) const { return bReal ? InterimItemWindow::IsVisible() : m_bVisible; } + bool IsScrollbarVisible(bool bReal) const { return bReal ? ScrollAdaptor::IsVisible() : m_bVisible; } // changing of document size void DocSzChgd(const Size &rNewSize); // changing of visible region void ViewPortChgd(const tools::Rectangle &rRectangle); - // what is it?? - bool IsHoriScroll() const { return m_bHori; } void SetAuto(bool bSet); bool IsAuto() const { return m_bAuto;} - virtual void SetRange(const Range& rRange) override; - virtual Range GetRange() const override; - - virtual void SetRangeMin(tools::Long nNewRange) override; - virtual tools::Long GetRangeMin() const override; - - virtual void SetRangeMax(tools::Long nNewRange) override; - virtual tools::Long GetRangeMax() const override; - - virtual void SetLineSize(tools::Long nNewSize) override; - virtual tools::Long GetLineSize() const override; - - virtual void SetPageSize(tools::Long nNewSize) override; - virtual tools::Long GetPageSize() const override; - - virtual void SetVisibleSize(tools::Long nNewSize) override; - virtual tools::Long GetVisibleSize() const override; - - virtual void SetThumbPos(tools::Long nThumbPos) override; - virtual tools::Long GetThumbPos() const override; - - void SetScrollHdl(const Link& rLink); - - virtual tools::Long DoScroll(tools::Long nNewPos) override; - - virtual bool Inactive() const override - { - return !m_xScrollBar->get_sensitive(); - } - SwScrollbar(vcl::Window *pParent, bool bHori ); - virtual void dispose() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index e10174c16028..9b198f4389ee 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1293,9 +1293,9 @@ void SwPagePreview::CalcAndSetBorderPixel( SvBorder &rToFill ) { const StyleSettings &rSet = m_pViewWin->GetSettings().GetStyleSettings(); const tools::Long nTmp = rSet.GetScrollBarSize(); - if ( m_pVScrollbar->IsVisible( true ) ) + if (m_pVScrollbar->IsScrollbarVisible(true)) rToFill.Right() = nTmp; - if ( m_pHScrollbar->IsVisible( true ) ) + if (m_pHScrollbar->IsScrollbarVisible(true)) rToFill.Bottom() = nTmp; SetBorderPixel( rToFill ); } diff --git a/sw/source/uibase/uiview/scroll.cxx b/sw/source/uibase/uiview/scroll.cxx index 39c714cf9c62..c61b17b9e89a 100644 --- a/sw/source/uibase/uiview/scroll.cxx +++ b/sw/source/uibase/uiview/scroll.cxx @@ -22,12 +22,10 @@ #define SCROLL_LINE_SIZE 250 SwScrollbar::SwScrollbar(vcl::Window *pWin, bool bHoriz) - : InterimItemWindow(pWin, "modules/swriter/ui/scrollbars.ui", "ScrollBars") - , m_bHori(bHoriz) + : ScrollAdaptor(pWin, bHoriz) , m_bAuto(false) , m_bVisible(false) , m_bSizeSet(false) - , m_xScrollBar(m_xBuilder->weld_scrollbar(bHoriz ? "horizontal" : "vertical")) { m_xScrollBar->show(); @@ -36,12 +34,6 @@ SwScrollbar::SwScrollbar(vcl::Window *pWin, bool bHoriz) m_xScrollBar->set_direction(false); } -void SwScrollbar::dispose() -{ - m_xScrollBar.reset(); - InterimItemWindow::dispose(); -} - // Will be called after a change of the document size // to refresh the range of the scrollbars. void SwScrollbar::DocSzChgd( const Size &rSize ) @@ -80,13 +72,13 @@ void SwScrollbar::ExtendedShow( bool bSet ) m_bVisible = bSet; if( (!bSet || !m_bAuto) && IsUpdateMode() && m_bSizeSet) { - InterimItemWindow::Show(bSet); + ScrollAdaptor::Show(bSet); } } void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) { - InterimItemWindow::SetPosSizePixel(rNewPos, rNewSize); + ScrollAdaptor::SetPosSizePixel(rNewPos, rNewSize); m_bSizeSet = true; if(m_bVisible) ExtendedShow(); @@ -99,7 +91,7 @@ void SwScrollbar::SetAuto(bool bSet) m_bAuto = bSet; // hide automatically - then show - if(!m_bAuto && m_bVisible && !InterimItemWindow::IsVisible()) + if(!m_bAuto && m_bVisible && !ScrollAdaptor::IsVisible()) ExtendedShow(); else if(m_bAuto) AutoShow(); // or hide automatically @@ -110,101 +102,15 @@ void SwScrollbar::AutoShow() { tools::Long nVis = GetVisibleSize(); tools::Long nLen = GetRange().Len(); - if( nVis >= nLen - 1) + if (nVis >= nLen - 1) { - if(InterimItemWindow::IsVisible()) - InterimItemWindow::Show(false); + if (ScrollAdaptor::IsVisible()) + ScrollAdaptor::Show(false); } - else if ( !InterimItemWindow::IsVisible() ) + else if (!ScrollAdaptor::IsVisible()) { - InterimItemWindow::Show(); + ScrollAdaptor::Show(); } } -void SwScrollbar::SetRange(const Range& rRange) -{ - m_xScrollBar->adjustment_set_lower(rRange.Min()); - m_xScrollBar->adjustment_set_upper(rRange.Max()); -} - -Range SwScrollbar::GetRange() const -{ - return Range(m_xScrollBar->adjustment_get_lower(), - m_xScrollBar->adjustment_get_upper()); -} - -void SwScrollbar::SetRangeMin(tools::Long nNewRange) -{ - m_xScrollBar->adjustment_set_lower(nNewRange); -} - -tools::Long SwScrollbar::GetRangeMin() const -{ - return m_xScrollBar->adjustment_get_lower(); -} - -void SwScrollbar::SetRangeMax(tools::Long nNewRange) -{ - m_xScrollBar->adjustment_set_upper(nNewRange); -} - -tools::Long SwScrollbar::GetRangeMax() const -{ - return m_xScrollBar->adjustment_get_upper(); -} - -void SwScrollbar::SetLineSize(tools::Long nNewSize) -{ - m_xScrollBar->adjustment_set_step_increment(nNewSize); -} - -tools::Long SwScrollbar::GetLineSize() const -{ - return m_xScrollBar->adjustment_get_step_increment(); -} - -void SwScrollbar::SetPageSize(tools::Long nNewSize) -{ - m_xScrollBar->adjustment_set_page_increment(nNewSize); -} - -tools::Long SwScrollbar::GetPageSize() const -{ - return m_xScrollBar->adjustment_get_page_increment(); -} - -void SwScrollbar::SetVisibleSize(tools::Long nNewSize) -{ - m_xScrollBar->adjustment_set_page_size(nNewSize); -} - -tools::Long SwScrollbar::GetVisibleSize() const -{ - return m_xScrollBar->adjustment_get_page_size(); -} - -void SwScrollbar::SetThumbPos(tools::Long nThumbPos) -{ - m_xScrollBar->adjustment_set_value(nThumbPos); -} - -tools::Long SwScrollbar::GetThumbPos() const -{ - return m_xScrollBar->adjustment_get_value(); -} - -void SwScrollbar::SetScrollHdl(const Link& rLink) -{ - m_aLink = rLink; - m_xScrollBar->connect_adjustment_changed(rLink); -} - -tools::Long SwScrollbar::DoScroll(tools::Long nNewPos) -{ - const auto nOrig = m_xScrollBar->adjustment_get_value(); - m_xScrollBar->adjustment_set_value(nNewPos); - m_aLink.Call(*m_xScrollBar); - return m_xScrollBar->adjustment_get_value() - nOrig; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 0fe4fc8d970e..6d541096a5a4 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1049,9 +1049,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) rDocSh.EnableSetModified(); InvalidateBorder(); - if( !m_pHScrollbar->IsVisible( true ) ) + if( !m_pHScrollbar->IsScrollbarVisible(true) ) ShowHScrollbar( false ); - if( !m_pVScrollbar->IsVisible( true ) ) + if( !m_pVScrollbar->IsScrollbarVisible(true) ) ShowVScrollbar( false ); if (m_pWrtShell && m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton()) diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index b7c1810a2dd1..f2c9ad63034a 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -728,7 +728,7 @@ void SwView::ShowHScrollbar(bool bShow) bool SwView::IsHScrollbarVisible()const { assert(m_pHScrollbar && "Scrollbar invalid"); - return m_pHScrollbar->IsVisible( false ) || m_pHScrollbar->IsAuto(); + return m_pHScrollbar->IsScrollbarVisible(false) || m_pHScrollbar->IsAuto(); } void SwView::ShowVScrollbar(bool bShow) @@ -740,7 +740,7 @@ void SwView::ShowVScrollbar(bool bShow) bool SwView::IsVScrollbarVisible()const { assert(m_pVScrollbar && "Scrollbar invalid"); - return m_pVScrollbar->IsVisible( false ); + return m_pVScrollbar->IsScrollbarVisible(false); } void SwView::EnableHScrollbar(bool bEnable) diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index ed3adf84b45c..e145e0ec6b18 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -834,14 +834,14 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill ) const StyleSettings &rSet = GetEditWin().GetSettings().GetStyleSettings(); const tools::Long nTmp = rSet.GetScrollBarSize(); - if( m_pVScrollbar->IsVisible(true) ) + if( m_pVScrollbar->IsScrollbarVisible(true) ) { if(bRightVRuler) rToFill.Left() = nTmp; else rToFill.Right() = nTmp; } - if ( m_pHScrollbar->IsVisible(true) ) + if ( m_pHScrollbar->IsScrollbarVisible(true) ) rToFill.Bottom() = nTmp; SetBorderPixel( rToFill ); @@ -868,8 +868,8 @@ void ViewResizePixel( const vcl::RenderContext &rRef, pVRuler->GetSizePixel().Width() : 0; const tools::Long nScrollBarSize = rRef.GetSettings().GetStyleSettings().GetScrollBarSize(); - const tools::Long nHBSzHeight = rHScrollbar.IsVisible(true) ? nScrollBarSize : 0; - const tools::Long nVBSzWidth = rVScrollbar.IsVisible(true) ? nScrollBarSize : 0; + const tools::Long nHBSzHeight = rHScrollbar.IsScrollbarVisible(true) ? nScrollBarSize : 0; + const tools::Long nVBSzWidth = rVScrollbar.IsScrollbarVisible(true) ? nScrollBarSize : 0; if(pVRuler) { @@ -967,8 +967,8 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool ) } m_bInInnerResizePixel = true; - const bool bHScrollVisible = m_pHScrollbar->IsVisible(true); - const bool bVScrollVisible = m_pVScrollbar->IsVisible(true); + const bool bHScrollVisible = m_pHScrollbar->IsScrollbarVisible(true); + const bool bVScrollVisible = m_pVScrollbar->IsScrollbarVisible(true); bool bRepeat = false; do { @@ -1023,8 +1023,8 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool ) // require to repeat the ViewResizePixel() call - but only once! if(bRepeat) bRepeat = false; - else if(bHScrollVisible != m_pHScrollbar->IsVisible(true) || - bVScrollVisible != m_pVScrollbar->IsVisible(true)) + else if(bHScrollVisible != m_pHScrollbar->IsScrollbarVisible(true) || + bVScrollVisible != m_pVScrollbar->IsScrollbarVisible(true)) bRepeat = true; }while( bRepeat ); bProtectDocShellVisArea = false; @@ -1066,10 +1066,10 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) { bShowH = bShowV = bHAuto = bAuto = false; } - if(m_pHScrollbar->IsVisible(false) != bShowH && !bHAuto) + if(m_pHScrollbar->IsScrollbarVisible(false) != bShowH && !bHAuto) ShowHScrollbar(bShowH); m_pHScrollbar->SetAuto( bHAuto ); - if(m_pVScrollbar->IsVisible(false) != bShowV && !bAuto) + if(m_pVScrollbar->IsScrollbarVisible(false) != bShowV && !bAuto) ShowVScrollbar(bShowV); m_pVScrollbar->SetAuto(bAuto); @@ -1083,8 +1083,8 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) do { ++nCnt; - const bool bScroll1 = m_pVScrollbar->IsVisible(true); - const bool bScroll2 = m_pHScrollbar->IsVisible(true); + const bool bScroll1 = m_pVScrollbar->IsScrollbarVisible(true); + const bool bScroll2 = m_pHScrollbar->IsScrollbarVisible(true); SvBorder aBorder; CalcAndSetBorderPixel( aBorder ); const Size aEditSz( GetEditWin().GetOutputSizePixel() ); @@ -1122,9 +1122,9 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) SetZoom_( aEditSz, m_pWrtShell->GetViewOptions()->GetZoomType(), 100, true ); m_pWrtShell->EndAction(); - bRepeat = bScroll1 != m_pVScrollbar->IsVisible(true); + bRepeat = bScroll1 != m_pVScrollbar->IsScrollbarVisible(true); if ( !bRepeat ) - bRepeat = bScroll2 != m_pHScrollbar->IsVisible(true); + bRepeat = bScroll2 != m_pHScrollbar->IsScrollbarVisible(true); // Do no infinite loops. // If possible stop when the (auto-) scroll bars are visible. @@ -1179,19 +1179,19 @@ bool SwView::UpdateScrollbars() aTmpSz.AdjustWidth(lOfst ); aTmpSz.AdjustHeight(lOfst ); { - const bool bVScrollVisible = m_pVScrollbar->IsVisible(true); + const bool bVScrollVisible = m_pVScrollbar->IsScrollbarVisible(true); m_pVScrollbar->DocSzChgd( aTmpSz ); m_pVScrollbar->ViewPortChgd( aTmpRect ); - if ( bVScrollVisible != m_pVScrollbar->IsVisible(true) ) + if ( bVScrollVisible != m_pVScrollbar->IsScrollbarVisible(true) ) bRet = true; } { - const bool bHScrollVisible = m_pHScrollbar->IsVisible(true); + const bool bHScrollVisible = m_pHScrollbar->IsScrollbarVisible(true); m_pHScrollbar->DocSzChgd( aTmpSz ); m_pHScrollbar->ViewPortChgd( aTmpRect ); - if ( bHScrollVisible != m_pHScrollbar->IsVisible(true) ) + if ( bHScrollVisible != m_pHScrollbar->IsScrollbarVisible(true) ) bRet = true; - m_pScrollFill->Show(m_pHScrollbar->IsVisible(true) && m_pVScrollbar->IsVisible(true) ); + m_pScrollFill->Show(m_pHScrollbar->IsScrollbarVisible(true) && m_pVScrollbar->IsScrollbarVisible(true) ); } } return bRet;