summaryrefslogtreecommitdiff
path: root/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-10 13:52:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-12 09:54:23 +0200
commita651dbcfca9e198b5c2561076961504586bc6bea (patch)
tree812eee16af9bc3c4c75b8b45a4c126f99ad1bab3 /sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
parent9b5ce4023d35c4cc82f7b17e79b8fedbcb1367dd (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 'sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx42
1 files changed, 17 insertions, 25 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index ec81ed09dd42..21e84ddaaca7 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1060,32 +1060,24 @@ void ScShapeChildren::FillShapes(const tools::Rectangle& aPixelPaintRect, const
ScShapeChild aShape;
aShape.mxShape = xShape;
aShape.mnRangeId = nRangeId;
- switch (pObj->GetLayer())
+ if (pObj->GetLayer().anyOf(SC_LAYER_INTERN, SC_LAYER_FRONT))
{
- case SC_LAYER_INTERN:
- case SC_LAYER_FRONT:
- {
- maShapeRanges[nRangeId].maForeShapes.push_back(aShape);
- bForeAdded = true;
- }
- break;
- case SC_LAYER_BACK:
- {
- maShapeRanges[nRangeId].maBackShapes.push_back(aShape);
- bBackAdded = true;
- }
- break;
- case SC_LAYER_CONTROLS:
- {
- maShapeRanges[nRangeId].maControls.push_back(aShape);
- bControlAdded = true;
- }
- break;
- default:
- {
- OSL_FAIL("I don't know this layer.");
- }
- break;
+ maShapeRanges[nRangeId].maForeShapes.push_back(aShape);
+ bForeAdded = true;
+ }
+ else if (pObj->GetLayer() == SC_LAYER_BACK)
+ {
+ maShapeRanges[nRangeId].maBackShapes.push_back(aShape);
+ bBackAdded = true;
+ }
+ else if (pObj->GetLayer() == SC_LAYER_CONTROLS)
+ {
+ maShapeRanges[nRangeId].maControls.push_back(aShape);
+ bControlAdded = true;
+ }
+ else
+ {
+ OSL_FAIL("I don't know this layer.");
}
}
}