diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-06-09 17:11:15 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-06-09 21:21:45 +0200 |
commit | 53dd6aa5f3817d42bf676980f980051c3b7cdb03 (patch) | |
tree | 2c807dc1804d3edb7b47939df2a42782e7d89851 /desktop | |
parent | 62b58e88d897f51a7c4e12b41d14121ab8d3396f (diff) |
scale VCL's scale cache according to the number of Online views
If a document is opened in several Online views, each of them using
a different zoom, then the scale cache is used for the scaling,
and each view is sent updated tiles, so if there are too many
views, the cache is not large enough.
(Collabora T28503)
Change-Id: I3fa719b0515064773fe4584fedbc8aff98e6e213
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116928
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d509643ce4d1..99e90c5e9ad9 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5275,6 +5275,8 @@ static int doc_createViewWithOptions(LibreOfficeKitDocument* pThis, LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis); const int nId = SfxLokHelper::createView(pDocument->mnDocumentId); + vcl::lok::numberOfViewsChanged(SfxLokHelper::getViewsCount(pDocument->mnDocumentId)); + #ifdef IOS (void) pThis; #else @@ -5289,7 +5291,7 @@ static int doc_createView(LibreOfficeKitDocument* pThis) return doc_createViewWithOptions(pThis, nullptr); // No options. } -static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId) +static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* pThis, int nId) { comphelper::ProfileZone aZone("doc_destroyView"); @@ -5299,6 +5301,9 @@ static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis LOKClipboardFactory::releaseClipboardForView(nId); SfxLokHelper::destroyView(nId); + + LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis); + vcl::lok::numberOfViewsChanged(SfxLokHelper::getViewsCount(pDocument->mnDocumentId)); } static void doc_setView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId) |