diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-13 20:30:02 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-02-14 09:57:32 +0000 |
commit | e21416088d73fb805a0bfdbdbeee7e4081d2c300 (patch) | |
tree | 70fc3e32e17954478604635d4644f40c56f62abc /svx | |
parent | ae24dd7bf521c960b7d03a19f9e64396ceaafdcc (diff) |
tdf#153332 reset background to default if new preview has no bg
but the old did
Change-Id: I59ebd4d5974c5d67c4ac572b091febed879fc290
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146923
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/fntctrl.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 255d8ab8d9d9..031eb7dabc91 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -987,6 +987,7 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack if( !bPreviewBackgroundToCharacter ) { + bool bBackColorFound = false; if( GetWhich( rSet, SID_ATTR_BRUSH, nWhich ) ) { const SvxBrushItem& rBrush = static_cast<const SvxBrushItem&>( rSet.Get( nWhich ) ); @@ -994,9 +995,14 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack { const Color& rBrushColor = rBrush.GetColor(); if (rBrushColor != COL_TRANSPARENT) + { pImpl->mxBackColor = rBrush.GetColor(); + bBackColorFound = true; + } } } + if (!bBackColorFound) + pImpl->mxBackColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; } // Font |