[Libreoffice-commits] .: sw/CppunitTest_sw_subsequent_rtftok.mk sw/qa
Miklos Vajna
vmiklos at kemper.freedesktop.org
Wed May 9 01:24:21 PDT 2012
sw/CppunitTest_sw_subsequent_rtftok.mk | 1 +
sw/qa/extras/rtftok/data/n757651.rtf | 18 ++++++++++++++++++
sw/qa/extras/rtftok/rtftok.cxx | 12 ++++++++++++
3 files changed, 31 insertions(+)
New commits:
commit 4f01261a04b702819aba9966177abe601761103b
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed May 9 10:21:30 2012 +0200
n#757651 testcase
Change-Id: Id0d24939632c98937f6fba26b756f139380191b0
diff --git a/sw/CppunitTest_sw_subsequent_rtftok.mk b/sw/CppunitTest_sw_subsequent_rtftok.mk
index f8b2439..1c9da96 100644
--- a/sw/CppunitTest_sw_subsequent_rtftok.mk
+++ b/sw/CppunitTest_sw_subsequent_rtftok.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_subsequent_rtftok, \
test \
unotest \
vcl \
+ tl \
$(gb_STDLIBS) \
))
diff --git a/sw/qa/extras/rtftok/data/n757651.rtf b/sw/qa/extras/rtftok/data/n757651.rtf
new file mode 100644
index 0000000..dfd49a8
--- /dev/null
+++ b/sw/qa/extras/rtftok/data/n757651.rtf
@@ -0,0 +1,18 @@
+{\rtf1\ansi\deff3\adeflang1025
+{\fonttbl
+{\f0\froman\fprq2\fcharset0 Times New Roman;}
+}
+\sectd\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1260\margbsxn432
+\pard\plain\f0\fs24\sl480\slmult1
+________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________\par
+\pard\plain\f0\fs24\sl480\slmult1
+________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________\par
+\pard\plain\f0\fs24\sl480\slmult1
+________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________\par
+\pard\plain\f0\fs24\sl480\slmult1
+________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________\par
+\pard\plain\f0\fs24\sl480\slmult1
+________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________\par
+\pard\plain\f0\fs24\sl480\slmult1
+________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________\par
+}
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index 1f340b5..605a20d 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -52,6 +52,7 @@
#include <unotest/macros_test.hxx>
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/fontmanager.hxx>
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
@@ -93,6 +94,7 @@ public:
void testFdo48037();
void testFdo47764();
void testFdo38786();
+ void testN757651();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -124,6 +126,7 @@ public:
CPPUNIT_TEST(testFdo48037);
CPPUNIT_TEST(testFdo47764);
CPPUNIT_TEST(testFdo38786);
+ CPPUNIT_TEST(testN757651);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -689,6 +692,15 @@ void Test::testFdo38786()
xFields->nextElement();
}
+void Test::testN757651()
+{
+ load("n757651.rtf");
+
+ // The bug was that due to buggy layout the text expanded to two pages.
+ if (Application::GetDefaultDevice()->IsFontAvailable(OUString("Times New Roman")))
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list