[Libreoffice-commits] core.git: sw/CppunitTest_sw_core_layout.mk sw/qa
Daniel Arato (NISZ) (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 29 18:03:40 UTC 2020
sw/CppunitTest_sw_core_layout.mk | 1 +
sw/qa/core/layout/layout.cxx | 10 ++++++----
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 6 ------
3 files changed, 7 insertions(+), 10 deletions(-)
New commits:
commit 3e2290c55c23c0785763f8de51eba749ab622900
Author: Daniel Arato (NISZ) <arato.daniel at nisz.hu>
AuthorDate: Thu Oct 29 13:41:06 2020 +0100
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Thu Oct 29 19:02:59 2020 +0100
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 at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
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")
More information about the Libreoffice-commits
mailing list