sc/source/ui/view/output3.cxx | 15 +++++++++++++++ sc/source/ui/view/viewfun2.cxx | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-)
New commits: commit af1f7d66861e81717881f632ac9860e719b62e5f Author: Caolán McNamara <[email protected]> AuthorDate: Mon Aug 26 16:44:23 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Aug 26 20:46:12 2024 +0200 cid#1554754 COPY_INSTEAD_OF_MOVE Change-Id: I6e34552074ba76f67a93686c70e26c68a884f794 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172429 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 09ba678edd6f..7e944557856f 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1283,7 +1283,8 @@ void ScViewFunc::MergeCells( bool bApi, bool bDoContents, bool bCenter, SfxViewShell* pViewShell = GetViewData().GetViewShell(); - weld::DialogController::runAsync(pBox, [=](sal_Int32 nRetVal) { + weld::DialogController::runAsync(pBox, [pBox, bDoContents, bEmptyMergedCells, pViewShell, + nSlot, bApi, doMerge=std::move(doMerge)](sal_Int32 nRetVal) { if (nRetVal == RET_OK) { bool bRealDoContents = bDoContents; commit 328b4c40784cb5e28535d73f0e1220b3f47f0b2e Author: Caolán McNamara <[email protected]> AuthorDate: Mon Aug 26 15:51:12 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Aug 26 20:45:58 2024 +0200 text drawing boxes don't redraw with a new text autocolor choice when light/dark mode themes are toggled on off in calc. This works fine in writer though, so follow the same pattern as SwViewShellImp::PaintLayer and set a default background color on the Outliner when we draw. So SdrTextPrimitive2D::get2DDecomposition will see that the outliner should have a new background, and drops its cache, even if setSuitableOutlinerBg has no reason to set anything explicit. Change-Id: I19ca407853238e6533085c6aa617206ee122d3a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172425 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index 0015dde55783..1f5311c720de 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -182,6 +182,18 @@ void ScOutputData::DrawSelectiveObjects(SdrLayerID nLayer) rOutl.EnableAutoColor( mbUseStyleColor ); rOutl.SetDefaultHorizontalTextDirection( mpDoc->GetEditTextDirection( nTab ) ); + Color aOldOutlinerBackgroundColor = rOutl.GetBackgroundColor(); + const ScTabViewShell* pTabViewShellBg = mbUseStyleColor ? ScTabViewShell::GetActiveViewShell() : nullptr; + if (pTabViewShellBg) + { + // Similar to writer's SwViewShellImp::PaintLayer set the default + // background of the Outliner for the AutoColor cases where there is no + // explicit background known. But like elsewhere in calc, take + // mbUseStyleColor of false as ScAutoFontColorMode::Print for print + // output, so don't set a default outliner background then. + const ScViewRenderingOptions& rViewRenderingOptions = pTabViewShellBg->GetViewRenderingData(); + rOutl.SetBackgroundColor(rViewRenderingOptions.GetDocColor()); + } // #i69767# The hyphenator must be set (used to be before drawing a text shape with hyphenation). // LinguMgr::GetHyphenator (EditEngine) uses a wrapper now that creates the real hyphenator on demand, @@ -267,6 +279,9 @@ void ScOutputData::DrawSelectiveObjects(SdrLayerID nLayer) } } + if (pTabViewShellBg) + rOutl.SetBackgroundColor(aOldOutlinerBackgroundColor); + mpDev->SetDrawMode(nOldDrawMode); }
