summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-13 21:45:40 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-13 22:09:32 +0200
commit77c3c53cff8c2b8af535c2cb0236314434ba8c45 (patch)
tree11fe3fe1db1105f9a57bfb44c7663ef673bd0557 /sw
parentDOCX import: implement linking for shapes having textboxes (diff)
downloadcore-77c3c53cff8c2b8af535c2cb0236314434ba8c45.tar.gz
core-77c3c53cff8c2b8af535c2cb0236314434ba8c45.zip
SwXShape: getter for ChainNext/PrevName UNO property
Change-Id: I7e4fffabf6b1d96a458a3afd141f86d0e4565230
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/textboxhelper.cxx17
-rw-r--r--sw/source/core/unocore/unodraw.cxx8
2 files changed, 22 insertions, 3 deletions
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 5ddfbe01ab0f..c7fbb8d0625e 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -11,6 +11,7 @@
#include <frmfmt.hxx>
#include <fmtcntnt.hxx>
#include <fmtanchr.hxx>
+#include <fmtcnct.hxx>
#include <doc.hxx>
#include <docsh.hxx>
#include <docary.hxx>
@@ -286,9 +287,21 @@ void SwTextBoxHelper::getProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 n
if (SwFrmFmt* pFmt = findTextBox(pShape))
{
- if (nWID == RES_CHAIN && nMemberId == MID_CHAIN_NAME)
+ if (nWID == RES_CHAIN)
{
- rValue = uno::makeAny(pFmt->GetName());
+ switch (nMemberId)
+ {
+ case MID_CHAIN_PREVNAME:
+ case MID_CHAIN_NEXTNAME:
+ {
+ const SwFmtChain& rChain = pFmt->GetChain();
+ rChain.QueryValue(rValue, nMemberId);
+ }
+ break;
+ case MID_CHAIN_NAME:
+ rValue = uno::makeAny(pFmt->GetName());
+ break;
+ }
}
}
}
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index afbf447b8551..f4924b94f079 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1542,8 +1542,14 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
}
else if (pEntry->nWID == RES_CHAIN)
{
- if (pEntry->nMemberId == MID_CHAIN_NAME)
+ switch (pEntry->nMemberId)
+ {
+ case MID_CHAIN_PREVNAME:
+ case MID_CHAIN_NEXTNAME:
+ case MID_CHAIN_NAME:
SwTextBoxHelper::getProperty(pFmt, pEntry->nWID, pEntry->nMemberId, aRet);
+ break;
+ }
}
// #i28749#
else if ( FN_SHAPE_TRANSFORMATION_IN_HORI_L2R == pEntry->nWID )