diff options
author | Artur Dorda <artur.dorda+libo@gmail.com> | 2012-06-10 01:37:25 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-12 03:10:07 +0200 |
commit | 5022553e09387428e80abbcb0f18ceb376e25f87 (patch) | |
tree | 813a7e4aa17c82cbe9cdcecb3f37e3f567ed3b6d /drawinglayer | |
parent | cace122087fb700560173dc61d8c36941b5fab3a (diff) |
Added dumping TextAutoGrowHeight & TextAutoGrowWidth properties
Change-Id: I03c8786d1cfce2f05ead5fabd58f5f24cd567aff
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/inc/drawinglayer/XShapeDumper.hxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/dumper/XShapeDumper.cxx | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx index d734d15f486b..c9cfd89ccc16 100644 --- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx @@ -110,6 +110,8 @@ private: // TextProperties.idl void dumpIsNumberingAsAttribute(sal_Bool bIsNumbering, xmlTextWriterPtr xmlWriter); + void dumpTextAutoGrowHeightAsAttribute(sal_Bool bTextAutoGrowHeight, xmlTextWriterPtr xmlWriter); + void dumpTextAutoGrowWidthAsAttribute(sal_Bool bTextAutoGrowWidth, xmlTextWriterPtr xmlWriter); // XShape.idl void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter); diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index 7c80fa4564a7..83d496b75b08 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -606,6 +606,22 @@ namespace { xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("isNumbering"), "%s", "false"); } + void XShapeDumper::dumpTextAutoGrowHeightAsAttribute(sal_Bool bTextAutoGrowHeight, xmlTextWriterPtr xmlWriter) + { + if(bTextAutoGrowHeight) + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "true"); + else + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "false"); + } + + void XShapeDumper::dumpTextAutoGrowWidthAsAttribute(sal_Bool bTextAutoGrowWidth, xmlTextWriterPtr xmlWriter) + { + if(bTextAutoGrowWidth) + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "true"); + else + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "false"); + } + // -------------------------------- // ---------- XShape.idl ---------- // -------------------------------- @@ -666,6 +682,18 @@ namespace { if(anotherAny >>= bIsNumbering) dumpIsNumberingAsAttribute(bIsNumbering, xmlWriter); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowHeight"); + sal_Bool bTextAutoGrowHeight; + if(anotherAny >>= bTextAutoGrowHeight) + dumpTextAutoGrowHeightAsAttribute(bTextAutoGrowHeight, xmlWriter); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowWidth"); + sal_Bool bTextAutoGrowWidth; + if(anotherAny >>= bTextAutoGrowWidth) + dumpTextAutoGrowWidthAsAttribute(bTextAutoGrowWidth, xmlWriter); + } } else if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape")) { |