summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drawsh.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 /sw/source/uibase/shells/drawsh.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 'sw/source/uibase/shells/drawsh.cxx')
-rw-r--r--sw/source/uibase/shells/drawsh.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index fc0580ea85bd..6f2ee322b88e 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -254,7 +254,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
if (rSh.IsObjSelected())
{
rSh.StartUndo( SwUndoId::START );
- if (rSh.GetLayerId() == 0)
+ if (rSh.GetLayerId() == SdrLayerID(0))
{
SetWrapMode(FN_FRAME_WRAPTHRU);
rSh.SelectionToHeaven();
@@ -407,12 +407,12 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
switch( nWhich )
{
case SID_OBJECT_HELL:
- if ( !rSh.IsObjSelected() || rSh.GetLayerId() == 0 || bProtected )
+ if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(0) || bProtected )
rSet.DisableItem( nWhich );
break;
case SID_OBJECT_HEAVEN:
- if ( !rSh.IsObjSelected() || rSh.GetLayerId() == 1 || bProtected )
+ if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(1) || bProtected )
rSet.DisableItem( nWhich );
break;