summaryrefslogtreecommitdiff
path: root/editeng/source/uno/unofield.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-07 15:22:54 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-08 14:23:05 -0400
commitaac15b638410f181133dc15343136b4e9a1675ba (patch)
tree8ce171d69b7dd884a546544d53993a61dc6e38e3 /editeng/source/uno/unofield.cxx
parentc601d86ce154e43266e0185b2fba2c1b4f196d1d (diff)
Set anchor to XTextContent using UNO API.
Change-Id: Id1ccae62037369917a46d620c0c46ac2447a0910
Diffstat (limited to 'editeng/source/uno/unofield.cxx')
-rw-r--r--editeng/source/uno/unofield.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 7b97684275cb..50c578f567ee 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -41,6 +41,8 @@
#include <comphelper/serviceinfohelper.hxx>
#include <comphelper/servicehelper.hxx>
+#include "editeng/unonames.hxx"
+
using namespace ::rtl;
using namespace ::cppu;
using namespace ::com::sun::star;
@@ -671,6 +673,12 @@ void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName,
if( mpImpl == NULL )
throw uno::RuntimeException();
+ if (aPropertyName == UNO_TC_PROP_ANCHOR)
+ {
+ aValue >>= mxAnchor;
+ return;
+ }
+
const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap().getByName( aPropertyName );
if ( !pMap )
throw beans::UnknownPropertyException();
@@ -838,6 +846,9 @@ uno::Any SAL_CALL SvxUnoTextField::getPropertyValue( const OUString& PropertyNam
{
SolarMutexGuard aGuard;
+ if (PropertyName == UNO_TC_PROP_ANCHOR)
+ return uno::makeAny(mxAnchor);
+
uno::Any aValue;
const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap().getByName( PropertyName );