sc/source/ui/unoobj/docuno.cxx | 4 +++- sd/source/ui/unoidl/unomodel.cxx | 2 ++ sw/source/uibase/uno/unotxdoc.cxx | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit 71d98f04b94a34e8174942d594d2bbaa4f2c8455 Author: Skyler Grey <skyler.g...@collabora.com> AuthorDate: Thu Jul 25 12:34:34 2024 +0000 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Aug 9 13:34:22 2024 +0200 fix(invert): Use separate view IDs when inverted Previously in Online the document background inversion was tied together such that if someone inverted the background, everyone in dark theme would end up with an inverted background. By adding whether the document background is dark to the view render state, we can create a new view when the background is inverted, and avoid everyone getting an inverted view. Change-Id: I0aed702185e642f631854b1f8234355c9e69ff6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171664 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 24f9a5270361..15a8c4bfd223 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -506,13 +506,15 @@ void ScModelObj::RepaintRange( const ScRangeList& rRange ) static OString getTabViewRenderState(ScTabViewShell& rTabViewShell) { OStringBuffer aState; + const ScViewRenderingOptions& rViewRenderingOptions = rTabViewShell.GetViewRenderingData(); if (rTabViewShell.IsAutoSpell()) aState.append('S'); + if (rViewRenderingOptions.GetDocColor() == svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1)) + aState.append('D'); aState.append(';'); - const ScViewRenderingOptions& rViewRenderingOptions = rTabViewShell.GetViewRenderingData(); OString aThemeName = OUStringToOString(rViewRenderingOptions.GetColorSchemeName(), RTL_TEXTENCODING_UTF8); aState.append(aThemeName); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index b05fc83a676d..f8f9359d7988 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2492,6 +2492,8 @@ OString SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell) const SdViewOptions& pVOpt = pView->GetViewOptions(); if (mpDoc->GetOnlineSpell()) aState.append('S'); + if (pVOpt.mnDocBackgroundColor == svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1)) + aState.append('D'); aState.append(';'); OString aThemeName = OUStringToOString(pVOpt.msColorSchemeName, RTL_TEXTENCODING_UTF8); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 23d4d3974c79..f45ba9f073a2 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3545,6 +3545,9 @@ OString SwXTextDocument::getViewRenderState(SfxViewShell* pViewShell) aState.append('P'); if (pVOpt->IsOnlineSpell()) aState.append('S'); + if (pVOpt->GetDocColor() == svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1)) + aState.append('D'); + aState.append(';'); OString aThemeName = OUStringToOString(pVOpt->GetThemeName(), RTL_TEXTENCODING_UTF8);