diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-07-17 15:32:03 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-22 09:56:51 +0000 |
commit | fe5e35009f23b025ac58fcb5abc892a90c6a264c (patch) | |
tree | f9664bb2b3ad12bd5353f9261a211d2f5cb7266c /sw | |
parent | 3926e686b06ca78f7ca5cf5fbda924bc92e5b92c (diff) |
fdo#65632 RTF import: send NS_ooxml::LN_trackchange only once for one range
The problem was that in case we had
{\deleted foo\b bar}
then both "foo" and "bar" triggered a trackchange, but "}" only ended
one, resulting in overlapping redline ranges. This was cought by core,
but caused a performance problem.
For the first bugdoc, before:
real 3m57.803s
after:
real 0m3.072s
(cherry picked from commits 7c0a1557406ffffbb8145f8035ce86d31e927667,
ed187fcbd457d01be6ac382d61b493039a5af7d5 and
54518a209d0ffe00f8e391472da92e398c474392 and
9f7676033585ab3bf352d5dc2ef43a3a9d8d5c46)
Conflicts:
writerfilter/source/rtftok/rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.hxx
Change-Id: Ibf6f2db30109f0b9a2571d2e4fb3cc76294f68d1
Reviewed-on: https://gerrit.libreoffice.org/4964
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/fdo65632.docx | bin | 0 -> 12862 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo65632.docx b/sw/qa/extras/ooxmlimport/data/fdo65632.docx Binary files differnew file mode 100755 index 000000000000..8c336c20fdfc --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo65632.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 26ecdf393a11..1db782971ce1 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -124,6 +124,7 @@ public: void testN820504(); void testFdo43641(); void testFdo46361(); + void testFdo65632(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -213,6 +214,7 @@ void Test::run() {"n820504.docx", &Test::testN820504}, {"fdo43641.docx", &Test::testFdo43641}, {"fdo46361.docx", &Test::testFdo46361}, + {"fdo65632.docx", &Test::testFdo65632}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1511,6 +1513,17 @@ void Test::testFdo46361() CPPUNIT_ASSERT_EQUAL(OUString("text\ntext\n"), uno::Reference<text::XTextRange>(xGroupShape->getByIndex(2), uno::UNO_QUERY)->getString()); } +void Test::testFdo65632() +{ + // The problem was that the footnote text had fake redline: only the body + // text has redline in fact. + uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xFootnotes(xFootnotesSupplier->getFootnotes(), uno::UNO_QUERY); + uno::Reference<text::XText> xText(xFootnotes->getByIndex(0), uno::UNO_QUERY); + //uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty<OUString>(getRun(getParagraphOfText(1, xText), 1), "TextPortionType")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |