diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-30 15:14:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-30 15:14:03 +0200 |
commit | 8fec9e7e4ca97e14551a737583226f89b0c6eecd (patch) | |
tree | 97b0c9e68fd2c3ad75f9b7d52a76a134522b8350 /unotools | |
parent | Just use Any::operator <<= for sal_Unicode values (diff) | |
download | core-8fec9e7e4ca97e14551a737583226f89b0c6eecd.tar.gz core-8fec9e7e4ca97e14551a737583226f89b0c6eecd.zip |
Some clean up of uses of css::uno::Any::setValue
Change-Id: I04e8aef35a6083b61d775c8eb3f96757da2b31bd
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/lingucfg.cxx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 03b2275cc2be..929354479e2d 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -363,20 +363,17 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const } case UPH_DEFAULT_LOCALE : { - lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage, false) ); - aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); + aRes <<= LanguageTag::convertToLocale( rOpt.nDefaultLanguage, false); break; } case UPH_DEFAULT_LOCALE_CJK : { - lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CJK, false) ); - aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); + aRes <<= LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CJK, false); break; } case UPH_DEFAULT_LOCALE_CTL : { - lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CTL, false) ); - aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); + aRes <<= LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CTL, false); break; } case UPH_IS_IGNORE_POST_POSITIONAL_WORD : pbVal = &rOpt.bIsIgnorePostPositionalWord; break; @@ -671,8 +668,6 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN osl::MutexGuard aGuard(theSvtLinguConfigItemMutex::get()); bool bRet = false; - const uno::Type &rINT16 = cppu::UnoType<sal_Int16>::get(); - const uno::Type &rINT32 = cppu::UnoType<sal_Int32>::get(); sal_Int32 nProps = rProperyNames.getLength(); uno::Sequence< uno::Any > aValues( nProps ); @@ -699,9 +694,9 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN *pValue++ <<= rOpt.bIsSpellSpecial; // 11 *pValue++ <<= rOpt.bIsSpellReverse; // 14 - pValue++->setValue( &rOpt.nHyphMinLeading, rINT16 ); // 15 - pValue++->setValue( &rOpt.nHyphMinTrailing, rINT16 ); // 16 - pValue++->setValue( &rOpt.nHyphMinWordLength, rINT16 ); // 17 + *pValue++ <<= rOpt.nHyphMinLeading; // 15 + *pValue++ <<= rOpt.nHyphMinTrailing; // 16 + *pValue++ <<= rOpt.nHyphMinWordLength; // 17 *pValue++ <<= rOpt.bIsHyphSpecial; // 18 *pValue++ <<= rOpt.bIsHyphAuto; // 19 @@ -717,7 +712,7 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN *pValue++ <<= rOpt.bIsTranslateCommonTerms; // 27 *pValue++ <<= rOpt.bIsReverseMapping; // 28 - pValue++->setValue( &rOpt.nDataFilesChangedCheckValue, rINT32 ); // 29 + *pValue++ <<= rOpt.nDataFilesChangedCheckValue; // 29 *pValue++ <<= rOpt.bIsGrammarAuto; // 30 *pValue++ <<= rOpt.bIsGrammarInteractive; // 31 |