summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorEike Rathke <er@openoffice.org>2001-11-23 18:25:50 +0000
committerEike Rathke <er@openoffice.org>2001-11-23 18:25:50 +0000
commit2b21eb7d9c738d27b7b93517a31b9e050e7dc37b (patch)
treecadcadb922f041c231cda61d8e9244e7eaa999cc /svx
parent9cc24c70262d39fbc8e01a0169490d9a2667421a (diff)
#94368# get rid of class International
Diffstat (limited to 'svx')
-rw-r--r--svx/source/editeng/eerdll.cxx6
-rw-r--r--svx/source/svdraw/svdattr.cxx8
-rw-r--r--svx/source/svdraw/svdetc.cxx22
-rw-r--r--svx/source/svdraw/svdmodel.cxx58
-rw-r--r--svx/source/svdraw/svdomeas.cxx11
-rw-r--r--svx/source/svdraw/svdtrans.cxx39
6 files changed, 76 insertions, 68 deletions
diff --git a/svx/source/editeng/eerdll.cxx b/svx/source/editeng/eerdll.cxx
index 739724c63434..883a9071ef2f 100644
--- a/svx/source/editeng/eerdll.cxx
+++ b/svx/source/editeng/eerdll.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: eerdll.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: thb $ $Date: 2001-10-17 09:26:51 $
+ * last change: $Author: er $ $Date: 2001-11-23 19:22:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -250,7 +250,7 @@ EditDLL::EditDLL()
#endif
aResMgrName += ByteString::CreateFromInt32( SOLARUPD );
pResMgr = ResMgr::CreateResMgr(
- aResMgrName.GetBuffer(), Application::GetAppInternational().GetLanguage() );
+ aResMgrName.GetBuffer(), Application::GetSettings().GetUILanguage() );
}
EditDLL::~EditDLL()
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index ff02ca7e4a82..25b9a2c070ec 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdattr.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: cl $ $Date: 2001-10-12 10:44:11 $
+ * last change: $Author: er $ $Date: 2001-11-23 19:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1391,11 +1391,11 @@ SfxItemPresentation __EXPORT SdrAngleItem::GetPresentation(
const IntlWrapper* pMyIntlWrapper = NULL;
DBG_ASSERT( pIntlWrapper, "SdrAngleItem::GetPresentation: "
- "using default App-International-IntlWrapper" );
+ "using default App-IntlWrapper" );
if(!pIntlWrapper)
pIntlWrapper = pMyIntlWrapper = new IntlWrapper(
::comphelper::getProcessServiceFactory(),
- GetpApp()->GetAppInternational().GetLanguage() );
+ Application::GetSettings().GetLanguage() );
if(pIntlWrapper->getLocaleData()->isNumLeadingZero())
nAnz++;
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 85034e817f15..4840edb27906 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdetc.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: cl $ $Date: 2001-10-17 15:17:12 $
+ * last change: $Author: er $ $Date: 2001-11-23 19:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -161,6 +161,9 @@
#include <unotools/charclass.hxx>
#endif
+#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
+#include <svtools/syslocale.hxx>
+#endif
/******************************************************************************
@@ -174,11 +177,9 @@ SdrGlobalData::SdrGlobalData() :
pStrCache(NULL),
nExchangeFormat(0)
{
- String aLanguage, aCountry;
- ConvertLanguageToIsoNames( International::GetRealLanguage( LANGUAGE_SYSTEM ), aLanguage, aCountry );
- pLocale = new ::com::sun::star::lang::Locale( aLanguage, aCountry, String() );
- pCharClass = new CharClass( ::comphelper::getProcessServiceFactory(), *pLocale );
- pLocaleData = new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), *pLocale );
+ pSysLocale = new SvtSysLocale;
+ pCharClass = pSysLocale->GetCharClassPtr();
+ pLocaleData = pSysLocale->GetLocaleDataPtr();
}
SdrGlobalData::~SdrGlobalData()
@@ -187,9 +188,8 @@ SdrGlobalData::~SdrGlobalData()
delete pDefaults;
delete pResMgr;
delete [] pStrCache;
- DELETEZ( pLocaleData );
- DELETEZ( pCharClass );
- DELETEZ( pLocale );
+ //! do NOT delete pCharClass and pLocaleData
+ delete pSysLocale;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -756,7 +756,7 @@ ResMgr* ImpGetResMgr()
INT32 nSolarUpd(SOLARUPD);
aName += ByteString::CreateFromInt32( nSolarUpd );
rGlobalData.pResMgr =
- ResMgr::CreateResMgr( aName.GetBuffer(), GetpApp()->GetAppInternational().GetLanguage() );
+ ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILanguage() );
}
return rGlobalData.pResMgr;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index d21a1ba3dfe9..11c05ee1061a 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdmodel.cxx,v $
*
- * $Revision: 1.39 $
+ * $Revision: 1.40 $
*
- * last change: $Author: cl $ $Date: 2001-11-05 14:02:01 $
+ * last change: $Author: er $ $Date: 2001-11-23 19:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,10 +63,6 @@
#include <rtl/logfile.hxx>
#endif
-#ifndef _SV_SVAPP_HXX
-#include <vcl/svapp.hxx>
-#endif
-
#include "svdmodel.hxx"
#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
@@ -160,6 +156,10 @@
#include <tools/tenccvt.hxx>
#endif
+#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
+#include <svtools/syslocale.hxx>
+#endif
+
using namespace ::com::sun::star;
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1273,9 +1273,10 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars)
if(bNeg)
nVal = -nVal;
- International aInter(Application::GetAppInternational());
+ SvtSysLocale aSysLoc;
+ const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData();
sal_Int32 nKomma(nUIUnitKomma);
- sal_Int32 nNumDigits(aInter.GetNumDigits());
+ sal_Int32 nNumDigits(rLoc.getNumDigits());
while(nKomma > nNumDigits)
{
@@ -1315,44 +1316,44 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars)
// Fuer Komma evtl. vorne Nullen dran
sal_Int32 nAnz(nKomma - rStr.Len());
- if(nAnz >= 0 && aInter.IsNumLeadingZero())
+ if(nAnz >= 0 && rLoc.isNumLeadingZero())
nAnz++;
for(sal_Int32 i=0; i<nAnz; i++)
rStr.Insert(sal_Unicode('0'), 0);
}
+ sal_Unicode cDec( rLoc.getNumDecimalSep().GetChar(0) );
+
// KommaChar einfuegen
sal_Int32 nVorKomma(rStr.Len() - nKomma);
if(nKomma > 0)
- {
- sal_Unicode cDec(aInter.GetNumDecimalSep());
-
- rStr.Insert(cDec, (USHORT) nVorKomma);
- }
+ rStr.Insert(cDec, (xub_StrLen) nVorKomma);
- if(!aInter.IsNumTrailingZeros())
+ if(!rLoc.isNumTrailingZeros())
{
while(rStr.Len() && rStr.GetChar(rStr.Len() - 1) == sal_Unicode('0'))
rStr.Erase(rStr.Len() - 1);
- sal_Unicode cDec(aInter.GetNumDecimalSep());
-
if(rStr.Len() && rStr.GetChar(rStr.Len() - 1) == cDec)
rStr.Erase(rStr.Len() - 1);
}
// ggf. Trennpunkte bei jedem Tausender einfuegen
- if(nVorKomma > 3 && aInter.IsNumThousandSep())
+ if( nVorKomma > 3 )
{
- sal_Unicode cDot(aInter.GetNumThousandSep());
- sal_Int32 i(nVorKomma - 3);
-
- while(i > 0) // #78311#
+ String aThoSep( rLoc.getNumThousandSep() );
+ if ( aThoSep.Len() > 0 )
{
- rStr.Insert(cDot, (xub_StrLen)i);
- i -= 3;
+ sal_Unicode cTho( aThoSep.GetChar(0) );
+ sal_Int32 i(nVorKomma - 3);
+
+ while(i > 0) // #78311#
+ {
+ rStr.Insert(cTho, (xub_StrLen)i);
+ i -= 3;
+ }
}
}
@@ -1380,18 +1381,17 @@ void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) con
rStr = UniString::CreateFromInt32(nWink);
- International aInter(Application::GetAppInternational());
+ SvtSysLocale aSysLoc;
+ const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData();
xub_StrLen nAnz(2);
- if(aInter.IsNumLeadingZero())
+ if(rLoc.isNumLeadingZero())
nAnz++;
while(rStr.Len() < nAnz)
rStr.Insert(sal_Unicode('0'), 0);
- sal_Unicode cDec(aInter.GetNumDecimalSep());
-
- rStr.Insert(cDec, rStr.Len() - 2);
+ rStr.Insert(rLoc.getNumDecimalSep().GetChar(0), rStr.Len() - 2);
if(bNeg)
rStr.Insert(sal_Unicode('-'), 0);
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index deae36aab011..c2b53279d23f 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdomeas.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: aw $ $Date: 2001-11-08 18:04:43 $
+ * last change: $Author: er $ $Date: 2001-11-23 19:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -136,6 +136,10 @@
#include "svdopath.hxx"
#include "svdpage.hxx"
+#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
+#include <svtools/syslocale.hxx>
+#endif
+
////////////////////////////////////////////////////////////////////////////////////////////////////
SdrMeasureObjGeoData::SdrMeasureObjGeoData() {}
@@ -235,8 +239,7 @@ void SdrMeasureField::TakeRepresentation(const SdrMeasureObj& rObj, XubString& r
rStr += sal_Unicode('?');
}
- International aInter(GetpApp()->GetAppInternational());
- sal_Unicode cDec(aInter.GetNumDecimalSep());
+ sal_Unicode cDec(SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0));
if(rStr.Search(cDec) != STRING_NOTFOUND)
{
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 5570e30009b5..4fc2899b744c 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdtrans.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cl $ $Date: 2001-05-18 09:40:54 $
+ * last change: $Author: er $ $Date: 2001-11-23 19:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,10 +63,6 @@
#include <math.h>
#include "xpoly.hxx"
-#ifndef _APP_HXX //autogen
-#include <vcl/svapp.hxx>
-#endif
-
#ifndef _VIRDEV_HXX //autogen
#include <vcl/virdev.hxx>
#endif
@@ -79,6 +75,10 @@
#include <tools/debug.hxx>
#endif
+#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
+#include <svtools/syslocale.hxx>
+#endif
+
////////////////////////////////////////////////////////////////////////////////////////////////////
void MoveXPoly(XPolygon& rPoly, const Size& S)
@@ -1002,7 +1002,8 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
// Hier fallen trotzdem evtl. Nachkommastellen weg, wg. MulDiv statt Real
BOOL bNeg(nVal < 0);
- International aInter(GetpApp()->GetAppInternational());
+ SvtSysLocale aSysLoc;
+ const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData();
ForceUndirty();
@@ -1034,14 +1035,14 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
// Komma erforderlich
xub_StrLen nAnz(nK - aStr.Len());
- if(nAnz >= 0 && aInter.IsNumLeadingZero())
+ if(nAnz >= 0 && rLoc.isNumLeadingZero())
nAnz++;
for(xub_StrLen i=0; i<nAnz; i++)
aStr.Insert(aNullCode, 0);
// zuviele Nachkommastellen abhacken
- xub_StrLen nNumDigits(aInter.GetNumDigits());
+ xub_StrLen nNumDigits(rLoc.getNumDigits());
xub_StrLen nWeg(nK - nNumDigits);
if(nWeg > 0)
@@ -1068,21 +1069,25 @@ void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
if(nK > 0)
{
// na, noch Nachkommastellen da?
- sal_Unicode cDec(aInter.GetNumDecimalSep());
+ sal_Unicode cDec(rLoc.getNumDecimalSep().GetChar(0));
aStr.Insert(cDec, nVorKomma);
}
}
// ggf. Trennpunkte bei jedem Tausender einfuegen
- if(nVorKomma > 3 && aInter.IsNumThousandSep())
+ if( nVorKomma > 3 )
{
- sal_Unicode cDot(aInter.GetNumThousandSep());
- xub_StrLen i(nVorKomma - 3);
-
- while(i > 0)
+ String aThoSep( rLoc.getNumThousandSep() );
+ if ( aThoSep.Len() > 0 )
{
- aStr.Insert(cDot, i);
- i -= 3;
+ sal_Unicode cTho( aThoSep.GetChar(0) );
+ sal_Int32 i(nVorKomma - 3);
+
+ while(i > 0)
+ {
+ rStr.Insert(cTho, (xub_StrLen)i);
+ i -= 3;
+ }
}
}