diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-25 11:20:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-26 08:30:18 +0200 |
commit | bb7ce3137dbe12d67f393b95a437b18e3a63f8e7 (patch) | |
tree | 12d4b581ac21aaaa243d6d070b00a8695b624b92 /reportdesign | |
parent | 3dc50a3b9afc6eec42fb9f657a4dfd236066892f (diff) |
convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the
IDL docs for XWindowPeer
Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/sdr/RptObject.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/ColorListener.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ScrollHelper.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionView.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/ui/report/StartMarker.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 14 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 2 |
10 files changed, 23 insertions, 26 deletions
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(); |