[Libreoffice-commits] .: cui/source sfx2/source starmath/source svtools/source svx/source toolkit/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 22 10:50:43 PST 2012


 cui/source/dialogs/postdlg.cxx                |   14 +++++++-------
 cui/source/options/optgdlg.cxx                |    6 ++----
 cui/source/tabpages/tabstpge.cxx              |    4 ++--
 sfx2/source/appl/appserv.cxx                  |    1 -
 sfx2/source/dialog/dinfdlg.cxx                |   22 +++++++++++-----------
 sfx2/source/dialog/versdlg.cxx                |   11 ++++-------
 sfx2/source/inc/versdlg.hxx                   |    1 -
 starmath/source/unomodel.cxx                  |    4 ++--
 svtools/source/contnr/DocumentInfoPreview.cxx |    6 +++---
 svx/source/dialog/_contdlg.cxx                |    8 ++++----
 svx/source/dialog/compressgraphicdialog.cxx   |    4 ++--
 svx/source/dialog/imapdlg.cxx                 |    8 ++++----
 svx/source/form/formcontroller.cxx            |   11 +++++++++--
 toolkit/source/controls/unocontrolmodel.cxx   |    1 +
 14 files changed, 51 insertions(+), 50 deletions(-)

New commits:
commit 1b329fd5ccc0ff270d776dfd03571da3f4d6f34d
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Nov 22 19:48:13 2012 +0100

    get rid of unnecessary LocaleDataWrapper temporary instances
    
    Change-Id: I17d9a502565d445b0eab9ef6e9123661850292b7

diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 90fe48c..7a944e2 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -124,8 +124,8 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent,
     }
     else
     {
-        LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-        aDateStr = aLocaleWrapper.getDate( Date( Date::SYSTEM ) );
+        const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+        aDateStr = rLocaleWrapper.getDate( Date( Date::SYSTEM ) );
     }
 
     nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT );
@@ -212,7 +212,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
     Date aDate( Date::SYSTEM );
     Time aTime( Time::SYSTEM );
     String aTmp( SvtUserOptions().GetID() );
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
     String aStr( aEditED.GetText() );
     aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) );
 
@@ -221,9 +221,9 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
         aStr += aTmp;
         aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
     }
-    aStr += aLocaleWrapper.getDate(aDate);
+    aStr += rLocaleWrapper.getDate(aDate);
     aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
-    aStr += aLocaleWrapper.getTime(aTime, sal_False, sal_False);
+    aStr += rLocaleWrapper.getTime(aTime, sal_False, sal_False);
     aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) );
 
     aStr = convertLineEnd(aStr, GetSystemLineEnd());
@@ -239,11 +239,11 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
 
 IMPL_LINK_NOARG(SvxPostItDialog, OKHdl)
 {
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
     pOutSet = new SfxItemSet( rSet );
     pOutSet->Put( SvxPostItAuthorItem( SvtUserOptions().GetID(),
                                          rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
-    pOutSet->Put( SvxPostItDateItem( aLocaleWrapper.getDate( Date( Date::SYSTEM ) ),
+    pOutSet->Put( SvxPostItDateItem( rLocaleWrapper.getDate( Date( Date::SYSTEM ) ),
                                      rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) );
     pOutSet->Put( SvxPostItTextItem( aEditED.GetText(),
                                      rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) );
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 38d050d..f4d8aba 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1696,10 +1696,8 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
     OUString aDatePatternsString = pLangConfig->aSysLocaleOptions.GetDatePatternsConfigString();
     if (aDatePatternsString.isEmpty())
     {
-        Locale aTempLocale;
-        SvxLanguageToLocale( aTempLocale, Application::GetSettings().GetLanguageTag().getLanguageType());
-        LocaleDataWrapper aLocaleWrapper( aTempLocale );
-        aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper);
+        const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+        aDatePatternsString = lcl_getDatePatternsConfigString( rLocaleWrapper);
     }
     aDatePatternsED.SetText( aDatePatternsString);
     bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_DATEPATTERNS);
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index d0d429b..ef6d44b 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -186,8 +186,8 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent,
     aFillChar.SetAccessibleRelationLabeledBy(&aFillSpecial);
 
     // Get the default decimal char from the system
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    aAktTab.GetDecimal() = aLocaleWrapper.getNumDecimalSep()[0];
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    aAktTab.GetDecimal() = rLocaleWrapper.getNumDecimalSep()[0];
     FreeResource();
 }
 
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 7363fc4..3e0a297 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -712,7 +712,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 
 void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
 {
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
     const sal_uInt16 *pRanges = rSet.GetRanges();
     DBG_ASSERT(pRanges && *pRanges, "Set without range");
     while ( *pRanges )
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index fcc0982..416e677 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -724,13 +724,13 @@ namespace
 {
     String GetDateTimeString( sal_Int32 _nDate, sal_Int32 _nTime )
     {
-        LocaleDataWrapper aWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
+        const LocaleDataWrapper& rWrapper( Application::GetSettings().GetLocaleDataWrapper() );
 
         Date aDate( _nDate );
         Time aTime( _nTime );
-        String aStr( aWrapper.getDate( aDate ) );
+        String aStr( rWrapper.getDate( aDate ) );
         aStr.AppendAscii( ", " );
-        aStr += aWrapper.getTime( aTime );
+        aStr += rWrapper.getTime( aTime );
         return aStr;
     }
 
@@ -878,17 +878,17 @@ IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl)
     String aName;
     if ( bEnableUseUserData && aUseUserDataCB.IsChecked() )
         aName = SvtUserOptions().GetFullName();
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
     DateTime now( DateTime::SYSTEM );
     util::DateTime uDT(
         now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
         now.GetDay(), now.GetMonth(), now.GetYear() );
-    aCreateValFt.SetText( ConvertDateTime_Impl( aName, uDT, aLocaleWrapper ) );
+    aCreateValFt.SetText( ConvertDateTime_Impl( aName, uDT, rLocaleWrapper ) );
     OUString aEmpty;
     aChangeValFt.SetText( aEmpty );
     aPrintValFt.SetText( aEmpty );
     const Time aTime( 0 );
-    aTimeLogValFt.SetText( aLocaleWrapper.getDuration( aTime ) );
+    aTimeLogValFt.SetText( rLocaleWrapper.getDuration( aTime ) );
     aDocNoValFt.SetText(rtl::OUString('1'));
     bHandleDelete = sal_True;
     return 0;
@@ -1148,22 +1148,22 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
 
     // handle access data
     sal_Bool m_bUseUserData = pInfoItem->IsUseUserData();
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
     aCreateValFt.SetText( ConvertDateTime_Impl( pInfoItem->getAuthor(),
-        pInfoItem->getCreationDate(), aLocaleWrapper ) );
+        pInfoItem->getCreationDate(), rLocaleWrapper ) );
     util::DateTime aTime( pInfoItem->getModificationDate() );
     if ( aTime.Month > 0 )
         aChangeValFt.SetText( ConvertDateTime_Impl(
-            pInfoItem->getModifiedBy(), aTime, aLocaleWrapper ) );
+            pInfoItem->getModifiedBy(), aTime, rLocaleWrapper ) );
     aTime = pInfoItem->getPrintDate();
     if ( aTime.Month > 0 )
         aPrintValFt.SetText( ConvertDateTime_Impl( pInfoItem->getPrintedBy(),
-            aTime, aLocaleWrapper ) );
+            aTime, rLocaleWrapper ) );
     const long nTime = pInfoItem->getEditingDuration();
     if ( m_bUseUserData )
     {
         const Time aT( nTime/3600, (nTime%3600)/60, nTime%60 );
-        aTimeLogValFt.SetText( aLocaleWrapper.getDuration( aT ) );
+        aTimeLogValFt.SetText( rLocaleWrapper.getDuration( aT ) );
         aDocNoValFt.SetText( String::CreateFromInt32(
             pInfoItem->getEditingCycles() ) );
     }
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 6d992cf..784b570 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -191,7 +191,6 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, sal_Bool bIsSaveVer
     , aHelpButton( this, SfxResId( PB_HELP ) )
     , pViewFrame( pVwFrame )
     , mpTable( NULL )
-    , mpLocaleWrapper( NULL )
     , mbIsSaveVersionOnClose( bIsSaveVersionOnClose )
 {
     FreeResource();
@@ -257,7 +256,7 @@ void SfxVersionDialog::Init_Impl()
         for ( size_t n = 0; n < mpTable->size(); ++n )
         {
             SfxVersionInfo *pInfo = mpTable->at( n );
-            String aEntry = ConvertDateTime_Impl( pInfo->aCreationDate, *mpLocaleWrapper );
+            String aEntry = ConvertDateTime_Impl( pInfo->aCreationDate, Application::GetSettings().GetLocaleDataWrapper() );
             aEntry += '\t';
             aEntry += pInfo->aAuthor;
             aEntry += '\t';
@@ -284,7 +283,6 @@ void SfxVersionDialog::Init_Impl()
 SfxVersionDialog::~SfxVersionDialog ()
 {
     delete mpTable;
-    delete mpLocaleWrapper;
 }
 
 void SfxVersionDialog::Open_Impl()
@@ -317,8 +315,7 @@ void SfxVersionDialog::RecalcDateColumn()
 {
     // recalculate the datetime column width
     DateTime aNow( DateTime::SYSTEM );
-    mpLocaleWrapper = new LocaleDataWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    String sDateTime = ConvertDateTime_Impl( aNow, *mpLocaleWrapper );
+    String sDateTime = ConvertDateTime_Impl( aNow, Application::GetSettings().GetLocaleDataWrapper() );
     long nWidth = aVersionBox.GetTextWidth( sDateTime );
     nWidth += 15; // a little offset
     long nTab = aVersionBox.GetTab(1);
@@ -451,8 +448,8 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi
 {
     FreeResource();
 
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    aDateTimeText.SetText( aDateTimeText.GetText().Append(ConvertDateTime_Impl( pInfo->aCreationDate, aLocaleWrapper )) );
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    aDateTimeText.SetText( aDateTimeText.GetText().Append(ConvertDateTime_Impl( pInfo->aCreationDate, rLocaleWrapper )) );
     aSavedByText.SetText( aSavedByText.GetText().Append(pInfo->aAuthor) );
     aEdit.SetText( rInfo.aComment );
 
diff --git a/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
index 7514c36..a81e8ea 100644
--- a/sfx2/source/inc/versdlg.hxx
+++ b/sfx2/source/inc/versdlg.hxx
@@ -57,7 +57,6 @@ class SfxVersionDialog : public SfxModalDialog
     HelpButton                  aHelpButton;
     SfxViewFrame*               pViewFrame;
     SfxVersionTableDtor*        mpTable;
-    LocaleDataWrapper*          mpLocaleWrapper;
     sal_Bool                    mbIsSaveVersionOnClose;
 
     DECL_LINK(DClickHdl_Impl, void *);
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 9e92288..96053ed 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -953,8 +953,8 @@ sal_Int32 SAL_CALL SmModel::getRendererCount(
 static Size lcl_GuessPaperSize()
 {
     Size aRes;
-    LocaleDataWrapper aLocWrp( AllSettings().GetLanguageTag().getLocale() );
-    if( MEASURE_METRIC == aLocWrp.getMeasurementSystemEnum() )
+    const LocaleDataWrapper& rLocWrp( AllSettings().GetLocaleDataWrapper() );
+    if( MEASURE_METRIC == rLocWrp.getMeasurementSystemEnum() )
     {
         // in 100th mm
         PaperInfo aInfo( PAPER_A4 );
diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx
index 048b0d8..b538cba 100644
--- a/svtools/source/contnr/DocumentInfoPreview.cxx
+++ b/svtools/source/contnr/DocumentInfoPreview.cxx
@@ -155,10 +155,10 @@ void ODocumentInfoPreview::insertDateTime(
         Time(
             value.Hours, value.Minutes, value.Seconds, value.HundredthSeconds));
     if (aToolsDT.IsValidAndGregorian()) {
-        LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-        rtl::OUStringBuffer buf(aLocaleWrapper.getDate(aToolsDT));
+        const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+        rtl::OUStringBuffer buf(rLocaleWrapper.getDate(aToolsDT));
         buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
-        buf.append(aLocaleWrapper.getTime(aToolsDT));
+        buf.append(rLocaleWrapper.getTime(aToolsDT));
         insertEntry(m_pInfoTable->GetString(id), buf.makeStringAndClear());
     }
 }
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index cb9ab5a..e5faa50 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -568,8 +568,8 @@ IMPL_LINK( SvxSuperContourDlg, MousePosHdl, ContourWindow*, pWnd )
     String aStr;
     const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
     const Point& rMousePos = pWnd->GetMousePos();
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
 
     aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) );
     aStr.Append( rtl::OUString(" / ") );
@@ -585,8 +585,8 @@ IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, ContourWindow*, pWnd )
     String aStr;
     const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
     const Size& rSize = pWnd->GetGraphicSize();
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
 
     aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) );
     aStr.Append( rtl::OUString(" x ") );
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 7a0de83..37db8f5 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -106,8 +106,8 @@ CompressGraphicsDialog::~CompressGraphicsDialog()
 void CompressGraphicsDialog::Update()
 {
     const FieldUnit eFieldUnit = m_rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
 
     VirtualDevice* pDummyVDev = new VirtualDevice();
     pDummyVDev->EnableOutput( false );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 38670f0..55626a2 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -665,8 +665,8 @@ IMPL_LINK( SvxIMapDlg, MousePosHdl, IMapWindow*, pWnd )
     String aStr;
     const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
     const Point& rMousePos = pWnd->GetMousePos();
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
 
     aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) );
     aStr.Append( DEFINE_CONST_UNICODE( " / " ) );
@@ -682,8 +682,8 @@ IMPL_LINK( SvxIMapDlg, GraphSizeHdl, IMapWindow*, pWnd )
     String aStr;
     const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
     const Size& rSize = pWnd->GetGraphicSize();
-    LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() );
-    const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
 
     aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) );
     aStr.Append( DEFINE_CONST_UNICODE( " x " ) );
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 58e9997..3e6caf0 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3172,7 +3172,14 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
         Reference< XNumberFormatter> xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW );
         xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
         Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale();
-        LocaleDataWrapper aLocaleWrapper( m_aContext.getUNOContext(), aAppLocale );
+        const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetUILocaleDataWrapper() );
+        /* FIXME: casting this to sal_Char is plain wrong and of course only
+         * works for ASCII separators, but
+         * xParseNode->parseNodeToPredicateStr() expects a sal_Char. Fix it
+         * there. */
+        sal_Char cDecimalSeparator = (sal_Char)rLocaleWrapper.getNumDecimalSep()[0];
+        SAL_WARN_IF( (sal_Unicode)cDecimalSeparator != rLocaleWrapper.getNumDecimalSep()[0],
+                "svx.form", "FormController::setFilter: wrong cast of decimal separator to sal_Char!");
 
         // retrieving the filter
         const Sequence < PropertyValue >* pRow = aFilterRows.getConstArray();
@@ -3258,7 +3265,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
                                                                     ,xFormatter
                                                                     ,xField
                                                                     ,aAppLocale
-                                                                    ,(sal_Char)aLocaleWrapper.getNumDecimalSep()[0]
+                                                                    ,cDecimalSeparator
                                                                     ,getParseContext());
                                 aRow[(*iter).xText] = sCriteria;
                             }
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index f61a323..94ad6cb 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -329,6 +329,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
                 }
 
                 // the remaming is the locale
+                /* FIXME-BCP47: handle language tags! */
                 Locale aLocale;
                 nSepPos = sDefaultCurrency.indexOf( '-' );
                 if ( nSepPos >= 0 )


More information about the Libreoffice-commits mailing list