sw/inc/strings.hrc | 1 + sw/source/uibase/app/docstyle.cxx | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-)
New commits: commit 86cdda67e4ec6fd6893a1d05d88eafa0ad838e2f Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Tue Feb 20 15:03:38 2018 +0300 tdf#115875: treat Western/Asian/CTL font groups consistently ... for both Paragraph and Character Styles. Change-Id: Iab2cf6ef0fc29ba7e7afe2b52adf8cc9836ea608 Reviewed-on: https://gerrit.libreoffice.org/50036 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 427835045393..b00b04bfdfcb 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -273,6 +273,7 @@ #define STR_PAGEBREAK NC_("STR_PAGEBREAK", "Break before new page") #define STR_WESTERN_FONT NC_("STR_WESTERN_FONT", "Western text: ") #define STR_CJK_FONT NC_("STR_CJK_FONT", "Asian text: ") +#define STR_CTL_FONT NC_("STR_CTL_FONT", "CTL text: ") #define STR_REDLINE_UNKNOWN_AUTHOR NC_("STR_REDLINE_UNKNOWN_AUTHOR", "Unknown Author") #define STR_DELETE_NOTE_AUTHOR NC_("STR_DELETE_NOTE_AUTHOR", "Delete ~All Comments by $1") #define STR_HIDE_NOTE_AUTHOR NC_("STR_HIDE_NOTE_AUTHOR", "H~ide All Comments by $1") diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index dbb7f0316241..51bfb6295460 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -56,6 +56,7 @@ #include <paratr.hxx> #include <SwStyleNameMapper.hxx> #include <svl/cjkoptions.hxx> +#include <svl/ctloptions.hxx> #include <comphelper/processfactory.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/intlwrapper.hxx> @@ -859,7 +860,7 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) return aDesc; } - if ( SfxStyleFamily::Frame == nFamily || SfxStyleFamily::Para == nFamily) + if ( SfxStyleFamily::Frame == nFamily || SfxStyleFamily::Para == nFamily || SfxStyleFamily::Char == nFamily ) { if( !pSet ) GetItemSet(); @@ -871,7 +872,9 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) OUString sBreak; bool bHasWesternFontPrefix = false; bool bHasCJKFontPrefix = false; + bool bHasCTLFontPrefix = false; SvtCJKOptions aCJKOptions; + SvtCTLOptions aCTLOptions; // Get currently used FillStyle and remember, also need the XFillFloatTransparenceItem // to decide if gradient transparence is used @@ -886,12 +889,6 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) { case SID_ATTR_AUTO_STYLE_UPDATE: case RES_PAGEDESC: - //CTL not yet supported - case RES_CHRATR_CTL_FONT: - case RES_CHRATR_CTL_FONTSIZE: - case RES_CHRATR_CTL_LANGUAGE: - case RES_CHRATR_CTL_POSTURE: - case RES_CHRATR_CTL_WEIGHT: break; default: { @@ -962,6 +959,19 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) bHasCJKFontPrefix = true; } break; + case RES_CHRATR_CTL_FONT: + case RES_CHRATR_CTL_FONTSIZE: + case RES_CHRATR_CTL_LANGUAGE: + case RES_CHRATR_CTL_POSTURE: + case RES_CHRATR_CTL_WEIGHT: + if(aCTLOptions.IsCTLFontEnabled()) + bIsDefault = true; + if(!bHasCTLFontPrefix) + { + aItemPresentation = SwResId(STR_CTL_FONT) + aItemPresentation; + bHasCTLFontPrefix = true; + } + break; case RES_CHRATR_FONT: case RES_CHRATR_FONTSIZE: case RES_CHRATR_LANGUAGE: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits