summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-02-20 15:03:38 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-02-20 15:11:32 +0100
commit86cdda67e4ec6fd6893a1d05d88eafa0ad838e2f (patch)
tree12a711030a594b9f2a2403c8f74a319d748099f2
parent32a5ea9d0b96d9956be41fb7f1480139be619aae (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>
-rw-r--r--sw/inc/strings.hrc1
-rw-r--r--sw/source/uibase/app/docstyle.cxx24
2 files changed, 18 insertions, 7 deletions
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: