summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/dlged/dlged.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx4
-rw-r--r--include/svtools/scrwin.hxx2
-rw-r--r--include/vcl/window.hxx30
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sd/source/ui/view/sdwindow.cxx2
-rw-r--r--sd/source/ui/view/viewshe2.cxx2
-rw-r--r--svtools/source/brwbox/brwbox1.cxx2
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx10
-rw-r--r--svtools/source/control/scrwin.cxx2
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx6
-rw-r--r--sw/source/core/view/viewsh.cxx8
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--toolkit/source/awt/scrollabledialog.cxx2
-rw-r--r--vcl/source/window/menufloatingwindow.cxx4
-rw-r--r--vcl/source/window/paint.cxx28
-rw-r--r--vcl/source/window/window.cxx6
21 files changed, 65 insertions, 57 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index f9cb691efc2a..e56a876e7885 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -323,7 +323,7 @@ void DlgEditor::DoScroll( ScrollBar* )
// rWindow.SetBackground();
// #i74769# children should be scrolled
- rWindow.Scroll( -nX, -nY, SCROLL_CHILDREN);
+ rWindow.Scroll( -nX, -nY, ScrollFlags::Children);
aMap.SetOrigin( Point( -aScrollPos.Width(), -aScrollPos.Height() ) );
rWindow.SetMapMode( aMap );
rWindow.Update();
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 08d990b2d2ef..484ba380bf9d 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1057,7 +1057,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck )
aVisDocStartPos = pOutWin->LogicToPixel( aVisDocStartPos );
aVisDocStartPos = pOutWin->PixelToLogic( aVisDocStartPos );
Rectangle aRect( aOutArea );
- pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, SCROLL_CLIP );
+ pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, ScrollFlags::Clip );
pOutWin->Update();
pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) );
if ( bVisCursor )
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 063c32d15ac4..2bd9564d2098 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -819,7 +819,7 @@ namespace pcr
sal_Int32 nLines = CalcVisibleLines();
sal_uInt16 nEnd = (sal_uInt16)(nThumbPos + nLines);
- m_aLinesPlayground->Scroll(0, -nDelta * m_nRowHeight, SCROLL_CHILDREN);
+ m_aLinesPlayground->Scroll(0, -nDelta * m_nRowHeight, ScrollFlags::Children);
if (1 == nDelta)
{
@@ -856,7 +856,7 @@ namespace pcr
sal_uInt16 nEnd = (sal_uInt16)(nThumbPos + CalcVisibleLines());
- m_aLinesPlayground->Scroll(0, -nDelta * m_nRowHeight, SCROLL_CHILDREN);
+ m_aLinesPlayground->Scroll(0, -nDelta * m_nRowHeight, ScrollFlags::Children);
if (1 == nDelta)
{
diff --git a/include/svtools/scrwin.hxx b/include/svtools/scrwin.hxx
index 2396725af54c..6f29fa04f168 100644
--- a/include/svtools/scrwin.hxx
+++ b/include/svtools/scrwin.hxx
@@ -85,7 +85,7 @@ public:
Size GetTotalSize() { return PixelToLogic( aTotPixSz ); }
using Window::Scroll;
- virtual void Scroll( long nDeltaX, long nDeltaY, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
+ virtual void Scroll( long nDeltaX, long nDeltaY, ScrollFlags nFlags = ScrollFlags::NONE ) SAL_OVERRIDE;
private:
SVT_DLLPRIVATE Size GetOutputSizePixel() const;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 857f649ba15f..34f0baca282e 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -251,14 +251,22 @@ namespace o3tl
}
// Flags for Scroll
-#define SCROLL_CLIP ((sal_uInt16)0x0001)
-#define SCROLL_CHILDREN ((sal_uInt16)0x0002)
-#define SCROLL_NOCHILDREN ((sal_uInt16)0x0004)
-#define SCROLL_NOERASE ((sal_uInt16)0x0008)
-#define SCROLL_NOINVALIDATE ((sal_uInt16)0x0010)
-#define SCROLL_NOWINDOWINVALIDATE ((sal_uInt16)0x0020)
-#define SCROLL_USECLIPREGION ((sal_uInt16)0x0040)
-#define SCROLL_UPDATE ((sal_uInt16)0x0080)
+enum class ScrollFlags
+{
+ NONE = 0x0000,
+ Clip = 0x0001,
+ Children = 0x0002,
+ NoChildren = 0x0004,
+ NoErase = 0x0008,
+ NoInvalidate = 0x0010,
+ NoWindowInvalidate = 0x0020,
+ UseClipRegion = 0x0040,
+ Update = 0x0080,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ScrollFlags> : is_typed_flags<ScrollFlags, 0x00ff> {};
+}
// Flags for ParentClipMode
#define PARENTCLIPMODE_CLIP ((sal_uInt16)0x0001)
@@ -589,7 +597,7 @@ protected:
SAL_DLLPRIVATE void ImplSetMouseTransparent( bool bTransparent );
- SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, ScrollFlags nFlags );
SAL_DLLPRIVATE void ImplSaveOverlapBackground();
SAL_DLLPRIVATE bool ImplRestoreOverlapBackground( vcl::Region& rInvRegion );
@@ -1077,9 +1085,9 @@ public:
bool IsScrollable() const;
virtual void Scroll( long nHorzScroll, long nVertScroll,
- sal_uInt16 nFlags = 0 );
+ ScrollFlags nFlags = ScrollFlags::NONE );
void Scroll( long nHorzScroll, long nVertScroll,
- const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ const Rectangle& rRect, ScrollFlags nFlags = ScrollFlags::NONE );
virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE );
virtual void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE );
virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE );
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index c1f80963a0d1..4b9d30d63f0e 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1739,7 +1739,7 @@ void OViewsWindow::scrollChildren(const Point& _aThumbPos)
aMapMode.SetOrigin( Point(aOld.X() , - aPosY.Y()));
SetMapMode( aMapMode );
- Scroll(0, -( aOld.Y() + aPosY.Y()),SCROLL_CHILDREN);
+ Scroll(0, -( aOld.Y() + aPosY.Y()),ScrollFlags::Children);
}
TSectionsMap::iterator aIter = m_aSections.begin();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 7a9f81f2ef2c..af8018483884 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4735,7 +4735,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
bIsInScroll = true;
SetMapMode(MAP_PIXEL);
- Scroll( nDifX, nDifY, SCROLL_CHILDREN );
+ Scroll( nDifX, nDifY, ScrollFlags::Children );
SetMapMode( GetDrawMapMode() ); // verschobenen MapMode erzeugen
UpdateEditViewPos();
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index c9c4bfe15b61..2b936a039561 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -650,7 +650,7 @@ void Window::SetVisibleXY(double fX, double fY)
if ( fY >= 0 )
maWinPos.Y() = (long) (fY * maViewSize.Height());
UpdateMapOrigin(false);
- Scroll(nOldX - maWinPos.X(), nOldY - maWinPos.Y(), SCROLL_CHILDREN);
+ Scroll(nOldX - maWinPos.X(), nOldY - maWinPos.Y(), ScrollFlags::Children);
Update();
}
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 3abcdd89b0fc..929a9f88d1e5 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -344,7 +344,7 @@ void ViewShell::SetZoom(long nZoom)
mpContentWindow->SetZoomIntegral(nZoom);
// #i74769# Here is a 2nd way (besides Window::Scroll) to set the visible prt
- // of the window. It needs - like Scroll(SCROLL_CHILDREN) does - also to move
+ // of the window. It needs - like Scroll(ScrollFlags::Children) does - also to move
// the child windows. I am trying InvalidateFlags::Children here which makes things better,
// but does not solve the problem completely. Neet to ask PL.
mpContentWindow->Invalidate(InvalidateFlags::Children);
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index eb7e698d8dfd..de5d309b1481 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -35,7 +35,7 @@
#include "brwimpl.hxx"
-#define SCROLL_FLAGS (SCROLL_CLIP | SCROLL_NOCHILDREN)
+#define SCROLL_FLAGS (ScrollFlags::Clip | ScrollFlags::NoChildren)
#define getDataWindow() (static_cast<BrowserDataWin*>(pDataWin.get()))
using namespace com::sun::star::accessibility::AccessibleEventId;
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index a2428e9f146a..51ba7a448e8a 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2303,7 +2303,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar,
{
// scroll in reverse direction!
pView->Control::Scroll( -nDx, -nDy, aOutputArea,
- SCROLL_NOCHILDREN | SCROLL_USECLIPREGION | SCROLL_CLIP );
+ ScrollFlags::NoChildren | ScrollFlags::UseClipRegion | ScrollFlags::Clip );
}
else
pView->Invalidate(InvalidateFlags::NoChildren);
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 56f9cbae9055..0d67e2a0142d 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -364,7 +364,7 @@ void SvImpLBox::CursorDown()
pView->Update();
pStartEntry = pNextFirstToDraw;
Rectangle aArea( GetVisibleArea() );
- pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, SCROLL_NOCHILDREN );
+ pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren );
pView->Update();
ShowCursor( true );
pView->NotifyScrolled();
@@ -386,7 +386,7 @@ void SvImpLBox::CursorUp()
pStartEntry = pPrevFirstToDraw;
Rectangle aArea( GetVisibleArea() );
aArea.Bottom() -= nEntryHeight;
- pView->Scroll( 0, nEntryHeight, aArea, SCROLL_NOCHILDREN );
+ pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren );
pView->Update();
ShowCursor( true );
pView->NotifyScrolled();
@@ -425,7 +425,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta )
nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta);
nScroll = -nScroll;
pView->Update();
- pView->Scroll( 0, nScroll, aArea, SCROLL_NOCHILDREN );
+ pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
pView->Update();
pView->NotifyScrolled();
}
@@ -461,7 +461,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta )
long nEntryHeight = pView->GetEntryHeight();
Rectangle aArea( GetVisibleArea() );
pView->Update();
- pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, SCROLL_NOCHILDREN );
+ pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
pView->Update();
pView->NotifyScrolled();
}
@@ -758,7 +758,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
if( !(nFlags & F_IN_RESIZE) )
{
Rectangle aRect( GetVisibleArea() );
- pView->Scroll( -nDelta, 0, aRect, SCROLL_NOCHILDREN );
+ pView->Scroll( -nDelta, 0, aRect, ScrollFlags::NoChildren );
}
else
pView->Invalidate();
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx
index 3f716b00ca46..f91234f7c4c7 100644
--- a/svtools/source/control/scrwin.cxx
+++ b/svtools/source/control/scrwin.cxx
@@ -314,7 +314,7 @@ void ScrollableWindow::SetTotalSize( const Size& rNewSize )
-void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 )
+void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, ScrollFlags )
{
// get the delta in pixel
Size aDeltaPix( LogicToPixel( Size(nDeltaX, nDeltaY) ) );
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 916f7d8b824f..71c688f949fe 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2082,7 +2082,7 @@ namespace svt { namespace table
&& std::abs( nPixelDelta ) < aDataArea.GetHeight()
)
{
- m_pDataWindow->Scroll( 0, (long)-nPixelDelta, aDataArea, SCROLL_CLIP | SCROLL_UPDATE | SCROLL_CHILDREN);
+ m_pDataWindow->Scroll( 0, (long)-nPixelDelta, aDataArea, ScrollFlags::Clip | ScrollFlags::Update | ScrollFlags::Children);
}
else
{
@@ -2145,7 +2145,7 @@ namespace svt { namespace table
- m_aColumnWidths[ m_nLeftColumn ].getStart();
// update our column positions
- // Do this *before* scrolling, as SCROLL_UPDATE will trigger a paint, which already needs the correct
+ // Do this *before* scrolling, as ScrollFlags::Update will trigger a paint, which already needs the correct
// information in m_aColumnWidths
for ( ColumnPositions::iterator colPos = m_aColumnWidths.begin();
colPos != m_aColumnWidths.end();
@@ -2160,7 +2160,7 @@ namespace svt { namespace table
&& std::abs( nPixelDelta ) < aDataArea.GetWidth()
)
{
- m_pDataWindow->Scroll( nPixelDelta, 0, aDataArea, SCROLL_CLIP | SCROLL_UPDATE );
+ m_pDataWindow->Scroll( nPixelDelta, 0, aDataArea, ScrollFlags::Clip | ScrollFlags::Update );
}
else
{
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 51266698935b..61dcf46c3924 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1317,10 +1317,10 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
Rectangle aTmp( aTmpOldVis.SVRect() );
aTmp.Left() = pRect->Left();
aTmp.Right()= pRect->Right();
- GetWin()->Scroll( 0, lScroll, aTmp, SCROLL_CHILDREN);
+ GetWin()->Scroll( 0, lScroll, aTmp, ScrollFlags::Children);
}
else
- GetWin()->Scroll( 0, lScroll, SCROLL_CHILDREN );
+ GetWin()->Scroll( 0, lScroll, ScrollFlags::Children );
const Point aTmpPt( -VisArea().Left(), -VisArea().Top() );
MapMode aTmpMapMode( GetWin()->GetMapMode() );
@@ -1398,9 +1398,9 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
maVisArea.Pos().X() -= lXDiff;
maVisArea.Pos().Y() -= lYDiff;
if ( pRect )
- GetWin()->Scroll( lXDiff, lYDiff, *pRect, SCROLL_CHILDREN);
+ GetWin()->Scroll( lXDiff, lYDiff, *pRect, ScrollFlags::Children);
else
- GetWin()->Scroll( lXDiff, lYDiff, SCROLL_CHILDREN);
+ GetWin()->Scroll( lXDiff, lYDiff, ScrollFlags::Children);
return false;
}
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index 2fd7d5bdcc0d..ff4732ea996b 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -153,7 +153,7 @@ public:
return maPaintedPreviewDocRect;
}
- void Scroll(long nXMove, long nYMove, sal_uInt16 nFlags = 0) SAL_OVERRIDE;
+ void Scroll(long nXMove, long nYMove, ScrollFlags nFlags = ScrollFlags::NONE) SAL_OVERRIDE;
/** Method to enable/disable book preview
@param _bBookPreview
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 144030b20242..70cd467c37b0 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1781,7 +1781,7 @@ void SwPagePreviewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
* when less than the desired number of rows fits into
* the view
*/
-void SwPagePreviewWin::Scroll(long nXMove, long nYMove, sal_uInt16 /*nFlags*/)
+void SwPagePreviewWin::Scroll(long nXMove, long nYMove, ScrollFlags /*nFlags*/)
{
maPaintedPreviewDocRect.Move(nXMove, nYMove);
mpPgPreviewLayout->Prepare( 0, maPaintedPreviewDocRect.TopLeft(),
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx
index 4e552d3e3fc4..a615bd29dd5f 100644
--- a/toolkit/source/awt/scrollabledialog.cxx
+++ b/toolkit/source/awt/scrollabledialog.cxx
@@ -76,7 +76,7 @@ void ScrollableWrapper<T>::setScrollVisibility( ScrollBarVisibility rVisState )
maVScrollBar->Show();
}
if ( mbHasHoriBar || mbHasVertBar )
- this->SetStyle( T::GetStyle() | WB_CLIPCHILDREN | SCROLL_UPDATE );
+ this->SetStyle( T::GetStyle() | WB_CLIPCHILDREN | WB_AUTOSIZE );
}
template< class T>
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index ad7bd0ffc27b..a4b70b4a8234 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -599,7 +599,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
Invalidate();
}
- Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP );
+ Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), ScrollFlags::Clip );
}
else if ( bScrollDown && !bUp )
{
@@ -623,7 +623,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
Invalidate();
}
- Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP );
+ Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), ScrollFlags::Clip );
}
Invalidate();
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index f97c2a632e91..a68d6bc14e21 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1479,7 +1479,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
}
void Window::ImplScroll( const Rectangle& rRect,
- long nHorzScroll, long nVertScroll, sal_uInt16 nFlags )
+ long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
if ( !IsDeviceOutputNecessary() )
return;
@@ -1497,18 +1497,18 @@ void Window::ImplScroll( const Rectangle& rRect,
if ( mpWindowImpl->mpCursor )
mpWindowImpl->mpCursor->ImplSuspend();
- sal_uInt16 nOrgFlags = nFlags;
- if ( !(nFlags & (SCROLL_CHILDREN | SCROLL_NOCHILDREN)) )
+ ScrollFlags nOrgFlags = nFlags;
+ if ( !(nFlags & (ScrollFlags::Children | ScrollFlags::NoChildren)) )
{
if ( GetStyle() & WB_CLIPCHILDREN )
- nFlags |= SCROLL_NOCHILDREN;
+ nFlags |= ScrollFlags::NoChildren;
else
- nFlags |= SCROLL_CHILDREN;
+ nFlags |= ScrollFlags::Children;
}
vcl::Region aInvalidateRegion;
- bool bScrollChildren = (nFlags & SCROLL_CHILDREN) != 0;
- bool bErase = (nFlags & SCROLL_NOERASE) == 0;
+ bool bScrollChildren(nFlags & ScrollFlags::Children);
+ bool bErase(nFlags & ScrollFlags::NoErase);
if ( !mpWindowImpl->mpFirstChild )
bScrollChildren = false;
@@ -1529,7 +1529,7 @@ void Window::ImplScroll( const Rectangle& rRect,
// adapt paint areas
ImplMoveAllInvalidateRegions( aRectMirror, nHorzScroll, nVertScroll, bScrollChildren );
- if ( !(nFlags & SCROLL_NOINVALIDATE) )
+ if ( !(nFlags & ScrollFlags::NoInvalidate) )
{
ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, true, false );
@@ -1543,7 +1543,7 @@ void Window::ImplScroll( const Rectangle& rRect,
aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll );
bErase = true;
}
- if ( !(nFlags & SCROLL_NOWINDOWINVALIDATE) )
+ if ( !(nFlags & ScrollFlags::NoWindowInvalidate) )
{
Rectangle aDestRect( aRectMirror );
aDestRect.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll );
@@ -1556,7 +1556,7 @@ void Window::ImplScroll( const Rectangle& rRect,
Point aPoint( mnOutOffX, mnOutOffY );
vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
- if ( nFlags & SCROLL_CLIP )
+ if ( nFlags & ScrollFlags::Clip )
aRegion.Intersect( rRect );
if ( mpWindowImpl->mbWinRegion )
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -1566,12 +1566,12 @@ void Window::ImplScroll( const Rectangle& rRect,
ImplClipBoundaries( aRegion, false, true );
if ( !bScrollChildren )
{
- if ( nOrgFlags & SCROLL_NOCHILDREN )
+ if ( nOrgFlags & ScrollFlags::NoChildren )
ImplClipAllChildren( aRegion );
else
ImplClipChildren( aRegion );
}
- if ( mbClipRegion && (nFlags & SCROLL_USECLIPREGION) )
+ if ( mbClipRegion && (nFlags & ScrollFlags::UseClipRegion) )
aRegion.Intersect( maRegion );
if ( !aRegion.IsEmpty() )
{
@@ -1629,7 +1629,7 @@ void Window::ImplScroll( const Rectangle& rRect,
nPaintFlags |= InvalidateFlags::NoErase;
if ( !bScrollChildren )
{
- if ( nOrgFlags & SCROLL_NOCHILDREN )
+ if ( nOrgFlags & ScrollFlags::NoChildren )
ImplClipAllChildren( aInvalidateRegion );
else
ImplClipChildren( aInvalidateRegion );
@@ -1650,7 +1650,7 @@ void Window::ImplScroll( const Rectangle& rRect,
}
}
- if ( nFlags & SCROLL_UPDATE )
+ if ( nFlags & ScrollFlags::Update )
Update();
if ( mpWindowImpl->mpCursor )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 27b9f6976a42..297572e2eeca 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3095,16 +3095,16 @@ Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bo
return Rectangle( aPos, aSize );
}
-void Window::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags )
+void Window::Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
ImplScroll( Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
- nHorzScroll, nVertScroll, nFlags & ~SCROLL_CLIP );
+ nHorzScroll, nVertScroll, nFlags & ~ScrollFlags::Clip );
}
void Window::Scroll( long nHorzScroll, long nVertScroll,
- const Rectangle& rRect, sal_uInt16 nFlags )
+ const Rectangle& rRect, ScrollFlags nFlags )
{
OutputDevice *pOutDev = GetOutDev();