summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-25 11:20:10 +0200
committerNoel Grandin <noel@peralex.com>2015-05-26 08:30:18 +0200
commitbb7ce3137dbe12d67f393b95a437b18e3a63f8e7 (patch)
tree12d4b581ac21aaaa243d6d070b00a8695b624b92
parent3dc50a3b9afc6eec42fb9f657a4dfd236066892f (diff)
convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the IDL docs for XWindowPeer Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
-rw-r--r--avmedia/source/framework/mediacontrol.cxx2
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx6
-rw-r--r--chart2/source/controller/main/ChartWindow.hxx6
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx2
-rw-r--r--cui/source/factory/dlgfact.cxx2
-rw-r--r--cui/source/factory/dlgfact.hxx2
-rw-r--r--cui/source/options/connpooloptions.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableConnection.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx4
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx2
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx2
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
-rw-r--r--framework/source/helper/vclstatusindicator.cxx2
-rw-r--r--include/svtools/treelistbox.hxx6
-rw-r--r--include/svx/svxdlg.hxx2
-rw-r--r--include/vcl/window.hxx35
-rw-r--r--offapi/com/sun/star/awt/XWindowPeer.idl4
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx2
-rw-r--r--reportdesign/source/ui/misc/ColorListener.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx7
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx2
-rw-r--r--reportdesign/source/ui/report/SectionView.cxx2
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx10
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx14
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sd/source/ui/view/viewshe2.cxx6
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx2
-rw-r--r--svtools/source/brwbox/brwbox1.cxx16
-rw-r--r--svtools/source/brwbox/datwin.cxx4
-rw-r--r--svtools/source/brwbox/datwin.hxx6
-rw-r--r--svtools/source/contnr/imivctl1.cxx8
-rw-r--r--svtools/source/contnr/ivctrl.cxx4
-rw-r--r--svtools/source/contnr/treelistbox.cxx6
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx12
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx2
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx4
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx2
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx2
-rw-r--r--svx/source/svdraw/svdglue.cxx2
-rw-r--r--svx/source/svdraw/svdpntv.cxx4
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx4
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx3
-rw-r--r--sw/source/uibase/inc/srcedtw.hxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx4
-rw-r--r--vcl/source/control/button.cxx2
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/control/lstbox.cxx2
-rw-r--r--vcl/source/control/slider.cxx2
-rw-r--r--vcl/source/control/tabctrl.cxx4
-rw-r--r--vcl/source/window/brdwin.cxx4
-rw-r--r--vcl/source/window/paint.cxx64
-rw-r--r--vcl/source/window/stacking.cxx6
-rw-r--r--vcl/source/window/status.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx6
-rw-r--r--vcl/source/window/window.cxx10
-rw-r--r--vcl/workben/icontest.cxx2
70 files changed, 195 insertions, 188 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index fe8283369e7c..4c019e5ffc41 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 f3e41c61371b..15117e0ddf42 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 99a0c5fb6038..02d88485e9c8 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 6c3c5498b667..0587f879f711 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 4ec04bef1cbd..2ec3dd4ee7ad 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 b194d199b431..756b23ce8978 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 a5093b3260a5..b36887c4d88f 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 f5daa40ef329..32adfa6a167c 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 bd9381468ca0..f30b54423cb3 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 b39bf31e0cf0..3dcd670b276f 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 ec91c07646fd..de48a0790a80 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 8448027032eb..cd8638cf52fe 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 173d85f0366c..7ea13e344984 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 8adf24f934d2..c661ee0e6be7 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 6a88ef2f5417..fc9f0df063e7 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 a0c3c2553863..fd345a0ebc89 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 7f05d1314620..063c32d15ac4 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 03db0ce9e895..9cf73d7fd299 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 18f08294d489..b1ed0196809f 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 7a5084d52508..aaf6997052b1 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 ebf3226e2129..2b76efc8c621 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 c791ddea0600..7c97bf977aa5 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 d379232fb9aa..253b5ff8a4df 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 58e9135ae7c2..283d6dc7120f 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 abe070802e9b..12be6c3fd337 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 08719ff3b501..c6b92044a953 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 d43d5584fe8e..3ef67d927395 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 71a28aefecc2..2d80af0c01e7 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 423396e6b556..326d1d276f77 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 bb37ceb4cdd4..9d7b08d70b27 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 cba5aae711e3..01f2fdbc3917 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 a998935883f3..c1f80963a0d1 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 6b7791a306e0..40ef7599cb30 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 42e6774584a3..47f14003e8df 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 9969d0fe00c3..3abcdd89b0fc 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 d86ffc0b09fe..8885a5d7267d 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 4115e884e5c5..81d37c69bf54 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 2da27e8ca2b6..eb7e698d8dfd 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 4d037e21ca34..f4376eb71e5e 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 5a1ade0ff0ae..4f5bba24b15b 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 8704ab41cd66..a2428e9f146a 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 56fff117da27..5378693828e5 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 9eaed195f786..abe9ad36c34f 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 4842dc748e33..916f7d8b824f 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 9a8c240e13d7..e6b07da01a7a 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 a87ee3a73560..c75912a10af4 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 f54195f7241a..eb1141191386 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 68f4b5a2ab4a..ecab03275483 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 e75acd8655ea..b735127bf4c5 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 cbfc3f58cb9f..31cb7cd797dd 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 775da2f42a79..a596e98539ca 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 6b9ab9c5cd02..4c0c2b45946c 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 1873a3edfdfe..51266698935b 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 0ca561c54bf5..9f989d054776 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 eb9dbf4b5259..839f6d59a241 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 88971bf01274..f52c4b4f5205 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 f315f99c4508..b2fc478adeb2 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 e8ab9c90da40..2259b3971599 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 e67f09c5d1f8..2c8267271c63 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 5bdc36be8bd9..f7d4592b7d4b 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 bd5bb65f7800..bb95cee469b3 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 4c5e8e6387c3..f30e0c030244 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 48b179926479..98aa909b7cba 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 a614b3a7300a..eea577d7dea4 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 97767210442a..f04cf49f14ce 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;
@@ -1158,7 +1158,7 @@ void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
}
}
-void Window::Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags )
+void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
{
if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
return;
@@ -1624,9 +1624,9 @@ void Window::ImplScroll( const Rectangle& rRect,
// so it has to be re-mirrored before calling the Paint-handler
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_CHECKRTL;
- sal_uInt16 nPaintFlags = INVALIDATE_CHILDREN;
+ InvalidateFlags nPaintFlags = InvalidateFlags::Children;
if ( !bErase )
- nPaintFlags |= INVALIDATE_NOERASE;
+ nPaintFlags |= InvalidateFlags::NoErase;
if ( !bScrollChildren )
{
if ( nOrgFlags & SCROLL_NOCHILDREN )
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 96e27e49d0e1..71b7a99b3d00 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -371,7 +371,7 @@ void Window::ImplStartToTop( ToTopFlags nFlags )
pCurData = aStartData.mpNext;
while ( pCurData )
{
- pCurData->mpWindow->ImplInvalidateFrameRegion( pCurData->mpInvalidateRegion, INVALIDATE_CHILDREN );
+ pCurData->mpWindow->ImplInvalidateFrameRegion( pCurData->mpInvalidateRegion, InvalidateFlags::Children );
pNextData = pCurData->mpNext;
delete pCurData->mpInvalidateRegion;
delete pCurData;
@@ -591,7 +591,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
if ( aWinRect.IsOver( aCompRect ) )
- pWindow->Invalidate( INVALIDATE_CHILDREN | INVALIDATE_NOTRANSPARENT );
+ pWindow->Invalidate( InvalidateFlags::Children | InvalidateFlags::NoTransparent );
pWindow = pWindow->mpWindowImpl->mpNext;
}
@@ -605,7 +605,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
if ( aWinRect.IsOver( aCompRect ) )
{
- Invalidate( INVALIDATE_CHILDREN | INVALIDATE_NOTRANSPARENT );
+ Invalidate( InvalidateFlags::Children | InvalidateFlags::NoTransparent );
break;
}
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index b9669d731a87..73ea7b7cef85 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -543,9 +543,9 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
Point aTL(pWindow->OutputToAbsoluteScreenPixel(rFramePosSize.TopLeft()));
aTL = pEraseWindow->AbsoluteScreenToOutputPixel(aTL);
Rectangle aRect(aTL, rFramePosSize.GetSize());
- pEraseWindow->Invalidate(aRect, INVALIDATE_NOCHILDREN |
- INVALIDATE_NOCLIPCHILDREN |
- INVALIDATE_TRANSPARENT);
+ pEraseWindow->Invalidate(aRect, InvalidateFlags::NoChildren |
+ InvalidateFlags::NoClipChildren |
+ InvalidateFlags::Transparent);
pEraseWindow->Update();
}
rRenderContext.Push(PushFlags::CLIPREGION);
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index ccffc73ccdce..172898c35514 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -474,7 +474,7 @@ void ToolBox::ImplDrawTransparentBackground(vcl::RenderContext& /*rRenderContext
mpData->mbIsPaintLocked = true;
// send an invalidate to the first opaque parent and invalidate the whole hierarchy from there (noclipchildren)
- Invalidate(rRegion, INVALIDATE_UPDATE | INVALIDATE_NOCLIPCHILDREN);
+ Invalidate(rRegion, InvalidateFlags::Update | InvalidateFlags::NoClipChildren);
mpData->mbIsPaintLocked = bOldPaintLock;
}
@@ -5614,7 +5614,7 @@ void ToolBox::ImplShowFocus()
{
vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow;
pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = true;
- pWin->Invalidate( 0 );
+ pWin->Invalidate();
}
}
}
@@ -5628,7 +5628,7 @@ void ToolBox::ImplHideFocus()
{
vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow;
pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = false;
- pWin->Invalidate( 0 );
+ pWin->Invalidate();
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index be51862b6d40..27b9f6976a42 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1789,7 +1789,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( !bInvalidate )
{
if ( !pOverlapRegion->IsEmpty() )
- ImplInvalidateFrameRegion( pOverlapRegion, INVALIDATE_CHILDREN );
+ ImplInvalidateFrameRegion( pOverlapRegion, InvalidateFlags::Children );
}
}
else
@@ -1798,7 +1798,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
else
bInvalidate = true;
if ( bInvalidate )
- ImplInvalidateFrameRegion( NULL, INVALIDATE_CHILDREN );
+ ImplInvalidateFrameRegion( NULL, InvalidateFlags::Children );
}
else
{
@@ -1810,7 +1810,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
ImplClipBoundaries( aRegion, false, true );
if ( !aRegion.IsEmpty() )
- ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN );
+ ImplInvalidateFrameRegion( &aRegion, InvalidateFlags::Children );
}
}
@@ -2423,9 +2423,9 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
if ( !mpWindowImpl->mbFrame )
{
- sal_uInt16 nInvalidateFlags = INVALIDATE_CHILDREN;
+ InvalidateFlags nInvalidateFlags = InvalidateFlags::Children;
if( ! IsPaintTransparent() )
- nInvalidateFlags |= INVALIDATE_NOTRANSPARENT;
+ nInvalidateFlags |= InvalidateFlags::NoTransparent;
ImplInvalidate( NULL, nInvalidateFlags );
ImplGenerateMouseMove();
}
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index 6cbe37113914..2c7277fe7a38 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -129,7 +129,7 @@ void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR
if (mnPaintCount == 100)
Application::Quit();
- Invalidate( INVALIDATE_CHILDREN );
+ Invalidate( InvalidateFlags::Children );
}
void MyWorkWindow::Resize()