diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-30 14:10:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-31 06:58:39 +0000 |
commit | 3c56928c9245b87feb2c32dbd200ff108089db61 (patch) | |
tree | 1e073224c6119c57dcfe0a88c29eee29f545e45a /unotools | |
parent | 97844a113fcaf7e2a0c52203e6792c71e2389f39 (diff) |
use actual UNO enums in unotools
Change-Id: I71ee54a5eb70f1a322cc87cd940bc63ff95366b6
Reviewed-on: https://gerrit.libreoffice.org/35906
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/i18n/charclass.cxx | 16 | ||||
-rw-r--r-- | unotools/source/i18n/textsearch.cxx | 2 | ||||
-rw-r--r-- | unotools/source/ucbhelper/ucbhelper.cxx | 2 | ||||
-rw-r--r-- | unotools/source/ucbhelper/ucblockbytes.cxx | 12 |
4 files changed, 16 insertions, 16 deletions
diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx index 47aeffa106f5..60e5227070a9 100644 --- a/unotools/source/i18n/charclass.cxx +++ b/unotools/source/i18n/charclass.cxx @@ -321,35 +321,35 @@ sal_Int16 CharClass::getType( const OUString& rStr, sal_Int32 nPos ) const } } -sal_Int16 CharClass::getCharacterDirection( const OUString& rStr, sal_Int32 nPos ) const +css::i18n::DirectionProperty CharClass::getCharacterDirection( const OUString& rStr, sal_Int32 nPos ) const { try { if ( xCC.is() ) - return xCC->getCharacterDirection( rStr, nPos ); + return (css::i18n::DirectionProperty)xCC->getCharacterDirection( rStr, nPos ); else - return 0; + return css::i18n::DirectionProperty_LEFT_TO_RIGHT; } catch ( const Exception& ) { SAL_WARN( "unotools.i18n", "getCharacterDirection: Exception caught!" ); - return 0; + return css::i18n::DirectionProperty_LEFT_TO_RIGHT; } } -sal_Int16 CharClass::getScript( const OUString& rStr, sal_Int32 nPos ) const +css::i18n::UnicodeScript CharClass::getScript( const OUString& rStr, sal_Int32 nPos ) const { try { if ( xCC.is() ) - return xCC->getScript( rStr, nPos ); + return (css::i18n::UnicodeScript) xCC->getScript( rStr, nPos ); else - return 0; + return UnicodeScript_kBasicLatin; } catch ( const Exception& ) { SAL_WARN( "unotools.i18n", "getScript: Exception caught!" ); - return 0; + return UnicodeScript_kBasicLatin; } } diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx index 98dc9846083b..c548619e60e5 100644 --- a/unotools/source/i18n/textsearch.cxx +++ b/unotools/source/i18n/textsearch.cxx @@ -202,7 +202,7 @@ void TextSearch::Init( const SearchParam & rParam, { case SearchParam::SearchType::Wildcard: aSOpt.AlgorithmType2 = SearchAlgorithms2::WILDCARD; - aSOpt.algorithmType = SearchAlgorithms_MAKE_FIXED_SIZE; // no old enum for that + aSOpt.algorithmType = SearchAlgorithms::SearchAlgorithms_MAKE_FIXED_SIZE; // no old enum for that aSOpt.WildcardEscapeCharacter = rParam.GetWildEscChar(); if (rParam.IsWildMatchSel()) aSOpt.searchFlag |= SearchFlags::WILD_MATCH_SELECTION; diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index 37844f2b6dd3..f9eabf948e29 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -277,7 +277,7 @@ bool utl::UCBContentHelper::MakeFolder( "unotools.ucbhelper", "UCBContentHelper::MakeFolder(" << title << ") InteractiveIOException \"" << e.Message - << "\", code " << +e.Code); + << "\", code " << + (sal_Int32)e.Code); } } catch (css::ucb::NameClashException const &) { exists = true; diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index d6374482e625..1aa5abaca117 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -267,7 +267,7 @@ public: struct Result { ResultType type; Any result; - sal_Int32 ioErrorCode; + IOErrorCode ioErrorCode; }; Result getResult(const sal_uInt32 milliSec); @@ -315,7 +315,7 @@ private: ConditionRes m_aRes; ResultType m_aResultType; - sal_Int32 m_nIOErrorCode; + IOErrorCode m_nIOErrorCode; Any m_aResult; friend class ConditionRep; @@ -457,7 +457,7 @@ Moderator::Moderator( m_aRes(m_aMutex,*this), m_aResultType(ResultType::NORESULT), - m_nIOErrorCode(0), + m_nIOErrorCode(IOErrorCode_ABORT), m_aResult(), m_aRep(m_aMutex,*this), @@ -606,9 +606,9 @@ void SAL_CALL Moderator::run() { osl_setThreadName("utl::Moderator"); - ResultType aResultType; - Any aResult; - sal_Int32 nIOErrorCode = 0; + ResultType aResultType; + Any aResult; + IOErrorCode nIOErrorCode = IOErrorCode_ABORT; try { |