diff options
author | Daniel Arato (NISZ) <arato.daniel@nisz.hu> | 2020-10-29 13:41:06 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-10-29 19:02:59 +0100 |
commit | 3e2290c55c23c0785763f8de51eba749ab622900 (patch) | |
tree | dad8929a924c385bba1b810603cd4e6383d84994 | |
parent | a096575b8a26e80f7da13ca559bcbe33564c2498 (diff) |
tdf#135198 fix unit test for HiDPI: pick object by index
Clean-up commit c9eb53f200225f2ee6ca695e1326843a487aee51
(tdf#135198 sw editing: text box fell out of its shape).
Also removed a few unnecessary lines that have been commented out.
Change-Id: I6ec8535f98ed6e7743b34c9e31b0c76c0cddf301
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105006
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r-- | sw/CppunitTest_sw_core_layout.mk | 1 | ||||
-rw-r--r-- | sw/qa/core/layout/layout.cxx | 10 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 6 |
3 files changed, 7 insertions, 10 deletions
diff --git a/sw/CppunitTest_sw_core_layout.mk b/sw/CppunitTest_sw_core_layout.mk index 06f35d4bdc04..2cae001add53 100644 --- a/sw/CppunitTest_sw_core_layout.mk +++ b/sw/CppunitTest_sw_core_layout.mk @@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_layout, \ svt \ tl \ svl \ + svxcore \ )) $(eval $(call gb_CppunitTest_use_externals,sw_core_layout,\ diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx index 7c6ae7df3894..a992a32ae7d4 100644 --- a/sw/qa/core/layout/layout.cxx +++ b/sw/qa/core/layout/layout.cxx @@ -16,9 +16,11 @@ #include <unotxdoc.hxx> #include <flyfrm.hxx> #include <fmtornt.hxx> -//#include <frameformats.hxx> #include <frmtool.hxx> #include <textboxhelper.hxx> +#include <drawdoc.hxx> +#include <IDocumentDrawModelAccess.hxx> +#include <svx/svdpage.hxx> char const DATA_DIRECTORY[] = "/sw/qa/core/layout/data/"; @@ -173,9 +175,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxStaysInsideShape) // tdf#135198: check whether text box stays inside shape after moving it upwards load(DATA_DIRECTORY, "shape-textbox.odt"); SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); - SwDocShell* pDocShell = pTextDoc->GetDocShell(); - SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); - SdrObject* pTextBoxObj = pWrtShell->GetObjAt({ 8000, 3000 }); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); + SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); + SdrObject* pTextBoxObj = pPage->GetObj(0); xmlDocUniquePtr pLayoutBefore = parseLayoutDump(); CPPUNIT_ASSERT(pLayoutBefore); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index dbfd1fa78ead..453b1718d5bf 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -660,12 +660,6 @@ DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx") uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY); // This was 10954. CPPUNIT_ASSERT_EQUAL(sal_Int32(6008), getProperty<sal_Int32>(xEmbeddedObjects->getByIndex(0), "Width")); - - // The following assert no longer applies due to tdf#135198 - - // Layout modified the document when it had this chart. - //uno::Reference<util::XModifiable> xModifiable(mxComponent, uno::UNO_QUERY); - //CPPUNIT_ASSERT_EQUAL(false, bool(xModifiable->isModified())); } DECLARE_OOXMLEXPORT_TEST(testInlineGroupshape, "inline-groupshape.docx") |