diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2019-02-25 08:35:54 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-02-28 13:37:24 +0100 |
commit | 691ca4e1a3e510d54894a1e7df7fa4ad9f9cba11 (patch) | |
tree | c4cc264130e606d33fd20be1fba24e445bb4c305 /sw/qa | |
parent | e76203f45a4c645447f8379ee2123f518a8aca77 (diff) |
tdf#121440 writerfilter: do not use imported style for foot/endnotes
Extra style is causing editing problem near footnote/endnote
references. This behavior is a side effect of
eaa9cf6a3069fba3d82c046f0041bfb537d9e648, allowing emission
of these "technical" styles.
Change-Id: I1885b92814746e7b5cd19f3ddd7bc22eb691615e
Reviewed-on: https://gerrit.libreoffice.org/68304
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf121440.docx | bin | 0 -> 23209 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf121440.docx b/sw/qa/extras/ooxmlimport/data/tdf121440.docx Binary files differnew file mode 100644 index 000000000000..023599aec3ff --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf121440.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index e29432694e9a..7a03744d46f2 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -17,6 +17,7 @@ #endif #include <swmodeltestbase.hxx> +#include <wrtsh.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp> #include <com/sun/star/embed/Aspects.hpp> @@ -306,6 +307,22 @@ DECLARE_OOXMLIMPORT_TEST(testTdf122224, "tdf122224.docx") CPPUNIT_ASSERT_EQUAL(OUString("2000"), xCell->getString()); } +DECLARE_OOXMLIMPORT_TEST(testTdf121440, "tdf121440.docx") +{ + // Insert some text in front of footnote + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); + SwRootFrame* pLayout(pWrtShell->GetLayout()); + CPPUNIT_ASSERT(!pLayout->IsHideRedlines()); + pWrtShell->Insert("test"); + + // Ensure that inserted text is not superscripted + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "Inserted text should be not a superscript!", static_cast<sal_Int32>(0), + getProperty<sal_Int32>(getRun(getParagraph(1), 1), "CharEscapement")); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT CPPUNIT_PLUGIN_IMPLEMENT(); |