summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx4
-rw-r--r--sw/source/ui/misc/srtdlg.cxx4
-rw-r--r--sw/source/ui/vba/vbarange.cxx4
-rw-r--r--sw/source/ui/vba/vbastyle.cxx10
-rw-r--r--sw/source/ui/vba/vbastyle.hxx6
6 files changed, 16 insertions, 14 deletions
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 91d0ba84fb7a..a939175d7b3d 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1610,7 +1610,7 @@ void SwInsertDBColAutoPilot::ImplCommit()
sNewNode += "/ColumnSet";
- LanguageType ePrevLang = (LanguageType)-1;
+ LanguageType ePrevLang(0xffff);
SvNumberFormatter& rNFormatr = *pView->GetWrtShell().GetNumberFormatter();
for(size_t nCol = 0; nCol < aDBColumns.size(); nCol++)
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index b1afb05cbd6c..75e518af1657 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -263,7 +263,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
{
sal_uLong nCCode = m_pCharSetLB->GetSelectTextEncoding();
OUString sFont;
- LanguageType nLng = 0;
+ LanguageType nLng = LANGUAGE_SYSTEM;
if( m_pFontLB->IsVisible() )
{
sFont = m_pFontLB->GetSelectEntry();
@@ -272,7 +272,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
rOptions.SetFontName( sFont );
rOptions.SetCharSet( rtl_TextEncoding( nCCode ) );
- rOptions.SetLanguage( sal_uInt16( nLng ) );
+ rOptions.SetLanguage( nLng );
rOptions.SetParaFlags( GetCRLF() );
// save the user settings
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index caa6b906eb12..ab338be9ce13 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -56,7 +56,7 @@ static sal_uInt16 nType1 = 0;
static sal_uInt16 nType2 = 0;
static sal_uInt16 nType3 = 0;
-static sal_uInt16 nLang = LANGUAGE_NONE;
+static LanguageType nLang = LANGUAGE_NONE;
static bool bAsc1 = true;
static bool bAsc2 = true;
@@ -196,7 +196,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
// first initialise the language, then select the
if( LANGUAGE_NONE == nLang || LANGUAGE_DONTKNOW == nLang )
- nLang = (sal_uInt16)GetAppLanguage();
+ nLang = GetAppLanguage();
m_pLangLB->SetLanguageList( SvxLanguageListFlags::ALL | SvxLanguageListFlags::ONLY_KNOWN, true );
m_pLangLB->SelectLanguage( nLang );
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index a76cd1cdce51..65bf25b63ed5 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -310,13 +310,13 @@ SwVbaRange::getListFormat()
::sal_Int32 SAL_CALL SwVbaRange::getLanguageID()
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
- return SwVbaStyle::getLanguageID( xParaProps );
+ return (sal_uInt16)SwVbaStyle::getLanguageID( xParaProps );
}
void SAL_CALL SwVbaRange::setLanguageID( ::sal_Int32 _languageid )
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
- SwVbaStyle::setLanguageID( xParaProps, _languageid );
+ SwVbaStyle::setLanguageID( xParaProps, LanguageType(_languageid) );
}
uno::Any SAL_CALL
diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx
index 663f0be39a43..7fc026d2f3c3 100644
--- a/sw/source/ui/vba/vbastyle.cxx
+++ b/sw/source/ui/vba/vbastyle.cxx
@@ -48,27 +48,27 @@ SwVbaStyle::getName()
return mxStyle->getName();
}
-sal_Int32 SwVbaStyle::getLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps )
+LanguageType SwVbaStyle::getLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps )
{
lang::Locale aLocale;
xTCProps->getPropertyValue("CharLocale") >>= aLocale;
return LanguageTag::convertToLanguageType( aLocale, false);
}
-void SwVbaStyle::setLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps, sal_Int32 _languageid )
+void SwVbaStyle::setLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps, LanguageType _languageid )
{
- lang::Locale aLocale = LanguageTag( static_cast<LanguageType>(_languageid) ).getLocale();
+ lang::Locale aLocale = LanguageTag( _languageid ).getLocale();
xTCProps->setPropertyValue("CharLocale", uno::makeAny( aLocale ) ) ;
}
::sal_Int32 SAL_CALL SwVbaStyle::getLanguageID()
{
- return getLanguageID( mxStyleProps );
+ return (sal_uInt16)getLanguageID( mxStyleProps );
}
void SAL_CALL SwVbaStyle::setLanguageID( ::sal_Int32 _languageid )
{
- setLanguageID( mxStyleProps, _languageid );
+ setLanguageID( mxStyleProps, LanguageType(_languageid) );
}
::sal_Int32 SAL_CALL SwVbaStyle::getType()
diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx
index 334fd7525fc8..21d94d3ed3d8 100644
--- a/sw/source/ui/vba/vbastyle.hxx
+++ b/sw/source/ui/vba/vbastyle.hxx
@@ -18,8 +18,10 @@
*/
#ifndef INCLUDED_SW_SOURCE_UI_VBA_VBASTYLE_HXX
#define INCLUDED_SW_SOURCE_UI_VBA_VBASTYLE_HXX
+
#include <ooo/vba/word/XStyle.hpp>
#include <vbahelper/vbahelperinterface.hxx>
+#include <i18nlangtag/lang.h>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -43,9 +45,9 @@ public:
/// @throws css::uno::RuntimeException
static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xParaProps, const css::uno::Any& xStyle );
/// @throws css::uno::RuntimeException
- static sal_Int32 getLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps );
+ static LanguageType getLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps );
/// @throws css::uno::RuntimeException
- static void setLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, sal_Int32 _languageid );
+ static void setLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, LanguageType _languageid );
// Attributes
virtual OUString SAL_CALL getName() override;