From fac47ae957e893ea050e38bca3f5a25d83798bfd Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Sat, 14 Sep 2019 13:22:45 +0200 Subject: lok: send an invalidation by document size change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was sent by the kit code earlier. Now we move it to the LO core code, so we can optimize it later. co-author: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/79491 Reviewed-by: Tamás Zolnai Tested-by: Tamás Zolnai (cherry picked from commit cd7ff1797d754018db1d47888781c9d7ecb24dcf) Change-Id: Id0a8991016dbe8d13891071e2d5b4c9250720da9 Reviewed-on: https://gerrit.libreoffice.org/79617 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai --- sd/qa/unit/tiledrendering/tiledrendering.cxx | 2 +- sd/source/core/drawdoc2.cxx | 8 ++++++-- sd/source/ui/sidebar/SlideBackground.cxx | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'sd') diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 0f2cf7bb309b..d9797587ae21 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -255,7 +255,7 @@ static std::vector lcl_convertSeparated(const OUString& rString, sal_U static void lcl_convertRectangle(const OUString& rString, ::tools::Rectangle& rRectangle) { uno::Sequence aSeq = comphelper::string::convertCommaSeparated(rString); - CPPUNIT_ASSERT_EQUAL(static_cast(4), aSeq.getLength()); + CPPUNIT_ASSERT(aSeq.getLength() == 4 || aSeq.getLength() == 5); rRectangle.setX(aSeq[0].toInt32()); rRectangle.setY(aSeq[1].toInt32()); rRectangle.setWidth(aSeq[2].toInt32()); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 91613f50c961..e4053d5afff4 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -61,6 +61,8 @@ #include #include #include +#include +#include #include #include @@ -414,7 +416,8 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos) SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) { - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); + SdXImpressDocument* pModel = SdXImpressDocument::getImplementation(this->getUnoModel()); + SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pModel); pViewShell = SfxViewShell::GetNext(*pViewShell); } } @@ -447,7 +450,8 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum) SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) { - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); + SdXImpressDocument* pModel = SdXImpressDocument::getImplementation(this->getUnoModel()); + SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pModel); pViewShell = SfxViewShell::GetNext(*pViewShell); } } diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index efa6defc1495..fb4d58008cbb 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -74,6 +74,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; @@ -1026,7 +1028,8 @@ IMPL_LINK_NOARG(SlideBackground, PaperSizeModifyHdl, ListBox&, void) SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) { - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); + SdXImpressDocument* pModel = SdXImpressDocument::getImplementation(pViewShell->GetCurrentDocument()); + SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pModel); pViewShell = SfxViewShell::GetNext(*pViewShell); } } -- cgit v1.2.3