no ConfigItem

This commit is contained in:
Niklas Nebel 2000-11-16 12:56:58 +00:00
parent 58942d2ead
commit bcb9cc1018
2 changed files with 15 additions and 75 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: navicfg.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:44:49 $
* last change: $Author: nn $ $Date: 2000-11-16 13:55:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -62,15 +62,16 @@
#ifndef SC_NAVICFG_HXX
#define SC_NAVICFG_HXX
#ifndef _SFXCFGITEM_HXX //autogen
#include <sfx2/cfgitem.hxx>
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
//==================================================================
// CfgItem fuer Navigator-Zustand
//==================================================================
class ScNavipiCfg : public SfxConfigItem
class ScNavipiCfg
{
private:
USHORT nListMode;
@ -80,19 +81,12 @@ private:
public:
ScNavipiCfg();
virtual String GetName() const;
void SetListMode(USHORT nNew);
USHORT GetListMode() const { return nListMode; }
void SetDragMode(USHORT nNew);
USHORT GetDragMode() const { return nDragMode; }
void SetRootType(USHORT nNew);
USHORT GetRootType() const { return nRootType; }
protected:
virtual int Load(SvStream& rStream);
virtual BOOL Store(SvStream& rStream);
virtual void UseDefault();
};

View file

@ -2,9 +2,9 @@
*
* $RCSfile: navicfg.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-19 00:16:18 $
* last change: $Author: nn $ $Date: 2000-11-16 13:56:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -67,67 +67,22 @@
//------------------------------------------------------------------
#include <tools/stream.hxx>
#include "navicfg.hxx"
#include "cfgids.hxx"
#include "scresid.hxx"
#include "sc.hrc"
#define SC_NAVICFG_VERSION 0
//------------------------------------------------------------------
//! #define CFGPATH_NAVIPI "Office.Calc/Navigator"
//------------------------------------------------------------------
ScNavipiCfg::ScNavipiCfg() :
SfxConfigItem( SCCFG_NAVIPI ),
//! ConfigItem( OUString::createFromAscii( CFGPATH_NAVIPI ) ),
nListMode(0),
nDragMode(0),
nRootType(0)
{
}
//------------------------------------------------------------------------
int __EXPORT ScNavipiCfg::Load( SvStream& rStream )
{
SetDefault(FALSE);
USHORT nVer;
rStream >> nVer;
if ( nVer != SC_NAVICFG_VERSION )
return SfxConfigItem::WARNING_VERSION;
rStream >> nListMode;
rStream >> nDragMode;
rStream >> nRootType;
return SfxConfigItem::ERR_OK;
}
//------------------------------------------------------------------------
BOOL __EXPORT ScNavipiCfg::Store( SvStream& rStream)
{
rStream << (USHORT) SC_NAVICFG_VERSION;
rStream << nListMode;
rStream << nDragMode;
rStream << nRootType;
//? SetDefault( FALSE );
return SfxConfigItem::ERR_OK;
}
//------------------------------------------------------------------------
void __EXPORT ScNavipiCfg::UseDefault()
{
nListMode = nDragMode = nRootType = 0;
SetDefault( TRUE );
}
//------------------------------------------------------------------------
void ScNavipiCfg::SetListMode(USHORT nNew)
@ -135,7 +90,7 @@ void ScNavipiCfg::SetListMode(USHORT nNew)
if ( nListMode != nNew )
{
nListMode = nNew;
SetDefault(FALSE);
//! SetModified();
}
}
@ -144,7 +99,7 @@ void ScNavipiCfg::SetDragMode(USHORT nNew)
if ( nDragMode != nNew )
{
nDragMode = nNew;
SetDefault(FALSE);
//! SetModified();
}
}
@ -153,17 +108,8 @@ void ScNavipiCfg::SetRootType(USHORT nNew)
if ( nRootType != nNew )
{
nRootType = nNew;
SetDefault(FALSE);
//! SetModified();
}
}
//------------------------------------------------------------------------
String __EXPORT ScNavipiCfg::GetName() const
{
return String( ScResId( SCSTR_CFG_NAVIPI ) );
}