diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-10 13:52:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-12 09:54:23 +0200 |
commit | a651dbcfca9e198b5c2561076961504586bc6bea (patch) | |
tree | 812eee16af9bc3c4c75b8b45a4c126f99ad1bab3 /reportdesign/source/ui | |
parent | 9b5ce4023d35c4cc82f7b17e79b8fedbcb1367dd (diff) |
convert SdrLayerId to strong_int
Also
- rename SetOfByte to SdrLayerIDSet
- add asserts in SdrLayerAdmin::GetUniqueLayerID so that we don't
allocate overlapping SdrLayerID values
- add a new constant SDRLAYERPOS_NOTFOUND to be returned from
SdrLayerAdmin::GetLayerPos
Change-Id: I3bb3489f9338e3d02c4040bcbd811744699941c8
Reviewed-on: https://gerrit.libreoffice.org/37467
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source/ui')
-rw-r--r-- | reportdesign/source/ui/inc/SectionView.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionView.cxx | 9 |
3 files changed, 5 insertions, 8 deletions
diff --git a/reportdesign/source/ui/inc/SectionView.hxx b/reportdesign/source/ui/inc/SectionView.hxx index 1035a8a7ef5f..c5c48661c059 100644 --- a/reportdesign/source/ui/inc/SectionView.hxx +++ b/reportdesign/source/ui/inc/SectionView.hxx @@ -59,7 +59,7 @@ public: /* returns the common layer id of the marked objects, otherwise -1 will be returned. */ - short GetLayerIdOfMarkedObjects() const; + SdrLayerID GetLayerIdOfMarkedObjects() const; // returns true if objects at Drag & Drop is resize not move bool IsDragResize() const; diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 580c228ccb56..88171c364b60 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -163,7 +163,7 @@ void OReportSection::Paint( vcl::RenderContext& rRenderContext, const tools::Rec // do paint (unbuffered) and mark repaint end if(pPgView) { - pPgView->DrawLayer(0, &rRenderContext); + pPgView->DrawLayer(RPT_LAYER_FRONT, &rRenderContext); pPgView->GetView().EndDrawLayers(*pTargetPaintWindow, true); } diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index 1c5ba21f4865..d94fe0deb51d 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -229,23 +229,20 @@ bool OSectionView::IsDragResize() const } -short OSectionView::GetLayerIdOfMarkedObjects() const +SdrLayerID OSectionView::GetLayerIdOfMarkedObjects() const { - short nRet = SHRT_MAX; + SdrLayerID nRet = SDRLAYER_NOTFOUND; const SdrMarkList &rMrkList = GetMarkedObjectList(); for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); - if ( nRet == SHRT_MAX ) + if ( nRet == SDRLAYER_NOTFOUND ) nRet = pObj->GetLayer(); else if ( nRet != pObj->GetLayer() ) { - nRet = -1; break; } } - if ( nRet == SHRT_MAX ) - nRet = -1; return nRet; } |