summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/docstyle.cxx3
-rw-r--r--sw/source/ui/config/usrpref.cxx4
-rw-r--r--sw/source/ui/config/viewopt.cxx3
-rw-r--r--sw/source/ui/docvw/edtwin.cxx7
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx3
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx20
-rw-r--r--sw/source/ui/utlui/initui.cxx3
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx2
-rw-r--r--sw/source/ui/utlui/uitool.cxx3
10 files changed, 35 insertions, 15 deletions
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 41814d006339..7841176d47e1 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -37,6 +37,7 @@
#include <hintids.hxx>
#include <svtools/itemiter.hxx>
#include <svtools/eitem.hxx>
+#include <svtools/syslocale.hxx>
#include <svx/boxitem.hxx>
#include <svx/numitem.hxx>
// --> OD 2008-02-13 #newlistlevelattrs#
@@ -609,7 +610,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
{
IntlWrapper aIntlWrapper(
::comphelper::getProcessServiceFactory(),
- GetAppLocaleData().getLocale());
+ SvtSysLocale().GetLocaleData().getLocale());
String sPlus(String::CreateFromAscii(" + "));
if ( SFX_STYLE_FAMILY_PAGE == nFamily )
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index e4b232269cc5..1170f3506b31 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -33,7 +33,7 @@
#include <tools/stream.hxx>
-
+#include <svtools/syslocale.hxx>
#include "swtypes.hxx"
#include "hintids.hxx"
@@ -72,7 +72,7 @@ SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) :
aCursorConfig(*this),
pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0)
{
- MeasurementSystem eSystem = GetAppLocaleData().getMeasurementSystemEnum();
+ MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
eHScrollMetric = eUserMetric;
eVScrollMetric = eUserMetric;
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index af43528016f9..661a73f312ad 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -58,6 +58,7 @@
#include <crstate.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/accessibilityoptions.hxx>
+#include <svtools/syslocale.hxx>
#include <svx/acorrcfg.hxx>
@@ -237,7 +238,7 @@ SwViewOption::SwViewOption() :
nCore2Options = VIEWOPT_CORE2_BLACKFONT | VIEWOPT_CORE2_HIDDENPARA;
nUIOptions = VIEWOPT_2_MODIFIED | VIEWOPT_2_GRFKEEPZOOM |VIEWOPT_2_ANY_RULER;
- if(MEASURE_METRIC != GetAppLocaleData().getMeasurementSystemEnum())
+ if(MEASURE_METRIC != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum())
aSnapSize.Width() = aSnapSize.Height() = 720; // 1/2"
else
aSnapSize.Width() = aSnapSize.Height() = 567; // 1 cm
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index e27e6eb477c2..7d8e38443ca0 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -5568,11 +5568,12 @@ void QuickHelpData::Stop( SwWrtShell& rSh )
void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
{
- pCalendarWrapper->LoadDefaultCalendar( rSh.GetCurLang() );
+ salhelper::SingletonRef<SwCalendarWrapper>* pCalendar = s_getCalendarWrapper();
+ (*pCalendar)->LoadDefaultCalendar( rSh.GetCurLang() );
{
uno::Sequence< i18n::CalendarItem > aNames(
- pCalendarWrapper->getMonths() );
+ (*pCalendar)->getMonths() );
for( int n = 0; n < 2; ++n )
{
for( long nPos = 0, nEnd = aNames.getLength(); nPos < nEnd; ++nPos )
@@ -5592,7 +5593,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
}
}
if( !n ) // get data for the second loop
- aNames = pCalendarWrapper->getDays();
+ aNames = (*pCalendar)->getDays();
}
}
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index f35efbe41253..dfb7823a1216 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1615,7 +1615,7 @@ USHORT SwFldMgr::GetCurrLanguage() const
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if( pSh )
return pSh->GetCurLang();
- return SvxLocaleToLanguage( GetAppLocaleData().getLocale() );
+ return SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
}
void SwFieldType::_GetFldName()
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 5ea6c1012baf..3f0c634f2b24 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -48,6 +48,7 @@
#include <vcl/field.hxx>
#include <vcl/svapp.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <svtools/syslocale.hxx>
#include <svx/sizeitem.hxx>
#include <svx/pageitem.hxx>
#include <svtools/eitem.hxx>
@@ -183,7 +184,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
SetMetric( aMaxHeightEdit, aMetric );
SetMetric( aDistEdit, aMetric );
SetMetric( aLineDistEdit, aMetric );
- MeasurementSystem eSys = GetAppLocaleData().getMeasurementSystemEnum();
+ MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134;
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP);;
}
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 04a26d47b324..db81543fb883 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -81,7 +81,13 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/document/RedlineDisplayType.hpp>
+#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/script/XInvocation.hpp>
+#include <com/sun/star/reflection/XIdlClassProvider.hpp>
#include <svx/linkmgr.hxx>
#include <svx/unofill.hxx>
#include <svx/unolingu.hxx>
@@ -236,15 +242,23 @@ sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rI
Any SAL_CALL SwXTextDocument::queryInterface( const uno::Type& rType ) throw(RuntimeException)
{
Any aRet = SwXTextDocumentBaseClass::queryInterface(rType);
- if(aRet.getValueType() == getVoidCppuType())
+ if ( !aRet.hasValue() )
aRet = SfxBaseModel::queryInterface(rType);
- if(aRet.getValueType() == getVoidCppuType() &&
+ if ( !aRet.hasValue() &&
rType == ::getCppuType((Reference<lang::XMultiServiceFactory>*)0))
{
Reference<lang::XMultiServiceFactory> xTmp = this;
aRet <<= xTmp;
}
- if(aRet.getValueType() == getVoidCppuType())
+
+ if ( !aRet.hasValue()
+ && rType != ::getCppuType((Reference< com::sun::star::document::XDocumentEventBroadcaster>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::frame::XController>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::frame::XFrame>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::script::XInvocation>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::reflection::XIdlClassProvider>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::beans::XFastPropertySet>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::awt::XWindow>*)0))
{
GetNumberFormatter();
if(xNumFmtAgg.is())
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 98224a81edde..275b49a4c9e4 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -54,6 +54,7 @@
#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
#endif
+#include <svtools/syslocale.hxx>
#include <unomid.h>
@@ -261,7 +262,7 @@ ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
p->SearchAndReplace(C2S("%1"), C2S(",,"));
p->SearchAndReplace(C2S("%2"), C2S("''"));
#else
- LocaleDataWrapper& rLclD = GetAppLocaleData();
+ const LocaleDataWrapper& rLclD = SvtSysLocale().GetLocaleData();
//unter richtigen Betriebssystemen funktioniert es auch so
p->SearchAndReplace(C2S("%1"), rLclD.getDoubleQuotationMarkStart());
p->SearchAndReplace(C2S("%2"), rLclD.getDoubleQuotationMarkEnd());
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index 38a4aa9a85e8..5a0030d9dd85 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -120,7 +120,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
if (pView)
eCurLanguage = pView->GetWrtShell().GetCurLang();
else
- eCurLanguage = SvxLocaleToLanguage( GetAppLocaleData().getLocale() );
+ eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
if (bUsrFmts == FALSE)
{
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index fb64e51c97f8..cb6a3888d45f 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -39,6 +39,7 @@
#include <unotools/collatorwrapper.hxx>
#include <svtools/urihelper.hxx>
#include <svtools/stritem.hxx>
+#include <svtools/syslocale.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
@@ -732,7 +733,7 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
String GetAppLangDateTimeString( const DateTime& rDT )
{
- LocaleDataWrapper& rAppLclData = GetAppLocaleData();
+ const LocaleDataWrapper& rAppLclData = SvtSysLocale().GetLocaleData();
String sRet( rAppLclData.getDate( rDT ));
( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
return sRet;