summaryrefslogtreecommitdiff
path: root/sc/inc
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/inc
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/inc')
-rw-r--r--sc/inc/global.hxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 00f87cac0e35..1c67775099cb 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -22,6 +22,7 @@
#include "address.hxx"
#include <i18nlangtag/lang.h>
+#include <svx/svdtypes.hxx>
#include <tools/stream.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include "scdllapi.h"
@@ -204,12 +205,13 @@ namespace o3tl {
#define EMPTY_OUSTRING ScGlobal::GetEmptyOUString()
- // layer id's for drawing
-#define SC_LAYER_FRONT 0
-#define SC_LAYER_BACK 1
-#define SC_LAYER_INTERN 2
-#define SC_LAYER_CONTROLS 3
-#define SC_LAYER_HIDDEN 4
+// Layer id's for drawing.
+// These are both id's and positions.
+constexpr SdrLayerID SC_LAYER_FRONT (0);
+constexpr SdrLayerID SC_LAYER_BACK (1);
+constexpr SdrLayerID SC_LAYER_INTERN (2);
+constexpr SdrLayerID SC_LAYER_CONTROLS(3);
+constexpr SdrLayerID SC_LAYER_HIDDEN (4);
// link tables
enum class ScLinkMode {