Kaydet (Commit) f48bd974 authored tarafından Artur Dorda's avatar Artur Dorda Kaydeden (comit) Markus Mohrhard

Added dumping TextPathMode & ScaleX properties

Change-Id: Ib31fc84424d4a57e8f3bcca2054016c5809b6f10
üst ec5b681b
......@@ -46,6 +46,8 @@
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
#ifndef EnhancedShapeDumper_hxx
#define EnhancedShapeDumper_hxx
......@@ -139,6 +141,8 @@ public:
// EnhancedCustomShapePath.idl
void dumpEnhancedCustomShapeTextPathService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
void dumpTextPathAsAttribute(sal_Bool bTextPath);
void dumpTextPathModeAsAttribute(com::sun::star::drawing::EnhancedCustomShapeTextPathMode eTextPathMode);
void dumpScaleXAsAttribute(sal_Bool bScaleX);
private:
xmlTextWriterPtr xmlWriter;
......
......@@ -1030,6 +1030,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeTextPathService(uno::Reference<
if(anotherAny >>= bTextPath)
dumpTextPathAsAttribute(bTextPath);
}
{
uno::Any anotherAny = xPropSet->getPropertyValue("TextPathMode");
drawing::EnhancedCustomShapeTextPathMode eTextPathMode;
if(anotherAny >>= eTextPathMode)
dumpTextPathModeAsAttribute(eTextPathMode);
}
{
uno::Any anotherAny = xPropSet->getPropertyValue("ScaleX");
sal_Bool bScaleX;
if(anotherAny >>= bScaleX)
dumpScaleXAsAttribute(bScaleX);
}
}
void EnhancedShapeDumper::dumpTextPathAsAttribute(sal_Bool bTextPath)
......@@ -1040,3 +1052,28 @@ void EnhancedShapeDumper::dumpTextPathAsAttribute(sal_Bool bTextPath)
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "false");
}
void EnhancedShapeDumper::dumpTextPathModeAsAttribute(drawing::EnhancedCustomShapeTextPathMode eTextPathMode)
{
switch(eTextPathMode)
{
case drawing::EnhancedCustomShapeTextPathMode_NORMAL:
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "NORMAL");
break;
case drawing::EnhancedCustomShapeTextPathMode_PATH:
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "PATH");
break;
case drawing::EnhancedCustomShapeTextPathMode_SHAPE:
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "SHAPE");
break;
default:
break;
}
}
void EnhancedShapeDumper::dumpScaleXAsAttribute(sal_Bool bScaleX)
{
if(bScaleX)
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("scaleX"), "%s", "true");
else
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("scaleX"), "%s", "false");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment