diff options
Diffstat (limited to 'sc/source/ui/Accessibility')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocument.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 42 |
2 files changed, 23 insertions, 31 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 791747d0eae5..2fbabe9efa36 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -122,16 +122,16 @@ struct ScShapeDataLess { switch (rLayerID) { - case SC_LAYER_FRONT: + case sal_uInt8(SC_LAYER_FRONT): rLayerID = 1; break; - case SC_LAYER_BACK: + case sal_uInt8(SC_LAYER_BACK): rLayerID = 0; break; - case SC_LAYER_INTERN: + case sal_uInt8(SC_LAYER_INTERN): rLayerID = 2; break; - case SC_LAYER_CONTROLS: + case sal_uInt8(SC_LAYER_CONTROLS): rLayerID = 3; break; } @@ -146,7 +146,7 @@ struct ScShapeDataLess sal_Int16 nLayerID = 0; if( (aPropAny >>= nLayerID) ) { - if (nLayerID == SC_LAYER_BACK) + if (SdrLayerID(nLayerID) == SC_LAYER_BACK) bResult = true; } } @@ -1230,7 +1230,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, b sal_Int16 nLayerID = 0; if( aPropAny >>= nLayerID ) { - if( (nLayerID == SC_LAYER_INTERN) || (nLayerID == SC_LAYER_HIDDEN) ) + if( (SdrLayerID(nLayerID) == SC_LAYER_INTERN) || (SdrLayerID(nLayerID) == SC_LAYER_HIDDEN) ) pShape->bSelectable = false; else pShape->bSelectable = true; 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."); } } } |