summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-05-27 09:04:23 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-27 09:32:42 +0200
commit9a7e617eb30c8a475ccfc1af8bf3bee741a74fbf (patch)
tree03582099d4fe873402901cb9ba9840641fd36aac /sw
parent72159041cbb70f59017df0b5c90c5fbbfb6b62aa (diff)
SwXShape: invoke SwTextBoxHelper
For now, only in queryInterface(), setPropertyValue() and setSize(). It's safe to always call these methods, if they are not relevant, the method will be a NOP. Change-Id: I6efb808f605d47f731819cd971bb66ca251cafb6
Diffstat (limited to 'sw')
-rw-r--r--sw/Library_sw.mk1
-rw-r--r--sw/source/core/unocore/unodraw.cxx10
2 files changed, 10 insertions, 1 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index ec4e021bb1ee..b84e9fc0f5d4 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -202,6 +202,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/doc/tblafmt \
sw/source/core/doc/tblcpy \
sw/source/core/doc/tblrwcl \
+ sw/source/core/doc/textboxhelper \
sw/source/core/doc/visiturl \
sw/source/core/docnode/cancellablejob \
sw/source/core/docnode/finalthreadmanager \
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 19b1c5a8b106..20a14cfdc602 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -28,6 +28,7 @@
#include <unotextrange.hxx>
#include <svx/svditer.hxx>
#include <swunohelper.hxx>
+#include <textboxhelper.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <fmtcntnt.hxx>
@@ -974,7 +975,11 @@ SwXShape::~SwXShape()
uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeException, std::exception )
{
- uno::Any aRet = SwXShapeBaseClass::queryInterface(aType);
+ uno::Any aRet = SwTextBoxHelper::getXTextAppend(GetFrmFmt(), aType);
+ if (aRet.hasValue())
+ return aRet;
+
+ aRet = SwXShapeBaseClass::queryInterface(aType);
// #i53320# - follow-up of #i31698#
// interface drawing::XShape is overloaded. Thus, provide
// correct object instance.
@@ -1325,6 +1330,8 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
else
pFmt->SetFmtAttr(aSet);
}
+ // We have a pFmt and a pEntry as well: try to sync TextBox property.
+ SwTextBoxHelper::syncProperty(pFmt, pEntry->nWID, pEntry->nMemberId, rPropertyName, aValue);
}
else
{
@@ -2309,6 +2316,7 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
{
mxShape->setSize( aSize );
}
+ SwTextBoxHelper::syncProperty(GetFrmFmt(), RES_FRM_SIZE, MID_FRMSIZE_SIZE, "Size", uno::makeAny(aSize));
}
// #i31698#
// implementation of virtual methods from drawing::XShapeDescriptor