diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-11-30 14:59:02 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-11-30 22:58:58 +0100 |
commit | 71c5b374deb35993d0af3e953ff0cdfc64d76aab (patch) | |
tree | db80d393dd854a84b3d08ed9f3b3c73910cd2179 /include | |
parent | 21c4afa6223dba58f604b4f5613b0a8a4a7d24ee (diff) |
lok: add viewId to window painting, to allow special-casing on render.
View switching should not cause the sidebar UX to re-build at all.
Particularly it should not do this when we switch view just to render
a sidebar.
Change-Id: Iec0427cdc8308fc273d73ea56dd208bfa7036471
Reviewed-on: https://gerrit.libreoffice.org/84120
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 92814f3389de346f3ae32cddb38f079763e68ddf)
Reviewed-on: https://gerrit.libreoffice.org/84129
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 9 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 7 |
2 files changed, 13 insertions, 3 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 78f2b478e861..a486886c15de 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -427,6 +427,15 @@ struct _LibreOfficeKitDocumentClass int* pFontHeight, int pOrientation); + /// Switches view to viewId if viewId >= 0, and paints window + /// @see lok::Document::paintWindowDPI(). + void (*paintWindowForView) (LibreOfficeKitDocument* pThis, unsigned nWindowId, + unsigned char* pBuffer, + const int x, const int y, + const int width, const int height, + const double dpiscale, + int viewId); + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 18a20c7a2e2d..318bf943cca9 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -177,10 +177,11 @@ public: const int y, const int width, const int height, - const double dpiscale = 1.0) + const double dpiscale = 1.0, + const int viewId = -1) { - return mpDoc->pClass->paintWindowDPI(mpDoc, nWindowId, pBuffer, - x, y, width, height, dpiscale); + return mpDoc->pClass->paintWindowForView(mpDoc, nWindowId, pBuffer, x, y, + width, height, dpiscale, viewId); } /** |