diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-14 13:22:45 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-26 19:43:54 +0200 |
commit | fac47ae957e893ea050e38bca3f5a25d83798bfd (patch) | |
tree | f76ef1b4c15baedc71c0d9ebad84601dc93179cb /sd | |
parent | 30a10a422003f87d761351606fd2158703b073f3 (diff) |
lok: send an invalidation by document size change
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 <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/79491
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit cd7ff1797d754018db1d47888781c9d7ecb24dcf)
Change-Id: Id0a8991016dbe8d13891071e2d5b4c9250720da9
Reviewed-on: https://gerrit.libreoffice.org/79617
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc2.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.cxx | 5 |
3 files changed, 11 insertions, 4 deletions
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<OUString> lcl_convertSeparated(const OUString& rString, sal_U static void lcl_convertRectangle(const OUString& rString, ::tools::Rectangle& rRectangle) { uno::Sequence<OUString> aSeq = comphelper::string::convertCommaSeparated(rString); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(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 <imapinfo.hxx> #include <cusshow.hxx> #include <undo/undomanager.hxx> +#include <sfx2/lokhelper.hxx> +#include <unomodel.hxx> #include <DrawDocShell.hxx> #include <FrameView.hxx> @@ -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 <svl/itemset.hxx> #include <comphelper/lok.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> +#include <unomodel.hxx> +#include <sfx2/lokhelper.hxx> 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); } } |