summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-09-10 11:41:11 +0300
committerJustin Luth <justin_luth@sil.org>2015-10-19 04:35:55 +0000
commit664197d95becd516c3dac25a50439078ba61e051 (patch)
tree85199c219b30c973a1c151b360c490fcfd16bce3 /sw/qa
parent51df957e1a40d2f3511345c1600c05dd35f34b6b (diff)
tdf#36117 .docx preserve page vertical alignment after RT
Change-Id: I90174f7a98e9bd01f45ee668f127356ff3e0e4ed Reviewed-on: https://gerrit.libreoffice.org/18481 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docxbin0 -> 13309 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx27
2 files changed, 27 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docx b/sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docx
new file mode 100644
index 000000000000..70fdec72dde0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index f95f5d28a0fb..0b82bcf3654d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/style/LineSpacing.hpp>
#include <com/sun/star/style/LineSpacingMode.hpp>
#include <com/sun/star/text/GraphicCrop.hpp>
+#include <pagedesc.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -1005,6 +1006,32 @@ DECLARE_OOXMLEXPORT_TEST(testExportAdjustmentValue, "tdf91429.docx")
assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd", "fmla", "val 50000");
}
+DECLARE_OOXMLEXPORT_TEST(testTextVerticalAdjustment, "tdf36117_verticalAdjustment.docx")
+{
+ //Preserve the page vertical alignment setting for .docx
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ SwPageDesc &Desc = pDoc->GetPageDesc( 0 );
+ drawing::TextVerticalAdjust nVA = Desc.GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_CENTER, nVA );
+
+ Desc = pDoc->GetPageDesc( 1 );
+ nVA = Desc.GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_TOP, nVA );
+
+ Desc = pDoc->GetPageDesc( 2 );
+ nVA = Desc.GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_BOTTOM, nVA );
+
+ Desc = pTextDoc->GetDocShell()->GetDoc()->GetPageDesc( 3 );
+ nVA = Desc.GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_BLOCK, nVA );
+}
+
+
DECLARE_OOXMLEXPORT_TEST(testTDF87348, "tdf87348_linkedTextboxes.docx")
{
int followCount=0;