summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-02-05 09:41:05 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-02-09 00:02:19 +0100
commit49f63872d7149778efdd1add6f9eb0b7ca254089 (patch)
tree504d59c70d2e235f4dbb2e50c2a456de3999df77
parenttdf#43848 fix selection in table with split/merged cells (diff)
downloadcore-49f63872d7149778efdd1add6f9eb0b7ca254089.tar.gz
core-49f63872d7149778efdd1add6f9eb0b7ca254089.zip
tdf#159560 paragraph break should be shown as pilcrow sign
When non-printing characters are switched on at the end of the paragraph a pilcrow sign is shown. This is displayed using the font at the end of the character. If a symbol font is used that would result in a random symbol instead of the pilcrow sign (0x00b6). This is fixed here. Change-Id: I0d4ae9f439d2e34ca774d4e2cb188e94290808a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162983 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> (cherry picked from commit 297b47a7e0c191be22f90ab799b4b8bb8bdbaf59) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163142 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--sw/source/core/text/porrst.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 029adca75336..a4a0d3c713d3 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -22,6 +22,7 @@
#include <editeng/escapementitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/pgrditem.hxx>
+#include <editeng/fontitem.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/scopeguard.hxx>
@@ -47,6 +48,7 @@
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentDeviceAccess.hxx>
+#include <IDocumentLayoutAccess.hxx>
#include <crsrsh.hxx>
#include <swtypes.hxx>
@@ -74,6 +76,16 @@ void SwTmpEndPortion::Paint( const SwTextPaintInfo &rInf ) const
SwFont aFont(*pOldFnt);
+ const SwDoc& rDoc = rInf.GetTextFrame()->GetDoc();
+ if (aFont.IsSymbol(rDoc.getIDocumentLayoutAccess().GetCurrentViewShell()))
+ {
+ const SvxFontItem& rFontItem = rDoc.GetDefault(RES_CHRATR_FONT);
+ aFont.SetName( rFontItem.GetFamilyName(), SwFontScript::Latin );
+ aFont.SetStyleName( rFontItem.GetStyleName(), SwFontScript::Latin );
+ aFont.SetFamily( rFontItem.GetFamily(), SwFontScript::Latin );
+ aFont.SetPitch( rFontItem.GetPitch(), SwFontScript::Latin );
+ aFont.SetCharSet( rFontItem.GetCharSet(), SwFontScript::Latin );
+ }
// Paint strikeout/underline based on redline color and settings
// (with an extra pilcrow in the background, because there is
// no SetStrikeoutColor(), also SetUnderColor() doesn't work()).