diff options
author | Paris Oplopoios <paris.oplopoios@collabora.com> | 2023-06-13 20:36:48 +0300 |
---|---|---|
committer | Paris Oplopoios <parisoplop@gmail.com> | 2023-06-14 22:12:21 +0200 |
commit | 069c7dc4e9706b40ca12d83d83f90f41cec948f8 (patch) | |
tree | 5ce16648328e3093c3e73e5e8761383eb12500a0 /sd/source/ui/view/ViewShellBase.cxx | |
parent | f3f64c77585d0c3c01c0d960f4959e18e9668c30 (diff) |
Add editengine view separation in tiled rendering
Editengine now gets the background color from the current view instead
from a global variable
Change-Id: I98a0fccf4d0c83f4dabf8e534a9228b8a5e271d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152996
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
(cherry picked from commit 7baa475342b67c10537e11da37b8862648679b02)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153073
Tested-by: Jenkins
Diffstat (limited to 'sd/source/ui/view/ViewShellBase.cxx')
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 9099988969d8..55ade0226213 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -73,6 +73,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <editeng/editview.hxx> #include <tools/svborder.hxx> +#include <o3tl/unreachable.hxx> #include <fubullet.hxx> #include <drawview.hxx> @@ -1057,6 +1058,32 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const } } +::Color ViewShellBase::GetColorConfigColor(svtools::ColorConfigEntry nColorType) const +{ + if (DrawViewShell* pCurrentDrawShell = dynamic_cast<DrawViewShell*>(GetMainViewShell().get())) + { + const SdViewOptions& rViewOptions = pCurrentDrawShell->GetViewOptions(); + switch (nColorType) + { + case svtools::ColorConfigEntry::DOCCOLOR: + { + return rViewOptions.mnDocBackgroundColor; + } + // Should never be called for an unimplemented color type + default: + { + O3TL_UNREACHABLE; + } + } + } + else + { + SAL_WARN("sd", "dynamic_cast to DrawViewShell failed"); + } + + return {}; +} + //===== ViewShellBase::Implementation ========================================= ViewShellBase::Implementation::Implementation (ViewShellBase& rBase) |