INTEGRATION: CWS dr52 (1.5.58); FILE MERGED
2007/01/05 16:06:26 dr 1.5.58.2: #i51348# load drawing object names 2006/12/21 12:46:45 dr 1.5.58.1: merge dumper changes from CWS chart2mst3
This commit is contained in:
parent
5c6815d398
commit
5ec61e629a
1 changed files with 67 additions and 33 deletions
|
@ -4,9 +4,9 @@
|
||||||
*
|
*
|
||||||
* $RCSfile: fdumper.hxx,v $
|
* $RCSfile: fdumper.hxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
*
|
*
|
||||||
* last change: $Author: ihi $ $Date: 2006-10-18 11:45:17 $
|
* last change: $Author: obo $ $Date: 2007-01-22 13:19:59 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to
|
* The Contents of this file are made available subject to
|
||||||
* the terms of GNU Lesser General Public License Version 2.1.
|
* the terms of GNU Lesser General Public License Version 2.1.
|
||||||
|
@ -275,6 +275,11 @@ public:
|
||||||
|
|
||||||
static void ConvertStringToStringList( ScfStringVec& rVec, const String& rData, bool bIgnoreEmpty );
|
static void ConvertStringToStringList( ScfStringVec& rVec, const String& rData, bool bIgnoreEmpty );
|
||||||
static void ConvertStringToIntList( ScfInt64Vec& rVec, const String& rData, bool bIgnoreEmpty );
|
static void ConvertStringToIntList( ScfInt64Vec& rVec, const String& rData, bool bIgnoreEmpty );
|
||||||
|
|
||||||
|
// file names -------------------------------------------------------------
|
||||||
|
|
||||||
|
static String ConvertFileNameToUrl( const String& rFileName );
|
||||||
|
static xub_StrLen GetFileNamePos( const String& rFileUrl );
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -348,12 +353,18 @@ typedef ScfRef< Base > BaseRef;
|
||||||
|
|
|
|
||||||
+----> ObjectBase
|
+----> ObjectBase
|
||||||
|
|
|
|
||||||
+----> InputObjectBase ----> StreamObjectBase
|
+----> InputObjectBase
|
||||||
| |
|
| |
|
||||||
| +----> SvStreamObject
|
| +----> StreamObjectBase
|
||||||
| +----> OleStreamObject
|
| | |
|
||||||
| +----> WrappedStreamObject
|
| | +----> SvStreamObject
|
||||||
|
| | +----> OleStreamObject
|
||||||
|
| | +----> WrappedStreamObject
|
||||||
|
| |
|
||||||
|
| +----> RecordHeaderBase
|
||||||
|
|
|
||||||
+----> OleStorageObject
|
+----> OleStorageObject
|
||||||
|
+----> DumperBase
|
||||||
*/
|
*/
|
||||||
class Base
|
class Base
|
||||||
{
|
{
|
||||||
|
@ -397,15 +408,6 @@ private:
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
template< typename KeyType >
|
|
||||||
struct NamedKey
|
|
||||||
{
|
|
||||||
KeyType mnKey;
|
|
||||||
const sal_Char* mpcName;
|
|
||||||
};
|
|
||||||
|
|
||||||
// ============================================================================
|
|
||||||
|
|
||||||
class ConfigCoreData;
|
class ConfigCoreData;
|
||||||
class Config;
|
class Config;
|
||||||
|
|
||||||
|
@ -414,7 +416,7 @@ typedef ScfRef< NameListBase > NameListRef;
|
||||||
|
|
||||||
/** Base class of all classes providing names for specific values (name lists).
|
/** Base class of all classes providing names for specific values (name lists).
|
||||||
|
|
||||||
The ides is to provide a unique interfase for all different methods to
|
The idea is to provide a unique interfase for all different methods to
|
||||||
write specific names for any values. This can be enumerations (dedicated
|
write specific names for any values. This can be enumerations (dedicated
|
||||||
names for a subset of values), or names for bits in bit fields. Classes
|
names for a subset of values), or names for bits in bit fields. Classes
|
||||||
derived from this base class implement the specific behaviour for the
|
derived from this base class implement the specific behaviour for the
|
||||||
|
@ -430,9 +432,6 @@ public:
|
||||||
|
|
||||||
/** Sets a name for the specified key. */
|
/** Sets a name for the specified key. */
|
||||||
void SetName( sal_Int64 nKey, const StringWrapper& rNameWrp );
|
void SetName( sal_Int64 nKey, const StringWrapper& rNameWrp );
|
||||||
/** Sets names for a list of keys. Must be terminated by an entry with null pointer as name. */
|
|
||||||
template< typename Type >
|
|
||||||
void SetNames( const NamedKey< Type >* pNames );
|
|
||||||
/** Include all names of the passed list. */
|
/** Include all names of the passed list. */
|
||||||
void IncludeList( NameListRef xList );
|
void IncludeList( NameListRef xList );
|
||||||
|
|
||||||
|
@ -487,15 +486,6 @@ private:
|
||||||
const ConfigCoreData& mrCoreData;
|
const ConfigCoreData& mrCoreData;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
template< typename Type >
|
|
||||||
void NameListBase::SetNames( const NamedKey< Type >* pNames )
|
|
||||||
{
|
|
||||||
for( const NamedKey< Type >* pName = pNames; pName && pName->mpcName; ++pName )
|
|
||||||
SetName( static_cast< sal_Int64 >( pName->mnKey ), String( pName->mpcName, RTL_TEXTENCODING_UTF8 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
class ConstList : public NameListBase
|
class ConstList : public NameListBase
|
||||||
|
@ -671,6 +661,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
void ConstructOwn();
|
void ConstructOwn();
|
||||||
|
|
||||||
|
bool ReadConfigFile( const String& rFileUrl );
|
||||||
template< typename ListType >
|
template< typename ListType >
|
||||||
void ReadNameList( SvStream& rStrm, const String& rListName );
|
void ReadNameList( SvStream& rStrm, const String& rListName );
|
||||||
void CreateShortList( const String& rData );
|
void CreateShortList( const String& rData );
|
||||||
|
@ -682,6 +673,7 @@ private:
|
||||||
|
|
||||||
ConfigDataMap maConfigData;
|
ConfigDataMap maConfigData;
|
||||||
NameListMap maNameLists;
|
NameListMap maNameLists;
|
||||||
|
String maConfigPath;
|
||||||
bool mbLoaded;
|
bool mbLoaded;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -816,7 +808,7 @@ typedef ScfRef< CoreData > CoreDataRef;
|
||||||
class Input : public Base
|
class Input : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual sal_Size Size() const = 0;
|
virtual sal_Size GetSize() const = 0;
|
||||||
virtual sal_Size Tell() const = 0;
|
virtual sal_Size Tell() const = 0;
|
||||||
virtual void Seek( sal_Size nPos ) = 0;
|
virtual void Seek( sal_Size nPos ) = 0;
|
||||||
virtual void SeekRel( sal_sSize nRelPos ) = 0;
|
virtual void SeekRel( sal_sSize nRelPos ) = 0;
|
||||||
|
@ -832,7 +824,7 @@ public:
|
||||||
virtual Input& operator>>( float& rfData ) = 0;
|
virtual Input& operator>>( float& rfData ) = 0;
|
||||||
virtual Input& operator>>( double& rfData ) = 0;
|
virtual Input& operator>>( double& rfData ) = 0;
|
||||||
|
|
||||||
inline bool IsValidPos() const { return Tell() < Size(); }
|
inline bool IsValidPos() const { return Tell() < GetSize(); }
|
||||||
template< typename Type >
|
template< typename Type >
|
||||||
inline Type ReadValue() { Type nValue; *this >> nValue; return nValue; }
|
inline Type ReadValue() { Type nValue; *this >> nValue; return nValue; }
|
||||||
|
|
||||||
|
@ -853,7 +845,7 @@ public:
|
||||||
explicit SvStreamInput( SvStream& rStrm );
|
explicit SvStreamInput( SvStream& rStrm );
|
||||||
virtual ~SvStreamInput();
|
virtual ~SvStreamInput();
|
||||||
|
|
||||||
virtual sal_Size Size() const;
|
virtual sal_Size GetSize() const;
|
||||||
virtual sal_Size Tell() const;
|
virtual sal_Size Tell() const;
|
||||||
virtual void Seek( sal_Size nPos );
|
virtual void Seek( sal_Size nPos );
|
||||||
virtual void SeekRel( sal_sSize nRelPos );
|
virtual void SeekRel( sal_sSize nRelPos );
|
||||||
|
@ -1206,7 +1198,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
inline explicit InputObjectBase() {}
|
inline explicit InputObjectBase() {}
|
||||||
void Construct( const ObjectBase& rParent, InputRef xIn );
|
void Construct( const ObjectBase& rParent, InputRef xIn );
|
||||||
void Construct( InputObjectBase& rParent );
|
void Construct( const InputObjectBase& rParent );
|
||||||
|
|
||||||
virtual bool ImplIsValid() const;
|
virtual bool ImplIsValid() const;
|
||||||
virtual InputRef ImplReconstructInput();
|
virtual InputRef ImplReconstructInput();
|
||||||
|
@ -1454,6 +1446,48 @@ private:
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
struct RecordHeaderConfigInfo
|
||||||
|
{
|
||||||
|
const sal_Char* mpcRecNames;
|
||||||
|
const sal_Char* mpcShowRecPos;
|
||||||
|
const sal_Char* mpcShowRecSize;
|
||||||
|
const sal_Char* mpcShowRecId;
|
||||||
|
const sal_Char* mpcShowRecName;
|
||||||
|
const sal_Char* mpcShowRecBody;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class RecordHeaderBase : public InputObjectBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~RecordHeaderBase();
|
||||||
|
|
||||||
|
inline NameListRef GetRecNames() const { return mxRecNames; }
|
||||||
|
inline bool IsShowRecPos() const { return mbShowRecPos; }
|
||||||
|
inline bool IsShowRecSize() const { return mbShowRecSize; }
|
||||||
|
inline bool IsShowRecId() const { return mbShowRecId; }
|
||||||
|
inline bool IsShowRecName() const { return mbShowRecName; }
|
||||||
|
inline bool IsShowRecBody() const { return mbShowRecBody; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
inline explicit RecordHeaderBase() {}
|
||||||
|
void Construct( const InputObjectBase& rParent, const RecordHeaderConfigInfo& rCfgInfo );
|
||||||
|
|
||||||
|
virtual bool ImplIsValid() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
NameListRef mxRecNames;
|
||||||
|
bool mbShowRecPos;
|
||||||
|
bool mbShowRecSize;
|
||||||
|
bool mbShowRecId;
|
||||||
|
bool mbShowRecName;
|
||||||
|
bool mbShowRecBody;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
class DumperBase : public ObjectBase
|
class DumperBase : public ObjectBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue