summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2000-09-29 09:21:10 +0000
committerNiklas Nebel <nn@openoffice.org>2000-09-29 09:21:10 +0000
commit6010cc485af6061bf955d693ab103512b51bf833 (patch)
treee3006869cdb36b111a98d535e71ca91b832feaac /sc/source
parentf063e4d08eddd5493d3295dcf08ce6a3b030e5c8 (diff)
ini manager replaced by options
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/drwlayer.cxx11
-rw-r--r--sc/source/core/data/global2.cxx13
-rw-r--r--sc/source/core/data/globalx.cxx13
-rw-r--r--sc/source/core/tool/chgtrack.cxx13
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx17
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx102
-rw-r--r--sc/source/ui/view/cellsh1.cxx9
-rw-r--r--sc/source/ui/view/notemark.cxx11
-rw-r--r--sc/source/ui/view/viewfun5.cxx9
9 files changed, 62 insertions, 136 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 9324e99d2bbb..6d70a41356ed 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: drwlayer.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: nn $ $Date: 2000-09-22 18:44:06 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:19:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -629,15 +629,12 @@
#include <svx/svdograf.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdundo.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
#include <so3/ipobj.hxx>
#include <so3/svstor.hxx>
-#include <svtools/iniman.hxx>
+#include <svtools/pathoptions.hxx>
#include <svtools/itempool.hxx>
#include <vcl/virdev.hxx>
-#include <tools/shl.hxx>
#include "drwlayer.hxx"
#include "drawpage.hxx"
@@ -765,7 +762,7 @@ inline void TwipsToMM( long& nVal )
ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) :
- FmFormModel( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ),
+ FmFormModel( SvtPathOptions().GetPalettePath(),
NULL, // SfxItemPool* Pool
pGlobalDrawPersist ?
pGlobalDrawPersist :
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index bc065a189793..c5c890f78161 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: global2.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:16:15 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:12:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,10 +68,11 @@
// INCLUDE ---------------------------------------------------------------
#include <sfx2/docfile.hxx>
-#include <sfx2/inimgr.hxx>
#include <sfx2/objsh.hxx>
#include <sdb/sdbstat.hxx> // enum DBObject
#include <svtools/txtcmp.hxx>
+#include <svtools/pathoptions.hxx>
+#include <svtools/useroptions.hxx>
#include <tools/intn.hxx>
#include <unotools/charclass.hxx>
#include <stdlib.h>
@@ -1474,7 +1475,8 @@ void ScPostIt::AutoSetText( const String& rNewText )
// aStrDate += ", ";
// aStrDate += ScGlobal::pScInternational->GetTime( Time() );
- aStrAuthor = SFX_INIMANAGER()->Get( SFX_KEY_USER_ID );
+ SvtUserOptions aUserOpt;
+ aStrAuthor = aUserOpt.GetID();
}
//========================================================================
@@ -1486,7 +1488,8 @@ String ScGlobal::GetAbsDocName( const String& rFileName,
if ( !pShell->HasName() )
{ // maybe relative to document path working directory
INetURLObject aObj;
- aObj.SetSmartURL( SFX_INIMANAGER()->Get( SFX_KEY_WORK_PATH ) );
+ SvtPathOptions aPathOpt;
+ aObj.SetSmartURL( aPathOpt.GetWorkPath() );
aObj.setFinalSlash(); // it IS a path
bool bWasAbs = true;
aAbsName = aObj.smartRel2Abs( rFileName, bWasAbs ).GetMainURL();
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index 459c076fba80..c9e1aeb768af 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: globalx.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:16:15 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:13:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,9 +63,6 @@
#include "callform.hxx"
#include "global.hxx"
-#ifndef _SFX_INIMGR_HXX
-#include <sfx2/inimgr.hxx>
-#endif
#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
#endif
@@ -76,6 +73,9 @@
#include <ucbhelper/content.hxx>
#endif
+#include <tools/debug.hxx>
+#include <svtools/pathoptions.hxx>
+
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -92,7 +92,8 @@ using namespace ::com::sun::star::ucb;
void ScGlobal::InitAddIns()
{
// multi paths separated by semicolons
- String aMultiPath( SFX_INIMANAGER()->Get( SFX_KEY_ADDINS_PATH ) );
+ SvtPathOptions aPathOpt;
+ String aMultiPath = aPathOpt.GetAddinPath();
if ( aMultiPath.Len() > 0 )
{
xub_StrLen nTokens = aMultiPath.GetTokenCount( ';' );
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 6114e49fa54b..47e419c8f826 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: chgtrack.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:16:17 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:13:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,8 +88,8 @@
#ifndef _SFXAPP_HXX //autogen
#include <sfx2/app.hxx>
#endif
-#ifndef _SFX_INIMGR_HXX //autogen
-#include <sfx2/inimgr.hxx>
+#ifndef INCLUDED_SVTOOLS_USEROPTIONS_HXX
+#include <svtools/useroptions.hxx>
#endif
#ifndef _SFXSIDS_HRC //autogen
#include <sfx2/sfxsids.hrc>
@@ -2272,9 +2272,10 @@ void ScChangeTrack::Init()
bInPasteCut = FALSE;
bUseFixDateTime = FALSE;
- aUser = SFX_INIMANAGER()->Get( SFX_KEY_USER_FIRSTNAME );
+ SvtUserOptions aUserOpt;
+ aUser = aUserOpt.GetFirstName();
aUser += ' ';
- aUser += SFX_INIMANAGER()->Get( SFX_KEY_USER_NAME );
+ aUser += aUserOpt.GetLastName();
aUserCollection.Insert( new StrData( aUser ) );
}
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 38379c1c6d39..1965a1f9d3e7 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xcl97rec.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:45:15 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:15:48 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,9 +97,6 @@
#ifndef _TOOLS_SOLMATH_HXX // DoubleToString()
#include <tools/solmath.hxx>
#endif
-#ifndef _SFX_INIMGR_HXX // SFX_INIMAMAGER()
-#include <sfx2/inimgr.hxx>
-#endif
#ifndef _URLOBJ_HXX // INetURLObject
#include <tools/urlobj.hxx>
#endif
@@ -122,6 +119,8 @@
#define ITEMID_FIELD EE_FEATURE_FIELD
#include <svx/flditem.hxx>
+#include <svtools/useroptions.hxx>
+
#include <stdio.h>
#include "document.hxx"
@@ -2494,7 +2493,10 @@ ExcEScenario::ExcEScenario( ScDocument& rDoc, UINT16 nTab )
nRecLen += 3 + sComment.GetByteCount();
if( !sUsername.GetLen() )
- sUsername.Assign( SFX_INIMANAGER()->Get( SFX_KEY_USER_NAME ) );
+ {
+ SvtUserOptions aUserOpt;
+ sUsername.Assign( aUserOpt.GetLastName() );
+ }
if( !sUsername.GetLen() )
sUsername.Assign( String::CreateFromAscii( "SC" ) );
nRecLen += 3 + sUsername.GetByteCount();
@@ -2873,6 +2875,9 @@ UINT16 XclHlink::GetLen() const
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/18 16:45:15 hr
+ initial import
+
Revision 1.32 2000/09/17 14:08:51 willem.vandorp
OpenOffice header added.
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index e63dd567edf8..239f49385b8a 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: scendlg.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:44:54 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:16:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,9 +70,8 @@
#include <svx/xtable.hxx>
#include <sfx2/inimgr.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/iniman.hxx>
+#include <svtools/useroptions.hxx>
#include <vcl/msgbox.hxx>
-#include <segmentc.hxx>
#include "global.hxx"
#include "globstr.hrc"
@@ -83,10 +82,7 @@
#include "scendlg.hrc"
#include "scendlg.hxx"
-SEG_EOFGLOBALS()
-
//========================================================================
-#pragma SEG_FUNCDEF(scendlg_01)
ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit )
@@ -133,10 +129,14 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b
}
}
+ SvtUserOptions aUserOpt;
+
String aComment( ScResId( STR_CREATEDBY ) );
aComment += ' ';
- aComment += SFX_INIMANAGER()->Get( SFX_KEY_USER_NAME );
+ aComment += aUserOpt.GetFirstName();
+ aComment += ' ';
+ aComment += aUserOpt.GetLastName();
aComment.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
aComment += String( ScResId( STR_ON ) );
aComment += ' ';
@@ -170,14 +170,12 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b
}
//------------------------------------------------------------------------
-#pragma SEG_FUNCDEF(scendlg_03)
__EXPORT ScNewScenarioDlg::~ScNewScenarioDlg()
{
}
//------------------------------------------------------------------------
-#pragma SEG_FUNCDEF(scendlg_02)
void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
Color& rColor, USHORT& rFlags ) const
@@ -225,7 +223,6 @@ void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComm
}
//------------------------------------------------------------------------
-#pragma SEG_FUNCDEF(scendlg_04)
IMPL_LINK( ScNewScenarioDlg, OkHdl, OKButton *, EMPTYARG )
{
@@ -256,87 +253,4 @@ IMPL_LINK( ScNewScenarioDlg, OkHdl, OKButton *, EMPTYARG )
//! beim Editieren testen, ob eine andere Tabelle den Namen hat!
}
-/*------------------------------------------------------------------------
-
- $Log: not supported by cvs2svn $
- Revision 1.24 2000/09/17 14:08:57 willem.vandorp
- OpenOffice header added.
-
- Revision 1.23 2000/08/31 16:38:20 willem.vandorp
- Header and footer replaced
-
- Revision 1.22 2000/04/14 17:38:03 nn
- unicode changes
-
- Revision 1.21 2000/02/11 12:24:00 hr
- #70473# changes for unicode ( patched by automated patchtool )
-
- Revision 1.20 1998/03/16 18:23:02 ANK
- Neues Outfit
-
-
- Rev 1.19 16 Mar 1998 19:23:02 ANK
- Neues Outfit
-
- Rev 1.18 10 Mar 1998 22:05:40 NN
- Controls fuer neue Einstellungen
-
- Rev 1.17 08 Mar 1998 21:16:20 NN
- Szenario-Einstellungen
-
- Rev 1.16 05 Dec 1997 19:56:10 ANK
- Includes geaendert
-
- Rev 1.15 29 Oct 1996 14:03:56 NN
- ueberall ScResId statt ResId
-
- Rev 1.14 22 Mar 1996 12:06:16 ER
- GetUserName --> Get SFX_KEY_USER_NAME
-
- Rev 1.13 29 Jan 1996 15:12:30 MO
- neuer Link
-
- Rev 1.12 08 Nov 1995 13:06:24 MO
- 301-Aenderungen
-
- Rev 1.11 26 Jul 1995 08:11:52 STE
- Compilefehler behoben
-
- Rev 1.10 25 Jul 1995 19:15:58 HJS
- GetAppInternational => pInternational
-
- Rev 1.9 24 Jul 1995 14:11:52 MO
- EXPORT
-
- Rev 1.8 04 May 1995 08:16:28 TRI
- pApp -> Application::
-
- Rev 1.7 27 Apr 1995 15:35:48 MO
- Fehlermeldung, wenn TabName ungueltig
-
- Rev 1.6 27 Apr 1995 10:01:16 MO
- Leerzeichn im Namen durch '_' ersetzen
-
- Rev 1.5 31 Mar 1995 10:16:24 MO
- Ueberpruefung auf doppelte Tabellennamen
-
- Rev 1.4 29 Mar 1995 16:39:40 MO
- Defautlname im Ctor
-
- Rev 1.3 28 Mar 1995 17:29:18 MO
- Benutzername ueber Sfx-Inimanager
-
- Rev 1.2 24 Mar 1995 13:27:14 TRI
- Segmentierung
-
- Rev 1.1 21 Mar 1995 14:09:44 TRI
- sfx.hxx included
-
- Rev 1.0 20 Mar 1995 16:46:08 MO
- Dialog zum Anlegen eines Szenarios
-
------------------------------------------------------------------------- */
-
-#pragma SEG_EOFMODULE
-
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index d9510d0fce88..6846befc8dbf 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cellsh1.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:45:08 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:18:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -102,6 +102,7 @@
#include <sfx2/passwd.hxx>
#include <svx/hlnkitem.hxx>
#include <svtools/sbxcore.hxx>
+#include <svtools/useroptions.hxx>
#include <vcl/waitobj.hxx>
#include "cellsh.hxx"
@@ -1587,10 +1588,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_RANGE_NOTETEXT:
if (pReqArgs)
{
+ SvtUserOptions aUserOpt;
+
String aNoteStr = ((const SfxStringItem&)pReqArgs->
Get( SID_RANGE_NOTETEXT )).GetValue();
String aDateStr = ScGlobal::pScInternational->GetDate( Date() );
- String aAuthorStr = SFX_INIMANAGER()->Get(SFX_KEY_USER_ID);
+ String aAuthorStr = aUserOpt.GetID();
ScPostIt aNote( aNoteStr, aDateStr, aAuthorStr );
USHORT nCol, nRow, nTab;
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 29d90cf4437b..68ca2583ead5 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: notemark.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:45:09 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:19:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,9 +71,8 @@
#include <svx/svdmodel.hxx>
#include <svx/svdobj.hxx>
#include <svx/xoutx.hxx>
-#include <sfx2/app.hxx>
#include <sfx2/printer.hxx>
-#include <svtools/iniman.hxx>
+#include <svtools/pathoptions.hxx>
#include <svtools/itempool.hxx>
#include "notemark.hxx"
@@ -119,7 +118,9 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, pTimer )
{
if (!bVisible)
{
- pModel = new SdrModel(SFX_APP()->GetAppIniManager()->Get(SFX_KEY_PALETTE_PATH));
+ SvtPathOptions aPathOpt;
+ String aPath = aPathOpt.GetPalettePath();
+ pModel = new SdrModel(aPath);
pModel->SetScaleUnit(MAP_100TH_MM);
SfxItemPool& rPool = pModel->GetItemPool();
rPool.SetDefaultMetric(SFX_MAPUNIT_100TH_MM);
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 1e315c5ec09b..ffbda17b020b 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewfun5.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: nn $ $Date: 2000-09-22 18:26:47 $
+ * last change: $Author: nn $ $Date: 2000-09-29 10:21:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -382,7 +382,7 @@
#include <offmgr/app.hxx>
#include <so3/clsids.hxx>
#include <sot/formats.hxx>
-#include <svtools/iniman.hxx>
+#include <svtools/pathoptions.hxx>
#include <svtools/ptitem.hxx>
#include <svtools/stritem.hxx>
#include <vcl/drag.hxx>
@@ -567,7 +567,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, SvDataObject* pObject,
{
MakeDrawLayer(); // vorher, damit die 3D-Factory angelegt ist
- String aPath = SFX_APP()->GetAppIniManager()->Get(SFX_KEY_PALETTE_PATH);
+ SvtPathOptions aPathOpt;
+ String aPath = aPathOpt.GetPalettePath();
FmFormModel* pModel = new FmFormModel(
aPath, NULL, GetViewData()->GetDocShell() );
pModel->GetItemPool().FreezeIdRanges();