summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-08-14 15:10:34 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-14 15:13:59 +0200
commit186fc4c434384e07c18ff2dd2bd0e00a49bf17a7 (patch)
tree2ce358277a3fe91155bde030f7b7a0472b12c860 /sw
parent554765b1eeade83b8b2ce537787ae4becde4d9b0 (diff)
w:spacing in a paragraph should also apply to as-char objects (bnc#780044)
Otherwise global w:spacing will be used even if overriden locally. Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/bnc780044_spacing.docxbin0 -> 7437 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/bnc780044_spacing.docx b/sw/qa/extras/ooxmlimport/data/bnc780044_spacing.docx
new file mode 100644
index 000000000000..927d4d37671a
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/bnc780044_spacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 50b6945826b2..f9d341603825 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -127,6 +127,7 @@ public:
void testFdo65632();
void testFdo66474();
void testGroupshapeRotation();
+ void testBnc780044Spacing();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -219,6 +220,7 @@ void Test::run()
{"fdo65632.docx", &Test::testFdo65632},
{"fdo66474.docx", &Test::testFdo66474},
{"groupshape-rotation.docx", &Test::testGroupshapeRotation},
+ {"bnc780044_spacing.docx", &Test::testBnc780044Spacing},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1537,6 +1539,17 @@ void Test::testGroupshapeRotation()
CPPUNIT_ASSERT_EQUAL(sal_Int32(315 * 100), getProperty<sal_Int32>(xDraws->getByIndex(0), "RotateAngle"));
}
+void Test::testBnc780044Spacing()
+{
+ // The document has global w:spacing in styles.xml , and local w:spacing in w:pPr, which however
+ // only applied to text runs, not to as-character pictures. So the picture made the line higher.
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+ xCursor->jumpToLastPage();
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();