summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-04-17 21:35:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-26 08:50:54 +0200
commitc70d49c7c888da8cfd73db8585e7be1f37fc398a (patch)
treec0e540401850018464ca76300536faf9aa7e27d2 /sd
parentcd4344d3bdef631b3e64ac12a9e64bc9670c1b7c (diff)
use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/Outliner.hxx4
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/ui/func/fuhhconv.cxx12
-rw-r--r--sd/source/ui/inc/fuhhconv.hxx4
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx4
-rw-r--r--sd/source/ui/view/Outliner.cxx2
6 files changed, 14 insertions, 14 deletions
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 7c7fd80d6084..874bc3952668 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -172,7 +172,7 @@ public:
/** Starts the text conversion (hangul/hanja or Chinese simplified/traditional)
for the current viewshell */
- void StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+ void StartConversion( LanguageType nSourceLanguage, LanguageType nTargetLanguage,
const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive );
/** This is called internally when text conversion is started.
@@ -214,7 +214,7 @@ private:
/** this is the language that is used for current text conversion.
Only valid if meMode is TEXT_CONVERSION.
*/
- sal_Int16 mnConversionLanguage;
+ LanguageType mnConversionLanguage;
/** While the value of this flag is greater than 0 changes of the current page
do not lead to selecting the corresponding text in the outliner.
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 690d29756b1b..f2ce94fe6bca 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -3320,7 +3320,7 @@ void TextObjBinary::WriteTextSpecInfo( SvStream* pStrm )
pStrm ->WriteUInt32( nPortionSize )
.WriteInt32( nFlags )
.WriteInt16( 1 ) // spellinfo -> needs rechecking
- .WriteInt16( LanguageTag( rPortion.meCharLocale ).makeFallback().getLanguageType() )
+ .WriteInt16( (sal_uInt16)LanguageTag( rPortion.meCharLocale ).makeFallback().getLanguageType() )
.WriteInt16( 0 ); // alt language
}
}
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index 81a4ab23b393..cad5a7a59974 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -95,7 +95,7 @@ rtl::Reference<FuPoor> FuHangulHanjaConversion::Create( ViewShell* pViewSh, ::sd
/**
* Search and replace
*/
-void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+void FuHangulHanjaConversion::StartConversion( LanguageType nSourceLanguage, LanguageType nTargetLanguage,
const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive )
{
@@ -147,7 +147,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In
mpView->EndUndo();
}
-void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const vcl::Font *pTargetFont )
+void FuHangulHanjaConversion::ConvertStyles( LanguageType nTargetLanguage, const vcl::Font *pTargetFont )
{
if( !mpDoc )
return;
@@ -182,7 +182,7 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const vc
pStyle = pStyleSheetPool->Next();
}
- mpDoc->SetLanguage( EE_CHAR_LANGUAGE_CJK, nTargetLanguage );
+ mpDoc->SetLanguage( nTargetLanguage, EE_CHAR_LANGUAGE_CJK );
}
void FuHangulHanjaConversion::StartChineseConversion()
@@ -234,9 +234,9 @@ void FuHangulHanjaConversion::StartChineseConversion()
}
//execute translation
- sal_Int16 nSourceLang = bToSimplified ? LANGUAGE_CHINESE_TRADITIONAL : LANGUAGE_CHINESE_SIMPLIFIED;
- sal_Int16 nTargetLang = bToSimplified ? LANGUAGE_CHINESE_SIMPLIFIED : LANGUAGE_CHINESE_TRADITIONAL;
- sal_Int32 nOptions = bUseVariants ? i18n::TextConversionOption::USE_CHARACTER_VARIANTS : 0;
+ LanguageType nSourceLang = bToSimplified ? LANGUAGE_CHINESE_TRADITIONAL : LANGUAGE_CHINESE_SIMPLIFIED;
+ LanguageType nTargetLang = bToSimplified ? LANGUAGE_CHINESE_SIMPLIFIED : LANGUAGE_CHINESE_TRADITIONAL;
+ sal_Int32 nOptions = bUseVariants ? i18n::TextConversionOption::USE_CHARACTER_VARIANTS : 0;
if( !bCommonTerms )
nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
diff --git a/sd/source/ui/inc/fuhhconv.hxx b/sd/source/ui/inc/fuhhconv.hxx
index adf81223574b..44a9cdc15870 100644
--- a/sd/source/ui/inc/fuhhconv.hxx
+++ b/sd/source/ui/inc/fuhhconv.hxx
@@ -32,12 +32,12 @@ public:
static rtl::Reference<FuPoor> Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
- void StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+ void StartConversion( LanguageType nSourceLanguage, LanguageType nTargetLanguage,
const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive );
void StartChineseConversion();
- void ConvertStyles( sal_Int16 nTargetLanguage, const vcl::Font *pTargetFont );
+ void ConvertStyles( LanguageType nTargetLanguage, const vcl::Font *pTargetFont );
protected:
virtual ~FuHangulHanjaConversion() override;
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 4da4289e0919..6b6673b1c96a 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -273,8 +273,8 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine()
SvtLinguConfig().GetOptions( aOpt );
struct FontDta {
- sal_Int16 nFallbackLang;
- sal_Int16 nLang;
+ LanguageType nFallbackLang;
+ LanguageType nLang;
DefaultFontType nFontType;
sal_uInt16 nFontInfoId;
} aTable[3] =
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index cd38117db3da..e6b58ec9391e 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1560,7 +1560,7 @@ void SdOutliner::HandleChangedSelection()
}
}
-void SdOutliner::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+void SdOutliner::StartConversion( LanguageType nSourceLanguage, LanguageType nTargetLanguage,
const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive )
{
std::shared_ptr<sd::ViewShell> pViewShell (mpWeakViewShell.lock());