summaryrefslogtreecommitdiff
path: root/starmath/source/cfgitem.hxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-10-05 13:59:46 +0000
committerKurt Zenker <kz@openoffice.org>2005-10-05 13:59:46 +0000
commit82dff5c8a1525a265b92085a1ef81b03d6ef21df (patch)
tree17d6459984dcb298a5d3dbed646e0a67f01a6a64 /starmath/source/cfgitem.hxx
parent49f5255c11b65860c66818ec98eb0d6124462bbe (diff)
INTEGRATION: CWS tl12 (1.7.384); FILE MERGED
2005/09/27 01:42:34 tl 1.7.384.2: RESYNC: (1.7-1.8); FILE MERGED 2005/05/02 08:44:09 tl 1.7.384.1: #i44468# have all documents use the same SmSymSetManager
Diffstat (limited to 'starmath/source/cfgitem.hxx')
-rw-r--r--starmath/source/cfgitem.hxx103
1 files changed, 28 insertions, 75 deletions
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 1391658e4991..2e6df5653005 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cfgitem.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 15:04:54 $
+ * last change: $Author: kz $ $Date: 2005-10-05 14:59:46 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -38,6 +38,8 @@
#ifndef _MATH_CFGITEM_HXX_
#define _MATH_CFGITEM_HXX_
+#include <stl/vector>
+
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -72,64 +74,6 @@ struct SmCfgOther;
/////////////////////////////////////////////////////////////////
-class SmMathConfigItem : public utl::ConfigItem
-{
- // disallow copy-constructor and assignment-operator for now
- SmMathConfigItem( const SmMathConfigItem & );
- SmMathConfigItem & operator = ( const SmMathConfigItem & );
-
-public:
- inline SmMathConfigItem( const rtl::OUString &rPath,
- sal_Int16 nMode = CONFIG_MODE_IMMEDIATE_UPDATE );
-
- uno::Sequence< rtl::OUString > GetFormatPropertyNames();
- uno::Sequence< rtl::OUString > GetOtherPropertyNames();
-
- uno::Sequence< uno::Any >
- GetProperties( const uno::Sequence< rtl::OUString > &rNames )
- {
- return ConfigItem::GetProperties(rNames);
- }
-
- sal_Bool
- PutProperties( const uno::Sequence< rtl::OUString > &rNames,
- const uno::Sequence< uno::Any > &rValues)
- {
- return ConfigItem::PutProperties( rNames, rValues);
- }
-
- sal_Bool
- SetSetProperties( const rtl::OUString &rNode,
- uno::Sequence< beans::PropertyValue > rValues )
- {
- return ConfigItem::SetSetProperties( rNode, rValues );
- }
-
- uno::Sequence< rtl::OUString >
- GetNodeNames( const rtl::OUString &rNode )
- {
- return ConfigItem::GetNodeNames( rNode );
- }
-
- sal_Bool
- ReplaceSetProperties( const rtl::OUString& rNode,
- uno::Sequence< beans::PropertyValue > rValues )
- {
- return ConfigItem::ReplaceSetProperties( rNode, rValues );
- }
-};
-
-
-inline SmMathConfigItem::SmMathConfigItem(
- const rtl::OUString &rPath,
- sal_Int16 nMode ) :
- ConfigItem( rPath, nMode )
-{
-}
-
-
-/////////////////////////////////////////////////////////////////
-
struct SmFontFormat
{
@@ -191,14 +135,12 @@ public:
/////////////////////////////////////////////////////////////////
-class SmMathConfig
+class SmMathConfig : public utl::ConfigItem
{
- Timer aSaveTimer;
SmFormat * pFormat;
SmCfgOther * pOther;
SmFontFormatList * pFontFormatList;
- SmSym * pSymbols;
- USHORT nSymbolCount;
+ SmSymSetManager * pSymSetMgr;
BOOL bIsOtherModified;
BOOL bIsFormatModified;
@@ -206,7 +148,6 @@ class SmMathConfig
SmMathConfig( const SmMathConfig & );
SmMathConfig & operator = ( const SmMathConfig & );
- void LoadSymbols();
void LoadOther();
void SaveOther();
@@ -215,22 +156,20 @@ class SmMathConfig
void LoadFontFormatList();
void SaveFontFormatList();
- void StripFontFormatList( const SmSym *pUsedSymbols[], USHORT nCount );
+ void StripFontFormatList( const std::vector< SmSym > &rSymbols );
void Save();
- SmSym ReadSymbol( SmMathConfigItem &rCfg,
+ void ReadSymbol( SmSym &rSymbol,
const rtl::OUString &rSymbolName,
const rtl::OUString &rBaseNode ) const;
- SmFontFormat ReadFontFormat( SmMathConfigItem &rCfg,
+ void ReadFontFormat( SmFontFormat &rFontFormat,
const rtl::OUString &rSymbolName,
const rtl::OUString &rBaseNode ) const;
void SetOtherIfNotEqual( BOOL &rbItem, BOOL bNewVal );
- DECL_LINK( TimeOut, Timer * );
-
protected:
void SetOtherModified( BOOL bVal );
inline BOOL IsOtherModified() const { return bIsOtherModified; }
@@ -245,11 +184,25 @@ protected:
public:
SmMathConfig();
- ~SmMathConfig();
-
- USHORT GetSymbolCount() const;
- const SmSym * GetSymbol( USHORT nIndex ) const;
- void ReplaceSymbols( const SmSym *pNewSymbols[], USHORT nCount );
+ virtual ~SmMathConfig();
+
+ // utl::ConfigItem
+ //virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
+ virtual void Commit();
+
+ // make some protected functions of utl::ConfigItem public
+ //using utl::ConfigItem::GetNodeNames;
+ //using utl::ConfigItem::GetProperties;
+ //using utl::ConfigItem::PutProperties;
+ //using utl::ConfigItem::SetSetProperties;
+ //using utl::ConfigItem::ReplaceSetProperties;
+ //using utl::ConfigItem::GetReadOnlyStates;
+
+ SmSymSetManager & GetSymSetManager();
+ void GetSymbols( std::vector< SmSym > &rSymbols ) const;
+ void SetSymbols( const std::vector< SmSym > &rNewSymbols );
+ USHORT GetSymbolCount() const;
+ const SmSym * GetSymbol( USHORT nIndex ) const;
const SmFormat & GetStandardFormat() const;
void SetStandardFormat( const SmFormat &rFormat );