summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx12
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx42
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx2
-rw-r--r--sc/source/ui/inc/drawsh.hxx3
-rw-r--r--sc/source/ui/inc/drawview.hxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/output.hxx8
-rw-r--r--sc/source/ui/view/drawview.cxx4
-rw-r--r--sc/source/ui/view/gridwin3.cxx4
-rw-r--r--sc/source/ui/view/output3.cxx4
10 files changed, 38 insertions, 45 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.");
}
}
}
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index a92397a112f5..02215b8e1093 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -373,7 +373,7 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet)
rSet.DisableItem( SID_ATTRIBUTES_AREA );
}
-bool ScDrawShell::AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark)
+bool ScDrawShell::AreAllObjectsOnLayer(SdrLayerID nLayerNo,const SdrMarkList& rMark)
{
bool bResult=true;
const size_t nCount = rMark.GetMarkCount();
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index 0da1b1532f05..b1955160e734 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -24,6 +24,7 @@
#include "shellids.hxx"
#include <sfx2/module.hxx>
#include <svx/svdmark.hxx>
+#include <svx/svdtypes.hxx>
#include <tools/link.hxx>
#include <rtl/ref.hxx>
@@ -84,7 +85,7 @@ public:
ScDrawView* GetDrawView();
- static bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark);
+ static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo,const SdrMarkList& rMark);
void GetDrawAttrStateForIFBX( SfxItemSet& rSet );
::rtl::OUString GetSidebarContextName();
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index f60d99d83e28..b747207d5e2b 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -84,7 +84,7 @@ public:
void MarkDropObj( SdrObject* pObj );
- void SetMarkedToLayer( sal_uInt8 nLayerNo );
+ void SetMarkedToLayer( SdrLayerID nLayerNo );
void InvalidateAttribs();
void InvalidateDrawTextAttrs();
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 289640098e6b..ac90b1a14287 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -255,7 +255,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
SdrObject* GetEditObject();
bool IsMyModel(SdrEditView* pSdrView);
- void DrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer );
+ void DrawRedraw( ScOutputData& rOutputData, SdrLayerID nLayer );
void DrawSdrGrid( const tools::Rectangle& rDrawingRect, OutputDevice* pContentDev );
void DrawAfterScroll();
tools::Rectangle GetListValButtonRect( const ScAddress& rButtonPos );
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 26dad1add045..c5bc27d82e86 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -314,12 +314,12 @@ public:
void DrawClear();
// #i72502# printer only command set
- Point PrePrintDrawingLayer(long nLogStX, long nLogStY );
- void PostPrintDrawingLayer(const Point& rMMOffset); // #i74768# need offset for FormLayer
- void PrintDrawingLayer(const sal_uInt16 nLayer, const Point& rMMOffset);
+ Point PrePrintDrawingLayer(long nLogStX, long nLogStY );
+ void PostPrintDrawingLayer(const Point& rMMOffset); // #i74768# need offset for FormLayer
+ void PrintDrawingLayer(SdrLayerID nLayer, const Point& rMMOffset);
// only screen:
- void DrawSelectiveObjects(const sal_uInt16 nLayer);
+ void DrawSelectiveObjects(SdrLayerID nLayer);
bool SetChangedClip(); // sal_False = not
vcl::Region GetChangedAreaRegion();
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 1758f7d8a062..e8b2e064bd85 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -209,7 +209,7 @@ void ScDrawView::InvalidateDrawTextAttrs()
rBindings.Invalidate( SID_ALIGN_ANY_JUSTIFIED );
}
-void ScDrawView::SetMarkedToLayer( sal_uInt8 nLayerNo )
+void ScDrawView::SetMarkedToLayer( SdrLayerID nLayerNo )
{
if (AreObjectsMarked())
{
@@ -224,7 +224,7 @@ void ScDrawView::SetMarkedToLayer( sal_uInt8 nLayerNo )
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
if ( dynamic_cast<const SdrUnoObj*>( pObj) == nullptr && (pObj->GetLayer() != SC_LAYER_INTERN) )
{
- AddUndo( new SdrUndoObjectLayerChange( *pObj, pObj->GetLayer(), (SdrLayerID)nLayerNo) );
+ AddUndo( new SdrUndoObjectLayerChange( *pObj, pObj->GetLayer(), nLayerNo) );
pObj->SetLayer( nLayerNo );
}
}
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index cb15a6a40476..3383f18d0720 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -185,7 +185,7 @@ bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
return false;
}
-void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer )
+void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, SdrLayerID nLayer )
{
const ScViewOptions& rOpts = pViewData->GetOptions();
@@ -206,7 +206,7 @@ void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer )
pDrView->setHideFormControl(!bDrawDraw);
}
- rOutputData.DrawSelectiveObjects((sal_uInt16)nLayer);
+ rOutputData.DrawSelectiveObjects(nLayer);
}
}
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 55f2aad1fa5f..168879acaed5 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -131,7 +131,7 @@ void ScOutputData::PostPrintDrawingLayer(const Point& rMMOffset) // #i74768#
}
// #i72502#
-void ScOutputData::PrintDrawingLayer(const sal_uInt16 nLayer, const Point& rMMOffset)
+void ScOutputData::PrintDrawingLayer(SdrLayerID nLayer, const Point& rMMOffset)
{
bool bHideAllDrawingLayer(false);
@@ -166,7 +166,7 @@ void ScOutputData::PrintDrawingLayer(const sal_uInt16 nLayer, const Point& rMMOf
}
}
-void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer)
+void ScOutputData::DrawSelectiveObjects(SdrLayerID nLayer)
{
ScDrawLayer* pModel = mpDoc->GetDrawLayer();
if (!pModel)