summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-23 15:00:26 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:39 +0200
commit1f1b9b9ff56d8649b22b78c5696a36b078ea9dcf (patch)
tree23e712ed0972b8ea8dd08e0aa9fd30ada8e58db6 /include
parentd478a1cd6426aba6a502963862ace5a9f6182450 (diff)
convert SDRINSERT constants to scoped enum
Change-Id: I6335e00cae161cea7ece922ecfa845c205626cd9
Diffstat (limited to 'include')
-rw-r--r--include/svx/svdedtv.hxx23
-rw-r--r--include/svx/svdxcgv.hxx8
-rw-r--r--include/svx/view3d.hxx2
3 files changed, 21 insertions, 12 deletions
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 7f4451d4d242..c22074bcc5ae 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -24,6 +24,7 @@
#include <svx/xpoly.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
class SfxUndoAction;
class SdrUndoAction;
@@ -52,12 +53,20 @@ enum SdrMergeMode {
SDR_MERGE_INTERSECT
};
-// Optionen fuer InsertObject()
-#define SDRINSERT_DONTMARK 0x0001 /* object will not be marked (the actual marking remains) */
-#define SDRINSERT_ADDMARK 0x0002 /* object will be added an existing selection */
-#define SDRINSERT_SETDEFATTR 0x0004 /* actual attributes (+StyleSheet) are assigned to the object */
-#define SDRINSERT_SETDEFLAYER 0x0008 /* actual layer is assigned to the object */
-#define SDRINSERT_NOBROADCAST 0x0010 /* insert with NbcInsertObject() for SolidDragging */
+// Options for InsertObject()
+enum class SdrInsertFlags
+{
+ NONE = 0x0000,
+ DONTMARK = 0x0001, /* object will not be marked (the actual marking remains) */
+ ADDMARK = 0x0002, /* object will be added an existing selection */
+ SETDEFATTR = 0x0004, /* actual attributes (+StyleSheet) are assigned to the object */
+ SETDEFLAYER = 0x0008, /* actual layer is assigned to the object */
+ NOBROADCAST = 0x0010, /* insert with NbcInsertObject() for SolidDragging */
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrInsertFlags> : is_typed_flags<SdrInsertFlags, 0x1f> {};
+}
class SVX_DLLPUBLIC SdrEditView: public SdrMarkView
{
@@ -274,7 +283,7 @@ public:
// the target layer is locked or not visible. In this case
// the method returns FALSE.
// Amongst others the method does not create an undo-action.
- bool InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, sal_uIntPtr nOptions=0);
+ bool InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE);
// Replace one drawing object by another.
// *pNewObj belongs to me, *pOldObj is changed into Undo.
diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
index afa84e7a3f4b..ec5d3be323c3 100644
--- a/include/svx/svdxcgv.hxx
+++ b/include/svx/svdxcgv.hxx
@@ -32,7 +32,7 @@ class SVX_DLLPUBLIC SdrExchangeView: public SdrObjEditView
protected:
void ImpGetPasteObjList(Point& rPos, SdrObjList*& rpLst);
- void ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Point& rCenter, const Size& rSiz, const MapMode& rMap, sal_uInt32 nOptions);
+ void ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Point& rCenter, const Size& rSiz, const MapMode& rMap, SdrInsertFlags nOptions);
bool ImpGetPasteLayer(const SdrObjList* pObjList, SdrLayerID& rLayer) const;
// liefert True, wenn rPt geaendert wurde
@@ -104,11 +104,11 @@ public:
// Gueltige Werte fuer nOptions sind SDRINSERT_DONTMARK und
// SDRINSERT_ADDMARK (siehe svdedtv.hxx).
virtual bool Paste(
- const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions,
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions,
const OUString& rSrcShellID, const OUString& rDestShellID );
- bool Paste(const OUString& rStr, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
- bool Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
+ bool Paste(const OUString& rStr, const Point& rPos, SdrObjList* pLst=NULL, SdrInsertFlags nOptions=SdrInsertFlags::NONE);
+ bool Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst=NULL, SdrInsertFlags nOptions=SdrInsertFlags::NONE);
static bool Cut( sal_uIntPtr nFormat = SDR_ANYFORMAT );
diff --git a/include/svx/view3d.hxx b/include/svx/view3d.hxx
index 37c08de09e63..2f66ebe864f2 100644
--- a/include/svx/view3d.hxx
+++ b/include/svx/view3d.hxx
@@ -99,7 +99,7 @@ public:
// On Paste: We need to insert the objects of the Scene, but not the Scene itself
using SdrView::Paste;
virtual bool Paste(
- const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions,
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions,
const OUString& rSrcShellID, const OUString& rDestShellID ) SAL_OVERRIDE;
// #83403# Service routine used from local Clone() and from SdrCreateView::EndCreateObj(...)