summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 08:17:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 08:17:42 +0200
commitb8d977c0178f8ac4ee299722d50c1481a15b45c8 (patch)
tree6cd8560661bb8b713e4373379052e85ab30598dd /include
parent80d2fa87fdaf67615d7b8128f3c05b239a1f1c05 (diff)
convert CharCompressType to scoped enum
and move it to svl, where it belongs Change-Id: Ic4d846419dfe2dd85de5ade8ed1a041867bbf1dc
Diffstat (limited to 'include')
-rw-r--r--include/editeng/editeng.hxx3
-rw-r--r--include/editeng/outliner.hxx3
-rw-r--r--include/svl/asiancfg.hxx14
-rw-r--r--include/svx/svdmodel.hxx7
4 files changed, 20 insertions, 7 deletions
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 38dbad12c65c..4742a607b349 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -109,6 +109,7 @@ class Range;
struct EPaM;
class DeletedNodeInfo;
class ParaPortionList;
+enum class CharCompressType;
/** values for:
@@ -256,7 +257,7 @@ public:
void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode );
EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
- void SetAsianCompressionMode( sal_uInt16 nCompression );
+ void SetAsianCompressionMode( CharCompressType nCompression );
void SetKernAsianPunctuation( bool bEnabled );
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index ef1540e17a0d..2c1f7810e85e 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -83,6 +83,7 @@ class SvxForbiddenCharactersTable;
class OverflowingText;
class NonOverflowingText;
class OutlinerViewShell;
+enum class CharCompressType;
namespace svl
{
@@ -694,7 +695,7 @@ public:
LanguageType GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const;
- void SetAsianCompressionMode( sal_uInt16 nCompressionMode );
+ void SetAsianCompressionMode( CharCompressType nCompressionMode );
void SetKernAsianPunctuation( bool bEnabled );
diff --git a/include/svl/asiancfg.hxx b/include/svl/asiancfg.hxx
index 71662c4a57f7..cef636155519 100644
--- a/include/svl/asiancfg.hxx
+++ b/include/svl/asiancfg.hxx
@@ -31,6 +31,16 @@ namespace com { namespace sun { namespace star { namespace lang {
struct Locale;
} } } }
+/// These constants define character compression in Asian text.
+/// Must match the values in com::sun::star::text::CharacterCompressionType.
+/// For bonus points, also appears to be directly stored in the ww8 file format.
+enum class CharCompressType {
+ NONE, /// No Compression
+ PunctuationOnly, /// Only punctuation is compressed
+ PunctuationAndKana, /// Punctuation and Japanese Kana are compressed.
+ Invalid = 0xff /// only used in SC
+};
+
class SVL_DLLPUBLIC SvxAsianConfig {
public:
SvxAsianConfig();
@@ -44,9 +54,9 @@ public:
void SetKerningWesternTextOnly(bool value);
- sal_Int16 GetCharDistanceCompression() const;
+ CharCompressType GetCharDistanceCompression() const;
- void SetCharDistanceCompression(sal_Int16 value);
+ void SetCharDistanceCompression(CharCompressType value);
css::uno::Sequence< css::lang::Locale > GetStartEndCharLocales() const;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 4cad2a4cf17b..d2b4ef8a2f87 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -78,6 +78,7 @@ class SdrOutlinerCache;
class SdrUndoFactory;
class ImageMap;
class TextChain;
+enum class CharCompressType;
namespace comphelper
{
class IEmbeddedHelper;
@@ -203,7 +204,7 @@ public:
//get a vector of all the SdrOutliner belonging to the model
std::vector<SdrOutliner*> GetActiveOutliners() const;
std::unique_ptr<SdrModelImpl> mpImpl;
- sal_uInt16 mnCharCompressType;
+ CharCompressType mnCharCompressType;
sal_uInt16 mnHandoutPageCount;
bool mbModelLocked;
bool mbKernAsianPunctuation;
@@ -532,8 +533,8 @@ public:
void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars );
const rtl::Reference<SvxForbiddenCharactersTable>& GetForbiddenCharsTable() const { return mpForbiddenCharactersTable;}
- void SetCharCompressType( sal_uInt16 nType );
- sal_uInt16 GetCharCompressType() const { return mnCharCompressType; }
+ void SetCharCompressType( CharCompressType nType );
+ CharCompressType GetCharCompressType() const { return mnCharCompressType; }
void SetKernAsianPunctuation( bool bEnabled );
bool IsKernAsianPunctuation() const { return mbKernAsianPunctuation; }