summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
parent80d2fa87fdaf67615d7b8128f3c05b239a1f1c05 (diff)
convert CharCompressType to scoped enum
and move it to svl, where it belongs Change-Id: Ic4d846419dfe2dd85de5ade8ed1a041867bbf1dc
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit.hxx6
-rw-r--r--editeng/source/editeng/impedit2.cxx3
-rw-r--r--editeng/source/editeng/impedit3.cxx7
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--editeng/source/outliner/outlin2.cxx2
6 files changed, 12 insertions, 10 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 6619f6e06e5c..d3bf03f7dd92 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -482,7 +482,7 @@ EditSelection EditEngine::TransliterateText(const EditSelection& rSelection, sal
return pImpEditEngine->TransliterateText(rSelection, nTransliterationMode);
}
-void EditEngine::SetAsianCompressionMode( sal_uInt16 n )
+void EditEngine::SetAsianCompressionMode( CharCompressType n )
{
pImpEditEngine->SetAsianCompressionMode( n );
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index ffcda876992d..bc42f55d45af 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -444,7 +444,7 @@ private:
sal_uInt16 nStretchX;
sal_uInt16 nStretchY;
- sal_uInt16 nAsianCompressionMode;
+ CharCompressType nAsianCompressionMode;
EEHorizontalTextDirection eDefaultHorizontalTextDirection;
@@ -998,8 +998,8 @@ public:
EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
short ReplaceTextOnly( ContentNode* pNode, sal_Int32 nCurrentStart, sal_Int32 nLen, const OUString& rText, const css::uno::Sequence< sal_Int32 >& rOffsets );
- void SetAsianCompressionMode( sal_uInt16 n );
- sal_uInt16 GetAsianCompressionMode() const { return nAsianCompressionMode; }
+ void SetAsianCompressionMode( CharCompressType n );
+ CharCompressType GetAsianCompressionMode() const { return nAsianCompressionMode; }
void SetKernAsianPunctuation( bool b );
bool IsKernAsianPunctuation() const { return bKernAsianPunctuation; }
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 0a6a0bdebf71..20e2f9ba8432 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -61,6 +61,7 @@
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
+#include <svl/asiancfg.hxx>
#include <o3tl/make_unique.hxx>
#include <comphelper/lok.hxx>
@@ -131,7 +132,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
eDefLanguage = LANGUAGE_DONTKNOW;
maBackgroundColor = COL_AUTO;
- nAsianCompressionMode = text::CharacterCompressionType::NONE;
+ nAsianCompressionMode = CharCompressType::NONE;
eDefaultHorizontalTextDirection = EE_HTEXTDIR_DEFAULT;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index c6f4e4d3e1fd..9247b1a7651f 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -52,6 +52,7 @@
#include <svtools/colorcfg.hxx>
#include <svl/ctloptions.hxx>
+#include <svl/asiancfg.hxx>
#include <editeng/forbiddencharacterstable.hxx>
@@ -1140,7 +1141,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
}
// And now check for Compression:
- if ( !bContinueLastPortion && nPortionLen && GetAsianCompressionMode() )
+ if ( !bContinueLastPortion && nPortionLen && GetAsianCompressionMode() != CharCompressType::NONE )
{
EditLine::CharPosArrayType& rArray = pLine->GetCharPosArray();
long* pDXArray = rArray.data() + nTmpPos - pLine->GetStart();
@@ -4315,7 +4316,7 @@ bool ImpEditEngine::ImplCalcAsianCompression(ContentNode* pNode,
long* pDXArray, sal_uInt16 n100thPercentFromMax,
bool bManipulateDXArray)
{
- DBG_ASSERT( GetAsianCompressionMode(), "ImplCalcAsianCompression - Why?" );
+ DBG_ASSERT( GetAsianCompressionMode() != CharCompressType::NONE, "ImplCalcAsianCompression - Why?" );
DBG_ASSERT( pTextPortion->GetLen(), "ImplCalcAsianCompression - Empty Portion?" );
// Percent is 1/100 Percent...
@@ -4333,7 +4334,7 @@ bool ImpEditEngine::ImplCalcAsianCompression(ContentNode* pNode,
AsianCompressionFlags nType = GetCharTypeForCompression( pNode->GetChar( n+nStartPos ) );
bool bCompressPunctuation = ( nType == AsianCompressionFlags::PunctuationLeft ) || ( nType == AsianCompressionFlags::PunctuationRight );
- bool bCompressKana = ( nType == AsianCompressionFlags::Kana ) && ( GetAsianCompressionMode() == text::CharacterCompressionType::PUNCTUATION_AND_KANA );
+ bool bCompressKana = ( nType == AsianCompressionFlags::Kana ) && ( GetAsianCompressionMode() == CharCompressType::PunctuationAndKana );
// create Extra infos only if needed...
if ( bCompressPunctuation || bCompressKana )
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index dde54ad48dc4..55e175cf0474 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -3064,7 +3064,7 @@ short ImpEditEngine::ReplaceTextOnly(
}
-void ImpEditEngine::SetAsianCompressionMode( sal_uInt16 n )
+void ImpEditEngine::SetAsianCompressionMode( CharCompressType n )
{
if ( n != nAsianCompressionMode )
{
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 3248ba34f51e..2f6d8a3d608d 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -283,7 +283,7 @@ EEControlBits Outliner::GetControlWord() const
return pEditEngine->GetControlWord();
}
-void Outliner::SetAsianCompressionMode( sal_uInt16 n )
+void Outliner::SetAsianCompressionMode( CharCompressType n )
{
pEditEngine->SetAsianCompressionMode( n );
}