diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-21 15:53:13 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-26 11:16:53 +0200 |
commit | 8aea4386148d65f204f1f4932997d82f99f714fa (patch) | |
tree | 35bc6c35d42fdc460a45f6605faf84aac27aacee | |
parent | 0a98fb761f23cdf268fea9c8fca3fe8c14aa0cfe (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/+/114418
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 40868f520f9da24d3eaa5e0489da8657bc8383b4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114425
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
-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 1b2eb421aad3..26e44a29939a 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 ); |