Kaydet (Commit) 86cdda67 authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#115875: treat Western/Asian/CTL font groups consistently

... for both Paragraph and Character Styles.

Change-Id: Iab2cf6ef0fc29ba7e7afe2b52adf8cc9836ea608
Reviewed-on: https://gerrit.libreoffice.org/50036Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 32a5ea9d
......@@ -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")
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment