diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-21 15:53:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-21 20:45:33 +0200 |
commit | 41145efffe9d5af358a52b9e114bb01b98b3d7c2 (patch) | |
tree | 12b46858f5bbc86341ff8beeb698e19124c55ba2 | |
parent | 30b36f290aa0b59fd7d2bd41c8bdfca304d859af (diff) |
tdf#141419 restore use any explicitly set background color in previews
regression since...
commit 6f3899b27156591e65f62649a92c727eb6f5dd03
Date: Thu Oct 29 15:03:44 2020 +0100
Resolves tdf#137059 - Use application colors for font preview
but continue to use the doc-color setting when there isn't an explicit
bg setting in the input propertyset
Change-Id: I531b5ddea7700fcd4a731f32d4830b4d0b767d7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114444
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svx/source/dialog/fntctrl.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 12afafcb0939..d2a99a367131 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -1008,6 +1008,16 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack rCJKFont.SetTransparent( bTransparent ); rCTLFont.SetTransparent( bTransparent ); + if( !bPreviewBackgroundToCharacter ) + { + if( GetWhich( rSet, SID_ATTR_BRUSH, nWhich ) ) + { + const SvxBrushItem& rBrush = static_cast<const SvxBrushItem&>( rSet.Get( nWhich ) ); + if( GPOS_NONE == rBrush.GetGraphicPos() ) + pImpl->mxBackColor = rBrush.GetColor(); + } + } + // Font SetPrevFont( rSet, SID_ATTR_CHAR_FONT, rFont ); SetPrevFont( rSet, SID_ATTR_CHAR_CJK_FONT, rCJKFont ); |