diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-30 15:06:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-31 06:58:55 +0000 |
commit | 7acbf45fcc6e2f8672bbecc4787cbcea8967219b (patch) | |
tree | 226034139755bd8caf97892d2918c7715eba1d72 /editeng | |
parent | 3c56928c9245b87feb2c32dbd200ff108089db61 (diff) |
use actual UNO enums in editeng
Change-Id: I58e794f161f3c4dd103985f575bc25202d4989b3
Reviewed-on: https://gerrit.libreoffice.org/35907
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editundo.hxx | 1 | ||||
-rw-r--r-- | editeng/source/items/justifyitem.cxx | 7 | ||||
-rw-r--r-- | editeng/source/items/writingmodeitem.cxx | 6 | ||||
-rw-r--r-- | editeng/source/misc/hangulhanja.cxx | 2 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unoipset.cxx | 2 |
6 files changed, 11 insertions, 9 deletions
diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx index a21d609e70c5..30566f68d84f 100644 --- a/editeng/source/editeng/editundo.hxx +++ b/editeng/source/editeng/editundo.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_EDITENG_SOURCE_EDITENG_EDITUNDO_HXX #define INCLUDED_EDITENG_SOURCE_EDITENG_EDITUNDO_HXX +#include <com/sun/star/i18n/TransliterationModules.hpp> #include <editdoc.hxx> #include <editeng/editund2.hxx> #include <editeng/editdata.hxx> diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx index 107c4308e658..b897fc5860d5 100644 --- a/editeng/source/items/justifyitem.cxx +++ b/editeng/source/items/justifyitem.cxx @@ -86,7 +86,7 @@ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const // ParagraphAdjust values, as in SvxAdjustItem // (same value for ParaAdjust and ParaLastLineAdjust) - sal_Int16 nAdjust = style::ParagraphAdjust_LEFT; + style::ParagraphAdjust nAdjust = style::ParagraphAdjust_LEFT; switch ( (SvxCellHorJustify)GetValue() ) { // ParagraphAdjust_LEFT is used for STANDARD and REPEAT @@ -97,7 +97,7 @@ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const case SvxCellHorJustify::Right: nAdjust = style::ParagraphAdjust_RIGHT; break; case SvxCellHorJustify::Block: nAdjust = style::ParagraphAdjust_BLOCK; break; } - rVal <<= nAdjust; // as sal_Int16 + rVal <<= (sal_Int16)nAdjust; // as sal_Int16 } break; } @@ -141,7 +141,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return false; SvxCellHorJustify eSvx = SvxCellHorJustify::Standard; - switch (nVal) + switch ((style::ParagraphAdjust)nVal) { // STRETCH is treated as BLOCK case style::ParagraphAdjust_LEFT: eSvx = SvxCellHorJustify::Left; break; @@ -149,6 +149,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) case style::ParagraphAdjust_STRETCH: case style::ParagraphAdjust_BLOCK: eSvx = SvxCellHorJustify::Block; break; case style::ParagraphAdjust_CENTER: eSvx = SvxCellHorJustify::Center; break; + default: break; } SetValue( eSvx ); } diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index a753ec372c15..57347f9dece7 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -69,7 +69,7 @@ bool SvxWritingModeItem::GetPresentation( SfxItemPresentation /*ePres*/, OUString &rText, const IntlWrapper * ) const { - rText = EditResId::GetString(RID_SVXITEMS_FRMDIR_BEGIN + GetValue()); + rText = EditResId::GetString(RID_SVXITEMS_FRMDIR_BEGIN + (int)GetValue()); return true; } @@ -91,7 +91,7 @@ bool SvxWritingModeItem::PutValue( const css::uno::Any& rVal, sal_uInt8 ) if( bRet ) { - switch( nVal ) + switch( (WritingMode)nVal ) { case WritingMode_LR_TB: case WritingMode_RL_TB: @@ -117,7 +117,7 @@ bool SvxWritingModeItem::QueryValue( css::uno::Any& rVal, SvxWritingModeItem& SvxWritingModeItem::operator=( const SvxWritingModeItem& rItem ) { - SetValue( rItem.GetValue() ); + SetValue( (sal_uInt16)rItem.GetValue() ); return *this; } diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index b2ee5df9b8f3..826f8ac9fa0c 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -599,7 +599,7 @@ namespace editeng // determine if it's Hangul CharClass aCharClassificaton( m_xContext, LanguageTag( m_aSourceLocale) ); - sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< sal_uInt16 >(nNextAsianScript) ); + css::i18n::UnicodeScript nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< sal_uInt16 >(nNextAsianScript) ); if ( ( UnicodeScript_kHangulJamo == nScript ) || ( UnicodeScript_kHangulCompatibilityJamo == nScript ) || ( UnicodeScript_kHangulSyllable == nScript ) diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f70378dea217..703f1ea98dc7 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -133,7 +133,7 @@ bool lcl_IsUnsupportedUnicodeChar( CharClass& rCC, const OUString& rTxt, { for( ; nStt < nEnd; ++nStt ) { - short nScript = rCC.getScript( rTxt, nStt ); + css::i18n::UnicodeScript nScript = rCC.getScript( rTxt, nStt ); switch( nScript ) { case css::i18n::UnicodeScript_kCJKRadicalsSupplement: diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index d02c64ccb4bf..32dc1b7441e1 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -302,7 +302,7 @@ void SvxUnoConvertToMM( const MapUnit eSourceMapUnit, uno::Any & rMetric ) throw rMetric <<= (sal_uInt32)(TWIPS_TO_MM(*o3tl::forceAccess<sal_uInt32>(rMetric))); break; default: - OSL_FAIL(OString("AW: Missing unit translation to 100th mm, " + OString::number(rMetric.getValueTypeClass())).getStr()); + OSL_FAIL(OString("AW: Missing unit translation to 100th mm, " + OString::number((sal_Int32)rMetric.getValueTypeClass())).getStr()); } break; } |