editeng/source/editeng/editundo.hxx | 1 + editeng/source/items/justifyitem.cxx | 7 ++++--- editeng/source/items/writingmodeitem.cxx | 6 +++--- editeng/source/misc/hangulhanja.cxx | 2 +- editeng/source/misc/svxacorr.cxx | 2 +- editeng/source/uno/unoipset.cxx | 2 +- include/editeng/editeng.hxx | 1 + include/editeng/writingmodeitem.hxx | 3 ++- 8 files changed, 14 insertions(+), 10 deletions(-)
New commits: commit 7acbf45fcc6e2f8672bbecc4787cbcea8967219b Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu Mar 30 15:06:14 2017 +0200 use actual UNO enums in editeng Change-Id: I58e794f161f3c4dd103985f575bc25202d4989b3 Reviewed-on: https://gerrit.libreoffice.org/35907 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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; } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index fcab47ad4269..a8fa950a6805 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/uno/Reference.h> #include <com/sun/star/i18n/WordType.hpp> #include <com/sun/star/i18n/CharacterIteratorMode.hpp> +#include <com/sun/star/i18n/TransliterationModules.hpp> #include <rsc/rscsfx.hxx> #include <editeng/editdata.hxx> diff --git a/include/editeng/writingmodeitem.hxx b/include/editeng/writingmodeitem.hxx index d3cd38a65b67..518c087c83d2 100644 --- a/include/editeng/writingmodeitem.hxx +++ b/include/editeng/writingmodeitem.hxx @@ -37,8 +37,9 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override; virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const override; - virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override; virtual bool operator==( const SfxPoolItem& ) const override; + css::text::WritingMode GetValue() const { return (css::text::WritingMode)SfxUInt16Item::GetValue(); } virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits