[Libreoffice-commits] core.git: 3 commits - avmedia/source basctl/source chart2/source cui/source dbaccess/source editeng/source extensions/source framework/source include/svtools include/svx include/vcl offapi/com reportdesign/source sc/source sd/source sfx2/source svtools/source svx/source sw/source toolkit/source vcl/source vcl/workben
Noel Grandin
noel at peralex.com
Mon May 25 23:35:08 PDT 2015
avmedia/source/framework/mediacontrol.cxx | 2
basctl/source/dlged/dlged.cxx | 2
chart2/source/controller/main/ChartWindow.cxx | 6
chart2/source/controller/main/ChartWindow.hxx | 6
cui/source/dialogs/cuihyperdlg.cxx | 2
cui/source/factory/dlgfact.cxx | 2
cui/source/factory/dlgfact.hxx | 2
cui/source/options/connpooloptions.cxx | 4
dbaccess/source/ui/querydesign/JoinTableView.cxx | 10 -
dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx | 4
dbaccess/source/ui/querydesign/QueryTableView.cxx | 4
dbaccess/source/ui/querydesign/TableConnection.cxx | 4
dbaccess/source/ui/querydesign/TableWindow.cxx | 4
dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 4
dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 2
dbaccess/source/ui/relationdesign/RelationController.cxx | 4
dbaccess/source/ui/relationdesign/RelationTableView.cxx | 2
editeng/source/editeng/impedit.cxx | 2
extensions/source/propctrlr/browserlistbox.cxx | 6
extensions/source/propctrlr/standardcontrol.cxx | 2
framework/source/helper/vclstatusindicator.cxx | 2
include/svtools/scrwin.hxx | 2
include/svtools/treelistbox.hxx | 6
include/svx/svxdlg.hxx | 2
include/vcl/window.hxx | 83 ++++++---
offapi/com/sun/star/awt/XWindowPeer.idl | 4
reportdesign/source/core/sdr/RptObject.cxx | 2
reportdesign/source/ui/misc/ColorListener.cxx | 4
reportdesign/source/ui/report/ReportSection.cxx | 4
reportdesign/source/ui/report/ReportWindow.cxx | 7
reportdesign/source/ui/report/ScrollHelper.cxx | 2
reportdesign/source/ui/report/SectionView.cxx | 2
reportdesign/source/ui/report/SectionWindow.cxx | 10 -
reportdesign/source/ui/report/StartMarker.cxx | 2
reportdesign/source/ui/report/ViewsWindow.cxx | 16 -
reportdesign/source/ui/report/dlgedfunc.cxx | 2
sc/source/ui/app/inputwin.cxx | 4
sc/source/ui/view/gridwin.cxx | 2
sd/source/ui/view/sdwindow.cxx | 2
sd/source/ui/view/viewshe2.cxx | 8
sfx2/source/doc/templatedlg.cxx | 4
sfx2/source/sidebar/SidebarController.cxx | 2
svtools/source/brwbox/brwbox1.cxx | 18 +-
svtools/source/brwbox/datwin.cxx | 4
svtools/source/brwbox/datwin.hxx | 6
svtools/source/contnr/imivctl1.cxx | 10 -
svtools/source/contnr/ivctrl.cxx | 4
svtools/source/contnr/svimpbox.cxx | 10 -
svtools/source/contnr/treelistbox.cxx | 6
svtools/source/control/scrwin.cxx | 2
svtools/source/table/tablecontrol_impl.cxx | 18 +-
svx/source/accessibility/AccessibleTextHelper.cxx | 2
svx/source/dialog/frmsel.cxx | 2
svx/source/sdr/overlay/overlaymanager.cxx | 4
svx/source/svdraw/sdrpagewindow.cxx | 2
svx/source/svdraw/sdrpaintwindow.cxx | 2
svx/source/svdraw/svdglue.cxx | 2
svx/source/svdraw/svdpntv.cxx | 4
sw/source/core/layout/paintfrm.cxx | 2
sw/source/core/view/viewsh.cxx | 12 -
sw/source/ui/dbui/addresslistdialog.cxx | 2
sw/source/uibase/docvw/srcedtw.cxx | 3
sw/source/uibase/inc/pview.hxx | 2
sw/source/uibase/inc/srcedtw.hxx | 2
sw/source/uibase/uiview/pview.cxx | 2
toolkit/source/awt/scrollabledialog.cxx | 2
toolkit/source/awt/vclxwindow.cxx | 4
vcl/source/control/button.cxx | 2
vcl/source/control/edit.cxx | 2
vcl/source/control/ilstbox.cxx | 2
vcl/source/control/lstbox.cxx | 2
vcl/source/control/slider.cxx | 2
vcl/source/control/tabctrl.cxx | 4
vcl/source/window/brdwin.cxx | 4
vcl/source/window/menufloatingwindow.cxx | 4
vcl/source/window/paint.cxx | 118 +++++++-------
vcl/source/window/stacking.cxx | 6
vcl/source/window/status.cxx | 6
vcl/source/window/toolbox.cxx | 6
vcl/source/window/window.cxx | 16 -
vcl/workben/icontest.cxx | 2
81 files changed, 286 insertions(+), 263 deletions(-)
New commits:
commit 204d147b8a887d17e6457f795e8b8f4d632213ae
Author: Noel Grandin <noel at peralex.com>
Date: Tue May 26 08:29:52 2015 +0200
convert SCROLL constants to scoped enum
Change-Id: I5696fa39b2d032735cea7abe039349d4f83cf68d
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index f9cb691..e56a876 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 08d990b..484ba38 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 063c32d..2bd9564 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 2396725..6f29fa0 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 857f649..34f0bac 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 c1f8096..4b9d30d 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 7a9f81f..af80184 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 c9c4bfe..2b936a0 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 3abcdd8..929a9f8 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 eb7e698..de5d309 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 a2428e9..51ba7a4 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 56f9cba..0d67e2a 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 3f716b0..f91234f 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 916f7d8..71c688f 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 5126669..61dcf46 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 2fd7d5b..ff4732e 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 144030b..70cd467 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 4e552d3..a615bd2 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 ad7bd0f..a4b70b4 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 f97c2a6..a68d6bc 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 27b9f69..297572e 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();
commit 79aa1ab00a8361c44b8caf73294f841e6553eb72
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 25 13:59:51 2015 +0200
convert VALIDATE constants to scoped enum
Change-Id: Ib3456116ab4c2e2f4b567bc195be2ad159b4fc82
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 7c97bf9..857f649 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -239,8 +239,16 @@ namespace o3tl
}
// Flags for Validate
-#define VALIDATE_CHILDREN ((sal_uInt16)0x0001)
-#define VALIDATE_NOCHILDREN ((sal_uInt16)0x0002)
+enum class ValidateFlags
+{
+ NONE = 0x0000,
+ Children = 0x0001,
+ NoChildren = 0x0002
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ValidateFlags> : is_typed_flags<ValidateFlags, 0x0003> {};
+}
// Flags for Scroll
#define SCROLL_CLIP ((sal_uInt16)0x0001)
@@ -568,8 +576,8 @@ protected:
SAL_DLLPRIVATE Point ImplOutputToFrame( const Point& rPos );
SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion( vcl::Region& rRegion );
- SAL_DLLPRIVATE void ImplValidateFrameRegion( const vcl::Region* rRegion, sal_uInt16 nFlags );
- SAL_DLLPRIVATE void ImplValidate( const vcl::Region* rRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplValidateFrameRegion( const vcl::Region* rRegion, ValidateFlags nFlags );
+ SAL_DLLPRIVATE void ImplValidate( const vcl::Region* rRegion, ValidateFlags nFlags );
SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
@@ -1075,7 +1083,7 @@ public:
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 );
- void Validate( sal_uInt16 nFlags = 0 );
+ void Validate( ValidateFlags nFlags = ValidateFlags::NONE );
bool HasPaintEvent() const;
void Update();
void Flush();
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index f04cf49..f97c2a6 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -843,7 +843,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect,
}
}
-void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags )
+void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags nFlags )
{
if ( !pRegion )
mpWindowImpl->maInvalidateRegion.SetEmpty();
@@ -874,7 +874,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFl
}
mpWindowImpl->mnPaintFlags &= ~IMPL_PAINT_PAINTALL;
- if ( nFlags & VALIDATE_CHILDREN )
+ if ( nFlags & ValidateFlags::Children )
{
vcl::Window* pChild = mpWindowImpl->mpFirstChild;
while ( pChild )
@@ -885,19 +885,19 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFl
}
}
-void Window::ImplValidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
+void Window::ImplValidate( const vcl::Region* pRegion, ValidateFlags nFlags )
{
// assemble region
bool bValidateAll = !pRegion;
- sal_uInt16 nOrgFlags = nFlags;
- if ( !(nFlags & (VALIDATE_CHILDREN | VALIDATE_NOCHILDREN)) )
+ ValidateFlags nOrgFlags = nFlags;
+ if ( !(nFlags & (ValidateFlags::Children | ValidateFlags::NoChildren)) )
{
if ( GetStyle() & WB_CLIPCHILDREN )
- nFlags |= VALIDATE_NOCHILDREN;
+ nFlags |= ValidateFlags::NoChildren;
else
- nFlags |= VALIDATE_CHILDREN;
+ nFlags |= ValidateFlags::Children;
}
- if ( (nFlags & VALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild )
+ if ( (nFlags & ValidateFlags::NoChildren) && mpWindowImpl->mpFirstChild )
bValidateAll = false;
if ( bValidateAll )
ImplValidateFrameRegion( NULL, nFlags );
@@ -908,15 +908,15 @@ void Window::ImplValidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
if ( pRegion )
aRegion.Intersect( *pRegion );
ImplClipBoundaries( aRegion, true, true );
- if ( nFlags & VALIDATE_NOCHILDREN )
+ if ( nFlags & ValidateFlags::NoChildren )
{
- nFlags &= ~VALIDATE_CHILDREN;
- if ( nOrgFlags & VALIDATE_NOCHILDREN )
+ nFlags &= ~ValidateFlags::Children;
+ if ( nOrgFlags & ValidateFlags::NoChildren )
ImplClipAllChildren( aRegion );
else
{
if ( ImplClipChildren( aRegion ) )
- nFlags |= VALIDATE_CHILDREN;
+ nFlags |= ValidateFlags::Children;
}
}
if ( !aRegion.IsEmpty() )
@@ -1180,7 +1180,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
}
}
-void Window::Validate( sal_uInt16 nFlags )
+void Window::Validate( ValidateFlags nFlags )
{
if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
commit bb7ce3137dbe12d67f393b95a437b18e3a63f8e7
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 25 11:20:10 2015 +0200
convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the
IDL docs for XWindowPeer
Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index fe82833..4c019e5 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -560,7 +560,7 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
update();
if(p)
{
- p->Invalidate( INVALIDATE_UPDATE );
+ p->Invalidate( InvalidateFlags::Update );
}
}
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index f3e41c6..15117e0 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -276,7 +276,7 @@ void ChartWindow::ForceInvalidate()
m_pOpenGLWindow->Invalidate();
}
}
-void ChartWindow::Invalidate( sal_uInt16 nFlags )
+void ChartWindow::Invalidate( InvalidateFlags nFlags )
{
if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
return;
@@ -286,7 +286,7 @@ void ChartWindow::Invalidate( sal_uInt16 nFlags )
m_pOpenGLWindow->Invalidate( nFlags );
}
}
-void ChartWindow::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
+void ChartWindow::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
{
if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
return;
@@ -296,7 +296,7 @@ void ChartWindow::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
m_pOpenGLWindow->Invalidate( rRect, nFlags );
}
}
-void ChartWindow::Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags )
+void ChartWindow::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
{
if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
return;
diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx
index 99a0c5f..02d8848 100644
--- a/chart2/source/controller/main/ChartWindow.hxx
+++ b/chart2/source/controller/main/ChartWindow.hxx
@@ -59,9 +59,9 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
void ForceInvalidate();
- virtual void Invalidate( sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
- virtual void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
- virtual void Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
+ virtual void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
+ virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 6c3c549..0587f87 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -258,7 +258,7 @@ void SvxHpLinkDlg::Move()
}
if ( bDoInvalid )
- Invalidate(INVALIDATE_BACKGROUND);
+ Invalidate(InvalidateFlags::Transparent);
}
Window::Move();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 4ec04be..2ec3dd4 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -553,7 +553,7 @@ bool AbstractSvxHlinkDlgMarkWnd_Impl::IsVisible( ) const
return (( vcl::Window* )pDlg)->IsVisible();
}
-void AbstractSvxHlinkDlgMarkWnd_Impl::Invalidate( sal_uInt16 nFlags )
+void AbstractSvxHlinkDlgMarkWnd_Impl::Invalidate( InvalidateFlags nFlags )
{
(( vcl::Window* )pDlg)->Invalidate(nFlags);
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index b194d19..756b23c 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -275,7 +275,7 @@ class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd
DECL_ABSTDLG_BASE(AbstractSvxHlinkDlgMarkWnd_Impl,SvxHlinkDlgMarkWnd)
virtual void Hide() SAL_OVERRIDE;
virtual bool IsVisible() const SAL_OVERRIDE ;
- virtual void Invalidate( sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
virtual void SetSizePixel( const Size& rNewSize ) SAL_OVERRIDE;
virtual Size GetSizePixel() const SAL_OVERRIDE;
virtual bool MoveTo( Point aNewPos ) const SAL_OVERRIDE;
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index a5093b3..b36887c 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -169,7 +169,7 @@ namespace offapp
void DriverListControl::updateCurrentRow()
{
- Window::Invalidate( GetRowRectPixel( GetCurRow() ), INVALIDATE_UPDATE );
+ Window::Invalidate( GetRowRectPixel( GetCurRow() ), InvalidateFlags::Update );
}
@@ -219,7 +219,7 @@ namespace offapp
void DriverListControl::StateChanged( StateChangedType nStateChange )
{
if (StateChangedType::Enable == nStateChange)
- Window::Invalidate(INVALIDATE_UPDATE);
+ Window::Invalidate(InvalidateFlags::Update);
EditBrowseBox::StateChanged( nStateChange );
}
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index f5daa40..32adfa6 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -498,7 +498,7 @@ void OJoinTableView::EnsureVisible(const OTableWindow* _pWin)
// data about the tab win
TTableWindowData::value_type pData = _pWin->GetData();
EnsureVisible( pData->GetPosition() , pData->GetSize());
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
}
void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize)
@@ -600,7 +600,7 @@ void OJoinTableView::DataChanged(const DataChangedEvent& rDCEvt)
{
// consider the worst case: the colors changed, so adjust me
InitColors();
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
// due to the Invalidate, the connections are redrawn, so that they are also pictured in the new colors
}
}
@@ -716,7 +716,7 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
pTabWin->SetPosPixel( aPos );
}
- Invalidate(); // INVALIDATE_NOCHILDREN
+ Invalidate(); // InvalidateFlags::NoChildren
return bRet;
}
@@ -930,7 +930,7 @@ void OJoinTableView::SelectConn(OTableConnection* pConn)
if ((pFirstSourceVisible != pSourceBox->GetFirstEntryInView())
|| (pFirstDestVisible != pDestBox->GetFirstEntryInView()))
// scrolling was done -> redraw
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
}
}
}
@@ -1081,7 +1081,7 @@ IMPL_LINK_NOARG_TYPED(OJoinTableView, OnDragScrollTimer, Idle *, void)
void OJoinTableView::invalidateAndModify(SfxUndoAction *_pAction)
{
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
m_pView->getController().addUndoActionAndInvalidate(_pAction);
}
diff --git a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
index bd93814..f30b544 100644
--- a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
@@ -59,9 +59,9 @@ namespace dbaui
Point ptNext = m_pTabWin->GetPosPixel();
Size szNext = m_pTabWin->GetSizePixel();
- m_pOwner->Invalidate(INVALIDATE_NOCHILDREN);
+ m_pOwner->Invalidate(InvalidateFlags::NoChildren);
m_pTabWin->SetPosSizePixel(m_ptNextPosition, m_szNextSize);
- m_pOwner->Invalidate(INVALIDATE_NOCHILDREN);
+ m_pOwner->Invalidate(InvalidateFlags::NoChildren);
m_ptNextPosition = ptNext;
m_szNextSize = szNext;
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index b39bf31..3dcd670 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -150,7 +150,7 @@ namespace
// force an invalidation of the bounding rectangle
_pConnection->InvalidateConnection();
- _pView->Invalidate(INVALIDATE_NOCHILDREN);
+ _pView->Invalidate(InvalidateFlags::NoChildren);
}
void addConnections(OQueryTableView* _pView,
const OQueryTableWindow& _rSource,
@@ -783,7 +783,7 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
void OQueryTableView::EnsureVisible(const OTableWindow* pWin)
{
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
OJoinTableView::EnsureVisible(pWin);
}
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index ec91c07..de48a07 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -139,7 +139,7 @@ namespace dbaui
void OTableConnection::Select()
{
m_bSelected = true;
- m_pParent->Invalidate( GetBoundingRect(), INVALIDATE_NOCHILDREN);
+ m_pParent->Invalidate( GetBoundingRect(), InvalidateFlags::NoChildren);
}
void OTableConnection::Deselect()
@@ -165,7 +165,7 @@ namespace dbaui
// could explain, why without the fake here when deleting a connection a dash remains at the lower end:
// Invalidate records obviously one pixel line less as Draw.
// Or everything works differently ..... in any case it works ....
- m_pParent->Invalidate( rcBounding, INVALIDATE_NOCHILDREN );
+ m_pParent->Invalidate( rcBounding, InvalidateFlags::NoChildren );
return true;
}
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 8448027..cd8638c 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -682,7 +682,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt)
aNewSize = Size(pView->CalcZoom(aNewSize.Width()),pView->CalcZoom(aNewSize.Height()));
SetPosSizePixel( ptOld, aNewSize );
pView->TabWinSized(this, ptOld, szOld);
- Invalidate( INVALIDATE_NOCHILDREN );
+ Invalidate( InvalidateFlags::NoChildren );
}
}
else
@@ -706,7 +706,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt)
// aNewDataPoint can not be used here because SetPosPixel reset it
pView->EnsureVisible(GetData()->GetPosition(), GetData()->GetSize());
pView->TabWinMoved(this,aOldDataPoint);
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
getDesignView()->getController().setModified( sal_True );
}
else
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 173d85f..7ea13e3 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -126,9 +126,9 @@ void OTableWindowListBox::NotifyEndScroll()
{
if (m_bReallyScrolled)
// connections of this table, if any, should be redrawn
- m_pTabWin->getTableView()->Invalidate(INVALIDATE_NOCHILDREN);
+ m_pTabWin->getTableView()->Invalidate(InvalidateFlags::NoChildren);
- // without INVALIDATE_NOCHILDREN all tables would be redrawn,
+ // without InvalidateFlags::NoChildren all tables would be redrawn,
// so: flickering
m_bReallyScrolled = false;
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 8adf24f..c661ee0 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -143,7 +143,7 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt )
pView->InvalidateConnections();
pView->getDesignView()->getController().setModified(sal_True);
- pView->Invalidate(INVALIDATE_NOCHILDREN);
+ pView->Invalidate(InvalidateFlags::NoChildren);
}
}
else
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 6a88ef2..fc9f0df 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -474,7 +474,7 @@ IMPL_LINK_NOARG( ORelationController, OnThreadFinished )
try
{
getView()->initialize(); // show the windows and fill with our information
- getView()->Invalidate(INVALIDATE_NOERASE);
+ getView()->Invalidate(InvalidateFlags::NoErase);
ClearUndoManager();
setModified(sal_False); // and we are not modified yet
@@ -575,7 +575,7 @@ void ORelationController::reset()
if(pView)
{
pView->initialize();
- pView->Invalidate(INVALIDATE_NOERASE);
+ pView->Invalidate(InvalidateFlags::NoErase);
}
}
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index a0c3c25..fd345a0 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -244,7 +244,7 @@ void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection )
}
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
}
void ORelationTableView::AddNewRelation()
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 7f05d13..063c32d 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -837,7 +837,7 @@ namespace pcr
}
m_aLinesPlayground->EnablePaint(true);
- m_aLinesPlayground->Invalidate(INVALIDATE_CHILDREN);
+ m_aLinesPlayground->Invalidate(InvalidateFlags::Children);
}
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 03db0ce..9cf73d7 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -1239,7 +1239,7 @@ namespace pcr
sDisplayText = lcl_convertListToDisplayText( lcl_convertMultiLineToList( sDisplayText ) );
m_pImplEdit->SetText( sDisplayText );
- GetParent()->Invalidate( INVALIDATE_CHILDREN );
+ GetParent()->Invalidate( InvalidateFlags::Children );
m_bDropdown = false;
m_pImplEdit->GrabFocus();
}
diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx
index 18f0829..b1ed019 100644
--- a/framework/source/helper/vclstatusindicator.cxx
+++ b/framework/source/helper/vclstatusindicator.cxx
@@ -58,7 +58,7 @@ void SAL_CALL VCLStatusIndicator::start(const OUString& sText ,
// force repaint!
pParentWindow->Show();
- pParentWindow->Invalidate(INVALIDATE_CHILDREN);
+ pParentWindow->Invalidate(InvalidateFlags::Children);
pParentWindow->Flush();
m_sText = sText;
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 7a5084d..aaf6997 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -777,10 +777,10 @@ public:
SvTreeListEntry* GetCurEntry() const;
using Window::Invalidate;
- virtual void Invalidate( sal_uInt16 nFlags = 0) SAL_OVERRIDE;
- virtual void Invalidate( const Rectangle&, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE) SAL_OVERRIDE;
+ virtual void Invalidate( const Rectangle&, InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
- void SetHighlightRange(sal_uInt16 nFirstTab=0,sal_uInt16 nLastTab=0xffff);
+ void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff);
// A Parent's Children are turned into Children of the Parent which comes next in hierarchy
void RemoveParentKeepChildren( SvTreeListEntry* pParent );
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index ebf3226..2b76efc 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -143,7 +143,7 @@ public:
virtual Size GetSizePixel() const = 0;
virtual void Hide() = 0;
virtual bool IsVisible() const = 0;
- virtual void Invalidate( sal_uInt16 nFlags = 0 ) = 0;
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) = 0;
};
class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index c791dde..7c97bf9 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -221,15 +221,22 @@ namespace o3tl
}
// Flags for Invalidate
-#define INVALIDATE_CHILDREN ((sal_uInt16)0x0001)
-#define INVALIDATE_NOCHILDREN ((sal_uInt16)0x0002)
-#define INVALIDATE_NOERASE ((sal_uInt16)0x0004)
-#define INVALIDATE_UPDATE ((sal_uInt16)0x0008)
-#define INVALIDATE_TRANSPARENT ((sal_uInt16)0x0010)
-#define INVALIDATE_NOTRANSPARENT ((sal_uInt16)0x0020)
-#define INVALIDATE_NOCLIPCHILDREN ((sal_uInt16)0x4000)
-// Temporaer fuer Kompatibilitaet
-#define INVALIDATE_BACKGROUND INVALIDATE_TRANSPARENT
+// must match css::awt::InvalidateStyle
+enum class InvalidateFlags
+{
+ NONE = 0x0000,
+ Children = 0x0001,
+ NoChildren = 0x0002,
+ NoErase = 0x0004,
+ Update = 0x0008,
+ Transparent = 0x0010,
+ NoTransparent = 0x0020,
+ NoClipChildren = 0x4000,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<InvalidateFlags> : is_typed_flags<InvalidateFlags, 0x403f> {};
+}
// Flags for Validate
#define VALIDATE_CHILDREN ((sal_uInt16)0x0001)
@@ -501,7 +508,7 @@ public:
SAL_DLLPRIVATE vcl::Window* ImplGetParent() const;
SAL_DLLPRIVATE vcl::Window* ImplFindWindow( const Point& rFramePos );
- SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFlags nFlags );
SAL_DLLPRIVATE void ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion );
SAL_DLLPRIVATE bool ImplSetClipFlag( bool bSysObjOnlySmaller = false );
@@ -568,7 +575,7 @@ protected:
SAL_DLLPRIVATE vcl::Window* ImplGetBorderWindow() const;
- SAL_DLLPRIVATE void ImplInvalidate( const vcl::Region* rRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags );
SAL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rFramePos );
@@ -1065,9 +1072,9 @@ public:
sal_uInt16 nFlags = 0 );
void Scroll( long nHorzScroll, long nVertScroll,
const Rectangle& rRect, sal_uInt16 nFlags = 0 );
- virtual void Invalidate( sal_uInt16 nFlags = 0 );
- virtual void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
- virtual void Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags = 0 );
+ 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 );
void Validate( sal_uInt16 nFlags = 0 );
bool HasPaintEvent() const;
void Update();
diff --git a/offapi/com/sun/star/awt/XWindowPeer.idl b/offapi/com/sun/star/awt/XWindowPeer.idl
index d379232..253b5ff 100644
--- a/offapi/com/sun/star/awt/XWindowPeer.idl
+++ b/offapi/com/sun/star/awt/XWindowPeer.idl
@@ -53,12 +53,16 @@ published interface XWindowPeer: com::sun::star::lang::XComponent
/** invalidates the whole window with the specified
InvalidateStyle.
+
+ @param Flags see com.sun.star.awt.InvalidateStyle
*/
void invalidate( [in] short Flags );
/** invalidates a rectangular area of the window with the specified
InvalidateStyle.
+
+ @param Flags see com.sun.star.awt.InvalidateStyle
*/
void invalidateRect( [in] Rectangle Rect, [in] short Flags );
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 58e9135..283d6dc 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -400,7 +400,7 @@ void OObjectBase::SetPropsFromRect(const Rectangle& _rRect)
xSection->setHeight( newHeight );
// TODO
- //pModel->GetRefDevice()->Invalidate(INVALIDATE_CHILDREN);
+ //pModel->GetRefDevice()->Invalidate(InvalidateFlags::Children);
}
}
diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx
index abe0708..12be6c3 100644
--- a/reportdesign/source/ui/misc/ColorListener.cxx
+++ b/reportdesign/source/ui/misc/ColorListener.cxx
@@ -56,7 +56,7 @@ void OColorListener::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint)
{
m_nColor = m_aExtendedColorConfig.GetColorValue(CFG_REPORTDESIGNER,m_sColorEntry).getColor();
m_nTextBoundaries = m_aColorConfig.GetColorValue(::svtools::DOCBOUNDARIES).nColor;
- Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE);
+ Invalidate(InvalidateFlags::NoChildren|InvalidateFlags::NoErase);
}
}
@@ -87,7 +87,7 @@ void OColorListener::setMarked(bool _bMark)
if ( m_bMarked != _bMark)
{
m_bMarked = _bMark;
- Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE);
+ Invalidate(InvalidateFlags::NoChildren|InvalidateFlags::NoErase);
}
}
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 08719ff..c6b9204 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -511,7 +511,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
if ( nColor == (sal_Int32)COL_TRANSPARENT )
nColor = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
m_pView->SetApplicationDocumentColor(nColor);
- Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE);
+ Invalidate(InvalidateFlags::NoChildren|InvalidateFlags::NoErase);
}
else
{
@@ -537,7 +537,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) );
}
impl_adjustObjectSizePosition(nPaperWidth,nLeftMargin,nRightMargin);
- m_pParent->Invalidate(INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT);
+ m_pParent->Invalidate(InvalidateFlags::Update | InvalidateFlags::Transparent);
}
}
}
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index d43d558..3ef67d9 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -118,7 +118,7 @@ void OReportWindow::removeSection(sal_uInt16 _nPosition)
{
m_aViewsWindow->removeSection(_nPosition);
m_pParent->setTotalSize(GetTotalWidth(),GetTotalHeight());
- m_aViewsWindow->Invalidate(INVALIDATE_TRANSPARENT);
+ m_aViewsWindow->Invalidate(InvalidateFlags::Transparent);
}
void OReportWindow::addSection(const uno::Reference< report::XSection >& _xSection,const OUString& _sColorEntry,sal_uInt16 _nPosition)
@@ -389,7 +389,7 @@ void OReportWindow::zoom(const Fraction& _aZoom)
ScrollChildren( aNewThumbPos );
Resize();
- Invalidate(INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN | INVALIDATE_TRANSPARENT);
+ Invalidate(InvalidateFlags::NoErase | InvalidateFlags::NoChildren | InvalidateFlags::Transparent);
}
void OReportWindow::fillControlModelSelection(::std::vector< uno::Reference< uno::XInterface > >& _rSelection) const
@@ -439,8 +439,7 @@ void OReportWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
(void)_rEvent;
Resize();
m_aViewsWindow->Resize();
- static sal_Int32 nIn = INVALIDATE_TRANSPARENT;
- Invalidate(nIn);
+ Invalidate(InvalidateFlags::Transparent);
}
} //rptui
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 71a28ae..2d80af0 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -397,7 +397,7 @@ void OScrollWindowHelper::zoom(const Fraction& _aZoom)
{
m_aReportWindow->zoom(_aZoom);
Resize();
- Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_TRANSPARENT);
+ Invalidate(InvalidateFlags::NoChildren|InvalidateFlags::Transparent);
}
void OScrollWindowHelper::fillControlModelSelection(::std::vector< uno::Reference< uno::XInterface > >& _rSelection) const
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index 423396e..326d1d2 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -123,7 +123,7 @@ void OSectionView::MakeVisible( const Rectangle& rRect, vcl::Window& rWin )
}
else
{
- rWin.Invalidate(INVALIDATE_NOERASE);
+ rWin.Invalidate(InvalidateFlags::NoErase);
}
}
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index bb37ceb..9d7b08d 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -148,13 +148,13 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
|| setReportSectionTitle(xReport,RID_STR_PAGE_HEADER,::std::mem_fun(&OReportHelper::getPageHeader),::std::mem_fun(&OReportHelper::getPageHeaderOn))
|| setReportSectionTitle(xReport,RID_STR_PAGE_FOOTER,::std::mem_fun(&OReportHelper::getPageFooter),::std::mem_fun(&OReportHelper::getPageFooterOn)) )
{
- m_aStartMarker->Invalidate(INVALIDATE_NOERASE);
+ m_aStartMarker->Invalidate(InvalidateFlags::NoErase);
}
else
{
OUString sTitle = ModuleRes(RID_STR_DETAIL);
m_aStartMarker->setTitle(sTitle);
- m_aStartMarker->Invalidate(INVALIDATE_CHILDREN);
+ m_aStartMarker->Invalidate(InvalidateFlags::Children);
}
}
}
@@ -176,7 +176,7 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport
{
OUString sTitle = ModuleRes(_nResId);
m_aStartMarker->setTitle(sTitle);
- m_aStartMarker->Invalidate(INVALIDATE_CHILDREN);
+ m_aStartMarker->Invalidate(InvalidateFlags::Children);
}
return bRet;
}
@@ -197,7 +197,7 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>&
OUString sTitle( ModuleRes(_nResId).toString() );
sTitle = sTitle.replaceFirst("#", sExpression);
m_aStartMarker->setTitle( sTitle );
- m_aStartMarker->Invalidate(INVALIDATE_CHILDREN);
+ m_aStartMarker->Invalidate(InvalidateFlags::Children);
}
return bRet;
}
@@ -368,7 +368,7 @@ IMPL_LINK( OSectionWindow, SplitHdl, Splitter*, _pSplitter )
void lcl_scroll(vcl::Window& _rWindow,const Point& _aDelta)
{
_rWindow.Scroll(-_aDelta.X(),-_aDelta.Y());
- _rWindow.Invalidate(INVALIDATE_TRANSPARENT);
+ _rWindow.Invalidate(InvalidateFlags::Transparent);
}
void lcl_setOrigin(vcl::Window& _rWindow,long _nX, long _nY)
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index cba5aae..01f2fdb 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -262,7 +262,7 @@ void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint)
if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_COLORS_CHANGED)
{
setColor();
- Invalidate(INVALIDATE_CHILDREN);
+ Invalidate(InvalidateFlags::Children);
}
}
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index a998935..c1f8096 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -238,8 +238,8 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow)
if ( bSet )
{
impl_resizeSectionWindow(*pSectionWindow,aStartPoint,bSet);
- static sal_Int32 nIn = INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT;
- pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT
+ static const InvalidateFlags nIn = InvalidateFlags::Update | InvalidateFlags::Transparent;
+ pSectionWindow->getStartMarker().Invalidate( nIn ); // InvalidateFlags::NoErase |InvalidateFlags::NoChildren| InvalidateFlags::Transparent
pSectionWindow->getEndMarker().Invalidate( nIn );
}
}
@@ -327,7 +327,7 @@ void OViewsWindow::toggleGrid(bool _bVisible)
::std::for_each(m_aSections.begin(),m_aSections.end(),
::o3tl::compose1(::boost::bind(&OReportSection::SetGridVisible,_1,_bVisible),TReportPairHelper()));
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::o3tl::compose1(::boost::bind(&OReportSection::Window::Invalidate,_1,INVALIDATE_NOERASE),TReportPairHelper()));
+ ::o3tl::compose1(::boost::bind(&OReportSection::Window::Invalidate,_1,InvalidateFlags::NoErase),TReportPairHelper()));
}
sal_Int32 OViewsWindow::getTotalHeight() const
@@ -546,7 +546,7 @@ void OViewsWindow::showRuler(bool _bShow)
::std::for_each(m_aSections.begin(),m_aSections.end(),
::o3tl::compose1(::boost::bind(&OStartMarker::showRuler,_1,_bShow),TStartMarkerHelper()));
::std::for_each(m_aSections.begin(),m_aSections.end(),
- ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate, _1, sal_uInt16(INVALIDATE_NOERASE)), TStartMarkerHelper()));
+ ::o3tl::compose1(::boost::bind(&OStartMarker::Window::Invalidate, _1, InvalidateFlags::NoErase), TStartMarkerHelper()));
}
void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt )
@@ -903,8 +903,7 @@ void OViewsWindow::setGridSnap(bool bOn)
for (; aIter != aEnd ; ++aIter)
{
(*aIter)->getReportSection().getSectionView().SetGridSnap(bOn);
- static sal_Int32 nIn = 0;
- (*aIter)->getReportSection().Invalidate(nIn);
+ (*aIter)->getReportSection().Invalidate(InvalidateFlags::NONE);
}
}
@@ -1725,8 +1724,7 @@ void OViewsWindow::zoom(const Fraction& _aZoom)
aOut = PixelToLogic(aOut);
Rectangle aRect(PixelToLogic(Point(0,0)),aOut);
- static sal_Int32 nIn = INVALIDATE_NOCHILDREN;
- Invalidate(aRect,nIn);
+ Invalidate(aRect, InvalidateFlags::NoChildren);
}
void OViewsWindow::scrollChildren(const Point& _aThumbPos)
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index 6b7791a..40ef759 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -546,7 +546,7 @@ void DlgEdFunc::checkMovementAllowed(const MouseEvent& rMEvt)
m_pParent->getSectionWindow()->getViewsWindow()->EndDragObj( bControlKeyPressed, &m_rView, aPnt );
}
m_pParent->getSectionWindow()->getViewsWindow()->ForceMarkedToAnotherPage();
- m_pParent->Invalidate(INVALIDATE_CHILDREN);
+ m_pParent->Invalidate(InvalidateFlags::Children);
}
else
m_pParent->getSectionWindow()->getViewsWindow()->EndAction();
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 42e6774..47f1400 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1939,9 +1939,9 @@ void ScTextWnd::SetTextString( const OUString& rNewString )
if (nDifPos)
nInvPos += GetTextWidth(aString,0,nDifPos);
- sal_uInt16 nFlags = 0;
+ InvalidateFlags nFlags = InvalidateFlags::NONE;
if ( nDifPos == aString.getLength() ) // only new characters appended
- nFlags = INVALIDATE_NOERASE; // then background is already clear
+ nFlags = InvalidateFlags::NoErase; // then background is already clear
Invalidate( Rectangle( nInvPos, 0, nStartPos+nTextSize, GetOutputSize().Height()-1 ), nFlags );
}
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 9969d0f..3abcdd8 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -345,9 +345,9 @@ void ViewShell::SetZoom(long 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
- // the child windows. I am trying INVALIDATE_CHILDREN here which makes things better,
+ // 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(INVALIDATE_CHILDREN);
+ mpContentWindow->Invalidate(InvalidateFlags::Children);
}
Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel();
@@ -393,7 +393,7 @@ void ViewShell::SetZoomRect(const Rectangle& rZoomRect)
// When tiled rendering, UpdateMapOrigin() doesn't touch the map mode.
if (!GetDoc()->isTiledRendering())
// #i74769# see above
- mpContentWindow->Invalidate(INVALIDATE_CHILDREN);
+ mpContentWindow->Invalidate(InvalidateFlags::Children);
}
Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index d86ffc0..8885a5d 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -969,7 +969,7 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
}
}
- mpLocalView->Invalidate(INVALIDATE_NOERASE);
+ mpLocalView->Invalidate(InvalidateFlags::NoErase);
}
}
}
@@ -1527,7 +1527,7 @@ void SfxTemplateManagerDlg::remoteMoveTo(const sal_uInt16 nMenuId)
}
}
- mpLocalView->Invalidate(INVALIDATE_NOERASE);
+ mpLocalView->Invalidate(InvalidateFlags::NoErase);
if (!aTemplateList.isEmpty())
{
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 4115e88..81d37c6 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -284,7 +284,7 @@ void SidebarController::BroadcastPropertyChange()
{
DataChangedEvent aEvent (DataChangedEventType::USER);
mpParentWindow->NotifyAllChildren(aEvent);
- mpParentWindow->Invalidate(INVALIDATE_CHILDREN);
+ mpParentWindow->Invalidate(InvalidateFlags::Children);
}
void SidebarController::NotifyResize()
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 2da27e8..eb7e698 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -481,7 +481,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
Invalidate( aToRect );
}
else
- pDataWin->Window::Invalidate( INVALIDATE_NOCHILDREN );
+ pDataWin->Window::Invalidate( InvalidateFlags::NoChildren );
// adjust header bar positions
if ( getDataWindow()->pHeaderBar )
@@ -649,13 +649,13 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
aScrRect.Bottom() = pDataWin->GetSizePixel().Height();
getDataWindow()->Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX );
- Control::Invalidate( aInvRect, INVALIDATE_NOCHILDREN );
+ Control::Invalidate( aInvRect, InvalidateFlags::NoChildren );
static_cast<BrowserDataWin*>( pDataWin.get() )->Invalidate( aInvRect );
}
else
{
- Control::Invalidate( INVALIDATE_NOCHILDREN );
- getDataWindow()->Window::Invalidate( INVALIDATE_NOCHILDREN );
+ Control::Invalidate( InvalidateFlags::NoChildren );
+ getDataWindow()->Window::Invalidate( InvalidateFlags::NoChildren );
}
@@ -1028,8 +1028,8 @@ long BrowseBox::ScrollColumns( long nCols )
if( bInvalidateView )
{
- Control::Invalidate( INVALIDATE_NOCHILDREN );
- pDataWin->Window::Invalidate( INVALIDATE_NOCHILDREN );
+ Control::Invalidate( InvalidateFlags::NoChildren );
+ pDataWin->Window::Invalidate( InvalidateFlags::NoChildren );
}
// implicitly show cursor after scrolling
@@ -1224,7 +1224,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, bool bDoPaint, bool bKeep
SCROLL_FLAGS );
}
else
- pDataWin->Window::Invalidate( INVALIDATE_NOCHILDREN );
+ pDataWin->Window::Invalidate( InvalidateFlags::NoChildren );
}
else
// scroll would cause a repaint, so we must explicitly invalidate
@@ -1368,7 +1368,7 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, bool bDoPaint )
SCROLL_FLAGS );
}
else
- pDataWin->Window::Invalidate( INVALIDATE_NOCHILDREN );
+ pDataWin->Window::Invalidate( InvalidateFlags::NoChildren );
}
else
{
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 4d037e2..f4376eb 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -687,7 +687,7 @@ void BrowserDataWin::DoOutstandingInvalidations()
-void BrowserDataWin::Invalidate( sal_uInt16 nFlags )
+void BrowserDataWin::Invalidate( InvalidateFlags nFlags )
{
if ( !GetUpdateMode() )
{
@@ -702,7 +702,7 @@ void BrowserDataWin::Invalidate( sal_uInt16 nFlags )
-void BrowserDataWin::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
+void BrowserDataWin::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
{
if ( !GetUpdateMode() )
aInvalidRegion.push_back( new Rectangle( rRect ) );
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index 5a1ade0..4f5bba2 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -172,9 +172,9 @@ public:
void LeaveUpdateLock();
void Update();
void DoOutstandingInvalidations();
- void Invalidate( sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
- void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
- void Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE
+ void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
+ void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
+ void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE
{ Control::Invalidate( rRegion, nFlags ); }
protected:
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 8704ab4..a2428e9 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -201,7 +201,7 @@ void SvxIconChoiceCtrl_Impl::Clear( bool bInCtor )
pZOrderList->clear();
SetOrigin( Point() );
if( bUpdateMode )
- pView->Invalidate(INVALIDATE_NOCHILDREN);
+ pView->Invalidate(InvalidateFlags::NoChildren);
}
AdjustScrollBars();
size_t nCount = aEntries.size();
@@ -580,7 +580,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors )
RecalcAllBoundingRectsSmart();
// TODO: the invalidation in the detail view should be more intelligent
//if( !(nWinBits & WB_DETAILS ))
- pView->Invalidate( INVALIDATE_NOCHILDREN );
+ pView->Invalidate( InvalidateFlags::NoChildren );
nFlags &= ~F_ARRANGING;
if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint )
{
@@ -1505,7 +1505,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( bool bUpdate )
AdjustScrollBars();
pImpCursor->Clear();
pGridMap->Clear();
- pView->Invalidate(INVALIDATE_NOCHILDREN);
+ pView->Invalidate(InvalidateFlags::NoChildren);
}
}
}
@@ -2306,7 +2306,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar,
SCROLL_NOCHILDREN | SCROLL_USECLIPREGION | SCROLL_CLIP );
}
else
- pView->Invalidate(INVALIDATE_NOCHILDREN);
+ pView->Invalidate(InvalidateFlags::NoChildren);
if( aHorSBar->IsVisible() || aVerSBar->IsVisible() )
{
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 56fff11..5378693 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -354,7 +354,7 @@ void SvtIconChoiceCtrl::DataChanged( const DataChangedEvent& rDCEvt )
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
_pImp->InitSettings();
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
}
else
Control::DataChanged( rDCEvt );
@@ -405,7 +405,7 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper )
aFont.SetColor( rStyleSettings.GetFieldTextColor() );
SetFont( aFont );
- Invalidate(INVALIDATE_NOCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren);
}
}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 9eaed19..abe9ad3 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3508,7 +3508,7 @@ void SvTreeListBox::NotifyScrolled()
aScrolledHdl.Call( this );
}
-void SvTreeListBox::Invalidate( sal_uInt16 nInvalidateFlags )
+void SvTreeListBox::Invalidate( InvalidateFlags nInvalidateFlags )
{
if (!pImp)
return;
@@ -3520,7 +3520,7 @@ void SvTreeListBox::Invalidate( sal_uInt16 nInvalidateFlags )
pImp->Invalidate();
}
-void SvTreeListBox::Invalidate( const Rectangle& rRect, sal_uInt16 nInvalidateFlags )
+void SvTreeListBox::Invalidate( const Rectangle& rRect, InvalidateFlags nInvalidateFlags )
{
if( nFocusWidth == -1 )
// to make sure that the control doesn't show the wrong focus rectangle
@@ -3758,7 +3758,7 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
void SvTreeListBox::StateChanged( StateChangedType eType )
{
if( eType == StateChangedType::Enable )
- Invalidate( INVALIDATE_CHILDREN );
+ Invalidate( InvalidateFlags::Children );
Control::StateChanged( eType );
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 4842dc7..916f7d8 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1815,7 +1815,7 @@ namespace svt { namespace table
case TableAreaAll:
m_pDataWindow->Invalidate();
- m_pDataWindow->GetParent()->Invalidate( INVALIDATE_TRANSPARENT );
+ m_pDataWindow->GetParent()->Invalidate( InvalidateFlags::Transparent );
break;
}
}
@@ -1892,7 +1892,7 @@ namespace svt { namespace table
void TableControl_Impl::invalidateRect(const Rectangle &rInvalidateRect)
{
m_pDataWindow->Invalidate( rInvalidateRect,
- m_pDataWindow->GetControlBackground().GetTransparency() ? INVALIDATE_TRANSPARENT : 0 );
+ m_pDataWindow->GetControlBackground().GetTransparency() ? InvalidateFlags::Transparent : InvalidateFlags::NONE );
}
@@ -2086,8 +2086,8 @@ namespace svt { namespace table
}
else
{
- m_pDataWindow->Invalidate( INVALIDATE_UPDATE );
- m_pDataWindow->GetParent()->Invalidate( INVALIDATE_TRANSPARENT );
+ m_pDataWindow->Invalidate( InvalidateFlags::Update );
+ m_pDataWindow->GetParent()->Invalidate( InvalidateFlags::Transparent );
}
// update the position at the vertical scrollbar
@@ -2164,8 +2164,8 @@ namespace svt { namespace table
}
else
{
- m_pDataWindow->Invalidate( INVALIDATE_UPDATE );
- m_pDataWindow->GetParent()->Invalidate( INVALIDATE_TRANSPARENT );
+ m_pDataWindow->Invalidate( InvalidateFlags::Update );
+ m_pDataWindow->GetParent()->Invalidate( InvalidateFlags::Transparent );
}
// update the position at the horizontal scrollbar
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 9a8c240..e6b07da 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -983,7 +983,7 @@ namespace accessibility
// TODO: maybe optimize here in the following way. If the
// number of removed children exceeds a certain threshold,
- // use INVALIDATE_CHILDREN
+ // use InvalidateFlags::Children
AccessibleTextHelper_LostChildEvent aFunctor( *this );
::std::for_each( begin, end, aFunctor );
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index a87ee3a..c75912a 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -700,7 +700,7 @@ Point FrameSelectorImpl::GetDevPosFromMousePos( const Point& rMousePos ) const
void FrameSelectorImpl::DoInvalidate( bool bFullRepaint )
{
mbFullRepaint |= bFullRepaint;
- mrFrameSel.Invalidate( INVALIDATE_NOERASE );
+ mrFrameSel.Invalidate( InvalidateFlags::NoErase );
}
// frame border state and style
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index f54195f..eb11411 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -316,7 +316,7 @@ namespace sdr
(sal_Int32)ceil(rRange.getMaxY() + fDiscreteOne));
// simply invalidate
- static_cast<vcl::Window&>(getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
+ static_cast<vcl::Window&>(getOutputDevice()).Invalidate(aInvalidateRectangle, InvalidateFlags::NoErase);
}
else
{
@@ -327,7 +327,7 @@ namespace sdr
(sal_Int32)ceil(rRange.getMaxX()), (sal_Int32)ceil(rRange.getMaxY()));
// simply invalidate
- static_cast<vcl::Window&>(getOutputDevice()).Invalidate(aInvalidateRectangle, INVALIDATE_NOERASE);
+ static_cast<vcl::Window&>(getOutputDevice()).Invalidate(aInvalidateRectangle, InvalidateFlags::NoErase);
}
}
}
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index 68f4b5a..ecab032 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -432,7 +432,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
const bool bWasMapModeEnabled(rWindow.IsMapModeEnabled());
rWindow.EnableMapMode(false);
- rWindow.Invalidate(aVCLDiscreteRectangle, INVALIDATE_NOERASE);
+ rWindow.Invalidate(aVCLDiscreteRectangle, InvalidateFlags::NoErase);
rWindow.EnableMapMode(bWasMapModeEnabled);
}
}
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index e75acd8..b735127 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -104,7 +104,7 @@ void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, Rectangle con
//rhbz#1007697 this can cause the window itself to be
//deleted. So we are listening to see if that happens
//and if so, then skip the update
- pCandidate->Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN);
+ pCandidate->Invalidate(InvalidateFlags::NoTransparent|InvalidateFlags::Children);
// important: actually paint the child here!
if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
continue;
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index cbfc3f5..31cb7cd 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -262,7 +262,7 @@ void SdrGluePoint::Invalidate(vcl::Window& rWin, const SdrObject* pObj) const
aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height());
// do not erase background, that causes flicker (!)
- rWin.Invalidate(aRect, INVALIDATE_NOERASE);
+ rWin.Invalidate(aRect, InvalidateFlags::NoErase);
rWin.EnableMapMode(bMapMerk);
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 775da2f..a596e98 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -964,13 +964,13 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, bool bPlus1Pix)
void SdrPaintView::InvalidateOneWin(vcl::Window& rWin)
{
// do not erase background, that causes flicker (!)
- rWin.Invalidate(INVALIDATE_NOERASE);
+ rWin.Invalidate(InvalidateFlags::NoErase);
}
void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect)
{
// do not erase background, that causes flicker (!)
- rWin.Invalidate(rRect, INVALIDATE_NOERASE);
+ rWin.Invalidate(rRect, InvalidateFlags::NoErase);
}
void SdrPaintView::LeaveOneGroup()
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 6b9ab9c..4c0c2b4 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3321,7 +3321,7 @@ void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) c
aPageRectTemp._Intersection( pSh->VisArea() );
vcl::Region aPageRectRegion( aPageRectTemp.SVRect() );
aPageRectRegion.Exclude( aPaintRect.SVRect() );
- pSh->GetWin()->Invalidate( aPageRectRegion, INVALIDATE_CHILDREN );
+ pSh->GetWin()->Invalidate( aPageRectRegion, InvalidateFlags::Children );
}
// #i80793#
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 1873a3e..5126669 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -498,7 +498,7 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev )
{
Imp()->UnlockPaint();
GetWin()->EnablePaint( true );
- GetWin()->Invalidate( INVALIDATE_CHILDREN );
+ GetWin()->Invalidate( InvalidateFlags::Children );
}
pVout.disposeAndClear();
}
@@ -506,7 +506,7 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev )
{
Imp()->UnlockPaint();
GetWin()->EnablePaint( true );
- GetWin()->Invalidate( INVALIDATE_CHILDREN );
+ GetWin()->Invalidate( InvalidateFlags::Children );
}
}
else
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 0ca561c..9f989d0 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -494,7 +494,7 @@ IMPL_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvTreeListEntry*, pS
{
m_pListLB->SetEntryText(m_sConnecting, pSelect, ITEMID_TABLE - 1);
// allow painting of the new entry
- m_pListLB->Window::Invalidate(INVALIDATE_UPDATE);
+ m_pListLB->Window::Invalidate(InvalidateFlags::Update);
for (int i = 0; i < 10; ++i)
Application::Reschedule();
}
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index eb9dbf4..839f6d5 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -754,11 +754,10 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
}
-void SwSrcEditWindow::Invalidate(sal_uInt16 )
+void SwSrcEditWindow::Invalidate(InvalidateFlags )
{
pOutWin->Invalidate();
Window::Invalidate();
-
}
void SwSrcEditWindow::Command( const CommandEvent& rCEvt )
diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx
index 88971bf..f52c4b4 100644
--- a/sw/source/uibase/inc/srcedtw.hxx
+++ b/sw/source/uibase/inc/srcedtw.hxx
@@ -133,7 +133,7 @@ public:
TextViewOutWin* GetOutWin() {return pOutWin;}
- virtual void Invalidate( sal_uInt16 nFlags = 0 ) SAL_OVERRIDE;
+ virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) SAL_OVERRIDE;
void ClearModifyFlag()
{ pTextEngine->SetModified(false); }
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index f315f99..b2fc478 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1156,7 +1156,7 @@ void VCLXWindow::invalidate( sal_Int16 nInvalidateFlags ) throw(::com::sun::star
SolarMutexGuard aGuard;
if ( GetWindow() )
- GetWindow()->Invalidate( (sal_uInt16) nInvalidateFlags );
+ GetWindow()->Invalidate( static_cast<InvalidateFlags>(nInvalidateFlags) );
}
void VCLXWindow::invalidateRect( const ::com::sun::star::awt::Rectangle& rRect, sal_Int16 nInvalidateFlags ) throw(::com::sun::star::uno::RuntimeException, std::exception)
@@ -1164,7 +1164,7 @@ void VCLXWindow::invalidateRect( const ::com::sun::star::awt::Rectangle& rRect,
SolarMutexGuard aGuard;
if ( GetWindow() )
- GetWindow()->Invalidate( VCLRectangle(rRect), (sal_uInt16) nInvalidateFlags );
+ GetWindow()->Invalidate( VCLRectangle(rRect), static_cast<InvalidateFlags>(nInvalidateFlags) );
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index e8ab9c9..2259b39 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1523,7 +1523,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt )
}
else
{
- pBorder->Invalidate( INVALIDATE_NOERASE );
+ pBorder->Invalidate( InvalidateFlags::NoErase );
pBorder->Update();
}
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index e67f09c..2c82672 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1888,7 +1888,7 @@ void Edit::ImplInvalidateOutermostBorder( vcl::Window* pWin )
pInvalWin = pBorder;
}
- pInvalWin->Invalidate( INVALIDATE_CHILDREN | INVALIDATE_UPDATE );
+ pInvalWin->Invalidate( InvalidateFlags::Children | InvalidateFlags::Update );
}
void Edit::GetFocus()
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 5bdc36b..f7d4592 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2639,7 +2639,7 @@ bool ImplWin::PreNotify( NotifyEvent& rNEvt )
if ( IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL)
&& ! IsNativeControlSupported(CTRL_LISTBOX, PART_BUTTON_DOWN) )
{
- GetParent()->GetWindow( GetWindowType::Border )->Invalidate( INVALIDATE_NOERASE );
+ GetParent()->GetWindow( GetWindowType::Border )->Invalidate( InvalidateFlags::NoErase );
GetParent()->GetWindow( GetWindowType::Border )->Update();
}
}
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index bd5bb65..bb95cee 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -797,7 +797,7 @@ void ListBox::StateChanged( StateChangedType nType )
if ( IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL)
&& ! IsNativeControlSupported(CTRL_LISTBOX, PART_BUTTON_DOWN) )
{
- GetWindow( GetWindowType::Border )->Invalidate( INVALIDATE_NOERASE );
+ GetWindow( GetWindowType::Border )->Invalidate( InvalidateFlags::NoErase );
}
else
mpImplWin->Invalidate();
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 4c5e8e6..f30e0c0 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -215,7 +215,7 @@ void Slider::ImplUpdateRects( bool bUpdate )
{
const Point aPos( GetPosPixel() );
aInvalidRegion.Move( aPos.X(), aPos.Y() );
- GetParent()->Invalidate( aInvalidRegion, INVALIDATE_TRANSPARENT | INVALIDATE_UPDATE );
+ GetParent()->Invalidate( aInvalidRegion, InvalidateFlags::Transparent | InvalidateFlags::Update );
}
else
Invalidate( aInvalidRegion );
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 48b1799..98aa909 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1308,7 +1308,7 @@ void TabControl::setAllocation(const Size &rAllocation)
aRect.Right() += TAB_OFFSET+TAB_BORDER_RIGHT;
aRect.Bottom() += TAB_OFFSET+TAB_BORDER_BOTTOM;
if ( bTabPage )
- Invalidate( aRect, INVALIDATE_NOCHILDREN );
+ Invalidate( aRect, InvalidateFlags::NoChildren );
else
Invalidate( aRect );
@@ -1316,7 +1316,7 @@ void TabControl::setAllocation(const Size &rAllocation)
else
{
if ( bTabPage )
- Invalidate( INVALIDATE_NOCHILDREN );
+ Invalidate( InvalidateFlags::NoChildren );
else
Invalidate();
}
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index a614b3a..eea577d 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -2073,11 +2073,11 @@ void ImplBorderWindow::InvalidateBorder()
// no output area anymore, now invalidate all
if ( (aWinRect.Right() < aWinRect.Left()) ||
(aWinRect.Bottom() < aWinRect.Top()) )
- Invalidate( INVALIDATE_NOCHILDREN );
+ Invalidate( InvalidateFlags::NoChildren );
else
{
aRegion.Exclude( aWinRect );
- Invalidate( aRegion, INVALIDATE_NOCHILDREN );
+ Invalidate( aRegion, InvalidateFlags::NoChildren );
}
}
}
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 9776721..f04cf49 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -530,9 +530,9 @@ void Window::ImplCallPaint(const VclPtr<VirtualDevice>& rBuffer, const vcl::Regi
if (mpWindowImpl->mbPaintDisabled)
{
if (mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL)
- Invalidate(INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE | INVALIDATE_NOTRANSPARENT | INVALIDATE_NOCLIPCHILDREN);
+ Invalidate(InvalidateFlags::NoChildren | InvalidateFlags::NoErase | InvalidateFlags::NoTransparent | InvalidateFlags::NoClipChildren);
else if ( pRegion )
- Invalidate(*pRegion, INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE | INVALIDATE_NOTRANSPARENT | INVALIDATE_NOCLIPCHILDREN);
+ Invalidate(*pRegion, InvalidateFlags::NoChildren | InvalidateFlags::NoErase | InvalidateFlags::NoTransparent | InvalidateFlags::NoClipChildren);
return;
}
@@ -611,7 +611,7 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void)
}
}
-void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags )
+void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFlags nFlags )
{
// set PAINTCHILDREN for all parent windows till the first OverlapWindow
if ( !ImplIsOverlapWindow() )
@@ -632,9 +632,9 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 n
// set Paint-Flags
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINT;
- if ( nFlags & INVALIDATE_CHILDREN )
+ if ( nFlags & InvalidateFlags::Children )
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINTALLCHILDREN;
- if ( !(nFlags & INVALIDATE_NOERASE) )
+ if ( !(nFlags & InvalidateFlags::NoErase) )
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_ERASE;
if ( !pRegion )
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINTALL;
@@ -644,7 +644,7 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 n
mpWindowImpl->maInvalidateRegion.Union( *pRegion );
// Handle transparent windows correctly: invalidate must be done on the first opaque parent
- if( ((IsPaintTransparent() && !(nFlags & INVALIDATE_NOTRANSPARENT)) || (nFlags & INVALIDATE_TRANSPARENT) )
+ if( ((IsPaintTransparent() && !(nFlags & InvalidateFlags::NoTransparent)) || (nFlags & InvalidateFlags::Transparent) )
&& ImplGetParent() )
{
vcl::Window *pParent = ImplGetParent();
@@ -660,8 +660,8 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 n
// invalidate the same region in the parent that has to be repainted in the child
pChildRegion = &mpWindowImpl->maInvalidateRegion;
- nFlags |= INVALIDATE_CHILDREN; // paint should also be done on all children
- nFlags &= ~INVALIDATE_NOERASE; // parent should paint and erase to create proper background
+ nFlags |= InvalidateFlags::Children; // paint should also be done on all children
+ nFlags &= ~InvalidateFlags::NoErase; // parent should paint and erase to create proper background
pParent->ImplInvalidateFrameRegion( pChildRegion, nFlags );
}
}
@@ -674,7 +674,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion )
ImplClipBoundaries( aRegion, true, true );
if ( !aRegion.IsEmpty() )
- ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN );
+ ImplInvalidateFrameRegion( &aRegion, InvalidateFlags::Children );
// now we invalidate the overlapping windows
vcl::Window* pTempWindow = mpWindowImpl->mpFirstOverlap;
@@ -694,11 +694,11 @@ void Window::ImplInvalidateParentFrameRegion( vcl::Region& rRegion )
else
{
if( ImplGetParent() )
- ImplGetParent()->ImplInvalidateFrameRegion( &rRegion, INVALIDATE_CHILDREN );
+ ImplGetParent()->ImplInvalidateFrameRegion( &rRegion, InvalidateFlags::Children );
}
}
-void Window::ImplInvalidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
+void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags )
{
// reset background storage
if ( mpWindowImpl->mpFrameData->mpFirstBackWin )
@@ -709,7 +709,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
// take Transparent-Invalidate into account
vcl::Window* pOpaqueWindow = this;
- if ( (mpWindowImpl->mbPaintTransparent && !(nFlags & INVALIDATE_NOTRANSPARENT)) || (nFlags & INVALIDATE_TRANSPARENT) )
+ if ( (mpWindowImpl->mbPaintTransparent && !(nFlags & InvalidateFlags::NoTransparent)) || (nFlags & InvalidateFlags::Transparent) )
{
vcl::Window* pTempWindow = pOpaqueWindow->ImplGetParent();
while ( pTempWindow )
@@ -717,7 +717,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
if ( !pTempWindow->IsPaintTransparent() )
{
pOpaqueWindow = pTempWindow;
- nFlags |= INVALIDATE_CHILDREN;
+ nFlags |= InvalidateFlags::Children;
bInvalidateAll = false;
break;
}
@@ -730,15 +730,15 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
}
// assemble region
- sal_uInt16 nOrgFlags = nFlags;
- if ( !(nFlags & (INVALIDATE_CHILDREN | INVALIDATE_NOCHILDREN)) )
+ InvalidateFlags nOrgFlags = nFlags;
+ if ( !(nFlags & (InvalidateFlags::Children | InvalidateFlags::NoChildren)) )
{
if ( GetStyle() & WB_CLIPCHILDREN )
- nFlags |= INVALIDATE_NOCHILDREN;
+ nFlags |= InvalidateFlags::NoChildren;
else
- nFlags |= INVALIDATE_CHILDREN;
+ nFlags |= InvalidateFlags::Children;
}
- if ( (nFlags & INVALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild )
+ if ( (nFlags & InvalidateFlags::NoChildren) && mpWindowImpl->mpFirstChild )
bInvalidateAll = false;
if ( bInvalidateAll )
ImplInvalidateFrameRegion( NULL, nFlags );
@@ -761,17 +761,17 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
aRegion.Intersect( *pRegion );
}
ImplClipBoundaries( aRegion, true, true );
- if ( nFlags & INVALIDATE_NOCHILDREN )
+ if ( nFlags & InvalidateFlags::NoChildren )
{
- nFlags &= ~INVALIDATE_CHILDREN;
- if ( !(nFlags & INVALIDATE_NOCLIPCHILDREN) )
+ nFlags &= ~InvalidateFlags::Children;
+ if ( !(nFlags & InvalidateFlags::NoClipChildren) )
{
- if ( nOrgFlags & INVALIDATE_NOCHILDREN )
+ if ( nOrgFlags & InvalidateFlags::NoChildren )
ImplClipAllChildren( aRegion );
else
{
if ( ImplClipChildren( aRegion ) )
- nFlags |= INVALIDATE_CHILDREN;
+ nFlags |= InvalidateFlags::Children;
}
}
}
@@ -779,7 +779,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, sal_uInt16 nFlags )
ImplInvalidateFrameRegion( &aRegion, nFlags ); // transparency is handled here, pOpaqueWindow not required
}
- if ( nFlags & INVALIDATE_UPDATE )
+ if ( nFlags & InvalidateFlags::Update )
pOpaqueWindow->Update(); // start painting at the opaque parent
}
@@ -835,9 +835,9 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect,
if ( !aPaintAllRegion.IsEmpty() )
{
aPaintAllRegion.Move( nHorzScroll, nVertScroll );
- sal_uInt16 nPaintFlags = 0;
+ InvalidateFlags nPaintFlags = InvalidateFlags::NONE;
if ( bChildren )
- mpWindowImpl->mnPaintFlags |= INVALIDATE_CHILDREN;
+ nPaintFlags |= InvalidateFlags::Children;
ImplInvalidateFrameRegion( &aPaintAllRegion, nPaintFlags );
}
}
@@ -861,7 +861,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFl
vcl::Window* pChild = mpWindowImpl->mpFirstChild;
while ( pChild )
{
- pChild->Invalidate( aChildRegion, INVALIDATE_CHILDREN | INVALIDATE_NOTRANSPARENT );
+ pChild->Invalidate( aChildRegion, InvalidateFlags::Children | InvalidateFlags::NoTransparent );
pChild = pChild->mpWindowImpl->mpNext;
}
}
@@ -1133,7 +1133,7 @@ vcl::Region Window::GetPaintRegion() const
}
}
-void Window::Invalidate( sal_uInt16 nFlags )
+void Window::Invalidate( InvalidateFlags nFlags )
{
if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
return;
@@ -1142,7 +1142,7 @@ void Window::Invalidate( sal_uInt16 nFlags )
LogicInvalidate(0);
}
-void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
+void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
{
if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
return;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list