[Libreoffice-commits] core.git: sw/CppunitTest_sw_ooxmlimport2.mk sw/qa writerfilter/source
sw/CppunitTest_sw_ooxmlimport2.mk |1 + sw/qa/extras/ooxmlimport/data/tdf121440.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 17 + writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 ++ 4 files changed, 24 insertions(+) New commits: commit 691ca4e1a3e510d54894a1e7df7fa4ad9f9cba11 Author: Vasily Melenchuk AuthorDate: Mon Feb 25 08:35:54 2019 +0300 Commit: Thorsten Behrens CommitDate: Thu Feb 28 13:37:24 2019 +0100 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 diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk b/sw/CppunitTest_sw_ooxmlimport2.mk index c269c7282028..1760b61e98b3 100644 --- a/sw/CppunitTest_sw_ooxmlimport2.mk +++ b/sw/CppunitTest_sw_ooxmlimport2.mk @@ -39,6 +39,7 @@ $(eval $(call gb_CppunitTest_use_externals,sw_ooxmlimport2,\ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlimport2,\ -I$(SRCDIR)/sw/inc \ -I$(SRCDIR)/sw/source/core/inc \ +-I$(SRCDIR)/sw/source/uibase/inc \ -I$(SRCDIR)/sw/qa/extras/inc \ $$(INCLUDE) \ )) diff --git a/sw/qa/extras/ooxmlimport/data/tdf121440.docx b/sw/qa/extras/ooxmlimport/data/tdf121440.docx new file mode 100644 index ..023599aec3ff Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf121440.docx differ 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 +#include #include #include #include @@ -306,6 +307,22 @@ DECLARE_OOXMLIMPORT_TEST(testTdf14, "tdf14.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(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(0), +getProperty(getRun(getParagraph(1), 1), "CharEscapement")); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 2a1be9d95cfc..cc8f1c555621 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2015,6 +2015,12 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote ) m_aRedlines.push(std::vector< RedlineParamsPtr >()); PropertyMapPtr pTopContext = GetTopContext(); + +// Remove style reference, if any. This reference did appear here as a side effect of tdf#43017 +// Seems it is not required by LO, but causes side effects during editing. So remove it +// for footnotes/endnotes to restore original LO behavior here. +pTopContext->Erase(PROP_CHAR_STYLE_NAME); + uno::Reference< text::XText > xFootnoteText; if (GetTextFactory().is()) xFootnoteText.set( GetTextFactory()->createInstance( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/CppunitTest_sw_ooxmlimport2.mk
sw/CppunitTest_sw_ooxmlimport2.mk |4 1 file changed, 4 insertions(+) New commits: commit 9c4a7dfe9e2a51aeec047feba7b4ac1d79c8586a Author: Stephan Bergmann AuthorDate: Mon Nov 12 19:24:16 2018 +0100 Commit: Stephan Bergmann CommitDate: Mon Nov 12 20:57:46 2018 +0100 Missing test dependency Change-Id: I8ce7fab21cf2e6c47c955201eee87e8890b3a47a Reviewed-on: https://gerrit.libreoffice.org/63300 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk b/sw/CppunitTest_sw_ooxmlimport2.mk index 1d41899668af..c269c7282028 100644 --- a/sw/CppunitTest_sw_ooxmlimport2.mk +++ b/sw/CppunitTest_sw_ooxmlimport2.mk @@ -108,4 +108,8 @@ $(eval $(call gb_CppunitTest_use_components,sw_ooxmlimport2,\ $(eval $(call gb_CppunitTest_use_configuration,sw_ooxmlimport2)) +# At least testTdf115094::Import (sw/qa/extras/ooxmlimport/ooxmlimport2.cxx) depends on TIFFReader +# from Library_gie, which is loaded dynamically in vcl/source/filter/graphicfilter.cxx: +$(call gb_CppunitTest_get_target,sw_ooxmlimport2): $(call gb_Library_get_target,gie) + # vim: set noet sw=4 ts=4: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/CppunitTest_sw_ooxmlimport2.mk sw/Module_sw.mk sw/qa
sw/CppunitTest_sw_ooxmlimport2.mk | 107 +++ sw/Module_sw.mk |1 sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 160 --- sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 201 ++ 4 files changed, 309 insertions(+), 160 deletions(-) New commits: commit 266e3fa59a83b17f93765bf517f6db7ee324bdee Author: Mark HungDate: Thu May 3 07:36:38 2018 +0800 sw: move tests in ooxmlimport to ooxmlimport2. To avoid using -bigobj on Windows. Change-Id: I3115fc01a0802c4b40219bb6f7ea934df81706ed Reviewed-on: https://gerrit.libreoffice.org/53769 Tested-by: Jenkins Reviewed-by: Mark Hung diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk b/sw/CppunitTest_sw_ooxmlimport2.mk new file mode 100644 index ..d170cb822b2e --- /dev/null +++ b/sw/CppunitTest_sw_ooxmlimport2.mk @@ -0,0 +1,107 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#* + +$(eval $(call gb_CppunitTest_CppunitTest,sw_ooxmlimport2)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sw_ooxmlimport2, \ +sw/qa/extras/ooxmlimport/ooxmlimport2 \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport2, \ +basegfx \ +comphelper \ +cppu \ +cppuhelper \ +sal \ +sfx \ +test \ +unotest \ +utl \ +sw \ +tl \ +vcl \ +svxcore \ +)) + +$(eval $(call gb_CppunitTest_use_externals,sw_ooxmlimport2,\ + boost_headers \ +libxml2 \ +)) + +$(eval $(call gb_CppunitTest_set_include,sw_ooxmlimport2,\ +-I$(SRCDIR)/sw/inc \ +-I$(SRCDIR)/sw/source/core/inc \ +-I$(SRCDIR)/sw/qa/extras/inc \ +$$(INCLUDE) \ +)) + +ifeq ($(OS),MACOSX) + +$(eval $(call gb_CppunitTest_add_cxxflags,sw_ooxmlimport2,\ +$(gb_OBJCXXFLAGS) \ +)) + +$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlimport2,\ + AppKit \ +)) + +endif + +$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlimport2)) + +$(eval $(call gb_CppunitTest_use_ure,sw_ooxmlimport2)) +$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlimport2)) + +$(eval $(call gb_CppunitTest_use_components,sw_ooxmlimport2,\ + basic/util/sb \ +chart2/source/controller/chartcontroller \ +chart2/source/chartcore \ + canvas/source/factory/canvasfactory \ +comphelper/util/comphelp \ +configmgr/source/configmgr \ +drawinglayer/drawinglayer \ +embeddedobj/util/embobj \ +emfio/emfio \ +filter/source/config/cache/filterconfig1 \ +forms/util/frm \ +framework/util/fwk \ +i18npool/util/i18npool \ +linguistic/source/lng \ +oox/util/oox \ +package/source/xstor/xstor \ +package/util/package2 \ +sax/source/expatwrap/expwrap \ +sw/util/sw \ +sw/util/swd \ +sw/util/msword \ +sfx2/util/sfx \ +sot/util/sot \ +starmath/util/sm \ +svl/source/fsstor/fsstorage \ +svl/util/svl \ +svtools/util/svt \ +svx/util/svx \ +svx/util/svxcore \ +toolkit/util/tk \ +ucb/source/core/ucb1 \ +ucb/source/ucp/file/ucpfile1 \ +unotools/util/utl \ +unoxml/source/service/unoxml \ +unoxml/source/rdf/unordf \ +uui/util/uui \ +vcl/vcl.common \ +writerfilter/util/writerfilter \ +xmloff/util/xo \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,sw_ooxmlimport2)) + +# vim: set noet sw=4 ts=4: diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index 01a67af503a9..87367d05de5c 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -77,6 +77,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_ooxmlw14export \ CppunitTest_sw_ooxmlencryption \ CppunitTest_sw_ooxmlimport \ +CppunitTest_sw_ooxmlimport2 \ CppunitTest_sw_ww8export \ CppunitTest_sw_ww8export2 \ CppunitTest_sw_ww8import \ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 7b60b191df67..4743cbc8afed 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1440,166 +1440,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108995, "xml_space.docx") paragraph->getString()); } -DECLARE_OOXMLIMPORT_TEST(testTdf108545_embeddedDocxIcon, "tdf108545_embeddedDocxIcon.docx") -{ -uno::Reference xSupplier(getShape(1), uno::UNO_QUERY); -CPPUNIT_ASSERT_EQUAL(embed::Aspects::MSOLE_ICON, xSupplier->getAspect()); -} - - -DECLARE_OOXMLIMPORT_TEST(testTdf109053, "tdf109053.docx") -{ -// Table was imported into a text