diff options
-rw-r--r-- | sc/inc/document.hxx | 19 | ||||
-rw-r--r-- | sc/inc/dpsdbtab.hxx | 19 | ||||
-rw-r--r-- | sc/source/core/data/documen2.cxx | 11 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/dpsdbtab.cxx | 14 | ||||
-rw-r--r-- | sc/source/filter/excel/excrecds.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/autofmt.cxx | 10 |
8 files changed, 66 insertions, 25 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 7c10373eb2c9..f5c2f380b9aa 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2,9 +2,9 @@ * * $RCSfile: document.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-09-22 18:24:17 $ + * last change: $Author: er $ $Date: 2000-10-19 15:23:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,6 +71,11 @@ #include <vcl/timer.hxx> #endif +#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ +#include <com/sun/star/uno/Reference.hxx> +#endif + + #ifndef SC_TABLE_HXX #include "table.hxx" // FastGetRowHeight (inline) #endif @@ -146,6 +151,12 @@ struct ScConsolidateParam; class ScDPObject; class ScDPCollection; +namespace com { namespace sun { namespace star { + namespace lang { + class XMultiServiceFactory; + } +}}} + #ifdef _ZFORLIST_DECLARE_TABLE class SvULONGTable; @@ -298,6 +309,7 @@ friend class ScAttrRectIterator; friend class ScPivot; private: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager; ScDocumentPool* pDocPool; ScStyleSheetPool* pStylePool; SfxItemPool* pEditPool; // EditTextObjectPool @@ -426,6 +438,9 @@ public: SfxObjectShell* pDocShell = NULL ); ~ScDocument(); + inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > + GetServiceManager() const { return xServiceManager; } + const String& GetName() const { return aDocName; } void SetName( const String& r ) { aDocName = r; } diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx index f45d2cc7547e..69d132a8f448 100644 --- a/sc/inc/dpsdbtab.hxx +++ b/sc/inc/dpsdbtab.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dpsdbtab.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:44:48 $ + * last change: $Author: er $ $Date: 2000-10-19 15:23:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,6 +62,16 @@ #ifndef SC_DPSDBTAB_HXX #define SC_DPSDBTAB_HXX +#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ +#include <com/sun/star/uno/Reference.hxx> +#endif + +namespace com { namespace sun { namespace star { + namespace lang { + class XMultiServiceFactory; + } +}}} + #ifndef SC_DPTABDAT_HXX #include "dptabdat.hxx" #endif @@ -96,7 +106,10 @@ private: void InitAllColumnEntries(); public: - ScDatabaseDPData( const ScImportSourceDesc& rImport ); + ScDatabaseDPData( + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory > xSMgr, + const ScImportSourceDesc& rImport ); virtual ~ScDatabaseDPData(); virtual long GetColumnCount(); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index b0548767360f..733508e66f73 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: documen2.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-09-22 18:44:06 $ + * last change: $Author: er $ $Date: 2000-10-19 15:29:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -261,6 +261,10 @@ #include <svtools/zformat.hxx> #include <vcl/system.hxx> +#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_ +#include <unotools/processfactory.hxx> +#endif + #include "document.hxx" #include "table.hxx" #include "attrib.hxx" @@ -298,6 +302,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : + xServiceManager( ::utl::getProcessServiceFactory() ), pDrawLayer( NULL ), pColorTable( NULL ), bOwner( FALSE ), @@ -376,7 +381,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, pDocPool = new ScDocumentPool; pDocPool->FreezeIdRanges(); pStylePool = new ScStyleSheetPool( *pDocPool, this ); - pFormTable = new SvNumberFormatter( ScGlobal::eLnge ); + pFormTable = new SvNumberFormatter( GetServiceManager(), ScGlobal::eLnge ); aColorLink = LINK(this, ScDocument, GetUserDefinedColor); pFormTable->SetColorLink(&aColorLink); pFormTable->SetEvalDateFormat( NF_EVALDATEFORMAT_INTL_FORMAT ); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 899e68c8a830..5626d4fbcf36 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2,9 +2,9 @@ * * $RCSfile: document.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: nn $ $Date: 2000-10-11 16:38:14 $ + * last change: $Author: er $ $Date: 2000-10-19 15:29:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -3510,7 +3510,7 @@ BOOL ScDocument::LoadPool( SvStream& rStream, BOOL bLoadRefCounts ) delete pEditPool; delete pEnginePool; } - pFormTable = new SvNumberFormatter( ScGlobal::eLnge ); + pFormTable = new SvNumberFormatter( GetServiceManager(), ScGlobal::eLnge ); pFormTable->SetColorLink(&aColorLink); pFormTable->SetEvalDateFormat( NF_EVALDATEFORMAT_INTL_FORMAT ); pDocPool = new ScDocumentPool( NULL, bLoadRefCounts ); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 3acc3749b31b..8610397bf1b5 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dpobject.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-10-09 17:25:08 $ + * last change: $Author: er $ $Date: 2000-10-19 15:29:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -348,7 +348,7 @@ void ScDPObject::CreateObjects() if ( pImpDesc ) { - ScDatabaseDPData* pData = new ScDatabaseDPData( *pImpDesc ); + ScDatabaseDPData* pData = new ScDatabaseDPData( pDoc->GetServiceManager(), *pImpDesc ); xSource = new ScDPSource( pData ); } else if ( pServDesc ) diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx index 72568d95d4d1..3b17ba0d60fa 100644 --- a/sc/source/core/data/dpsdbtab.cxx +++ b/sc/source/core/data/dpsdbtab.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dpsdbtab.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:16:15 $ + * last change: $Author: er $ $Date: 2000-10-19 15:29:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,6 +100,7 @@ using namespace com::sun::star; class ScDatabaseDPData_Impl { public: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager; ScImportSourceDesc aDesc; long nColCount; BOOL bValid; @@ -115,9 +116,12 @@ public: // ----------------------------------------------------------------------- -ScDatabaseDPData::ScDatabaseDPData( const ScImportSourceDesc& rImport ) +ScDatabaseDPData::ScDatabaseDPData( + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr, + const ScImportSourceDesc& rImport ) { pImpl = new ScDatabaseDPData_Impl; + pImpl->xServiceManager = xSMgr; pImpl->aDesc = rImport; pImpl->nColCount = 0; pImpl->bValid = FALSE; @@ -320,7 +324,7 @@ void lcl_FillItemData( ScDPItemData& rData, nNumType = NUMBERFORMAT_DATE; if (!pImpl->pFormatter) - pImpl->pFormatter = new SvNumberFormatter( ScGlobal::eLnge ); + pImpl->pFormatter = new SvNumberFormatter( pImpl->xServiceManager, ScGlobal::eLnge ); util::Date aDate = xRow->getDate(nRowPos); rData.fValue = Date( aDate.Day, aDate.Month, aDate.Year ) - @@ -356,7 +360,7 @@ void lcl_FillItemData( ScDPItemData& rData, if ( rData.bHasValue && bStringForVal ) { if (!pImpl->pFormatter) - pImpl->pFormatter = new SvNumberFormatter( ScGlobal::eLnge ); + pImpl->pFormatter = new SvNumberFormatter( pImpl->xServiceManager, ScGlobal::eLnge ); ULONG nIndex = pImpl->pFormatter->GetStandardFormat( NUMBERFORMAT_DATE, ScGlobal::eLnge ); pImpl->pFormatter->GetInputLineString( rData.fValue, nIndex, rData.aString ); diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index f79f702eed8a..36d6bc391885 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -2,9 +2,9 @@ * * $RCSfile: excrecds.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: gt $ $Date: 2000-09-22 14:54:25 $ + * last change: $Author: er $ $Date: 2000-10-19 15:28:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2517,7 +2517,7 @@ ExcFormat::ExcFormat( RootData* pExcRoot, UINT32 nNewScIndex ) : ExcRoot( pExcRo { // ACHTUNG: nIndex wird hier NICHT gesetzt -> bei Freunden machen! if( !nObjCnt ) - pFormatter = new SvNumberFormatter( LANGUAGE_ENGLISH_US ); + pFormatter = new SvNumberFormatter( pExcRoot->pDoc->GetServiceManager(), LANGUAGE_ENGLISH_US ); nObjCnt++; // Objektzaehler einen hoch diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index cec970d5b1f6..bc23481fe760 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: autofmt.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:45:02 $ + * last change: $Author: er $ $Date: 2000-10-19 15:27:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,6 +82,10 @@ #include <svtools/zforlist.hxx> #include <vcl/msgbox.hxx> +#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_ +#include <unotools/processfactory.hxx> +#endif + #include "sc.hrc" #include "attrib.hxx" #include "zforauto.hxx" @@ -537,7 +541,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes ) : nDataColWidth1 ( (USHORT)(((aPrvSize.Width()-4)-(nLabelColWidth*2)) / 3) ), nDataColWidth2 ( (USHORT)(((aPrvSize.Width()-4)-(nLabelColWidth*2)) / 4) ), nRowHeight ( (USHORT)((aPrvSize.Height()-4) / 5) ), - pNumFmt ( new SvNumberFormatter( ScGlobal::eLnge ) ) + pNumFmt ( new SvNumberFormatter( ::utl::getProcessServiceFactory(), ScGlobal::eLnge ) ) { Init(); if( bIsOlk ) |