[Libreoffice-commits] core.git: 2 commits - sw/qa sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jun 13 13:58:58 PDT 2014
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 4 ++--
sw/source/core/doc/textboxhelper.cxx | 17 +++++++++++++++--
sw/source/core/unocore/unodraw.cxx | 8 +++++++-
3 files changed, 24 insertions(+), 5 deletions(-)
New commits:
commit 54148d634d497dc0682399006890d77341402b42
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jun 13 21:55:39 2014 +0200
CppunitTest_sw_ooxmlsdrexport: clean up XPath expressions in testFDO77122
Change-Id: I1f8737bbe128c747c84c67e8ba8000ecef1ed4f7
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index ee40f9e..5157234 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1482,8 +1482,8 @@ DECLARE_OOXMLEXPORT_TEST(testFDO77122, "LinkedTextBoxes.docx")
if (!pXmlDoc)
return;
//ensure that the text box links are preserved.
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]", "id", "1");
- assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:linkedTxbx[1]", "id", "1");
+ assertXPath(pXmlDoc, "//wps:txbx[1]", "id", "1");
+ assertXPath(pXmlDoc, "//wps:linkedTxbx[1]", "id", "1");
}
DECLARE_OOXMLEXPORT_TEST(test76734_2K7, "test76734_2K7.docx")
commit 77c3c53cff8c2b8af535c2cb0236314434ba8c45
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jun 13 21:45:40 2014 +0200
SwXShape: getter for ChainNext/PrevName UNO property
Change-Id: I7e4fffabf6b1d96a458a3afd141f86d0e4565230
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 5ddfbe0..c7fbb8d 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 afbf447..f4924b9 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 )
More information about the Libreoffice-commits
mailing list