summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-02-20 15:03:38 +0300
committerAndras Timar <andras.timar@collabora.com>2018-03-25 20:12:17 +0200
commit37eed98f79dcc2f502c92264665c3d7d7f0ad087 (patch)
treee045bd3ef4db1622a447898bf30dfcf53424432a /sw/source/uibase
parent8edd9a85bbbfba3d9edb232bdbd03a7634bb8614 (diff)
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 <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 86cdda67e4ec6fd6893a1d05d88eafa0ad838e2f)
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docstyle.cxx24
1 files changed, 17 insertions, 7 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index c5180e3038ae..c2ba65e1f391 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: