Kaydet (Commit) fe985aaa authored tarafından Eike Rathke's avatar Eike Rathke

use LanguageTag

Change-Id: I4c55e30ec64f4e4d0217f226bc99ff693d054093
üst f3221085
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#include <unotools/saveopt.hxx> #include <unotools/saveopt.hxx>
#include <comphelper/extract.hxx> #include <comphelper/extract.hxx>
#include <i18npool/mslangid.hxx> #include <i18npool/mslangid.hxx>
#include <i18npool/languagetag.hxx>
#include <unotools/charclass.hxx> #include <unotools/charclass.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <unotools/pathoptions.hxx> #include <unotools/pathoptions.hxx>
...@@ -231,7 +232,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) ...@@ -231,7 +232,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
} }
LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage ); LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage );
mpLocale = new ::com::sun::star::lang::Locale( MsLangId::convertLanguageToLocale( eRealLanguage )); mpLocale = new ::com::sun::star::lang::Locale( LanguageTag( eRealLanguage ).getLocale());
mpCharClass = new CharClass( *mpLocale ); mpCharClass = new CharClass( *mpLocale );
// If the current application language is a language that uses right-to-left text... // If the current application language is a language that uses right-to-left text...
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
#include <com/sun/star/table/BorderLine.hpp> #include <com/sun/star/table/BorderLine.hpp>
#include <set> #include <set>
#include <oox/ole/olehelper.hxx> #include <oox/ole/olehelper.hxx>
#include "i18npool/mslangid.hxx" #include "i18npool/languagetag.hxx"
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -3862,7 +3862,7 @@ void TextObjBinary::WriteTextSpecInfo( SvStream* pStrm ) ...@@ -3862,7 +3862,7 @@ void TextObjBinary::WriteTextSpecInfo( SvStream* pStrm )
*pStrm << static_cast< sal_uInt32 >( nPortionSize ) *pStrm << static_cast< sal_uInt32 >( nPortionSize )
<< nFlags << nFlags
<< static_cast< sal_Int16 >( 1 ) // spellinfo -> needs rechecking << static_cast< sal_Int16 >( 1 ) // spellinfo -> needs rechecking
<< static_cast< sal_Int16 >( MsLangId::convertLocaleToLanguageWithFallback( pPortion->meCharLocale ) ) << static_cast< sal_Int16 >( LanguageTag( pPortion->meCharLocale ).makeFallback().getLanguageType() )
<< static_cast< sal_Int16 >( 0 ); // alt language << static_cast< sal_Int16 >( 0 ); // alt language
} }
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <i18npool/mslangid.hxx> #include <i18npool/languagetag.hxx>
#include <comphelper/propertysetinfo.hxx> #include <comphelper/propertysetinfo.hxx>
#include <editeng/eeitem.hxx> #include <editeng/eeitem.hxx>
#include <svx/unopool.hxx> #include <svx/unopool.hxx>
...@@ -35,7 +35,7 @@ LanguageType SdUnoGetLanguage( const lang::Locale& rLocale ) ...@@ -35,7 +35,7 @@ LanguageType SdUnoGetLanguage( const lang::Locale& rLocale )
if ( rLocale.Language.getLength() == 0 ) if ( rLocale.Language.getLength() == 0 )
return LANGUAGE_SYSTEM; return LANGUAGE_SYSTEM;
LanguageType eRet = MsLangId::convertLocaleToLanguage( rLocale ); LanguageType eRet = LanguageTag( rLocale ).getLanguageType( false);
if ( eRet == LANGUAGE_NONE ) if ( eRet == LANGUAGE_NONE )
eRet = LANGUAGE_SYSTEM; //! or throw an exception? eRet = LANGUAGE_SYSTEM; //! or throw an exception?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment