summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-25 10:42:35 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-25 12:30:52 +0200
commitfdb50cd32e98f5e6128eb411ed910684b1fb41f0 (patch)
tree0a2ec6598242e44b73915b2576f6cc87f0afc79c /sw/qa
parentdb960181fe63efa28c2370505b2074d1db485e07 (diff)
SwTextBoxHelper::syncProperty: handle RES_TEXT_VERT_ADJUST
So that vertical text adjustment of the shape is reflected in the textbox layout. Change-Id: I887d51928fe4d37db08864374e0cea54f80953b5
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odtbin0 -> 12076 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odt b/sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odt
new file mode 100644
index 000000000000..dfb26bfa3912
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 9ec5a76d8022..b279e7c9365a 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -44,6 +44,7 @@ public:
void testShapeTextboxSelect();
void testShapeTextboxDelete();
void testCp1000071();
+ void testShapeTextboxVertadjust();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -58,6 +59,7 @@ public:
CPPUNIT_TEST(testShapeTextboxSelect);
CPPUNIT_TEST(testShapeTextboxDelete);
CPPUNIT_TEST(testCp1000071);
+ CPPUNIT_TEST(testShapeTextboxVertadjust);
CPPUNIT_TEST_SUITE_END();
private:
@@ -360,6 +362,16 @@ void SwUiWriterTest::testCp1000071()
CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTbl[ 1 ]->End()->nContent.GetIndex());
}
+void SwUiWriterTest::testShapeTextboxVertadjust()
+{
+ SwDoc* pDoc = createDoc("shape-textbox-vertadjust.odt");
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(1);
+ SwFrmFmt* pFmt = static_cast<SwDrawContact*>(pObject->GetUserCall())->GetFmt();
+ // This was SDRTEXTVERTADJUST_TOP.
+ CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_CENTER, pFmt->GetTextVertAdjust().GetValue());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();