ODP: export TextPreRotateAngle
Change-Id: I13eb005195ebbdee5016bf279cba423e388723a0 Reviewed-on: https://gerrit.libreoffice.org/43910 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
This commit is contained in:
parent
1a6b373d99
commit
bb72ef2a15
BIN
sd/qa/unit/data/pptx/shape-text-rotate.pptx
Executable file
BIN
sd/qa/unit/data/pptx/shape-text-rotate.pptx
Executable file
Binary file not shown.
@ -91,6 +91,7 @@ public:
|
|||||||
void testAuthorField();
|
void testAuthorField();
|
||||||
void testTdf100926();
|
void testTdf100926();
|
||||||
void testPageWithTransparentBackground();
|
void testPageWithTransparentBackground();
|
||||||
|
void testTextRotation();
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE(SdExportTest);
|
CPPUNIT_TEST_SUITE(SdExportTest);
|
||||||
|
|
||||||
@ -109,6 +110,7 @@ public:
|
|||||||
CPPUNIT_TEST(testAuthorField);
|
CPPUNIT_TEST(testAuthorField);
|
||||||
CPPUNIT_TEST(testTdf100926);
|
CPPUNIT_TEST(testTdf100926);
|
||||||
CPPUNIT_TEST(testPageWithTransparentBackground);
|
CPPUNIT_TEST(testPageWithTransparentBackground);
|
||||||
|
CPPUNIT_TEST(testTextRotation);
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
@ -725,6 +727,28 @@ void SdExportTest::testPageWithTransparentBackground()
|
|||||||
xDocShRef->DoClose();
|
xDocShRef->DoClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SdExportTest::testTextRotation()
|
||||||
|
{
|
||||||
|
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-text-rotate.pptx"), PPTX);
|
||||||
|
utl::TempFile tempFile;
|
||||||
|
xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
|
||||||
|
|
||||||
|
uno::Reference<drawing::XDrawPage> xPage(getPage(0, xDocShRef));
|
||||||
|
uno::Reference<beans::XPropertySet> xPropSet(getShape(0, xPage));
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT(xPropSet.is());
|
||||||
|
|
||||||
|
auto aGeomPropSeq = xPropSet->getPropertyValue("CustomShapeGeometry").get<uno::Sequence<beans::PropertyValue>>();
|
||||||
|
comphelper::SequenceAsHashMap aCustomShapeGeometry(aGeomPropSeq);
|
||||||
|
|
||||||
|
auto it = aCustomShapeGeometry.find("TextRotateAngle");
|
||||||
|
CPPUNIT_ASSERT(it != aCustomShapeGeometry.end());
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT_EQUAL((double)(-90), aCustomShapeGeometry["TextRotateAngle"].get<double>());
|
||||||
|
|
||||||
|
xDocShRef->DoClose();
|
||||||
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
|
CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
|
||||||
|
|
||||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||||
|
@ -93,6 +93,7 @@ namespace xmloff { namespace EnhancedCustomShapeToken {
|
|||||||
EAS_MirroredY,
|
EAS_MirroredY,
|
||||||
EAS_ViewBox,
|
EAS_ViewBox,
|
||||||
EAS_TextRotateAngle,
|
EAS_TextRotateAngle,
|
||||||
|
EAS_TextPreRotateAngle,
|
||||||
EAS_ExtrusionAllowed,
|
EAS_ExtrusionAllowed,
|
||||||
EAS_ConcentricGradientFillAllowed,
|
EAS_ConcentricGradientFillAllowed,
|
||||||
EAS_TextPathAllowed,
|
EAS_TextPathAllowed,
|
||||||
|
@ -108,6 +108,7 @@ static const TokenTable pTokenTableArray[] =
|
|||||||
{ "MirroredY", EAS_MirroredY },
|
{ "MirroredY", EAS_MirroredY },
|
||||||
{ "ViewBox", EAS_ViewBox },
|
{ "ViewBox", EAS_ViewBox },
|
||||||
{ "TextRotateAngle", EAS_TextRotateAngle },
|
{ "TextRotateAngle", EAS_TextRotateAngle },
|
||||||
|
{ "TextPreRotateAngle", EAS_TextPreRotateAngle },
|
||||||
{ "ExtrusionAllowed", EAS_ExtrusionAllowed },
|
{ "ExtrusionAllowed", EAS_ExtrusionAllowed },
|
||||||
{ "TextPathAllowed", EAS_TextPathAllowed },
|
{ "TextPathAllowed", EAS_TextPathAllowed },
|
||||||
{ "ConcentricGradientFillAllowed", EAS_ConcentricGradientFillAllowed },
|
{ "ConcentricGradientFillAllowed", EAS_ConcentricGradientFillAllowed },
|
||||||
|
@ -4251,10 +4251,11 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case EAS_TextPreRotateAngle :
|
||||||
case EAS_TextRotateAngle :
|
case EAS_TextRotateAngle :
|
||||||
{
|
{
|
||||||
double fTextRotateAngle = 0;
|
double fTextRotateAngle = 0;
|
||||||
if ( rGeoProp.Value >>= fTextRotateAngle )
|
if ( ( rGeoProp.Value >>= fTextRotateAngle ) && fTextRotateAngle != 0 )
|
||||||
{
|
{
|
||||||
::sax::Converter::convertDouble(
|
::sax::Converter::convertDouble(
|
||||||
aStrBuffer, fTextRotateAngle );
|
aStrBuffer, fTextRotateAngle );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user