summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-13 19:37:37 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-13 20:07:16 +0200
commitdb6f15ab21c7292c895a0042dc13072649dbfc9c (patch)
treedbb2957ae985302cafe854b0d72ddfb4b7ee21c4 /sw/inc
parent599643ec944dd3cad37a65e99d443e2010c8a36f (diff)
SwXShape: add ChainName UNO property
Shapes may not have a unique name, but TextFrames always have. So in order to be able to link shapes with textboxes, provide a ChainName property that's the name of the underlying TextFrame. This kills two birds with one stone: - we can have a unique name for each shape - the names can be used for TextFrame linking, as they are valid TextFrame names Change-Id: Ie96f267d392d9fe5388c5eacff9b873f1639054c
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/textboxhelper.hxx2
-rw-r--r--sw/inc/unomid.h1
-rw-r--r--sw/inc/unoprnms.hxx1
3 files changed, 4 insertions, 0 deletions
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index 50024e14c086..665f82abdc00 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -54,6 +54,8 @@ public:
static void syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, const css::uno::Any& rValue);
/// Does the same, but works on properties which lack an sw-specific WID / MemberID.
static void syncProperty(SwFrmFmt* pShape, const OUString& rPropertyName, const css::uno::Any& rValue);
+ /// Get a property of the underlying TextFrame.
+ static void getProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue);
/// If we have an associated TextFrame, then return that.
static SwFrmFmt* findTextBox(SwFrmFmt* pShape);
diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h
index 11d14c96664f..9d514a2350b1 100644
--- a/sw/inc/unomid.h
+++ b/sw/inc/unomid.h
@@ -56,6 +56,7 @@
#define MID_CHAIN_PREVNAME 0
#define MID_CHAIN_NEXTNAME 1
+#define MID_CHAIN_NAME 2
#define MID_LINENUMBER_COUNT 0
#define MID_LINENUMBER_STARTVALUE 1
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index bed1254b4a5e..9f0267e872e2 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -266,6 +266,7 @@
#define UNO_NAME_BREAK_TYPE "BreakType"
#define UNO_NAME_CHAIN_NEXT_NAME "ChainNextName"
#define UNO_NAME_CHAIN_PREV_NAME "ChainPrevName"
+#define UNO_NAME_CHAIN_NAME "ChainName"
#define UNO_NAME_CHAPTER_FORMAT "ChapterFormat"
#define UNO_NAME_CLIENT_MAP "ClientMap"
#define UNO_NAME_CONDITION "Condition"