summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorVojtěch Doležal <dolezvo1@cvut.cz>2023-05-28 03:10:07 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-05-30 11:25:15 +0200
commit8716f10f8a3b59ceb8b7673d6c5948b882830167 (patch)
treea3364dbccb277cc03b309bdf5c585d5691e480cd /sw/source
parentbf8d1290a4de26f06d429148a92cbdb7a63eecf5 (diff)
Fix gray shade for NBSPs
28675af broke field shading for NBSPs, showing it only when non-printing characters are enabled. This commit reverts the behaviour to the original state, where field shade is independent on whether the non-printing characters are enabled. Change-Id: Ica44937a82d6c3742716e9aa934ab87e7f8b5168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152349 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/text/porexp.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index de435df5ae54..8fc8d7b17fc9 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -208,13 +208,14 @@ bool SwBlankPortion::Format( SwTextFormatInfo &rInf )
void SwBlankPortion::Paint( const SwTextPaintInfo &rInf ) const
{
+ // Draw field shade (can be disabled individually)
+ if (!m_bMulti) // No gray background for multiportion brackets
+ rInf.DrawViewOpt(*this, PortionType::Blank);
+
if (m_cChar == CHAR_HARDBLANK)
{
if (rInf.GetOpt().IsBlank())
{
- // Draw background
- rInf.DrawViewOpt(*this, PortionType::Blank);
-
// Draw tilde or degree sign
OUString aMarker = (rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess()
.get(DocumentSettingId::USE_VARIABLE_WIDTH_NBSP)
@@ -243,9 +244,6 @@ void SwBlankPortion::Paint( const SwTextPaintInfo &rInf ) const
}
else
{
- if (!m_bMulti) // No gray background for multiportion brackets
- rInf.DrawViewOpt(*this, PortionType::Blank);
-
SwExpandPortion::Paint(rInf);
}
}