[Libreoffice-commits] .: Branch 'feature/gsoc_test_improvements' - drawinglayer/inc drawinglayer/source
Artur Dorda
adorda at kemper.freedesktop.org
Mon Jun 11 05:04:11 PDT 2012
drawinglayer/inc/drawinglayer/XShapeDumper.hxx | 2 ++
drawinglayer/source/dumper/XShapeDumper.cxx | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
New commits:
commit 487f81a49446fc13b70f365227d0d894f00cb0dc
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Mon Jun 11 14:03:39 2012 +0200
Added dumping NavigationOrder & Hyperlink properties
Change-Id: I15bd739657f04afd647f22a28a3b04ac066ce114
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 2e27505..3474995 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -161,6 +161,8 @@ private:
void dumpSizeProtectAsAttribute(sal_Bool bSizeProtect, xmlTextWriterPtr xmlWriter);
void dumpHomogenMatrixLine3(com::sun::star::drawing::HomogenMatrixLine3 aLine, xmlTextWriterPtr xmlWriter);
void dumpTransformationAsElement(com::sun::star::drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter);
+ void dumpNavigationOrderAsAttribute(sal_Int32 aNavigationOrder, xmlTextWriterPtr xmlWriter);
+ void dumpHyperlinkAsAttribute(rtl::OUString sHyperlink, 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 470d897..4775a24 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -941,6 +941,17 @@ namespace {
xmlTextWriterEndElement( xmlWriter );
}
+ void XShapeDumper::dumpNavigationOrderAsAttribute(sal_Int32 aNavigationOrder, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("navigationOrder"), "%" SAL_PRIdINT32, aNavigationOrder);
+ }
+
+ void XShapeDumper::dumpHyperlinkAsAttribute(rtl::OUString sHyperlink, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("hyperlink"), "%s",
+ rtl::OUStringToOString(sHyperlink, RTL_TEXTENCODING_UTF8).getStr());
+ }
+
// --------------------------------
// ---------- XShape.idl ----------
// --------------------------------
@@ -1492,6 +1503,18 @@ namespace {
if(anotherAny >>= aTransformation)
dumpTransformationAsElement(aTransformation, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("NavigationOrder");
+ sal_Int32 aNavigationOrder;
+ if(anotherAny >>= aNavigationOrder)
+ dumpNavigationOrderAsAttribute(aNavigationOrder, xmlWriter);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("Hyperlink");
+ rtl::OUString sHyperlink;
+ if(anotherAny >>= sHyperlink)
+ dumpHyperlinkAsAttribute(sHyperlink, xmlWriter);
+ }
}
#if DEBUG_DUMPER
More information about the Libreoffice-commits
mailing list