initial import

This commit is contained in:
Jens-Heiner Rechtien
2000-09-18 16:15:01 +00:00
parent d791366863
commit 7b0b5cdfee
952 changed files with 522032 additions and 0 deletions
+105
View File
@@ -0,0 +1,105 @@
/*************************************************************************
*
* $RCSfile: acmplwrd.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _ACMPLWRD_HXX
#define _ACMPLWRD_HXX
#define _SVSTDARR_STRINGSISORTDTOR
#include <svtools/svstdarr.hxx>
class SwAutoCompleteWord
{
SvStringsISortDtor aWordLst;
SvPtrarr aLRULst;
USHORT nMaxCount, nMinWrdLen;
BOOL bLockWordLst;
public:
SwAutoCompleteWord( USHORT nWords = 500, USHORT nMWrdLen = 10 );
~SwAutoCompleteWord();
BOOL InsertWord( const String& rWord );
BOOL RemoveWord( const String& rWord );
BOOL SearchWord( const String& rWord, USHORT* pFndPos = 0 ) const;
BOOL GetRange( const String& rWord, USHORT& rStt, USHORT& rEnd ) const;
BOOL SetToTop( const String& rWord );
USHORT Count() const { return aWordLst.Count(); }
const String& operator[]( USHORT n ) const { return *aWordLst[ n ]; }
BOOL IsLockWordLstLocked() const { return bLockWordLst; }
void SetLockWordLstLocked( BOOL bFlag ) { bLockWordLst = bFlag; }
USHORT GetMaxCount() const { return nMaxCount; }
void SetMaxCount( USHORT n );
USHORT GetMinWordLen() const { return nMinWrdLen; }
void SetMinWordLen( USHORT n );
const SvStringsISortDtor& GetWordList() const { return aWordLst; }
void CheckChangedList( const SvStringsISortDtor& rNewLst );
};
#endif
+222
View File
@@ -0,0 +1,222 @@
/*************************************************************************
*
* $RCSfile: authfld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _AUTHFLD_HXX
#define _AUTHFLD_HXX
#ifndef _FLDBAS_HXX
#include <fldbas.hxx>
#endif
#ifndef _TOXE_HXX
#include <toxe.hxx>
#endif
class SwAuthDataArr;
/* -----------------21.09.99 13:32-------------------
--------------------------------------------------*/
class SwAuthEntry
{
String aAuthFields[AUTH_FIELD_END];
USHORT nRefCount;
public:
SwAuthEntry() : nRefCount(0){}
SwAuthEntry( const SwAuthEntry& rCopy );
BOOL operator==(const SwAuthEntry& rComp);
BOOL GetFirstAuthorField(USHORT& nPos, String& rToFill)const;
BOOL GetNextAuthorField(USHORT& nPos, String& rToFill)const;
inline const String& GetAuthorField(ToxAuthorityField ePos)const;
inline void SetAuthorField(ToxAuthorityField ePos,
const String& rField);
void AddRef() { ++nRefCount; }
void RemoveRef() { --nRefCount; }
USHORT GetRefCount() { return nRefCount; }
};
/* -----------------20.10.99 16:49-------------------
--------------------------------------------------*/
struct SwTOXSortKey
{
ToxAuthorityField eField;
BOOL bSortAscending;
SwTOXSortKey() :
eField(AUTH_FIELD_END),
bSortAscending(TRUE){}
};
/* -----------------14.09.99 16:15-------------------
--------------------------------------------------*/
class SvUShorts;
class SwAuthorityField;
class SvLongs;
class SortKeyArr;
class SwAuthorityFieldType : public SwFieldType
{
SwDoc* m_pDoc;
SwAuthDataArr* m_pDataArr;
SvLongs* m_pSequArr;
SortKeyArr* m_pSortKeyArr;
char m_cPrefix;
char m_cSuffix;
BOOL m_bIsSequence :1;
BOOL m_bSortByDocument :1;
const SwAuthorityFieldType& operator=( const SwAuthorityFieldType& );
public:
SwAuthorityFieldType(SwDoc* pDoc);
SwAuthorityFieldType( const SwAuthorityFieldType& );
~SwAuthorityFieldType();
virtual SwFieldType* Copy() const;
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
inline SwDoc* GetDoc() const { return m_pDoc; }
inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
void RemoveField(long nHandle);
long AddField(const String& rFieldContents);
BOOL AddField(long nHandle);
const SwAuthEntry* GetEntryByHandle(long nHandle) const;
void GetAllEntryIdentifiers( SvStringsDtor& rToFill )const;
const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const;
void ChangeEntryContent(const SwAuthEntry* pNewEntry);
// import interface
USHORT AppendField(const SwAuthEntry& rInsert);
void MergeFieldType(const SwAuthorityFieldType& rNew, SvUShorts& rMap);
void RemoveUnusedFields();
long GetHandle(USHORT nPos);
USHORT GetPosition(long nHandle);
USHORT GetEntryCount() const;
const SwAuthEntry* GetEntryByPosition(USHORT nPos) const;
USHORT GetSequencePos(long nHandle);
BOOL IsSequence() const {return m_bIsSequence;}
void SetSequence(BOOL bSet) {m_bIsSequence = bSet;}
void SetPreSuffix(char cPre, char cSuf)
{
m_cPrefix = cPre;
m_cSuffix = cSuf;
}
char GetPrefix() const { return m_cPrefix;}
char GetSuffix() const { return m_cSuffix;}
BOOL IsSortByDocument() const {return m_bSortByDocument;}
void SetSortByDocument(BOOL bSet) {m_bSortByDocument = bSet;}
USHORT GetSortKeyCount() const ;
const SwTOXSortKey* GetSortKey(USHORT nIdx) const ;
void SetSortKeys(USHORT nKeyCount, SwTOXSortKey nKeys[]);
//initui.cxx
static const String& GetAuthFieldName(ToxAuthorityField eType);
static const String& GetAuthTypeName(ToxAuthorityType eType);
};
/* -----------------14.09.99 16:15-------------------
--------------------------------------------------*/
class SwAuthorityField : public SwField
{
long nHandle;
public:
SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents);
SwAuthorityField(SwAuthorityFieldType* pType, long nHandle);
~SwAuthorityField();
const String& GetFieldText(ToxAuthorityField eField) const;
virtual String Expand() const;
virtual SwField* Copy() const;
virtual void SetPar1(const String& rStr);
virtual SwFieldType* ChgTyp( SwFieldType* );
long GetHandle() const { return nHandle; }
//import interface
USHORT GetHandlePosition() const;
};
// --- inlines -----------------------------------------------------------
inline const String& SwAuthEntry::GetAuthorField(ToxAuthorityField ePos)const
{
if(AUTH_FIELD_END > ePos)
return aAuthFields[ePos];
else
return aEmptyStr;
}
inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const String& rField)
{
if(AUTH_FIELD_END > ePos)
aAuthFields[ePos] = rField;
}
#endif
+92
View File
@@ -0,0 +1,92 @@
/*************************************************************************
*
* $RCSfile: authratr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _AUTHRATR_HXX
#define _AUTHRATR_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
#ifndef _SV_COLOR_HXX //autogen
#include <vcl/color.hxx>
#endif
#define COL_NONE TRGB_COLORDATA( 0x80, 0xFF, 0xFF, 0xFF )
class AuthorCharAttr
{
public:
USHORT nItemId;
USHORT nAttr;
ULONG nColor;
AuthorCharAttr();
inline BOOL operator == ( const AuthorCharAttr& rAttr ) const
{
return nItemId == rAttr.nItemId && nAttr == rAttr.nAttr &&
nColor == rAttr.nColor;
}
};
#endif
+177
View File
@@ -0,0 +1,177 @@
/*************************************************************************
*
* $RCSfile: bookmrk.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _BOOKMRK_HXX
#define _BOOKMRK_HXX
#include "hintids.hxx" //die Ids der Attribute, vor macitem damit die
//die Attribut richtig angezogen werden.
#ifndef _SFXMACITEM_HXX
#include <svtools/macitem.hxx>
#endif
#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
#endif
#ifndef _SO2REF_HXX //autogen
#include <so3/so2ref.hxx>
#endif
#ifndef _BKMRKE_HXX //autogen
#include <bkmrke.hxx>
#endif
#include "calbck.hxx"
#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
#define SW_DECL_SWSERVEROBJECT_DEFINED
class SvPseudoObject;
SO2_DECL_REF( SwServerObject )
#endif
struct SwPosition; // fwd Decl. wg. UI
class SwBookmark : public SwModify
{
friend class SwDoc; // fuers Loeschen
friend class Sw3IoImp; // fuers Setzen der Position(en)
SwPosition *pPos1, *pPos2; // wird im CTOR gesetzt, im DTOR geloescht
SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt
protected:
SvxMacro aStartMacro;
SvxMacro aEndMacro;
String aName;
String aShortName;
KeyCode aCode;
BOOKMARK_TYPE eMarkType;
public:
TYPEINFO();
SwBookmark(const SwPosition& aPos);
SwBookmark(const SwPosition& aPos,
const KeyCode& rCode,
const String& rName, const String& rShortName);
// Beim Loeschen von Text werden Bookmarks mitgeloescht!
~SwBookmark();
const SwPosition& GetPos() const { return *pPos1; }
const SwPosition* GetOtherPos() const { return pPos2; }
// nicht undofaehig
void SetName(const String& rNewName) { aName = rNewName; }
const String& GetName() const { return aName; }
// nicht undofaehig
void SetShortName(const String& rNewSName) { aShortName = rNewSName; }
const String& GetShortName() const { return aShortName; }
// nicht undofaehig
void SetKeyCode(const KeyCode& rNewCode) { aCode = rNewCode; }
const KeyCode& GetKeyCode() const { return aCode; }
// Vergleiche auf Basis der Dokumentposition
BOOL operator < (const SwBookmark &) const;
BOOL operator ==(const SwBookmark &) const;
// falls man wirklich auf gleiche Position abfragen will.
BOOL IsEqualPos( const SwBookmark &rBM ) const;
BOOL IsBookMark() const { return BOOKMARK == eMarkType; }
BOOL IsMark() const { return MARK == eMarkType; }
BOOL IsDDEMark() const { return DDE_BOOKMARK == eMarkType; }
BOOL IsUNOMark() const { return UNO_BOOKMARK == eMarkType; }
void SetType( BOOKMARK_TYPE eNewType ) { eMarkType = eNewType; }
void SetStartMacro(const SvxMacro& rSt) { aStartMacro = rSt; }
const SvxMacro& GetStartMacro() { return aStartMacro; }
void SetEndMacro(const SvxMacro& rSt) { aEndMacro = rSt; }
const SvxMacro& GetEndMacro() { return aEndMacro; }
// Daten Server-Methoden
void SetRefObject( SvPseudoObject* pObj );
const SwServerObject* GetObject() const { return &refObj; }
SwServerObject* GetObject() { return &refObj; }
BOOL IsServer() const { return refObj.Is(); }
private:
// fuer METWARE:
// es wird (vorerst) nicht kopiert und nicht zugewiesen
SwBookmark(const SwBookmark &);
SwBookmark &operator=(const SwBookmark &);
};
class SwMark: public SwBookmark
{
public:
SwMark(const SwPosition& aPos,
const KeyCode& rCode,
const String& rName, const String& rShortName);
};
class SwUNOMark: public SwBookmark
{
public:
SwUNOMark(const SwPosition& aPos,
const KeyCode& rCode,
const String& rName, const String& rShortName);
};
#endif
+164
View File
@@ -0,0 +1,164 @@
/*************************************************************************
*
* $RCSfile: bparr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _BPARR_HXX
#define _BPARR_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
#ifndef _DEBUG_HXX //autogen
#include <tools/debug.hxx>
#endif
struct BlockInfo;
class BigPtrArray;
class BigPtrEntry
{
friend class BigPtrArray;
BlockInfo* pBlock;
USHORT nOffset;
protected:
BigPtrEntry() : pBlock(0), nOffset(0) {}
virtual ~BigPtrEntry() {}
inline ULONG GetPos() const;
inline BigPtrArray& GetArray() const;
};
typedef BigPtrEntry* ElementPtr;
typedef BOOL (*FnForEach)( const ElementPtr&, void* pArgs );
// 1000 Eintr„ge pro Block = etwas weniger als 4K
#define MAXENTRY 1000
// Anzahl Eintraege, die bei der Kompression frei bleiben duerfen
// dieser Wert ist fuer den Worst Case, da wir MAXBLOCK mit ca 25%
// Overhead definiert haben, reichen 80% = 800 Eintraege vollkommen aus
// Will mann voellige Kompression haben, muss eben 100 angegeben werden.
#define COMPRESSLVL 80
struct BlockInfo { // Block-Info:
BigPtrArray* pBigArr; // in diesem Array steht der Block
ElementPtr* pData; // Datenblock
ULONG nStart, nEnd; // Start- und EndIndex
USHORT nElem; // Anzahl Elemente
};
class BigPtrArray
{
BlockInfo** ppInf; // Block-Infos
ULONG nSize; // Anzahl Elemente
USHORT nMaxBlock; // akt. max Anzahl Bloecke
USHORT nBlock; // Anzahl Bloecke
USHORT nCur; // letzter Block
USHORT Index2Block( ULONG ) const; // Blocksuche
BlockInfo* InsBlock( USHORT ); // Block einfuegen
void BlockDel( USHORT ); // es wurden Bloecke geloescht
void UpdIndex( USHORT ); // Indexe neu berechnen
protected:
// fuelle alle Bloecke auf.
// Der short gibt in Prozent an, wie voll die Bloecke werden sollen.
// Der ReturnWert besagt, das irgendetwas "getan" wurde
USHORT Compress( short = COMPRESSLVL );
public:
BigPtrArray();
~BigPtrArray();
ULONG Count() const { return nSize; }
void Insert( const ElementPtr& r, ULONG pos );
// void Insert( const ElementPtr* p, ULONG n, ULONG pos );
void Remove( ULONG pos, ULONG n = 1 );
void Move( ULONG from, ULONG to );
void Replace( ULONG pos, const ElementPtr& r);
ElementPtr operator[]( ULONG ) const;
ULONG GetIndex( const ElementPtr, ULONG, ULONG ) const;
void ForEach( FnForEach fn, void* pArgs = NULL )
{
ForEach( 0, nSize, fn, pArgs );
}
void ForEach( ULONG nStart, ULONG nEnd, FnForEach fn, void* pArgs = NULL );
};
inline ULONG BigPtrEntry::GetPos() const
{
DBG_ASSERT( this == pBlock->pData[ nOffset ], "Element nicht im Block" );
return pBlock->nStart + nOffset;
}
inline BigPtrArray& BigPtrEntry::GetArray() const
{
return *pBlock->pBigArr;
}
#endif
+260
View File
@@ -0,0 +1,260 @@
/*************************************************************************
*
* $RCSfile: calbck.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
/*************************************************************
#* Service-Klassen
*************************************************************/
/*
#* Aendert sich ein Attribut in einem Format, so muss diese
#* Aenderung an alle abhaengigen Formate und ueber sie an
#* alle betroffenen Nodes propagiert werden. Dabei muss
#* festgestellt werden, ob die Aenderung einen Effekt haben
#* kann, oder ob das geaenderte Attribut von dem abhaengigen
#* Format ueberdefiniert wird (so dass ohnehin der
#* Attributwert des abhaengigen Formates den geaenderten
#* Wert verdeckt). Weiterhin kann der betroffene Node
#* feststellen, ob er von dem geaenderten Attribut Gebrauch
#* macht (Beispiel: Linienabstand fuer Unterstreichung wurde
#* geaendert, das Attribut Unterstreichung wurde aber nicht
#* verwendet). So wird bei Aenderungen der minimale Aufwand
#* zum Reformatieren erkannt.
*/
#ifndef _CALBCK_HXX
#define _CALBCK_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
#endif
class SwModify;
class SwClientIter;
class SfxPoolItem;
class SvStream;
// ----------
// SwClient
// ----------
class SwClient
{
friend class SwModify;
friend class SwClientIter;
SwClient *pLeft, *pRight; // fuer die AVL-Sortierung
BOOL bModifyLocked : 1; // wird in SwModify::Modify benutzt,
// eigentlich ein Member des SwModify
// aber aus Platzgruenden hier.
BOOL bInModify : 1; // ist in einem Modify. (Debug!!!)
BOOL bInDocDTOR : 1; // Doc wird zerstoert, nicht "abmelden"
BOOL bInCache : 1; // Ist im BorderAttrCache des Layout,
// Traegt sich dann im Modify aus!
BOOL bInSwFntCache : 1; // Ist im SwFont-Cache der Formatierung
protected:
SwModify *pRegisteredIn;
SwClient(SwModify *pToRegisterIn);
public:
inline SwClient();
virtual ~SwClient();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
//rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
//kann ueber die Abhaengigkeitsliste eines Modify typsicher gecastet
//werden.
TYPEINFO();
void LockModify() { bModifyLocked = TRUE; }
void UnlockModify() { bModifyLocked = FALSE; }
void SetInCache( BOOL bNew ) { bInCache = bNew; }
void SetInSwFntCache( BOOL bNew ) { bInSwFntCache = bNew; }
int IsModifyLocked() const { return bModifyLocked; }
int IsInDocDTOR() const { return bInDocDTOR; }
int IsInCache() const { return bInCache; }
int IsInSwFntCache() const { return bInSwFntCache; }
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
private:
SwClient( const SwClient& );
SwClient &operator=( const SwClient& );
};
inline SwClient::SwClient() :
pLeft(0), pRight(0), pRegisteredIn(0)
{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = FALSE; }
// ----------
// SwModify
// ----------
// Klasse hat eine doppelt Verkette Liste fuer die Abhaengigen.
class SwModify: public SwClient
{
friend SvStream& operator<<( SvStream& aS, SwModify & );
friend class SwClientIter;
SwClient* pRoot;
SwClient *_Remove(SwClient *pDepend);
public:
SwModify(SwModify *pToRegisterIn );
virtual ~SwModify();
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
void Add(SwClient *pDepend);
SwClient *Remove(SwClient *pDepend)
{ return bInDocDTOR ? 0 : _Remove( pDepend ); }
const SwClient* GetDepends() const { return pRoot; }
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
void SetInDocDTOR() { bInDocDTOR = TRUE; }
void CheckCaching( const USHORT nWhich );
BOOL IsLastDepend() const
{ return pRoot && !pRoot->pLeft && !pRoot->pRight; }
};
// ----------
// SwDepend
// ----------
/*
* Sehr sinnvolle Klasse, wenn ein Objekt von mehreren Objekten
* abhaengig ist. Diese sollte fuer jede Abhaengigkeit ein Objekt
* der Klasse SwDepend als Member haben.
*/
class SwDepend: public SwClient
{
private:
SwClient *pToTell;
public:
SwClient* GetToTell() { return pToTell; }
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
SwDepend(SwClient *pTellHim, SwModify *pDepend);
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem & ) const;
};
class SwClientIter
{
friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur
friend void SwModify::Add(SwClient *); // nur fuer ASSERT !
SwModify& rRoot;
SwClient *pAkt, *pDelNext;
// fuers Updaten der aller Iteratoren beim Einfuegen/Loeschen von
// Clients, wenn der Iterator gerade draufsteht.
SwClientIter *pNxtIter;
TypeId aSrchId; // fuer First/Next - suche diesen Type
public:
SwClientIter( SwModify& );
~SwClientIter();
const SwModify& GetModify() const { return rRoot; }
SwModify& GetModify() { return rRoot; }
#ifndef CFRONT
SwClient* operator++(int); // zum Naechsten
SwClient* operator--(int); // zum Vorherigen
#endif
SwClient* operator++(); // zum Naechsten
SwClient* operator--(); // zum Vorherigen
SwClient* GoStart(); // zum Anfang
SwClient* GoEnd(); // zum Ende
inline SwClient* GoRoot(); // wieder ab Root (==Start) anfangen
SwClient* operator()() const
{ return pDelNext == pAkt ? pAkt : pDelNext; }
int IsChanged() const { return pDelNext != pAkt; }
SwClient* First( TypeId nType );
SwClient* Next();
};
inline SwClient* SwClientIter::GoRoot() // wieder ab Root anfangen
{
pAkt = rRoot.pRoot;
return (pDelNext = pAkt);
}
#endif
+261
View File
@@ -0,0 +1,261 @@
/*************************************************************************
*
* $RCSfile: calc.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CALC_HXX
#define _CALC_HXX
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
#ifndef __SBX_SBXVALUE //autogen
#include <svtools/sbxvar.hxx>
#endif
class CharClass;
class International;
class SwFieldType;
class SwDoc;
#define TBLSZ 47 // sollte Primzahl sein, wegen HashTable
const sal_Unicode cListDelim = '|';
/******************************************************************************
* Calculate Operations
******************************************************************************/
enum SwCalcOper
{
CALC_NAME, CALC_NUMBER, CALC_ENDCALC,
CALC_PLUS='+', CALC_MINUS='-', CALC_MUL='*',
CALC_DIV='/', CALC_PRINT=';', CALC_ASSIGN='=',
CALC_LP='(', CALC_RP=')', CALC_PHD='%',
CALC_POW='^',
CALC_LISTOP = cListDelim,
CALC_NOT=256, CALC_AND=257, CALC_OR=258,
CALC_XOR=259, CALC_EQ=260, CALC_NEQ=261,
CALC_LEQ=262, CALC_GEQ=263, CALC_LES=264,
CALC_GRE=265, CALC_SUM=266, CALC_MEAN=267,
CALC_SQRT=268, CALC_MIN=269, CALC_MIN_IN=270,
CALC_MAX=271, CALC_MAX_IN=272, CALC_SIN=273,
CALC_COS=274, CALC_TAN=275, CALC_ASIN=276,
CALC_ACOS=278, CALC_ATAN=279, CALC_TDIF=280,
CALC_ROUND=281
};
//-- Calculate Operations Strings -----------------------------------------
extern const sal_Char __FAR_DATA sCalc_Add[];
extern const sal_Char __FAR_DATA sCalc_Sub[];
extern const sal_Char __FAR_DATA sCalc_Mul[];
extern const sal_Char __FAR_DATA sCalc_Div[];
extern const sal_Char __FAR_DATA sCalc_Phd[];
extern const sal_Char __FAR_DATA sCalc_Sqrt[];
extern const sal_Char __FAR_DATA sCalc_Pow[];
extern const sal_Char __FAR_DATA sCalc_Or[];
extern const sal_Char __FAR_DATA sCalc_Xor[];
extern const sal_Char __FAR_DATA sCalc_And[];
extern const sal_Char __FAR_DATA sCalc_Not[];
extern const sal_Char __FAR_DATA sCalc_Eq[];
extern const sal_Char __FAR_DATA sCalc_Neq[];
extern const sal_Char __FAR_DATA sCalc_Leq[];
extern const sal_Char __FAR_DATA sCalc_Geq[];
extern const sal_Char __FAR_DATA sCalc_L[];
extern const sal_Char __FAR_DATA sCalc_G[];
extern const sal_Char __FAR_DATA sCalc_Sum[];
extern const sal_Char __FAR_DATA sCalc_Mean[];
extern const sal_Char __FAR_DATA sCalc_Min[];
extern const sal_Char __FAR_DATA sCalc_Max[];
extern const sal_Char __FAR_DATA sCalc_Sin[];
extern const sal_Char __FAR_DATA sCalc_Cos[];
extern const sal_Char __FAR_DATA sCalc_Tan[];
extern const sal_Char __FAR_DATA sCalc_Asin[];
extern const sal_Char __FAR_DATA sCalc_Acos[];
extern const sal_Char __FAR_DATA sCalc_Atan[];
extern const sal_Char __FAR_DATA sCalc_Tdif[];
extern const sal_Char __FAR_DATA sCalc_Round[];
/******************************************************************************
* Calculate ErrorCodes
******************************************************************************/
enum SwCalcError
{
CALC_NOERR=0,
CALC_SYNTAX, // Syntax Fehler
CALC_ZERODIV, // Division durch Null
CALC_BRACK, // Fehlerhafte Klammerung
CALC_POWERR, // Ueberlauf in Quadratfunktion
CALC_VARNFND, // Variable wurde nicht gefunden
CALC_OVERFLOW, // Ueberlauf
CALC_WRONGTIME // falsches Zeitformat
};
class SwSbxValue : public SbxValue
{
public:
//JP 03.02.99: immer auf eine Zahl defaulten, damit auch gerechnet wird.
// Ansonsten wird daraus ein SbxEMPTY und damit ist nichts
// anzufangen.
SwSbxValue( long n = 0 ) { PutLong( n ); }
SwSbxValue( const double& rD ) { PutDouble( rD ); }
SwSbxValue( const SwSbxValue& rVal ) : SbxValue( rVal ) {}
virtual ~SwSbxValue();
// Strings sonderbehandeln
BOOL GetBool() const;
// Strings sonderbehandeln
double GetDouble() const;
SwSbxValue& MakeDouble();
};
/******************************************************************************
* Calculate HashTables fuer VarTable und Operations
******************************************************************************/
struct SwHash
{
SwHash( const String& rStr );
virtual ~SwHash();
String aStr;
SwHash *pNext;
};
struct SwCalcExp : public SwHash
{
SwSbxValue nValue;
const SwFieldType* pFldType;
SwCalcExp( const String& rStr, const SwSbxValue& rVal,
const SwFieldType* pFldType = 0 );
};
SwHash* Find( const String& rSrch, SwHash** ppTable,
USHORT nTblSize, USHORT* pPos = 0 );
void DeleteHashTable( SwHash** ppTable, USHORT nTblSize );
// falls _CalcOp != 0, dann ist das ein gueltiger Operator
struct _CalcOp;
_CalcOp* FindOperator( const String& rSearch );
/******************************************************************************
* class SwCalc
******************************************************************************/
class SwCalc
{
SwHash* VarTable[ TBLSZ ];
String aVarName, sCurrSym;
String sCommand;
SvPtrarr aRekurStk;
SwSbxValue nLastLeft;
SwSbxValue nNumberValue;
SwCalcExp aErrExpr;
xub_StrLen nCommandPos;
SwDoc& rDoc;
International* pInter;
CharClass* pCharClass;
USHORT nListPor;
SwCalcOper eCurrOper;
SwCalcOper eCurrListOper;
SwCalcError eError;
SwCalcOper GetToken();
SwSbxValue Expr();
SwSbxValue Term();
SwSbxValue Prim();
BOOL ParseTime( USHORT*, USHORT*, USHORT* );
String GetColumnName( const String& rName );
String GetDBName( const String& rName );
// dont call this methods
SwCalc( const SwCalc& );
SwCalc& operator=( const SwCalc& );
public:
SwCalc( SwDoc& rD );
~SwCalc();
SwSbxValue Calculate( const String &rStr );
String GetStrResult( const SwSbxValue& rValue, BOOL bRound = TRUE );
String GetStrResult( double, BOOL bRound = TRUE );
SwCalcExp* VarInsert( const String& r );
SwCalcExp* VarLook( const String &rStr, USHORT ins = 0 );
void VarChange( const String& rStr, const SwSbxValue& rValue );
void VarChange( const String& rStr, double );
SwHash** GetVarTable() { return VarTable; }
BOOL Push( const VoidPtr pPtr );
void Pop( const VoidPtr pPtr );
void SetCalcError( SwCalcError eErr ) { eError = eErr; }
BOOL IsCalcError() const { return eError; }
static FASTBOOL Str2Double( const String& rStr, xub_StrLen& rPos,
double& rVal,
const International* pInter = 0 );
};
#endif
+178
View File
@@ -0,0 +1,178 @@
/*************************************************************************
*
* $RCSfile: cellatr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CELLATR_HXX
#define _CELLATR_HXX
#ifndef _SFXINTITEM_HXX //autogen
#include <svtools/intitem.hxx>
#endif
#ifndef _ZFORLIST_HXX //autogen
#include <svtools/zforlist.hxx>
#endif
#include "format.hxx"
#include "cellfml.hxx"
class SwTblBoxNumFormat : public SfxUInt32Item
{
BOOL bAuto; // automatisch vergebenes Flag
public:
SwTblBoxNumFormat( UINT32 nFormat = NUMBERFORMAT_TEXT,
BOOL bAuto = FALSE );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFileVersion) const;
inline SwTblBoxNumFormat& operator=( const SwTblBoxNumFormat& rAttr )
{
SetValue( rAttr.GetValue() );
SetAutoFlag( rAttr.GetAutoFlag() );
return *this;
}
BOOL GetAutoFlag() const { return bAuto; }
void SetAutoFlag( BOOL bFlag = TRUE ) { bAuto = bFlag; }
};
class SwTblBoxFormula : public SfxPoolItem, public SwTableFormula
{
SwModify* pDefinedIn; // Modify-Object, in dem die Formel steht
// kann nur TablenBoxFormat sein
public:
SwTblBoxFormula( const String& rFormula );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFileVersion) const;
// erfrage und setze den Modify-Pointer
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
inline void ChgDefinedIn( const SwModify* pNew )
{ pDefinedIn = (SwModify*)pNew; }
// suche den Node, in dem die Formel steht:
// BoxAttribut -> BoxStartNode
virtual const SwNode* GetNodeOfFormula() const;
SwTableBox* GetTableBox();
const SwTableBox* GetTableBox() const
{ return ((SwTblBoxFormula*)this)->GetTableBox(); }
// Status aendern
void ChangeState( const SfxPoolItem* pItem );
// berechne die Formel
void Calc( SwTblCalcPara& rCalcPara, double& rValue );
};
class SwTblBoxValue : public SfxPoolItem
{
double nValue;
public:
SwTblBoxValue();
SwTblBoxValue( const double aVal );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFileVersion) const;
inline SwTblBoxValue& operator=( const SwTblBoxValue& rCmp )
{
nValue = rCmp.nValue;
return *this;
}
double GetValue() const { return nValue; }
void SetValue( const double nVal ) { nValue = nVal; }
};
//***************************************************************************
inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(BOOL bInP) const
{ return (const SwTblBoxNumFormat&)Get( RES_BOXATR_FORMAT,bInP); }
inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(BOOL bInP) const
{ return (const SwTblBoxFormula&)Get( RES_BOXATR_FORMULA,bInP); }
inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(BOOL bInP) const
{ return (const SwTblBoxValue&)Get( RES_BOXATR_VALUE, bInP); }
//***************************************************************************
inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(BOOL bInP) const
{ return aSet.GetTblBoxNumFmt(bInP); }
inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(BOOL bInP) const
{ return aSet.GetTblBoxFormula(bInP); }
inline const SwTblBoxValue &SwFmt::GetTblBoxValue(BOOL bInP) const
{ return aSet.GetTblBoxValue(bInP); }
#endif
+197
View File
@@ -0,0 +1,197 @@
/*************************************************************************
*
* $RCSfile: cellfml.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CELLFML_HXX
#define _CELLFML_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
class SwTable;
class SwNode;
class SwTableSortBoxes;
class SwSelBoxes;
class SwCalc;
class SwTableBox;
class SwTableFmlUpdate;
class SwTblCalcPara
{
const SwTableBox* pLastTblBox;
USHORT nStackCnt, nMaxSize;
public:
SwTableSortBoxes *pBoxStk; // Stack fuers erkennen von Rekursionen !
SwCalc& rCalc; // akt. Calculator
const SwTable* pTbl; // akt. Tabelle
SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable );
~SwTblCalcPara();
BOOL CalcWithStackOverflow();
BOOL IsStackOverFlow() const { return nMaxSize == nStackCnt; }
BOOL IncStackCnt() { return nMaxSize == ++nStackCnt; }
void DecStackCnt() { if( nStackCnt ) --nStackCnt; }
void SetLastTblBox( const SwTableBox* pBox ) { pLastTblBox = pBox; }
};
class SwTableFormula
{
typedef void (SwTableFormula:: *FnScanFormel)( const SwTable&, String&,
String&, String*, void* ) const;
void BoxNmsToPtr( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void PtrToBoxNms( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void RelNmsToBoxNms( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void RelBoxNmsToPtr( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void BoxNmsToRelNm( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void _MakeFormel( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void _GetFmlBoxes( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void _HasValidBoxes( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void _SplitMergeBoxNm( const SwTable&, String&, String&, String* = 0,
void* pPara = 0 ) const;
void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd,
SwSelBoxes& rBoxes ) const;
String ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
void* = 0 ) const;
const SwTable* FindTable( SwDoc& rDoc, const String& rNm ) const;
protected:
enum NameType { EXTRNL_NAME, INTRNL_NAME, REL_NAME };
String sFormel; // akt. Formel
NameType eNmType; // akt. Darstellungs Art
BOOL bValidValue; // TRUE: Formel neu berechnen
// suche den Node, in dem die Formel steht:
// TextFeld -> TextNode,
// BoxAttribut -> BoxStartNode
// !!! MUSS VON JEDER ABLEITUNG UEBERLADEN WERDEN !!!
virtual const SwNode* GetNodeOfFormula() const = 0;
SwTableFormula( const String& rFormel );
String MakeFormel( SwTblCalcPara& rCalcPara ) const
{
return ScanString( &SwTableFormula::_MakeFormel,
*rCalcPara.pTbl, &rCalcPara );
}
static USHORT GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox );
public:
SwTableFormula( const SwTableFormula& rCpy ) { *this = rCpy; }
SwTableFormula& operator=( const SwTableFormula& rCpy )
{
sFormel = rCpy.sFormel;
eNmType = rCpy.eNmType;
bValidValue = rCpy.bValidValue;
return *this;
}
// erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel
void PtrToBoxNm( const SwTable* pTbl );
// erzeuge aus der externen (fuer UI) die interne (fuer CORE) Formel
void BoxNmToPtr( const SwTable* pTbl );
// erzeuge aus der externen/internen Formel die relative Formel
void ToRelBoxNm( const SwTable* pTbl );
// wird vorm/nach dem mergen/splitten von Tabellen rerufen
void ToSplitMergeBoxNm( SwTableFmlUpdate& rTblUpd );
// ist gerade eine intern Darstellung aktiv
BOOL IsIntrnlName() const { return eNmType == INTRNL_NAME; }
// erfrage die akt. Darstellung der Formel
NameType GetNameType() const { return eNmType; }
// erfrage/setze das Flag, ob der akt. Wert gueltig ist
BOOL IsValid() const { return bValidValue; }
inline void ChgValid( BOOL bNew ) { bValidValue = bNew; }
const String& GetFormula() const { return sFormel; }
void SetFormula( const String& rNew )
{
sFormel = rNew;
bValidValue = FALSE;
eNmType = EXTRNL_NAME;
}
USHORT GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
// sind alle Boxen gueltig, auf die sich die Formel bezieht?
BOOL HasValidBoxes() const;
};
#endif
+180
View File
@@ -0,0 +1,180 @@
/*************************************************************************
*
* $RCSfile: charatr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CHARATR_HXX
#define _CHARATR_HXX
#include "format.hxx"
#include "hintids.hxx" // fuer die WhichIds
/******************************************************************************
* Implementierung der Charakter-Attribut Methoden vom SwAttrSet
* AMA 12.10.94: Umstellung auf SvxItems.
******************************************************************************/
inline const SvxPostureItem &SwAttrSet::GetPosture(BOOL bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); }
inline const SvxPostureItem &SwAttrSet::GetCJKPosture(BOOL bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_CJK_POSTURE,bInP); }
inline const SvxPostureItem &SwAttrSet::GetCTLPosture(BOOL bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_CTL_POSTURE,bInP); }
inline const SvxWeightItem &SwAttrSet::GetWeight(BOOL bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_WEIGHT,bInP); }
inline const SvxWeightItem &SwAttrSet::GetCJKWeight(BOOL bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_CJK_WEIGHT,bInP); }
inline const SvxWeightItem &SwAttrSet::GetCTLWeight(BOOL bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_CTL_WEIGHT,bInP); }
inline const SvxShadowedItem &SwAttrSet::GetShadowed(BOOL bInP) const
{ return (const SvxShadowedItem&)Get( RES_CHRATR_SHADOWED,bInP); }
inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(BOOL bInP) const
{ return (const SvxAutoKernItem&)Get( RES_CHRATR_AUTOKERN,bInP); }
inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(BOOL bInP) const
{ return (const SvxWordLineModeItem&)Get( RES_CHRATR_WORDLINEMODE,bInP); }
inline const SvxContourItem &SwAttrSet::GetContour(BOOL bInP) const
{ return (const SvxContourItem&)Get( RES_CHRATR_CONTOUR,bInP); }
inline const SvxKerningItem &SwAttrSet::GetKerning(BOOL bInP) const
{ return (const SvxKerningItem&)Get( RES_CHRATR_KERNING,bInP); }
inline const SvxUnderlineItem &SwAttrSet::GetUnderline(BOOL bInP) const
{ return (const SvxUnderlineItem&)Get( RES_CHRATR_UNDERLINE,bInP); }
inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(BOOL bInP) const
{ return (const SvxCrossedOutItem&)Get( RES_CHRATR_CROSSEDOUT,bInP); }
inline const SvxFontHeightItem &SwAttrSet::GetSize(BOOL bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_FONTSIZE,bInP); }
inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(BOOL bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_CJK_FONTSIZE,bInP); }
inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(BOOL bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_CTL_FONTSIZE,bInP); }
inline const SvxPropSizeItem &SwAttrSet::GetPropSize(BOOL bInP) const
{ return (const SvxPropSizeItem&)Get( RES_CHRATR_PROPORTIONALFONTSIZE,bInP); }
inline const SvxFontItem &SwAttrSet::GetFont(BOOL bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_FONT,bInP); }
inline const SvxFontItem &SwAttrSet::GetCJKFont(BOOL bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_CJK_FONT,bInP); }
inline const SvxFontItem &SwAttrSet::GetCTLFont(BOOL bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_CTL_FONT,bInP); }
inline const SvxColorItem &SwAttrSet::GetColor(BOOL bInP) const
{ return (const SvxColorItem&)Get( RES_CHRATR_COLOR,bInP); }
inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(BOOL bInP) const
{ return (const SvxCharSetColorItem&)Get( RES_CHRATR_CHARSETCOLOR,bInP); }
inline const SvxLanguageItem &SwAttrSet::GetLanguage(BOOL bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_LANGUAGE,bInP); }
inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(BOOL bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_CJK_LANGUAGE,bInP); }
inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(BOOL bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_CTL_LANGUAGE,bInP); }
inline const SvxEscapementItem &SwAttrSet::GetEscapement(BOOL bInP) const
{ return (const SvxEscapementItem&)Get( RES_CHRATR_ESCAPEMENT,bInP); }
inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(BOOL bInP) const
{ return (const SvxCaseMapItem&)Get( RES_CHRATR_CASEMAP,bInP); }
inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(BOOL bInP) const
{ return (const SvxNoHyphenItem&)Get( RES_CHRATR_NOHYPHEN,bInP); }
inline const SvxBlinkItem &SwAttrSet::GetBlink(BOOL bInP) const
{ return (const SvxBlinkItem&)Get( RES_CHRATR_BLINK,bInP); }
inline const SvxBrushItem &SwAttrSet::GetChrBackground( BOOL bInP ) const
{ return (const SvxBrushItem&)Get( RES_CHRATR_BACKGROUND, bInP ); }
/******************************************************************************
* Implementierung der Charakter-Attribut Methoden vom SwFmt
* AMA: 12.10.94: Umstellung auf SvxItems.
******************************************************************************/
inline const SvxPostureItem &SwFmt::GetPosture(BOOL bInP) const
{ return aSet.GetPosture(bInP); }
inline const SvxWeightItem &SwFmt::GetWeight(BOOL bInP) const
{ return aSet.GetWeight(bInP); }
inline const SvxShadowedItem &SwFmt::GetShadowed(BOOL bInP) const
{ return aSet.GetShadowed(bInP); }
inline const SvxAutoKernItem &SwFmt::GetAutoKern(BOOL bInP) const
{ return aSet.GetAutoKern(bInP); }
inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(BOOL bInP) const
{ return aSet.GetWordLineMode(bInP); }
inline const SvxContourItem &SwFmt::GetContour(BOOL bInP) const
{ return aSet.GetContour(bInP); }
inline const SvxKerningItem &SwFmt::GetKerning(BOOL bInP) const
{ return aSet.GetKerning(bInP); }
inline const SvxUnderlineItem &SwFmt::GetUnderline(BOOL bInP) const
{ return aSet.GetUnderline(bInP); }
inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(BOOL bInP) const
{ return aSet.GetCrossedOut(bInP); }
inline const SvxFontHeightItem &SwFmt::GetSize(BOOL bInP) const
{ return aSet.GetSize(bInP); }
inline const SvxPropSizeItem &SwFmt::GetPropSize(BOOL bInP) const
{ return aSet.GetPropSize(bInP); }
inline const SvxFontItem &SwFmt::GetFont(BOOL bInP) const
{ return aSet.GetFont(bInP); }
inline const SvxColorItem &SwFmt::GetColor(BOOL bInP) const
{ return aSet.GetColor(bInP); }
inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(BOOL bInP) const
{ return aSet.GetCharSetColor(bInP); }
inline const SvxLanguageItem &SwFmt::GetLanguage(BOOL bInP) const
{ return aSet.GetLanguage(bInP); }
inline const SvxEscapementItem &SwFmt::GetEscapement(BOOL bInP) const
{ return aSet.GetEscapement(bInP); }
inline const SvxCaseMapItem &SwFmt::GetCaseMap(BOOL bInP) const
{ return aSet.GetCaseMap(bInP); }
inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(BOOL bInP) const
{ return aSet.GetNoHyphenHere(bInP); }
inline const SvxBlinkItem &SwFmt::GetBlink(BOOL bInP) const
{ return aSet.GetBlink(bInP); }
inline const SvxBrushItem &SwFmt::GetChrBackground(BOOL bInP) const
{ return aSet.GetChrBackground(bInP); }
#endif
+90
View File
@@ -0,0 +1,90 @@
/*************************************************************************
*
* $RCSfile: charfmt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CHARFMT_HXX
#define _CHARFMT_HXX
#ifndef _FORMAT_HXX
#include <format.hxx>
#endif
class SwCharFmt : public SwFmt
{
friend class SwDoc;
friend class SwTxtFmtColl;
SwCharFmt( SwAttrPool& rPool, const sal_Char* pFmtName,
SwCharFmt *pDerivedFrom )
: SwFmt( rPool, pFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT )
{}
SwCharFmt( SwAttrPool& rPool, const String &rFmtName,
SwCharFmt *pDerivedFrom )
: SwFmt( rPool, rFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT )
{}
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
};
#endif
+129
View File
@@ -0,0 +1,129 @@
/*************************************************************************
*
* $RCSfile: chpfld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CHPFLD_HXX
#define _CHPFLD_HXX
#include "fldbas.hxx"
class SwFrm;
class SwTxtNode;
#ifndef _UNOOBJ_HXX
#include <unoobj.hxx>
#endif
enum SwChapterFormat
{
CF_BEGIN,
CF_NUMBER = CF_BEGIN, // nur die Kapitelnummer
CF_TITLE, // nur die "Ueberschrift"
CF_NUM_TITLE, // Kapitelnummer und "Ueberschrift"
CF_NUMBER_NOPREPST, // nur die Kapitelnummer ohne Post/Prefix
CF_NUM_NOPREPST_TITLE, // Kapitelnummer ohne Post/Prefix und "Ueberschrift"
CF_END
};
/*--------------------------------------------------------------------
Beschreibung: Kapitel
--------------------------------------------------------------------*/
class SwChapterFieldType : public SwFieldType
{
public:
SwChapterFieldType();
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Kapitelnummer
--------------------------------------------------------------------*/
class SwChapterField : public SwField
{
friend class SwChapterFieldType;
BYTE nLevel;
String sTitle, sNumber, sPre, sPost;
public:
SwChapterField(SwChapterFieldType*, ULONG nFmt = 0);
void ChangeExpansion( const SwFrm*, const SwTxtNode*, BOOL bSrchNum = FALSE);
virtual String Expand() const;
virtual SwField* Copy() const;
inline BYTE GetLevel() const;
inline void SetLevel(BYTE);
inline const String& GetNumber() const;
inline const String& GetTitle() const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
inline BYTE SwChapterField::GetLevel() const { return nLevel; }
inline void SwChapterField::SetLevel(BYTE nLev) { nLevel = nLev; }
inline const String& SwChapterField::GetNumber() const { return sNumber; }
inline const String& SwChapterField::GetTitle() const { return sTitle; }
#endif // _CHPFLD_HXX
+1225
View File
File diff suppressed because it is too large Load Diff
+118
View File
@@ -0,0 +1,118 @@
/*************************************************************************
*
* $RCSfile: comcore.hrc,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _COMCORE_HRC
#define _COMCORE_HRC
#include "rcid.hrc"
// ---------------
// die Strings
// ---------------
#define STR_COMCORE_READERROR (RC_COMCORE_BEGIN + 0)
#define MSG_COMCORE_ASKSEARCH (RC_COMCORE_BEGIN + 1)
#define STR_TABLE_DEFNAME (RC_COMCORE_BEGIN + 2)
#define STR_GRAPHIC_DEFNAME (RC_COMCORE_BEGIN + 3)
#define STR_OBJECT_DEFNAME (RC_COMCORE_BEGIN + 4)
#define STR_FRAME_DEFNAME (RC_COMCORE_BEGIN + 5)
#define STR_REGION_DEFNAME (RC_COMCORE_BEGIN + 6)
#define STR_COMCORE_CANT_SHOW (RC_COMCORE_BEGIN + 7)
#define RID_GRAPHIC_REPLACEBMP (RC_COMCORE_BEGIN + 8)
#define RID_GRAPHIC_ERRORBMP (RC_COMCORE_BEGIN + 9)
#define STR_NUMRULE_DEFNAME (RC_COMCORE_BEGIN + 10)
#define STR_EMPTYPAGE (RC_COMCORE_BEGIN + 11)
#define RID_SHELLRES_AUTOFMTSTRS (RC_COMCORE_BEGIN + 12)
#define STR_MULT_INTERACT_HYPH_WARN (RC_COMCORE_BEGIN + 13)
#define STR_MULT_INTERACT_SPELL_WARN (RC_COMCORE_BEGIN + 14)
#define STR_SPELL_TITLE (RC_COMCORE_BEGIN + 15)
#define STR_HYPH_TITLE (RC_COMCORE_BEGIN + 16)
// defines fuer die Autoformat Redline Kommentare
#define STR_AUTOFMTREDL_DEL_EMPTY_PARA 0
#define STR_AUTOFMTREDL_USE_REPLACE 1
#define STR_AUTOFMTREDL_CPTL_STT_WORD 2
#define STR_AUTOFMTREDL_CPTL_STT_SENT 3
#define STR_AUTOFMTREDL_TYPO 4
#define STR_AUTOFMTREDL_USER_STYLE 5
#define STR_AUTOFMTREDL_BULLET 6
#define STR_AUTOFMTREDL_UNDER 7
#define STR_AUTOFMTREDL_BOLD 8
#define STR_AUTOFMTREDL_FRACTION 9
#define STR_AUTOFMTREDL_DETECT_URL 10
#define STR_AUTOFMTREDL_DASH 11
#define STR_AUTOFMTREDL_ORDINAL 12
#define STR_AUTOFMTREDL_RIGHT_MARGIN 13
#define STR_AUTOFMTREDL_SET_TMPL_TEXT 14
#define STR_AUTOFMTREDL_SET_TMPL_INDENT 15
#define STR_AUTOFMTREDL_SET_TMPL_NEG_INDENT 16
#define STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT 17
#define STR_AUTOFMTREDL_SET_TMPL_HEADLINE 18
#define STR_AUTOFMTREDL_SET_NUMBULET 19
#define STR_AUTOFMTREDL_DEL_MORELINES 20
// !!!!!!!!!!!!!!!!!!!!!!!!!! das Ende immer richtig setzen !!!!!!!!!!!!
#define STR_AUTOFMTREDL_END 21
#endif
+901
View File
@@ -0,0 +1,901 @@
/*************************************************************************
*
* $RCSfile: crsrsh.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CRSRSH_HXX
#define _CRSRSH_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#ifndef _LINK_HXX //autogen
#include <tools/link.hxx>
#endif
#ifndef _RTTI_HXX //autogen
#include <tools/rtti.hxx>
#endif
#ifndef _WORDSEL_HXX //autogen
#include <svtools/wordsel.hxx>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_
#include <com/sun/star/linguistic/XSpellChecker1.hpp>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HPP_
#include <com/sun/star/linguistic/XHyphenator.hpp>
#endif
#ifndef _SWTYPES_HXX
#include <swtypes.hxx> // fuer SWPOSDOC
#endif
#ifndef _VIEWSH_HXX
#include <viewsh.hxx> // fuer ViewShell
#endif
#ifndef _CALBCK_HXX
#include <calbck.hxx> // fuer SwClient
#endif
#ifndef _CSHTYP_HXX
#include <cshtyp.hxx> // fuer die CursorShell Typen
#endif
#ifndef _CRSTATE_HXX
#include <crstate.hxx> // fuer die CursorMove-Staties
#endif
#ifndef _BKMRKE_HXX //autogen
#include <bkmrke.hxx>
#endif
#ifndef _TOXE_HXX
#include <toxe.hxx> // SwTOXSearchDir
#endif
#if defined(PRODUCT) && !defined(WIN)
// fuer die Inline-Methoden
#ifndef _VISCRS_HXX
#include <viscrs.hxx>
#endif
#ifndef _NODE_HXX
#include <node.hxx>
#endif
#define CRSR_INLINE inline
#else
#define CRSR_INLINE
#endif
// einige Forward Deklarationen
class KeyCode;
class Region;
class SfxItemSet;
class SfxPoolItem;
class SpellCheck;
class SwBookmark;
class SwCntntFrm;
class SwCrsrShell;
class SwCursor;
class SwField;
class SwFieldType;
class SwFmt;
class SwFmtFld;
class SwIndex;
class SwNodeIndex;
class SwNode;
class SwNodes;
class SwPaM;
class SwSelBoxes;
class SwShellCrsr;
class SwShellTableCrsr;
class SwTableNode;
class SwTxtFmtColl;
class SwVisCrsr;
class SwTxtINetFmt;
class SwFmtINetFmt;
class SwTxtAttr;
class SwTableBox;
class SwCellFrms;
class SwTOXMark;
struct SwPosition;
class SearchParam;
class SwRedline;
// enum und struktur, um ueber die Doc-Position Informationen zu erfragen
struct SwContentAtPos
{
enum IsAttrAtPos
{
SW_NOTHING = 0x0000,
SW_FIELD = 0x0001,
SW_CLICKFIELD = 0x0002,
SW_FTN = 0x0004,
SW_INETATTR = 0x0008,
SW_TABLEBOXFML = 0x0010,
SW_REDLINE = 0x0020,
SW_OUTLINE = 0x0040,
SW_TOXMARK = 0x0080,
SW_REFMARK = 0x0100
#ifndef PRODUCT
,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen
,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen
#endif
} eCntntAtPos;
union {
const SwField* pFld;
const SfxPoolItem* pAttr;
const SwRedline* pRedl;
} aFnd;
String sStr;
const SwTxtAttr* pFndTxtAttr;
SwContentAtPos( int eGetAtPos = 0xffff )
: eCntntAtPos( (IsAttrAtPos)eGetAtPos )
{
aFnd.pFld = 0;
pFndTxtAttr = 0;
}
// befindet sich der Node in einem geschuetzten Bereich?
FASTBOOL IsInProtectSect() const;
};
// defines fuers GetCharCount
#define GETCHARCOUNT_NONE 0
#define GETCHARCOUNT_PARA 1
#define GETCHARCOUNT_SECTION 2
// ReturnWerte von SetCrsr (werden verodert)
const int CRSR_NOERROR = 0x00,
CRSR_POSOLD = 0x01, // Cursor bleibt an alter Doc-Position
CRSR_POSCHG = 0x02; // Position vom Layout veraendert
// die Cursor - Shell
class SwCrsrShell : public ViewShell, public SwModify
{
friend class SwCallLink;
friend class SwVisCrsr;
friend class SwSelPaintRects;
friend class SwChgLinkFlag;
//Braucht den Crsr als IntrnlCrsr.
friend void GetTblSel( const SwCrsrShell&, SwSelBoxes& rBoxes,
const SwTblSearchType );
friend BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
public: // public, damit defaultet werden kann !!
/* ein enum fuer den Aufruf von UpdateCrsr */
enum CrsrFlag {
UPDOWN = (1 << 0), // Up/Down auf Spalte halten
SCROLLWIN = (1 << 1), // Window Scrollen
CHKRANGE = (1 << 2), // ueberpruefen von ueberlappenden PaM's
NOCALRECT = (1 << 3), // CharRect nicht neu berechnen
READONLY = (1 << 4) // Sichtbar machen trotz Readonly
};
private:
SwRect aCharRect; // Char-SRectangle auf dem der Cursor steht
Point aCrsrHeight; // Hohe&Offset von sichtbaren Cursor
Point aOldRBPos; // Right/Bottom von letzter VisArea
// (wird im Invalidate vom Cursor benutzt)
// um event. Macro was anhaengt auszufuehren.
Link aFlyMacroLnk; // Link will be called, if the Crsr is set
// into a fly. A macro can be then becalled
Link aChgLnk; // link will be called by every attribut/
// format changes at cursor position.
Link aGrfArrivedLnk; // Link calls to UI if a grafik is arrived
SwShellCrsr* pCurCrsr; // der aktuelle Cursor
SwShellCrsr* pCrsrStk; // Stack fuer den Cursor
SwVisCrsr *pVisCrsr; // der Sichtbare-Cursor
SwShellTableCrsr* pTblCrsr; // Tabellen-Crsr; nur in Tabellen, wenn
// die Selection ueber 2 Spalten liegt
SwNodeIndex* pBoxIdx; // fuers erkennen der veraenderten
SwTableBox* pBoxPtr; // Tabellen-Zelle
long nUpDownX; // versuche den Cursor bei Up/Down immer in
// der gleichen Spalte zu bewegen
long nLeftFrmPos;
ULONG nAktNode; // save CursorPos at Start-Action
xub_StrLen nAktCntnt;
USHORT nAktNdTyp;
/*
* Mit den Methoden SttCrsrMove und EndCrsrMove wird dieser Zaehler
* Inc-/Decrementiert. Solange der Zaehler ungleich 0 ist, erfolgt
* auf den akt. Cursor kein Update. Dadurch koennen "komplizierte"
* Cursorbewegungen (ueber Find()) realisiert werden.
*/
USHORT nCrsrMove;
USHORT nBasicActionCnt; // Actions, die vom Basic geklammert wurden
CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
BOOL bHasFocus : 1; // Shell ist in einem Window "aktiv"
BOOL bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
BOOL bChgCallFlag : 1; // Attributaenderung innerhalb von
// Start- und EndAction
BOOL bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
// (wird im Invalidate vom Cursor benutzt)
BOOL bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
// TRUE -> ChgLnk callen
// Zugriff nur ueber SwChgLinkFlag
BOOL bAllProtect : 1; // Flag fuer Bereiche
// TRUE -> alles geschuetzt / versteckt
BOOL bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
// TRUE -> die Sicht wurde verschoben
BOOL bGCAttr : 1; // TRUE -> es existieren nichtaufgespannte Attr.
BOOL bIgnoreReadonly : 1; // TRUE -> Beim naechsten EndAction trotz
// Readonly den Crsr sichtbar machen.
BOOL bSelTblCells : 1; // TRUE -> Zellen uebers InputWin selektieren
BOOL bAutoUpdateCells : 1; // TRUE -> Zellen werden autoformatiert
BOOL bBasicHideCrsr : 1; // TRUE -> HideCrsr vom Basic
BOOL bSetCrsrInReadOnly : 1;// TRUE -> Cursor darf in ReadOnly-Bereiche
void UpdateCrsr( USHORT eFlags
=SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
BOOL bIdleEnd = FALSE );
void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
FASTBOOL LeftRight( BOOL, USHORT );
FASTBOOL UpDown( BOOL, USHORT );
FASTBOOL LRMargin( BOOL, BOOL bAPI = FALSE );
FASTBOOL IsAtLRMargin( BOOL, BOOL bAPI = FALSE ) const;
FASTBOOL SttEndDoc( BOOL bStt );
typedef FASTBOOL (SwCursor:: *FNCrsr)();
FASTBOOL CallCrsrFN( FNCrsr );
const SwRedline* _GotoRedline( USHORT nArrPos, BOOL bSelect );
protected:
CRSR_INLINE SwMoveFnCollection* MakeFindRange( USHORT, USHORT, SwPaM* ) const;
/*
* Compare-Methode for the StackCursor and the current Cursor.
* The Methods return -1, 0, 1 for lower, equal, greater. The enum
* CrsrCompareType says which position is compared.
*/
enum CrsrCompareType {
StackPtStackMk,
StackPtCurrPt,
StackPtCurrMk,
StackMkCurrPt,
StackMkCurrMk,
CurrPtCurrMk
};
int CompareCursor( CrsrCompareType eType ) const;
USHORT IncBasicAction() { return ++nBasicActionCnt; }
USHORT DecBasicAction() { return --nBasicActionCnt; }
// Setzt alle PaMs in OldNode auf NewPos + Offset
void PaMCorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos,
const xub_StrLen nOffset = 0 );
// Setzt alle PaMs im Bereich von [StartNode, EndNode] nach NewPos
void PaMCorrAbs(const SwNodeIndex &rStartNode, const SwNodeIndex &rEndNode,
const SwPosition &rNewPos );
public:
TYPEINFO();
SwCrsrShell( SwDoc *pDoc,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic::XSpellChecker1> xSpell,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic::XHyphenator> xHyph,
Window *pWin, SwRootFrm * = 0, const SwViewOption *pOpt = 0 );
// verkleideter Copy-Constructor
SwCrsrShell( SwCrsrShell* pShell, Window *pWin );
~SwCrsrShell();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
// neuen Cusror erzeugen und den alten anhaengen
SwPaM * CreateCrsr();
// loesche den aktuellen Cursor und der folgende wird zum Aktuellen
FASTBOOL DestroyCrsr();
// TableCursor in normale Cursor verwandeln, Tablemode aufheben
void TblCrsrToCursor();
SwPaM* GetCrsr( FASTBOOL bMakeTblCrsr = TRUE ) const;
CRSR_INLINE SwCursor* GetSwCrsr( FASTBOOL bMakeTblCrsr = TRUE ) const;
// nur den akt. Cursor returnen
SwShellCrsr* _GetCrsr() { return pCurCrsr; }
const SwShellCrsr* _GetCrsr() const { return pCurCrsr; }
// uebergebenen Cursor anzeigen - fuer UNO
void SetSelection(const SwPaM& rCrsr);
// alle Cursor aus den ContentNodes entfernen und auf 0 setzen.
// Wurde aus der FEShell hierher verschoben.
void ParkCrsr( const SwNodeIndex &rIdx );
// gebe den akt. Cursor-Stack zurueck.
// ( Wird in der EditShell beim Loeschen von Inhalten benoetigt! )
CRSR_INLINE SwPaM* GetStkCrsr() const;
// Start der Klammerung, SV-Cursor und selektierte Bereiche hiden
void StartAction();
// Ende der Klammerung, SV-Cursor und selektierte Bereiche anzeigen
void EndAction( const BOOL bIdleEnd = FALSE );
USHORT GetBasicActionCnt() const { return nBasicActionCnt; }
// Basiscursortravelling
long GetUpDownX() const { return nUpDownX; }
FASTBOOL Left( USHORT nCnt = 1 ) { return LeftRight( TRUE, nCnt ); }
FASTBOOL Right( USHORT nCnt = 1 ) { return LeftRight( FALSE, nCnt ); }
FASTBOOL Up( USHORT nCnt = 1 ) { return UpDown( TRUE, nCnt ); }
FASTBOOL Down( USHORT nCnt = 1 ) { return UpDown( FALSE, nCnt ); }
FASTBOOL LeftMargin() { return LRMargin( TRUE ); }
FASTBOOL RightMargin(BOOL bAPI = FALSE) { return LRMargin( FALSE, bAPI ); }
FASTBOOL SttDoc() { return SttEndDoc( TRUE ); }
FASTBOOL EndDoc() { return SttEndDoc( FALSE ); }
FASTBOOL MovePage( SwWhichPage, SwPosPage );
FASTBOOL MovePara( SwWhichPara, SwPosPara );
FASTBOOL MoveSection( SwWhichSection, SwPosSection );
FASTBOOL MoveTable( SwWhichTable, SwPosTable );
FASTBOOL MoveColumn( SwWhichColumn, SwPosColumn );
FASTBOOL MoveRegion( SwWhichRegion, SwPosRegion );
// die Suchfunktionen
ULONG Find( const SearchParam& rParam,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eRng, int bReplace = FALSE );
ULONG Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 );
ULONG Find( const SfxItemSet& rSet, FASTBOOL bNoCollections,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eRng, const SearchParam* pTextPara = 0,
const SfxItemSet* rReplSet = 0 );
// Positionieren des Cursors
// returnt
// CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde.
// CRSR_POSOLD: wenn der Crsr nicht veraendert wurde
int SetCrsr( const Point &rPt, BOOL bOnlyText = FALSE );
/*
* Benachrichtung, dass der sichtbare Bereich sich geaendert
* hat. aVisArea wird neu gesetzt, anschliessend wird
* gescrollt. Das uebergebene Rectangle liegt auf
* Pixelgrenzen, um Pixelfehler beim Scrollen zu vermeiden.
*/
virtual void VisPortChgd( const SwRect & );
/*
* Virtuelle PaintMethode, damit die Selection nach dem Paint wieder
* sichtbar wird.
*/
void Paint( const Rectangle & rRect );
// Bereiche
CRSR_INLINE void SetMark();
CRSR_INLINE FASTBOOL HasMark();
void ClearMark();
void SwapPam();
FASTBOOL ChgCurrPam( const Point & rPt,
BOOL bTstOnly = TRUE, //Nur testen, nicht setzen
BOOL bTstHit = FALSE ); //Nur genaue Treffer
void KillPams();
// erzeuge eine Kopie vom Cursor und speicher diese im Stack
void Push();
/*
* Loescht einen Cursor (gesteuert durch bOldCrsr)
* - vom Stack oder ( bOldCrsr = TRUE )
* - den aktuellen und der auf dem Stack stehende wird zum aktuellen
*
* Return: es war auf dem Stack noch einer vorhanden
*/
FASTBOOL Pop( BOOL bOldCrsr = TRUE );
/*
* Verbinde zwei Cursor miteinander.
* Loesche vom Stack den obersten und setzen dessen Mark im Aktuellen.
*/
void Combine();
#if defined( PRODUCT )
void SttCrsrMove() { ++nCrsrMove; StartAction(); }
void EndCrsrMove( const BOOL bIdleEnd = FALSE )
{ EndAction( bIdleEnd ); --nCrsrMove; }
#else
void SttCrsrMove();
void EndCrsrMove( const BOOL bIdleEnd = FALSE );
#endif
/*
* Beim Abgeben des Focuses werden die selektierten Bereiche nicht mehr
* angezeigt; andererseits beim Erhalten des Focuses, werden alle selek-
* tierten Bereiche wieder angezeigt. (Bereiche muessen neu berechnet
* werden!)
*/
BOOL HasShFcs() const { return bHasFocus; }
void ShLooseFcs();
void ShGetFcs( BOOL bUpdate = TRUE );
// Methoden zum Anzeigen bzw. Verstecken des sichtbaren Text-Cursors
void ShowCrsr();
void HideCrsr();
// Methoden zum Anzeigen bzw. Verstecken der selektierten Bereiche mit
// dem sichtbaren Cursor
void ShowCrsrs( BOOL bCrsrVis );
void HideCrsrs();
// Methoden zum Anzeigen bzw. Verstecken der selektierten Bereiche mit
// dem sichtbaren Cursor
void BasicShowCrsrs()
{ bBasicHideCrsr = FALSE; bSVCrsrVis = TRUE; ShowCrsrs(TRUE); }
void BasicHideCrsrs()
{ HideCrsrs(); bBasicHideCrsr = TRUE; bSVCrsrVis = FALSE; }
FASTBOOL IsBasicHideCrsr() const { return bBasicHideCrsr; }
// gebe den aktuellen Frame, in dem der Cursor steht, zurueck
SwCntntFrm *GetCurrFrm( const BOOL bCalcFrm = TRUE ) const;
//TRUE wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
//FALSE wenn der arbeitet (trotz Readonly).
FASTBOOL IsCrsrReadonly() const;
// Cursor steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
FASTBOOL HasReadonlySel() const;
// darf der Cursor in ReadOnlyBereiche?
FASTBOOL IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
void SetReadOnlyAvailable( BOOL bFlag );
FASTBOOL IsOverReadOnlyPos( const Point& rPt ) const;
// Methoden fuer aFlyMacroLnk
void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; }
const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; }
// Methoden geben/aendern den Link fuer die Attribut/Format-Aenderungen
void SetChgLnk( const Link &rLnk ) { aChgLnk = rLnk; }
const Link& GetChgLnk() const { return aChgLnk; }
// Methoden geben/aendern den Link fuers "Grafik vollstaendig geladen"
void SetGrfArrivedLnk( const Link &rLnk ) { aGrfArrivedLnk = rLnk; }
const Link& GetGrfArrivedLnk() const { return aGrfArrivedLnk; }
//ChgLink callen, innerhalb einer Action wird der Ruf verzoegert.
void CallChgLnk();
// Abfrage, ob der aktuelle Cursor eine Selektion aufspannt,
// also, ob Mark gesetzt und SPoint und Mark unterschiedlich sind.
FASTBOOL HasSelection();
// Abfrage, ob ueberhaupt eine Selektion existiert, sprich der akt. Cursor
// aufgespannt oder nicht der einzigste ist.
CRSR_INLINE FASTBOOL IsSelection() const;
// Abfrage, ob ein kompletter Absatz selektiert wurde
FASTBOOL IsSelFullPara() const;
// Abfrage, ob die Selektion in einem Absatz ist
CRSR_INLINE FASTBOOL IsSelOnePara() const;
//Sollte fuer das Clipboard der WaitPtr geschaltet werden.
FASTBOOL ShouldWait() const;
/*
* liefert das SRectangle, auf dem der Cursor steht.
*/
const SwRect &GetCharRect() const { return aCharRect; }
/*
* liefert zurueck, ob der Cursor sich ganz oder teilweise im
* sichtbaren Bereich befindet.
*/
FASTBOOL IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
// gebe die aktuelle Seitennummer zurueck:
// TRUE: in der der Cursor steht
// FALSE: die am oberen Rand sichtbar ist
void GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
BOOL bAtCrsrPos = TRUE, const BOOL bCalcFrm = TRUE );
// bestimme in welche Richtung "leere Seiten" behandelt werden!
// (wird benutzt im PhyPage.. )
USHORT GetNextPrevPageNum( BOOL bNext = TRUE );
// setze den Cursor auf die Seite "nPage" an den Anfang
FASTBOOL GotoPage( USHORT nPage );
// gebe alle Dokumentseiten zurueck
USHORT GetPageCnt();
// Gehe zur naechsten Selection
FASTBOOL GoNextCrsr();
// gehe zur vorherigen Selection
FASTBOOL GoPrevCrsr();
// am CurCrsr.SPoint
FASTBOOL SetBookmark( const KeyCode&, const String& rName,
const String& rShortName, BOOKMARK_TYPE eMark = BOOKMARK );
FASTBOOL GotoBookmark( USHORT ); // setzt CurCrsr.SPoint
FASTBOOL GotoBookmark( USHORT nPos, BOOL bAtStart ); //
FASTBOOL GoNextBookmark(); // TRUE, wenn's noch eine gab
FASTBOOL GoPrevBookmark();
USHORT GetBookmarkCnt(BOOL bBkmrk = FALSE) const;
SwBookmark& GetBookmark( USHORT, BOOL bBkmrk = FALSE );
void DelBookmark( USHORT );
void DelBookmark( const String& rName );
USHORT FindBookmark( const String& rName );
// erzeugt einen eindeutigen Namen. Der Name selbst muss vorgegeben
// werden, es wird dann bei gleichen Namen nur durchnumeriert.
void MakeUniqueBookmarkName( String& rNm );
// aktualisiere den Crsrs, d.H. setze ihn wieder in den Content.
// Das sollte nur aufgerufen werden, wenn der Cursor z.B. beim
// Loeschen von Rahmen irgendwohin gesetzt wurde. Die Position
// ergibt sich aus seiner aktuellen Position im Layout !!
void UpdateCrsrPos();
// returne den am akt. Cursor selektierten Text. Dieser wird mit
// Felder etc. aufgefuellt!!
String GetSelTxt() const;
// gebe nur den Text ab der akt. Cursor Position zurueck (bis zum NodeEnde)
String GetText() const;
// retrurne die Anzahl der selektierten Zeichen.
// Falls keine Selektion vorliegt entscheided nType was selektiert wird
// bIntrnlChar besagt ob interne Zeichen erhalten bleiben (TRUE) oder
// ob sie expandiert werden (z.B Felder/...)
ULONG GetCharCount( USHORT nType, BOOL bIntrnlChrs = TRUE ) const;
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
CRSR_INLINE const SwTableNode* IsCrsrInTbl( BOOL bIsPtInTbl = TRUE ) const;
// erfrage die Document - Layout - Position vom akt. Crsr
CRSR_INLINE Point& GetCrsrDocPos( BOOL bPoint = TRUE ) const;
CRSR_INLINE FASTBOOL IsCrsrPtAtEnd() const;
CRSR_INLINE const SwPaM* GetTblCrs() const;
CRSR_INLINE SwPaM* GetTblCrs();
FASTBOOL IsTblComplex() const;
FASTBOOL IsTblComplexForChart() const;
// erfrage die akt. TabellenSelektion als Text
String GetBoxNms() const;
// setze Crsr in die naechsten/vorherigen Celle
FASTBOOL GoNextCell( BOOL bAppendLine = TRUE );
FASTBOOL GoPrevCell();
// gehe zu dieser Box (wenn vorhanden und in Tabelle!)
FASTBOOL GotoTblBox( const String& rName );
FASTBOOL GotoTable( const String& rName );
// selectiere diese Zeile/Spalte
FASTBOOL SelTblRow();
FASTBOOL SelTblCol();
// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
FASTBOOL GotoNextNum();
FASTBOOL GotoPrevNum();
// zu diesem Gliederungspunkt
FASTBOOL GotoOutline( const String& rName );
// zum naechsten/vorhergehenden oder angegebenen OultineNode
void GotoOutline( USHORT nIdx );
// suche die "Outline-Position" im Nodes-Array vom akt. Kaiptel
USHORT GetOutlinePos( BYTE nLevel = UCHAR_MAX );
// selektiere den angeben Bereich von OutlineNodes. Optional
// inclusive der Childs. Die USHORT sind die Positionen im
// OutlineNds-Array!! (EditShell)
FASTBOOL MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
BOOL bWithChilds = FALSE );
FASTBOOL GotoNextOutline(); // naechster Node mit Outline-Num.
FASTBOOL GotoPrevOutline(); // vorheriger Node mit Outline-Num.
// ist der Crsr in einer Tabelle und ist die Selection ueber
// zwei Spalten
FASTBOOL IsTableMode() const { return 0 != pTblCrsr; }
// erfrage den Tabellen Crsr; ausserhalb von Tabellen immer 0
const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; }
SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; }
USHORT UpdateTblSelBoxes();
FASTBOOL GotoFtnTxt(); // springe aus dem Content zur Fussnote
FASTBOOL GotoFtnAnchor(); // springe aus der Fussnote zum Anker
FASTBOOL GotoNextFtnAnchor();
FASTBOOL GotoPrevFtnAnchor();
FASTBOOL GotoNextFtnCntnt();
FASTBOOL GotoPrevFtnCntnt();
FASTBOOL GotoFlyTxt(); // springe aus dem Content zum "naechsten" Rahmen
FASTBOOL GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
FASTBOOL GotoHeaderTxt(); // springe aus dem Content zum Header
FASTBOOL GotoFooterTxt(); // springe aus dem Content zum Footer
// springe in den Header/Footer des angegebenen oder akt. PageDesc
FASTBOOL SetCrsrInHdFt( USHORT nDescNo = USHRT_MAX,
FASTBOOL bInHeader = TRUE );
// is point of cursor in header/footer. pbInHeader return TRUE if it is
// in a headerframe otherwise in a footerframe
FASTBOOL IsInHeaderFooter( FASTBOOL* pbInHeader = 0 ) const;
// springe zum naechsten Verzeichnis [mit dem Namen]
FASTBOOL GotoNextTOXBase( const String* = 0 );
// springe zum vorherigen Verzeichnis [mit dem Namen]
FASTBOOL GotoPrevTOXBase( const String* = 0 );
FASTBOOL GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
// springe zum naechsten (vorherigen) Verzeichniseintrag
FASTBOOL GotoNxtPrvTOXMark( BOOL bNext = TRUE );
// Zur naechsten/ vorherigen Verzeichnismarke dieses Typs traveln
const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir );
// springe zum naechsten (vorherigen) Tabellenformel
// optional auch nur zu kaputten Formeln springen
FASTBOOL GotoNxtPrvTblFormula( BOOL bNext = TRUE,
BOOL bOnlyErrors = FALSE );
// springe zu dieser Refmark
FASTBOOL GotoRefMark( const String& rRefMark, USHORT nSubType = 0,
USHORT nSeqNo = 0 );
// hole vom Start/Ende der akt. Selection das nte Zeichen
sal_Unicode GetChar( BOOL bEnd = TRUE, long nOffset = 0 );
// erweiter die akt. Selection am Anfang/Ende um n Zeichen
FASTBOOL ExtendSelection( BOOL bEnd = TRUE, xub_StrLen nCount = 1 );
// setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
// returnt FALSE: wenn der ob der SPoint vom Layout korrigiert wurde.
// (wird zum Anzeigen von Drag&Drop/Copy-Cursor benoetigt)
FASTBOOL SetVisCrsr( const Point &rPt );
CRSR_INLINE void UnSetVisCrsr();
// springe zum nachsten/vorherigen Feld des entsprechenden Types
FASTBOOL MoveFldType( const SwFieldType* pFldType, BOOL bNext,
USHORT nSubType = USHRT_MAX,
USHORT nResType = USHRT_MAX );
// springe genau zu diesem Feld
FASTBOOL GotoFld( const SwFmtFld& rFld );
// returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
// aufgepspannte haben will - sprich etwas selektiert ist (Basic))
USHORT GetCrsrCnt( BOOL bAll = TRUE ) const;
// Char Travelling - Methoden (in crstrvl1.cxx)
FASTBOOL IsStartWord()const;
FASTBOOL IsEndWord() const;
FASTBOOL IsInWord() const;
FASTBOOL GoStartWord();
FASTBOOL GoEndWord();
FASTBOOL GoNextWord();
FASTBOOL GoPrevWord();
FASTBOOL GoNextSentence();
FASTBOOL GoPrevSentence();
FASTBOOL SelectWord( const Point* pPt = 0 );
// Abfrage vom CrsrTravelling Status
CrsrMoveState GetMoveState() const { return eMvState; }
// Position vom akt. Cursor erfragen
FASTBOOL IsStartOfDoc() const;
FASTBOOL IsEndOfDoc() const;
FASTBOOL IsSttPara() const;
FASTBOOL IsEndPara() const;
FASTBOOL IsAtLeftMargin() const { return IsAtLRMargin( TRUE ); }
FASTBOOL IsAtRightMargin(BOOL bAPI = FALSE) const { return IsAtLRMargin( FALSE, bAPI ); }
// loesche alle erzeugten Crsr, setze den Tabellen-Crsr und den letzten
// Cursor auf seinen TextNode (oder StartNode?).
// Beim naechsten ::GetCrsr werden sie wieder alle erzeugt.
// Wird fuers Drag&Drop/ClipBorad-Paste in Tabellen benoetigt.
FASTBOOL ParkTblCrsr();
// erfrage die selektierte "Region" aller Cursor (fuer D&D auf Mac)
Region GetCrsrRegion() const;
// gibt es nicht aufgespannte Attribute?
FASTBOOL IsGCAttr() const { return bGCAttr; }
void ClearGCAttr() { bGCAttr = FALSE; }
void UpdateAttr() { bGCAttr = TRUE; }
// ist das gesamte Dokument geschuetzt/versteckt?? (fuer UI,..)
FASTBOOL IsAllProtect() const { return bAllProtect; }
#ifdef SW_CRSR_TIMER
// setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (TRUE)
// oder direkt (FALSE) angezeigt wird. (default ist Timer getriggert)
FASTBOOL ChgCrsrTimerFlag( BOOL bTimerOn = TRUE );
#endif
// steht der Curor auf einem "Symbol"-Zeichen
FASTBOOL IsInSymbolFont() const;
BOOL BasicActionPend() const { return nBasicActionCnt != nStartAction; }
// springe zum benannten Bereich
FASTBOOL GotoRegion( const String& rName );
// zeige die aktuelle Selektion an
virtual void MakeSelVisible();
// setzte den Cursor auf einen NICHT geschuetzten/versteckten Node
FASTBOOL FindValidCntntNode( BOOL bOnlyText = FALSE );
FASTBOOL GetContentAtPos( const Point& rPt,
SwContentAtPos& rCntntAtPos,
FASTBOOL bSetCrsr = FALSE,
SwRect* pFldRect = 0 );
// Attribut selelktieren
FASTBOOL SelectTxtAttr( USHORT nWhich, BOOL bExpand = FALSE,
const SwTxtAttr* pAttr = 0 );
FASTBOOL GotoINetAttr( const SwTxtINetFmt& rAttr );
const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
FASTBOOL CheckTblBoxCntnt( const SwPosition* pPos = 0 );
void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
void ClearTblBoxCntnt();
FASTBOOL EndAllTblBoxEdit();
// wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird,
// ohne das die UI davon etaws weiss
virtual void NewCoreSelection();
void SetSelTblCells( BOOL bFlag ) { bSelTblCells = bFlag; }
BOOL IsSelTblCells() const { return bSelTblCells; }
BOOL IsAutoUpdateCells() const { return bAutoUpdateCells; }
void SetAutoUpdateCells( BOOL bFlag ) { bAutoUpdateCells = bFlag; }
FASTBOOL GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
SwRect& rRect, SwHoriOrient& rOrient );
FASTBOOL SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
const SwRedline* SelNextRedline();
const SwRedline* SelPrevRedline();
const SwRedline* GotoRedline( USHORT nArrPos, BOOL bSelect = FALSE );
};
class SwChgLinkFlag
{
BOOL bOldFlag;
SwCrsrShell& rCrsrShell;
long nLeftFrmPos;
public:
SwChgLinkFlag( SwCrsrShell& rShell );
~SwChgLinkFlag();
};
// Cursor Inlines:
#if defined(PRODUCT) && !defined(WIN)
inline SwMoveFnCollection* SwCrsrShell::MakeFindRange(
USHORT nStt, USHORT nEnd, SwPaM* pPam ) const
{
return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam );
}
inline SwCursor* SwCrsrShell::GetSwCrsr( FASTBOOL bMakeTblCrsr ) const
{
return (SwCursor*)GetCrsr( bMakeTblCrsr );
}
inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; }
inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); }
inline FASTBOOL SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
inline FASTBOOL SwCrsrShell::IsSelection() const
{
return IsTableMode() || pCurCrsr->HasMark() ||
pCurCrsr->GetNext() != pCurCrsr;
}
inline FASTBOOL SwCrsrShell::IsSelOnePara() const
{
return pCurCrsr == pCurCrsr->GetNext() &&
pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode;
}
inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( BOOL bIsPtInTbl ) const
{
return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
}
inline FASTBOOL SwCrsrShell::IsCrsrPtAtEnd() const
{
return pCurCrsr->End() == pCurCrsr->GetPoint();
}
inline Point& SwCrsrShell::GetCrsrDocPos( BOOL bPoint ) const
{
return bPoint ? pCurCrsr->GetPtPos() : pCurCrsr->GetMkPos();
}
inline const SwPaM* SwCrsrShell::GetTblCrs() const
{
return pTblCrsr;
}
inline SwPaM* SwCrsrShell::GetTblCrs()
{
return pTblCrsr;
}
inline void SwCrsrShell::UnSetVisCrsr()
{
pVisCrsr->Hide();
pVisCrsr->SetDragCrsr( FALSE );
}
#endif
#endif // _CRSRSH_HXX
+156
View File
@@ -0,0 +1,156 @@
/*************************************************************************
*
* $RCSfile: crstate.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CRSTATE_HXX
#define _CRSTATE_HXX
#ifndef _GEN_HXX //autogen
#include <tools/gen.hxx>
#endif
#ifndef _SWTYPES_HXX
#include <swtypes.hxx>
#endif
#ifndef _SWRECT_HXX
#include <swrect.hxx>
#endif
enum SwFillMode
{
FILL_TAB, // default, Auffuellen mit Tabulatoren
FILL_SPACE, // ... mit Tabulatoren und Spaces
FILL_MARGIN, // nur links, zentriert, rechts Ausrichten
FILL_INDENT // durch linken Absatzeinzug
};
struct SwFillCrsrPos
{
SwRect aCrsr; // Position und Groesse des Shadowcursors
USHORT nParaCnt; // Anzahl der einzufuegenden Absaetze
USHORT nTabCnt; // Anzahl der Tabs bzw. Groesse des Einzugs
USHORT nSpaceCnt; // Anzahl der einzufuegenden Leerzeichen
USHORT nColumnCnt; // Anzahl der notwendigen Spaltenumbrueche
SwHoriOrient eOrient; // Absatzausrichtung
SwFillMode eMode; // Gewuenschte Auffuellregel
SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) :
nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ),
eOrient( HORI_NONE ), eMode( eMd )
{}
};
// CrsrTravelling-Staties (fuer GetCrsrOfst)
enum CrsrMoveState
{
MV_NONE, // default
MV_UPDOWN, // Crsr Up/Down
MV_RIGHTMARGIN, // an rechten Rand
MV_LEFTMARGIN, // an linken Rand
MV_SETONLYTEXT, // mit dem Cursr nur im Text bleiben
MV_TBLSEL // nicht in wiederholte Headlines
};
// struct fuer spaetere Erweiterungen
struct SwCrsrMoveState
{
SwFillCrsrPos *pFill; // fuer das automatische Auffuellen mit Tabs etc.
Point aRealHeight; // enthaelt dann die Position/Hoehe des Cursors
CrsrMoveState eState;
BOOL bStop :1;
BOOL bRealHeight :1; // Soll die reale Hoehe berechnet werden?
BOOL bFieldInfo :1; // Sollen Felder erkannt werden?
BOOL bPosCorr :1; // Point musste korrigiert werden
BOOL bFtnNoInfo :1; // Fussnotennumerierung erkannt
BOOL bExactOnly :1; // GetCrsrOfst nur nach Exakten Treffern
// suchen lassen, sprich niemals in das
// GetCntntPos laufen.
BOOL bFillRet :1; // wird nur im FillModus temp. genutzt
BOOL bSetInReadOnly :1; // ReadOnlyBereiche duerfen betreten werden
BOOL bDropIt :1; // dropportions allowed
SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) :
pFill( NULL ),
eState( eSt ),
bStop( FALSE ),
bRealHeight( FALSE ),
bFieldInfo( FALSE ),
bPosCorr( FALSE ),
bFtnNoInfo( FALSE ),
bExactOnly( FALSE ),
bSetInReadOnly( FALSE ),
bDropIt( FALSE )
{}
SwCrsrMoveState( SwFillCrsrPos *pInitFill ) :
pFill( pInitFill ),
eState( MV_SETONLYTEXT ),
bStop( FALSE ),
bRealHeight( FALSE ),
bFieldInfo( FALSE ),
bPosCorr( FALSE ),
bFtnNoInfo( FALSE ),
bExactOnly( FALSE ),
bSetInReadOnly( FALSE ),
bDropIt( FALSE )
{}
};
#endif
+147
View File
@@ -0,0 +1,147 @@
/*************************************************************************
*
* $RCSfile: cshtyp.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CSHTYP_HXX
#define _CSHTYP_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
class UniString;
class SwPaM;
class SwCntntFrm;
class SwLayoutFrm;
// eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer
// fuer das richtungsabhaengige Bewegen des Cursors.
struct SwMoveFnCollection;
typedef SwMoveFnCollection* SwMoveFn;
// Type-Definition fuer die CrsrShell
// Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert )
typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
typedef SwCntntFrm * (*SwPosPage)( const SwLayoutFrm * );
extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
extern SwPosPage fnPageStart, fnPageEnd;
// Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
typedef SwMoveFnCollection* SwPosPara;
typedef FASTBOOL (*SwWhichPara)( SwPaM&, SwPosPara );
extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
extern SwPosPara fnParaStart, fnParaEnd;
// Richtungsparameter fuer MoveSection
typedef SwMoveFnCollection* SwPosSection;
typedef FASTBOOL (*SwWhichSection)( SwPaM&, SwPosSection );
extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
extern SwPosSection fnSectionStart, fnSectionEnd;
// Richtungsparameter fuer MoveTable
typedef SwMoveFnCollection* SwPosTable;
typedef FASTBOOL (*SwWhichTable)( SwPaM&, SwPosTable, FASTBOOL bInReadOnly );
extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
extern SwPosTable fnTableStart, fnTableEnd;
// Richtungsparameter fuer MoveColumn
typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
typedef SwCntntFrm * (*SwPosColumn)( const SwLayoutFrm * );
extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
extern SwPosColumn fnColumnStart, fnColumnEnd;
// Richtungsparameter fuer MoveRegion (Bereiche!)
typedef SwMoveFnCollection* SwPosRegion;
typedef FASTBOOL (*SwWhichRegion)( SwPaM&, SwPosRegion, FASTBOOL bInReadOnly );
extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
extern SwPosRegion fnRegionStart, fnRegionEnd;
/*
* folgende Kombinationen sind erlaubt:
* - suche einen im Body: -> FND_IN_BODY
* - suche alle im Body: -> FND_IN_BODYONLY | FND_IN_SELALL
* - suche in Selectionen: einen / alle -> FND_IN_SEL [ | FND_IN_SELALL ]
* - suche im nicht Body: einen / alle -> FND_IN_OTHER [ | FND_IN_SELALL ]
* - suche ueberall alle: -> FND_IN_SELALL
*/
enum FindRanges
{
FND_IN_BODY = 0x00, // suche "eins" mur im Body-Text
FND_IN_OTHER = 0x02, // suche "alles" in Footer/Header/Fly...
FND_IN_SEL = 0x04, // suche in Selectionen
FND_IN_BODYONLY = 0x08, // suche nur im Body - nur in Verbindung mit
// FND_IN_SELALL !!!
FND_IN_SELALL = 0x01 // - alle ( nur im nicht Body und Selectionen)
};
enum SwDocPositions
{
DOCPOS_START,
DOCPOS_CURR,
DOCPOS_END,
DOCPOS_OTHERSTART,
DOCPOS_OTHEREND
};
#endif // _CSHTYP_HXX
+366
View File
@@ -0,0 +1,366 @@
/*************************************************************************
*
* $RCSfile: dbfld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DBFLD_HXX
#define _DBFLD_HXX
#include "fldbas.hxx"
class SwDoc;
class SwTxtFld;
class SwFrm;
/*--------------------------------------------------------------------
Beschreibung: Datenbankfeld
--------------------------------------------------------------------*/
class SwDBFieldType : public SwValueFieldType
{
String aName; // Syntax: Datenbankname.Feldname
long nRefCnt;
public:
SwDBFieldType(SwDoc* pDocPtr, const String& Name, const String& rSymDBName);
virtual const String& GetName() const;
virtual SwFieldType* Copy() const;
inline void AddRef() { nRefCnt++; }
void ReleaseRef();
inline long GetRefCount() { return nRefCnt; }
String GetColumnName();
String GetDBName();
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung:
von SwFields abgeleitete Klassen. Sie ueberlagern die Expand-Funktion.
Der Inhalt wird entsprechend dem Format, soweit vorhanden, formatiert.
--------------------------------------------------------------------*/
class SwDBField : public SwValueField
{
String aContent;
USHORT nSubType;
BOOL bIsInBodyTxt : 1;
BOOL bValidValue : 1;
BOOL bInitialized : 1;
public:
SwDBField(SwDBFieldType*, ULONG nFmt = 0);
virtual ~SwDBField();
virtual SwFieldType* ChgTyp( SwFieldType* );
// Der aktuelle Text
inline void SetExpansion(const String& rStr);
virtual String Expand() const;
virtual SwField* Copy() const;
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nType);
// Name oder Inhalt
virtual String GetCntnt(BOOL bName = FALSE) const;
// fuer Berechnungen in Ausdruecken
void ChgValue( double d, BOOL bVal );
// Evaluierung ueber den DBMgr String rauspulen
void Evaluate();
// Evaluierung fuer Kopf und Fusszeilen
void ChangeExpansion( const SwFrm*, const SwTxtFld* );
void InitContent();
void InitContent(const String& rExpansion);
String GetOldContent();
inline void ChgBodyTxtFlag( BOOL bIsInBody );
inline BOOL IsInBodyTxt() const;
inline BOOL IsValidValue() const { return bValidValue; }
inline BOOL IsInitialized() const { return bInitialized; }
inline void ClearInitialized() { bInitialized = FALSE; }
inline void SetInitialized() { bInitialized = TRUE; }
// Name erfragen
virtual const String& GetPar1() const;
// DBName
inline String GetDBName() const { return ((SwDBFieldType*)GetTyp())->GetDBName(); }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
inline void SwDBField::SetExpansion(const String& rStr)
{ aContent = rStr; }
// wird von der Formatierung abgefragt
inline BOOL SwDBField::IsInBodyTxt() const
{ return bIsInBodyTxt; }
// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
/*--------------------------------------------------------------------
Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
--------------------------------------------------------------------*/
class SwDBNameInfField : public SwField
{
String sDBName;
protected:
const String& GetDBName() const {return sDBName;}
String& GetDBName() {return sDBName;}
SwDBNameInfField(SwFieldType* pTyp, const String& rDBName, ULONG nFmt = 0);
public:
// DBName
inline const String& GetRealDBName() { return sDBName; }
String GetDBName(SwDoc* pDoc);
inline void SetDBName(const String& rDBName) { sDBName = rDBName; }
// Name oder Inhalt
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Datenbankfeld Naechster Satz
--------------------------------------------------------------------*/
class SwDBNextSetFieldType : public SwFieldType
{
public:
SwDBNextSetFieldType();
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Naechsten Datensatz mit Bedingung
--------------------------------------------------------------------*/
class SwDBNextSetField : public SwDBNameInfField
{
String aCond;
BOOL bCondValid;
public:
SwDBNextSetField( SwDBNextSetFieldType*,
const String& rCond, const String& rDummy, const String& rDBName);
virtual String Expand() const;
virtual SwField* Copy() const;
void Evaluate(SwDoc*);
inline void SetCondValid(BOOL bCond);
inline BOOL IsCondValid() const;
// Condition
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
inline BOOL SwDBNextSetField::IsCondValid() const
{ return bCondValid; }
inline void SwDBNextSetField::SetCondValid(BOOL bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
Beschreibung: Datenbankfeld Naechster Satz
--------------------------------------------------------------------*/
class SwDBNumSetFieldType : public SwFieldType
{
public:
SwDBNumSetFieldType();
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Datensatz mit Nummer xxx
Die Nummer steht in nFormat
! kleiner Missbrauch
--------------------------------------------------------------------*/
class SwDBNumSetField : public SwDBNameInfField
{
String aCond;
String aPar2;
BOOL bCondValid;
public:
SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const String& rDBName);
virtual String Expand() const;
virtual SwField* Copy() const;
inline BOOL IsCondValid() const;
inline void SetCondValid(BOOL bCond);
void Evaluate(SwDoc*);
// Condition
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// Datensatznummer
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
// Die Datensatznummer steht in nFormat !!
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
inline BOOL SwDBNumSetField::IsCondValid() const
{ return bCondValid; }
inline void SwDBNumSetField::SetCondValid(BOOL bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
Beschreibung: Datenbankname
--------------------------------------------------------------------*/
class SwDBNameFieldType : public SwFieldType
{
SwDoc *pDoc;
public:
SwDBNameFieldType(SwDoc*);
String Expand(ULONG) const;
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Datenbankfeld
--------------------------------------------------------------------*/
class SwDBNameField : public SwDBNameInfField
{
public:
SwDBNameField(SwDBNameFieldType*, const String& rDBName, ULONG nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Datensatznummer
--------------------------------------------------------------------*/
class SwDBSetNumberFieldType : public SwFieldType
{
public:
SwDBSetNumberFieldType();
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Datenbankfeld
--------------------------------------------------------------------*/
class SwDBSetNumberField : public SwDBNameInfField
{
long nNumber;
public:
SwDBSetNumberField(SwDBSetNumberFieldType*, const String& rDBName, ULONG nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
void Evaluate(SwDoc*);
inline long GetSetNumber() const;
inline void SetSetNumber(long nNum);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
inline long SwDBSetNumberField::GetSetNumber() const
{ return nNumber; }
inline void SwDBSetNumberField::SetSetNumber(long nNum)
{ nNumber = nNum; }
#endif // _DBFLD_HXX
+383
View File
@@ -0,0 +1,383 @@
/*************************************************************************
*
* $RCSfile: dbmgr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _SWDBMGR_HXX
#define _SWDBMGR_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#ifdef REPLACE_OFADBMGR
#ifndef _SBAITEMS_HXX
#include "offmgr/sbaitems.hxx"
#endif
#ifndef _COM_SUN_STAR_UTIL_DATE_HPP_
#include <com/sun/star/util/Date.hpp>
#endif
#else
#ifndef _OFF_OFADBMGR_HXX //autogen
#include <offmgr/ofadbmgr.hxx>
#endif
#endif
#include "swtypes.hxx" // fuer aEmptyStr
#ifdef REPLACE_OFADBMGR
#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
#include <com/sun/star/uno/Reference.h>
#endif
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
#include <com/sun/star/uno/Sequence.h>
#endif
#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
#include <com/sun/star/lang/Locale.hpp>
#endif
namespace com{namespace sun{namespace star{
namespace sdbc{
class XConnection;
class XStatement;
class XDataSource;
class XResultSet;
}
namespace beans{
class XPropertySet;
}
namespace sdbcx{
class XColumnsSupplier;
}
namespace util{
class XNumberFormatter;
}
}}}
struct SwDBFormatData
{
com::sun::star::util::Date aNullDate;
com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter> xFormatter;
com::sun::star::lang::Locale aLocale;
};
#endif //REPLACE_OFADBMGR
class SwView;
class SwWrtShell;
class SwPrtOptions;
class SfxProgress;
class ListBox;
class Button;
class SvNumberFormatter;
// -----------------------------------------------------------------------
enum DBMgrOptions
{
DBMGR_MERGE, // Datensaetze in Felder
DBMGR_INSERT, // Datensaetze in Text
DBMGR_MERGE_MAILMERGE, // Serienbriefe drucken
DBMGR_MERGE_MAILING, // Serienbriefe als email versenden
DBMGR_MERGE_MAILFILES // Serienbriefe als Datei(en) speichern
};
// -----------------------------------------------------------------------
/*--------------------------------------------------------------------
Beschreibung: (neue) Logische Datenbanken verwalten
--------------------------------------------------------------------*/
#ifdef REPLACE_OFADBMGR
#define SW_DB_SELECT_UNKNOWN 0
#define SW_DB_SELECT_TABLE 1
#define SW_DB_SELECT_QUERY 2
struct SwDSParam
{
String sDataSource;
String sTableOrQuery;
BYTE nTableOrQuery;
String sStatement;
com::sun::star::util::Date aNullDate;
::com::sun::star::uno::Reference<com::sun::star::util::XNumberFormatter> xFormatter;
::com::sun::star::uno::Reference<::com::sun::star::sdbc::XConnection> xConnection;
::com::sun::star::uno::Reference<::com::sun::star::sdbc::XStatement> xStatement;
::com::sun::star::uno::Reference<::com::sun::star::sdbc::XResultSet> xResultSet;
SbaSelectionListRef xSelectionList;
BOOL bScrollable;
BOOL bSelectionList;
BOOL bEndOfDB;
long nSelectionIndex;
SwDSParam(const String& rSource, const String& rTable, BYTE nType, const String& rStatement) :
sDataSource(rSource),
sTableOrQuery(rTable),
nTableOrQuery(nType),
sStatement(rStatement),
bScrollable(FALSE),
bSelectionList(FALSE),
bEndOfDB(FALSE),
nSelectionIndex(0)
{}
};
typedef SwDSParam* SwDSParamPtr;
SV_DECL_PTRARR_DEL(SwDSParamArr, SwDSParamPtr, 0, 5)
#endif //REPLACE_OFADBMGR
#ifdef REPLACE_OFADBMGR
class SwNewDBMgr
#else
class SwNewDBMgr : public OfaDBMgr
#endif
{
SbaSelectionListRef pMergeList; // Liste der f�r Serienbrief selektierten Eintr„ge
String sEMailAddrFld; // Mailing: Spaltenname der E-Mail Adresse
String sSubject; // Mailing: Subject
String sAttached; // Mailing: Attachte Files
USHORT nMergeType;
BOOL bInitDBFields : 1; // TRUE: Datenbank an Feldern beim Mergen
BOOL bSingleJobs : 1; // Einzelne Druckjobs bei Aufruf aus Basic
BOOL bCancel : 1; // Serienbrief-Save abgebrochen
#ifdef REPLACE_OFADBMGR
BOOL bInMerge : 1; //merge process active
SwDSParamArr aDataSourceParams;
SwDSParam* pMergeData;
BOOL OpenMergeSource(const String& rDataSource,
const String& rDataTableOrQuery,
const String& rStatement,
const SbaSelectionListRef xSelectionList);
SwDSParam* FindDSData(const String& rDBName, BOOL bCreate);
#endif
DECL_LINK( PrtCancelHdl, Button * );
// Datensaetze als Text ins Dokument einfuegen
#ifdef REPLACE_OFADBMGR
void ImportFromConnection( SwWrtShell* pSh);
#else
void ImportFromConnection( SwWrtShell* pSh,
const SbaSelectionList* pSelList = 0 );
#endif
// Einzelnen Datensatz als Text ins Dokument einfuegen
#ifdef REPLACE_OFADBMGR
void ImportDBEntry(SwWrtShell* pSh);
#else
void ImportDBEntry(SbaDBDataDef* pDef, SwWrtShell* pSh);
BOOL GotoNextSelectedRecord( BOOL bSyncronized );
#endif
// Mischen von Datensaetzen in Felder, dann per email versenden
BOOL MergeMailing(SwWrtShell* pSh);
// Mischen von Datensaetzen in Felder, dann als Datei abspeichern
BOOL MergeMailFiles(SwWrtShell* pSh);
public:
SwNewDBMgr();
#ifdef REPLACE_OFADBMGR
~SwNewDBMgr();
#endif
// Am Dokument Datenbank- Tabellenname und SQL-Select-Statement setzen
void ChgDBName( SwWrtShell* pSh,
#ifdef REPLACE_OFADBMGR
const String& rDataSource,
const String& rTableOrQuery,
#else
const String& rDBName,
#endif
const String& rStatement );
// Art des aktellen Mergens. Siehe DBMgrOptions-enum
inline USHORT GetMergeType() const { return nMergeType; }
inline void SetMergeType( USHORT nTyp ) { nMergeType = nTyp; }
// Mischen von Datensaetzen in Felder
BOOL Merge(USHORT nOpt, SwWrtShell* pSh, const String& rStatement,
const SbaSelectionListRef pSelectionList,
#ifdef REPLACE_OFADBMGR
const String& rDataSource,
const String& rTableOrQuery,
#else
const String& rDBName,
#endif
const String *pPrinter = NULL);
BOOL Merge(SwWrtShell* pSh);
// Mischen von Datensaetzen in Felder, dann drucken
BOOL MergePrint( SwView& rView,
SwPrtOptions& rOpt, SfxProgress& rProgress );
inline SbaSelectionListRef& GetMergeList() { return pMergeList; }
// Datenbankfelder mit fehlendem Datenbankname initialisieren
inline BOOL IsInitDBFields() const { return bInitDBFields; }
inline void SetInitDBFields(BOOL b) { bInitDBFields = b; }
// Serienbriefe einzelnd oder alle zusammen drucken/speichern
inline BOOL IsSingleJobs() const { return bSingleJobs; }
inline void SetSingleJobs(BOOL b) { bSingleJobs = b; }
// Mailing
// email-Daten setzen
inline void SetEMailColumn(const String& sColName) { sEMailAddrFld = sColName; }
inline void SetSubject(const String& sSbj) { sSubject = sSbj; }
inline void SetAttachment(const String& sAtt) { sAttached = sAtt; }
#ifdef REPLACE_OFADBMGR
// Listbox mit allen Tabellennamen einer Datenbank fuellen
BOOL GetTableNames(ListBox* pListBox, const String& rDBName );
// Listbox mit allen Spaltennamen einer Datenbanktabelle fuellen
BOOL GetColumnNames(ListBox* pListBox,
const String& rDBName, const String& rTableName, BOOL bAppend = FALSE);
ULONG GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
SvNumberFormatter* pNFmtr,
long nLanguage );
sal_Int32 GetColumnType( const String& rDBName,
const String& rTableName,
const String& rColNm );
#else
// Listbox mit allen Tabellennamen einer Datenbank fuellen
BOOL GetTableNames(ListBox* pListBox, String sDBName);
// Listbox mit allen Spaltennamen einer Datenbanktabelle fuellen
BOOL GetColumnNames(ListBox* pListBox, String sDBName, BOOL bAppend = FALSE);
// DB-Cursor auf einen bestimmten Datensatz stellen
// (Ist im OfaDBMgr protected, daher hier nochmals als public fuer dbinsdlg.cxx)
inline void GotoRecord( ULONG nIndex )
{ OfaDBMgr::GotoRecord( FALSE, nIndex ); }
ULONG GetColumnFmt( const String& rDBName, const String& rColNm,
SvNumberFormatter* pNFmtr );
// Numberformat der Spalte ermitteln und ggfs. in den uebergebenen
// Formatter uebertragen
ULONG GetRealColumnFmt( const String& rColNm, ULONG nFmt,
SvNumberFormatter& rNFmtr );
BOOL IsDBCaseSensitive( const String& rName ) const;
#endif
#ifdef REPLACE_OFADBMGR
inline BOOL IsInMerge() const { return bInMerge; }
void EndMerge();
// check if a data source is open as merge source
BOOL IsDataSourceOpen(const String& rDataSource, const String& rTableOrQuery)const;
// add data source information to the data source array - was PreInitDBData
void AddDSData(const String& rDBName, long nSelStart, long nSelEnd);
void GetDSSelection(const String& sDBDesc, long& rSelStart, long& rSelEnd);
// open the source while fields are updated - for the calculator only!
BOOL OpenDataSource(const String& rDataSource, const String& rTableOrQuery);
sal_uInt32 GetSelectedRecordId(const String& rDataSource, const String& rTableOrQuery);
BOOL GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage,
String& rResult, double* pNumber);
const SwDSParam* CreateDSData(const String& rDBName)
{return FindDSData(rDBName, TRUE);}
const SwDSParamArr& GetDSParamArray() const {return aDataSourceParams;}
//close all data sources - after fields were updated
void CloseAll(BOOL bIncludingMerge = TRUE);
BOOL GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
String &rResult, double *pNumber, sal_uInt32 *pFormat);
BOOL ToNextMergeRecord();
BOOL ExistsNextRecord()const;
sal_uInt32 GetSelectedRecordId();
sal_Bool ToRecordId(sal_Int32 nSet);
BOOL ShowInBeamer(const String& rDBName, const String& rTableName,
BYTE nType, const String& rStatement);
const String& GetAddressDBName();
static String GetDBField(
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumnProp,
const SwDBFormatData& rDBFormatData,
double *pNumber = NULL);
static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
GetConnection(const String& rDataSource,
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& rxSource);
static ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>
GetColumnSupplier(::com::sun::star::uno::Reference<::com::sun::star::sdbc::XConnection>,
const String& rTableOrQuery,
BYTE eTableOrQuery = SW_DB_SELECT_UNKNOWN);
static ::com::sun::star::uno::Sequence<rtl::OUString> GetExistingDatabaseNames();
#else
#endif //REPLACE_OFADBMGR
};
#endif
+193
View File
@@ -0,0 +1,193 @@
/*************************************************************************
*
* $RCSfile: dcontact.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DCONTACT_HXX
#define _DCONTACT_HXX
#ifndef _SVDOBJ_HXX //autogen
#include <svx/svdobj.hxx>
#endif
#include "calbck.hxx"
class SfxPoolItem;
class SwFrmFmt;
class SwFlyFrmFmt;
class SwDrawFrmFmt;
class SwFlyFrm;
class SwFrm;
class SwPageFrm;
class SwVirtFlyDrawObj;
class SwFmtAnchor;
class SwFlyDrawObj;
class SwRect;
//Der Umgekehrte Weg: Sucht das Format zum angegebenen Objekt.
//Wenn das Object ein SwVirtFlyDrawObj ist so wird das Format von
//selbigem besorgt.
//Anderfalls ist es eben ein einfaches Zeichenobjekt. Diese hat einen
//UserCall und der ist Client vom gesuchten Format.
//Implementierung in dcontact.cxx
SwFrmFmt *FindFrmFmt( SdrObject *pObj );
inline const SwFrmFmt *FindFrmFmt( const SdrObject *pObj )
{ return ::FindFrmFmt( (SdrObject*)pObj ); }
//Bei Aenderungen das Objekt aus dem ContourCache entfernen.
//Implementierung in TxtFly.Cxx
void ClrContourCache( const SdrObject *pObj );
// liefert BoundRect inklusive Abstand
SwRect GetBoundRect( const SdrObject* pObj );
//Liefert den UserCall ggf. vom Gruppenobjekt
SdrObjUserCall* GetUserCall( const SdrObject* );
// liefert TRUE falls das SrdObject ein Marquee-Object (Lauftext) ist
FASTBOOL IsMarqueeTextObj( const SdrObject& rObj );
//Basisklasse fuer die folgenden KontaktObjekte (Rahmen+Zeichenobjekte)
class SwContact : public SdrObjUserCall, public SwClient
{
SdrObject *pMasterObj;
public:
TYPEINFO();
//Fuer den Reader, es wir nur die Verbindung hergestellt.
SwContact( SwFrmFmt *pToRegisterIn, SdrObject *pObj );
SwContact( SwModify *pToRegisterIn ) : SwClient( pToRegisterIn ){}
const SdrObject *GetMaster() const { return pMasterObj; }
SdrObject *GetMaster() { return pMasterObj; }
void SetMaster( SdrObject* pNew ){ pMasterObj = pNew; }
virtual ~SwContact();
SwFrmFmt *GetFmt(){ return (SwFrmFmt*)GetRegisteredIn(); }
const SwFrmFmt *GetFmt() const
{ return (const SwFrmFmt*)GetRegisteredIn(); }
};
//KontactObjekt fuer die Verbindung zwischen Rahmen bzw. deren Formaten
//im StarWriter (SwClient) und den Zeichenobjekten des Drawing (SdrObjUserCall)
class SwFlyDrawContact : public SwContact
{
public:
TYPEINFO();
//Legt das DrawObjekt an und meldet es beim Model an.
SwFlyDrawContact( SwFlyFrmFmt *pToRegisterIn, SdrModel *pMod );
SwFlyDrawContact( SwFrmFmt *pToRegisterIn, SdrObject *pObj ):
SwContact( pToRegisterIn, pObj ){}
SwVirtFlyDrawObj *CreateNewRef( SwFlyFrm *pFly );
// virtuelle Methoden von SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
};
//KontactObjekt fuer die Verbindung von Formaten als Repraesentanten der
//Zeichenobjekte im StarWriter (SwClient) und den Objekten selbst im Drawing
//(SdrObjUserCall).
class SwDrawContact : public SwContact
{
SwFrm *pAnchor;
SwPageFrm *pPage;
public:
TYPEINFO();
SwDrawContact( SwFrmFmt *pToRegisterIn, SdrObject *pObj );
virtual ~SwDrawContact();
const SwPageFrm *GetPage() const { return pPage; }
SwPageFrm *GetPage() { return pPage; }
const SwFrm *GetAnchor() const { return pAnchor; }
SwFrm *GetAnchor() { return pAnchor; }
void ChgAnchor( SwFrm *pNew ) { pAnchor = pNew; }
void ChgPage ( SwPageFrm *pNew){ pPage = pNew; }
void ChkPage(); //Muss immer nach SetAnchorPos() gerufen
//werden. Das Objekt haengt sich dann an
//die richtige Seite.
SwPageFrm* FindPage( const SwRect &rRect );
//Fuegt das SdrObject in die Arrays (SwPageFrm und SwFrm) des Layouts ein.
//Der Anker wird Anhand des Attributes SwFmtAnchor bestimmt.
//Das Objekt wird ggf. beim alten Anker abgemeldet.
void ConnectToLayout( const SwFmtAnchor *pAnch = 0 );
void DisconnectFromLayout( BOOL bRemoveFromPage = TRUE ); //Abmelden beim Anker.
// virtuelle Methoden von SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
// virtuelle Methoden von SdrObjUserCall
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect);
// wird von Changed() und auch vom UndoDraw benutzt, uebernimmt
// das Notifien von Absaetzen, die ausweichen muessen
void _Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle* pOldBoundRect);
//Moved alle SW-Verbindungen zu dem neuen Master.
void ChangeMasterObject( SdrObject *pNewMaster );
};
#endif
+152
View File
@@ -0,0 +1,152 @@
/*************************************************************************
*
* $RCSfile: ddefld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DDEFLD_HXX
#define _DDEFLD_HXX
#ifndef _LNKBASE_HXX //autogen
#include <so3/lnkbase.hxx>
#endif
#include "fldbas.hxx"
class SwDoc;
/*--------------------------------------------------------------------
Beschreibung: FieldType fuer DDE
--------------------------------------------------------------------*/
class SwDDEFieldType : public SwFieldType
{
String aName;
String aExpansion;
SvBaseLinkRef refLink;
SwDoc* pDoc;
USHORT nRefCnt;
BOOL bCRLFFlag : 1;
BOOL bDeleted : 1;
void _RefCntChgd();
public:
SwDDEFieldType( const String& rName, const String& rCmd,
USHORT = LINKUPDATE_ONCALL );
~SwDDEFieldType();
const String& GetExpansion() const { return aExpansion; }
void SetExpansion( const String& rStr ) { aExpansion = rStr,
bCRLFFlag = FALSE; }
virtual SwFieldType* Copy() const;
virtual const String& GetName() const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
String GetCmd() const;
void SetCmd( const String& rStr );
USHORT GetType() const { return refLink->GetUpdateMode(); }
void SetType( USHORT nType ) { refLink->SetUpdateMode( nType ); }
BOOL IsDeleted() const { return bDeleted; }
void SetDeleted( BOOL b ) { bDeleted = b; }
BOOL IsConnected() const { return 0 != refLink->GetObject(); }
void UpdateNow() { refLink->Update(); }
void Disconnect() { refLink->Disconnect(); }
const SvBaseLink& GetBaseLink() const { return *refLink; }
const SwDoc* GetDoc() const { return pDoc; }
SwDoc* GetDoc() { return pDoc; }
void SetDoc( SwDoc* pDoc );
void IncRefCnt() { if( !nRefCnt++ && pDoc ) _RefCntChgd(); }
void DecRefCnt() { if( !--nRefCnt && pDoc ) _RefCntChgd(); }
void SetCRLFDelFlag( BOOL bFlag = TRUE ) { bCRLFFlag = bFlag; }
BOOL IsCRLFDelFlag() const { return bCRLFFlag; }
};
/*--------------------------------------------------------------------
Beschreibung: DDE-Feld
--------------------------------------------------------------------*/
class SwDDEField : public SwField
{
public:
SwDDEField(SwDDEFieldType*);
~SwDDEField();
virtual String Expand() const;
virtual SwField* Copy() const;
// ueber Typen Parameter ermitteln
// Name kann nicht geaendert werden
virtual const String& GetPar1() const;
// Commando
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
};
#endif // _DDEFLD_HXX
+106
View File
@@ -0,0 +1,106 @@
/*************************************************************************
*
* $RCSfile: dlelstnr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DLELSTNR_HXX_
#define _DLELSTNR_HXX_
#include <cppuhelper/weak.hxx>
#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLIST_HPP_
#include <com/sun/star/linguistic/XDictionaryList.hpp>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLISTEVENTLISTENER_HPP_
#include <com/sun/star/linguistic/XDictionaryListEventListener.hpp>
#endif
#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx> // helper for implementations
#endif
///////////////////////////////////////////////////////////////////////////
// SwDicListEvtListener
// is a ::com::sun::star::linguistic::XDictionaryListEventListener that triggers spellchecking
// and hyphenation (yet to be implemented) when relevant changes to the
// dictionaries of the dictionary list were made.
//
class SwDicListEvtListener : public cppu::WeakImplHelper1
<
::com::sun::star::linguistic::XDictionaryListEventListener
>
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryList > xDicList;
// disallow use of copy-constructor and assignment operator
SwDicListEvtListener(const SwDicListEvtListener &);
SwDicListEvtListener & operator = (const SwDicListEvtListener &);
public:
SwDicListEvtListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryList > &rxDicList );
virtual ~SwDicListEvtListener();
// ::com::sun::star::linguistic::XDictionaryListEventListener
virtual void SAL_CALL processDictionaryListEvent(const ::com::sun::star::linguistic::DictionaryListEvent& aDicListEvent) throw( ::com::sun::star::uno::RuntimeException );
};
#endif
+83
View File
@@ -0,0 +1,83 @@
/*************************************************************************
*
* $RCSfile: dobjfac.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DOBJFAC_HXX
#define _DOBJFAC_HXX
#ifndef _LINK_HXX //autogen
#include <tools/link.hxx>
#endif
//-----------------------
// class SwObjectFactory
//-----------------------
class SdrObjFactory;
class SwObjectFactory
{
public:
DECL_LINK( MakeObject, SdrObjFactory * );
};
extern SwObjectFactory aSwObjectFactory;
#endif // _DOBJFAC_HXX
+1770
View File
File diff suppressed because it is too large Load Diff
+166
View File
@@ -0,0 +1,166 @@
/*************************************************************************
*
* $RCSfile: docary.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DOCARY_HXX
#define _DOCARY_HXX
class SwFieldType;
class SwFrmFmt;
class SwCharFmt;
class SwBookmark;
class SwTOXType;
class SwUndo;
class SwSectionFmt;
class SwNumRule;
class SwRedline;
class SwUnoCrsr;
class SwOLENode;
#ifndef _SWTYPES_HXX //autogen
#include <swtypes.hxx>
#endif
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
typedef SwFieldType* SwFldTypePtr;
#define GROW_FLDTYPES 16
//PageDescriptor-Schnittstelle
//typedef SwPageDesc * SwPageDescPtr;
//SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1);
typedef SwFrmFmt* SwFrmFmtPtr;
SV_DECL_PTRARR_DEL(SwFrmFmts,SwFrmFmtPtr,4,4)
//Spezifische Frameformate (Rahmen, DrawObjecte)
SV_DECL_PTRARR_DEL(SwSpzFrmFmts,SwFrmFmtPtr,0,4)
typedef SwCharFmt* SwCharFmtPtr;
SV_DECL_PTRARR_DEL(SwCharFmts,SwCharFmtPtr,4,4)
SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES )
//Bookmarks (nach Dokumentpositionen sortiertes Array)
typedef SwBookmark* SwBookmarkPtr;
SV_DECL_PTRARR_SORT(SwBookmarks, SwBookmarkPtr,0,1)
typedef SwTOXType* SwTOXTypePtr;
SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 )
// Undo
#define INIT_UNDOS 5
#define GROW_UNDOS 5
// Das Array der Undo-History
typedef SwUndo* SwUndoPtr;
SV_DECL_PTRARR_DEL( SwUndos, SwUndoPtr, INIT_UNDOS, GROW_UNDOS )
typedef SwSectionFmt* SwSectionFmtPtr;
SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4)
typedef SwNumRule* SwNumRulePtr;
SV_DECL_PTRARR_DEL( SwNumRuleTbl, SwNumRulePtr, 0, 5 )
typedef SwRedline* SwRedlinePtr;
SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 )
class SwRedlineTbl : private _SwRedlineTbl
{
public:
SwRedlineTbl( BYTE nSize = 0, BYTE nG = 16 )
: _SwRedlineTbl( nSize, nG ) {}
~SwRedlineTbl() {}
BOOL SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
BOOL Insert( SwRedlinePtr& p, BOOL bIns = TRUE );
BOOL Insert( SwRedlinePtr& p, USHORT& rInsPos, BOOL bIns = TRUE );
BOOL InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos = 0 );
void Remove( USHORT nP, USHORT nL = 1 );
void DeleteAndDestroy( USHORT nP, USHORT nL=1 );
// suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
// Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
// USHRT_MAX suchen im gesamten Array.
USHORT FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
USHORT FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
USHORT FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
USHORT nLookahead = 20 ) const;
USHORT FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
USHORT nLookahead = 20 ) const;
_SwRedlineTbl::Count;
_SwRedlineTbl::operator[];
_SwRedlineTbl::GetObject;
_SwRedlineTbl::Seek_Entry;
_SwRedlineTbl::GetPos;
};
typedef SwUnoCrsr* SwUnoCrsrPtr;
SV_DECL_PTRARR_DEL( SwUnoCrsrTbl, SwUnoCrsrPtr, 0, 4 )
typedef SwOLENode* SwOLENodePtr;
SV_DECL_PTRARR(SwOLENodes,SwOLENodePtr,16,16)
#endif //_DOCARY_HXX
+85
View File
@@ -0,0 +1,85 @@
/*************************************************************************
*
* $RCSfile: docfac.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DOCFAC_HXX
#define _DOCFAC_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
class SwDoc;
class SwDocFac
{
protected:
SwDoc* pDoc;
public:
SwDocFac( SwDoc *pDoc = 0 );
~SwDocFac();
// Das Dokument ist nach dem Aufruf von Read(..) angelegt
SwDoc* GetDoc();
ULONG Count() const;
};
#endif
+303
View File
@@ -0,0 +1,303 @@
/*************************************************************************
*
* $RCSfile: docsh.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _SWDOCSH_HXX
#define _SWDOCSH_HXX
#ifndef _TIMER_HXX //autogen
#include <vcl/timer.hxx>
#endif
#ifndef _SFX_OBJFAC_HXX //autogen
#include <sfx2/docfac.hxx>
#endif
#ifndef _SFX_INTERNO_HXX //autogen
#include <sfx2/interno.hxx>
#endif
#ifndef _SFX_OBJSH_HXX //autogen
#include <sfx2/objsh.hxx>
#endif
#ifndef SW_SWDLL_HXX
#include <swdll.hxx>
#endif
#include "shellid.hxx"
class SwDoc;
class Sw3Io;
class SfxDocumentInfoDialog;
class SfxStyleSheetBasePool;
class FontList;
class SwView;
class SwWrtShell;
class SwFEShell;
class Reader;
class SwReader;
class SwCrsrShell;
class SwSrcView;
class SfxFileDialog;
class PushButton;
class FixedText;
class SwPaM;
class SwDocShell: public SfxObjectShell, public SfxInPlaceObject,
public SfxListener
{
SwDoc* pDoc; // Document
Sw3Io* pIo; // Reader / Writer
SfxStyleSheetBasePool* pBasePool; // Durchreiche fuer Formate
FontList* pFontList; // aktuelle FontListe
// Nix geht ohne die WrtShell (historische Gruende)
// RuekwaertsPointer auf die View (historische Gruende)
// Dieser gilt solange bis im Activate ein neuer gesetzt wird
// oder dieser im Dtor der View geloescht wird
//
SwView* pView;
SwWrtShell* pWrtShell;
Timer aFinishedTimer; // Timer fuers ueberpriefen der
// Grafik-Links. Sind alle da,
// dann ist Doc voll. geladen
SvPersistRef xOLEChildList; // fuers RemoveOLEObjects
// Methoden fuer den Zugriff aufs Doc
void AddLink();
void RemoveLink();
// Hint abfangen fuer DocInfo
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
// FileIO
virtual BOOL InitNew(SvStorage* pNewStor);
virtual BOOL Load(SvStorage* pStor);
virtual BOOL LoadFrom(SvStorage* pStor);
virtual BOOL ConvertFrom( SfxMedium &rMedium );
virtual void HandsOff();
virtual BOOL SaveAs(SvStorage * pNewStor );
virtual BOOL ConvertTo(SfxMedium &rMedium );
virtual BOOL SaveCompleted(SvStorage * pNewStor );
virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
// DocInfo dem Doc melden
//
virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &);
// Template-Btn
Window* AddTemplateBtn(SfxFileDialog* pFileDlg);
// OLE-Geraffel
virtual void Draw( OutputDevice*, const JobSetup&, USHORT);
// Methoden fuer StyleSheets
USHORT Edit( const String &rName, const String& rParent, USHORT nFamily,
USHORT nMask, BOOL bNew,
BOOL bColumn = FALSE,
SwWrtShell* pActShell = 0,
BOOL bBasic = FALSE );
USHORT Delete(const String &rName, USHORT nFamily);
USHORT ApplyStyles(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0,
USHORT nMode = 0 );
USHORT DoWaterCan( const String &rName, USHORT nFamily);
USHORT UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0);
USHORT MakeByExample(const String &rName,
USHORT nFamily, USHORT nMask, SwWrtShell* pShell = 0);
void InitDraw();
void SubInitNew(); // fuer InitNew und HtmlSourceModus
inline void SetWrtShell(SwWrtShell* pShell)
{ pWrtShell = pShell; }
void RemoveOLEObjects();
DECL_STATIC_LINK( SwDocShell, IsLoadFinished, void* );
DECL_LINK( SelTemplateHdl, PushButton * );
public:
// aber selbst implementieren
SFX_DECL_INTERFACE(SW_DOCSHELL);
SFX_DECL_OBJECTFACTORY_DLL(SwDocShell, SW_DLL());
TYPEINFO();
static SfxInterface *_GetInterface() { return _GetInterfaceImpl(); }
//Das Doc wird fuer SO-Datenaustausch benoetigt!
SwDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD );
~SwDocShell();
// OLE 2.0-Benachrichtigung
DECL_LINK( Ole2ModifiedHdl, void * );
// OLE-Geraffel
virtual void SetVisArea( const Rectangle &rRect );
virtual Rectangle GetVisArea( USHORT nAspect ) const;
virtual Printer *GetDocumentPrinter();
virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
virtual ULONG GetMiscStatus() const;
virtual void PrepareReload();
virtual void SetModified( BOOL = TRUE );
// Dispatcher
void Execute(SfxRequest &);
void ExecStyleSheet(SfxRequest&);
void ExecDB(SfxRequest&);
void GetState(SfxItemSet &);
void StateAlways(SfxItemSet &);
void StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 );
// Doc rausreichen aber VORSICHT
inline SwDoc* GetDoc() { return pDoc; }
void UpdateFontList();
void UpdateChildWindows();
// DocumentInfo neu setzen
BOOL SetDocumentInfo(const SfxDocumentInfo& rInfo);
// globaler IO
virtual BOOL Save();
// fuer VorlagenPI
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
// Fuer Organizer
virtual BOOL Insert(SfxObjectShell &rSource,
USHORT nSourceIdx1,
USHORT nSourceIdx2,
USHORT nSourceIdx3,
USHORT& nIdx1,
USHORT& nIdx2,
USHORT& nIdx3,
USHORT& nRemovedIdx);
virtual BOOL Remove(USHORT nIdx1,
USHORT nIdx2 = INDEX_IGNORE,
USHORT nIdx3 = INDEX_IGNORE);
virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily );
// View setzen fuer Aktionen ueber Shell
void SetView(SwView* pVw);
const SwView *GetView() const { return pView; }
// Zugriff auf die zur SwView gehoerige SwWrtShell
SwWrtShell *GetWrtShell() { return pWrtShell; }
const SwWrtShell *GetWrtShell() const { return pWrtShell; }
// fuer die Core - die kennt die DocShell aber keine WrtShell!
SwFEShell *GetFEShell();
const SwFEShell *GetFEShell() const
{ return ((SwDocShell*)this)->GetFEShell(); }
// Fuer Einfuegen Dokument
Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0);
// Anforderung der pIo-Struktur fuer den Zugriff auf Substorages
// und Streams
Sw3Io* GetIoSystem() { return pIo; }
virtual long DdeGetData( const String& rItem, SvData& rData );
virtual long DdeSetData( const String& rItem, const SvData& rData );
virtual SvPseudoObject* DdeCreateHotLink( const String& rItem );
virtual void FillClass( SvGlobalName * pClassName,
ULONG * pClipFormat,
String * pAppName,
String * pLongUserName,
String * pUserName,
long nVersion = SOFFICE_FILEFORMAT_NOW ) const;
virtual void FillRegInfo( SvEmbeddedRegistryInfo * );
virtual SvDataMemberObjectRef CreateSnapshot();
virtual void LoadStyles( SfxObjectShell& rSource );
// Seitenvorlagedialog anzeigen, ggf. auf Spaltenpage
void FormatPage( const String& rPage,
BOOL bColumn = FALSE,
SwWrtShell* pActShell = 0 );
// Timer starten fuers ueberpruefen der Grafik-Links. Sind alle
// vollstaendig geladen, dann ist das Doc fertig
void StartLoadFinishedTimer();
// eine Uebertragung wird abgebrochen (wird aus dem SFX gerufen)
virtual void CancelTransfers();
// Doc aus Html-Source neu laden
void ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView );
// embedded alle lokalen Links (Bereiche/Grafiken)
BOOL EmbedAllLinks();
//Activate wait cursor for all windows of this document
//Optionally all dispatcher could be Locked
//Usually locking should be done using the class: SwWaitObject!
void EnterWait( BOOL bLockDispatcher );
void LeaveWait( BOOL bLockDispatcher );
void ToggleBrowserMode(BOOL bOn, SwView* pView = 0);
};
#endif
+90
View File
@@ -0,0 +1,90 @@
/*************************************************************************
*
* $RCSfile: docstat.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DOCSTAT_HXX
#define _DOCSTAT_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
///////////////////////////////////////////////////////////////////////////
// PRODUCT: struct SwInternStat ist nur fuer CORE Interne Statistics und
// hat nichts in einer ProductVersion zu suchen.
///////////////////////////////////////////////////////////////////////////
struct SwInternStat;
struct SwDocStat
{
USHORT nTbl;
USHORT nGrf;
USHORT nOLE;
ULONG nPage;
ULONG nPara;
ULONG nWord;
ULONG nChar;
BOOL bModified;
SwInternStat* pInternStat;
SwDocStat();
void Reset();
};
#endif
+261
View File
@@ -0,0 +1,261 @@
/*************************************************************************
*
* $RCSfile: docstyle.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DOCSTYLE_HXX
#define _DOCSTYLE_HXX
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svtools/svstdarr.hxx>
#endif
#ifndef _SFXSTYLE_HXX //autogen
#include <svtools/style.hxx>
#endif
#ifndef _SFXITEMSET_HXX //autogen
#include <svtools/itemset.hxx>
#endif
class SwDoc;
class SwDocStyleSheetPool;
class SwPageDesc;
class SwCharFmt;
class SwTxtFmtColl;
class SwFrmFmt;
class SwNumRule;
/*--------------------------------------------------------------------
Beschreibung: Lokale Hilfsklasse
--------------------------------------------------------------------*/
class SwPoolFmtList : public SvStringsDtor
{
public:
SwPoolFmtList() {}
void Append( char cChar, const String& rStr );
void Erase();
};
/*--------------------------------------------------------------------
Beschreibung: temp. StyleSheet
--------------------------------------------------------------------*/
class SwDocStyleSheet : public SfxStyleSheetBase
{
friend class SwDocStyleSheetPool;
friend class SwStyleSheetIterator;
SwCharFmt* pCharFmt;
SwTxtFmtColl* pColl;
SwFrmFmt* pFrmFmt;
const SwPageDesc* pDesc;
const SwNumRule* pNumRule;
SwDoc& rDoc;
SfxItemSet aCoreSet;
BOOL bPhysical;
// leere Huelse zum richtigen StyleSheet (Core) machen
void Create();
// den StyleSheet mit Daten fuellen
enum FillStyleType {
FillOnlyName,
FillAllInfo,
FillPhysical
};
BOOL FillStyleSheet( FillStyleType eFType );
public:
SwDocStyleSheet( SwDoc& rDoc,
const String& rName,
SwDocStyleSheetPool& rPool,
SfxStyleFamily eFam,
USHORT nMask);
SwDocStyleSheet( const SwDocStyleSheet& );
virtual ~SwDocStyleSheet();
void Reset();
void SetMask(USHORT nMsk) { nMask = nMsk; }
void SetFamily(SfxStyleFamily eFam) { nFamily = eFam; }
BOOL IsPhysical() const { return bPhysical; }
void SetPhysical(BOOL bPhys);
void SetItemSet(const SfxItemSet& rSet);
virtual SfxItemSet& GetItemSet();
virtual const String& GetParent() const;
virtual const String& GetFollow() const;
virtual ULONG GetHelpId( String& rFile );
virtual void SetHelpId( const String& r, ULONG nId );
// Vorbelegen der member ohne physikalischen Zugriff
// wird vom StyleSheetPool benutzt
//
void PresetName(const String& rName) { aName = rName; }
void PresetNameAndFamily(const String& rName);
void PresetParent(const String& rName){ aParent = rName; }
void PresetFollow(const String& rName){ aFollow = rName; }
virtual BOOL SetName( const String& rStr);
virtual BOOL SetParent( const String& rStr);
virtual BOOL SetFollow( const String& rStr);
virtual BOOL HasFollowSupport() const;
virtual BOOL HasParentSupport() const;
virtual BOOL HasClearParentSupport() const;
virtual String GetDescription();
virtual String GetDescription(SfxMapUnit eUnit);
SwCharFmt* GetCharFmt();
SwTxtFmtColl* GetCollection();
SwFrmFmt* GetFrmFmt();
const SwPageDesc* GetPageDesc();
const SwNumRule* GetNumRule();
void SetNumRule(const SwNumRule& rRule);
virtual BOOL IsUsed() const;
};
/*--------------------------------------------------------------------
Beschreibung: Iterator fuer den Pool
--------------------------------------------------------------------*/
class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
{
SwDocStyleSheet aIterSheet;
SwDocStyleSheet aStyleSheet;
SwPoolFmtList aLst;
USHORT nLastPos;
BOOL bFirstCalled;
void AppendStyleList(const SvStringsDtor& rLst,
BOOL bUsed,
USHORT nSection,
char cType);
public:
SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
SfxStyleFamily eFam, USHORT n=0xFFFF );
virtual ~SwStyleSheetIterator();
virtual USHORT Count();
virtual SfxStyleSheetBase *operator[](USHORT nIdx);
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
#ifndef ENABLEUNICODE
virtual SfxStyleSheetBase* Find(const String& rStr);
#else
virtual SfxStyleSheetBase* Find(const UniString& rStr);
#endif
virtual void Notify( SfxBroadcaster&, const SfxHint& );
};
/*--------------------------------------------------------------------
Beschreibung: Pool fuer
--------------------------------------------------------------------*/
class SwDocStyleSheetPool : public SfxStyleSheetBasePool
{
SwDocStyleSheet aStyleSheet;
SwDoc& rDoc;
BOOL bOrganizer : 1; // TRUE: fuer den Organizer
virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, USHORT nMask);
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
public:
SwDocStyleSheetPool( SwDoc&, BOOL bOrganizer = FALSE );
virtual ~SwDocStyleSheetPool();
virtual void Replace( SfxStyleSheetBase& rSource,
SfxStyleSheetBase& rTarget );
virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, USHORT nMask, USHORT nPos = 0xffff);
virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam,
USHORT n=0xFFFF );
virtual BOOL SetParent( SfxStyleFamily eFam, const String &rStyle,
const String &rParent );
virtual void Erase( SfxStyleSheetBase* pStyle);
void SetItemSet(const SfxItemSet& rSet) { aStyleSheet.SetItemSet(rSet); }
void SetOrganizerMode( BOOL bMode ) { bOrganizer = bMode; }
BOOL IsOrganizerMode() const { return bOrganizer; }
virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily,
USHORT nMask );
SwDoc& GetDoc() const { return rDoc; }
//Fuer die daemlicheren Compiler
private:
SwDocStyleSheetPool( const SwDocStyleSheetPool& );
};
#endif
+818
View File
@@ -0,0 +1,818 @@
/*************************************************************************
*
* $RCSfile: docufld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DOCUFLD_HXX
#define _DOCUFLD_HXX
#ifndef _DATE_HXX //autogen
#include <tools/date.hxx>
#endif
#include "fldbas.hxx"
#include "numrule.hxx"
class _SetGetExpFlds;
class SwTxtFld;
class SwFrm;
enum SwAuthorFormat
{
AF_BEGIN,
AF_NAME = AF_BEGIN,
AF_SHORTCUT,
AF_END,
AF_FIXED = 0x8000
};
/*--------------------------------------------------------------------
Beschreibung: Untertyp der Dokumentstatistik
--------------------------------------------------------------------*/
enum SwDocStatSubType
{
DS_BEGIN,
DS_PAGE = DS_BEGIN,
DS_PARA,
DS_WORD,
DS_CHAR,
DS_TBL,
DS_GRF,
DS_OLE,
DS_END
};
enum SwDocInfoSubType
{
DI_SUBTYPE_BEGIN,
DI_TITEL = DI_SUBTYPE_BEGIN,
DI_THEMA,
DI_KEYS,
DI_COMMENT,
DI_INFO1,
DI_INFO2,
DI_INFO3,
DI_INFO4,
DI_CREATE,
DI_CHANGE,
DI_PRINT,
DI_DOCNO,
DI_EDIT,
DI_SUBTYPE_END
};
enum SwDocInfoExtSubType
{
DI_SUB_AUTHOR = 0x0100,
DI_SUB_TIME = 0x0200,
DI_SUB_DATE = 0x0300,
DI_SUB_FIXED = 0x1000
};
enum RegInfoFormat // Nur noch zum laden alter Dokumente!!!
{
RF_AUTHOR,
RF_TIME,
RF_DATE,
RF_ALL
};
enum SwPageNumSubType
{
PG_RANDOM,
PG_NEXT,
PG_PREV
};
enum SwExtUserSubType
{
EU_COMPANY /*EU_FIRMA*/,
EU_FIRSTNAME /*EU_VORNAME*/,
EU_NAME /*EU_NAME*/,
EU_SHORTCUT /*EU_ABK*/,
EU_STREET /*EU_STRASSE*/,
EU_COUNTRY /*EU_LAND*/,
EU_ZIP /*EU_PLZ*/,
EU_CITY /*EU_ORT*/,
EU_TITLE /*EU_TITEL*/,
EU_POSITION /*EU_POS*/,
EU_PHONE_PRIVATE /*EU_TELPRIV*/,
EU_PHONE_COMPANY /*EU_TELFIRMA*/,
EU_FAX,
EU_EMAIL,
EU_STATE,
EU_FATHERSNAME,
EU_APARTMENT
};
enum SwJumpEditFormat
{
JE_FMT_TEXT,
JE_FMT_TABLE,
JE_FMT_FRAME,
JE_FMT_GRAPHIC,
JE_FMT_OLE
};
/*--------------------------------------------------------------------
Beschreibung: Seitennummer
--------------------------------------------------------------------*/
class SwPageNumberFieldType : public SwFieldType
{
SvxExtNumType eNumFormat;
USHORT nNum, nMax;
BOOL bVirtuell;
public:
SwPageNumberFieldType();
String& Expand( ULONG nFmt, short nOff, const String&, String& rRet ) const;
void ChangeExpansion( SwDoc* pDoc, USHORT nNum, USHORT nMax,
BOOL bVirtPageNum, const SvxExtNumType* pNumFmt = 0 );
inline SvxExtNumType GetNumFormat() const { return eNumFormat; }
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Seitennummerierung
--------------------------------------------------------------------*/
class SwPageNumberField : public SwField
{
String sUserStr;
USHORT nSubType;
short nOffset;
public:
SwPageNumberField(SwPageNumberFieldType*, USHORT nSub = PG_RANDOM,
ULONG nFmt = 0, short nOff = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
virtual USHORT GetSubType() const;
// virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
const String& GetUserString() const { return sUserStr; }
void SetUserString( const String& rS ) { sUserStr = rS; }
};
/*--------------------------------------------------------------------
Beschreibung: Autoren
--------------------------------------------------------------------*/
class SwAuthorFieldType : public SwFieldType
{
SwDoc *pDoc;
public:
SwAuthorFieldType(SwDoc*);
String Expand(ULONG) const;
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: AutorenFeld
--------------------------------------------------------------------*/
class SwAuthorField : public SwField
{
String aContent;
public:
SwAuthorField(SwAuthorFieldType*, ULONG nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Filename
--------------------------------------------------------------------*/
class SwFileNameFieldType : public SwFieldType
{
SwDoc *pDoc;
public:
SwFileNameFieldType(SwDoc*);
String Expand(ULONG) const;
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: FileName
--------------------------------------------------------------------*/
class SwFileNameField : public SwField
{
String aContent;
public:
SwFileNameField(SwFileNameFieldType*, ULONG nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: TemplName
--------------------------------------------------------------------*/
class SwTemplNameFieldType : public SwFieldType
{
SwDoc *pDoc;
public:
SwTemplNameFieldType(SwDoc*);
String Expand(ULONG) const;
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: TemplName
--------------------------------------------------------------------*/
class SwTemplNameField : public SwField
{
public:
SwTemplNameField(SwTemplNameFieldType*, ULONG nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Docstatistik
--------------------------------------------------------------------*/
class SwDocStatFieldType : public SwFieldType
{
SwDoc* pDoc;
SvxExtNumType eNumFormat;
public:
SwDocStatFieldType(SwDoc*);
String Expand(USHORT nSubType, ULONG nFmt) const;
virtual SwFieldType* Copy() const;
inline SvxExtNumType GetNumFormat() const { return eNumFormat; }
inline void SetNumFormat( SvxExtNumType eFmt ) { eNumFormat = eFmt; }
};
/*--------------------------------------------------------------------
Beschreibung: Dokumentstatistik
--------------------------------------------------------------------*/
class SwDocStatField : public SwField
{
USHORT nSubType;
public:
SwDocStatField( SwDocStatFieldType*,
USHORT nSubType = 0, ULONG nFmt = 0);
void ChangeExpansion( const SwFrm* pFrm );
virtual String Expand() const;
virtual SwField* Copy() const;
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nSub);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: versteckter Text
--------------------------------------------------------------------*/
class SwHiddenTxtFieldType : public SwFieldType
{
BOOL bHidden;
public:
SwHiddenTxtFieldType(BOOL bSetHidden = TRUE);
virtual SwFieldType* Copy() const;
void SetHiddenFlag( BOOL bSetHidden = TRUE );
inline BOOL GetHiddenFlag() const { return bHidden; }
};
/*--------------------------------------------------------------------
Beschreibung: Versteckter Text
--------------------------------------------------------------------*/
class SwHiddenTxtField : public SwField
{
String aTRUETxt; // Text wenn Bedingung TRUE
String aFALSETxt; // Wenn Bedingung falsch
String aContent; // Ausgewerteter DB-Text
String aCond; // Bedingung
USHORT nSubType;
BOOL bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
BOOL bIsHidden : 1; // ist es nicht sichtbar?
BOOL bValid : 1; // DB-Feld evaluiert?
public:
SwHiddenTxtField( SwHiddenTxtFieldType*,
BOOL bConditional,
const String& rCond,
const String& rTxt,
BOOL bHidden = FALSE,
USHORT nSubType = TYP_HIDDENTXTFLD);
SwHiddenTxtField( SwHiddenTxtFieldType*,
const String& rCond,
const String& rTrue,
const String& rFalse,
USHORT nSubType = TYP_HIDDENTXTFLD);
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual String Expand() const;
virtual SwField* Copy() const;
void Evaluate(SwDoc*);
inline void SetValue(BOOL bHidden) { bIsHidden = bHidden; }
inline BOOL GetValue() const { return bIsHidden; }
inline BOOL IsConditional() const { return bCanToggle; }
inline BOOL IsValid() const { return bValid; }
String GetColumnName(const String& rName);
String GetDBName(const String& rName, SwDoc *pDoc);
// Condition
virtual void SetPar1(const String& rStr);
virtual const String& GetPar1() const;
// True/False - String
virtual void SetPar2(const String& rStr);
virtual String GetPar2() const;
virtual USHORT GetSubType() const;
// virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Feld das zu einer Leerzeile (ohne Hoehe) expandiert
--------------------------------------------------------------------*/
class SwHiddenParaFieldType : public SwFieldType
{
public:
SwHiddenParaFieldType();
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Versteckter Absatz
--------------------------------------------------------------------*/
class SwHiddenParaField : public SwField
{
String aCond;
BOOL bIsHidden:1;
public:
// Direkte Eingabe alten Wert loeschen
SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond);
virtual String Expand() const;
virtual SwField* Copy() const;
void SetHidden(BOOL bHidden) { bIsHidden = bHidden; }
BOOL IsHidden() const { return bIsHidden; }
// Bedingung erfragen/setzen
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Macro ausfuehren
--------------------------------------------------------------------*/
class SwMacroFieldType : public SwFieldType
{
SwDoc* pDoc;
public:
SwMacroFieldType(SwDoc*);
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Macrofeld
--------------------------------------------------------------------*/
class SwMacroField : public SwField
{
String aMacro;
String aText;
public:
// Direkte Eingabe alten Wert loeschen
SwMacroField( SwMacroFieldType*, const String& rLibAndName,
const String& rTxt);
inline const String& GetMacro() const { return aMacro; }
String GetLibName() const;
String GetMacroName() const;
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual String Expand() const;
virtual SwField* Copy() const;
// Library und FileName
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// Macrotext
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: PostIts
--------------------------------------------------------------------*/
class SwPostItFieldType : public SwFieldType
{
public:
SwPostItFieldType();
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: PostIt
--------------------------------------------------------------------*/
class SwPostItField : public SwField
{
String sTxt; // die Anmerkung
String sAuthor; // der Author
Date aDate; // Datum ??/Zeit?? der Anmerkung
public:
SwPostItField( SwPostItFieldType*,
const String& rAuthor, const String& rTxt, const Date& rDate);
virtual String Expand() const;
virtual SwField* Copy() const;
inline const Date& GetDate() const { return aDate; }
inline void SetDate( const Date& rDate ) { aDate = rDate;}
// Author
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// Text
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
const String& GetTxt() const { return sTxt; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: DokumentInfo
--------------------------------------------------------------------*/
class SwDocInfoFieldType : public SwValueFieldType
{
public:
SwDocInfoFieldType(SwDoc* pDc);
String Expand(USHORT nSubType, ULONG nFormat, USHORT nLang) const;
virtual SwFieldType* Copy() const;
};
class SwDocInfoField : public SwValueField
{
USHORT nSubType;
String aContent;
public:
SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, ULONG nFmt=0);
virtual void SetSubType(USHORT);
virtual USHORT GetSubType() const;
virtual void SetLanguage(USHORT nLng);
virtual String Expand() const;
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual SwField* Copy() const;
inline void SetExpansion(const String& rStr) { aContent = rStr; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: erweiterte Benutzereinstellung
--------------------------------------------------------------------*/
class SwExtUserFieldType : public SwFieldType
{
String aData;
public:
SwExtUserFieldType();
inline const String& GetData() const { return aData; }
inline void SetData(const String& rStr) { aData = rStr; }
String Expand(USHORT nSubType, ULONG nFormat) const;
virtual SwFieldType* Copy() const;
};
class SwExtUserField : public SwField
{
String aContent;
USHORT nType;
public:
SwExtUserField(SwExtUserFieldType*, USHORT nSub, ULONG nFmt=0);
virtual String Expand() const;
virtual SwField* Copy() const;
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nSub);
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Relatives Seitennummern - Feld
--------------------------------------------------------------------*/
class SwRefPageSetFieldType : public SwFieldType
{
public:
SwRefPageSetFieldType();
virtual SwFieldType* Copy() const;
// ueberlagert, weil es nichts zum Updaten gibt!
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
};
/*--------------------------------------------------------------------
Beschreibung: Relative Seitennummerierung
--------------------------------------------------------------------*/
class SwRefPageSetField : public SwField
{
short nOffset;
BOOL bOn;
public:
SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0,
BOOL bOn = TRUE );
virtual String Expand() const;
virtual SwField* Copy() const;
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
BOOL IsOn() const { return bOn; }
void SetOn( BOOL bFlag ) { bOn = bFlag; }
short GetOffset() const { return nOffset; }
void SetOffset( short nOff ) { nOffset = nOff; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: relatives Seitennummern - Abfrage Feld
--------------------------------------------------------------------*/
class SwRefPageGetFieldType : public SwFieldType
{
SwDoc* pDoc;
SvxExtNumType eNumFormat;
void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList );
public:
SwRefPageGetFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
// ueberlagert, um alle RefPageGet-Felder zu updaten
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
USHORT MakeSetList( _SetGetExpFlds& rTmpLst );
SvxExtNumType GetNumFormat() const { return eNumFormat; }
void SetNumFormat( SvxExtNumType eFmt ) { eNumFormat = eFmt; }
SwDoc* GetDoc() const { return pDoc; }
};
/*--------------------------------------------------------------------
Beschreibung: Relative Seitennummerierung Abfragen
--------------------------------------------------------------------*/
class SwRefPageGetField : public SwField
{
String sTxt;
public:
SwRefPageGetField( SwRefPageGetFieldType*, ULONG nFmt );
virtual String Expand() const;
virtual SwField* Copy() const;
void SetText( const String& rTxt ) { sTxt = rTxt; }
const String& GetText() const { return sTxt; }
void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld );
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Feld zum Anspringen und Editieren
--------------------------------------------------------------------*/
class SwJumpEditFieldType : public SwFieldType
{
SwDoc* pDoc;
SwDepend aDep;
public:
SwJumpEditFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
SwDoc* GetDoc() { return pDoc; }
const SwDoc* GetDoc() const { return pDoc; }
SwCharFmt* GetCharFmt();
};
class SwJumpEditField : public SwField
{
String sTxt, sHelp;
public:
SwJumpEditField( SwJumpEditFieldType*, ULONG nFormat,
const String& sText, const String& sHelp );
virtual String Expand() const;
virtual SwField* Copy() const;
// Platzhalter-Text
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// HinweisText
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
SwCharFmt* GetCharFmt() const
{ return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: PostIts
--------------------------------------------------------------------*/
class SwScriptFieldType : public SwFieldType
{
SwDoc* pDoc;
public:
SwScriptFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: PostIt
--------------------------------------------------------------------*/
class SwScriptField : public SwField
{
String sType; // Type von Code (Java/VBScript/...)
String sCode; // der Code als Text
// der Code als JavaCode ?
BOOL bCodeURL; // Code enthaelt URL eines Scripts
public:
SwScriptField( SwScriptFieldType*, const String& rType,
const String& rCode, BOOL bURL=FALSE );
virtual String Expand() const;
virtual SwField* Copy() const;
// Type
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// Text
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
const String& GetCode() const { return sCode; }
BOOL IsCodeURL() const { return bCodeURL; }
void SetCodeURL( BOOL bURL ) { bCodeURL = bURL; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
#endif // _DOCUFLD_HXX
+100
View File
@@ -0,0 +1,100 @@
/*************************************************************************
*
* $RCSfile: dpage.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _DPAGE_HXX
#define _DPAGE_HXX
#ifndef _FM_FMPAGE_HXX
#include <svx/fmpage.hxx>
#endif
#ifndef _SVDOBJ_HXX
#include <svx/svdobj.hxx>
#endif
class SdrPageGridFrameList;
class SwDrawDocument;
class SwDPage : public FmFormPage, public SdrObjUserCall
{
SdrPageGridFrameList *pGridLst;
public:
SwDPage(SwDrawDocument& rNewModel, BOOL bMasterPage=FALSE);
~SwDPage();
virtual Point GetOffset() const;
virtual SdrObject* ReplaceObject( SdrObject* pNewObj, ULONG nObjNum );
virtual void RequestBasic();
virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV,
const Rectangle *pRect) const;
virtual String GetLinkData( const String& rLinkName );
virtual void SetLinkData( const String& rLinkName, const String& rLinkData );
BOOL RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt );
};
#endif // _DPAGE_HXX
+113
View File
@@ -0,0 +1,113 @@
/*************************************************************************
*
* $RCSfile: edglbldc.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _EDGLBLDC_HXX
#define _EDGLBLDC_HXX
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
class SwSection;
class SwTOXBase;
class SwTOXBaseSection;
enum GlobalDocContentType {
GLBLDOC_UNKNOWN,
GLBLDOC_TOXBASE,
GLBLDOC_SECTION
};
class SwGlblDocContent
{
GlobalDocContentType eType;
ULONG nDocPos;
union {
const SwTOXBase* pTOX;
const SwSection* pSect;
} PTR;
public:
SwGlblDocContent( ULONG nPos );
SwGlblDocContent( const SwTOXBaseSection* pTOX );
SwGlblDocContent( const SwSection* pSect );
// Inhalte abfragen
GlobalDocContentType GetType() const { return eType; }
const SwSection* GetSection() const
{ return GLBLDOC_SECTION == eType ? PTR.pSect : 0; }
const SwTOXBase* GetTOX() const
{ return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; }
ULONG GetDocPos() const { return nDocPos; }
// fuers Sortieren
inline int operator==( const SwGlblDocContent& rCmp )
{ return GetDocPos() == rCmp.GetDocPos(); }
inline int operator<( const SwGlblDocContent& rCmp )
{ return GetDocPos() < rCmp.GetDocPos(); }
};
typedef SwGlblDocContent* SwGlblDocContentPtr;
SV_DECL_PTRARR_SORT_DEL( SwGlblDocContents, SwGlblDocContentPtr, 10, 10 );
#endif
+124
View File
@@ -0,0 +1,124 @@
/*************************************************************************
*
* $RCSfile: edimp.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _EDIMP_HXX
#define _EDIMP_HXX
#include "crsrsh.hxx"
#include "doc.hxx"
#include "viscrs.hxx"
/*
* MACROS um ueber alle Bereiche zu iterieren
*/
#define PCURCRSR (_pStartCrsr)
#define FOREACHPAM_START(pCURSH) \
{\
SwPaM *_pStartCrsr = (pCURSH)->GetCrsr(), *__pStartCrsr = _pStartCrsr; \
do {
#define FOREACHPAM_END() \
} while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr ); \
}
#define FOREACHCURSOR_START(pCURSH) \
{\
SwShellCrsr *_pStartCrsr = *(pCURSH)->GetSwCrsr(), *__pStartCrsr = _pStartCrsr; \
do {
#define FOREACHCURSOR_END() \
} while( (_pStartCrsr=*(SwCursor*)_pStartCrsr->GetNext()) != __pStartCrsr ); \
}
struct SwPamRange
{
ULONG nStart, nEnd;
SwPamRange() : nStart( 0 ), nEnd( 0 ) {}
SwPamRange( ULONG nS, ULONG nE ) : nStart( nS ), nEnd( nE ) {}
BOOL operator==( const SwPamRange& rRg )
{ return nStart == rRg.nStart ? TRUE : FALSE; }
BOOL operator<( const SwPamRange& rRg )
{ return nStart < rRg.nStart ? TRUE : FALSE; }
};
SV_DECL_VARARR_SORT( _SwPamRanges, SwPamRange, 0, 1 )
class SwPamRanges : private _SwPamRanges
{
public:
SwPamRanges( const SwPaM& rRing );
void Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 );
SwPaM& SetPam( USHORT nArrPos, SwPaM& rPam );
USHORT Count() const
{ return _SwPamRanges::Count(); }
SwPamRange operator[]( USHORT nPos ) const
{ return _SwPamRanges::operator[](nPos); }
};
#endif
+956
View File
@@ -0,0 +1,956 @@
/*************************************************************************
*
* $RCSfile: editsh.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _EDITSH_HXX
#define _EDITSH_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
#ifndef _SV_FONT_HXX //autogen
#include <vcl/font.hxx>
#endif
#ifndef _SVXSWAFOPT_HXX
#include <svx/swafopt.hxx>
#endif
#ifndef _CRSRSH_HXX
#include <crsrsh.hxx> // fuer Basisklasse
#endif
#ifndef _ITABENUM_HXX
#include <itabenum.hxx>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLALTERNATIVES_HPP_
#include <com/sun/star/linguistic/XSpellAlternatives.hpp>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_
#include <com/sun/star/linguistic/XSpellChecker1.hpp>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HPP_
#include <com/sun/star/linguistic/XHyphenator.hpp>
#endif
class PolyPolygon;
class SwDoc;
class DateTime;
class CommandExtTextInputData;
class SvNumberFormatter;
class SfxPoolItem;
class SfxItemSet;
class SvxLinkManager;
class SvxAutoCorrect;
class SwField; // fuer Felder
class SwFieldType;
class SwDDEFieldType;
class SwNewDBMgr;
struct SwDocStat;
class SfxDocumentInfo;
class SvStringsDtor;
class SvStringsSort;
class SwAutoCompleteWord;
class SwFmtRefMark;
class SwFmtCol;
class SwNumRule; // Numerierung
class SwNodeNum; // Numerierung
class SwUndoIds; // fuer Undo
class SwTxtFmtColl;
#ifdef USED
class SwGrfFmt;
class SwGrfFmtColl;
#endif
class SwGrfNode;
class SwFlyFrmFmt;
class SwFrmFmt; // fuer GetTxtNodeFmts()
class SwCharFmt;
class SwExtTextInput;
class SwTxtNode; // fuer IsNotMakeTxtNode
class SwRootFrm; // fuer CTOR
class Graphic; // fuer GetGraphic
class GraphicObject; // fuer GetGraphicObj
class SwFmtINetFmt; // InsertURL
class SvInPlaceObjectRef;
class SvInPlaceObject;
class SwTable;
class SwTextBlocks; // fuer GlossaryRW
class SwBlockExceptList;
class SwFmtFtn;
class SpellCheck;
class SwSection;
class SwSectionFmt;
class SwTOXMarks;
class SwTOXBase;
class SwTOXType;
class SwTableAutoFmt;
class SwPageDesc;
class SchMemChart;
class Font;
class SwTxtINetFmt;
class SwSeqFldList;
class SwGlblDocContent;
class SwGlblDocContents;
class SwRedline;
class SwRedlineData;
class SwFtnInfo;
class SwEndNoteInfo;
class SwLineNumberInfo;
class SwAttrSet;
class SwAuthEntry;
#define GETSELTXT_PARABRK_TO_BLANK 0
#define GETSELTXT_PARABRK_KEEP 1
#define GETSELTXT_PARABRK_TO_ONLYCR 2
/****************************************************************
* zum Abfragen der INet-Attribute fuer den Navigator
****************************************************************/
struct SwGetINetAttr
{
String sText;
const SwTxtINetFmt& rINetAttr;
SwGetINetAttr( const String& rTxt, const SwTxtINetFmt& rAttr )
: sText( rTxt ), rINetAttr( rAttr )
{}
};
SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0, 5 )
/****************************************************************
* Typen der Inhaltsformen
****************************************************************/
#define CNT_TXT 0x0001
#define CNT_GRF 0x0002
#define CNT_OLE 0x0010
/* Teste einen USHORT auf eine bestimmte Inhaltsform */
#define CNT_HasTxt(USH) ((USH)&CNT_TXT)
#define CNT_HasGrf(USH) ((USH)&CNT_GRF)
#define CNT_HasOLE(USH) ((USH)&CNT_OLE)
class SwEditShell: public SwCrsrShell
{
static SvxSwAutoFmtFlags* pAutoFmtFlags;
// fuer die privaten Methoden DelRange und die vom AutoCorrect
friend class SwAutoFormat;
friend void _InitCore();
friend void _FinitCore();
// fuer die PamCorrAbs/-Rel Methoden
friend class SwUndo;
SfxPoolItem& _GetChrFmt( SfxPoolItem& ) const;
/*
* liefert einen Pointer auf einen SwGrfNode; dieser wird von
* GetGraphic() und GetGraphicSize() verwendet.
*/
SwGrfNode *_GetGrfNode() const ;
void DeleteSel( SwPaM& rPam, BOOL* pUndo = 0 );
void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet );
public:
// Editieren (immer auf allen selektierten Bereichen)
void Insert( sal_Unicode );
void Insert( const String &);
void Overwrite( const String & );
// Ersetz einen selektierten Bereich in einem TextNode mit dem
// String. Ist fuers Suchen&Ersetzen gedacht.
// bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
// ein ( nicht \& )
// z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
// --> "xx\t<Tab>..zzz..&"
BOOL Replace( const String& rNewStr, BOOL bRegExpRplc = FALSE );
// loescht den Inhalt aller Bereiche;
// werden ganze Nodes selektiert, werden die Nodes geloescht
long Delete();
// Voellig private Methode. Nur fuer JOE's-Wizzards
BOOL DelFullPara();
// loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
// versteckte Bereiche, versteckte Absaetze
BOOL RemoveInvisibleContent();
// embedded alle lokalen Links (Bereiche/Grafiken)
BOOL EmbedAllLinks();
USHORT GetLinkUpdMode(BOOL bDocSettings = FALSE) const;
void SetLinkUpdMode( USHORT nMode );
// verschiebe den Inhalt aller Bereiche an die akt. Cursor-Position
long Move();
// kopiere den Inhalt aller Bereiche an die akt. Cursor-Position
// in die angegebene Shell
long Copy( SwEditShell* pDestShell = 0 );
// fuers Kopieren uebers ClipBoard:
// wird Tabelle in Tabelle kopiert, verschiebe aus dieser dann
// alle Cursor. Copy und Paste muss aufgrund der FlyFrames in
// der FEShell stehen!
// kopiere alle Selectionen und das Doc
//JP 21.10.96: und fuer die SVX-Autokorrektur
BOOL _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
long SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
void AutoFmtBySplitNode();
// ist der Cursor in einem INetAttribut, dann wird das komplett
// geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
BOOL DelINetAttrWithText();
// ist der Cursor am Ende einer Zeichenvorlage, an der das DontExpand-Flag
// noch nicht gesetzt ist, wird dies gesetzt ( => return TRUE; )
BOOL DontExpandFmt();
// Anwenden / Entfernen von Attributen
// liefert Attribute im angeforderten AttributSet. Wenn nicht eindeutig
// steht im Set ein DONT_CARE !!
BOOL GetAttr( SfxItemSet& ) const;
void SetAttr( const SfxPoolItem&, USHORT nFlags = 0 );
void SetAttr( const SfxItemSet&, USHORT nFlags = 0 );
// Setze das Attribut als neues default Attribut im Dokument.
void SetDefault( const SfxPoolItem& );
// Erfrage das Default Attribut vom Dokument.
const SfxPoolItem& GetDefault( USHORT nFmtHint ) const;
void ResetAttr();
void GCAttr();
// FrameFormate
SwFrmFmt* FindFrmFmtByName( const String& rName ) const;
// TABLE
USHORT GetTblFrmFmtCount( BOOL bUsed = FALSE ) const;
SwFrmFmt& GetTblFrmFmt(USHORT nFmt, BOOL bUsed = FALSE ) const;
String GetUniqueTblName() const;
// CHAR
USHORT GetCharFmtCount() const;
SwCharFmt& GetCharFmt(USHORT nFmt) const;
SwCharFmt* GetCurCharFmt() const;
void FillByEx(SwCharFmt*, BOOL bReset = FALSE);
SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 );
SwCharFmt* FindCharFmtByName( const String& rName ) const;
/* Formatcollections, neu */
/* GetXXXCount() liefert die Anzahl der im Dokument vorhandenen XXX
* GetXXX(i) liefert das i-te XXX (ERR_RAISE bei Ueberindizierung!)
* DelXXX(i) loescht das i-te XXX (ERR_RAISE bei Ueberindizierung!)
* GetCurXXX() liefert das am Cursor oder in den Bereichen
* geltende XXX (0, wenn nicht eindeutig!)
* SetXXX() setzt am Cursor oder in den Bereichen das XXX
* MakeXXX() macht ein XXX, abgeleitet vom pDerivedFrom
*/
// TXT
SwTxtFmtColl& GetDfltTxtFmtColl() const;
USHORT GetTxtFmtCollCount() const;
SwTxtFmtColl& GetTxtFmtColl( USHORT nTxtFmtColl) const;
SwTxtFmtColl* GetCurTxtFmtColl() const;
void SetTxtFmtColl(SwTxtFmtColl*);
SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
SwTxtFmtColl *pDerivedFrom = 0);
void FillByEx(SwTxtFmtColl*, BOOL bReset = FALSE);
SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
#ifdef USED
// GRF
USHORT GetGrfFmtCollCount() const;
SwGrfFmtColl& GetGrfFmtColl( USHORT nGrfFmtColl) const;
void DelGrfFmtColl(USHORT nFmt);
SwGrfFmtColl* GetCurGrfFmtColl() const;
void SetGrfFmtColl(SwGrfFmtColl*);
SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtCollName,
SwGrfFmtColl *pDerivedFrom = 0);
SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const;
#endif
// Gebe die "Auto-Collection" mit der Id zurueck. Existiert
// sie noch nicht, dann erzuege sie
SwTxtFmtColl* GetTxtCollFromPool( USHORT nId );
// return das geforderte automatische Format - Basis-Klasse !
SwFmt* GetFmtFromPool( USHORT nId );
// returne die geforderte automatische Seiten-Vorlage
SwPageDesc* GetPageDescFromPool( USHORT nId );
// returne die geforderte automatische NumRule
SwNumRule* GetNumRuleFromPool( USHORT nId );
// erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
BOOL IsUsed( const SwModify& ) const;
BOOL IsUsed( const SwNumRule& ) const;
// ist der Name ein Pool-Vorlagen-Name, returne seine ID,
// sonst USHRT_MAX
USHORT GetPoolId( const String& rName, SwGetPoolIdFromName eFlag ) const;
const SvStringsDtor& GetChrFmtNmArray() const;
const SvStringsDtor& GetHTMLChrFmtNmArray() const;
// returne das geforderte automatische Format
SwFrmFmt* GetFrmFmtFromPool( USHORT nId )
{ return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
SwCharFmt* GetCharFmtFromPool( USHORT nId )
{ return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
// Felder
void Insert(SwField&);
SwField* GetCurFld() const;
void UpdateFlds( SwField & ); // ein einzelnes Feld
USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
SwFieldType* GetFldType(USHORT nId, USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
void RemoveFldType(USHORT nId, USHORT nResId = USHRT_MAX);
void RemoveFldType(USHORT nResId, const String& rName);
BOOL RenameUserFields(const String& rOldName, const String& rNewName);
void FieldToText( SwFieldType* pType );
void ChangeAuthorityData(const SwAuthEntry* pNewData);
// Datenbankinfo
String GetDBName() const;
const String& GetDBDesc() const;
void ChgDBName(const String& rNewName);
void ChangeDBFields( const SvStringsDtor& rOldNames,
const String& rNewName );
void GetAllUsedDB( SvStringsDtor& rDBNameList,
SvStringsDtor* pAllDBNames = 0 );
void UpdateExpFlds(BOOL bCloseDB = FALSE);// nur alle ExpressionFelder updaten
void SetFixFields( BOOL bOnlyTimeDate = FALSE,
const DateTime* pNewDateTime = 0 );
void LockExpFlds();
void UnlockExpFlds();
BOOL IsExpFldsLocked() const;
USHORT GetFldUpdateFlags(BOOL bDocSettings = FALSE) const;
void SetFldUpdateFlags( USHORT eFlags );
// fuer die Evaluierung der DBFelder (neuer DB-Manager)
SwNewDBMgr* GetNewDBMgr() const;
SwFieldType* InsertFldType(const SwFieldType &);
// Aenderungen am Dokument?
BOOL IsModified() const;
void SetModified();
void ResetModified();
void SetUndoNoResetModified();
// Dokument - Statistics
void UpdateDocStat( SwDocStat& rStat );
// Dokument - Info
const SfxDocumentInfo* GetInfo() const;
// Verzeichnismarke einfuegen loeschen
void Insert(const SwTOXMark& rMark);
void DeleteTOXMark(SwTOXMark* pMark);
// Alle Markierungen am aktuellen SPoint ermitteln
USHORT GetCurTOXMarks(SwTOXMarks& rMarks) const ;
// Verzeichnis einfuegen, und bei Bedarf erneuern
void InsertTableOf(const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0);
BOOL UpdateTableOf(const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0);
const SwTOXBase* GetCurTOX() const;
const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const;
const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate = FALSE );
void SetDefaultTOXBase(const SwTOXBase& rBase);
BOOL IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly);
USHORT GetTOXCount() const;
const SwTOXBase* GetTOX( USHORT nPos ) const;
BOOL DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes = FALSE );
BOOL DeleteCurTOX();
String GetUniqueTOXBaseName( const SwTOXType& rType,
const String* pChkStr = 0 ) const;
BOOL SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName);
void SetTOXBaseProtection(const SwTOXBase& rTOXBase, BOOL bProtect);
// nach einlesen einer Datei alle Verzeichnisse updaten
void SetUpdateTOX( BOOL bFlag = TRUE );
BOOL IsUpdateTOX() const;
// Verzeichnis-Typen verwalten
USHORT GetTOXTypeCount(TOXTypes eTyp) const;
const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
void InsertTOXType(const SwTOXType& rTyp);
//AutoMark file
const String& GetTOIAutoMarkURL() const;
void SetTOIAutoMarkURL(const String& rSet);
void ApplyAutoMark();
// Schluessel fuer die Indexverwaltung
USHORT GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
void SetOutlineNumRule(const SwNumRule&);
const SwNumRule* GetOutlineNumRule() const;
// Gliederung - hoch-/runterstufen
BOOL OutlineUpDown( short nOffset = 1 );
// Gliederung - hoch-/runtermoven
BOOL MoveOutlinePara( short nOffset = 1);
// Outlines and SubOutline are protected ?
BOOL IsProtectedOutlinePara() const;
// Numerierung Aufzaehlunglisten
// liefert Regelwerk der aktuellen Aufzaehlung (FALSE sonst)
const SwNumRule* GetCurNumRule() const;
// setzt, wenn noch keine Numerierung, sonst wird geaendert
// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
void SetCurNumRule(const SwNumRule&);
// Absaetze ohne Numerierung, aber mit Einzuegen
BOOL NoNum();
// Loeschen, Splitten der Aufzaehlungsliste
BOOL DelNumRules();
// Hoch-/Runterstufen
BOOL NumUpDown( BOOL bDown = TRUE );
// Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
BOOL MoveParagraph( long nOffset = 1);
BOOL MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft );
// No-/Numerierung ueber Delete/Backspace ein/abschalten
BOOL NumOrNoNum( BOOL bDelete = FALSE, BOOL bChkStart = TRUE,
BOOL bOutline = FALSE );
BOOL IsNoNum( BOOL bChkStart = TRUE, BOOL bOutline = FALSE ) const;
// returne den Num-Level des Nodes, in dem sich der Point vom
// Cursor befindet. Return kann sein :
// - NO_NUMBERING, 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
BYTE GetNumLevel( BOOL* pHasChilds = 0 ) const;
String GetUniqueNumRuleName( const String* pChkStr = 0, BOOL bAutoNum = TRUE ) const;
void ChgNumRuleFmts( const SwNumRule& rRule );
// setze und erfrage, ob an aktueller PointPos eine Numerierung mit
// dem StartFlag startet
void SetNumRuleStart( BOOL bFlag = TRUE );
BOOL IsNumRuleStart() const;
void SetNodeNumStart( USHORT nStt = USHRT_MAX );
USHORT IsNodeNumStart() const;
BOOL ReplaceNumRule( const String& rOldRule, const String& rNewRule );
// Undo
// UndoHistory am Dokument pflegen
// bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
void DoUndo( BOOL bOn = TRUE );
BOOL DoesUndo() const;
void DoGroupUndo( BOOL bUn = TRUE );
BOOL DoesGroupUndo() const;
void DelAllUndoObj();
// macht rueckgaengig:
// setzt Undoklammerung auf, liefert nUndoId der Klammerung
USHORT StartUndo( USHORT nUndoId = 0 );
// schliesst Klammerung der nUndoId, nicht vom UI benutzt
USHORT EndUndo( USHORT nUndoId = 0 );
// liefert die Id der letzten undofaehigen Aktion zurueck
// fuellt ggf. VARARR mit User-UndoIds
USHORT GetUndoIds( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
// abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions
static USHORT GetUndoActionCount();
static void SetUndoActionCount( USHORT nNew );
// Redo
// liefert die Id der letzten Redofaehigen Aktion zurueck
// fuellt ggf. VARARR mit RedoIds
USHORT GetRedoIds( String* pRedoStr = 0, SwUndoIds *pRedoIds = 0) const;
// Repeat
// liefert die Id der letzten Repeatfaehigen Aktion zurueck
// fuellt ggf. VARARR mit RedoIds
USHORT GetRepeatIds( String* pRepeatStr = 0, SwUndoIds *pRedoIds = 0) const;
// 0 letzte Aktion, sonst Aktionen bis zum Start der Klammerung nUndoId
// mit KillPaMs, ClearMark
BOOL Undo(USHORT nUndoId = 0);
// wiederholt
USHORT Repeat( USHORT nCount );
// wiederholt
USHORT Redo();
#ifdef USED
// Aktionen klammern
void StartAction();
void EndAction();
#endif
// fuer alle Sichten auf dieses Dokument
void StartAllAction();
void EndAllAction();
//Damit Start-/EndActions aufgesetzt werden koennen.
void CalcLayout();
// Inhaltsform bestimmen, holen, liefert Type am CurCrsr->SPoint
USHORT GetCntType() const;
BOOL HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
/* Anwenden der ViewOptions mit Start-/EndAction */
inline void ApplyViewOptions( const SwViewOption &rOpt );
// Text innerhalb der Selektion erfragen
// Returnwert liefert FALSE, wenn der selektierte Bereich
// zu gross ist, um in den Stringpuffer kopiert zu werden
// oder andere Fehler auftreten
BOOL GetSelectedText( String &rBuf,
int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
/*
* liefert eine Graphic, wenn CurCrsr->Point() auf einen
* SwGrfNode zeigt (und Mark nicht gesetzt ist oder auf die
* gleiche Graphic zeigt), sonst gibt's was auf die Finger
*/
const Graphic &GetGraphic( BOOL bWait = TRUE ) const;
const GraphicObject &GetGraphicObj() const;
BOOL IsGrfSwapOut( BOOL bOnlyLinked = FALSE ) const;
USHORT GetGraphicType() const;
const PolyPolygon *GetGraphicPolygon() const;
void SetGraphicPolygon( const PolyPolygon *pPoly );
/*
* liefert die Groesse einer Graphic in Twips, wenn der Cursor
* auf einer Graphic steht; BOOL liefert FALSE, wenn s.o.
*/
BOOL GetGrfSize(Size&) const;
/*
* liefert den Namen und den Filter einer Graphic, wenn der Cursor
* auf einer Graphic steht, sonst gibt's was auf die Finger!
* Ist ein String-Ptr != 0 dann returne den entsp. Namen
*/
void GetGrfNms( String* pGrfName, String* pFltName,
const SwFlyFrmFmt* = 0 ) const;
/*
* erneutes Einlesen, falls Graphic nicht Ok ist. Die
* aktuelle wird durch die neue ersetzt.
*/
void ReRead( const String& rGrfName, const String& rFltName,
const Graphic* pGraphic = 0 );
// alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
const String& GetAlternateText() const;
void SetAlternateText( const String& rTxt );
//eindeutige Identifikation des Objektes (fuer ImageMapDlg)
void *GetIMapInventor() const;
Graphic GetIMapGraphic( BOOL bWait = TRUE ) const; //liefert eine Graphic fuer alle Flys!
const SwFlyFrmFmt* FindFlyByName( const String& rName, BYTE nNdTyp = 0 ) const;
//liefert ein ClientObject, wenn CurCrsr->Point() auf einen
//SwOLENode zeigt (und Mark nicht gesetzt ist oder auf das
//gleiche ClientObject zeigt), sonst gibt's was auf die
//Finger.
SvInPlaceObjectRef GetOLEObj() const;
//Gibt es ein OleObject mit diesem Namen (SwFmt)?
BOOL HasOLEObj( const String &rName ) const;
//Liefert den Pointer auf die Daten des Chart, indem sich der Crsr
//befindet.
void SetChartName( const String &rName );
// returne den ChartNamen - vom Crsr oder vom uebergebenen OLE-Object
// reurnt aEmptyStr wenn nicht gefunden wurde
const String& GetChartName( SvInPlaceObject* pObj = 0 );
//Sucht die Tabelle und liefert ein mit den Daten der Tabelle gefuelltes
//pData. Wenn pData 0 ist wird eines angelegt.
void UpdateChartData( const String &rName, SchMemChart *&pData );
//Updaten der Inhalte aller Charts zu der Tabelle mit dem angegeben Namen
void UpdateCharts( const String &rName );
// aktuelles Wort erfragen
String GetCurWord();
// Textbaustein aus dem Textbausteindokument in
// das aktuelle Dokument, Vorlagen nur wenn es nicht schon gibt
void InsertGlossary( SwTextBlocks& rGlossary, const String& );
// aktuelle Selektion zum Textbaustein machen und ins
// Textbausteindokument einfuegen, einschliesslich Vorlagen
USHORT MakeGlossary( SwTextBlocks& rToFill, const String& rName,
const String& rShortName, BOOL bSaveRelFile = FALSE,
BOOL bSaveRelNet = FALSE, const String* pOnlyTxt=0 );
// speicher den gesamten Inhalt des Docs als Textbaustein
USHORT SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
const String& rShortName,
BOOL bSaveRelFile = FALSE,
BOOL bSaveRelNet = FALSE,
BOOL bOnlyTxt = FALSE );
// Linguistik
// Selektionen sichern
void HyphStart( SwDocPositions eStart, SwDocPositions eEnde );
// Selektionen wiederherstellen
void HyphEnd();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
HyphContinue( USHORT* pPageCnt, USHORT* pPageSt );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
SpellContinue( USHORT* pPageCnt, USHORT* pPageSt );
// zu trennendes Wort ignorieren
void HyphIgnore();
// zum Einfuegen des SoftHyphens, Position ist der Offset
// innerhalb des getrennten Wortes.
void InsertSoftHyph( const xub_StrLen nHyphPos );
//Tabelle
const SwTable& InsertTable(USHORT nRows, USHORT nCols,
SwHoriOrient = HORI_FULL,
USHORT nInsert = ALL_TBL_INS_ATTR,
const SwTableAutoFmt* pTAFmt = 0 );
void InsertDDETable( SwDDEFieldType* pDDEType,
USHORT nRows, USHORT nCols,
SwHoriOrient eAdj = HORI_FULL,
USHORT nInsert = HEADLINE_NO_BORDER );
void UpdateTable();
void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
SwFrmFmt *GetTableFmt();
BOOL TextToTable( sal_Unicode cCh, SwHoriOrient eAdj = HORI_FULL,
USHORT nInsert = ALL_TBL_INS_ATTR,
const SwTableAutoFmt* pTAFmt = 0 );
BOOL TableToText( sal_Unicode cCh );
FASTBOOL IsTextToTableAvailable() const;
BOOL GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
BOOL IsTableBoxTextFormat() const;
// Change Modus erfragen/setzen
USHORT GetTblChgMode() const;
void SetTblChgMode( USHORT eMode );
// Zellenbreiten ueber Min/Max Berechnung an Tabellenbreite anpassen
void OptimizeTblBoxWidthMinMax();
// Tabelle an der Cursor Position aufsplitten
BOOL SplitTable( USHORT eMode );
// Tabellen verbinden
// CanMerge kann feststellen, ob Prev oder Next moeglich ist. Wird
// der Pointer pChkNxtPrv uebergeben, wird festgestellt in welche
// Richtung es moeglich ist.
BOOL CanMergeTable( BOOL bWithPrev = TRUE, BOOL* pChkNxtPrv = 0 ) const;
BOOL MergeTable( BOOL bWithPrev = TRUE, USHORT nMode = 0 );
// Selektionen sichern
void SpellStart( SwDocPositions eStart, SwDocPositions eEnde,
SwDocPositions eCurr );
// Selektionen wiederherstellen
void SpellEnd();
// Is spelling active somewhere else?
BOOL HasSpellIter() const;
// Is hyphenation active somewhere else?
BOOL HasHyphIter() const;
::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellAlternatives>
GetCorrection( const Point* pPt );
void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde );
// returne zum Namen die im Doc gesetzte Referenz
const SwFmtRefMark* GetRefMark( const String& rName ) const;
// returne die Namen aller im Doc gesetzten Referenzen
// Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
// gesetzt ist
USHORT GetRefMarks( SvStringsDtor* = 0 ) const;
// rufe die Autokorrektur auf
void AutoCorrect( SvxAutoCorrect& rACorr, BOOL bInsertMode = TRUE,
sal_Unicode cChar = ' ' );
BOOL GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
// dann setze nach entsprechenden Regeln unsere Vorlagen
void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
static SvxSwAutoFmtFlags* GetAutoFmtFlags();
static void SetAutoFmtFlags(SvxSwAutoFmtFlags *);
// errechnet die Selektion
String Calculate();
BOOL InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL bKeepSelection = FALSE );
USHORT GetINetAttrs( SwGetINetAttrs& rArr );
//SS Fuer holen/ersetzen DropCap-Inhalt
String GetDropTxt( const USHORT nChars ) const;
void ReplaceDropTxt( const String &rStr );
// Abfrage von Oultine Informationen:
USHORT GetOutlineCnt() const;
BYTE GetOutlineLevel( USHORT nIdx ) const;
// mit exp. Felder und KapitelNummern
String GetOutlineText( USHORT nIdx, BOOL bWithNum = TRUE ) const;
// die Nummer
const SwNodeNum* GetOutlineNum( USHORT nIdx ) const;
// darf verschoben werden?
BOOL IsOutlineMovable( USHORT nIdx ) const;
USHORT GetLineCount( BOOL bActPos = TRUE );
// erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
BOOL GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
BOOL SetCurFtn( const SwFmtFtn& rFillFtn );
BOOL HasFtns( BOOL bEndNotes = FALSE ) const;
//z.Zt nicht benoetigt USHORT GetFtnCnt( BOOL bEndNotes = FALSE ) const;
// gebe Liste aller Fussnoten und deren Anfangstexte
USHORT GetSeqFtnList( SwSeqFldList& rList, BOOL bEndNotes = FALSE );
// SS fuer Bereiche
const SwSection* InsertSection( const SwSection& rNew,
const SfxItemSet* = 0 );
BOOL IsInsRegionAvailable() const;
const SwSection* GetCurrSection() const;
// liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion
// ueber die Frames und erwischt dabei auch den Bereich, wenn der Cursor in einer
// Fussnote steht, deren Referenz in einem spaltigen Bereich steckt.
// Wenn man bOutOfTab setzt, wird der Bereich gesucht,
// der die Tabelle umfasst, nicht etwa ein innerer.
const SwSection* GetAnySection( BOOL bOutOfTab = FALSE ) const;
USHORT GetSectionFmtCount() const;
USHORT GetSectionFmtPos( const SwSectionFmt& ) const;
const SwSectionFmt& GetSectionFmt(USHORT nFmt) const;
void DelSectionFmt( USHORT nFmt );
void ChgSection( USHORT nSect, const SwSection&, const SfxItemSet* = 0 );
BOOL IsAnySectionInDoc( BOOL bChkReadOnly = FALSE,
BOOL bChkHidden = FALSE,
BOOL BChkTOX = FALSE ) const;
// Passwort fuer geschuetzte Bereiche erfragen/setzen
void ChgSectionPasswd( const String& sNew );
const String& GetSectionPasswd() const;
String GetUniqueSectionName( const String* pChkStr = 0 ) const;
//Attribute setzen
void SetSectionAttr(const SfxItemSet& rSet, SwSectionFmt* pSectFmt = 0);
// search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
// if more than one in the selection return the count
USHORT GetFullSelectedSectionCount() const;
BOOL AppendNodeInSection();
int CanInsertNodeAtEndOfSection() const;
// Optimierung UI
void SetNewDoc(BOOL bNew = TRUE);
SvxLinkManager& GetLinkManager();
inline const SvxLinkManager& GetLinkManager() const;
// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
// Numerierungen), optional kann man "um" den Offset stufen oder "auf"
// die Position gestuft werden (bModulus = TRUE)
BOOL IsMoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE ) const;
void MoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE );
// Numberformatter vom Doc erfragen
SvNumberFormatter* GetNumberFormatter();
const SvNumberFormatter* GetNumberFormatter() const
{ return ((SwEditShell*)this)->GetNumberFormatter(); }
// Extrakt fuellen
void Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress );
// Schnitstellen fuers GlobalDokument
void SetGlobalDoc( BOOL bFlag = TRUE );
BOOL IsGlobalDoc() const;
void SetGlblDocSaveLinks( BOOL bFlag = TRUE );
BOOL IsGlblDocSaveLinks() const;
USHORT GetGlobalDocContent( SwGlblDocContents& rArr ) const;
BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
const SwSection& rNew );
BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
const SwTOXBase& rTOX );
BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos );
BOOL DeleteGlobalDocContent( const SwGlblDocContents& rArr,
USHORT nPos );
BOOL MoveGlobalDocContent( const SwGlblDocContents& rArr ,
USHORT nFromPos, USHORT nToPos,
USHORT nNewPos );
BOOL GotoGlobalDocContent( const SwGlblDocContent& rPos );
// erzeuge Anhand der vorgebenen Collection Teildokumente
// falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
BOOL GenerateGlobalDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl = 0 );
BOOL GenerateHTMLDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl = 0 );
// alles fuers Redlining
USHORT GetRedlineMode() const;
void SetRedlineMode( USHORT eMode );
BOOL IsRedlineOn() const;
USHORT GetRedlineCount() const;
const SwRedline& GetRedline( USHORT nPos ) const;
BOOL AcceptRedline( USHORT nPos );
BOOL AcceptRedline();
BOOL RejectRedline( USHORT nPos );
BOOL RejectRedline();
// suche das Redline zu diesem Data und returne die Pos im Array
// USHRT_MAX wird returnt, falls nicht vorhanden
USHORT FindRedlineOfData( const SwRedlineData& ) const;
// Kommentar am Redline an der Position setzen
BOOL SetRedlineComment( const String& rS );
const SwRedline* GetCurrRedline() const;
// Redline Anzeigeattribute wurden geaendert, Views updaten
void UpdateRedlineAttr();
// vergleiche zwei Dokument mit einander
long CompareDoc( const SwDoc& rDoc );
// merge zweier Dokumente
long MergeDoc( const SwDoc& rDoc );
// Dokumentglobale Fussnoteneigenschaften
const SwFtnInfo& GetFtnInfo() const;
void SetFtnInfo(const SwFtnInfo& rInfo);
const SwEndNoteInfo& GetEndNoteInfo() const;
void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
//Einstellungen fuer Zeilennummierung
const SwLineNumberInfo &GetLineNumberInfo() const;
void SetLineNumberInfo( const SwLineNumberInfo& rInfo);
// Etiketten: Bereiche synchronisieren
void SetLabelDoc( BOOL bFlag = TRUE );
BOOL IsLabelDoc() const;
// Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
// von japanischen/chinesischen Zeichen)
SwExtTextInput* CreateExtTextInput();
void DeleteExtTextInput( SwExtTextInput* pDel = 0, BOOL bInsText = TRUE );
SwExtTextInput* GetExtTextInput() const;
void SetExtTextInputData( const CommandExtTextInputData& );
// Schnistelle fuer den Zugriff auf die AutoComplete-Liste
static SwAutoCompleteWord& GetAutoCompleteWords();
// ctor/dtor
SwEditShell( SwDoc*,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic::XSpellChecker1 >,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic::XHyphenator >, Window*,
SwRootFrm* = 0, const SwViewOption *pOpt = 0 );
// verkleideter Copy-Constructor
SwEditShell( SwEditShell*, Window* );
~SwEditShell();
private:
// fuer METWARE:
// es wird nicht kopiert und nicht zugewiesen
SwEditShell(const SwEditShell &);
const SwEditShell &operator=(const SwEditShell &);
};
inline void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt )
{
SwCrsrShell::StartAction();
ViewShell::ApplyViewOptions( rOpt );
SwEditShell::EndAction();
}
inline const SvxLinkManager& SwEditShell::GetLinkManager() const
{ return ((SwEditShell*)this)->GetLinkManager(); }
/*
* Klasse fuer den automatisierten Aufruf von Start- und
* EndAction();
*/
class SwActKontext {
SwEditShell *pSh;
public:
SwActKontext(SwEditShell *pShell);
~SwActKontext();
};
#define ACT_KONTEXT(x) SwActKontext _aActKontext_(x)
/*
* Klasse fuer den automatisierten Aufruf von Start- und
* EndCrsrMove();
*/
class SwMvKontext {
SwEditShell *pSh;
public:
SwMvKontext(SwEditShell *pShell );
~SwMvKontext();
};
#define MV_KONTEXT(x) SwMvKontext _aMvKontext_(x)
#endif
+129
View File
@@ -0,0 +1,129 @@
/*************************************************************************
*
* $RCSfile: errhdl.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _ERRHDL_HXX
#define _ERRHDL_HXX
#ifndef PRODUCT
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
extern BOOL bAssert; // TRUE, wenn eine ASSERT-Box hochkam
// -----------------------------------------------------------------------
// Ausgabe einer Fehlermeldung inkl. Dateiname und Zeilennummer
// wo der Fehler auftrat.
// Die Funktion darf nicht direkt benutzt werden!
// -----------------------------------------------------------------------
extern void AssertFail( const sal_Char*, const sal_Char*, USHORT );
extern void AssertFail( USHORT, const sal_Char*, USHORT );
#ifdef WIN
//MSC (7.0) machts nur mit static, ZTC in inlines nur ohne...
#define ASSERT( cond, message ) \
if( !(cond) ) { \
static const char __FAR_DATA _pErrorText[] = #message; \
static const char __FAR_DATA _pFileName[] = __FILE__; \
::AssertFail( _pErrorText, _pFileName, __LINE__ ); \
}
#else
#define ASSERT( cond, message ) \
if( !(cond) ) { \
const char *_pErrorText = #message; \
const char *_pFileName = __FILE__; \
::AssertFail( _pErrorText, _pFileName, __LINE__ ); \
}
#endif
// -----------------------------------------------------------------------
// Prueft ob die angegebene Bedingung wahr ist, wenn nicht wird eine
// Fehlermeldung die ueber die ID Identifiziert wird, ausgegeben.
// -----------------------------------------------------------------------
#ifdef WIN
//MSC (7.0) machts nur mit static, ZTC in inlines nur ohne...
#define ASSERT_ID( cond, id ) \
if( !(cond) ) { \
static const char __FAR_DATA _pFileName[] = __FILE__; \
::AssertFail( (USHORT)id, _pFileName, __LINE__ ); \
}
#else
#define ASSERT_ID( cond, id ) \
if( !(cond) ) { \
const char *_pFileName = __FILE__; \
::AssertFail( (USHORT)id, _pFileName, __LINE__ ); \
}
#endif
// -----------------------------------------------------------------------
// Beim Bilden der Produktversion werden alle Debug-Utilities automatisch
// ignoriert
// -----------------------------------------------------------------------
#else
#define ASSERT( cond, message ) ;
#define ASSERT_ID( cond, id ) ;
#endif // PRODUCT
#endif
+84
View File
@@ -0,0 +1,84 @@
/*************************************************************************
*
* $RCSfile: error.h,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _SWERROR_H
#define _SWERROR_H
#define ERR_SWGBASE 25000
/*** Error Codes **********************************************************/
#define ERR_VAR_IDX (ERR_SWGBASE+ 0)
#define ERR_OUTOFSCOPE (ERR_SWGBASE+ 1)
/* Error Codes fuer Numerierungsregeln */
#define ERR_NUMLEVEL (ERR_SWGBASE+ 2)
/* Error Codes fuer TxtNode */
#define ERR_NOHINTS (ERR_SWGBASE+ 3)
// von _START bis _END sind in der COREDL.DLL entsprechende Strings
// abgelegt, die erfragt werden koennen.
#define ERR_SWGMSG_START (ERR_VAR_IDX)
#define ERR_SWGMSG_END (ERR_NOHINTS)
#endif
+470
View File
@@ -0,0 +1,470 @@
/*************************************************************************
*
* $RCSfile: expfld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _EXPFLD_HXX
#define _EXPFLD_HXX
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
#ifndef _FLDBAS_HXX
#include <fldbas.hxx>
#endif
#ifndef _CELLFML_HXX
#include <cellfml.hxx>
#endif
class SfxPoolItem;
class SwTxtNode;
class SwCalc;
class SwFrm;
struct SwPosition;
class SwTxtFld;
class SwTableSortBoxes;
class SwDoc;
class SwTable;
class SwFmtFld;
// Vorwaertsdeklaration: besorge den "Body-TextNode", fuer Exp.Fld in Fly's
// Header/Footers/Footnodes
const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos,
const SwFrm& rFrm );
// Wandlung Address -> Adressen
void ReplacePoint(String& sTmpName);
struct _SeqFldLstElem
{
String sDlgEntry;
USHORT nSeqNo;
_SeqFldLstElem( const String& rStr, USHORT nNo )
: sDlgEntry( rStr ), nSeqNo( nNo )
{}
};
SV_DECL_PTRARR_DEL( _SwSeqFldList, _SeqFldLstElem*, 10, 10 )
class SwSeqFldList : public _SwSeqFldList
{
public:
SwSeqFldList() : _SwSeqFldList( 10, 10 ) {}
BOOL InsertSort( _SeqFldLstElem* );
BOOL SeekEntry( const _SeqFldLstElem& , USHORT* pPos = 0 );
};
/*--------------------------------------------------------------------
Beschreibung: Ausdruck
--------------------------------------------------------------------*/
class SwGetExpFieldType : public SwValueFieldType
{
public:
SwGetExpFieldType(SwDoc* pDoc);
virtual SwFieldType* Copy() const;
// ueberlagert, weil das Get-Field nicht veraendert werden kann
// und dann auch nicht aktualisiert werden muss. Aktualisierung
// erfolgt beim Aendern von Set-Werten !
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
};
/*--------------------------------------------------------------------
Beschreibung: GetExperession
--------------------------------------------------------------------*/
class SwGetExpField : public SwFormulaField
{
String sExpand;
BOOL bIsInBodyTxt;
USHORT nSubType;
public:
SwGetExpField( SwGetExpFieldType*, const String& rFormel,
USHORT nSubType = GSE_EXPR, ULONG nFmt = 0);
virtual void SetValue( const double& rVal );
virtual void SetLanguage(USHORT nLng);
virtual String Expand() const;
virtual SwField* Copy() const;
inline const String& GetExpStr() const;
inline void ChgExpStr(const String& rExpand);
// wird von der Formatierung abgefragt
inline BOOL IsInBodyTxt() const;
// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
inline void ChgBodyTxtFlag( BOOL bIsInBody );
// fuer Felder in Header/Footer/Footnotes/Flys:
// (wird nur von der Formatierung aufgerufen!!)
void ChangeExpansion( const SwFrm&, const SwTxtFld& );
virtual String GetCntnt(BOOL bName = FALSE) const;
// Die Formel aendern
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nType);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
static USHORT GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
};
inline void SwGetExpField::ChgExpStr(const String& rExpand)
{ sExpand = rExpand;}
inline const String& SwGetExpField::GetExpStr() const
{ return sExpand; }
// wird von der Formatierung abgefragt
inline BOOL SwGetExpField::IsInBodyTxt() const
{ return bIsInBodyTxt; }
// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
inline void SwGetExpField::ChgBodyTxtFlag( BOOL bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
/*--------------------------------------------------------------------
Beschreibung: Ausdruck setzen
--------------------------------------------------------------------*/
class SwSetExpField;
class SwSetExpFieldType : public SwValueFieldType
{
String sName;
const SwNode* pOutlChgNd;
sal_Unicode cDelim;
USHORT nType;
BYTE nLevel;
BOOL bDeleted;
public:
SwSetExpFieldType( SwDoc* pDoc, const String& rName,
USHORT nType = GSE_EXPR );
virtual SwFieldType* Copy() const;
virtual const String& GetName() const;
inline void SetType(USHORT nTyp);
inline USHORT GetType() const;
void SetSeqFormat(ULONG nFormat);
ULONG GetSeqFormat();
BOOL IsDeleted() const { return bDeleted; }
void SetDeleted( BOOL b ) { bDeleted = b; }
// ueberlagert, weil das Set-Field selbst dafuer sorgt, das
// es aktualisiert wird.
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
inline const String& GetSetRefName() const;
USHORT SetSeqRefNo( SwSetExpField& rFld );
USHORT GetSeqFldList( SwSeqFldList& rList );
String MakeSeqName( USHORT nSeqNo );
// Seqencefelder ggfs. Kapitelweise numerieren
sal_Unicode GetDelimiter() const { return cDelim; }
void SetDelimiter( sal_Unicode c ) { cDelim = c; }
BYTE GetOutlineLvl() const { return nLevel; }
void SetOutlineLvl( BYTE n ) { nLevel = n; }
void SetChapter( SwSetExpField& rFld, const SwNode& rNd );
// Member nur fuers SwDoc::UpdateExpFld - wird nur waehrend der Laufzeit
// von SequencefeldTypen benoetigt!!!
const SwNode* GetOutlineChgNd() const { return pOutlChgNd; }
void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; }
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
inline void SwSetExpFieldType::SetType( USHORT nTyp )
{
nType = nTyp;
EnableFormat( !(nType & (GSE_SEQ|GSE_STRING)));
}
inline USHORT SwSetExpFieldType::GetType() const
{ return nType; }
inline const String& SwSetExpFieldType::GetSetRefName() const
{ return sName; }
/*--------------------------------------------------------------------
Beschreibung: Ausdruck
--------------------------------------------------------------------*/
class SwSetExpField : public SwFormulaField
{
String sExpand;
String aPText;
String aSeqText;
BOOL bInput;
USHORT nSeqNo;
USHORT nSubType;
public:
SwSetExpField(SwSetExpFieldType*, const String& rFormel, ULONG nFmt = 0);
virtual void SetValue( const double& rVal );
virtual String Expand() const;
virtual SwField* Copy() const;
inline const String& GetExpStr() const;
inline void ChgExpStr( const String& rExpand );
inline void SetPromptText(const String& rStr);
inline const String& GetPromptText() const;
inline void SetInputFlag(BOOL bInp);
inline BOOL GetInputFlag() const;
inline void SetSeqText(const String& rStr);
inline const String& GetSeqText() const;
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nType);
inline BOOL IsSequenceFld() const;
// fuer SequenceFelder - logische Nummer
inline void SetSeqNumber( USHORT n ) { nSeqNo = n; }
inline USHORT GetSeqNumber() const { return nSeqNo; }
// Der Name nur erfragen
virtual const String& GetPar1() const;
// Die Formel
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
inline const String& SwSetExpField::GetExpStr() const
{ return sExpand; }
inline void SwSetExpField::ChgExpStr( const String& rExpand )
{ sExpand = rExpand; }
inline void SwSetExpField::SetPromptText(const String& rStr)
{ aPText = rStr; }
inline const String& SwSetExpField::GetPromptText() const
{ return aPText; }
inline void SwSetExpField::SetSeqText(const String& rStr)
{ aSeqText = rStr; }
inline const String& SwSetExpField::GetSeqText() const
{ return aSeqText; }
inline void SwSetExpField::SetInputFlag(BOOL bInp)
{ bInput = bInp; }
inline BOOL SwSetExpField::GetInputFlag() const
{ return bInput; }
inline BOOL SwSetExpField::IsSequenceFld() const
{ return 0 != (GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); }
/*--------------------------------------------------------------------
Beschreibung: Eingabe im Text/Variable setzen
--------------------------------------------------------------------*/
class SwInputFieldType : public SwFieldType
{
SwDoc* pDoc;
public:
SwInputFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
SwDoc* GetDoc() const { return pDoc; }
};
/*--------------------------------------------------------------------
Beschreibung: Eingabefeld
--------------------------------------------------------------------*/
class SwInputField : public SwField
{
String aContent;
String aPText;
USHORT nSubType;
public:
// Direkte Eingabe ueber Dialog alten Wert loeschen
SwInputField(SwInputFieldType*, const String& rContent ,
const String& rPrompt, USHORT nSubType = 0,
ULONG nFmt = 0);
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual String Expand() const;
virtual SwField* Copy() const;
// Content
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// aPromptText
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nSub);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
/*--------------------------------------------------------------------
Beschreibung: Sortieren der Eingabefelder
--------------------------------------------------------------------*/
class SwInputFieldList
{
public:
SwInputFieldList( SwEditShell* pShell, FASTBOOL bBuildTmpLst = FALSE );
~SwInputFieldList();
USHORT Count() const;
SwField* GetField(USHORT nId);
void GotoFieldPos(USHORT nId);
void PushCrsr();
void PopCrsr();
// vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
// damit sie geupdatet werden koennen. Returnt die Anzahl.
// (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
USHORT BuildSortLst();
// Alle unselektierten Felder aus Liste entfernen
void RemoveUnselectedFlds();
private:
SwEditShell* pSh;
_SetGetExpFlds* pSrtLst;
SvPtrarr aTmpLst;
};
/*--------------------------------------------------------------------
Beschreibung: Tabellen-Formelfeld
(Implementierung steht in tblcalc.cxx)
--------------------------------------------------------------------*/
class SwTblFieldType : public SwValueFieldType
{
public:
SwTblFieldType(SwDoc* pDocPtr);
virtual SwFieldType* Copy() const;
};
// MSC will den hier nicht
//typedef void (SwField:: *FnScanFormel)( const SwTable&, String&,
// String&, String* = 0, void* = 0 );
class SwTblField : public SwValueField, public SwTableFormula
{
String sExpand;
USHORT nSubType;
// suche den TextNode, in dem das Feld steht
virtual const SwNode* GetNodeOfFormula() const;
public:
SwTblField( SwTblFieldType*, const String& rFormel,
USHORT nSubType = 0, ULONG nFmt = 0);
virtual void SetValue( const double& rVal );
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nType);
virtual String Expand() const;
virtual SwField* Copy() const;
const String& GetExpStr() const { return sExpand; }
void ChgExpStr(const String& rStr) { sExpand = rStr; }
// berechne sich selbst
void CalcField( SwTblCalcPara& rCalcPara );
virtual String GetCntnt(BOOL bName = FALSE) const;
// Die Formel
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
#endif // _EXPFLD_HXX
+95
View File
@@ -0,0 +1,95 @@
/*************************************************************************
*
* $RCSfile: extinput.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _EXTINPUT_HXX
#define _EXTINPUT_HXX
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
#include <svtools/svstdarr.hxx>
#endif
#ifndef _PAM_HXX
#include <pam.hxx>
#endif
class CommandExtTextInputData;
class CommandExtTextInputPosData;
class Font;
class SwExtTextInput : public SwPaM
{
SvUShorts aAttrs;
BOOL bInsText;
public:
SwExtTextInput( const SwPaM& rPam, Ring* pRing = 0 );
virtual ~SwExtTextInput();
void SetInputData( const CommandExtTextInputData& rData );
Rectangle* GetPosInputData( const CommandExtTextInputPosData& rFill,
const Point* pLayPos = 0 ) const;
void InvalidateRange();
void SetFontForPos( USHORT nPos, Font& rFont );
const SvUShorts& GetAttrs() const { return aAttrs; }
BOOL IsInsText() const { return bInsText; }
void SetInsText( BOOL bFlag ) { bInsText = bFlag; }
};
#endif //_EXTINPUT_HXX
+119
View File
@@ -0,0 +1,119 @@
/*************************************************************************
*
* $RCSfile: fchrfmt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FCHRFMT_HXX
#define _FCHRFMT_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _CALBCK_HXX //autogen
#include <calbck.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class SwCharFmt;
class International;
// ATT_CHARFMT *********************************************
class SwFmtCharFmt: public SfxPoolItem, public SwClient
{
friend class SwTxtCharFmt;
SwTxtCharFmt* pTxtAttr; // mein TextAttribut
public:
SwFmtCharFmt( SwCharFmt *pFmt );
SwFmtCharFmt( const SwFmtCharFmt& rAttr );
~SwFmtCharFmt(); // fuer SEXPORT
TYPEINFO();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
//
// XML import cannot be done using importXML, because the SwCharFmt's
// name must be adjusted according to the pool id and access to the SwDoc
// is required.
virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT,
const SvXMLUnitConverter& ) const;
// an das SwTxtCharFmt weiterleiten (vom SwClient)
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
};
#endif
+654
View File
@@ -0,0 +1,654 @@
/*************************************************************************
*
* $RCSfile: fesh.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FESH_HXX
#define _FESH_HXX
#ifndef _EDITSH_HXX
#include <editsh.hxx>
#endif
#ifndef _ORNTENUM_HXX
#include <orntenum.hxx>
#endif
#ifndef _FLYENUM_HXX
#include <flyenum.hxx>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_
#include <com/sun/star/linguistic/XSpellChecker1.hpp>
#endif
#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HPP_
#include <com/sun/star/linguistic/XHyphenator.hpp>
#endif
class SwFlyFrm;
class SvEmbeddedObject;
class SwTabCols;
class SvEmbeddedObjectRef;
class SvInPlaceObject;
class SvxBrushItem;
class SwTableAutoFmt;
class SwFrm;
class SwTabFrm;
class SwFmtFrmSize;
class SvxBorderLine;
class SvStorageStream;
class SdrObject;
class Color;
class Outliner;
class SotDataObject;
class SdrViewUserMarker;
class SwFrmFmt;
struct SwSortOptions;
enum FrmType
{
//Fuer GetFrmType() und GetSelFrmType(). Der Return-Wert ist eine
//Veroderung.
FRMTYPE_NONE = 0,
FRMTYPE_PAGE = 1,
FRMTYPE_HEADER = 2,
FRMTYPE_FOOTER = 4,
FRMTYPE_BODY = 8,
FRMTYPE_COLUMN = 16,
FRMTYPE_TABLE = 32,
FRMTYPE_FLY_FREE = 64,
FRMTYPE_FLY_ATCNT = 128,
FRMTYPE_FLY_INCNT = 256,
FRMTYPE_FOOTNOTE = 512,
FRMTYPE_FTNPAGE = 1024,
FRMTYPE_FLY_ANY = 2048,
FRMTYPE_DRAWOBJ = 4096,
FRMTYPE_COLSECT = 8192,
FRMTYPE_COLSECTOUTTAB = 16384
};
#define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB )
enum DrawObjType
{
DRAW_ANY,
DRAW_CONTROL,
DRAW_SIMPLE
};
enum FlyProtectType
{
FLYPROTECT_CONTENT = 1, // kann verodert werden!
FLYPROTECT_SIZE = 2,
FLYPROTECT_POS = 4,
FLYPROTECT_PARENT = 8, // nur Parents untersuchen
FLYPROTECT_FIXED = 16 // nur nicht aufhebbarer Schutz
// z.B. durch OLE-Server, gilt auch
// fuer Dialog
};
enum ObjCntType //Fuer das Ermitteln des Cntnts per Positon (D&D)
{
OBJCNT_NONE,
OBJCNT_FLY,
OBJCNT_GRF,
OBJCNT_OLE,
OBJCNT_SIMPLE,
OBJCNT_CONTROL,
OBJCNT_URLBUTTON,
OBJCNT_GROUPOBJ,
OBJCNT_DONTCARE // nicht bestimmbar - unterschiedliche Objecte selektiert
};
//fuer GetAnyCurRect
enum CurRectType
{
RECT_PAGE, //Rect der aktuellen Seite.
RECT_PAGE_CALC, //... Seite wird ggf. Formatiert
RECT_PAGE_PRT, //Rect der aktuellen PrtArea der Seite
RECT_FRM, //Rect des aktuellen Rahmen
RECT_FLY_EMBEDDED, //Rect des aktuellen FlyFrm
RECT_FLY_PRT_EMBEDDED, //Rect der PrtArea des FlyFrm
RECT_SECTION, //Rect des aktuellen Bereichs
RECT_OUTTABSECTION, //Rect des aktuellen Bereichs,
// aber ausserhalb der Tabelle
RECT_SECTION_PRT, //Rect der aktuellen PrtArea des Bereichs
RECT_OUTTABSECTION_PRT, //Rect der aktuellen PrtArea des Bereichs,
// aber ausserhalb der Tabelle
RECT_HEADERFOOTER, //Rect des aktuellen Headers/Footer
RECT_HEADERFOOTER_PRT //Rect der PrtArea des aktuellen Headers/Footers
};
struct SwGetCurColNumPara
{
const SwFrmFmt* pFrmFmt;
const SwRect* pPrtRect, *pFrmRect;
SwGetCurColNumPara() : pFrmFmt( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {}
};
#define SW_PASTESDR_INSERT 1
#define SW_PASTESDR_REPLACE 2
#define SW_PASTESDR_SETATTR 3
class SwFEShell : public SwEditShell
{
SdrViewUserMarker *pChainFrom,
*pChainTo;
SwFlyFrm *FindFlyFrm() const;
SwFlyFrm *FindFlyFrm( const SvEmbeddedObject *pObj ) const;
BOOL GotoFly( BOOL bNext, FlyCntType eType = FLYCNTTYPE_ALL );
//Actions fuer alle Shells beenden und ChangeLink rufen.
void EndAllActionAndCall();
void Scroll( const Point &rPt );
void ChangeOpaque( BYTE nLayerId );
void GetStartEndCell( SwLayoutFrm *&prStart, SwLayoutFrm *&prEnd );
const SwFrm *GetBox( const Point &rPt ) const;
//0 == in keiner Spalte
USHORT _GetCurColNum( const SwFrm *pFrm,
SwGetCurColNumPara* pPara ) const;
void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const;
BOOL ImpEndCreate();
ObjCntType GetObjCntType( const SdrObject& rObj ) const;
// Methoden fuers kopieren von DrawObjecten
BOOL CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
const Point& rInsPt, BOOL bIsMove );
public:
TYPEINFO();
SwFEShell( SwDoc *pDoc,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic::XSpellChecker1 > &xSpell,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic::XHyphenator > &xHyph,
Window *pWin,
SwRootFrm *pMaster = 0, const SwViewOption *pOpt = 0 );
SwFEShell( SwEditShell *pShell, Window *pWin );
~SwFEShell();
// Copy und Paste Methoden fuer das interne Clipboard
BOOL Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
BOOL Paste( SwDoc* pClpDoc );
// Copy-Methode fuer Drag&Drop
BOOL Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
BOOL bIsMove = FALSE );
void SelectFlyFrm( SwFlyFrm& rFrm, BOOL bNew = FALSE );
// befindet sich der selektierte Rahmen innerhalb eines anderen?
const SwFrmFmt* IsFlyInFly();
// Innerhalb eines des sichtbaren Ankers?
Rectangle *IsAnchorAtPos( const Point &rPt ) const;
//SS fuer DrawObjekte und Rahmen-----------------------------
//Wenn ein Objekt angegeben wurde, so wird genau diese Markiert (anstatt
//ueber die Position zu suchen.
BOOL SelectObj( const Point& rSelPt, BOOL bAddSelect = FALSE,
BOOL bEnterGroup = FALSE, SdrObject *pObj = 0 );
void DelSelectedObj();
//Selektion nach oben unten bewegen (Z-Order).
//TRUE == ganz nach oben/unten
//FALSE == einen ueberholen
void SelectionToTop ( BOOL bTop = TRUE );
void SelectionToBottom( BOOL bBottom = TRUE );
short GetLayerId() const; //1 Heaven, 0 Hell, -1 Uneindeutig
void SelectionToHeaven(); //Ueber dem Dokument
void SelectionToHell(); //Unter dem Dokument
// folgende zwei Methoden returnen den enum SdrHdlKind, um sich ein
// includen von SVDRAW.HXX zu ersparen als int deklariert.
int IsObjSelectable( const Point& rPt );
int IsInsideSelectedObj( const Point& rPt );
//Returnwerte siehe oben FrmType.
//pPt: Crsr bzw. DocPos; bStopAtFly: Bei Flys anhalten oder ueber den Anchor weitergehen
// Obgleich (0,TRUE) eine Art Standard ist, sind die Parameter nicht defaultet, damit
// bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird.
USHORT GetFrmType( const Point *pPt, BOOL bStopAtFly ) const;
USHORT GetSelFrmType() const; //Selektion (Drawing)
ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const;
ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const;
//Zum Anpassen der PosAttr bei Ankerwechseln.
SwRect GetObjRect() const;
//Zum Verschieben von Flys mit der Tastatur
SwRect GetFlyRect() const;
void CalcBoundRect( SwRect &rRect, RndStdIds nAnchorId,
SwRelationOrient eRelOrient = FRAME,
BOOL bMirror = FALSE,
Point* pRef = NULL,
Size* pPercent = NULL ) const;
// Groesse von Drawobjekten setzen
void SetObjRect( const SwRect& rRect );
long BeginDrag( const Point *pPt, BOOL bProp );
long Drag ( const Point *pPt, BOOL bProp );
long EndDrag ( const Point *pPt, BOOL bProp );
void BreakDrag();
//Methoden fuer die Statuszeile.
Point GetAnchorObjDiff() const; //Abstand zum Anker
Point GetObjAbsPos() const; //Absolute Position
Size GetObjSize() const; //Groesse, ggf. die umschliessende
//SS fuer die BriefUmschlaege: hole alle Seitengebundenen Objekte
//und setze diese auf eine neue Seite.
void GetPageObjs( SvPtrarr& rFillArr );
void SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset = 1 );
// zeige die aktuelle Selektion an ( ggfs. den Rahmen/DrawObject)
virtual void MakeSelVisible();
// returne das FrmFmt von dem evt. unter dem Point stehenden Object.
// Das Object wird nicht selektiert!
const SwFrmFmt* GetFmtFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const;
// returns a format too, if the point is over the text of any fly
const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const;
//Welcher Schutz ist am selektierten Objekt gesetzt?
BYTE IsSelObjProtected( FlyProtectType eType ) const;
//Liefert neben der Grafik in rName bei gelinkten Grafiken den Namen mit
//Pfad und sonst den Grafiknamen. rbLink ist TRU bei gelinkten Grafiken.
const Graphic *GetGrfAtPos( const Point &rDocPos,
String &rName, BOOL &rbLink ) const;
//SS fuer Rahmen --------------------------------------------
BOOL IsFrmSelected() const;
BOOL GetFlyFrmAttr( SfxItemSet &rSet ) const;
BOOL SetFlyFrmAttr( SfxItemSet &rSet );
BOOL ResetFlyFrmAttr( USHORT nWhich, const SfxItemSet* pSet = 0 );
const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, BOOL bAnchValid = FALSE,
SwFrmFmt *pParent = 0 );
void SetFlyPos( const Point &rAbsPos);
Point FindAnchorPos( const Point &rAbsPos, BOOL bMoveIt = FALSE );
SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0
void SetFrmFmt( SwFrmFmt *pFmt, BOOL bKeepOrient = FALSE, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen
// finde/loeschen den Fly, in dem der Cursor steht
SwFrmFmt* WizzardGetFly();
BOOL WizzardDelFly();
//Selebstaendiges selektieren von Flys
BOOL GotoNextFly(FlyCntType eType = FLYCNTTYPE_ALL)
{ return GotoFly( TRUE, eType ); }
BOOL GotoPrevFly(FlyCntType eType = FLYCNTTYPE_ALL)
{ return GotoFly( FALSE, eType); }
//iterieren ueber Flys - fuer Basic-Collections
USHORT GetFlyCount(FlyCntType eType = FLYCNTTYPE_ALL) const;
const SwFrmFmt* GetFlyNum(USHORT nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
//Wenn ein fly selectiert ist, zieht er den Crsr in den ersten CntntFrm
const SwFrmFmt* SelFlyGrabCrsr();
//Get FlyFrameFormat; fuer UI Macro Anbindung an Flys
const SwFrmFmt* GetFlyFrmFmt() const;
//OLE, Server fordert neue Groesse an, die gewuenschten Werte werden
//als Rahmenattribute eingestellt. Wenn die Werte nicht erlaubt sind,
//so wird von der Formatierung geclippt und eine Scalierung eingestellt.
//siehe CalcAndSetScale().
void RequestObjectResize( const SwRect &rRect, SvEmbeddedObject *pIPObj );
//Der Client fuer das OleObject muss bezueglich der Scalierung auf dem
//neuesten Stand gehalten werden. Impl in der WrtShell.
//Wird ein Pointer auf eine Size uebergeben, so ist diese die aktuelle
//Core-Groesse des Objectes. Anderfalls wird die Groesse per GetCurFlyRect()
//besorgt.
virtual void CalcAndSetScale( SvEmbeddedObjectRef xIPObj,
const SwRect *pFlyPrtRect = 0,
const SwRect *pFlyFrmRect = 0 ) = 0;
//Objekte mit ActivateWhenVisible werden beim Paint Connected.
//gerufen von notxtfrm::Paint, impl in wrtsh
virtual void ConnectObj( SvInPlaceObjectRef xIPObj, const SwRect &rPrt,
const SwRect &rFrm ) = 0;
//Sichbaren Bereich auf das Object setzen, wenn es noch nicht sichtbar ist.
void MakeObjVisible( const SvEmbeddedObject *pIPObj ) const;
// setze am selektierten FlyFrame einen Namen
void SetFlyName( const String& rName );
const String& GetFlyName() const;
// erezeuge eindeutige Namen fuer Rahmen
String GetUniqueGrfName() const;
String GetUniqueOLEName() const;
String GetUniqueFrameName() const;
// springe zum benannten Rahmen (Grafik/OLE)
BOOL GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
BOOL bSelFrame = TRUE );
// steht an der Position eine Grafik mit einer URL ?
const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0,
String *pTargetFrameName = 0,
String *pURLDescription = 0 ) const;
//Fuer das Chain wird immer der durch das Format spezifizierte Fly
//mit dem durch den Point getroffenen verbunden.
//In rRect wird das Rect des Flys geliefert (fuer Highlight desselben)
int Chainable( SwRect &rRect, const SwFrmFmt &rSource, const Point &rPt ) const;
int Chain( SwFrmFmt &rSource, const Point &rPt );
void Unchain( SwFrmFmt &rFmt );
void HideChainMarker();
void SetChainMarker();
Size GetGraphicDefaultSize() const;
//SS fuer DrawObjekte ---------------------
//Temporaer um Bug zu umgehen.
void CheckUnboundObjects();
//Achtung: Uneindeutikeiten bei Mehrfachselektionen.
BOOL GetObjAttr( SfxItemSet &rSet ) const;
BOOL SetObjAttr( const SfxItemSet &rSet );
BOOL GotoObj( BOOL bNext, DrawObjType eType = DRAW_ANY);
ULONG ControlCount() const;
BOOL GotoControl( ULONG nIndex );
//Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion.
void SetDragMode( UINT16 eSdrDragMode );
USHORT IsObjSelected() const; //Liefert gleich die Anzahl der Objekte,
//zaehlt aber nicht die Objekte in Gruppen.
void EndTextEdit(); //Loescht ggf. das Objekt.
//Ankertyp des selektierten Objektes, -1 bei Uneindeutigkeit oder
//Rahmenselektion; FLY_PAGE bzw. FLY_AT_CNTNT aus frmatr.hxx sonst.
short GetAnchorId() const;
//Erzeugen von DrawObjekten, beim Begin wird der Objekttyp mitgegeben.
//Beim End kann ein Cmd mitgegeben werden, hier ist ggf.
//SDRCREATE_RESTRAINTEND fuer Ende oder SDRCREATE_NEXTPOINT fuer ein
//Polygon relevant. Nach dem RESTRAINTEND ist das Objekt erzeugt und
//selektiert.
//Mit BreakCreate wird der Vorgang abgebrochen, dann ist kein Objekt
//mehr selektiert.
BOOL BeginCreate( UINT16 eSdrObjectKind, const Point &rPos );
BOOL BeginCreate( UINT16 eSdrObjectKind, UINT32 eObjInventor, const Point &);
void MoveCreate ( const Point &rPos );
BOOL EndCreate ( UINT16 eSdrCreateCmd );
void BreakCreate();
BOOL IsDrawCreate() const;
// Funktionen f�r Rubberbox, um Draw-Objekte zu selektieren
BOOL BeginMark( const Point &rPos );
void MoveMark ( const Point &rPos );
BOOL EndMark ();
void BreakMark();
//Gruppe erzeugen, aufloesen, nix bei Rahmenselektion.
BOOL IsGroupSelected(); //Kann auch eine Mischselektion sein!
void GroupSelection(); //Hinterher ist die Gruppe selektiert.
void UnGroupSelection(); //Die Einzelobjekte sind Selektiert
//Es koennen noch immer Gruppen dabei sein.
BOOL IsGroupAllowed() const;
void MirrorSelection( BOOL bHorizontal ); //Bei FALSE Vertikal
//Umankern. erlaubt sind: FLY_PAGE und FLY_AT_CNTNT des enum RndStdIds aus
//frmatr.hxx. Hier kein enum wg. Abhaengigkeiten
//Der BOOL ist nur fuer internen Gebrauch! Anker wird nur - anhand der
//aktuellen Dokumentposition - neu gesetzt aber nicht umgesetzt.
void ChgAnchor( int eAnchorId, BOOL bSameOnly = FALSE,
BOOL bPosCorr = TRUE );
// hole die selectierten DrawObj als Grafik (MetaFile/Bitmap)
// Return-Wert besagt ob konvertiert wurde!!
BOOL GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const;
void Paste( SvStorageStream& rStm, USHORT nAction, const Point* pPt = 0 );
BOOL Paste( const Graphic &rGrf );
BOOL Paste( SotDataObject& rObj, const Point& rPt );
BOOL IsAlignPossible() const;
void SetCalcFieldValueHdl(Outliner* pOutliner);
//Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
// angemeldet sein.
void Insert( SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet = 0,
SwFrmFmt* = 0, const Point* = 0 );
BOOL ReplaceSdrObj( const String& rGrfName, const String& rFltName,
const Graphic* pGrf = 0 );
//------------------------------------------
//Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point
Point GetCntntPos( const Point& rPoint, BOOL bNext ) const;
//Layout-Selektion Hiden/Zeigen und aufruf an die CrsrSh weiterreichen.
void ShLooseFcs();
void ShGetFcs( BOOL bUpdate = TRUE );
//PageDescriptor-Schnittstelle
void ChgCurPageDesc( const SwPageDesc& );
USHORT GetCurPageDesc( const BOOL bCalcFrm = TRUE ) const;
USHORT GetPageDescCnt() const;
SwPageDesc* FindPageDescByName( const String& rName,
BOOL bGetFromPool = FALSE,
USHORT* pPos = 0 );
const SwPageDesc& GetPageDesc( USHORT i ) const;
void ChgPageDesc( USHORT i, const SwPageDesc& );
// if inside all selection only one PageDesc, return this.
// Otherwise return 0 pointer
const SwPageDesc* GetSelectedPageDescs() const;
const SwRect& GetAnyCurRect( CurRectType eType,
const Point* pPt = 0,
const SvEmbeddedObject *pObj = 0 ) const;
//Seitennummer der Seite in der der Point liegt, 0 wenn keine
//getroffen ist.
USHORT GetPageNumber( const Point &rPoint ) const;
BOOL GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay ) const;
void Insert(const String& rGrfName,
const String& rFltName,
const Graphic* pGraphic = 0,
const SfxItemSet* pFlyAttrSet = 0,
const SfxItemSet* pGrfAttrSet = 0,
SwFrmFmt* = 0 );
void Insert(SvInPlaceObject *,
const SfxItemSet* pFlyAttrSet = 0,
const SfxItemSet* pGrfAttrSet = 0,
SwFrmFmt* = 0 );
void GrfToOle( SvInPlaceObject * );
void OleToGrf( const Graphic *pGrf );
//Attribute der Tabelle besorgen/setzen.
void GetTblAttr( SfxItemSet & ) const;
void SetTblAttr( const SfxItemSet & );
//Tabelle vollstaendig selektiert?
BOOL HasWholeTabSelection() const;
//Ist der Inhalt einer Tabellenzelle oder mindestens eine Tabellenzelle
//vollstaendig selektiert ist
BOOL HasBoxSelection() const;
BOOL InsertRow( USHORT nCnt, BOOL bBehind );
BOOL InsertCol( USHORT nCnt, BOOL bBehind ); // 0 == am Ende
BOOL DeleteCol();
BOOL DeleteRow();
BOOL DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle.
USHORT MergeTab(); //Merged selektierte Tabellenteile zusammen
//Fehler ueber enum zurueck
BOOL SplitTab( BOOL nVert = TRUE, USHORT nCnt = 1); //Zelle Vertikal oder
//Horizontal s plitten.
BOOL Sort(const SwSortOptions&); //Sortieren.
void SetRowHeight( const SwFmtFrmSize &rSz );
//Der Pointer muss vom Aufrufer zerstoert werden wenn != 0
void GetRowHeight( SwFmtFrmSize *&rpSz ) const;
void SetBoxAlign( USHORT nOrient );
USHORT GetBoxAlign() const; //USHRT_MAX fuer uneindeutig!
//Ausgleichen der Zeilenhoehen. Mit bTstOnly festellen ob mehr als eine
//Zeile markiert ist.
BOOL BalanceRowHeight( BOOL bTstOnly );
void SetTabBorders( const SfxItemSet& rSet );
void GetTabBorders( SfxItemSet& rSet) const;
void SetTabLineStyle(const Color* pColor, BOOL bSetLine = FALSE, const SvxBorderLine* pBorderLine = NULL);
void SetTabBackground( const SvxBrushItem &rNew );
void GetTabBackground( SvxBrushItem &rToFill ) const;
void SetBoxBackground( const SvxBrushItem &rNew );
BOOL GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
void SetRowBackground( const SvxBrushItem &rNew );
BOOL GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
BOOL IsMouseTabCol( const Point &rPt ) const;
void GetMouseTabCols( SwTabCols &ToFill, const Point &rPt ) const;
void SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
const Point &rPt );
void GetTabCols( SwTabCols &rToFill ) const; //Spalten- und Randinfo.
void SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly = TRUE );
void ProtectCells(); //Falls eine Tabselektion besteht, wird sie ver-
// nichtet, wenn der Cursor nicht in Readonly darf
void UnProtectCells(); // auf die Tabellenselektin
void UnProtectCells( const String& rTblName ); // diese Tabelle
void UnProtectTbls(); //bei allen Tabellen in der Selektion den Schutz aufheben
BOOL HasTblAnyProtection( const String* pTblName = 0,
BOOL* pFullTblProtection = 0 );
void SetHeadlineRepeat( BOOL bSet );//TRUE: Headline soll widerholt werden.
BOOL IsHeadlineRepeat() const;
BOOL IsInRepeatedHeadline() const;
BOOL IsInHeadline() const;
//Stellt die Breiten der Zellen so ein, dass der Inhalt moeglichst
//nicht umgebrochen werden muss.
//bBalance sorgt fuer einen Ausgleich der markierten Spalten.
void AdjustCellWidth( BOOL bBalance = FALSE );
//Nicht erlaubt, wenn nur leere Zellen selektiert sind.
BOOL IsAdjustCellWidthAllowed( BOOL bBalance = FALSE ) const;
//Ausgleich der Zellenbreiten, mit bTstOnly feststellen, ob mehr als
//eine Zelle markiert ist.
BOOL BalanceCellWidth( BOOL bTstOnly );
// AutoFormat fuer die Tabelle/TabellenSelection
BOOL SetTableAutoFmt( const SwTableAutoFmt& rNew );
// Erfrage wie attributiert ist
BOOL GetTableAutoFmt( SwTableAutoFmt& rGet );
// aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
BOOL SetColRowWidthHeight( USHORT eType, USHORT nDiff = 283 );
// Autosumme
BOOL GetAutoSum( String& rFml ) const;
//Phy: Tatsaechliche Seitenanzahl.
//Virt: Vom User evtl. gesetzten Offset mit einbeziehen.
USHORT GetPhyPageNum();
USHORT GetVirtPageNum( const BOOL bCalcFrm = TRUE );
// Setzt an der aktuellen Postion einen neuen Page Offset
void SetNewPageOffset( USHORT nOffset );
void SetPageOffset( USHORT nOffset ); //Aendert den letzten Page Offset
USHORT GetPageOffset() const; //Liefert den letzten Page Offset
//SS fuer Beschriftungen
void InsertLabel( const SwLabelType eType, const String &rTxt,
const BOOL bBefore, const USHORT nId,
const BOOL bCpyBrd = TRUE );
//Das Lineal will auch noch etwas von uns wissen.
USHORT GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte
USHORT GetCurMouseColNum( const Point &rPt,
SwGetCurColNumPara* pPara = 0 ) const;
USHORT GetCurTabColNum() const; //0 == in keiner Tabelle
USHORT GetCurMouseTabColNum( const Point &rPt ) const;
USHORT GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte
// Die Breite des aktuellen Bereichs fuer Spaltendialog
long GetSectionWidth( SwFmt& rFmt ) const;
};
#endif
+522
View File
@@ -0,0 +1,522 @@
/*************************************************************************
*
* $RCSfile: fldbas.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FLDBAS_HXX
#define _FLDBAS_HXX
#ifndef FIELDIDS_ONLY // SWG-Testreader!!
#ifndef _LANG_HXX //autogen
#include <tools/lang.hxx>
#endif
#ifndef _DEBUG_HXX //autogen
#include <tools/debug.hxx>
#endif
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#include "calbck.hxx"
#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
#include <com/sun/star/uno/Any.hxx>
#endif
class SwDoc;
class Date;
class Time;
class _SetGetExpFlds;
class SwEditShell;
class SvStringsDtor;
namespace com{namespace star { namespace sun {namespace uno{ class Any;}}}}
class SvNumberFormatter;
#endif // FIELDIDS_ONLY
/*--------------------------------------------------------------------
Beschreibung: die ID's fuer die Feldtypen
--------------------------------------------------------------------*/
enum RES_FIELDS
{
// Fuer die alten Dokumente muessen die Field-Which IDS erhalten bleiben !!!!
RES_FIELDS_BEGIN,
RES_DBFLD = RES_FIELDS_BEGIN,
RES_USERFLD,
RES_FILENAMEFLD,
RES_DBNAMEFLD,
RES_DATEFLD,
RES_TIMEFLD,
RES_PAGENUMBERFLD,
RES_AUTHORFLD,
RES_CHAPTERFLD,
RES_DOCSTATFLD,
RES_GETEXPFLD,
RES_SETEXPFLD,
RES_GETREFFLD,
RES_HIDDENTXTFLD,
RES_POSTITFLD,
RES_FIXDATEFLD,
RES_FIXTIMEFLD,
RES_REGFLD,
RES_VARREGFLD,
RES_SETREFFLD,
RES_INPUTFLD,
RES_MACROFLD,
RES_DDEFLD,
RES_TABLEFLD,
RES_HIDDENPARAFLD,
RES_DOCINFOFLD,
RES_TEMPLNAMEFLD,
RES_DBNEXTSETFLD,
RES_DBNUMSETFLD,
RES_DBSETNUMBERFLD,
RES_EXTUSERFLD,
RES_REFPAGESETFLD,
RES_REFPAGEGETFLD,
RES_INTERNETFLD,
RES_JUMPEDITFLD,
RES_SCRIPTFLD,
RES_DATETIMEFLD,
RES_AUTHORITY, //Table of authorities
RES_FIELDS_END
};
/*--------------------------------------------------------------------
Beschreibung: Liste der FieldTypes am UI
--------------------------------------------------------------------*/
enum SwFldTypesEnum
{
TYP_BEGIN,
TYP_DATEFLD = TYP_BEGIN, // 0
TYP_TIMEFLD,
TYP_FILENAMEFLD,
TYP_DBNAMEFLD,
TYP_CHAPTERFLD,
TYP_PAGENUMBERFLD,
TYP_DOCSTATFLD,
TYP_AUTHORFLD,
TYP_SETFLD,
TYP_GETFLD,
TYP_FORMELFLD, // 10
TYP_HIDDENTXTFLD,
TYP_SETREFFLD,
TYP_GETREFFLD,
TYP_DDEFLD,
TYP_MACROFLD,
TYP_INPUTFLD,
TYP_HIDDENPARAFLD,
TYP_DOCINFOFLD,
TYP_DBFLD,
TYP_USERFLD, // 20
TYP_POSTITFLD,
TYP_TEMPLNAMEFLD,
TYP_SEQFLD,
TYP_DBNEXTSETFLD,
TYP_DBNUMSETFLD,
TYP_DBSETNUMBERFLD,
TYP_CONDTXTFLD,
TYP_NEXTPAGEFLD,
TYP_PREVPAGEFLD,
TYP_EXTUSERFLD, // 30
TYP_FIXDATEFLD,
TYP_FIXTIMEFLD,
TYP_SETINPFLD,
TYP_USRINPFLD,
TYP_SETREFPAGEFLD,
TYP_GETREFPAGEFLD,
TYP_INTERNETFLD,
TYP_JUMPEDITFLD,
TYP_SCRIPTFLD, // 40
TYP_AUTHORITY,
TYP_END
};
enum SwFileNameFormat
{
FF_BEGIN,
FF_NAME = FF_BEGIN,
FF_PATHNAME,
FF_PATH,
FF_NAME_NOEXT,
FF_UI_NAME,
FF_UI_RANGE,
FF_END,
FF_FIXED = 0x8000
};
enum SwVarFormat
{
VVF_CMD = 0x0010, // Kommando anzeigen
VVF_INVISIBLE = 0x0040, // unsichtbar
VVF_XXP = 0x0400, // 1234%
VVF_XX_XXP = 0x0800, // 1.234,56%
VVF_CLEAR = 0x000f,
// ab hier neue Formate
VVF_SYS = 0x2000, //Zahlenformat aus der Systemeinstellung
VVF_X = 0x2100, // 1234
VVF_X_X = 0x2200, // 1234,5
VVF_X_XX = 0x2300, // 1245,56
VVF_XX_X = 0x2400, // 1.234,5
VVF_XX_XX = 0x2500, // 1.234,56
VVF_XX_XXX = 0x2600, // 1.234,567
VVF_SYS_CUR = 0x2700, // W„hrungsformat aus der Systemeinstellung
VVF_CUR_X = 0x2800, // DM 1234
VVF_CUR_XX_XX = 0x2900, // DM 1234,56 DM 1234,00
VVF_CUR_XX_X0 = 0x2a00, // DM 1234,56 DM 1234,--
VVF_X_CUR = 0x2b00, // 1234 DM
VVF_XX_XX_CUR = 0x2c00, // 1234,56 DM 1234,00 DM
VVF_XX_X0_CUR = 0x2d00, // 1234,56 DM 1234,-- DM
// Kompatibilitaet:
VF_CMD = VVF_CMD,
VF_INVISIBLE = VVF_INVISIBLE,
VF_XXP = VVF_XXP,
VF_XX_XXP = VVF_XX_XXP,
VF_VISIBLE = VVF_SYS,
VF_XX = VVF_X,
VF_XX_XX = VVF_XX_XX,
VF_XX_XX_CUR = VVF_SYS_CUR,
VF_CLEAR = VVF_CLEAR
};
enum SwGetSetExpType
{
GSE_STRING = 0x0001, // String
GSE_EXPR = 0x0002, // Expression
GSE_INP = 0x0004, // InputField
GSE_SEQ = 0x0008, // Sequence
GSE_FORMULA = 0x0010 // Formel
};
enum SwExtendedSubType
{
SUB_CMD = 0x0100, // Kommando anzeigen
SUB_INVISIBLE = 0x0200, // unsichtbar
SUB_OWN_FMT = 0x0400 // SwDBField: Uebernimmt Formatierung nicht
// aus Datenbank
};
enum SwInputFieldSubType
{
INP_TXT = 0x01,
INP_USR = 0x02,
INP_VAR = 0x03
};
enum SwUserType
{
UF_STRING = 0x01,
UF_EXPR = 0x02
};
enum SwDateTimeSubType
{
FIXEDFLD = 1,
DATEFLD = 2,
TIMEFLD = 4
};
#ifndef FIELDIDS_ONLY // SWG-Testreader!!
extern USHORT __FAR_DATA aTypeTab[];
/*--------------------------------------------------------------------
Beschreibung: Allgemeine Tools
--------------------------------------------------------------------*/
String GetResult(double nVal, ULONG nNumFmt, USHORT nLang = LANGUAGE_SYSTEM);
void SetErrorStr(const String& rStr);
//String ExpandDate(const Date& rDate, ULONG nFmt, USHORT nLang);
//String ExpandTime(const Time& rTime, ULONG nFmt, USHORT nLang);
String FormatNumber(USHORT nNum, ULONG nFormat);
/*--------------------------------------------------------------------
Beschreibung: Instanzen von SwFields und Abgeleiteten kommen 0-n mal vor.
Zu jeder Klasse SwFields existiert
1 Instanz der zugehoerigen Typenklasse
Basisklasse aller Feldtypen ist SwFieldType
--------------------------------------------------------------------*/
class SwFldNames;
DBG_NAMEEX(SwFieldType);
class SwFieldType : public SwModify
{
USHORT nWhich;
friend void _FinitUI(); // um den Pointer zu loeschen!
static SvStringsDtor* pFldNames;
static void _GetFldName(); // legt die FldNames an, fldmgr.cxx!
protected:
SwFieldType( USHORT nWhichId );
public:
#ifndef PRODUCT
virtual ~SwFieldType();
#endif
static const String& GetTypeStr( USHORT nTypeId );
// nur in abgeleiteten Klassen
virtual const String& GetName() const;
virtual SwFieldType* Copy() const = 0;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
USHORT Which() const { return nWhich; }
inline void UpdateFlds() const;
static inline SvStringsDtor* GetFldNames();
};
inline void SwFieldType::UpdateFlds() const
{
((SwFieldType*)this)->Modify( 0, 0 );
}
/*--------------------------------------------------------------------
Beschreibung: Basisklasse aller Felder.
Ueber Which wird der Typ des Feldes abgefragt.
Ueber Expand() wird der expandierte Inhalt
des Feldes in Erfahrung gebracht.
--------------------------------------------------------------------*/
class SwField
{
USHORT nLang; // Immer ueber SetLanguage aendern!
ULONG nFormat;
SwFieldType* pType;
protected:
void SetFormat(ULONG nSet) {nFormat = nSet;}
SwField(SwFieldType* pTyp, ULONG nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM);
public:
virtual ~SwField();
// Typ feststellen
inline SwFieldType* GetTyp() const;
// neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt)
virtual SwFieldType* ChgTyp( SwFieldType* );
// Expandierung fuer die Anzeige
virtual String Expand() const = 0;
// liefert den Namen oder den Inhalt
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual SwField* Copy() const = 0;
// ResId
USHORT Which() const
#ifdef PRODUCT
{ return pType->Which(); }
#else
; // in fldbas.cxx implementiert
#endif
// TYP_ID
USHORT GetTypeId() const;
static USHORT GetResId(USHORT nTypeId, BOOL& bAmbigous);
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT);
// Sprache an der Feldposition
inline USHORT GetLanguage() const;
virtual void SetLanguage(USHORT nLng);
// Parameter fuer Dialog und BASIC erfragen
inline ULONG GetFormat() const;
virtual const String& GetPar1() const;
virtual String GetPar2() const;
virtual String GetFormula() const;
virtual void ChangeFormat(ULONG n);
virtual void SetPar1(const String& rStr);
virtual void SetPar2(const String& rStr);
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
// hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
FASTBOOL HasClickHdl() const;
// ist es ein Fix-Feld?
FASTBOOL IsFixed() const;
};
inline SwFieldType* SwField::GetTyp() const
{ return pType; }
inline ULONG SwField::GetFormat() const
{ return nFormat; }
inline USHORT SwField::GetLanguage() const
{ return nLang; }
/*--------------------------------------------------------------------
Beschreibung: Felder mit Values, die ueber der Numberformatter
formatiert werden muessen
--------------------------------------------------------------------*/
class SwValueFieldType : public SwFieldType
{
SwDoc* pDoc;
BOOL bUseFormat; // Numberformatter verwenden
protected:
SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId );
SwValueFieldType( const SwValueFieldType& rTyp );
public:
inline SwDoc* GetDoc() const { return pDoc; }
inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; }
inline BOOL UseFormat() const { return bUseFormat; }
inline void EnableFormat(BOOL bFormat = TRUE) { bUseFormat = bFormat; }
String ExpandValue(const double& rVal, ULONG nFmt, USHORT nLng=0) const;
void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const;
void DoubleToString(String &rValue, const double &rVal, ULONG nFmt) const;
};
class SwValueField : public SwField
{
double fValue;
// String sExpand;
protected:
SwValueField( SwValueFieldType* pFldType, ULONG nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
SwValueField( const SwValueField& rFld );
public:
virtual SwFieldType* ChgTyp( SwFieldType* );
virtual void SetLanguage(USHORT nLng);
// os: wozu war das denn da?
// virtual void ChangeFormat(ULONG n);
inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); }
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
inline String ExpandValue(const double& rVal, ULONG nFmt, USHORT nLng=0) const
{ return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); }
static ULONG GetSystemFormat(SvNumberFormatter* pFormatter, ULONG nFmt);
};
class SwFormulaField : public SwValueField
{
String sFormula;
protected:
SwFormulaField( SwValueFieldType* pFldType, ULONG nFmt = 0, const double fVal = 0.0 );
SwFormulaField( const SwFormulaField& rFld );
public:
virtual String GetFormula() const;
void SetFormula(const String& rStr);
void SetExpandedFormula(const String& rStr);
String GetExpandedFormula() const;
};
/*--------------------------------------------------------------------
Beschreibung: Sortierung von Felder nach der Position
--------------------------------------------------------------------*/
class SwFieldList
{
public:
SwFieldList(SwEditShell* pShell);
~SwFieldList();
// Felder eines bestimmten Typen aufnehmen
void InsertFields(USHORT nTypeId, const String* pName=0);
USHORT Count() const;
SwField* GetLastField() const;
SwField* GetNextField() const;
private:
SwEditShell* pSh;
_SetGetExpFlds* pSrtLst;
};
inline SvStringsDtor* SwFieldType::GetFldNames()
{
if( !SwFieldType::pFldNames )
SwFieldType::_GetFldName();
return SwFieldType::pFldNames;
}
#endif // FIELDIDS_ONLY
#endif // _FLDBAS_HXX
+180
View File
@@ -0,0 +1,180 @@
/*************************************************************************
*
* $RCSfile: flddat.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FLDDAT_HXX
#define _FLDDAT_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#include "fldbas.hxx"
/*--------------------------------------------------------------------
Beschreibung: Formate
--------------------------------------------------------------------*/
enum SwDateFormat
{
DF_BEGIN,
//neue Formate:
DFF_SSYS = DF_BEGIN,
DFF_LSYS ,
DFF_DMY ,
DFF_DMYY ,
DFF_DMMY ,
DFF_DMMYY,
DFF_DMMMY ,
DFF_DMMMYY,
DFF_DDMMY ,
DFF_DDMMMY ,
DFF_DDMMMYY ,
DFF_DDDMMMY ,
DFF_DDDMMMYY ,
DFF_MY ,
DFF_MD ,
DFF_YMD ,
DFF_YYMD ,
DF_END ,
// Kompatibilitaet:
DF_SSYS = DFF_SSYS,
DF_LSYS = DFF_LSYS,
DF_SHORT = DFF_DMY,
DF_SCENT = DFF_DMYY,
DF_LMON = DFF_DMMYY,
DF_LMONTH = DFF_DMMMYY,
DF_LDAYMON = DFF_DDMMMYY,
DF_LDAYMONTH= DFF_DDDMMMYY
};
enum SwTimeFormat
{
TF_BEGIN,
TF_SYSTEM=TF_BEGIN,
TF_SSMM_24,
TF_SSMM_12,
TF_END
};
enum SwTimeSubFormat
{
TIME_FIX,
TIME_VAR
};
enum SwDateSubFormat
{
DATE_FIX,
DATE_VAR
};
/*--------------------------------------------------------------------
Beschreibung: Datum/Uhrzeitfeld
--------------------------------------------------------------------*/
class SwDateTimeFieldType : public SwValueFieldType
{
public:
SwDateTimeFieldType(SwDoc* pDoc);
virtual SwFieldType* Copy() const;
};
/*--------------------------------------------------------------------
Beschreibung: Datum/Uhrzeitfeld
--------------------------------------------------------------------*/
class SwDateTimeField : public SwValueField
{
USHORT nSubType;
long nOffset; // Offset in Minuten
public:
SwDateTimeField(SwDateTimeFieldType* pType, USHORT nSubType = DATEFLD,
ULONG nFmt = 0, USHORT nLng = 0);
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nSub);
virtual double GetValue() const;
virtual void SetPar2(const String& rStr);
virtual String GetPar2() const;
inline BOOL IsDate() const
{ return (nSubType & DATEFLD) != 0; }
inline void SetOffset(long nMinutes) { nOffset = nMinutes; }
inline long GetOffset() const { return nOffset; }
ULONG GetDate(BOOL bUseOffset = FALSE) const;
ULONG GetTime(BOOL bUseOffset = FALSE) const;
void SetDateTime(ULONG nDate, ULONG nTime);
static double GetDateTime(SwDoc* pDoc, ULONG nDate, ULONG nTime);
virtual String Expand() const;
virtual SwField* Copy() const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty );
};
#endif // _FLDDAT_HXX
+72
View File
@@ -0,0 +1,72 @@
/*************************************************************************
*
* $RCSfile: fldinit.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FLDINIT_HXX
#define _FLDINIT_HXX
/*--------------------------------------------------------------------
Beschreibung: Tabelle aller FeldInfos
--------------------------------------------------------------------*/
void InitFieldInfo();
void FinitFieldInfo();
#endif // _FLDINIT_HXX
+73
View File
@@ -0,0 +1,73 @@
/*************************************************************************
*
* $RCSfile: fldupde.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FLDUPDE_HXX
#define _FLDUPDE_HXX
enum SwFldUpdateFlags
{
AUTOUPD_OFF,
AUTOUPD_FIELD_ONLY,
AUTOUPD_FIELD_AND_CHARTS,
AUTOUPD_GLOBALSETTING
};
#endif
+89
View File
@@ -0,0 +1,89 @@
/*************************************************************************
*
* $RCSfile: flyenum.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FLYENUM_HXX
#define _FLYENUM_HXX
enum FlyCntType
{
FLYCNTTYPE_ALL = 0,
FLYCNTTYPE_FRM,
FLYCNTTYPE_GRF,
FLYCNTTYPE_OLE
};
//Returnwerte fuer Chainable und Chain
#define SW_CHAIN_OK 0
#define SW_CHAIN_NOT_EMPTY 1 //Nur leere Frames duerfen connected werden
#define SW_CHAIN_IS_IN_CHAIN 2 //Destination ist bereits in einer chain
#define SW_CHAIN_WRONG_AREA 3 //Destination steht in einer nicht erlaubten
//Section (Kopf-/Fusszeile)
#define SW_CHAIN_NOT_FOUND 4 //Destination und/oder Source nicht gefunden
#define SW_CHAIN_SOURCE_CHAINED 5 //Source hat bereits einen Follow
#define SW_CHAIN_SELF 6 //Sich selbst zu verketten ist
//natuerlich nicht erleubt.
#endif
+97
View File
@@ -0,0 +1,97 @@
/*************************************************************************
*
* $RCSfile: flypos.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FLYPOS_HXX
#define _FLYPOS_HXX
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
class SwCntntNode;
class ViewShell;
class SwFrmFmt;
class SwNodeIndex;
// Struktur zum Erfragen der akt. freifliegenden Rahmen am Dokument.
class SwPosFlyFrm
{
const SwFrmFmt* pFrmFmt; // das FlyFrmFmt
// SwPosition* pPos; // Position in den ContentNode
SwNodeIndex* pNdIdx; // es reicht ein Index auf den Node
UINT32 nOrdNum;
public:
SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, USHORT nArrPos );
virtual ~SwPosFlyFrm(); // virtual fuer die Writer (DLL !!)
// operatoren fuer das Sort-Array
BOOL operator==( const SwPosFlyFrm& );
BOOL operator<( const SwPosFlyFrm& );
const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
UINT32 GetOrdNum() const { return nOrdNum; }
};
typedef SwPosFlyFrm* SwPosFlyFrmPtr;
SV_DECL_PTRARR_SORT( SwPosFlyFrms, SwPosFlyFrmPtr, 0, 40 )
#endif _FLYPOS_HXX
+130
View File
@@ -0,0 +1,130 @@
/*************************************************************************
*
* $RCSfile: fmtanchr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTANCHR_HXX
#define _FMTANCHR_HXX
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _SWTYPES_HXX //autogen
#include <swtypes.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
struct SwPosition;
class International;
#define IVER_FMTANCHOR_LONGIDX ((USHORT)1)
//FlyAnchor, Anker des Freifliegenden Rahmen ----
class SwFmtAnchor: public SfxPoolItem
{
SwPosition *pCntntAnchor; //0 Fuer Seitengebundene Rahmen.
//Index fuer Absatzgebundene Rahmen.
//Position fuer Zeichengebundene Rahmen
RndStdIds nAnchorId;
USHORT nPageNum; //Seitennummer bei Seitengeb. Rahmen.
public:
SwFmtAnchor( RndStdIds eRnd = FLY_PAGE, USHORT nPageNum = 0 );
SwFmtAnchor( const SwFmtAnchor &rCpy );
~SwFmtAnchor();
// Zuweisungsoperator
SwFmtAnchor &operator=( const SwFmtAnchor& );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
RndStdIds GetAnchorId() const { return nAnchorId; }
USHORT GetPageNum() const { return nPageNum; }
const SwPosition *GetCntntAnchor() const { return pCntntAnchor; }
void SetPageNum( USHORT nNew ) { nPageNum = nNew; }
void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; }
void SetAnchor( const SwPosition *pPos );
};
inline const SwFmtAnchor &SwAttrSet::GetAnchor(BOOL bInP) const
{ return (const SwFmtAnchor&)Get( RES_ANCHOR,bInP); }
inline const SwFmtAnchor &SwFmt::GetAnchor(BOOL bInP) const
{ return aSet.GetAnchor(bInP); }
#endif
+102
View File
@@ -0,0 +1,102 @@
/*************************************************************************
*
* $RCSfile: fmtclbl.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTCLBL_HXX
#define _FMTCLBL_HXX
#ifndef _SFXENUMITEM_HXX //autogen
#include <svtools/eitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class International;
class SwFmtNoBalancedColumns : public SfxBoolItem
{
public:
SwFmtNoBalancedColumns( BOOL bFlag = FALSE )
: SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT) const;
virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
/* virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
*/ virtual USHORT GetVersion( USHORT nFFVer ) const;
};
inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(BOOL bInP) const
{ return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); }
inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(BOOL bInP) const
{ return aSet.GetBalancedColumns( bInP ); }
#endif
+222
View File
@@ -0,0 +1,222 @@
/*************************************************************************
*
* $RCSfile: fmtclds.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTCLDS_HXX
#define _FMTCLDS_HXX
#ifndef _SV_COLOR_HXX
#include <vcl/color.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
//Der ColumnDescriptor --------------------------
class SwColumn
{
USHORT nWish; //Wunschbreite incl. Raender.
//Verhaelt sich proportional zum Verhaeltniss:
//Wunschbreite der Umgebung / aktuelle Breite der Spalte
USHORT nUpper; //Oberer Rand
USHORT nLower; //Unterer Rand
USHORT nLeft; //Linker Rand
USHORT nRight; //Rechter Rand
public:
SwColumn();
BOOL operator==( const SwColumn & );
void SetWishWidth( USHORT nNew ) { nWish = nNew; }
void SetUpper( USHORT nNew ) { nUpper = nNew; }
void SetLower( USHORT nNew ) { nLower = nNew; }
void SetLeft ( USHORT nNew ) { nLeft = nNew; }
void SetRight( USHORT nNew ) { nRight = nNew; }
USHORT GetWishWidth() const { return nWish; }
USHORT GetUpper() const { return nUpper; }
USHORT GetLower() const { return nLower; }
USHORT GetLeft () const { return nLeft; }
USHORT GetRight() const { return nRight; }
};
typedef SwColumn* SwColumnPtr;
SV_DECL_PTRARR_DEL( SwColumns, SwColumnPtr, 0, 2 );
enum SwColLineAdj
{
COLADJ_NONE,
COLADJ_TOP,
COLADJ_CENTER,
COLADJ_BOTTOM
};
class SwFmtCol : public SfxPoolItem
{
// Pen aPen; //Pen fuer die Linine zwischen den Spalten
ULONG nLineWidth; //width of the separator line
Color aLineColor; //color of the separator line
BYTE nLineHeight; //Prozentuale Hoehe der Linien
//(Relativ zu der Hoehe der Spalten incl. UL).
SwColLineAdj eAdj; //Linie wird oben, mittig oder unten ausgerichtet.
SwColumns aColumns; //Informationen fuer die einzelnen Spalten.
USHORT nWidth; //Gesamtwunschbreite aller Spalten.
BOOL bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen
//der GutterWidth eine 'optische Verteilung'
//vorgenommen.
//Es muss zurueckgesetzt werden wenn an den
//Spaltenbreiten bzw. den Raendern gedreht wird.
//Wenn es wieder gesetzt wird wird automatisch neu
//gemischt (optisch verteilt).
//Das Flag ist initial gesetzt.
void Calc( USHORT nGutterWidth, USHORT nAct );
public:
SwFmtCol();
SwFmtCol( const SwFmtCol& );
~SwFmtCol();
SwFmtCol& operator=( const SwFmtCol& );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
const SwColumns &GetColumns() const { return aColumns; }
SwColumns &GetColumns() { return aColumns; }
USHORT GetNumCols() const { return aColumns.Count(); }
// const Pen& GetLinePen() const { return aPen; }
ULONG GetLineWidth() const { return nLineWidth;}
const Color& GetLineColor() const { return aLineColor;}
SwColLineAdj GetLineAdj() const { return eAdj; }
BOOL IsOrtho() const { return bOrtho; }
USHORT GetWishWidth() const { return nWidth; }
BYTE GetLineHeight()const { return nLineHeight; }
//Return USHRT_MAX wenn uneindeutig.
//Return die kleinste Breite wenn bMin True ist.
USHORT GetGutterWidth( BOOL bMin = FALSE ) const;
// void SetLinePen( const Pen& rNew ) { aPen = rNew; }
void SetLineWidth(ULONG nWidth) { nLineWidth = nWidth;}
void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
void SetLineHeight( BYTE nNew ) { nLineHeight = nNew; }
void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
void SetWishWidth( USHORT nNew ) { nWidth = nNew; }
//Mit dieser Funktion koennen die Spalten (immer wieder) initialisert
//werden. Das Ortho Flag wird automatisch gesetzt.
void Init( USHORT nNumCols, USHORT nGutterWidth, USHORT nAct );
//Stellt die Raender fuer die Spalten in aColumns ein.
//Wenn das Flag bOrtho gesetzt ist, werden die Spalten neu optisch
//verteilt. Ist das Flag nicht gesetzt werden die Spaltenbreiten nicht
//veraendert und die Raender werden einfach eingestellt.
void SetGutterWidth( USHORT nNew, USHORT nAct );
//Verteilt ebenfalls automatisch neu wenn das Flag gesetzt wird;
//nur dann wird auch der zweite Param. benoetigt und beachtet.
void SetOrtho( BOOL bNew, USHORT nGutterWidth, USHORT nAct );
//Fuer den Reader
void _SetOrtho( BOOL bNew ) { bOrtho = bNew; }
//Berechnet die aktuelle Breite der Spalte nCol.
//Das Verhaeltniss von Wunschbreite der Spalte zum Returnwert ist
//proportional zum Verhaeltniss des Gesamtwunschwertes zu nAct.
USHORT CalcColWidth( USHORT nCol, USHORT nAct ) const;
//Wie oben, aber es wir die Breite der PrtArea - also das was fuer
//den Anwender die Spalte ist - geliefert.
USHORT CalcPrtColWidth( USHORT nCol, USHORT nAct ) const;
};
inline const SwFmtCol &SwAttrSet::GetCol(BOOL bInP) const
{ return (const SwFmtCol&)Get( RES_COL,bInP); }
inline const SwFmtCol &SwFmt::GetCol(BOOL bInP) const
{ return aSet.GetCol(bInP); }
#endif
+133
View File
@@ -0,0 +1,133 @@
/*************************************************************************
*
* $RCSfile: fmtcnct.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTCNCT_HXX
#define _FMTCNCT_HXX
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
#ifndef _CALBCK_HXX //autogen
#include <calbck.hxx>
#endif
class SwFlyFrmFmt;
class International;
//Verbindung (Textfluss) zwischen zwei FlyFrms
class SwFmtChain: public SfxPoolItem
{
SwClient aPrev, //Vorgaenger (SwFlyFrmFmt), wenn es diesen gibt.
aNext; //Nachfolger (SwFlyFrmFmt), wenn es diesen gibt.
public:
SwFmtChain() : SfxPoolItem( RES_CHAIN ) {}
SwFmtChain( const SwFmtChain &rCpy );
inline SwFmtChain &operator=( const SwFmtChain& );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
void SetPrev( SwFlyFrmFmt *pFmt );
void SetNext( SwFlyFrmFmt *pFmt );
};
SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy )
{
SetPrev( rCpy.GetPrev() );
SetNext( rCpy.GetNext() );
return *this;
}
inline const SwFmtChain &SwAttrSet::GetChain(BOOL bInP) const
{ return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
inline const SwFmtChain &SwFmt::GetChain(BOOL bInP) const
{ return aSet.GetChain(bInP); }
#endif
+108
View File
@@ -0,0 +1,108 @@
/*************************************************************************
*
* $RCSfile: fmtcntnt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTCNTNT_HXX
#define _FMTCNTNT_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class SwNodeIndex;
class SwStartNode;
//Cntnt, Inhalt des Frame (Header, Footer, Fly) ----
class SwFmtCntnt: public SfxPoolItem
{
SwNodeIndex *pStartNode;
SwFmtCntnt &operator=( const SwFmtCntnt & ); //Kopieren verboten
public:
// SwFmtCntnt( const SwNodeIndex *pStartNodeIdx = 0 );
SwFmtCntnt( const SwStartNode* pStartNode = 0 );
SwFmtCntnt( const SwFmtCntnt &rCpy );
~SwFmtCntnt();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
const SwNodeIndex *GetCntntIdx() const { return pStartNode; }
void SetNewCntntIdx( const SwNodeIndex *pIdx );
};
inline const SwFmtCntnt &SwAttrSet::GetCntnt(BOOL bInP) const
{ return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
inline const SwFmtCntnt &SwFmt::GetCntnt(BOOL bInP) const
{ return aSet.GetCntnt(bInP); }
#endif
+301
View File
@@ -0,0 +1,301 @@
/*************************************************************************
*
* $RCSfile: fmtcol.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTCOL_HXX
#define _FMTCOL_HXX
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
#ifndef _FORMAT_HXX
#include <format.hxx>
#endif
#ifndef _SWTYPES_HXX
#include <swtypes.hxx> // fuer MAXLEVEL
#endif
class SwDoc; // fuer friend
class SwFmtColl : public SwFmt
{
protected:
SwFmtColl( SwAttrPool& rPool, const sal_Char* pFmtName,
const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
USHORT nFmtWhich )
: SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich )
{ SetAuto( FALSE ); }
SwFmtColl( SwAttrPool& rPool, const String &rFmtName,
const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
USHORT nFmtWhich )
: SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
{ SetAuto( FALSE ); }
private:
// erstmal wird nicht kopiert und nicht zugewiesen
SwFmtColl(const SwFmtColl & );
const SwFmtColl &operator=(const SwFmtColl &);
};
class SwTxtFmtColl: public SwFmtColl
{
friend class SwDoc;
protected:
BYTE nOutlineLevel;
SwTxtFmtColl *pNextTxtFmtColl;
SwTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
SwTxtFmtColl* pDerFrom = 0,
USHORT nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, pFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
nOutlineLevel( NO_NUMBERING ),
pNextTxtFmtColl( this )
{}
SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
SwTxtFmtColl* pDerFrom = 0,
USHORT nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
nOutlineLevel( NO_NUMBERING ),
pNextTxtFmtColl( this )
{}
public:
// zum "abfischen" von UL-/LR-/FontHeight Aenderungen
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
TYPEINFO(); //Bereits in Basisklasse Client drin.
inline void SetOutlineLevel( BYTE );
inline BYTE GetOutlineLevel() const { return nOutlineLevel; }
inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext);
SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; }
BOOL IsAtDocNodeSet() const;
/*----------------- JP 09.08.94 17:36 -------------------
wird die Funktionalitaet von Zeichenvorlagen an Absatzvorlagen
ueberhaupt benoetigt ??
Wenn, ja dann muessen im TextNode und hier in der TxtCollection ein 2.
Attset fuer die Char-Attribute angelegt werden; damit die Vererbung
und der Zugriff auf die gesetzen Attribute richtig funktioniert!!
virtual BOOL SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
inline SwCharFmt* GetCharFmt() const;
inline BOOL IsCharFmtSet() const;
void SetCharFmt(SwCharFmt *);
void ResetCharFmt();
inline BOOL SwTxtFmtColl::IsCharFmtSet() const
{
return aCharDepend.GetRegisteredIn() ? TRUE : FALSE;
}
inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const
{
return (SwCharFmt*)aCharDepend.GetRegisteredIn();
}
--------------------------------------------------*/
};
typedef SwTxtFmtColl* SwTxtFmtCollPtr;
SV_DECL_PTRARR(SwTxtFmtColls,SwTxtFmtCollPtr,2,4)
class SwGrfFmtColl: public SwFmtColl
{
friend class SwDoc;
protected:
SwGrfFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
SwGrfFmtColl* pDerFrom = 0 )
: SwFmtColl( rPool, pFmtCollName, aGrfFmtCollSetRange,
pDerFrom, RES_GRFFMTCOLL )
{}
SwGrfFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
SwGrfFmtColl* pDerFrom = 0 )
: SwFmtColl( rPool, rFmtCollName, aGrfFmtCollSetRange,
pDerFrom, RES_GRFFMTCOLL )
{}
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
};
typedef SwGrfFmtColl* SwGrfFmtCollPtr;
SV_DECL_PTRARR(SwGrfFmtColls,SwGrfFmtCollPtr,2,4)
//FEATURE::CONDCOLL
// --------- Bedingte Vorlagen -------------------------------
enum Master_CollConditions
{
PARA_IN_LIST = 0x0001,
PARA_IN_OUTLINE = 0x0002,
PARA_IN_FRAME = 0x0004,
PARA_IN_TABLEHEAD = 0x0008,
PARA_IN_TABLEBODY = 0x0010,
PARA_IN_SECTION = 0x0020,
PARA_IN_FOOTENOTE = 0x0040,
PARA_IN_FOOTER = 0x0080,
PARA_IN_HEADER = 0x0100,
PARA_IN_ENDNOTE = 0x0200,
// ...
USRFLD_EXPRESSION = (int)0x8000
};
class SwCollCondition : public SwClient
{
ULONG nCondition;
union
{
ULONG nSubCondition;
String* pFldExpression;
} aSubCondition;
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
ULONG nSubCond = 0 );
SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
const String& rSubExp );
SwCollCondition( const SwCollCondition& rCpy );
virtual ~SwCollCondition();
int operator==( const SwCollCondition& rCmp ) const;
int operator!=( const SwCollCondition& rCmp ) const
{ return ! (*this == rCmp); }
ULONG GetCondition() const { return nCondition; }
ULONG GetSubCondition() const { return aSubCondition.nSubCondition; }
const String* GetFldExpression() const
{ return aSubCondition.pFldExpression; }
void SetCondition( ULONG nCond, ULONG nSubCond );
SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
};
typedef SwCollCondition* SwCollConditionPtr;
SV_DECL_PTRARR_DEL( SwFmtCollConditions, SwCollConditionPtr, 0, 5 );
class SwConditionTxtFmtColl : public SwTxtFmtColl
{
friend class SwDoc;
protected:
SwFmtCollConditions aCondColls;
SwConditionTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
SwTxtFmtColl* pDerFrom = 0 )
: SwTxtFmtColl( rPool, pFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL )
{}
SwConditionTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
SwTxtFmtColl* pDerFrom = 0 )
: SwTxtFmtColl( rPool, rFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL )
{}
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
virtual ~SwConditionTxtFmtColl();
// zum "abfischen" von Aenderungen
// virtual void Modify( SfxPoolItem*, SfxPoolItem* );
const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
void InsertCondition( const SwCollCondition& rCond );
BOOL RemoveCondition( const SwCollCondition& rCond );
void SetConditions( const SwFmtCollConditions& );
};
//FEATURE::CONDCOLL
// ------------- Inline Implementierungen --------------------
inline void SwTxtFmtColl::SetNextTxtFmtColl( SwTxtFmtColl& rNext )
{
pNextTxtFmtColl = &rNext;
}
inline void SwTxtFmtColl::SetOutlineLevel( BYTE nLevel )
{
ASSERT( nLevel < MAXLEVEL || nLevel == NO_NUMBERING ,
"SwTxtFmtColl: Level too low" );
nOutlineLevel = nLevel;
}
#endif
+102
View File
@@ -0,0 +1,102 @@
/*************************************************************************
*
* $RCSfile: fmteiro.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTEIRO_HXX
#define _FMTEIRO_HXX
#ifndef _SFXENUMITEM_HXX //autogen
#include <svtools/eitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class International;
class SwFmtEditInReadonly : public SfxBoolItem
{
public:
SwFmtEditInReadonly( USHORT nId = RES_EDIT_IN_READONLY,
BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT) const;
virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
};
inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(BOOL bInP) const
{ return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); }
inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(BOOL bInP) const
{ return aSet.GetEditInReadonly(bInP); }
#endif
+98
View File
@@ -0,0 +1,98 @@
/*************************************************************************
*
* $RCSfile: fmtflcnt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTFLCNT_HXX
#define _FMTFLCNT_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
class SwFrmFmt;
// ATT_FLYCNT *******************************************************
class SwFmtFlyCnt : public SfxPoolItem
{
friend class SwTxtFlyCnt;
SwTxtFlyCnt* pTxtAttr; // mein TextAttribut
SwFrmFmt* pFmt; // mein Fly/DrawFrame-Format
// geschuetzter CopyCtor
SwFmtFlyCnt& operator=(const SwFmtFlyCnt& rFlyCnt);
public:
SwFmtFlyCnt( SwFrmFmt *pFrmFmt );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
inline SwFrmFmt *GetFrmFmt() const { return pFmt; }
// fuer Undo: loesche "logisch" das FlyFrmFormat, wird sich im
// Undo-Object gemerkt.
inline void SetFlyFmt( SwFrmFmt* pNew = 0 ) { pFmt = pNew; }
const SwTxtFlyCnt *GetTxtFlyCnt() const { return pTxtAttr; }
SwTxtFlyCnt *GetTxtFlyCnt() { return pTxtAttr; }
};
#endif
+114
View File
@@ -0,0 +1,114 @@
/*************************************************************************
*
* $RCSfile: fmtfld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTFLD_HXX
#define _FMTFLD_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _CALBCK_HXX //autogen
#include <calbck.hxx>
#endif
class SwField;
// ATT_FLD ***********************************
class SwFmtFld : public SfxPoolItem, public SwClient
{
friend class SwTxtFld;
friend void _InitCore();
SwField *pField;
SwTxtFld* pTxtAttr; // mein TextAttribut
SwFmtFld(); // das default-Attibut
// geschuetzter CopyCtor
SwFmtFld& operator=(const SwFmtFld& rFld);
public:
TYPEINFO();
SwFmtFld( const SwField &rFld );
SwFmtFld( const SwFmtFld& rAttr );
~SwFmtFld();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
const SwField *GetFld() const { return pField; }
SwField *GetFld() { return pField; }
const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
SwTxtFld *GetTxtFld() { return pTxtAttr; }
BOOL IsFldInDoc() const;
BOOL IsProtect() const;
};
#endif
+115
View File
@@ -0,0 +1,115 @@
/*************************************************************************
*
* $RCSfile: fmtfordr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTFORDR_HXX
#define _FMTFORDR_HXX
#ifndef _SFXENUMITEM_HXX //autogen
#include <svtools/eitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
//Die FillOrder ---------------------------------
enum SwFillOrder
{
SW_FILL_ORDER_BEGIN,
ATT_TOP_DOWN = SW_FILL_ORDER_BEGIN,
ATT_BOTTOM_UP,
ATT_LEFT_TO_RIGHT,
ATT_RIGHT_TO_LEFT,
SW_FILL_ORDER_END
};
class SwFmtFillOrder: public SfxEnumItem
{
public:
SwFmtFillOrder( SwFillOrder = ATT_TOP_DOWN );
inline SwFmtFillOrder &operator=( const SwFmtFillOrder &rCpy );
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetValueCount() const;
const SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
void SetFillOrder( const SwFillOrder eNew ) { SetValue( USHORT(eNew) ); }
};
inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
{
SetValue( rCpy.GetValue() );
return *this;
}
inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(BOOL bInP) const
{ return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
inline const SwFmtFillOrder &SwFmt::GetFillOrder(BOOL bInP) const
{ return aSet.GetFillOrder(bInP); }
#endif
+166
View File
@@ -0,0 +1,166 @@
/*************************************************************************
*
* $RCSfile: fmtfsize.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTFSIZE_HXX
#define _FMTFSIZE_HXX
#ifndef _GEN_HXX //autogen
#include <tools/gen.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _SWTYPES_HXX //autogen
#include <swtypes.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class International;
//Die Framesize ---------------------------------
enum SwFrmSize
{
ATT_VAR_SIZE, //Frm ist in der Var-Richtung variabel
ATT_FIX_SIZE, //Frm ist in der Var-Richtung unbeweglich
ATT_MIN_SIZE //Der Wert in der Var-Richtung beschreibt eine
//Minimalgroesse, die nicht unter- wohl aber
//ueberschritten werden kann.
};
class SwFmtFrmSize: public SfxPoolItem
{
Size aSize;
SwFrmSize eFrmSize;
BYTE nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
BYTE nHeightPercent; //angegeben sein.
//Fuer Rahmen koennen Hoehe und/oder Breite
//in Prozent angegeben sein. Wenn nur eine
//der Angaben in Prozent angeben ist, kann
//durch den ausgezeichneten Wert 0xFF in der
//anderen Prozentangabe bestimmt werden, das
//sich diese Richtung proportional zur anderen
//verhaelt. Basis fuer die Umrechnung sind fuer
//diesen Fall die Angaben in der Size.
//Die Prozentwerte beziehen sich immer auf die
//Umgebung in der das Objekt steht (PrtArea)
//Auf die Bildschirmbreite abzueglich Raender
//in der BrowseView wenn die Umgebung die Seite
//ist.
public:
SwFmtFrmSize( SwFrmSize eSize = ATT_VAR_SIZE,
SwTwips nWidth = 0, SwTwips nHeight = 0 );
SwFmtFrmSize& operator=( const SwFmtFrmSize& rCpy );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
virtual USHORT GetVersion( USHORT nFFVer ) const;
SwFrmSize GetSizeType() const { return eFrmSize; }
void SetSizeType( SwFrmSize eSize ) { eFrmSize = eSize; }
const Size& GetSize() const { return aSize; }
void SetSize( const Size &rNew ) { aSize = rNew; }
SwTwips GetHeight() const { return aSize.Height(); }
SwTwips GetWidth() const { return aSize.Width(); }
void SetHeight( const SwTwips nNew ) { aSize.Height() = nNew; }
void SetWidth ( const SwTwips nNew ) { aSize.Width() = nNew; }
BYTE GetHeightPercent() const{ return nHeightPercent; }
BYTE GetWidthPercent() const { return nWidthPercent; }
void SetHeightPercent( BYTE n ) { nHeightPercent = n; }
void SetWidthPercent ( BYTE n ) { nWidthPercent = n; }
// Umrechnung der Groesse zwischen SW31/SW40
Size GetSizeConvertedToSw31( const SvxLRSpaceItem *pLRSpace,
const SvxULSpaceItem *pULSpace ) const;
Size GetSizeConvertedFromSw31( const SvxLRSpaceItem *pLRSpace,
const SvxULSpaceItem *pULSpace ) const;
virtual BOOL importXML( const NAMESPACE_RTL(OUString)& rValue,USHORT,
const SvXMLUnitConverter& rUnitConv );
virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT,
const SvXMLUnitConverter& rUnitConv ) const;
};
inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(BOOL bInP) const
{ return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); }
inline const SwFmtFrmSize &SwFmt::GetFrmSize(BOOL bInP) const
{ return aSet.GetFrmSize(bInP); }
#endif
+121
View File
@@ -0,0 +1,121 @@
/*************************************************************************
*
* $RCSfile: fmtftn.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTFTN_HXX
#define _FMTFTN_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
class SwDoc;
// ATT_FTN **********************************************************
class SwFmtFtn: public SfxPoolItem
{
friend class SwTxtFtn;
SwTxtFtn* pTxtAttr; //mein TextAttribut
String aNumber; //Benutzerdefinierte 'Nummer'
USHORT nNumber; //Automatische Nummerierung
BOOL bEndNote; //Ist es eine Endnote?
// geschuetzter CopyCtor
SwFmtFtn& operator=(const SwFmtFtn& rFtn);
SwFmtFtn( const SwFmtFtn& );
public:
SwFmtFtn( BOOL bEndNote = FALSE );
~SwFmtFtn();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
const String &GetNumStr() const { return aNumber; }
const USHORT &GetNumber() const { return nNumber; }
BOOL IsEndNote() const { return bEndNote;}
void SetNumStr( const String& rStr ) { aNumber = rStr; }
void SetNumber( USHORT nNo ) { nNumber = nNo; }
void SetEndNote( BOOL b );
void SetNumber( const SwFmtFtn& rFtn )
{ nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
const SwTxtFtn *GetTxtFtn() const { return pTxtAttr; }
SwTxtFtn *GetTxtFtn() { return pTxtAttr; }
void GetFtnText( String& rStr ) const;
// returnt den anzuzeigenden String der Fuss-/Endnote
String GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrs = FALSE ) const;
};
#endif
+183
View File
@@ -0,0 +1,183 @@
/*************************************************************************
*
* $RCSfile: fmtftntx.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTFTNTX_HXX
#define _FMTFTNTX_HXX
#ifndef _SFXENUMITEM_HXX //autogen
#include <svtools/eitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
#ifndef _NUMRULE_HXX
#include <numrule.hxx>
#endif
enum SwFtnEndPosEnum
{
FTNEND_ATPGORDOCEND, // at page or document end
FTNEND_ATTXTEND, // at end of the current text end
FTNEND_ATTXTEND_OWNNUMSEQ, // -""- and with own number sequence
FTNEND_ATTXTEND_OWNNUMANDFMT, // -""- and with onw numberformat
FTNEND_ATTXTEND_END
};
class SwFmtFtnEndAtTxtEnd : public SfxEnumItem
{
String sPrefix;
String sSuffix;
SwNumType aFmt;
USHORT nOffset;
protected:
SwFmtFtnEndAtTxtEnd( USHORT nWhich, SwFtnEndPosEnum ePos )
: SfxEnumItem( nWhich, ePos ), nOffset( 0 )
{}
SwFmtFtnEndAtTxtEnd( const SwFmtFtnEndAtTxtEnd& rAttr )
: SfxEnumItem( rAttr ), nOffset( rAttr.nOffset ), aFmt( rAttr.aFmt ),
sPrefix( rAttr.sPrefix ), sSuffix( rAttr.sSuffix )
{}
public:
virtual USHORT GetValueCount() const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer ) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
// will be used at time??
// void FillVariable( SbxVariable &rVar,
// SfxMapUnit eCoreMetric,
// SfxMapUnit eUserMetric ) const;
// virtual SfxArgumentError SetVariable( const SbxVariable &rVal,
// SfxMapUnit eCoreMetric,
// SfxMapUnit eUserMetric );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
inline BOOL IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
SwFmtFtnEndAtTxtEnd & operator=( const SwFmtFtnEndAtTxtEnd & rAttr );
SvxExtNumType GetNumType() const { return aFmt.eType; }
void SetNumType( SvxExtNumType eType ) { aFmt.eType = eType; }
const SwNumType& GetSwNumType() const { return aFmt; }
USHORT GetOffset() const { return nOffset; }
void SetOffset( USHORT nOff ) { nOffset = nOff; }
const String& GetPrefix() const { return sPrefix; }
void SetPrefix(const String& rSet) { sPrefix = rSet; }
const String& GetSuffix() const { return sSuffix; }
void SetSuffix(const String& rSet) { sSuffix = rSet; }
};
class SwFmtFtnAtTxtEnd : public SwFmtFtnEndAtTxtEnd
{
public:
SwFmtFtnAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND )
: SwFmtFtnEndAtTxtEnd( RES_FTN_AT_TXTEND, ePos )
{}
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
class SwFmtEndAtTxtEnd : public SwFmtFtnEndAtTxtEnd
{
public:
SwFmtEndAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND )
: SwFmtFtnEndAtTxtEnd( RES_END_AT_TXTEND, ePos )
{
SetNumType( SVX_NUM_ROMAN_LOWER );
}
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(BOOL bInP) const
{ return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); }
inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(BOOL bInP) const
{ return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); }
inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(BOOL bInP) const
{ return aSet.GetFtnAtTxtEnd(bInP); }
inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(BOOL bInP) const
{ return aSet.GetEndAtTxtEnd(bInP); }
#endif
+112
View File
@@ -0,0 +1,112 @@
/*************************************************************************
*
* $RCSfile: fmthbsh.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTHBSH_HXX
#define _FMTHBSH_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
// ATT_SOFTHYPH ******************************
// Attribut fuer benutzerdefinierte Trennstellen.
class SwFmtSoftHyph : public SfxPoolItem
{
public:
SwFmtSoftHyph();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
inline SwFmtSoftHyph& operator=(const SwFmtSoftHyph& rSH) {
return *this;
}
};
// ATT_HARDBLANK ******************************
// Attribut fuer geschuetzte Leerzeichen.
class SwFmtHardBlank : public SfxPoolItem
{
sal_Unicode cChar;
public:
SwFmtHardBlank( sal_Unicode cCh, BOOL bCheck = TRUE );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
inline sal_Unicode GetChar() const { return cChar; }
inline SwFmtHardBlank& operator=(const SwFmtHardBlank& rHB)
{ cChar = rHB.GetChar(); return *this; }
};
#endif
+160
View File
@@ -0,0 +1,160 @@
/*************************************************************************
*
* $RCSfile: fmthdft.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTHDFT_HXX
#define _FMTHDFT_HXX
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _CALBCK_HXX //autogen
#include <calbck.hxx>
#endif
class SwFrmFmt;
class International;
//Kopfzeile, fuer Seitenformate
//Client von FrmFmt das den Header beschreibt.
class SwFmtHeader: public SfxPoolItem, public SwClient
{
BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
public:
SwFmtHeader( BOOL bOn = FALSE );
SwFmtHeader( SwFrmFmt *pHeaderFmt );
SwFmtHeader( const SwFmtHeader &rCpy );
~SwFmtHeader();
SwFmtHeader& operator=( const SwFmtHeader &rCpy );
TYPEINFO();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)pRegisteredIn; }
BOOL IsActive() const { return bActive; }
void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
};
//Fusszeile, fuer Seitenformate
//Client von FrmFmt das den Footer beschreibt.
class SwFmtFooter: public SfxPoolItem, public SwClient
{
BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
public:
SwFmtFooter( BOOL bOn = FALSE );
SwFmtFooter( SwFrmFmt *pFooterFmt );
SwFmtFooter( const SwFmtFooter &rCpy );
~SwFmtFooter();
SwFmtFooter& operator=( const SwFmtFooter &rCpy );
TYPEINFO();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)pRegisteredIn; }
BOOL IsActive() const { return bActive; }
void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
};
inline const SwFmtHeader &SwAttrSet::GetHeader(BOOL bInP) const
{ return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
inline const SwFmtFooter &SwAttrSet::GetFooter(BOOL bInP) const
{ return (const SwFmtFooter&)Get( RES_FOOTER,bInP); }
inline const SwFmtHeader &SwFmt::GetHeader(BOOL bInP) const
{ return aSet.GetHeader(bInP); }
inline const SwFmtFooter &SwFmt::GetFooter(BOOL bInP) const
{ return aSet.GetFooter(bInP); }
#endif
+148
View File
@@ -0,0 +1,148 @@
/*************************************************************************
*
* $RCSfile: fmtinfmt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTINFMT_HXX
#define _FMTINFMT_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX
#include <svtools/poolitem.hxx>
#endif
class SvxMacro;
class SvxMacroTableDtor;
class International;
// ATT_INETFMT *********************************************
class SwFmtINetFmt: public SfxPoolItem
{
friend class SwTxtINetFmt;
String aURL; // die URL
String aTargetFrame; // in diesen Frame soll die URL
String aINetFmt;
String aVisitedFmt;
String aName; // Name des Links
SvxMacroTableDtor* pMacroTbl;
SwTxtINetFmt* pTxtAttr; // mein TextAttribut
USHORT nINetId;
USHORT nVisitedId;
public:
SwFmtINetFmt( const String& rURL, const String& rTarget );
SwFmtINetFmt( const SwFmtINetFmt& rAttr );
virtual ~SwFmtINetFmt();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 );
virtual USHORT GetVersion( USHORT nFFVer ) const;
const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; }
SwTxtINetFmt* GetTxtINetFmt() { return pTxtAttr; }
const String& GetValue() const { return aURL; }
void SetValue( const String& rS ) { aURL = rS; }
const String& GetName() const { return aName; }
void SetName( const String& rNm ) { aName = rNm; }
const String& GetTargetFrame() const { return aTargetFrame; }
void SetTargetFrame( const String& rNm ){ aTargetFrame = rNm; }
const String& GetINetFmt() const { return aINetFmt; }
void SetINetFmt( const String& rNm ) { aINetFmt = rNm; }
const String& GetVisitedFmt() const { return aVisitedFmt; }
void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
USHORT GetINetFmtId() const { return nINetId; }
void SetINetFmtId( USHORT nNew ) { nINetId = nNew; }
USHORT GetVisitedFmtId() const { return nVisitedId; }
void SetVisitedFmtId( USHORT nNew ) { nVisitedId = nNew; }
// setze eine neue oder loesche die akt. MakroTabelle
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
// setze / erfrage ein Makro
void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
const SvxMacro* GetMacro( USHORT nEvent ) const;
};
#endif
+113
View File
@@ -0,0 +1,113 @@
/*************************************************************************
*
* $RCSfile: fmtline.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef SW_FMTLINE_HXX
#define SW_FMTLINE_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class International;
class SwFmtLineNumber: public SfxPoolItem
{
ULONG nStartValue :24; //Startwert fuer den Absatz, 0 == kein Startwert
ULONG bCountLines :1; //Zeilen des Absatzes sollen mitgezaehlt werden.
public:
SwFmtLineNumber();
~SwFmtLineNumber();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
ULONG GetStartValue() const { return nStartValue; }
BOOL IsCount() const { return bCountLines != 0; }
void SetStartValue( ULONG nNew ) { nStartValue = nNew; }
void SetCountLines( BOOL b ) { bCountLines = b; }
};
inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(BOOL bInP) const
{ return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); }
inline const SwFmtLineNumber &SwFmt::GetLineNumber(BOOL bInP) const
{ return aSet.GetLineNumber(bInP); }
#endif
+104
View File
@@ -0,0 +1,104 @@
/*************************************************************************
*
* $RCSfile: fmtlsplt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTTSPLT_HXX
#define _FMTTSPLT_HXX
#ifndef _SFXENUMITEM_HXX //autogen
#include <svtools/eitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class International;
class SwFmtLayoutSplit : public SfxBoolItem
{
public:
SwFmtLayoutSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT) const;
virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual BOOL importXML( const NAMESPACE_RTL(OUString)& rValue,USHORT,
const SvXMLUnitConverter& rUnitConv );
virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT,
const SvXMLUnitConverter& rUnitConv ) const;
};
inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(BOOL bInP) const
{ return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); }
inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(BOOL bInP) const
{ return aSet.GetLayoutSplit(bInP); }
#endif
+206
View File
@@ -0,0 +1,206 @@
/*************************************************************************
*
* $RCSfile: fmtornt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTORNT_HXX
#define _FMTORNT_HXX
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _SWTYPES_HXX //autogen
#include <swtypes.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _ORNTENUM_HXX
#include <orntenum.hxx>
#endif
class International;
#define IVER_VERTORIENT_REL ((USHORT)0x0001)
class SwFmtVertOrient: public SfxPoolItem
{
SwTwips nYPos; //Enthaelt _immer_ die aktuelle RelPos.
SwVertOrient eOrient;
SwRelationOrient eRelation;
public:
TYPEINFO();
SwFmtVertOrient( SwTwips nY = 0, SwVertOrient eVert = VERT_NONE,
SwRelationOrient eRel = PRTAREA );
inline SwFmtVertOrient &operator=( const SwFmtVertOrient &rCpy );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
SwVertOrient GetVertOrient() const { return eOrient; }
SwRelationOrient GetRelationOrient() const { return eRelation; }
void SetVertOrient( SwVertOrient eNew ) { eOrient = eNew; }
void SetRelationOrient( SwRelationOrient eNew ) { eRelation = eNew; }
SwTwips GetPos() const { return nYPos; }
void SetPos( SwTwips nNew ) { nYPos = nNew; }
SwTwips GetPosConvertedToSw31( const SvxULSpaceItem *pULSpace ) const;
SwTwips GetPosConvertedFromSw31( const SvxULSpaceItem *pULSpace ) const;
virtual BOOL importXML( const NAMESPACE_RTL(OUString)& rValue,USHORT,
const SvXMLUnitConverter& rUnitConv );
virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT,
const SvXMLUnitConverter& rUnitConv ) const;
};
//SwFmtHoriOrient, wie und woran orientiert --
// sich der FlyFrm in der Hoizontalen ----------
#define IVER_HORIORIENT_TOGGLE ((USHORT)0x0001)
#define IVER_HORIORIENT_REL ((USHORT)0x0002)
class SwFmtHoriOrient: public SfxPoolItem
{
SwTwips nXPos; //Enthaelt _immer_ die aktuelle RelPos.
SwHoriOrient eOrient;
SwRelationOrient eRelation;
BOOL bPosToggle : 1; // auf geraden Seiten Position spiegeln
public:
TYPEINFO();
SwFmtHoriOrient( SwTwips nX = 0, SwHoriOrient eHori = HORI_NONE,
SwRelationOrient eRel = PRTAREA, BOOL bPos = FALSE );
inline SwFmtHoriOrient &operator=( const SwFmtHoriOrient &rCpy );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
SwHoriOrient GetHoriOrient() const { return eOrient; }
SwRelationOrient GetRelationOrient() const { return eRelation; }
void SetHoriOrient( SwHoriOrient eNew ) { eOrient = eNew; }
void SetRelationOrient( SwRelationOrient eNew ) { eRelation = eNew; }
SwTwips GetPos() const { return nXPos; }
void SetPos( SwTwips nNew ) { nXPos = nNew; }
SwTwips GetPosConvertedToSw31( const SvxLRSpaceItem *pLRSpace ) const;
SwTwips GetPosConvertedFromSw31( const SvxLRSpaceItem *pLRSpace ) const;
BOOL IsPosToggle() const { return bPosToggle; }
void SetPosToggle( BOOL bNew ) { bPosToggle = bNew; }
virtual BOOL importXML( const NAMESPACE_RTL(OUString)& rValue,USHORT,
const SvXMLUnitConverter& rUnitConv );
virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT,
const SvXMLUnitConverter& rUnitConv ) const;
};
inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy )
{
nYPos = rCpy.GetPos();
eOrient = rCpy.GetVertOrient();
eRelation = rCpy.GetRelationOrient();
return *this;
}
inline SwFmtHoriOrient &SwFmtHoriOrient::operator=( const SwFmtHoriOrient &rCpy )
{
nXPos = rCpy.GetPos();
eOrient = rCpy.GetHoriOrient();
eRelation = rCpy.GetRelationOrient();
bPosToggle = rCpy.IsPosToggle();
return *this;
}
inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(BOOL bInP) const
{ return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); }
inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(BOOL bInP) const
{ return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); }
inline const SwFmtVertOrient &SwFmt::GetVertOrient(BOOL bInP) const
{ return aSet.GetVertOrient(bInP); }
inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(BOOL bInP) const
{ return aSet.GetHoriOrient(bInP); }
#endif
+150
View File
@@ -0,0 +1,150 @@
/*************************************************************************
*
* $RCSfile: fmtpdsc.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTPDSC_HXX
#define _FMTPDSC_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
#ifndef _CALBCK_HXX //autogen
#include <calbck.hxx>
#endif
class SwPageDesc;
class SwHistory;
class SwPaM;
class International;
//Pagedescriptor
//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
#define IVER_FMTPAGEDESC_NOAUTO ((USHORT)0x0001)
#define IVER_FMTPAGEDESC_LONGPAGE ((USHORT)0x0002)
class SwFmtPageDesc : public SfxPoolItem, public SwClient
{
// diese "Doc"-Funktion ist friend, um nach dem kopieren das
// Auto-Flag setzen zu koennen !!
friend BOOL InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, USHORT,
SwHistory* );
USHORT nNumOffset; // Seitennummer Offset
USHORT nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
// Attribut gesetzt wurde (CntntNode/Format)
public:
SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
SwFmtPageDesc( const SwFmtPageDesc &rCpy );
SwFmtPageDesc &operator=( const SwFmtPageDesc &rCpy );
~SwFmtPageDesc();
TYPEINFO();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
USHORT GetNumOffset() const { return nNumOffset; }
void SetNumOffset( USHORT nNum ) { nNumOffset = nNum; }
// erfrage/setze, wo drin das Attribut verankert ist
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
// fuer den SW3-Reader:
USHORT GetDescNameIdx() const { return nDescNameIdx; }
void SetDescNameIdx( USHORT n ) { nDescNameIdx = n; }
//
// this item must be ignored while comparing item sets during XML export
virtual BOOL equalsXML( const SfxPoolItem& ) const;
};
inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(BOOL bInP) const
{ return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
inline const SwFmtPageDesc &SwFmt::GetPageDesc(BOOL bInP) const
{ return aSet.GetPageDesc(bInP); }
#endif
+102
View File
@@ -0,0 +1,102 @@
/*************************************************************************
*
* $RCSfile: fmtrfmrk.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTRFMRK_HXX
#define _FMTRFMRK_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
// ATT_REFMARK *******************************************************
class SwFmtRefMark : public SfxPoolItem
{
friend class SwTxtRefMark;
SwTxtRefMark* pTxtAttr; // mein TextAttribut
// geschuetzter CopyCtor
SwFmtRefMark& operator=(const SwFmtRefMark& rRefMark);
String aRefName;
public:
SwFmtRefMark( const String& rTxt );
SwFmtRefMark( const SwFmtRefMark& rRefMark );
~SwFmtRefMark( );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
const SwTxtRefMark *GetTxtRefMark() const { return pTxtAttr; }
SwTxtRefMark *GetTxtRefMark() { return pTxtAttr; }
inline String &GetRefName() { return aRefName; }
inline const String &GetRefName() const { return aRefName; }
};
#endif
+142
View File
@@ -0,0 +1,142 @@
/*************************************************************************
*
* $RCSfile: fmtsrnd.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTSRND_HXX
#define _FMTSRND_HXX
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
#ifndef _SFXENUMITEM_HXX //autogen
#include <svtools/eitem.hxx>
#endif
class International;
//SwFmtSurround, wie soll sich der ---------------
// Dokumentinhalt unter dem Rahmen verhalten ---
enum SwSurround {
SURROUND_BEGIN,
SURROUND_NONE = SURROUND_BEGIN,
SURROUND_THROUGHT,
SURROUND_PARALLEL,
SURROUND_IDEAL,
SURROUND_LEFT,
SURROUND_RIGHT,
SURROUND_END
};
class SwFmtSurround: public SfxEnumItem
{
BOOL bAnchorOnly :1;
BOOL bContour :1;
BOOL bOutside :1;
public:
SwFmtSurround( SwSurround eNew = SURROUND_PARALLEL );
SwFmtSurround( const SwFmtSurround & );
inline SwFmtSurround &operator=( const SwFmtSurround &rCpy );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual USHORT GetValueCount() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
SwSurround GetSurround()const { return SwSurround( GetValue() ); }
BOOL IsAnchorOnly() const { return bAnchorOnly; }
BOOL IsContour() const { return bContour; }
BOOL IsOutside() const { return bOutside; }
void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( USHORT( eNew ) ); }
void SetAnchorOnly( BOOL bNew ) { bAnchorOnly = bNew; }
void SetContour( BOOL bNew ) { bContour = bNew; }
void SetOutside( BOOL bNew ) { bOutside = bNew; }
};
inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
{
bAnchorOnly = rCpy.IsAnchorOnly();
bContour = rCpy.IsContour();
bOutside = rCpy.IsOutside();
SfxEnumItem::SetValue( rCpy.GetValue() );
return *this;
}
inline const SwFmtSurround &SwAttrSet::GetSurround(BOOL bInP) const
{ return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
inline const SwFmtSurround &SwFmt::GetSurround(BOOL bInP) const
{ return aSet.GetSurround(bInP); }
#endif
+131
View File
@@ -0,0 +1,131 @@
/*************************************************************************
*
* $RCSfile: fmturl.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FMTURL_HXX
#define _FMTURL_HXX
#ifndef _SFXPOOLITEM_HXX //autogen
#include <svtools/poolitem.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _FORMAT_HXX //autogen
#include <format.hxx>
#endif
class ImageMap;
class International;
// URL, ServerMap und ClientMap
class SwFmtURL: public SfxPoolItem
{
String sTargetFrameName; // in diesen Frame soll die URL
String sURL; //Einfache URL
String sName; // Name des Anchors
ImageMap *pMap; //ClientSide Images
BOOL bIsServerMap; //mit der URL eine ServerSideImageMap
SwFmtURL& operator=( const SwFmtURL& );
public:
SwFmtURL();
SwFmtURL( const SwFmtURL& );
~SwFmtURL();
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
void SetURL( const String &rURL, BOOL bServerMap );
void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
const String &GetTargetFrameName()const { return sTargetFrameName; }
const String &GetURL() const { return sURL; }
BOOL IsServerMap() const { return bIsServerMap; }
const ImageMap *GetMap() const { return pMap; }
ImageMap *GetMap() { return pMap; }
const String& GetName() const { return sName; }
void SetName( const String& rNm ) { sName = rNm; }
};
inline const SwFmtURL &SwAttrSet::GetURL(BOOL bInP) const
{ return (const SwFmtURL&)Get( RES_URL,bInP); }
inline const SwFmtURL &SwFmt::GetURL(BOOL bInP) const
{ return aSet.GetURL(bInP); }
#endif
+371
View File
@@ -0,0 +1,371 @@
/*************************************************************************
*
* $RCSfile: format.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FORMAT_HXX
#define _FORMAT_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
#ifndef _ERRHDL_HXX
#include <errhdl.hxx> // fuer ASSERT
#endif
#ifndef _SWATRSET_HXX
#include <swatrset.hxx> // fuer SfxItemPool/-Set, Attr forward decl.
#endif
#ifndef _CALBCK_HXX
#include <calbck.hxx> // fuer SwModify
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
class SwDoc;
class SwFmt : public SwModify
{
friend class SwSwgReader;
friend class SwSwgWriter;
String aFmtName;
SwAttrSet aSet;
USHORT nWhichId;
USHORT nFmtId; // Format-ID fuer Lesen/Schreiben
USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte Formate
// (ist keine harte Attributierung !!)
USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
BOOL bWritten : 1; // TRUE: bereits geschrieben
BOOL bAutoFmt : 1; // FALSE: es handelt sich um eine Vorlage
// ist dflt immer auf TRUE !
BOOL bFmtInDTOR : 1; // TRUE: das Format wird geloscht. Damit man in
// der FmtChg-Message das erkennen kann!!!
BOOL bAutoUpdateFmt : 1; // TRUE: am Format werden die Attribute
// eines kompletten Absatzes gesetzt (UI-seitig!)
BOOL bLayerFmt : 1; // nur fuer SwFrmFmt ( LAYER_IMPL )
protected:
SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich );
SwFmt( SwAttrPool& rPool, const String &rFmtNm, const USHORT* pWhichRanges,
SwFmt *pDrvdFrm, USHORT nFmtWhich );
SwFmt( SwAttrPool& rPool, const String &rFmtNm, USHORT nWhich1,
USHORT nWhich2, SwFmt *pDrvdFrm, USHORT nFmtWhich );
SwFmt( const SwFmt& rFmt );
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
virtual ~SwFmt();
SwFmt &operator=(const SwFmt&);
// fuer die Abfrage der Writer-Funktionen
USHORT Which() const { return nWhichId; }
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
// erfrage vom Format Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
// kopiere Attribute; auch ueber Dokumentgrenzen hinweg
void CopyAttrs( const SwFmt&, BOOL bReplace=TRUE );
// loesche alle Attribute, die nicht in rFmt stehen
void DelDiffs( const SfxItemSet& rSet );
void DelDiffs( const SwFmt& rFmt ) { DelDiffs( rFmt.GetAttrSet() ); }
// Umhaengen des Formats (0 = Default)
BOOL SetDerivedFrom(SwFmt *pDerivedFrom = 0);
// Ist bInParents FALSE,
// wird nur in diesem Format nach dem Attribut gesucht.
inline const SfxPoolItem& GetAttr( USHORT nWhich,
BOOL bInParents = TRUE ) const;
inline SfxItemState GetItemState( USHORT nWhich, BOOL bSrchInParent = TRUE,
const SfxPoolItem **ppItem = 0 ) const;
BOOL SetAttr( const SfxPoolItem& );
BOOL SetAttr( const SfxItemSet& rSet );
// Nimmt den Hint mit nWhich aus dem Delta-Array
BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
// Nimmt alle Hints aus dem Delta-Array,
// liefert die Anzahl der geloeschten Hints
USHORT ResetAllAttr();
inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
inline BOOL IsDefault() const { return DerivedFrom() == 0; }
inline const String& GetName() const { return aFmtName; }
inline void SetName( const String& rNewName );
inline void SetName( const sal_Char* pNewName );
// zur Abfrage des Attribute Arrays
inline const SwAttrSet& GetAttrSet() const { return aSet; }
// Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer
// im Zugriff.
const SwDoc *GetDoc() const { return aSet.GetDoc(); }
SwDoc *GetDoc() { return aSet.GetDoc(); }
// erfragen und setzen der Poolvorlagen-Id's
USHORT GetPoolFmtId() const { return nPoolFmtId; }
void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
// erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
USHORT GetPoolHelpId() const { return nPoolHelpId; }
void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
// erfrage die Attribut-Beschreibung, returnt den reingereichten String
void GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const
{ aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); }
// Das Format-ID fuer Lesen/Schreiben:
USHORT GetFmtId() const { return nFmtId; }
void SetWritten() { bWritten = TRUE; }
void ResetWritten() { bWritten = FALSE; }
BOOL IsWritten() const { return bWritten; }
// Abfragen/Setzen vom AutoFmt-Flag
BOOL IsAuto() const { return bAutoFmt; }
void SetAuto( BOOL bNew = FALSE ) { bAutoFmt = bNew; }
// Abfragen/Setzen vom bAutoUpdateFmt-Flag
BOOL IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
void SetAutoUpdateFmt( BOOL bNew = TRUE ) { bAutoUpdateFmt = bNew; }
BOOL IsFmtInDTOR() const { return bFmtInDTOR; }
BOOL IsLayerFmt() const { return bLayerFmt; }
void SetLayerFmt( BOOL bNew ) { bLayerFmt = bNew; }
BOOL IsFrmFmt() const { return nWhichId == RES_FLYFRMFMT ||
nWhichId == RES_DRAWFRMFMT||
nWhichId == RES_FRMFMT; }
// GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
// den Parents gesucht werden soll. Wird nichts gefunden,
// wird das deflt. Attribut returnt.
// Charakter-Attribute - impl. steht im charatr.hxx
// AMA 12.10.94: Umstellung von SwFmt... auf Svx...
inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
// Frame-Attribute - impl. steht im frmatr.hxx,
// fuer LINUX, SINIX, HPUX auch in gcc_outl.cxx
#if ( defined GCC && defined C272 && \
( defined LINUX || defined SINIX || defined HPUX ))
const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
const SwFmtCol &GetCol( BOOL = TRUE ) const;
#endif
#if ( defined GCC && defined C272 && defined HPUX )
const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
const SvxBoxItem &GetBox( BOOL = TRUE ) const;
const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
const SwFmtURL &GetURL( BOOL = TRUE ) const;
#endif
#if !( defined GCC && defined C272 && \
( defined LINUX || defined SINIX || defined HPUX ))
inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
#endif
#if !( defined GCC && defined C272 && defined HPUX )
inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
#endif
// Grafik-Attribute - impl. steht im grfatr.hxx
inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
// Paragraph-Attribute - impl. steht im paratr.hxx
inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
// TabellenBox-Attribute - impl. steht im cellatr.hxx
inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
};
// --------------- Inline Implementierungen ------------------------
inline const SfxPoolItem& SwFmt::GetAttr( USHORT nWhich,
BOOL bInParents ) const
{
return aSet.Get( nWhich, bInParents );
}
inline void SwFmt::SetName( const String& rNewName )
{
ASSERT(!IsDefault(), "SetName: Defaultformat" );
aFmtName = rNewName;
}
inline void SwFmt::SetName( const sal_Char* pNewName )
{
ASSERT(!IsDefault(), "SetName: Defaultformat" );
aFmtName.AssignAscii( pNewName );
}
inline SfxItemState SwFmt::GetItemState( USHORT nWhich, BOOL bSrchInParent,
const SfxPoolItem **ppItem ) const
{
return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
}
#endif // _FORMAT_HXX
+136
View File
@@ -0,0 +1,136 @@
/*************************************************************************
*
* $RCSfile: frmatr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FRMATR_HXX
#define _FRMATR_HXX
#include "hintids.hxx" //die Ids der Attribute, vor frmitems damit die
#include "format.hxx" //fuer Implementierung der inlines
//------------------------ Inlines ---------------------------------
/******************************************************************************
* Implementierung der FrameAttribut Methoden vom SwAttrSet
******************************************************************************/
inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(BOOL bInP) const
{ return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); }
inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(BOOL bInP) const
{ return (const SvxLRSpaceItem&)Get( RES_LR_SPACE,bInP); }
inline const SvxULSpaceItem &SwAttrSet::GetULSpace(BOOL bInP) const
{ return (const SvxULSpaceItem&)Get( RES_UL_SPACE,bInP); }
inline const SvxPrintItem &SwAttrSet::GetPrint(BOOL bInP) const
{ return (const SvxPrintItem&)Get( RES_PRINT,bInP); }
inline const SvxOpaqueItem &SwAttrSet::GetOpaque(BOOL bInP) const
{ return (const SvxOpaqueItem&)Get( RES_OPAQUE,bInP); }
inline const SvxProtectItem &SwAttrSet::GetProtect(BOOL bInP) const
{ return (const SvxProtectItem&)Get( RES_PROTECT,bInP); }
inline const SvxBoxItem &SwAttrSet::GetBox(BOOL bInP) const
{ return (const SvxBoxItem&)Get( RES_BOX,bInP); }
inline const SvxFmtKeepItem &SwAttrSet::GetKeep(BOOL bInP) const
{ return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); }
inline const SvxBrushItem &SwAttrSet::GetBackground(BOOL bInP) const
{ return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); }
inline const SvxShadowItem &SwAttrSet::GetShadow(BOOL bInP) const
{ return (const SvxShadowItem&)Get( RES_SHADOW,bInP); }
inline const SvxFmtBreakItem &SwAttrSet::GetBreak(BOOL bInP) const
{ return (const SvxFmtBreakItem&)Get( RES_BREAK,bInP); }
inline const SvxMacroItem &SwAttrSet::GetMacro(BOOL bInP) const
{ return (const SvxMacroItem&)Get( RES_FRMMACRO,bInP); }
/******************************************************************************
* Implementierung der FrameAttribut Methoden vom SwFmt
******************************************************************************/
// impl. fuer LINUX, SINIX, HPUX auch in gcc_outl.cxx
#if !( defined GCC && defined C272 && \
( defined LINUX || defined SINIX || defined HPUX ))
#endif
#if !( defined GCC && defined C272 && defined HPUX )
inline const SvxPaperBinItem &SwFmt::GetPaperBin(BOOL bInP) const
{ return aSet.GetPaperBin(bInP); }
inline const SvxLRSpaceItem &SwFmt::GetLRSpace(BOOL bInP) const
{ return aSet.GetLRSpace(bInP); }
inline const SvxULSpaceItem &SwFmt::GetULSpace(BOOL bInP) const
{ return aSet.GetULSpace(bInP); }
inline const SvxPrintItem &SwFmt::GetPrint(BOOL bInP) const
{ return aSet.GetPrint(bInP); }
inline const SvxOpaqueItem &SwFmt::GetOpaque(BOOL bInP) const
{ return aSet.GetOpaque(bInP); }
inline const SvxProtectItem &SwFmt::GetProtect(BOOL bInP) const
{ return aSet.GetProtect(bInP); }
inline const SvxBoxItem &SwFmt::GetBox(BOOL bInP) const
{ return aSet.GetBox(bInP); }
inline const SvxFmtKeepItem &SwFmt::GetKeep(BOOL bInP) const
{ return aSet.GetKeep(bInP); }
inline const SvxBrushItem &SwFmt::GetBackground(BOOL bInP) const
{ return aSet.GetBackground(bInP); }
inline const SvxShadowItem &SwFmt::GetShadow(BOOL bInP) const
{ return aSet.GetShadow(bInP); }
inline const SvxFmtBreakItem &SwFmt::GetBreak(BOOL bInP) const
{ return aSet.GetBreak(bInP); }
inline const SvxMacroItem &SwFmt::GetMacro(BOOL bInP) const
{ return aSet.GetMacro(bInP); }
#endif
#endif //_FRMATR_HXX
+227
View File
@@ -0,0 +1,227 @@
/*************************************************************************
*
* $RCSfile: frmfmt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FRMFMT_HXX
#define _FRMFMT_HXX
#ifndef _FORMAT_HXX
#include <format.hxx>
#endif
class SwDrawContact;
class SwFlyFrm;
class Graphic;
class Point;
class ImageMap;
class IMapObject;
class SwRect;
class SwContact;
class SdrObject;
class SwFrmFmt: public SwFmt
{
friend class SwDoc;
friend class SwPageDesc; //darf den protected CTor rufen.
friend class SwSwgReader; // der SW2-Reader auch!
friend class Sw3IoImp; // der SW3-Reader auch!
protected:
SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
const USHORT* pWhichRange = 0 )
: SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
{}
SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
const USHORT* pWhichRange = 0 )
: SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
{}
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
//Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
virtual void DelFrms();
//Erzeugt die Ansichten
virtual void MakeFrms();
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
// returnt das IMapObject, das an dem Format (Fly), in der ImageMap
// an der Point Position definiert ist.
// rPoint - teste auf der DocPosition
// pFly - optionaler FlyFrame, falls der schon bekannt ist.
IMapObject* GetIMapObject( const Point& rPoint,
const SwFlyFrm *pFly = 0 ) const;
// Gibt die tatsaechlche Groesse des Frames zurueck bzw. ein leeres
// Rechteck, wenn kein Layout existiert. Wird pPoint angegeben, dann
// wird der am dichtesten liegende Frame gesucht.
SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
const Point* pPoint = 0,
const BOOL bCalcFrm = FALSE ) const;
// Sucht das SdrObject. Der SdrObjUserCall ist Client vom Format.
// Der UserCall kennt sein SdrObject.
SwContact *FindContactObj();
const SwContact *FindContactObj() const
{ return ((SwFrmFmt*)this)->FindContactObj(); }
// returns the SdrObject, that ist connected to the ContactObject.
// Only DrawFrmFmts are connected to the "real SdrObject". FlyFrmFmts
// are connected to a Master and all FlyFrms has the "real SdrObject".
// "Real SdrObject" has position and a Z-order.
SdrObject *FindSdrObject();
const SdrObject *FindSdrObject() const
{ return ((SwFrmFmt*)this)->FindSdrObject(); }
SdrObject *FindRealSdrObject();
const SdrObject *FindRealSdrObject() const
{ return ((SwFrmFmt*)this)->FindRealSdrObject(); }
BOOL IsLowerOf( const SwFrmFmt& rFmt ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwFrmFmt)
};
//Das FlyFrame-Format ------------------------------
class SwFlyFrmFmt: public SwFrmFmt
{
friend class SwDoc;
//Beide nicht vorhanden.
SwFlyFrmFmt( const SwFlyFrmFmt &rCpy );
SwFlyFrmFmt &operator=( const SwFlyFrmFmt &rCpy );
protected:
SwFlyFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FLYFRMFMT )
{}
SwFlyFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FLYFRMFMT )
{}
public:
TYPEINFO();
~SwFlyFrmFmt();
//Erzeugt die Ansichten
virtual void MakeFrms();
SwFlyFrm* GetFrm( const Point* pDocPos = 0,
const BOOL bCalcFrm = FALSE ) const;
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrmFmt)
};
//Das DrawFrame-Format -----------------------------
class SwDrawFrmFmt: public SwFrmFmt
{
friend class SwDoc;
//Beide nicht vorhanden.
SwDrawFrmFmt( const SwDrawFrmFmt &rCpy );
SwDrawFrmFmt &operator=( const SwDrawFrmFmt &rCpy );
protected:
SwDrawFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_DRAWFRMFMT )
{}
SwDrawFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_DRAWFRMFMT )
{}
public:
TYPEINFO();
~SwDrawFrmFmt();
//DrawObjecte werden aus den Arrays am Layout entfernt. Die DrawObjecte
//werden als geloescht gekennzeichnet.
virtual void DelFrms();
//Anmelden der DrawObjecte in den Arrays am Layout. Loeschkennzeichen
//werden zurueckgesetzt.
virtual void MakeFrms();
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
DECL_FIXEDMEMPOOL_NEWDEL(SwDrawFrmFmt);
};
#endif
+114
View File
@@ -0,0 +1,114 @@
/*************************************************************************
*
* $RCSfile: ftnidx.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FTNIDX_HXX
#define _FTNIDX_HXX
#define _SVSTDARR_USHORTS
#include <svtools/svstdarr.hxx>
class SwTxtFtn;
class SwNodeIndex;
class SwSectionNode;
// ueberall, wo der NodeIndex gebraucht wird, werden die hier fehlenden
// Headerfiles schon includes. Darum hier nur als define und nicht als
// inline Methode (spart Compile-Zeit)
#define _SwTxtFtn_GetIndex( pFIdx ) (pFIdx->GetTxtNode().GetIndex())
typedef SwTxtFtn* SwTxtFtnPtr;
SV_DECL_PTRARR_SORT( _SwFtnIdxs, SwTxtFtnPtr, 0, 10 )
class SwFtnIdxs : public _SwFtnIdxs
{
public:
SwFtnIdxs() {}
void UpdateFtn( SwNodeIndex& rStt ); // ab Pos. alle Updaten
void UpdateAllFtn(); // alle Fussnoten updaten
void UpdateFtnInSections();
SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, USHORT* pPos = 0 ) const;
};
class SwUpdFtnEndNtAtEnd
{
SvPtrarr aFtnSects, aEndSects;
SvUShorts aFtnNums, aEndNums;
public:
SwUpdFtnEndNtAtEnd() : aFtnSects( 0, 4 ), aEndSects( 0, 4 ),
aFtnNums( 0, 4 ), aEndNums( 0, 4 )
{}
static const SwSectionNode* FindSectNdWithEndAttr(
const SwTxtFtn& rTxtFtn );
USHORT GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
USHORT ChkNumber( const SwTxtFtn& rTxtFtn );
};
#endif // _FTNIDX_HXX
+146
View File
@@ -0,0 +1,146 @@
/*************************************************************************
*
* $RCSfile: ftninfo.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _FTNINFO_HXX
#define _FTNINFO_HXX
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#include "numrule.hxx"
class SwTxtFmtColl;
class SwPageDesc;
class SwEndNoteInfo : public SwClient
{
SwDepend aPageDescDep;
SwDepend aCharFmtDep, aAnchorCharFmtDep;
String sPrefix;
String sSuffix;
protected:
BOOL bEndNote;
public:
SwNumType aFmt;
USHORT nFtnOffset;
void ChgPageDesc( SwPageDesc *pDesc );
SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
void SetFtnTxtColl(SwTxtFmtColl& rColl);
SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // kann 0 sein
SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
void SetCharFmt( SwCharFmt* );
SwClient *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
void SetAnchorCharFmt( SwCharFmt* );
SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
SwEndNoteInfo & operator=(const SwEndNoteInfo&);
BOOL operator==( const SwEndNoteInfo &rInf ) const;
SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
SwEndNoteInfo(const SwEndNoteInfo&);
const String& GetPrefix() const { return sPrefix; }
const String& GetSuffix() const { return sSuffix; }
void SetPrefix(const String& rSet) { sPrefix = rSet; }
void SetSuffix(const String& rSet) { sSuffix = rSet; }
BOOL IsEndNoteInfo() const { return bEndNote; }
};
enum SwFtnPos
{
//Derzeit nur PAGE und CHAPTER. CHAPTER == Dokumentendenoten.
FTNPOS_PAGE = 1,
FTNPOS_CHAPTER = 8
};
enum SwFtnNum
{
FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
};
class SwFtnInfo: public SwEndNoteInfo
{
public:
String aQuoVadis;
String aErgoSum;
SwFtnPos ePos;
SwFtnNum eNum;
SwFtnInfo& operator=(const SwFtnInfo&);
BOOL operator==( const SwFtnInfo &rInf ) const;
SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
SwFtnInfo(const SwFtnInfo&);
};
#endif
+323
View File
@@ -0,0 +1,323 @@
/*************************************************************************
*
* $RCSfile: globals.hrc,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _GLOBALS_HRC
#define _GLOBALS_HRC
// Versions-Definition wie in solar.h und swtypes.hxx
//#define SW_FILEFORMAT_40 3580
#include "rcid.hrc"
// STRINGS -----------------------------------------------------------
#define STR_DLLNOTFOUND (RC_GLOBALS_BEGIN + 0)
#define STR_FMT_STD (RC_GLOBALS_BEGIN + 1)
#define STR_LOAD_GLOBAL_DOC (RC_GLOBALS_BEGIN + 2)
#define STR_SEPARATOR (RC_GLOBALS_BEGIN + 4)
#define STR_BASIC_IMPORT (RC_GLOBALS_BEGIN + 5)
#define STR_BASIC_BEGIN (RC_GLOBALS_BEGIN + 6)
#define STR_BASIC_END (RC_GLOBALS_BEGIN + 7)
#define STR_BASIC_REC_LIB (RC_GLOBALS_BEGIN + 8)
#define STR_TEMPLATE_WILDCARD (RC_GLOBALS_BEGIN + 9)
#define STR_DOC_STAT (RC_GLOBALS_BEGIN + 10)
#define STR_PAGE (RC_GLOBALS_BEGIN + 14)
//EventStrings
#define STR_EVENT_OBJECT_SELECT ( RC_GLOBALS_BEGIN + 17 )
#define STR_EVENT_START_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 18 )
#define STR_EVENT_END_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 19 )
#define STR_EVENT_MOUSEOVER_OBJECT ( RC_GLOBALS_BEGIN + 20 )
#define STR_EVENT_MOUSECLICK_OBJECT ( RC_GLOBALS_BEGIN + 21 )
#define STR_EVENT_MOUSEOUT_OBJECT ( RC_GLOBALS_BEGIN + 22 )
#define STR_EVENT_IMAGE_LOAD ( RC_GLOBALS_BEGIN + 23 )
#define STR_EVENT_IMAGE_ABORT ( RC_GLOBALS_BEGIN + 24 )
#define STR_EVENT_IMAGE_ERROR ( RC_GLOBALS_BEGIN + 25 )
#define STR_EVENT_FRM_KEYINPUT_A ( RC_GLOBALS_BEGIN + 26 )
#define STR_EVENT_FRM_KEYINPUT_NOA ( RC_GLOBALS_BEGIN + 27 )
#define STR_EVENT_FRM_RESIZE ( RC_GLOBALS_BEGIN + 28 )
#define STR_EVENT_FRM_MOVE ( RC_GLOBALS_BEGIN + 29 )
// Strings fuer Rahmenausrichtungen im Popup
#define STR_TOP_BASE (RC_GLOBALS_BEGIN + 30)
#define STR_BOTTOM_BASE (RC_GLOBALS_BEGIN + 31)
#define STR_CENTER_BASE (RC_GLOBALS_BEGIN + 32)
#define STR_TOP (RC_GLOBALS_BEGIN + 33)
#define STR_BOTTOM (RC_GLOBALS_BEGIN + 34)
#define STR_CENTER_HORI (RC_GLOBALS_BEGIN + 35)
#define STR_CENTER_VERT (RC_GLOBALS_BEGIN + 36)
#define STR_LOAD_HTML_DOC (RC_GLOBALS_BEGIN + 37)
#define STR_AUTH (RC_GLOBALS_BEGIN + 38)
#define STR_TBL (RC_GLOBALS_BEGIN + 39)
#define STR_TOO (RC_GLOBALS_BEGIN + 40)
#define STR_TOILL (RC_GLOBALS_BEGIN + 41)
// BITMAPS -----------------------------------------------------------
#define RES_TABL (RC_GLOBALS_BEGIN + 1)
#define RES_TABR (RC_GLOBALS_BEGIN + 2)
#define RES_TABD (RC_GLOBALS_BEGIN + 3)
#define RES_TABC (RC_GLOBALS_BEGIN + 4)
// DIALOGE -----------------------------------------------------------
#define DLG_LISTBOX (RC_GLOBALS_BEGIN + 1)
#define DLG_THESAURUS (RC_GLOBALS_BEGIN + 2)
#define DLG_SPECIAL (RC_GLOBALS_BEGIN + 3)
// QUERYBOX ---------------------------------------------------------
#define DLG_WRAP (RC_GLOBALS_BEGIN + 4)
#define DLG_BODY (RC_GLOBALS_BEGIN + 5)
#define DLG_PRT_FIELDNAME (RC_GLOBALS_BEGIN + 6)
// INFOBOX ------------------------------------------------------------
#define ERR_CLPBRD_READ (RC_GLOBALS_BEGIN + 1)
#define ERR_CLPBRD_WRITE (RC_GLOBALS_BEGIN + 2)
#define MSG_ERROR_PASSWD (RC_GLOBALS_BEGIN + 3)
// ACC ---------------------------------------------------------------
#define FN_CHAR_LEFT_SEL (RC_GLOBALS_BEGIN + 1) //
#define FN_CHAR_RIGHT_SEL (RC_GLOBALS_BEGIN + 2) //
#define FN_LINE_UP_SEL (RC_GLOBALS_BEGIN + 3) //
#define FN_LINE_DOWN_SEL (RC_GLOBALS_BEGIN + 4) //
#define FN_START_OF_LINE_SEL (RC_GLOBALS_BEGIN + 5) // StartOfLine
#define FN_END_OF_LINE_SEL (RC_GLOBALS_BEGIN + 6) // EndOfLine
#define FN_START_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 7) // StartOfDocument
#define FN_END_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 8) // EndOfDocument
#define FN_START_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 9) // StartOfNextPage ???
#define FN_END_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 10) // ???
#define FN_START_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 11) // StartOfPrevPage ???
#define FN_END_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 12) // ???
#define FN_START_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 13) // StartOfPage
#define FN_END_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 14) // EndOfPage
#define FN_START_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 15) // StartOfWindow
#define FN_END_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 16) // EndOfWindow
#define FN_START_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 17) // StartOfColumn
#define FN_END_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 18) // EndOfColumn
#define FN_START_OF_PARA_SEL (RC_GLOBALS_BEGIN + 19) // StartOfPara
#define FN_END_OF_PARA_SEL (RC_GLOBALS_BEGIN + 20) // EndOfPara
#define FN_NEXT_WORD_SEL (RC_GLOBALS_BEGIN + 21) // NextWord
#define FN_PREV_WORD_SEL (RC_GLOBALS_BEGIN + 22) // PrevWord
#define FN_NEXT_SENT_SEL (RC_GLOBALS_BEGIN + 23) // NextSentence
#define FN_PREV_SENT_SEL (RC_GLOBALS_BEGIN + 24) // PrevSentence
#define FN_START_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 25)
#define FN_END_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 26)
#define FN_START_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 27)
#define FN_END_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 28)
#define FN_PAGEUP_SEL (RC_GLOBALS_BEGIN + 29)
#define FN_PAGEDOWN_SEL (RC_GLOBALS_BEGIN + 30)
// TABPAGES -----------------------------------------------------------
#define TP_PAGE_STD (RC_GLOBALS_BEGIN + 1)
#define TP_PAGE_EXT (RC_GLOBALS_BEGIN + 2)
#define TP_PARA_STD (RC_GLOBALS_BEGIN + 3)
#define TP_PARA_EXT (RC_GLOBALS_BEGIN + 4)
#define TP_FRAME_STD (RC_GLOBALS_BEGIN + 5)
#define TP_FRAME_EXT (RC_GLOBALS_BEGIN + 6)
#define TP_CHAR_STD (RC_GLOBALS_BEGIN + 7)
#define TP_CHAR_EXT (RC_GLOBALS_BEGIN + 8)
#define TP_TABULATOR (RC_GLOBALS_BEGIN + 9)
#define TP_DROPCAPS (RC_GLOBALS_BEGIN + 10)
#define TP_BACKGROUND (RC_GLOBALS_BEGIN + 11)
#define TP_BORDER (RC_GLOBALS_BEGIN + 12)
#define TP_COLUMN (RC_GLOBALS_BEGIN + 13)
#define TP_DOC_STAT (RC_GLOBALS_BEGIN + 15)
#define TP_HEADER_PAGE (RC_GLOBALS_BEGIN + 16)
#define TP_FOOTER_PAGE (RC_GLOBALS_BEGIN + 17)
#define TP_FOOTNOTE_PAGE (RC_GLOBALS_BEGIN + 18)
#define TP_OPTGENERAL_PAGE (RC_GLOBALS_BEGIN + 19) //Sfx-Seiten
#define TP_OPTSAVE_PAGE (RC_GLOBALS_BEGIN + 20)
#define TP_OPTPATH_PAGE (RC_GLOBALS_BEGIN + 21)
#define TP_OPTSPELL_PAGE (RC_GLOBALS_BEGIN + 22)
//Sw-Seiten
#define SW_EDIT_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 23)
#define SW_BROWSER_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 24)
#define TP_OPTTEST_PAGE (RC_GLOBALS_BEGIN + 25)
#define TP_OPTPRINT_PAGE (RC_GLOBALS_BEGIN + 26)
#define TP_OPTCOLOR_PAGE (RC_GLOBALS_BEGIN + 27)
#define SW_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 28)
#define SW_OPTIONS_TDLG_ELEM (RC_GLOBALS_BEGIN + 29)
#define SW_OPTIONS_TDLG_PRINT (RC_GLOBALS_BEGIN + 30)
#define TP_FRM_STD (RC_GLOBALS_BEGIN + 31)
#define TP_OPTGRID_PAGE (RC_GLOBALS_BEGIN + 33)
#define TP_FORMAT_TABLE (RC_GLOBALS_BEGIN + 34)
#define TP_GRF_EXT (RC_GLOBALS_BEGIN + 35)
#define DLG_FRM_STD (RC_GLOBALS_BEGIN + 36)
#define DLG_FRM_GRF (RC_GLOBALS_BEGIN + 37)
#define DLG_FRM_OLE (RC_GLOBALS_BEGIN + 38)
#define RID_INPUT_TOOLBOX (RC_GLOBALS_BEGIN + 39)
#define TP_MACRO_ASSIGN (RC_GLOBALS_BEGIN + 40)
#define TP_FRM_URL (RC_GLOBALS_BEGIN + 42)
#define TP_CHAR_URL (RC_GLOBALS_BEGIN + 43)
#define TP_LAYOUT_OPT (RC_GLOBALS_BEGIN + 44)
#define TP_CONTENT_OPT (RC_GLOBALS_BEGIN + 45)
#define TP_HTML_OPT (RC_GLOBALS_BEGIN + 46)
#define TP_STD_FONT (RC_GLOBALS_BEGIN + 47)
#define TP_CONDCOLL (RC_GLOBALS_BEGIN + 48)
#define TP_FRM_WRAP (RC_GLOBALS_BEGIN + 49)
#define TP_FRM_ADD (RC_GLOBALS_BEGIN + 51)
#define TP_TABLE_TEXTFLOW (RC_GLOBALS_BEGIN + 52)
#define TP_AUTOFMT_BY_INPUT (RC_GLOBALS_BEGIN + 53)
#define TP_AUTOFMT_APPLY (RC_GLOBALS_BEGIN + 54)
#define TP_PARA_ALIGN (RC_GLOBALS_BEGIN + 55)
#define TP_OPTTABLE_PAGE (RC_GLOBALS_BEGIN + 56)
#define TP_NUMBER (RC_GLOBALS_BEGIN + 57)
#define DLG_NUM_BULLET (RC_GLOBALS_BEGIN + 58)
#define TP_PICK_SINGLE_NUM (RC_GLOBALS_BEGIN + 59)
#define TP_PICK_BULLET (RC_GLOBALS_BEGIN + 60)
#define TP_PICK_NUM (RC_GLOBALS_BEGIN + 61)
#define TP_PICK_BMP (RC_GLOBALS_BEGIN + 62)
#define TP_OPTSRCVIEW (RC_GLOBALS_BEGIN + 63)
#define TP_FLD_DB (RC_GLOBALS_BEGIN + 64)
#define TP_FLD_DOKINF (RC_GLOBALS_BEGIN + 65)
#define TP_FLD_VAR (RC_GLOBALS_BEGIN + 66)
#define TP_FLD_DOK (RC_GLOBALS_BEGIN + 67)
#define TP_FLD_FUNC (RC_GLOBALS_BEGIN + 68)
#define TP_FLD_REF (RC_GLOBALS_BEGIN + 69)
#define TP_OPTSHDWCRSR (RC_GLOBALS_BEGIN + 70)
#define TP_NUM_OPTIONS (RC_GLOBALS_BEGIN + 71)
#define TP_NUM_POSITION (RC_GLOBALS_BEGIN + 72)
#define TP_NUMPARA (RC_GLOBALS_BEGIN + 73)
#define TP_REDLINE_OPT (RC_GLOBALS_BEGIN + 74)
#define TP_LINENUMBERING (RC_GLOBALS_BEGIN + 75)
#define TP_OUTLINE_NUM (RC_GLOBALS_BEGIN + 76)
#define TP_OPTINSERT_PAGE (RC_GLOBALS_BEGIN + 77)
#define TP_OPTCAPTION_PAGE (RC_GLOBALS_BEGIN + 78)
#define DLG_SVXTEST_NUM_BULLET (RC_GLOBALS_BEGIN + 79)
#define TP_OPTLOAD_PAGE (RC_GLOBALS_BEGIN + 80)
#define TP_INSERT_TOX (RC_GLOBALS_BEGIN + 81)
#define TP_TOX_FORM_ENTRY (RC_GLOBALS_BEGIN + 82)
#define TP_TOX_FORM_STYLES (RC_GLOBALS_BEGIN + 83)
#define DLG_INSERT_TOX_TABDLG (RC_GLOBALS_BEGIN + 84)
#define TP_INSERT_SECTION (RC_GLOBALS_BEGIN + 85)
#define DLG_INSERT_SECTION (RC_GLOBALS_BEGIN + 86)
#define DLG_SECTION_PROPERTIES (RC_GLOBALS_BEGIN + 87)
#define DLG_RENAME_XNAMED (RC_GLOBALS_BEGIN + 88)
#define DLG_MULTI_TOX (RC_GLOBALS_BEGIN + 89)
#define TP_TOX_SELECT (RC_GLOBALS_BEGIN + 90)
#define TP_TOX_ENTRY (RC_GLOBALS_BEGIN + 91)
#define TP_TOX_STYLES (RC_GLOBALS_BEGIN + 92)
#define TP_VISITING_CARDS (RC_GLOBALS_BEGIN + 93)
#define DLG_ADD_IDX_STYLES (RC_GLOBALS_BEGIN + 94)
#define TP_PRIVATE_DATA (RC_GLOBALS_BEGIN + 95)
#define TP_BUSINESS_DATA (RC_GLOBALS_BEGIN + 96)
#define TP_SECTION_FTNENDNOTES (RC_GLOBALS_BEGIN + 97)
// Kontext-Menues (Format-Menue) --------------------------------------------
#define MN_OBJECTMENU_TEXT (RC_GLOBALS_BEGIN + 1)
#define MN_OBJECTMENU_LIST (RC_GLOBALS_BEGIN + 2)
#define MN_OBJECTMENU_TABLE (RC_GLOBALS_BEGIN + 3)
#define MN_OBJECTMENU_FRAME (RC_GLOBALS_BEGIN + 4)
#define MN_OBJECTMENU_GRAFIK (RC_GLOBALS_BEGIN + 5)
#define MN_OBJECTMENU_DRAW (RC_GLOBALS_BEGIN + 6)
#define MN_OBJECTMENU_DRWTXT (RC_GLOBALS_BEGIN + 7)
#define MN_OBJECTMENU_OLE (RC_GLOBALS_BEGIN + 8)
#define MN_OBJECTMENU_DRAWCONTROL (RC_GLOBALS_BEGIN + 9)
#define MN_OBJECTMENU_DRAWFORM (RC_GLOBALS_BEGIN + 10)
#if STR_DOC_STAT > RC_GLOBALS_END
#error Resource-Id Ueberlauf in #file, #line
#endif
#endif // _GLOBALS_HRC
+92
View File
@@ -0,0 +1,92 @@
/*************************************************************************
*
* $RCSfile: globdoc.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _SWGLOBDOCSH_HXX
#define _SWGLOBDOCSH_HXX
#ifndef SW_SWDLL_HXX
#include <swdll.hxx>
#endif
#include "docsh.hxx"
class SwGlobalDocShell : public SwDocShell
{
public:
SFX_DECL_OBJECTFACTORY_DLL(SwGlobalDocShell, SW_DLL());
TYPEINFO();
SwGlobalDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
~SwGlobalDocShell();
// Anforderung der pIo-Struktur fuer den Zugriff auf Substorages
// und Streams
virtual void FillRegInfo( SvEmbeddedRegistryInfo * );
virtual void FillClass( SvGlobalName * pClassName,
ULONG * pClipFormat,
String * pAppName,
String * pLongUserName,
String * pUserName,
long nVersion = SOFFICE_FILEFORMAT_NOW ) const;
};
#endif
+431
View File
@@ -0,0 +1,431 @@
/*************************************************************************
*
* $RCSfile: grfatr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _GRFATR_HXX
#define _GRFATR_HXX
#ifndef _HINTIDS_HXX
#include <hintids.hxx> // fuer die WhichIds
#endif
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef _SFXENUMITEM_HXX
#include <svtools/eitem.hxx>
#endif
#ifndef _SFXINTITEM_HXX
#include <svtools/intitem.hxx>
#endif
#ifndef _SVX_GRFCROP_HXX
#include <svx/grfcrop.hxx>
#endif
#ifndef _SWATRSET_HXX
#include <swatrset.hxx> // fuer inlines
#endif
#ifndef _FORMAT_HXX
#include <format.hxx> // fuer inlines
#endif
/******************************************************************************
* class SwMirrorGrf
******************************************************************************/
enum GRFMIRROR
{
RES_GRFMIRROR_BEGIN,
RES_DONT_MIRROR_GRF = RES_GRFMIRROR_BEGIN,
RES_MIRROR_GRF_VERT,
RES_MIRROR_GRF_HOR,
RES_MIRROR_GRF_BOTH,
RES_GRFMIRROR_END
};
class SwMirrorGrf : public SfxEnumItem
{
BOOL bGrfToggle; // auf geraden Seiten Grafiken spiegeln
public:
SwMirrorGrf( USHORT nMiro = RES_DONT_MIRROR_GRF )
: SfxEnumItem( RES_GRFATR_MIRRORGRF, nMiro ), bGrfToggle( sal_False )
{}
SwMirrorGrf::SwMirrorGrf( const SwMirrorGrf &rMirrorGrf )
: SfxEnumItem( RES_GRFATR_MIRRORGRF, rMirrorGrf.GetValue()),
bGrfToggle( rMirrorGrf.IsGrfToggle() )
{}
// pure virtual-Methoden von SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
// pure virtual-Methiden von SfxEnumItem
virtual USHORT GetValueCount() const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer ) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 );
inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf )
{
SfxEnumItem::SetValue( rMirrorGrf.GetValue() );
bGrfToggle = rMirrorGrf.IsGrfToggle();
return *this;
}
inline BOOL IsGrfToggle() const { return bGrfToggle; }
inline void SetGrfToggle( BOOL bNew ) { bGrfToggle = bNew; }
};
/******************************************************************************
* class SwAttrCropGrf
******************************************************************************/
class SwCropGrf : public SvxGrfCrop
{
public:
TYPEINFO();
SwCropGrf();
SwCropGrf( sal_Int32 nLeft, sal_Int32 nRight,
sal_Int32 nTop, sal_Int32 nBottom );
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual USHORT GetVersion( USHORT nFileVersion ) const;
};
class SwRotationGrf : public SfxUInt16Item
{
Size aUnrotatedSize;
public:
SwRotationGrf( sal_Int16 nVal = 0 )
: SfxUInt16Item( RES_GRFATR_ROTATION, nVal )
{}
SwRotationGrf( sal_Int16 nVal, const Size& rSz )
: SfxUInt16Item( RES_GRFATR_ROTATION, nVal ), aUnrotatedSize( rSz )
{}
// pure virtual-Methiden from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer ) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 );
void SetUnrotatedSize( const Size& rSz ) { aUnrotatedSize = rSz; }
const Size& GetUnrotatedSize() const { return aUnrotatedSize; }
};
class SwLuminanceGrf : public SfxInt16Item
{
public:
SwLuminanceGrf( sal_Int16 nVal = 0 )
: SfxInt16Item( RES_GRFATR_LUMINANCE, nVal )
{}
// pure virtual-Methiden from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
};
class SwContrastGrf : public SfxInt16Item
{
public:
SwContrastGrf( sal_Int16 nVal = 0 )
: SfxInt16Item( RES_GRFATR_CONTRAST, nVal )
{}
// pure virtual-Methiden from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
};
class SwChannelGrf : public SfxInt16Item
{
protected:
SwChannelGrf( sal_Int16 nVal, USHORT nWhich )
: SfxInt16Item( nWhich, nVal )
{}
public:
// pure virtual-Methiden from SfxInt16Item
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
};
class SwChannelRGrf : public SwChannelGrf
{
public:
SwChannelRGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELR )
{}
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
class SwChannelGGrf : public SwChannelGrf
{
public:
SwChannelGGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELG )
{}
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
class SwChannelBGrf : public SwChannelGrf
{
public:
SwChannelBGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELB )
{}
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
class SwGammaGrf : public SfxPoolItem
{
double nValue;
public:
TYPEINFO();
SwGammaGrf() : SfxPoolItem( RES_GRFATR_GAMMA ), nValue( 1.0 )
{}
SwGammaGrf( const double& rVal )
: SfxPoolItem( RES_GRFATR_GAMMA ), nValue( rVal )
{}
inline SwGammaGrf& operator=( const SwGammaGrf& rCopy )
{
SetValue( rCopy.GetValue() );
return *this;
}
// pure virtual-Methiden von SfxEnumItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxPoolItem* Create(SvStream &, USHORT nVer ) const;
virtual SvStream& Store(SvStream &, USHORT nIVer) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 );
const double& GetValue() const { return nValue; }
void SetValue( const double& rVal ) { nValue = rVal; }
};
class SwInvertGrf: public SfxBoolItem
{
public:
SwInvertGrf( sal_Bool bVal = sal_False )
: SfxBoolItem( RES_GRFATR_INVERT, bVal )
{}
// pure virtual-Methiden from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
};
class SwTransparencyGrf : public SfxByteItem
{
public:
SwTransparencyGrf( sal_Int8 nVal = 0 )
: SfxByteItem( RES_GRFATR_TRANSPARENCY, nVal )
{}
// pure virtual-Methiden from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
};
class SwDrawModeGrf : public SfxEnumItem
{
public:
SwDrawModeGrf( USHORT nMode = 0 )
: SfxEnumItem( RES_GRFATR_DRAWMODE, nMode )
{}
// pure virtual-Methoden von SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
// pure virtual-Methiden von SfxEnumItem
virtual USHORT GetValueCount() const;
virtual USHORT GetVersion( USHORT nFFVer ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const International* pIntl = 0 ) const;
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
BYTE nMemberId = 0 );
};
/******************************************************************************
* Implementierung der GrafikAttribut Methoden vom SwAttrSet
******************************************************************************/
inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(BOOL bInP) const
{ return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); }
inline const SwCropGrf &SwAttrSet::GetCropGrf(BOOL bInP) const
{ return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); }
inline const SwRotationGrf &SwAttrSet::GetRotationGrf(BOOL bInP) const
{ return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); }
inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(BOOL bInP) const
{ return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); }
inline const SwContrastGrf &SwAttrSet::GetContrastGrf(BOOL bInP) const
{ return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); }
inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(BOOL bInP) const
{ return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); }
inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(BOOL bInP) const
{ return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); }
inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(BOOL bInP) const
{ return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); }
inline const SwGammaGrf &SwAttrSet::GetGammaGrf(BOOL bInP) const
{ return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); }
inline const SwInvertGrf &SwAttrSet::GetInvertGrf(BOOL bInP) const
{ return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); }
inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(BOOL bInP) const
{ return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); }
inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(BOOL bInP) const
{ return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
/******************************************************************************
* Implementierung der GrafikAttribut Methoden vom SwFmt
******************************************************************************/
inline const SwMirrorGrf &SwFmt::GetMirrorGrf(BOOL bInP) const
{ return aSet.GetMirrorGrf(bInP); }
inline const SwCropGrf &SwFmt::GetCropGrf(BOOL bInP) const
{ return aSet.GetCropGrf(bInP); }
inline const SwRotationGrf &SwFmt::GetRotationGrf(BOOL bInP) const
{ return aSet.GetRotationGrf(bInP); }
inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(BOOL bInP) const
{ return aSet.GetLuminanceGrf( bInP); }
inline const SwContrastGrf &SwFmt::GetContrastGrf(BOOL bInP) const
{ return aSet.GetContrastGrf( bInP); }
inline const SwChannelRGrf &SwFmt::GetChannelRGrf(BOOL bInP) const
{ return aSet.GetChannelRGrf( bInP); }
inline const SwChannelGGrf &SwFmt::GetChannelGGrf(BOOL bInP) const
{ return aSet.GetChannelGGrf( bInP); }
inline const SwChannelBGrf &SwFmt::GetChannelBGrf(BOOL bInP) const
{ return aSet.GetChannelBGrf( bInP); }
inline const SwGammaGrf &SwFmt::GetGammaGrf(BOOL bInP) const
{ return aSet.GetGammaGrf( bInP); }
inline const SwInvertGrf &SwFmt::GetInvertGrf(BOOL bInP) const
{ return aSet.GetInvertGrf( bInP); }
inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(BOOL bInP) const
{ return aSet.GetTransparencyGrf( bInP); }
inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(BOOL bInP) const
{ return aSet.GetDrawModeGrf(bInP); }
#endif // _GRFATR_HXX
+876
View File
@@ -0,0 +1,876 @@
/*************************************************************************
*
* $RCSfile: helpid.h,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _SOLAR_HRC
#include <svtools/solar.hrc>
#endif
#define HID_BASE HID_APP_START
#define HID_BIB_BASE (HID_BASE + 1)
#define HID_DBSEL (HID_BASE + 2)
#define HID_DBEDIT (HID_BASE + 3)
#define HID_PRINT_OPTION (HID_BASE + 4)
#define HID_MERGE_PRINTMONITOR (HID_BASE + 5)
#define HID_FLD_INPUT (HID_BASE + 6)
#define HID_CONFIG_MISC (HID_BASE + 7)
#define HID_CONFIG_PATH (HID_BASE + 8)
#define HID_CONFIG_TB (HID_BASE + 9)
#define HID_PG_FOOTNOTE (HID_BASE + 10)
#define HID_FORMAT_GRAPHIC (HID_BASE + 11)
#define HID_FILTERSTATUS (HID_BASE + 12)
#define HID_DOCINFO_EDT (HID_BASE + 13)
#define HID_DBLOGON (HID_BASE + 14)
#define HID_MAC_ASSIGN (HID_BASE + 15)
#define HID_CONFIG_MN (HID_BASE + 16)
#define HID_PAPERSIZE (HID_BASE + 17)
#define HID_PASSWD (HID_BASE + 18)
#define HID_SPELLING_OPTIONS (HID_BASE + 19)
#define HID_HYPHENATE_OPTIONS (HID_BASE + 20)
#define HID_FORMAT_COLUMN (HID_BASE + 21)
#define HID_CONFIG_SAVE (HID_BASE + 22)
#define HID_NUM_NAMES (HID_BASE + 23)
#define HID_SYMBOL_SELECT (HID_BASE + 24)
#define HID_CONFIG_KY (HID_BASE + 25)
#define HID_LINKEDIT (HID_BASE + 26)
#define HID_GRAPHIC_PREVIEW (HID_BASE + 28)
#define HID_DICTIONARY (HID_BASE + 29)
#define HID_SET_STYLE (HID_BASE + 30)
#define HID_RIBBONBAR (HID_BASE + 31)
#define HID_STATUSLINE (HID_BASE + 32)
#define HID_DOCBAR (HID_BASE + 33)
#define HID_VRULER (HID_BASE + 34)
#define HID_MAKRO_WINDOW (HID_BASE + 35)
#define HID_ENVELOP_FORMAT (HID_BASE + 37)
#define HID_ENVELOP_PRINTER (HID_BASE + 38)
#define HID_HEADER_FOOTER_DLG (HID_BASE + 39)
#define HID_GRID_DLG (HID_BASE + 40)
#define HID_USER_ADDRESS_DLG (HID_BASE + 41)
#define HID_SELECT_FAX_DLG (HID_BASE + 42)
#define HID_LABEL_FORMAT (HID_BASE + 43)
#define HID_BRSORT (HID_BASE + 44)
#define HID_BRSEEK (HID_BASE + 45)
#define HID_BRCFG (HID_BASE + 46)
#define HID_FORMEDT_CONTENT (HID_BASE + 47)
#define HID_FORMEDT_USER (HID_BASE + 48)
#define HID_FORMEDT_INDEX (HID_BASE + 49)
#define HID_SCRL_PAGEUP (HID_BASE + 50)
#define HID_SCRL_PAGEDOWN (HID_BASE + 51)
#define HID_DRAW_WIN (HID_BASE + 52)
#define HID_EDIT_WIN (HID_BASE + 53)
#define HID_INSERT_CTRL (HID_BASE + 54) // TbxControl Einfuegen
#define HID_INSERT_OBJ_CTRL (HID_BASE + 55)
#define HID_INSERT_FIELD_CTRL (HID_BASE + 56)
#define HID_SOURCEVIEW (HID_BASE + 57)
#define HID_TBL_OPT_CTRL (HID_BASE + 58)
#define HID_AUTOFORMAT_CLB (HID_BASE + 59)
#define HID_SCRL_NAVI (HID_BASE + 60)
#define HID_NAVI_DRAG_HYP (HID_BASE + 61)
#define HID_NAVI_DRAG_LINK (HID_BASE + 62)
#define HID_NAVI_DRAG_COPY (HID_BASE + 63)
#define HID_NAVI_OUTLINES (HID_BASE + 64)
#define HID_AUTOFORMAT_EXEC (HID_BASE + 65)
#define HID_AUTOFORMAT_CLOSE (HID_BASE + 66)
#define HID_PAGEPREVIEW (HID_BASE + 67)
#define HID_SOURCE_EDITWIN (HID_BASE + 68)
// Dialog Help-IDs **********************************************************
#define HID_CONVERT_FROM (HID_BASE + 200)
#define HID_CONVERT_TO (HID_BASE + 201)
#define HID_EDIT_POSTIT (HID_BASE + 202)
#define HID_INSERT_CHART (HID_BASE + 203)
#define HID_PAGE_PREVIEW (HID_BASE + 204)
#define HID_INSERT_HYPERLINK (HID_BASE + 205)
#define HID_NAVIGATOR_TREELIST (HID_BASE + 206)
#define HID_DLG_CAPTION (HID_BASE + 207)
#define HID_DLG_GLOSS_DECIDE (HID_BASE + 208)
#define HID_NAVIGATOR_TOOLBOX (HID_BASE + 209)
#define HID_NAVIGATOR_LISTBOX (HID_BASE + 210)
#define HID_NUM_BULLET_DLG (HID_BASE + 211)
#define HID_VS_SINGLENUM (HID_BASE + 212)
#define HID_VS_NUM (HID_BASE + 213)
#define HID_VS_BULLET (HID_BASE + 214)
#define HID_VS_NUMBMP (HID_BASE + 215)
#define HID_VS_RULER (HID_BASE + 216)
#define HID_RULER_DIALOG (HID_BASE + 217)
#define HID_INSERT_ABSTRACT (HID_BASE + 218)
#define HID_NAVI_TBX1 (HID_BASE + 219)
#define HID_NAVI_TBX2 (HID_BASE + 220)
#define HID_NAVI_TBX3 (HID_BASE + 221)
#define HID_NAVI_TBX4 (HID_BASE + 222)
#define HID_NAVI_TBX5 (HID_BASE + 223)
#define HID_NAVI_TBX6 (HID_BASE + 224)
#define HID_NAVI_TBX7 (HID_BASE + 225)
#define HID_NAVI_TBX8 (HID_BASE + 226)
#define HID_NAVI_TBX9 (HID_BASE + 227)
#define HID_NAVI_TBX10 (HID_BASE + 228)
#define HID_NAVI_TBX11 (HID_BASE + 229)
#define HID_NAVI_TBX12 (HID_BASE + 230)
#define HID_NAVI_TBX13 (HID_BASE + 231)
#define HID_NAVI_TBX14 (HID_BASE + 232)
#define HID_NAVI_TBX15 (HID_BASE + 233)
#define HID_NAVI_VS (HID_BASE + 234)
#define HID_NUM_FORMAT_BTN (HID_BASE + 235)
#define HID_PPREV_ZOOM (HID_BASE + 236)
#define HID_NAVI_TBX16 (HID_BASE + 237)
#define HID_LTEMPL_TEXT (HID_BASE + 238)
#define HID_LTEMPL_FRAME (HID_BASE + 239)
#define HID_LTEMPL_PAGE (HID_BASE + 240)
#define HID_LTEMPL_OVERRIDE (HID_BASE + 241)
#define HID_LTEMPL_TEMPLATES (HID_BASE + 242)
#define HID_NAVI_TBX17 (HID_BASE + 243)
#define HID_NAVI_TBX18 (HID_BASE + 244)
#define HID_NAVI_TBX19 (HID_BASE + 245)
#define HID_NAVI_TBX20 (HID_BASE + 246)
#define HID_NAVI_TBX21 (HID_BASE + 247)
#define HID_NAVI_TBX22 (HID_BASE + 248)
#define HID_NAVI_TBX23 (HID_BASE + 249)
#define HID_NAVI_TBX24 (HID_BASE + 250)
#define HID_NAVIGATOR_GLOBAL_TOOLBOX (HID_BASE + 251)
#define HID_NAVIGATOR_GLOB_TREELIST (HID_BASE + 252)
#define HID_GLOS_GROUP_TREE (HID_BASE + 253)
#define HID_GLBLTREE_UPDATE (HID_BASE + 254)
#define HID_GLBLTREE_INSERT (HID_BASE + 255)
#define HID_GLBLTREE_EDIT (HID_BASE + 256)
#define HID_GLBLTREE_DEL (HID_BASE + 257)
#define HID_GLBLTREE_INS_IDX (HID_BASE + 258)
#define HID_GLBLTREE_INS_CNTIDX (HID_BASE + 259)
#define HID_GLBLTREE_INS_USRIDX (HID_BASE + 260)
#define HID_GLBLTREE_INS_FILE (HID_BASE + 261)
#define HID_GLBLTREE_INS_NEW_FILE (HID_BASE + 262)
#define HID_GLBLTREE_INS_TEXT (HID_BASE + 263)
#define HID_GLBLTREE_UPD_SEL (HID_BASE + 264)
#define HID_GLBLTREE_UPD_IDX (HID_BASE + 265)
#define HID_GLBLTREE_UPD_LINK (HID_BASE + 266)
#define HID_GLBLTREEUPD_ALL (HID_BASE + 267)
#define HID_NUM_OUTL_NAMED_NUMS (HID_BASE + 268)
#define HID_NUM_OUTL_NUM_SAVEAS (HID_BASE + 269)
#define HID_NUM_NAMED_NUMS (HID_BASE + 270)
#define HID_NUM_NUM_SAVEAS (HID_BASE + 271)
#define HID_NUM_STD_NUMBER (HID_BASE + 272)
#define HID_NUM_DEL_NUMBER (HID_BASE + 273)
#define HID_NUM_STD_BULLET (HID_BASE + 274)
#define HID_NUM_DEL_BULLET (HID_BASE + 275)
#define HID_NAVI_CONTENT (HID_BASE + 276)
#define HID_NAVI_GLOBAL (HID_BASE + 277)
#define HID_LTEMPL_NUMBERING (HID_BASE + 278)
#define HID_FLDVAR_APPLY (HID_BASE + 279)
#define HID_FLDVAR_DELETE (HID_BASE + 280)
#define HID_FLDEDT_ADDRESS (HID_BASE + 281)
#define HID_SORT_ACTION (HID_BASE + 282)
#define HID_SORT_AUTHOR (HID_BASE + 283)
#define HID_SORT_DATE (HID_BASE + 284)
#define HID_SORT_COMMENT (HID_BASE + 285)
#define HID_SW_SORT_POSITION (HID_BASE + 286)
#define HID_SYNC_BTN (HID_BASE + 287)
#define HID_EDIT_COMMENT (HID_BASE + 288)
#define HID_SEL_TEMPLATE (HID_BASE + 289)
#define HID_DLG_SEQUENCE_OPTION (HID_BASE + 290)
#define HID_DLG_FLDEDT_NEXT (HID_BASE + 291)
#define HID_DLG_FLDEDT_PREV (HID_BASE + 292)
#define HID_DLG_FLDEDT_ADDRESS (HID_BASE + 293)
#define HID_DLG_PRV_PRT_OPTIONS (HID_BASE + 294)
#define HID_FILEDLG_CHARDLG (HID_BASE + 295)
#define HID_FILEDLG_LOADTEMPLATE (HID_BASE + 296)
#define HID_FILEDLG_ROMENU (HID_BASE + 297)
#define HID_FILEDLG_MAILMRGE1 (HID_BASE + 298)
#define HID_FILEDLG_MAILMRGE2 (HID_BASE + 299)
#define HID_FILEDLG_FRMPAGE (HID_BASE + 300)
#define HID_FILEDLG_SRCVIEW (HID_BASE + 301)
#define HID_FILEDLG_WIZDOKU (HID_BASE + 302)
#define HID_PREVIEW_ZOOM (HID_BASE + 303)
#define HID_REDLINE_AUTOFMT_ACCEPT (HID_BASE + 304)
#define HID_MULTI_TOX_DLG (HID_BASE + 305)
#define HID_ASCII_FILTER (HID_BASE + 306)
// TabPage Help-IDs *********************************************************
#define HID_DROPCAPS (HID_BASE + 400)
#define HID_FRM_EXT (HID_BASE + 401)
#define HID_FRM_STD (HID_BASE + 402)
#define HID_GRF_EXT (HID_BASE + 403)
#define HID_COLUMN (HID_BASE + 404)
#define HID_DOC_STAT (HID_BASE + 405)
#define HID_MACROASSIGN (HID_BASE + 406)
#define HID_FOOTNOTE_PAGE (HID_BASE + 407)
#define HID_OPTDOCDISP_PAGE (HID_BASE + 408)
#define HID_OPTGRID_PAGE (HID_BASE + 409)
#define HID_OPTTEST_PAGE (HID_BASE + 410)
#define HID_OPTPRINT_PAGE (HID_BASE + 411)
#define HID_FORMAT_TABLE (HID_BASE + 412)
#define HID_TABLE_COLUMN (HID_BASE + 413)
#define HID_LAB_LAB (HID_BASE + 414)
#define HID_LAB_PRT (HID_BASE + 415)
#define HID_ENV_PRT (HID_BASE + 416)
#define HID_LAB_FMT (HID_BASE + 417)
#define HID_ENV_ENV (HID_BASE + 418)
#define HID_ENV_FMT (HID_BASE + 419)
#define HID_FRM_URL (HID_BASE + 421)
#define HID_CHAR_URL (HID_BASE + 422)
#define HID_CONTENT_OPT (HID_BASE + 423)
#define HID_LAYOUT_OPT (HID_BASE + 424)
#define HID_STD_FONT (HID_BASE + 425)
#define HID_COND_COLL (HID_BASE + 426)
#define HID_FRM_ADD (HID_BASE + 427)
#define HID_TABLE_TEXTFLOW (HID_BASE + 428)
#define HID_AUTOFMT_BY_INPUT (HID_BASE + 429)
#define HID_AUTOFMT_APPLY (HID_BASE + 430)
#define HID_OPTTABLE_PAGE (HID_BASE + 431)
#define HID_PICK_SINGLE_NUM (HID_BASE + 432)
#define HID_PICK_BULLET (HID_BASE + 433)
#define HID_PICK_NUM (HID_BASE + 434)
#define HID_PICK_BMP (HID_BASE + 435)
#define HID_OPTSRCVIEW (HID_BASE + 436)
#define HID_FLD_DB (HID_BASE + 437)
#define HID_FLD_DOKINF (HID_BASE + 438)
#define HID_FLD_VAR (HID_BASE + 439)
#define HID_FLD_DOK (HID_BASE + 440)
#define HID_FLD_FUNC (HID_BASE + 441)
#define HID_FLD_REF (HID_BASE + 442)
#define HID_OPTSHDWCRSR (HID_BASE + 443)
#define HID_NUM_OPTIONS (HID_BASE + 444)
#define HID_NUM_POSITION (HID_BASE + 445)
#define HID_NUMPARA (HID_BASE + 446)
#define HID_FOOTNOTE_OPTIONS (HID_BASE + 447)
#define HID_ENDNOTE_OPTIONS (HID_BASE + 448)
#define HID_REDLINE_OPT (HID_BASE + 449)
#define HID_LINENUMBERING (HID_BASE + 450)
#define HID_REDLINE_ACCEPT (HID_BASE + 451)
#define HID_EDIT_FLD_DB (HID_BASE + 452)
#define HID_EDIT_FLD_DOKINF (HID_BASE + 453)
#define HID_EDIT_FLD_VAR (HID_BASE + 454)
#define HID_EDIT_FLD_DOK (HID_BASE + 455)
#define HID_EDIT_FLD_FUNC (HID_BASE + 456)
#define HID_EDIT_FLD_REF (HID_BASE + 457)
#define HID_REDLINE_CTRL (HID_BASE + 458)
#define HID_TP_OUTLINE_NUM (HID_BASE + 459)
#define HID_OPTINSERT_PAGE (HID_BASE + 460)
#define HID_OPTCAPTION_PAGE (HID_BASE + 461)
#define HID_OPTLOAD_PAGE (HID_BASE + 462)
#define HID_INSERT_TOX_PAGE (HID_BASE + 463)
#define HID_TOX_FORM_ENTRY_PAGE (HID_BASE + 464)
#define HID_TOX_FORM_STYLES_PAGE (HID_BASE + 465)
#define HID_INSERT_TOX_TABDLG (HID_BASE + 466)
#define HID_INSERT_SECTION_PAGE (HID_BASE + 467)
#define HID_INSERT_SECTION_DLG (HID_BASE + 468)
#define HID_SECTION_PROPERTIES_DLG (HID_BASE + 469)
#define HID_RENAME_XNAMED (HID_BASE + 470)
#define HID_TP_TOX_SELECT (HID_BASE + 471)
#define HID_TP_TOX_ENTRY (HID_BASE + 472)
#define HID_TOX_STYLES_PAGE (HID_BASE + 473)
#define HID_TP_VISITING_CARDS (HID_BASE + 474)
#define HID_DLG_ADD_IDX_STYLES (HID_BASE + 475)
#define HID_ADD_STYLES_TLB (HID_BASE + 476)
#define HID_OLE_CHECKLB (HID_BASE + 477)
#define HID_DLG_CREATE_AUTH_ENTRY (HID_BASE + 478)
#define HID_TP_PRIVATE_DATA (HID_BASE + 479)
#define HID_TP_BUSINESS_DATA (HID_BASE + 480)
#define HID_SECTION_FTNENDNOTES_PAGE (HID_BASE + 481)
// AutoPilot Help-IDs *********************************************************
#define HID_LETTER_PAGE1 (HID_BASE + 501)
#define HID_LETTER_PAGE2 (HID_BASE + 502)
#define HID_LETTER_PAGE3 (HID_BASE + 503)
#define HID_LETTER_PAGE4 (HID_BASE + 504)
#define HID_LETTER_PAGE5 (HID_BASE + 505)
#define HID_LETTER_PAGE6 (HID_BASE + 506)
#define HID_LETTER_PAGE7 (HID_BASE + 507)
#define HID_LETTER_PAGE8 (HID_BASE + 508)
#define HID_LETTER_PAGE9 (HID_BASE + 509)
#define HID_FAX_PAGE1 (HID_BASE + 511)
#define HID_FAX_PAGE2 (HID_BASE + 512)
#define HID_FAX_PAGE3 (HID_BASE + 513)
#define HID_FAX_PAGE4 (HID_BASE + 514)
#define HID_FAX_PAGE5 (HID_BASE + 515)
#define HID_FAX_PAGE6 (HID_BASE + 516)
#define HID_FAX_PAGE7 (HID_BASE + 517)
#define HID_FAX_PAGE8 (HID_BASE + 518)
#define HID_MEMO_PAGE1 (HID_BASE + 521)
#define HID_MEMO_PAGE2 (HID_BASE + 522)
#define HID_MEMO_PAGE3 (HID_BASE + 523)
#define HID_MEMO_PAGE4 (HID_BASE + 524)
#define HID_MEMO_PAGE5 (HID_BASE + 525)
#define HID_AGENDA_PAGE1 (HID_BASE + 531)
#define HID_AGENDA_PAGE2 (HID_BASE + 532)
#define HID_AGENDA_PAGE3 (HID_BASE + 533)
#define HID_AGENDA_PAGE4 (HID_BASE + 534)
#define HID_AGENDA_PAGE5 (HID_BASE + 535)
#define HID_AGENDA_PAGE6 (HID_BASE + 536)
#define HID_AUTOPILOT_NEXT (HID_BASE + 537)
#define HID_AUTOPILOT_PREV (HID_BASE + 538)
#define HID_AUTOPILOT_OK (HID_BASE + 539)
// HelpIds fuers Menue *****************************************************
#define HID_MN_SUB_TBLROW (HID_BASE + 600)
#define HID_MN_SUB_TBLCOL (HID_BASE + 601)
#define HID_MN_SUB_AUTOFORMAT (HID_BASE + 602)
#define HID_MN_SUB_TOOLBAR (HID_BASE + 603)
#define HID_MN_SUB_FIELD (HID_BASE + 604)
#define HID_MN_SUB_GRAPHIC (HID_BASE + 605)
#define HID_MN_SUB_TEMPLATES (HID_BASE + 606)
#define HID_MN_SUB_ARRANGE (HID_BASE + 607)
#define HID_MN_SUB_SPELLING (HID_BASE + 608)
#define HID_MN_SUB_UPDATE (HID_BASE + 609)
#define HID_MN_SUB_MIRROR (HID_BASE + 610)
#define HID_MN_SUB_ALIGN (HID_BASE + 611)
#define HID_MN_SUB_OPTIONS (HID_BASE + 612)
#define HID_MN_CALC_PHD (HID_BASE + 613)
#define HID_MN_CALC_SQRT (HID_BASE + 614)
#define HID_MN_CALC_OR (HID_BASE + 615)
#define HID_MN_CALC_XOR (HID_BASE + 616)
#define HID_MN_CALC_AND (HID_BASE + 617)
#define HID_MN_CALC_NOT (HID_BASE + 618)
#define HID_MN_CALC_EQ (HID_BASE + 619)
#define HID_MN_CALC_NEQ (HID_BASE + 620)
#define HID_MN_CALC_LEQ (HID_BASE + 621)
#define HID_MN_CALC_GEQ (HID_BASE + 622)
#define HID_MN_CALC_LES (HID_BASE + 623)
#define HID_MN_CALC_GRE (HID_BASE + 624)
#define HID_MN_CALC_SUM (HID_BASE + 625)
#define HID_MN_CALC_MEAN (HID_BASE + 626)
#define HID_MN_CALC_MIN (HID_BASE + 627)
#define HID_MN_CALC_MAX (HID_BASE + 628)
#define HID_MN_CALC_SIN (HID_BASE + 629)
#define HID_MN_CALC_COS (HID_BASE + 630)
#define HID_MN_CALC_TAN (HID_BASE + 631)
#define HID_MN_CALC_ASIN (HID_BASE + 632)
#define HID_MN_CALC_ACOS (HID_BASE + 633)
#define HID_MN_CALC_ATAN (HID_BASE + 634)
#define HID_MN_CALC_POW (HID_BASE + 635)
#define HID_MN_CALC_LISTSEP (HID_BASE + 636)
#define HID_MN_POP_OPS (HID_BASE + 637)
#define HID_MN_POP_STATISTICS (HID_BASE + 638)
#define HID_MN_POP_FUNC (HID_BASE + 639)
#define HID_MN_RSC_END (HID_BASE + 640)
#define HID_MN_CALC_ROUND (HID_BASE + 641)
#define HID_MN_READONLY_DOWNLOAD (HID_BASE + 643)
#define HID_MN_READONLY_CREATEGRAPHIKLINK (HID_BASE + 644)
#define HID_MN_READONLY_SAVEGRAPHIC (HID_BASE + 645)
#define HID_MN_READONLY_GRAPHICTOGALLERY (HID_BASE + 646)
#define HID_MN_READONLY_TOGALLERYLINK (HID_BASE + 647)
#define HID_MN_READONLY_TOGALLERYCOPY (HID_BASE + 648)
#define HID_MN_READONLY_SAVEBACKGROUND (HID_BASE + 649)
#define HID_MN_READONLY_BACKGROUNDTOGALLERY (HID_BASE + 650)
#define HID_MN_READONLY_COPYLINK (HID_BASE + 651)
#define HID_MN_READONLY_COPYGRAPHIC (HID_BASE + 652)
#define HID_MN_READONLY_LOADGRAPHIC (HID_BASE + 653)
#define HID_MN_READONLY_GRAPHICOFF (HID_BASE + 654)
#define HID_MN_READONLY_PLUGINOFF (HID_BASE + 655)
#define HID_MD_GLOS_DEFINE (HID_BASE + 656)
#define HID_MD_GLOS_REPLACE (HID_BASE + 657)
#define HID_MD_GLOS_RENAME (HID_BASE + 658)
#define HID_MD_GLOS_DELETE (HID_BASE + 659)
#define HID_MD_GLOS_EDIT (HID_BASE + 660)
#define HID_MD_GLOS_MACRO (HID_BASE + 661)
#define HID_LINGU_ADD_WORD (HID_BASE + 662)
#define HID_LINGU_IGNORE_WORD (HID_BASE + 663)
#define HID_LINGU_SPELLING_DLG (HID_BASE + 664)
#define HID_LINGU_AUTOCORR (HID_BASE + 665)
#define HID_LINGU_REPLACE (HID_BASE + 666)
#define HID_MD_GLOS_CATEGORY (HID_BASE + 667)
#define HID_REGION_TREE (HID_BASE + 668)
#define HID_LINGU_WORD_LANGUAGE (HID_BASE + 669)
#define HID_LINGU_PARA_LANGUAGE (HID_BASE + 670)
#define HID_MD_GLOS_DEFINE_TEXT (HID_BASE + 671)
#define HID_DLG_PASSWD_SECTION (HID_BASE + 672)
#define HID_MD_COPY_TO_CLIPBOARD (HID_BASE + 673)
#define HID_MD_GLOS_IMPORT (HID_BASE + 674)
// Weiter Help-IDs **********************************************************
#define HID_CLOSE_FILE (HID_BASE + 1001)
#define HID_LAUNCH_REGISTRY (HID_BASE + 1002)
#define HID_MERGE_FILE (HID_BASE + 1003)
#define HID_MERGE_FILE_DLG (HID_BASE + 1004)
#define HID_NEW_FILE (HID_BASE + 1005)
#define HID_OPEN_FILE (HID_BASE + 1007)
#define HID_OPEN_LASTVERSION (HID_BASE + 1009)
#define HID_PRINT_FILE (HID_BASE + 1010)
#define HID_PRINT_FILE_OPTIONS (HID_BASE + 1011)
#define HID_SAVE_FILE_AS (HID_BASE + 1012)
#define HID_SAVE_FILE (HID_BASE + 1013)
#define HID_SETUP_PRINTER_DLG (HID_BASE + 1015)
#define HID_EXIT (HID_BASE + 1017)
#define HID_CREATE_DOCUMENT (HID_BASE + 1019)
#define HID_DOCSTAT_DLG (HID_BASE + 1020)
#define HID_LOAD_TEMPLATE_DLG (HID_BASE + 1021)
#define HID_SAVE_ALL (HID_BASE + 1023)
#define HID_NEW_FILE_DEFAULT (HID_BASE + 1024)
#define HID_PRINT_FILE_DEFAULT (HID_BASE + 1025)
#define HID_FAX (HID_BASE + 1028)
#define HID_SELECT_DATABASE (HID_BASE + 1030)
#define HID_DOC_INFO_DLG (HID_BASE + 1031)
#define HID_DOC_MGR_DLG (HID_BASE + 1032)
#define HID_OPTCAPTION_CLB (HID_BASE + 1033)
#define HID_COPY (HID_BASE + 1102)
#define HID_CUT (HID_BASE + 1103)
#define HID_EDIT_FIELD (HID_BASE + 1104)
#define HID_EDIT_FILE_INFO_DLG (HID_BASE + 1107)
#define HID_EDIT_LINK_DLG (HID_BASE + 1109)
#define HID_EDIT_OBJECT (HID_BASE + 1110)
#define HID_GOTO (HID_BASE + 1111)
#define HID_SET_FIELD_VALUE (HID_BASE + 1112)
#define HID_PASTE (HID_BASE + 1113)
#define HID_REDO (HID_BASE + 1116)
#define HID_SEARCH (HID_BASE + 1117)
#define HID_REPLACE (HID_BASE + 1118)
#define HID_SELECT_ALL (HID_BASE + 1119)
#define HID_UNDO (HID_BASE + 1120)
#define HID_REPEAT (HID_BASE + 1122)
#define HID_BUFFER_UPDATE (HID_BASE + 1124)
#define HID_UPDATE_FIELDS (HID_BASE + 1126)
#define HID_EXECUTE_MACROFIELD (HID_BASE + 1127)
#define HID_EDIT_FORMULA (HID_BASE + 1128)
#define HID_CALC_TABLE (HID_BASE + 1129)
#define HID_NUM_BULLET_DOWN (HID_BASE + 1130)
#define HID_NUM_BULLET_UP (HID_BASE + 1131)
#define HID_NUM_BULLET_PREV (HID_BASE + 1132)
#define HID_NUM_BULLET_NEXT (HID_BASE + 1133)
#define HID_NUM_BULLET_MOVEUP (HID_BASE + 1134)
#define HID_NUM_BULLET_MOVEDOWN (HID_BASE + 1135)
#define HID_NUM_BULLET_NONUM (HID_BASE + 1136)
#define HID_NUM_BULLET_OFF (HID_BASE + 1137)
#define HID_NUM_BULLET_ON (HID_BASE + 1138)
#define HID_NUM_BULLET_OUTLINE_DOWN (HID_BASE + 1139)
#define HID_NUM_BULLET_OUTLINE_UP (HID_BASE + 1140)
#define HID_NUM_BULLET_OUTLINE_MOVEUP (HID_BASE + 1141)
#define HID_NUM_BULLET_OUTLINE_MOVEDOWN (HID_BASE + 1142)
#define HID_UPDATE_INPUTFIELDS (HID_BASE + 1143)
#define HID_NUM_NUMBERING_ON (HID_BASE + 1144)
#define HID_REPEAT_SEARCH (HID_BASE + 1150)
#define HID_REPAGINATE (HID_BASE + 1161)
#define HID_REFRESH_VIEW (HID_BASE + 1201)
#define HID_RIBBON (HID_BASE + 1210)
#define HID_RULER (HID_BASE + 1211)
#define HID_STATUSBAR (HID_BASE + 1212)
#define HID_TOOLBOX (HID_BASE + 1213)
#define HID_VIEW_BOUNDS (HID_BASE + 1214)
#define HID_VIEW_FIELDS (HID_BASE + 1215)
#define HID_VLINEAL (HID_BASE + 1216)
#define HID_VSCROLLBAR (HID_BASE + 1217)
#define HID_HSCROLLBAR (HID_BASE + 1218)
#define HID_VIEW_META_CHARS (HID_BASE + 1224)
#define HID_VIEW_MARKS (HID_BASE + 1225)
#define HID_VIEW_FIELDNAME (HID_BASE + 1226)
#define HID_VIEW_TABLEGRID (HID_BASE + 1227)
#define HID_ZOOM (HID_BASE + 1231)
#define HID_DELETE_BOOKMARK (HID_BASE + 1301)
#define HID_INSERT_BREAK (HID_BASE + 1303)
#define HID_INSERT_COLUMN_BREAK (HID_BASE + 1305)
#define HID_INSERT_FILE (HID_BASE + 1309)
#define HID_INSERT_FOOTNOTE (HID_BASE + 1311)
#define HID_INSERT_GRAFIC (HID_BASE + 1315)
#define HID_INSERT_LINEBREAK (HID_BASE + 1318)
#define HID_INSERT_MERGEFIELD_DLG (HID_BASE + 1320)
#define HID_INSERT_OBJECT_DLG (HID_BASE + 1322)
#define HID_INSERT_PAGEBREAK (HID_BASE + 1323)
#define HID_INSERT_RECORD (HID_BASE + 1326)
#define HID_MERGE_RECORD (HID_BASE + 1327)
#define HID_INSERT_SYMBOL (HID_BASE + 1328)
#define HID_INSERT_STRING (HID_BASE + 1331)
#define HID_INSERT_COLS (HID_BASE + 1332)
#define HID_INSERT_FRAME_INTERACT (HID_BASE + 1333)
#define HID_INSERT_FRAME (HID_BASE + 1334)
#define HID_INSERT_IDX_ENTRY (HID_BASE + 1340)
#define HID_INSERT_USERIDX_ENTRY (HID_BASE + 1341)
#define HID_INSERT_CNTNTIDX_ENTRY (HID_BASE + 1342)
#define HID_INSERT_SOFT_HYPHEN (HID_BASE + 1350)
#define HID_INSERT_HARD_SPACE (HID_BASE + 1351)
#define HID_SET_FONT (HID_BASE + 1401)
#define HID_SET_FONT_SIZE (HID_BASE + 1402)
#define HID_GROW_FONT_SIZE (HID_BASE + 1403)
#define HID_SHRINK_FONT_SIZE (HID_BASE + 1404)
#define HID_SET_BOLD (HID_BASE + 1405)
#define HID_SET_ITALIC (HID_BASE + 1406)
#define HID_SET_SHADOW (HID_BASE + 1407)
#define HID_SET_OUTLINE (HID_BASE + 1408)
#define HID_SET_UNDERLINE (HID_BASE + 1409)
#define HID_SET_STRIKEOUT (HID_BASE + 1410)
#define HID_SET_SUPER_SCRIPT (HID_BASE + 1411)
#define HID_SET_SUB_SCRIPT (HID_BASE + 1412)
#define HID_SET_COLOR (HID_BASE + 1413)
#define HID_SET_CASEMAP (HID_BASE + 1414)
#define HID_SET_LANGUAGE (HID_BASE + 1415)
#define HID_SET_KERNING (HID_BASE + 1416)
#define HID_INDENT_TO_TABSTOP (HID_BASE + 1417)
#define HID_SET_LEFT_PARA (HID_BASE + 1418)
#define HID_SET_RIGHT_PARA (HID_BASE + 1419)
#define HID_SET_CENTER_PARA (HID_BASE + 1420)
#define HID_SET_JUSTIFY_PARA (HID_BASE + 1421)
#define HID_SET_LINE_SPACE_1 (HID_BASE + 1422)
#define HID_SET_LINE_SPACE_15 (HID_BASE + 1423)
#define HID_SET_LINE_SPACE_2 (HID_BASE + 1424)
#define HID_FLIP_HORZ_GRAFIC (HID_BASE + 1425)
#define HID_FLIP_VERT_GRAFIC (HID_BASE + 1426)
#define HID_SET_ADJUST (HID_BASE + 1428)
#define HID_SET_LRMARGIN (HID_BASE + 1429)
#define HID_SET_ULMARGIN (HID_BASE + 1430)
#define HID_UNINDENT_TO_TABSTOP (HID_BASE + 1431)
#define HID_SET_HYPHEN_ZONE (HID_BASE + 1432)
#define HID_SET_PAGE_BREAK (HID_BASE + 1433)
#define HID_SET_KEEP_TOGETHER (HID_BASE + 1434)
#define HID_SET_WIDOW (HID_BASE + 1436)
#define HID_SET_ORPHAN (HID_BASE + 1437)
#define HID_FORMAT_SHADOW (HID_BASE + 1438)
#define HID_FORMAT_BORDER (HID_BASE + 1439)
#define HID_FORMAT_CHAR_DLG (HID_BASE + 1441)
#define HID_FORMAT_PARA_DLG (HID_BASE + 1443)
#define HID_FORMAT_TAB (HID_BASE + 1444)
#define HID_FORMAT_TAB_DLG (HID_BASE + 1445)
#define HID_FORMAT_BORDER_DLG (HID_BASE + 1447)
#define HID_FORMAT_BACKGROUND (HID_BASE + 1448)
#define HID_FORMAT_BACKGROUND_DLG (HID_BASE + 1450)
#define HID_FORMAT_PAGE (HID_BASE + 1451)
#define HID_FORMAT_PAGE_DLG (HID_BASE + 1452)
#define HID_FORMAT_DROPCAPS (HID_BASE + 1454)
#define HID_FORMAT_FRAME_DLG (HID_BASE + 1456)
#define HID_FORMAT_GRAFIC_DLG (HID_BASE + 1458)
#define HID_FORMAT_TABLE_DLG (HID_BASE + 1460)
#define HID_NEW_STYLE_BY_EXAMPLE (HID_BASE + 1462)
#define HID_UPDATE_STYLE_BY_EXAMPLE (HID_BASE + 1463)
#define HID_STYLE_SHEET_FRAME_DLG (HID_BASE + 1464)
#define HID_STYLE_SHEET_DOC_DLG (HID_BASE + 1465)
#define HID_FORMAT_RESET (HID_BASE + 1469)
#define HID_FRAME_TO_TOP (HID_BASE + 1470)
#define HID_FRAME_TO_BOTTOM (HID_BASE + 1471)
#define HID_FRAME_NOWRAP (HID_BASE + 1472)
#define HID_FRAME_WRAP (HID_BASE + 1473)
#define HID_FRAME_WRAPTHRU (HID_BASE + 1474)
#define HID_FRAME_ALIGN_HORZ_LEFT (HID_BASE + 1475)
#define HID_FRAME_ALIGN_HORZ_RIGHT (HID_BASE + 1476)
#define HID_FRAME_ALIGN_HORZ_CENTER (HID_BASE + 1477)
#define HID_FRAME_ALIGN_VERT_TOP (HID_BASE + 1478)
#define HID_FRAME_ALIGN_VERT_BOTTOM (HID_BASE + 1479)
#define HID_FRAME_ALIGN_VERT_CENTER (HID_BASE + 1480)
#define HID_SET_FRM_SIZE (HID_BASE + 1481)
#define HID_SET_FRM_POSITION (HID_BASE + 1482)
#define HID_SET_FRM_ANCHOR (HID_BASE + 1483)
#define HID_SET_FRM_WRAP (HID_BASE + 1484)
#define HID_SET_FRM_DIST (HID_BASE + 1485)
#define HID_SET_FRM_OPTIONS (HID_BASE + 1486)
#define HID_SET_GRF_MIRROR (HID_BASE + 1488)
#define HID_SET_TABLE_WIDTH (HID_BASE + 1489)
#define HID_SET_TABLE_ALIGN (HID_BASE + 1490)
#define HID_SET_CHAR_STYLE (HID_BASE + 1491)
#define HID_SET_PARA_STYLE (HID_BASE + 1492)
#define HID_SET_PAGE_STYLE (HID_BASE + 1493)
#define HID_SET_FRM_MACRO (HID_BASE + 1494)
#define HID_SET_FRM_COLUMNS (HID_BASE + 1495)
#define HID_SET_FRM_COLUMN_WIDTH (HID_BASE + 1496)
#define HID_UPDATE_STYLES_DIRECT (HID_BASE + 1497)
#define HID_TABLE_INSERT_ROW (HID_BASE + 1501)
#define HID_TABLE_DELETE_ROW (HID_BASE + 1503)
#define HID_TABLE_DELETE_COL (HID_BASE + 1504)
#define HID_TABLE_MERGE_CELLS (HID_BASE + 1506)
#define HID_AUTOFMT_TABLE (HID_BASE + 1507)
#define HID_SWDLG_STRINPUT (HID_BASE + 1508)
#define HID_TABLE_SET_ULSPACE (HID_BASE + 1509)
#define HID_TABLE_SET_GRID (HID_BASE + 1510)
#define HID_TABLE_SET_SHADOW (HID_BASE + 1511)
#define HID_TABLE_SELECT_ROW (HID_BASE + 1513)
#define HID_TABLE_SELECT_COL (HID_BASE + 1514)
#define HID_TABLE_SELECT_ALL (HID_BASE + 1515)
#define HID_TABLE_SET_READ_ONLY_CELLS (HID_BASE + 1517)
#define HID_TABLE_UNSET_READ_ONLY_CELLS (HID_BASE + 1519)
#define HID_PAGE_STYLE_SET_COLS (HID_BASE + 1538)
#define HID_SET_PROP_LINE_SPACE (HID_BASE + 1540)
#define HID_SET_ABS_LINE_SPACE (HID_BASE + 1541)
#define HID_SPELLING_DLG (HID_BASE + 1601)
#define HID_THESAURUS_DLG (HID_BASE + 1604)
#define HID_HYPHENATE_OPT_DLG (HID_BASE + 1607)
#define HID_SORTING (HID_BASE + 1613)
#define HID_SORTING_DLG (HID_BASE + 1614)
#define HID_CALCULATE (HID_BASE + 1615)
#define HID_RECORD_MACRO_DLG (HID_BASE + 1622)
#define HID_PLAY_MACRO_DLG (HID_BASE + 1624)
#define HID_CONFIG_DLG (HID_BASE + 1627)
#define HID_EXPAND_GLOSSARY (HID_BASE + 1628)
#define HID_RENAME_GLOSSARY (HID_BASE + 1629)
#define HID_CONFIG_MENU (HID_BASE + 1630)
#define HID_CONFIG_KEY (HID_BASE + 1631)
#define HID_ASSIGN_LOCAL_MACRO_DLG (HID_BASE + 1632)
#define HID_COMPILE_MACRO (HID_BASE + 1633)
#define HID_CONFIG_VIEWOPTIONS (HID_BASE + 1635)
#define HID_CONFIG_COLORS (HID_BASE + 1636)
#define HID_INSERT_GLOSSARY (HID_BASE + 1640)
#define HID_AUTO_CORRECT (HID_BASE + 1649)
#define HID_AUTO_CORRECT_DLG (HID_BASE + 1650)
#define HID_HELP_PI (HID_BASE + 1655)
#define HID_NAVIGATION_PI (HID_BASE + 1656)
#define HID_TEMPLATE_PI (HID_BASE + 1657)
#define HID_ADDR_PI (HID_BASE + 1658)
#define HID_NAVIGATION_PI_GOTO_PAGE (HID_BASE + 1659)
#define HID_LETTER_WIZZARD (HID_BASE + 1660)
#define HID_FAX_WIZZARD (HID_BASE + 1661)
#define HID_MEMO_WIZZARD (HID_BASE + 1662)
#define HID_AGENDA_WIZZARD (HID_BASE + 1663)
#define HID_NEW_WINDOW (HID_BASE + 1701)
#define HID_ARRANGE_ALL_WIN (HID_BASE + 1702)
#define HID_ARRANGE_CASCADE_WIN (HID_BASE + 1703)
#define HID_ARRANGE_HORZ_WIN (HID_BASE + 1704)
#define HID_ARRANGE_VERT_WIN (HID_BASE + 1705)
#define HID_SHOW_HELP_INDEX (HID_BASE + 1802)
#define HID_SHOW_KEYBOARD_HELP (HID_BASE + 1803)
#define HID_SHOW_HELP_MANUAL (HID_BASE + 1804)
#define HID_SHOW_UPDATE_HELP (HID_BASE + 1805)
#define HID_CHAR_LEFT (HID_BASE + 1901)
#define HID_CHAR_RIGHT (HID_BASE + 1902)
#define HID_LINE_UP (HID_BASE + 1903)
#define HID_LINE_DOWN (HID_BASE + 1904)
#define HID_START_OF_LINE (HID_BASE + 1905)
#define HID_END_OF_LINE (HID_BASE + 1906)
#define HID_START_OF_DOCUMENT (HID_BASE + 1907)
#define HID_END_OF_DOCUMENT (HID_BASE + 1908)
#define HID_START_OF_NEXT_PAGE (HID_BASE + 1909)
#define HID_END_OF_NEXT_PAGE (HID_BASE + 1910)
#define HID_START_OF_PREV_PAGE (HID_BASE + 1911)
#define HID_END_OF_PREV_PAGE (HID_BASE + 1912)
#define HID_START_OF_PAGE (HID_BASE + 1913)
#define HID_END_OF_PAGE (HID_BASE + 1914)
#define HID_START_OF_COLUMN (HID_BASE + 1917)
#define HID_END_OF_COLUMN (HID_BASE + 1918)
#define HID_START_OF_PARA (HID_BASE + 1919)
#define HID_END_OF_PARA (HID_BASE + 1920)
#define HID_NEXT_WORD (HID_BASE + 1921)
#define HID_PREV_WORD (HID_BASE + 1922)
#define HID_NEXT_SENT (HID_BASE + 1923)
#define HID_PREV_SENT (HID_BASE + 1924)
#define HID_DELETE (HID_BASE + 1925)
#define HID_BACKSPACE (HID_BASE + 1926)
#define HID_DELETE_SENT (HID_BASE + 1927)
#define HID_DELETE_BACK_SENT (HID_BASE + 1928)
#define HID_DELETE_WORD (HID_BASE + 1929)
#define HID_DELETE_BACK_WORD (HID_BASE + 1930)
#define HID_DELETE_LINE (HID_BASE + 1931)
#define HID_DELETE_BACK_LINE (HID_BASE + 1932)
#define HID_DELETE_PARA (HID_BASE + 1933)
#define HID_DELETE_BACK_PARA (HID_BASE + 1934)
#define HID_DELETE_WHOLE_LINE (HID_BASE + 1935)
#define HID_SET_INS_MODE (HID_BASE + 1936)
#define HID_PAGEUP (HID_BASE + 1937)
#define HID_PAGEDOWN (HID_BASE + 1938)
#define HID_SET_ADD_MODE (HID_BASE + 1939)
#define HID_SET_EXT_MODE (HID_BASE + 1940)
#define HID_ESCAPE (HID_BASE + 1941)
#define HID_SELECT_WORD (HID_BASE + 1943)
#define HID_START_TABLE (HID_BASE + 1947)
#define HID_END_TABLE (HID_BASE + 1948)
#define HID_NEXT_TABLE (HID_BASE + 1949)
#define HID_PREV_TABLE (HID_BASE + 1950)
#define HID_START_OF_NEXT_COLUMN (HID_BASE + 1951)
#define HID_END_OF_NEXT_COLUMN (HID_BASE + 1952)
#define HID_START_OF_PREV_COLUMN (HID_BASE + 1953)
#define HID_END_OF_PREV_COLUMN (HID_BASE + 1954)
#define HID_FOOTNOTE_TO_ANCHOR (HID_BASE + 1955)
#define HID_NEXT_FOOTNOTE (HID_BASE + 1956)
#define HID_PREV_FOOTNOTE (HID_BASE + 1957)
#define HID_CNTNT_TO_NEXT_FRAME (HID_BASE + 1958)
#define HID_FRAME_TO_ANCHOR (HID_BASE + 1959)
#define HID_TO_HEADER (HID_BASE + 1960)
#define HID_TO_FOOTER (HID_BASE + 1961)
#define HID_IDX_MARK_TO_IDX (HID_BASE + 1962)
#define HID_ENVELOP (HID_BASE + 2050)
#define HID_LABEL (HID_BASE + 2051)
#define HID_ENVELOP_PRINT (HID_BASE + 2052)
#define HID_NAVIGATION_IMGBTN (HID_BASE + 2054)
#define HID_ENVELOP_INSERT (HID_BASE + 2055)
#define HID_WEBTOOLS_TOOLBOX (HID_BASE + 2056)
#define HID_WEBTEXT_TOOLBOX (HID_BASE + 2057)
#define HID_WEBFRAME_TOOLBOX (HID_BASE + 2058)
#define HID_TEXT_TOOLBOX (HID_BASE + 2059)
#define HID_TABLE_TOOLBOX (HID_BASE + 2060)
#define HID_FRAME_TOOLBOX (HID_BASE + 2061)
#define HID_GRAFIK_TOOLBOX (HID_BASE + 2062)
#define HID_OLE_TOOLBOX (HID_BASE + 2063)
#define HID_DRAW_TOOLBOX (HID_BASE + 2064)
#define HID_BEZIER_TOOLBOX (HID_BASE + 2066)
#define HID_DRAW_TEXT_TOOLBOX (HID_BASE + 2067)
#define HID_NUM_TOOLBOX (HID_BASE + 2068)
#define HID_TOOLS_TOOLBOX (HID_BASE + 2069)
#define HID_SRCVIEW_TOOLBOX (HID_BASE + 2070)
#define HID_LABEL_INSERT (HID_BASE + 2071)
#define HID_CALC_TOOLBOX (HID_BASE + 2072)
#define HID_PVIEW_TOOLBOX (HID_BASE + 2073)
#define HID_FIELD_INSERT (HID_BASE + 2074)
#define HID_FIELD_CLOSE (HID_BASE + 2075)
#define HID_COND_COLL_TABLIST (HID_BASE + 2076)
#define HID_DB_SELECTION_TLB (HID_BASE + 2077)
#define HID_FIELD_DINF_TYPE (HID_BASE + 2078)
#define HID_DRAWFORM_TOOLBOX (HID_BASE + 2079)
#define HID_SELECT_TEMPLATE (HID_BASE + 2080)
#define HID_AP_INSERT_DB_SEL (HID_BASE + 2081)
#define HID_WEBGRAPHIC_TOOLBOX (HID_BASE + 2082)
#define HID_OUTLINE_FORM (HID_BASE + 2083)
#define HID_NUM_RESET (HID_BASE + 2084)
#define HID_AUTOFORMAT_REJECT (HID_BASE + 2085)
#define HID_AUTOFORMAT_ACCEPT (HID_BASE + 2086)
#define HID_AUTOFORMAT_EDIT_CHG (HID_BASE + 2087)
//insert index/entries/Pattern buttons and edits
#define HID_TOX_ENTRY_BUTTON (HID_BASE + 2088)
#define HID_TOX_ENTRY_EDIT (HID_BASE + 2089)
#define HID_DLG_NEW_USER_IDX (HID_BASE + 2090)
#define HID_INSERT_IDX_MRK_OK (HID_BASE + 2091)
#define HID_INSERT_IDX_MRK_CLOSE (HID_BASE + 2092)
#define HID_INSERT_AUTH_MRK_OK (HID_BASE + 2093)
#define HID_INSERT_AUTH_MRK_CLOSE (HID_BASE + 2094)
#define HID_INSERT_IDX_MRK_DELETE (HID_BASE + 2095)
#define HID_INSERT_IDX_MRK_NEW (HID_BASE + 2096)
#define HID_INSERT_IDX_MRK_PREV (HID_BASE + 2097)
#define HID_INSERT_IDX_MRK_PREV_SAME (HID_BASE + 2098)
#define HID_INSERT_IDX_MRK_NEXT (HID_BASE + 2099)
#define HID_INSERT_IDX_MRK_NEXT_SAME (HID_BASE + 2100)
#define HID_INSERT_IDX_MRK_TYPE (HID_BASE + 2101)
#define HID_INSERT_IDX_MRK_ENTRY (HID_BASE + 2102)
#define HID_INSERT_IDX_MRK_PRIM_KEY (HID_BASE + 2103)
#define HID_INSERT_IDX_MRK_SEC_KEY (HID_BASE + 2104)
#define HID_INSERT_IDX_MRK_LEVEL (HID_BASE + 2105)
#define HID_INSERT_IDX_MRK_MAIN_ENTRY (HID_BASE + 2106)
#define HID_INSERT_IDX_MRK_APPLY_ALL (HID_BASE + 2107)
#define HID_INSERT_AUTH_MRK_ENTRY (HID_BASE + 2108)
#define HID_INSERT_AUTH_MRK_CREATE_ENTRY (HID_BASE + 2109)
#define HID_INSERT_AUTH_MRK_EDIT_ENTRY (HID_BASE + 2110)
#define HID_TOKEN_WINDOW (HID_BASE + 2111)
#define HID_AUTH_FIELD_IDENTIFIER (HID_BASE + 2112 )
#define HID_AUTH_FIELD_AUTHORITY_TYPE (HID_BASE + 2113 )
#define HID_AUTH_FIELD_ADDRESS (HID_BASE + 2114 )
#define HID_AUTH_FIELD_ANNOTE (HID_BASE + 2115 )
#define HID_AUTH_FIELD_AUTHOR (HID_BASE + 2116 )
#define HID_AUTH_FIELD_BOOKTITLE (HID_BASE + 2117 )
#define HID_AUTH_FIELD_CHAPTER (HID_BASE + 2118 )
#define HID_AUTH_FIELD_EDITION (HID_BASE + 2119 )
#define HID_AUTH_FIELD_EDITOR (HID_BASE + 2120 )
#define HID_AUTH_FIELD_HOWPUBLISHED (HID_BASE + 2121 )
#define HID_AUTH_FIELD_INSTITUTION (HID_BASE + 2122 )
#define HID_AUTH_FIELD_JOURNAL (HID_BASE + 2123 )
#define HID_AUTH_FIELD_MONTH (HID_BASE + 2124 )
#define HID_AUTH_FIELD_NOTE (HID_BASE + 2125 )
#define HID_AUTH_FIELD_NUMBER (HID_BASE + 2126 )
#define HID_AUTH_FIELD_ORGANIZATIONS (HID_BASE + 2127 )
#define HID_AUTH_FIELD_PAGES (HID_BASE + 2128 )
#define HID_AUTH_FIELD_PUBLISHER (HID_BASE + 2129 )
#define HID_AUTH_FIELD_SCHOOL (HID_BASE + 2130 )
#define HID_AUTH_FIELD_SERIES (HID_BASE + 2131 )
#define HID_AUTH_FIELD_TITLE (HID_BASE + 2132 )
#define HID_AUTH_FIELD_REPORT_TYPE (HID_BASE + 2133 )
#define HID_AUTH_FIELD_VOLUME (HID_BASE + 2134 )
#define HID_AUTH_FIELD_YEAR (HID_BASE + 2135 )
#define HID_AUTH_FIELD_URL (HID_BASE + 2136 )
#define HID_AUTH_FIELD_CUSTOM1 (HID_BASE + 2137 )
#define HID_AUTH_FIELD_CUSTOM2 (HID_BASE + 2138 )
#define HID_AUTH_FIELD_CUSTOM3 (HID_BASE + 2139 )
#define HID_AUTH_FIELD_CUSTOM4 (HID_BASE + 2140 )
#define HID_AUTH_FIELD_CUSTOM5 (HID_BASE + 2141 )
#define HID_AUTH_FIELD_ISBN (HID_BASE + 2142 )
#define HID_AUTH_MARK_DLG_FROM_COMP_RB (HID_BASE + 2143 )
#define HID_AUTH_MARK_DLG_FROM_DOC_RB (HID_BASE + 2144 )
#define HID_AUTH_MARK_DLG_ID_LISTBOX (HID_BASE + 2145 )
#define HID_INSERT_INDEX_ENTRY_LEVEL_LB (HID_BASE + 2146 )
#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE (HID_BASE + 2147 )
#define HID_INSERT_IDX_MRK_SRCH_WORDONLY (HID_BASE + 2148 )
#define HID_DLG_CREATE_AUTOMARK (HID_BASE + 2149 )
#define HID_BUSINESS_CARD_CONTENT (HID_BASE + 2150 )
+475
View File
@@ -0,0 +1,475 @@
/*************************************************************************
*
* $RCSfile: hintids.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _HINTIDS_HXX
#define _HINTIDS_HXX
#ifndef _SOLAR_H
#include <tools/solar.h> // fuer __FAR_DATA
#endif
#ifndef _SAL_TYPES_H_
#include <sal/types.h> // for sal_Unicode
#endif
// fuer SwTxtHints ohne Endindex wird folgendes Zeichen eingefuegt:
//JP 24.05.00: for the new UniCode Version:
#define CH_TXTATR_BREAKWORD ((sal_Unicode)0x01)
#define CH_TXTATR_INWORD ((sal_Unicode)0x02)
/*
* Hier kommen erst mal die enums fuer die Hints
*/
#define HINT_BEGIN 1
#define POOLATTR_BEGIN HINT_BEGIN
#define POOLATTR_END RES_UNKNOWNATR_END
// Bereiche fuer die Id's der einzelnen Format-Attribute
// die Which-Werte fuer die Charakter-Format Attribute
enum RES_CHRATR
{
RES_CHRATR_BEGIN = HINT_BEGIN,
RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN, // 1
RES_CHRATR_CHARSETCOLOR, // 2
RES_CHRATR_COLOR, // 3
RES_CHRATR_CONTOUR, // 4
RES_CHRATR_CROSSEDOUT, // 5
RES_CHRATR_ESCAPEMENT, // 6
RES_CHRATR_FONT, // 7
RES_CHRATR_FONTSIZE, // 8
RES_CHRATR_KERNING, // 9
RES_CHRATR_LANGUAGE, // 10
RES_CHRATR_POSTURE, // 11
RES_CHRATR_PROPORTIONALFONTSIZE, // 12
RES_CHRATR_SHADOWED, // 13
RES_CHRATR_UNDERLINE, // 14
RES_CHRATR_WEIGHT, // 15
RES_CHRATR_WORDLINEMODE, // 16
RES_CHRATR_AUTOKERN, // 17
RES_CHRATR_BLINK, // 18
RES_CHRATR_NOHYPHEN, // 19
RES_CHRATR_NOLINEBREAK, // 20
RES_CHRATR_BACKGROUND, // 21
RES_CHRATR_CJK_FONT, // 22
RES_CHRATR_CJK_FONTSIZE, // 23
RES_CHRATR_CJK_LANGUAGE, // 24
RES_CHRATR_CJK_POSTURE, // 25
RES_CHRATR_CJK_WEIGHT, // 26
RES_CHRATR_CTL_FONT, // 27
RES_CHRATR_CTL_FONTSIZE, // 28
RES_CHRATR_CTL_LANGUAGE, // 29
RES_CHRATR_CTL_POSTURE, // 30
RES_CHRATR_CTL_WEIGHT, // 31
RES_CHRATR_WRITING_DIRECTION, // 32
RES_CHRATR_DUMMY2, // 33
RES_CHRATR_DUMMY3, // 34
RES_CHRATR_DUMMY4, // 35
RES_CHRATR_DUMMY5, // 36
RES_CHRATR_DUMMY1, // 37
RES_CHRATR_END
};
// diese Attribute stehen nur im SwpAttr-Array vom TextNode
enum RES_TXTATR
{
RES_TXTATR_BEGIN = RES_CHRATR_END,
// alle TextAttribute mit einem Ende
// JP 12.07.96: die Ids RES_TXTATR_NOLINEBREAK und RES_TXTATR_NOHYPHEN
// wanderten in den Bereich der CharAttr. Die Ids selbst muessen
// aber als Dummies noch erhalten bleiben. Der SwG-/Sw3 Reader
// merkt sich die Ids immer als Offset zum Start der Gruppe!!!
// Aus dem RES_TXTATR_NOLINEBREAK ist jetzt RES_TXTATR_INETFMT geworden.
RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
RES_TXTATR_INETFMT = RES_TXTATR_WITHEND_BEGIN, // 38
RES_TXTATR_DUMMY4, // 39
RES_TXTATR_REFMARK, // 40
RES_TXTATR_TOXMARK, // 41
RES_TXTATR_CHARFMT, // 42
RES_TXTATR_TWO_LINES, // 43
RES_TXTATR_CJK_RUBY, // 44
RES_TXTATR_UNKNOWN_CONTAINER, // 45
RES_TXTATR_DUMMY5, // 46
RES_TXTATR_DUMMY6, // 47
RES_TXTATR_WITHEND_END,
// alle TextAttribute ohne ein Ende
RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END,
RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 48
RES_TXTATR_FLYCNT, // 49
RES_TXTATR_FTN, // 50
RES_TXTATR_SOFTHYPH, // 51
RES_TXTATR_HARDBLANK, // 52
RES_TXTATR_DUMMY1, // 53
RES_TXTATR_DUMMY2, // 54
RES_TXTATR_NOEND_END,
RES_TXTATR_END = RES_TXTATR_NOEND_END
};
enum RES_PARATR
{
RES_PARATR_BEGIN = RES_TXTATR_END,
RES_PARATR_LINESPACING = RES_PARATR_BEGIN, // 55
RES_PARATR_ADJUST, // 56
RES_PARATR_SPLIT, // 57
RES_PARATR_ORPHANS, // 58
RES_PARATR_WIDOWS, // 59
RES_PARATR_TABSTOP, // 60
RES_PARATR_HYPHENZONE, // 61
RES_PARATR_DROP, // 62
RES_PARATR_REGISTER, // 63
RES_PARATR_NUMRULE, // 64
RES_PARATR_DUMMY2, // 65
RES_PARATR_END
};
enum RES_FRMATR
{
RES_FRMATR_BEGIN = RES_PARATR_END,
RES_FILL_ORDER = RES_FRMATR_BEGIN, // 66
RES_FRM_SIZE, // 67
RES_PAPER_BIN, // 68
RES_LR_SPACE, // 69
RES_UL_SPACE, // 70
RES_PAGEDESC, // 71
RES_BREAK, // 72
RES_CNTNT, // 73
RES_HEADER, // 74
RES_FOOTER, // 75
RES_PRINT, // 76
RES_OPAQUE, // 77
RES_PROTECT, // 78
RES_SURROUND, // 79
RES_VERT_ORIENT, // 80
RES_HORI_ORIENT, // 81
RES_ANCHOR, // 82
RES_BACKGROUND, // 83
RES_BOX, // 84
RES_SHADOW, // 85
RES_FRMMACRO, // 86
RES_COL, // 87
RES_KEEP, // 88
RES_URL, // 89
RES_EDIT_IN_READONLY, // 90
RES_LAYOUT_SPLIT, // 91
RES_CHAIN, // 92
RES_FRMATR_DUMMY2, // 93
RES_LINENUMBER , // 94
RES_FTN_AT_TXTEND, // 95
RES_END_AT_TXTEND, // 96
RES_COLUMNBALANCE, // 97
RES_FRMATR_DUMMY7, // 98
RES_FRMATR_DUMMY8, // 99
RES_FRMATR_DUMMY9, // 100
RES_FRMATR_END
};
enum RES_GRFATR
{
RES_GRFATR_BEGIN = RES_FRMATR_END,
RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN, // 101
RES_GRFATR_CROPGRF, // 102
RES_GRFATR_ROTATION, // 103
RES_GRFATR_LUMINANCE, // 104
RES_GRFATR_CONTRAST, // 105
RES_GRFATR_CHANNELR, // 106
RES_GRFATR_CHANNELG, // 107
RES_GRFATR_CHANNELB, // 108
RES_GRFATR_GAMMA, // 109
RES_GRFATR_INVERT, // 110
RES_GRFATR_TRANSPARENCY, // 111
RES_GRFATR_DRAWMODE, // 112
RES_GRFATR_DUMMY1, // 113
RES_GRFATR_DUMMY2, // 114
RES_GRFATR_DUMMY3, // 115
RES_GRFATR_DUMMY4, // 116
RES_GRFATR_DUMMY5, // 117
RES_GRFATR_END
};
enum RES_BOXATR
{
RES_BOXATR_BEGIN = RES_GRFATR_END,
RES_BOXATR_FORMAT = RES_BOXATR_BEGIN, // 118
RES_BOXATR_FORMULA, // 119
RES_BOXATR_VALUE, // 120
RES_BOXATR_END
};
enum RES_UNKNOWNATR
{
RES_UNKNOWNATR_BEGIN = RES_BOXATR_END,
RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN, // 121
RES_UNKNOWNATR_END
};
// ID-s fuer die Formate
enum RES_FMT
{
RES_FMT_BEGIN = RES_UNKNOWNATR_END,
RES_CHRFMT = RES_FMT_BEGIN,
RES_FRMFMT,
RES_FLYFRMFMT,
RES_TXTFMTCOLL,
RES_GRFFMTCOLL,
RES_DRAWFRMFMT,
RES_CONDTXTFMTCOLL,
RES_FMT_END
};
// die ID's fuer Messages in den Formaten
enum RES_MSG
{
RES_MSG_BEGIN = RES_FMT_END,
RES_OBJECTDYING = RES_MSG_BEGIN,
RES_FMT_CHG,
RES_ATTRSET_CHG,
RES_FRM_SIZECHG,
RES_TXTATR_FLDCHG,
RES_TXTATR_EMPTYCHG,
RES_INS_CHR,
RES_INS_TXT,
RES_DEL_CHR,
RES_DEL_TXT,
RES_UPDATE_ATTR,
RES_PAGEDESC_FTNINFO,
RES_REFMARKFLD_UPDATE,
RES_DOCPOS_UPDATE,
RES_TABLEFML_UPDATE,
RES_UPDATEDDETBL,
RES_TBLHEADLINECHG,
RES_AUTOFMT_DOCNODE,
RES_REPAINT,
RES_DOC_DTOR,
RES_SECTION_HIDDEN,
RES_SECTION_NOT_HIDDEN,
RES_GRAPHIC_ARRIVED,
RES_GRAPHIC_PIECE_ARRIVED,
RES_HIDDENPARA_PRINT,
RES_CONDCOLL_CONDCHG,
RES_VIRTPAGENUM_INFO,
RES_GETNUMNODES,
RES_GETLOWERNUMLEVEL,
RES_RESET_FMTWRITTEN,
RES_REMOVE_UNO_OBJECT,
RES_GRF_REREAD_AND_INCACHE,
RES_SECTION_RESETHIDDENFLAG,
RES_FINDNEARESTNODE,
RES_CONTENT_VISIBLE,
RES_FOOTNOTE_DELETED,
RES_REFMARK_DELETED,
RES_MSG_DUMMY7,
RES_MSG_DUMMY8,
RES_MSG_DUMMY9,
RES_MSG_END
};
// eine ID fuer den RTF-Reader. Die Stylesheets werden wie
// Attribute behandelt, d.H. es gibt ein StyleSheet Attribut. Um
// nicht mit anderen Which()-Werten zu kollidieren, ist der Wert
// hier mit aufgefuehrt. (Auch das Hilfesystem definiert neue
// Attribute !!)
enum RES_FLTRATTR
{
RES_FLTRATTR_BEGIN = RES_MSG_END,
RES_FLTR_STYLESHEET = RES_FLTRATTR_BEGIN,
RES_FLTR_BOOKMARK,
RES_FLTR_ANCHOR,
RES_FLTR_BORDER,
RES_FLTR_NUMRULE,
RES_FLTR_NUMRULE_NUM,
RES_FLTR_SDR_ANCHOR,
RES_FLTR_TOX,
RES_FLTR_SECTION,
RES_FLTR_REDLINE,
RES_FLTRATTR_END
};
#define RES_TBX_DUMMY RES_FLTRATTR_END + 1
#define HINT_END RES_TBX_DUMMY
// Fehler-Erkennung !!
#define INVALID_HINT HINT_END
#define RES_WHICHHINT_END HINT_END
/*
* hole aus der statischen Default-Attribut Tabelle ueber den Which-Wert
* das entsprechende default Attribut.
* Ist keines vorhanden, returnt ein 0-Pointer !!!
*
* Diese Funktion ist im Init.CXX implementiert. Damit die Formate darauf
* zugreifen koennen, ist sie hier als extern deklariert.
* Im PRODUCT ist das Teil inline.
*/
class SfxPoolItem;
struct SfxItemInfo;
typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ];
extern SwDfltAttrTab __FAR_DATA aAttrTab;
extern SfxItemInfo __FAR_DATA aSlotTab[];
#ifndef PRODUCT
const SfxPoolItem* GetDfltAttr( USHORT nWhich );
#else
inline const SfxPoolItem* GetDfltAttr( USHORT nWhich )
{
return aAttrTab[ nWhich - POOLATTR_BEGIN ];
}
#endif
// return for the given TextAttribut without an end the correct character.
// This function returns
// CH_TXTATR_BREAKWORD for Textattribut which breaks a word (default)
// CH_TXTATR_INWORD for Textattribut which dont breaks a word
class SwTxtAttr;
sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr );
// alle Sets stehen im init.cxx
// AttrSet-Range fuer die 3 Break-Attribute
extern USHORT __FAR_DATA aBreakSetRange[];
// AttrSet-Range fuer die TxtFmtColl
extern USHORT __FAR_DATA aTxtFmtCollSetRange[];
// AttrSet-Range fuer die GrfFmtColl
extern USHORT __FAR_DATA aGrfFmtCollSetRange[];
// AttrSet-Range fuer die TextNode
extern USHORT __FAR_DATA aTxtNodeSetRange[];
// AttrSet-Range fuer die NoTxtNode
extern USHORT __FAR_DATA aNoTxtNodeSetRange[];
// AttrSet-Range fuer die SwTable
extern USHORT __FAR_DATA aTableSetRange[];
// AttrSet-Range fuer die SwTableLine
extern USHORT __FAR_DATA aTableLineSetRange[];
// AttrSet-Range fuer die SwTableBox
extern USHORT __FAR_DATA aTableBoxSetRange[];
// AttrSet-Range fuer die SwFrmFmt
extern USHORT __FAR_DATA aFrmFmtSetRange[];
// AttrSet-Range fuer die SwCharFmt
extern USHORT __FAR_DATA aCharFmtSetRange[];
// AttrSet-Range fuer die SwPageDescFmt
extern USHORT __FAR_DATA aPgFrmFmtSetRange[];
// check if ID is InRange of AttrSet-Ids
BOOL IsInRange( const USHORT* pRange, const USHORT nId );
#define ITEMID_FONT RES_CHRATR_FONT
#define ITEMID_POSTURE RES_CHRATR_POSTURE
#define ITEMID_WEIGHT RES_CHRATR_WEIGHT
#define ITEMID_SHADOWED RES_CHRATR_SHADOWED
#define ITEMID_AUTOKERN RES_CHRATR_AUTOKERN
#define ITEMID_CONTOUR RES_CHRATR_CONTOUR
#define ITEMID_CROSSEDOUT RES_CHRATR_CROSSEDOUT
#define ITEMID_UNDERLINE RES_CHRATR_UNDERLINE
#define ITEMID_FONTHEIGHT RES_CHRATR_FONTSIZE
#define ITEMID_PROPSIZE RES_CHRATR_PROPORTIONALFONTSIZE
#define ITEMID_COLOR RES_CHRATR_COLOR
#define ITEMID_CHARSETCOLOR RES_CHRATR_CHARSETCOLOR
#define ITEMID_KERNING RES_CHRATR_KERNING
#define ITEMID_CASEMAP RES_CHRATR_CASEMAP
#define ITEMID_LANGUAGE RES_CHRATR_LANGUAGE
#define ITEMID_ESCAPEMENT RES_CHRATR_ESCAPEMENT
#define ITEMID_BLINK RES_CHRATR_BLINK
#define ITEMID_NOHYPHENHERE RES_CHRATR_NOHYPHEN
#define ITEMID_NOLINEBREAK RES_CHRATR_NOLINEBREAK
#define ITEMID_WORDLINEMODE RES_CHRATR_WORDLINEMODE
//Defines fuer die ehemaligen FrmAttribute, die jetzt in frmitems.hxx
//von svx zu finden sind.
#define ITEMID_PAPERBIN RES_PAPER_BIN
#define ITEMID_LRSPACE RES_LR_SPACE
#define ITEMID_ULSPACE RES_UL_SPACE
#define ITEMID_PRINT RES_PRINT
#define ITEMID_OPAQUE RES_OPAQUE
#define ITEMID_PROTECT RES_PROTECT
#define ITEMID_BRUSH RES_BACKGROUND
#define ITEMID_BOX RES_BOX
#define ITEMID_SHADOW RES_SHADOW
#define ITEMID_MACRO RES_FRMMACRO
#define ITEMID_FMTKEEP RES_KEEP
#define ITEMID_FMTBREAK RES_BREAK
//Defines fuer die ehemaligen ParAttribute, die jetzt in paraitem.hxx
//bzw. tabsitem.hxx von svx zu finden sind.
#define ITEMID_LINESPACING RES_PARATR_LINESPACING
#define ITEMID_ADJUST RES_PARATR_ADJUST
#define ITEMID_FMTSPLIT RES_PARATR_SPLIT
#define ITEMID_WIDOWS RES_PARATR_WIDOWS
#define ITEMID_ORPHANS RES_PARATR_ORPHANS
#define ITEMID_TABSTOP RES_PARATR_TABSTOP
#define ITEMID_HYPHENZONE RES_PARATR_HYPHENZONE
//Defines fuer die ehemaligen GrfAttribute, die jetzt im svx zu finden sind.
#define ITEMID_GRF_CROP RES_GRFATR_CROPGRF
#endif
+328
View File
@@ -0,0 +1,328 @@
/*************************************************************************
*
* $RCSfile: hints.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _HINTS_HXX
#define _HINTS_HXX
#ifndef _TABLE_HXX //autogen
#include <tools/table.hxx>
#endif
#ifndef _SWATRSET_HXX
#include <swatrset.hxx>
#endif
class SwFmt;
class OutputDevice;
class SwTable;
class SwNode;
class SwNodes;
class SwCntntNode;
class SwPageFrm;
class SwFrm;
class SwTxtNode;
class SwHistory;
// Basis-Klasse fuer alle Message-Hints:
// "Overhead" vom SfxPoolItem wird hier behandelt
class SwMsgPoolItem : public SfxPoolItem
{
public:
SwMsgPoolItem( USHORT nWhich );
// "Overhead" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
};
// ---------------------------------------
// SwPtrMsgPoolItem (altes SwObjectDying!)
// ---------------------------------------
class SwPtrMsgPoolItem : public SwMsgPoolItem
{
public:
void * pObject;
SwPtrMsgPoolItem( USHORT nId, void * pObj )
: SwMsgPoolItem( nId ), pObject( pObj )
{}
};
/*
* SwFmtChg wird verschickt, wenn ein Format gegen ein anderes
* Format ausgewechselt worden ist. Es werden immer 2. Hints verschickt,
* das alte und neue Format.
*/
class SwFmtChg: public SwMsgPoolItem
{
public:
SwFmt *pChangedFmt;
SwFmtChg( SwFmt *pFmt );
};
class SwInsChr: public SwMsgPoolItem
{
public:
xub_StrLen nPos;
SwInsChr( USHORT nP );
};
class SwInsTxt: public SwMsgPoolItem
{
public:
xub_StrLen nPos;
xub_StrLen nLen;
SwInsTxt( xub_StrLen nP, xub_StrLen nL );
};
class SwDelChr: public SwMsgPoolItem
{
public:
xub_StrLen nPos;
SwDelChr( xub_StrLen nP );
};
class SwDelTxt: public SwMsgPoolItem
{
public:
xub_StrLen nStart;
xub_StrLen nLen;
SwDelTxt( xub_StrLen nS, xub_StrLen nL );
};
class SwUpdateAttr: public SwMsgPoolItem
{
public:
xub_StrLen nStart;
xub_StrLen nEnd;
USHORT nWhichAttr;
SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, USHORT nW );
};
// SwRefMarkFldUpdate wird verschickt, wenn sich die ReferenzMarkierungen
// Updaten sollen. Um Seiten-/KapitelNummer feststellen zu koennen, muss
// der akt. Frame befragt werden. Dafuer wird das akt. OutputDevice benoetigt.
class SwRefMarkFldUpdate : public SwMsgPoolItem
{
public:
const OutputDevice* pOut; // Pointer auf das aktuelle Output-Device
SwRefMarkFldUpdate( const OutputDevice* );
};
// SwDocPosUpdate wird verschickt, um zu signalisieren, dass nur die
// Frames ab oder bis zu einer bestimmten dokument-globalen Position
// geupdated werden brauchen. Zur Zeit wird dies nur beim Updaten
// von Seitennummernfeldern benoetigt.
class SwDocPosUpdate : public SwMsgPoolItem
{
public:
const long nDocPos;
SwDocPosUpdate( const long nDocPos );
};
// SwTableFmlUpdate wird verschickt, wenn sich die Tabelle neu berechnen soll
// JP 16.02.99: oder wenn die Tabelle selbst gemergt oder gesplittet wird
enum TableFmlUpdtFlags { TBL_CALC = 0,
TBL_BOXNAME,
TBL_BOXPTR,
TBL_RELBOXNAME,
TBL_MERGETBL,
TBL_SPLITTBL
};
class SwTableFmlUpdate : public SwMsgPoolItem
{
public:
const SwTable* pTbl; // Pointer auf die zu aktuelle Tabelle
union {
const SwTable* pDelTbl; // Merge: Ptr auf die zu loeschende Tabelle
const String* pNewTblNm; // Split: der Name der neuen Tabelle
} DATA;
SwHistory* pHistory;
USHORT nSplitLine; // Split: ab dieser BaseLine wird gespl.
TableFmlUpdtFlags eFlags;
BOOL bModified : 1;
BOOL bBehindSplitLine : 1;
SwTableFmlUpdate( const SwTable* );
};
class SwAutoFmtGetDocNode: public SwMsgPoolItem
{
public:
const SwCntntNode* pCntntNode;
const SwNodes* pNodes;
SwAutoFmtGetDocNode( const SwNodes* pNds );
};
/*
* SwAttrSetChg wird verschicht, wenn sich in dem SwAttrSet rTheChgdSet
* etwas veraendert hat. Es werden immer 2. Hints
* verschickt, die alten und neuen Items in dem rTheChgdSet.
*/
class SwAttrSetChg: public SwMsgPoolItem
{
BOOL bDelSet;
SwAttrSet* pChgSet; // was sich veraendert hat
const SwAttrSet* pTheChgdSet; // wird nur zum Vergleichen gebraucht !!
public:
SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet );
SwAttrSetChg( const SwAttrSetChg& );
~SwAttrSetChg();
// was sich veraendert hat
const SwAttrSet* GetChgSet() const { return pChgSet; }
SwAttrSet* GetChgSet() { return pChgSet; }
// wo es sich geaendert hat
const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
SfxItemState GetItemState( USHORT nWhich, BOOL bSrchInParent = TRUE,
const SfxPoolItem **ppItem = 0 ) const
{ return pChgSet->GetItemState( nWhich, bSrchInParent, ppItem ); }
USHORT Count() const { return pChgSet->Count(); }
void ClearItem( USHORT nWhich = 0 )
#ifdef PRODUCT
{ pChgSet->ClearItem( nWhich ); }
#else
;
#endif
};
class SwCondCollCondChg: public SwMsgPoolItem
{
public:
SwFmt *pChangedFmt;
SwCondCollCondChg( SwFmt *pFmt );
};
class SwVirtPageNumInfo: public SwMsgPoolItem
{
const SwPageFrm *pPage;
const SwPageFrm *pOrigPage;
const SwFrm *pFrm; //An einem Absatz/Tabelle koennen mehrere
//Attribute sitzen. Der Frame muss dann
//muss dann letztlich bei bestimmen
//welches Attribut gilt und um welche physikalische
//Seite es sich handelt.
public:
SwVirtPageNumInfo( const SwPageFrm *pPg );
const SwPageFrm *GetPage() { return pPage; }
const SwPageFrm *GetOrigPage() { return pOrigPage;}
const SwFrm *GetFrm() { return pFrm; }
void SetInfo( const SwPageFrm *pPg,
const SwFrm *pF ) { pFrm = pF, pPage = pPg; }
};
DECLARE_TABLE( SwTxtNodeTable, SwTxtNode* )
class SwNumRuleInfo : public SwMsgPoolItem
{
SwTxtNodeTable aList;
const String& rName;
public:
SwNumRuleInfo( const String& rRuleName );
const String& GetName() const { return rName; }
void AddNode( SwTxtNode& rNd );
// erzeuge die Liste aller Nodes der NumRule in dem angegebenem Doc
// Der Code steht im docnum.cxx
void MakeList( SwDoc& rDoc );
SwTxtNodeTable& GetList() const { return (SwTxtNodeTable&)aList; }
};
class SwNRuleLowerLevel : public SwMsgPoolItem
{
const String& rName;
BYTE nLvl;
public:
SwNRuleLowerLevel( const String& rRuleName, BYTE nLevel );
const String& GetName() const { return rName; }
BYTE GetLevel() const { return nLvl; }
};
class SwFindNearestNode : public SwMsgPoolItem
{
const SwNode *pNd, *pFnd;
public:
SwFindNearestNode( const SwNode& rNd );
void CheckNode( const SwNode& rNd );
const SwNode* GetFoundNode() const { return pFnd; }
};
#endif
+530
View File
@@ -0,0 +1,530 @@
/*************************************************************************
*
* $RCSfile: htmltbl.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _HTMLTBL_HXX
#define _HTMLTBL_HXX
#ifndef _TIMER_HXX //autogen
#include <vcl/timer.hxx>
#endif
#ifndef _SVX_SVXENUM_HXX //autogen
#include <svx/svxenum.hxx>
#endif
#include "swtypes.hxx"
#include "node.hxx" // Fuer SwStartNode
class SwTableBox;
class SwTable;
class SwHTMLTableLayout;
class SwDoc;
class SwFrmFmt;
#define HTMLTABLE_RESIZE_NOW (ULONG_MAX)
class SwHTMLTableLayoutCnts
{
SwHTMLTableLayoutCnts *pNext; // der naechste Inhalt
// von den beiden naechsten Pointern darf nur einer gesetzt sein!
SwTableBox *pBox; // ein Box
SwHTMLTableLayout *pTable; // eine "Tabelle in der Tabelle"
// Beim ersten Durchlauf gibt es noch keine Boxen. Es wird dann
// pStartNode anstelle von pBox verwendet.
const SwStartNode *pStartNode;
// Die folgenden Zahler geben an, wie oft ein Pass bereits fuer diesen
// Inhalt durchgefuehrt wurde. Dazu werden sie mit einer Soll-Vorgabe
// verglichen. Wird 255 erreicht laufen sie bei 0 weiter. So wird
// eine Reinitialisierung bei jedem Resize vermieden.
BYTE nPass1Done; // Wieoft wurde Pass 1 aufgerufen?
BYTE nWidthSet; // Wieoft wurde die Breite gesetzt?
BOOL bNoBreakTag; // <NOBR>-Tag ueber gesamten Inhalt
public:
SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
BOOL bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
~SwHTMLTableLayoutCnts();
void SetTableBox( SwTableBox *pBx ) { pBox = pBx; }
SwTableBox *GetTableBox() const { return pBox; }
SwHTMLTableLayout *GetTable() const { return pTable; }
const SwStartNode *GetStartNode() const;
// Ermitteln des naechsten Knotens
SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
void SetWidthSet( BYTE nRef ) { nWidthSet = nRef; }
BOOL IsWidthSet( BYTE nRef ) const { return nRef==nWidthSet; }
void SetPass1Done( BYTE nRef ) { nPass1Done = nRef; }
BOOL IsPass1Done( BYTE nRef ) const { return nRef==nPass1Done; }
BOOL HasNoBreakTag() const { return bNoBreakTag; }
};
/* */
class SwHTMLTableLayoutCell
{
SwHTMLTableLayoutCnts *pContents; // der Inhalt der Zelle
USHORT nRowSpan; // ROWSPAN der Zelle
USHORT nColSpan; // COLSPAN der Zelle
USHORT nWidthOption;// angegebene Breite der Zelle in Twip oder %
BOOL bPrcWidthOption : 1;// nWidth ist %-Angabe
BOOL bNoWrapOption : 1; // NOWRAP-Option
public:
SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
USHORT nRSpan, USHORT nCSpan,
USHORT nWidthOpt, BOOL bPrcWdthOpt,
BOOL nNWrapOpt );
~SwHTMLTableLayoutCell();
// Setzen/Ermitteln des Inhalts einer Zelle
void SetContents( SwHTMLTableLayoutCnts *pCnts ) { pContents = pCnts; }
SwHTMLTableLayoutCnts *GetContents() const { return pContents; }
inline void SetProtected();
// ROWSPAN/COLSPAN der Zelle Setzen/Ermitteln
void SetRowSpan( USHORT nRSpan ) { nRowSpan = nRSpan; }
USHORT GetRowSpan() const { return nRowSpan; }
USHORT GetColSpan() const { return nColSpan; }
USHORT GetWidthOption() const { return nWidthOption; }
BOOL IsPrcWidthOption() const { return bPrcWidthOption; }
BOOL HasNoWrapOption() const { return bNoWrapOption; }
};
/* */
class SwHTMLTableLayoutColumn
{
// Zwischenwerte von AutoLayoutPass1
ULONG nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
// Ergebnisse von AutoLayoutPass1
ULONG nMin, nMax;
// Ergibnisse von Pass 2
USHORT nAbsColWidth; // in Twips
USHORT nRelColWidth; // in Twips bzw. relativ zu USHRT_MAX
USHORT nWidthOption; // Optionen von <COL> oder <TD>/<TH>
BOOL bRelWidthOption : 1;
BOOL bLeftBorder : 1;
public:
SwHTMLTableLayoutColumn( USHORT nColWidthOpt, BOOL bRelColWidthOpt,
BOOL bLBorder );
~SwHTMLTableLayoutColumn() {}
inline void MergeCellWidthOption( USHORT nWidth, BOOL bPrc );
inline void SetWidthOption( USHORT nWidth, BOOL bRelWidth, BOOL bTest );
USHORT GetWidthOption() const { return nWidthOption; }
BOOL IsRelWidthOption() const { return bRelWidthOption; }
inline void MergeMinMaxNoAlign( ULONG nMin, ULONG nMax, ULONG nAbsMin );
ULONG GetMinNoAlign() const { return nMinNoAlign; }
ULONG GetMaxNoAlign() const { return nMaxNoAlign; }
ULONG GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
inline void ClearPass1Info( BOOL bWidthOpt );
inline void SetMinMax( ULONG nMin, ULONG nMax );
void SetMax( ULONG nVal ) { nMax = nVal; }
void AddToMin( ULONG nVal ) { nMin += nVal; }
void AddToMax( ULONG nVal ) { nMax += nVal; }
ULONG GetMin() const { return nMin; }
ULONG GetMax() const { return nMax; }
void SetAbsColWidth( USHORT nWidth ) { nAbsColWidth = nWidth; }
USHORT GetAbsColWidth() const { return nAbsColWidth; }
void SetRelColWidth( USHORT nWidth ) { nRelColWidth = nWidth; }
USHORT GetRelColWidth() const { return nRelColWidth; }
BOOL HasLeftBorder() const { return bLeftBorder; }
};
/* */
class SwHTMLTableLayout
{
Timer aResizeTimer; // Timer fuer DelayedResize
SwHTMLTableLayoutColumn **aColumns;
SwHTMLTableLayoutCell **aCells;
const SwTable *pSwTable; // die SwTable (nur Top-Table)
SwTableBox *pLeftFillerBox; // linke Filler-Zelle (nur Tab in Tab)
SwTableBox *pRightFillerBox; // rechte Filler-Zelle (nur Tab-in Tab)
ULONG nMin; // minimale Breite der Tabelle (Twips)
ULONG nMax; // maximale Breite der Tabelle (Twips)
USHORT nRows; // Anzahl Zeilen
USHORT nCols; // Anzahl Spalten
USHORT nLeftMargin; // Abstand zum linken Rand (aus Absatz)
USHORT nRightMargin; // Abstand zum rechten Rand (aus Absatz)
USHORT nInhAbsLeftSpace; // von umgebender Zelle geerbter Abstand,
USHORT nInhAbsRightSpace; // der Zellen zugeschlagen wurde
USHORT nRelLeftFill; // relative Breiten der Zellen zur
USHORT nRelRightFill; // Ausrichtung von Tabellen in Tabellen
USHORT nRelTabWidth; // Die relative Breite der Tabelle
USHORT nWidthOption; // die Breite der Tabelle (in Twip oder %)
USHORT nCellPadding; // Abstand zum Inhalt (in Twip)
USHORT nCellSpacing; // Absatnd zwischen Zellen (in Twip)
USHORT nBorder; // Dicke der ausseren Umrandung bzw.
// Platz, den Netscape hierfuer einrechnet.
USHORT nLeftBorderWidth;
USHORT nRightBorderWidth;
USHORT nInhLeftBorderWidth;
USHORT nInhRightBorderWidth;
USHORT nBorderWidth;
USHORT nDelayedResizeAbsAvail; // Param fuer's verzoegerte Resize
USHORT nLastResizeAbsAvail;
BYTE nPass1Done; // Vorgabe-Werte fuer die einzelen
BYTE nWidthSet; // Schleifen-Durchlauefe
SvxAdjust eTableAdjust; // Die Ausrichtung der Tabelle
BOOL bColsOption : 1; // Tabelle besitzt eine COLS-Option
BOOL bColTags : 1; // Tabelle besitzt COL/COLGRP-Tags
BOOL bPrcWidthOption : 1; // Breite ist eine %-Angabe
BOOL bUseRelWidth : 1; // SwTable bekommt relative Breite
BOOL bMustResize : 1; // Tabelle muss in der Breite ang. werden
BOOL bExportable : 1; // Layout kann zum Export genutzt werden
BOOL bBordersChanged : 1; // Umrandung wurde geaendert
BOOL bMayBeInFlyFrame : 1; // Die Tabelle koennte im Rahmen sein
BOOL bDelayedResizeRecalc : 1; // Param fuer's verzoegerte Resize
BOOL bMustNotResize : 1; // Die Tabelle darf nicht reseized werden
BOOL bMustNotRecalc : 1; // Tabelle darf nicht an Inhalt angepasst
// werden
// USHORT GetLeftBorderWidth( USHORT nCol ) const;
// USHORT GetRightBorderWidth( USHORT nCol, USHORT nColSpan ) const;
void AddBorderWidth( ULONG &rMin, ULONG &rMax, ULONG& rAbsMin,
USHORT nCol, USHORT nColSpan,
BOOL bSwBorders=TRUE ) const;
void SetBoxWidth( SwTableBox *pBox, USHORT nCol, USHORT nColSpan ) const;
const SwStartNode *GetAnyBoxStartNode() const;
SwFrmFmt *FindFlyFrmFmt() const;
const SwDoc *GetDoc() const { return GetAnyBoxStartNode()->GetDoc(); }
void ClearPass1Info() { nMin = nMax = 0; }
void _Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE );
DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
public:
SwHTMLTableLayout( const SwTable *pSwTbl,
USHORT nRows, USHORT nCols, BOOL bColsOpt, BOOL ColTgs,
USHORT nWidth, BOOL bPrcWidth, USHORT nBorderOpt,
USHORT nCellPad, USHORT nCellSp, SvxAdjust eAdjust,
USHORT nLMargin, USHORT nRMargin, USHORT nBWidth,
USHORT nLeftBWidth, USHORT nRightBWidth,
USHORT nInhLeftBWidth, USHORT nInhRightBWidth );
~SwHTMLTableLayout();
USHORT GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
BOOL bSwBorders=TRUE ) const;
USHORT GetRightCellSpace( USHORT nCol, USHORT nColSpan,
BOOL bSwBorders=TRUE ) const;
inline USHORT GetInhCellSpace( USHORT nCol, USHORT nColSpan ) const;
inline void SetInhBorderWidths( USHORT nLeft, USHORT nRight );
void GetAvail( USHORT nCol, USHORT nColSpan, USHORT& rAbsAvail,
USHORT& rRelAvail ) const;
void AutoLayoutPass1();
void AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
USHORT nAbsLeftSpace, USHORT nAbsRightSpace,
USHORT nParentInhSpace );
void SetWidths( BOOL bCallPass2=FALSE, USHORT nAbsAvail=0,
USHORT nRelAvail=0, USHORT nAbsLeftSpace=0,
USHORT nAbsRightSpace=0,
USHORT nParentInhSpace=0 );
inline SwHTMLTableLayoutColumn *GetColumn( USHORT nCol ) const;
inline void SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol );
inline SwHTMLTableLayoutCell *GetCell( USHORT nRow, USHORT nCol ) const;
inline void SetCell( SwHTMLTableLayoutCell *pCell, USHORT nRow, USHORT nCol );
void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; }
void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; }
ULONG GetMin() const { return nMin; }
ULONG GetMax() const { return nMax; }
USHORT GetRelLeftFill() const { return nRelLeftFill; }
USHORT GetRelRightFill() const { return nRelRightFill; }
inline long GetBrowseWidthMin() const;
BOOL HasColsOption() const { return bColsOption; }
BOOL HasColTags() const { return bColTags; }
BOOL IsTopTable() const { return pSwTable != 0; }
void SetMustResize( BOOL bSet ) { bMustResize = bSet; }
void SetMustNotResize( BOOL bSet ) { bMustNotResize = bSet; }
void SetMustNotRecalc( BOOL bSet ) { bMustNotRecalc = bSet; }
// Neueberechnung der Tabellenbreiten fuer die uebergebene verfuegbare
// Breite.
// - Wenn bRecalc gesetzt ist, werden auch der Inhalt der Boxen
// zur Berechnung herangezogen.
// neu berechnet.
// - Wenn bForce gesetzt ist, wird die Tabelle auch neu berechnet, wenn
// dies mit SetMustNotResize unterdrueckt werden soll.
// - Wenn nDelay>0 wird die Berechnung entsprechend verzoegert.
// Innerhalb der Verzeoegerung auftretende Resize-Aufrufe werden
// ignoriert, die Verzeogerung wird aber ggf. uebernommen.
// - Wenn nDelay==HTMLTABLE_RESIZE_NOW ist, wird sofort Resized und
// eventuell noch asstehende Resize-Aufrufe werden nicht mehr
// ausgefuehrt.
// - Der Rueckgabewert gibt an, ob sich die Tabelle geaendert hat.
BOOL Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE, BOOL bForce=FALSE,
ULONG nDelay=0 );
void BordersChanged( USHORT nAbsAvail, BOOL bRecalc=FALSE );
// Ermitteln der verfuegbaren Breite. Das geht nur, wenn ein Layout
// oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben.
// (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.)
static USHORT GetBrowseWidth( const SwDoc& rDoc );
static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc );
// Ermitteln der verfuegbaren Breite uber den Tabellen-Frame
USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
// Ermitteln der verfuegbaren Breite uber den Tabellen-Frame oder
// das statische GetBrowseWidth, wenn kein Layout existiert.
USHORT GetBrowseWidthByTable( const SwDoc& rDoc ) const;
// Fuer Export
USHORT GetWidthOption() const { return nWidthOption; }
BOOL HasPrcWidthOption() const { return bPrcWidthOption; }
USHORT GetCellPadding() const { return nCellPadding; }
USHORT GetCellSpacing() const { return nCellSpacing; }
USHORT GetBorder() const { return nBorder; }
USHORT GetRowCount() const { return nRows; }
USHORT GetColCount() const { return nCols; }
void SetExportable( BOOL bSet ) { bExportable = bSet; }
BOOL IsExportable() const { return bExportable; }
BOOL HaveBordersChanged() const { return bBordersChanged; }
void SetMayBeInFlyFrame( BOOL bSet ) { bMayBeInFlyFrame = bSet; }
BOOL MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
};
/* */
inline void SwHTMLTableLayoutCell::SetProtected()
{
nRowSpan = 1;
nColSpan = 1;
pContents = 0;
}
/* */
inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( ULONG nMin,
ULONG nMax, ULONG nAbsMin )
{
if( nMin > nMinNoAlign )
nMinNoAlign = nMin;
if( nMax > nMaxNoAlign )
nMaxNoAlign = nMax;
if( nAbsMin > nAbsMinNoAlign )
nAbsMinNoAlign = nAbsMin;
}
inline void SwHTMLTableLayoutColumn::ClearPass1Info( BOOL bWidthOpt )
{
nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY;
nMin = nMax = 0;
if( bWidthOpt )
{
nWidthOption = 0;
bRelWidthOption = FALSE;
}
}
inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
USHORT nWidth, BOOL bRel )
{
if( !nWidthOption ||
(bRel==bRelWidthOption && nWidthOption < nWidth) )
{
nWidthOption = nWidth;
bRelWidthOption = bRel;
}
}
inline void SwHTMLTableLayoutColumn::SetMinMax( ULONG nMn, ULONG nMx )
{
nMin = nMn;
nMax = nMx;
}
/* */
inline USHORT SwHTMLTableLayout::GetInhCellSpace( USHORT nCol,
USHORT nColSpan ) const
{
USHORT nSpace = 0;
if( nCol==0 )
nSpace += nInhAbsLeftSpace;
if( nCol+nColSpan==nCols )
nSpace += nInhAbsRightSpace;
return nSpace;
}
inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( USHORT nCol ) const
{
return aColumns[nCol];
}
inline void SwHTMLTableLayoutColumn::SetWidthOption(
USHORT nWidth, BOOL bRelWidth, BOOL bTest )
{
if( bTest && bRelWidthOption==bRelWidth )
{
if( nWidth > nWidthOption )
nWidthOption = nWidth;
}
else
nWidthOption = nWidth;
bRelWidthOption = bRelWidth;
}
inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol )
{
aColumns[nCol] = pCol;
}
inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( USHORT nRow, USHORT nCol ) const
{
return aCells[nRow*nCols+nCol];
}
inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell,
USHORT nRow, USHORT nCol )
{
aCells[nRow*nCols+nCol] = pCell;
}
inline long SwHTMLTableLayout::GetBrowseWidthMin() const
{
return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth );
}
void SwHTMLTableLayout::SetInhBorderWidths( USHORT nLeft, USHORT nRight )
{
nInhLeftBorderWidth = nLeft;
nInhRightBorderWidth = nRight;
}
#endif
+318
View File
@@ -0,0 +1,318 @@
/*************************************************************************
*
* $RCSfile: index.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _INDEX_HXX
#define _INDEX_HXX
#include <limits.h>
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
#ifndef _RTTI_HXX
#include <tools/rtti.hxx> // for RTTI of SwIndexReg
#endif
#ifndef _STRING_HXX
#include <tools/string.hxx> // for xub_StrLen
#endif
#define INVALID_INDEX STRING_NOTFOUND
// Maximale Anzahl von Indizies im IndexArray (zum Abtesten auf Ueberlaeufe)
class SwIndex;
class SwIndexReg;
#ifdef PRODUCT
#define INLINE inline
#else
#define INLINE
#endif
class SwIndex
{
friend class SwIndexReg;
#ifndef PRODUCT
static int nSerial;
int MySerial;
#endif
xub_StrLen nIndex;
SwIndexReg* pArray;
SwIndex *pNext, *pPrev;
SwIndex& ChgValue( const SwIndex& rIdx, xub_StrLen nNewValue );
void Remove(); // Ausketten
public:
SwIndex( SwIndexReg * pReg, xub_StrLen nIdx = 0 );
SwIndex( const SwIndex & );
SwIndex( const SwIndex &, short nDiff );
~SwIndex() { Remove(); }
INLINE xub_StrLen operator++();
INLINE xub_StrLen operator--();
#ifndef CFRONT
INLINE xub_StrLen operator++(int);
INLINE xub_StrLen operator--(int);
#endif
INLINE xub_StrLen operator+=( xub_StrLen );
INLINE xub_StrLen operator-=( xub_StrLen );
INLINE xub_StrLen operator+=( const SwIndex& );
INLINE xub_StrLen operator-=( const SwIndex& );
INLINE BOOL operator<( const SwIndex& ) const;
INLINE BOOL operator<=( const SwIndex& ) const;
INLINE BOOL operator>( const SwIndex& ) const;
INLINE BOOL operator>=( const SwIndex& ) const;
BOOL operator==( const SwIndex& rSwIndex ) const
{ return (nIndex == rSwIndex.nIndex) && (pArray == rSwIndex.pArray); }
BOOL operator!=( const SwIndex& rSwIndex ) const
{ return (nIndex != rSwIndex.nIndex) || (pArray != rSwIndex.pArray); }
BOOL operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
BOOL operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
BOOL operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
BOOL operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
BOOL operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
BOOL operator!=( xub_StrLen nWert ) const { return nIndex != nWert; }
INLINE SwIndex& operator=( xub_StrLen );
SwIndex& operator=( const SwIndex & );
// gebe den Wert vom Index als xub_StrLen zurueck
xub_StrLen GetIndex() const { return nIndex; }
// ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren
// Objektes
SwIndex &Assign(SwIndexReg *,xub_StrLen);
// Herausgabe des Pointers auf das IndexArray,
// (fuers RTTI am SwIndexReg)
const SwIndexReg* GetIdxReg() const { return pArray; }
};
#undef INLINE
class SwIndexReg
{
friend class SwIndex;
const SwIndex *pFirst, *pLast, *pMiddle;
// ein globales Array, in das Indizies verschoben werden, die mal
// temporaer "ausgelagert" werden muessen; oder die zum Zeitpunkt des
// anlegens kein gueltiges Array kennen (SwPaM/SwPosition!)
friend void _InitCore();
friend void _FinitCore();
static SwIndexReg* pEmptyIndexArray;
protected:
virtual void Update( const SwIndex & aPos, xub_StrLen nLen,
BOOL bNegativ = FALSE );
void ChkArr();
BOOL HasAnyIndex() const { return 0 != pFirst; }
// fuer das Move am RegArray:
void MoveIdx( const SwIndex& rOldPos, const SwIndex& rNewPos );
public:
SwIndexReg();
#ifndef PRODUCT
~SwIndexReg();
#endif
// rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
// kann ueber das SwIndexReg typsicher gecastet werden.
TYPEINFO();
void SetDefMiddle( const SwIndex* pIdx ) { pMiddle = pIdx; }
void MoveTo( SwIndexReg& rArr );
};
#ifdef PRODUCT
inline xub_StrLen SwIndex::operator++()
{
return ChgValue( *this, nIndex+1 ).nIndex;
}
inline xub_StrLen SwIndex::operator--()
{
return ChgValue( *this, nIndex-1 ).nIndex;
}
#ifndef CFRONT
inline xub_StrLen SwIndex::operator++(int)
{
xub_StrLen nOldIndex = nIndex;
ChgValue( *this, nIndex+1 );
return nOldIndex;
}
inline xub_StrLen SwIndex::operator--(int)
{
xub_StrLen nOldIndex = nIndex;
ChgValue( *this, nIndex-1 );
return nOldIndex;
}
#endif
inline xub_StrLen SwIndex::operator+=( xub_StrLen nWert )
{
return ChgValue( *this, nIndex + nWert ).nIndex;
}
inline xub_StrLen SwIndex::operator-=( xub_StrLen nWert )
{
return ChgValue( *this, nIndex - nWert ).nIndex;
}
inline xub_StrLen SwIndex::operator+=( const SwIndex& rIndex )
{
return ChgValue( *this, nIndex + rIndex.nIndex ).nIndex;
}
inline xub_StrLen SwIndex::operator-=( const SwIndex& rIndex )
{
return ChgValue( *this, nIndex - rIndex.nIndex ).nIndex;
}
inline BOOL SwIndex::operator<( const SwIndex& rIndex ) const
{
return nIndex < rIndex.nIndex;
}
inline BOOL SwIndex::operator<=( const SwIndex& rIndex ) const
{
return nIndex <= rIndex.nIndex;
}
inline BOOL SwIndex::operator>( const SwIndex& rIndex ) const
{
return nIndex > rIndex.nIndex;
}
inline BOOL SwIndex::operator>=( const SwIndex& rIndex ) const
{
return nIndex >= rIndex.nIndex;
}
inline SwIndex& SwIndex::operator=( xub_StrLen nWert )
{
if( nIndex != nWert )
ChgValue( *this, nWert );
return *this;
}
// PRODUCT
#endif
/******************************************************************
Source Code Control System - Header
$Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/inc/index.hxx,v 1.1.1.1 2000-09-18 17:14:26 hr Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
Revision 1.67 2000/09/18 16:03:22 willem.vandorp
OpenOffice header added.
Revision 1.66 2000/09/08 13:24:17 willem.vandorp
Header and footer replaced
Revision 1.65 2000/04/12 13:53:23 jp
Unicode changes
Revision 1.64 1999/02/25 08:20:48 JP
Task #62314#: Asynchrone DDE-Links/-Requests
Rev 1.63 25 Feb 1999 09:20:48 JP
Task #62314#: Asynchrone DDE-Links/-Requests
Rev 1.62 27 Nov 1997 09:20:28 JP
neu: SwIndexReg::MoveTo - move alle Indiezies aus einem Array ins andere
Rev 1.61 11 Nov 1997 20:36:48 JP
SwIndexReg CTOR/DTOR jetzt public
Rev 1.60 10 Oct 1997 14:03:20 JP
SwRange wird nicht mehr benoetigt
Rev 1.59 09 Oct 1997 15:11:50 JP
Umstellung NodeIndex/-Array/BigPtrArray
Rev 1.58 07 Aug 1997 14:41:26 OM
Headerfile-Umstellung
Rev 1.57 18 Jul 1997 12:21:20 MA
includes
Rev 1.56 08 Nov 1995 15:47:10 MA
opt: operatoren entfernt
Rev 1.55 25 Jun 1995 16:49:20 JP
Unter Windows nun auch den neuen Index
Rev 1.54 09 May 1995 08:44:28 KH
#ifdef MAC -> #ifdef CFRONT
*******************************************************************/
#endif
+142
View File
@@ -0,0 +1,142 @@
/*************************************************************************
*
* $RCSfile: inetfld.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _INETFLD_HXX
#define _INETFLD_HXX
#include "fldbas.hxx"
class SvxMacro;
class SvxMacroTableDtor;
class SwINetField;
class SwCharFmt;
class SwDoc;
/*--------------------------------------------------------------------
Beschreibung: InterNet-FieldType -> Lade Document mit der URL
--------------------------------------------------------------------*/
class SwINetFieldType : public SwFieldType
{
SwDepend aNormalFmt;
SwDepend aVisitFmt;
SwDoc* pDoc;
public:
SwINetFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
SwCharFmt* GetCharFmt( const SwINetField& rFld );
SwDoc* GetDoc() const { return pDoc; }
};
/*--------------------------------------------------------------------
Beschreibung: InterNet-Field -> Lade Document mit der URL
--------------------------------------------------------------------*/
class SwINetField : public SwField
{
friend class SwINetFieldType;
String sTargetFrameName; // in diesen Frame soll die URL
String sURL;
String sText;
SvxMacroTableDtor* pMacroTbl;
public:
// Direkte Eingabe alten Wert loeschen
SwINetField( SwINetFieldType* pTyp, USHORT nFmt,
const String& rURL, const String& rText );
virtual ~SwINetField();
virtual String GetCntnt(BOOL bName = FALSE) const;
virtual String Expand() const;
virtual SwField* Copy() const;
// URL
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// HinweisText
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
// das ist das akt. Zeichenformat
SwCharFmt* GetCharFmt();
const SwCharFmt* GetCharFmt() const
{ return ((SwINetField*)this)->GetCharFmt(); }
const String& GetTargetFrameName() const { return sTargetFrameName; }
void SetTargetFrameName( const String& rNm ) { sTargetFrameName = rNm; }
// setze eine neue oder loesche die akt. MakroTabelle
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
// setze / erfrage ein Makro
void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
const SvxMacro* GetMacro( USHORT nEvent ) const;
};
#endif // _INETFLD_HXX
+78
View File
@@ -0,0 +1,78 @@
/*************************************************************************
*
* $RCSfile: init.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _INIT_HXX
#define _INIT_HXX
void _InitCore(); // bastyp/init.cxx
void _FinitCore();
void _InitFilter(); // basflt/fltini.cxx
void _FinitFilter();
// layout/frame.cxx
void _FrmInit();
// text/txtfrm.cxx
void _TextInit();
void _TextFinit();
#endif
+221
View File
@@ -0,0 +1,221 @@
/*************************************************************************
*
* $RCSfile: io.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
// eigene Klasse fuer IO, die die systemunabhaengige Darstellung
// uebernimmt (bytes dreht, Character konvertiert)
// das Schreiben erfolgt aus Effizienzgruenden binaer
#ifndef _IO_HXX
#define _IO_HXX
#ifndef MAC
#ifdef UNX
#include <unistd.h>
#else
#include <io.h>
#endif
#else
#include <mac_start.h> // wegen fcntl und sv
#endif
#include <fcntl.h>
#ifndef MAC
#include <sys/types.h>
#include <sys/stat.h>
#else
#include <mac_end.h>
#endif
#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
#endif
#ifndef _STREAM_HXX //autogen
#include <tools/stream.hxx>
#endif
/*$
class BinaryFile {
int fd;
public:
enum IO_OpenMode {
BF_READ = O_RDONLY,
BF_WRITE = O_RDWR,
BF_CREATE = O_CREAT,
BF_TRUNC = O_TRUNC
};
// ctor oeffnet File im BinearMode, dtor schliesst es
BinaryFile(const String &, int eOpenMode);
~BinaryFile();
BOOL Ok() const {
return -1 != fd;
}
operator int() const { return fd; }
};
*/
class SwIOin {
private:
SvFileStream aStr; //$ ifstream
public:
// Stream wird im entsprechenden Mode erzeugt.
SwIOin(const String &rFilename, StreamMode nMode =
STREAM_READ | STREAM_NOCREATE );
SwIOin& operator>>(char& val);
SwIOin& operator>>(unsigned char& val);
SwIOin& operator>>(char* val);
SwIOin& operator>>(unsigned char* val);
SwIOin& operator>>(short& val);
SwIOin& operator>>(unsigned short& val);
SwIOin& operator>>(long& val);
SwIOin& operator>>(unsigned long& val);
String ReadString();
KeyCode ReadKeyCode();
// kann erweitert werden fuer weitere Arrays von
// Basistypen; nLen ist die Anzahl der Elemente
SwIOin& Read(char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
SvFileStream &operator()() {
return aStr;
}
};
class SwIOout {
private:
void _write(const char *buf, unsigned size);
SvFileStream aStr; //$ ofstream
public:
// Stream wird im entsprechenden Mode erzeugt.
SwIOout( const String &rFilename, StreamMode nMode =
STREAM_WRITE | STREAM_NOCREATE );
SwIOout& operator<<(char val);
SwIOout& operator<<(unsigned char val);
SwIOout& operator<<(char* val);
SwIOout& operator<<(unsigned char* val);
SwIOout& operator<<(short val);
SwIOout& operator<<(unsigned short val);
SwIOout& operator<<(long val);
SwIOout& operator<<(unsigned long val);
SwIOout& operator<<(const String &);
SwIOout& operator<<(const KeyCode &);
// kann erweitert werden fuer weitere Arrays von
// Basistypen; nLen ist die Anzahl der Elemente
SwIOout& Write(const char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
SvFileStream &operator()() {
return aStr;
}
};
class SwIOinout {
private:
SvFileStream aStr; //$ fstream
public:
// Stream wird im entsprechenden Mode erzeugt.
SwIOinout(const String &rFilename, StreamMode nMode =
STREAM_READWRITE | STREAM_NOCREATE );
SwIOinout& operator>>(char& val);
SwIOinout& operator>>(unsigned char& val);
SwIOinout& operator>>(char* val);
SwIOinout& operator>>(unsigned char* val);
SwIOinout& operator>>(short& val);
SwIOinout& operator>>(unsigned short& val);
SwIOinout& operator>>(long& val);
SwIOinout& operator>>(unsigned long& val);
String ReadString();
KeyCode ReadKeyCode();
// kann erweitert werden fuer weitere Arrays von
// Basistypen; nLen ist die Anzahl der Elemente
SwIOinout& Read(char *buf, unsigned nLen);
SwIOinout& Read(unsigned short *buf, unsigned nLen );
SwIOinout& operator<<(char val);
SwIOinout& operator<<(unsigned char val);
SwIOinout& operator<<(char* val);
SwIOinout& operator<<(unsigned char* val);
SwIOinout& operator<<(short val);
SwIOinout& operator<<(unsigned short val);
SwIOinout& operator<<(long val);
SwIOinout& operator<<(unsigned long val);
SwIOinout& operator<<(const String &);
SwIOinout& operator<<(const KeyCode &);
// kann erweitert werden fuer weitere Arrays von
// Basistypen; nLen ist die Anzahl der Elemente
SwIOinout& Write(const char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
SvFileStream &operator()() {
return aStr;
}
BOOL Ok();
};
#endif
+77
View File
@@ -0,0 +1,77 @@
/*************************************************************************
*
* $RCSfile: itabenum.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _ITABENUM_HXX
#define _ITABENUM_HXX
enum SwTableInsMode
{
DEFAULT_BORDER = 0x01,
HEADLINE = 0x02,
REPEAT = 0x04,
HEADLINE_REPEAT = 0x06, // Headline + Repeat
SPLIT_LAYOUT = 0x08,
HEADLINE_NO_BORDER = HEADLINE_REPEAT|SPLIT_LAYOUT,
ALL_TBL_INS_ATTR = DEFAULT_BORDER|HEADLINE_REPEAT|SPLIT_LAYOUT
};
#endif
+144
View File
@@ -0,0 +1,144 @@
/*************************************************************************
*
* $RCSfile: lineinfo.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef SW_LINEINFO_HXX
#define SW_LINEINFO_HXX
#ifndef _CALBCK_HXX
#include "calbck.hxx"
#endif
#ifndef _NUMRULE_HXX
#include "numrule.hxx"
#endif
class SwCharFmt;
class SwDoc;
enum LineNumberPosition
{
LINENUMBER_POS_LEFT,
LINENUMBER_POS_RIGHT,
LINENUMBER_POS_INSIDE,
LINENUMBER_POS_OUTSIDE
};
class SwLineNumberInfo : public SwClient //purpose of derivation from SwClient:
//character style for displaying the numbers.
{
SwNumType aType; //e.g. roman linenumbers
String aDivider; //String for aditional interval (vert. lines user defined)
USHORT nPosFromLeft; //Position for paint
USHORT nCountBy; //Paint only for every n line
USHORT nDividerCountBy; //Interval for display of an user defined
//string every n lines
LineNumberPosition ePos; //Where should the display occur (number and divicer)
BOOL bPaintLineNumbers; //Should anything be displayed?
BOOL bCountBlankLines; //Count empty lines?
BOOL bCountInFlys; //Count also within FlyFrames?
BOOL bRestartEachPage; //Restart counting at the first paragraph of each page
//(even on follows when paragraphs are splitted)
public:
SwLineNumberInfo();
SwLineNumberInfo(const SwLineNumberInfo&);
SwLineNumberInfo& operator=(const SwLineNumberInfo&);
BOOL operator==( const SwLineNumberInfo& rInf ) const;
SwCharFmt *GetCharFmt(SwDoc &rDoc) const;
void SetCharFmt( SwCharFmt* );
const SwNumType &GetNumType() const { return aType; }
void SetNumType( SwNumType aNew ) { aType = aNew; }
const String &GetDivider() const { return aDivider; }
void SetDivider( const String &r ) { aDivider = r; }
USHORT GetDividerCountBy() const { return nDividerCountBy; }
void SetDividerCountBy( USHORT n ) { nDividerCountBy = n; }
USHORT GetPosFromLeft() const { return nPosFromLeft; }
void SetPosFromLeft( USHORT n) { nPosFromLeft = n; }
USHORT GetCountBy() const { return nCountBy; }
void SetCountBy( USHORT n) { nCountBy = n; }
LineNumberPosition GetPos() const { return ePos; }
void SetPos( LineNumberPosition eP ){ ePos = eP; }
BOOL IsPaintLineNumbers() const { return bPaintLineNumbers; }
void SetPaintLineNumbers( BOOL b ){ bPaintLineNumbers = b; }
BOOL IsCountBlankLines() const { return bCountBlankLines; }
void SetCountBlankLines( BOOL b ) { bCountBlankLines = b; }
BOOL IsCountInFlys() const { return bCountInFlys; }
void SetCountInFlys( BOOL b ) { bCountInFlys = b; }
BOOL IsRestartEachPage() const { return bRestartEachPage; }
void SetRestartEachPage( BOOL b ) { bRestartEachPage = b; }
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
};
#endif
+73
View File
@@ -0,0 +1,73 @@
/*************************************************************************
*
* $RCSfile: linkenum.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _LINKENUM_HXX
#define _LINKENUM_HXX
enum UpdateLinks
{
NEVER,
MANUAL,
AUTOMATIC,
GLOBALSETTING
};
#endif
+118
View File
@@ -0,0 +1,118 @@
/*************************************************************************
*
* $RCSfile: mdiexp.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _MDIEXP_HXX
#define _MDIEXP_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
class UniString;
class SwRect;
class Size;
class Dialog;
class ViewShell;
class SwDoc;
class SwDocShell;
class SfxObjectShell;
class SfxFrame;
extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, USHORT nRangeX, USHORT nRangeY);
extern BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect &);
extern void SizeNotify(ViewShell* pVwSh, const Size &);
//Update der Statusleiste, waehrend einer Action.
extern void PageNumNotify( ViewShell* pVwSh,
USHORT nPhyNum,
USHORT nVirtNum,
const UniString& rPg );
enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END };
extern void FrameNotify( ViewShell* pVwSh, FlyMode eMode = FLY_DRAG );
void StartProgress ( USHORT nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
void EndProgress ( SwDocShell *pDocSh = 0 );
void SetProgressState ( long nPosition, SwDocShell *pDocShell );
void SetProgressText ( USHORT nMessId, SwDocShell *pDocShell );
void RescheduleProgress( SwDocShell *pDocShell );
void EnableCmdInterface(BOOL bEnable = TRUE);
Dialog* GetSearchDialog();
void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect );
//paintfrm.cxx
void RemoveFromBackgroundCache( const SfxObjectShell &rDocSh, FASTBOOL bFreeze );
//grfcache.cxx
// alle QuickDraw-Bitmaps loeschen (pDoc = 0) oder alle des speziellen Docs
void DelAllGrfCacheEntries( SwDoc* pDoc = 0 );
extern void JavaScriptScrollMDI( SfxFrame* pFrame, INT32 nX, INT32 nY );
// ChgMode fuer Tabellen aus der Konfiguration lesen
USHORT GetTblChgDefaultMode();
BOOL JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
#endif
+353
View File
@@ -0,0 +1,353 @@
/*************************************************************************
*
* $RCSfile: ndarr.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDARR_HXX
#define _NDARR_HXX
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
#ifndef _BPARR_HXX
#include <bparr.hxx>
#endif
#ifndef _NDTYP_HXX
#include <ndtyp.hxx>
#endif
class Graphic;
class UniString;
class SvInPlaceObject;
class SwAttrSet;
class SwCntntFrm;
class SwCntntNode;
class SwDoc;
class SwGrfFmtColl;
class SwGrfNode;
class SwHistory;
class SwNode;
class SwNodeIndex;
class SwNodeRange;
class SwOLENode;
class SwOutlineNodes;
class SwPaM;
class SwSection;
class SwSectionFmt;
class SwSectionNode;
class SwStartNode;
class SwTableBoxFmt;
class SwTableFmt;
class SwTableLine;
class SwTableLineFmt;
class SwTableNode;
class SwTblToTxtSaves;
class SwTxtFmtColl;
class SwTxtNode;
class SwUndoInsNum;
class SwUndoTblToTxt;
class SwUndoTxtToTbl;
struct SwPosition;
// --------------------
// class SwNodes
// --------------------
typedef SwNode * SwNodePtr;
typedef BOOL (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
SV_DECL_PTRARR_SORT( SwOutlineNodes, SwNodePtr, 0, 10 )
class SwNodes: private BigPtrArray
{
friend class SwDoc;
friend class SwNode;
friend class SwNodeIndex;
SwNodePtr operator[]( USHORT n ) const;
SwNodePtr operator[]( int n ) const;
SwNodeIndex* pRoot; // Liste aller Indizies auf Nodes
void Insert( const SwNodePtr pNode, const SwNodeIndex& rPos );
void Insert( const SwNodePtr pNode, ULONG nPos);
// void Remove( const SwNodeIndex& rPos, USHORT nLen = 1 );
// void Remove( ULONG nPos, USHORT nLen = 1 );
// BOOL Move( const SwIndex & rOldPos, const SwIndex & rNewPos );
SwDoc* pMyDoc; // in diesem Doc ist das Nodes-Array
SwNode *pEndOfPostIts, *pEndOfInserts, // das sind die festen Bereiche
*pEndOfAutotext, *pEndOfRedlines,
*pEndOfContent;
SwOutlineNodes* pOutlineNds; // Array aller GliederiungsNodes
BOOL bInNodesDel : 1; // falls rekursiv aufgerufen wird
// Num/Outline nicht aktualisierem
BOOL bInDelUpdOutl : 1; // Flags fuers aktualisieren von Outl.
BOOL bInDelUpdNum : 1; // Flags fuers aktualisieren von Outl.
// fuer dier Verwaltung der Indizies
void RegisterIndex( SwNodeIndex& rIdx );
void DeRegisterIndex( SwNodeIndex& rIdx );
void RemoveNode( ULONG nDelPos, ULONG nLen, FASTBOOL bDel );
// Aktionen auf die Nodes
void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
void DelNodes( const SwNodeIndex& rStart, ULONG nCnt = 1 );
void ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
SwNodeIndex& rInsPos, BOOL bNewFrms );
void UpdtOutlineIdx( const SwNode& ); // Update ab Node alle OutlineNodes
void _CopyNodes( const SwNodeRange&, const SwNodeIndex&,
BOOL bNewFrms = TRUE, BOOL bTblInsDummyNode = FALSE ) const;
void _DelDummyNodes( const SwNodeRange& rRg );
protected:
SwNodes( SwDoc* pDoc );
public:
~SwNodes();
SwNodePtr operator[]( ULONG n ) const
{ return (SwNodePtr)BigPtrArray::operator[] ( n ); }
//JP 29.09.97: impl. steht im ndindex.hxx - sollte moeglichst bald auf die
// neue Schnittstelle angepasst werden
inline SwNodePtr operator[]( const SwNodeIndex& rIdx ) const;
ULONG Count() const { return BigPtrArray::Count(); }
void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 )
{
BigPtrArray::ForEach( 0, BigPtrArray::Count(),
(FnForEach) fnForEach, pArgs );
}
void ForEach( ULONG nStt, ULONG nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 )
{
BigPtrArray::ForEach( nStt, nEnd, (FnForEach) fnForEach, pArgs );
}
void ForEach( const SwNodeIndex& rStart, const SwNodeIndex& rEnd,
FnForEach_SwNodes fnForEach, void* pArgs = 0 );
// eine noch leere Section
SwNode& GetEndOfPostIts() const { return *pEndOfPostIts; }
// Section fuer alle Fussnoten
SwNode& GetEndOfInserts() const { return *pEndOfInserts; }
// Section fuer alle Flys/Header/Footers
SwNode& GetEndOfAutotext() const { return *pEndOfAutotext; }
// Section fuer alle Redlines
SwNode& GetEndOfRedlines() const { return *pEndOfRedlines; }
// das ist der letzte EndNode einer SonderSection. Hier nach kommt nur
// noch die normale ContentSection (also der BodyText)
SwNode& GetEndOfExtras() const { return *pEndOfRedlines; }
// die normale ContentSection (also der BodyText)
SwNode& GetEndOfContent() const { return *pEndOfContent; }
// ist das NodesArray das normale vom Doc? (nicht das UndoNds, .. )
// Implementierung steht im doc.hxx (weil man dazu Doc kennen muss) !
inline BOOL IsDocNodes() const;
USHORT GetSectionLevel(const SwNodeIndex &rIndex) const;
void Delete(const SwNodeIndex &rPos, ULONG nNodes = 1);
BOOL _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
BOOL bNewFrms = TRUE );
void Move( SwPaM&, SwPosition&, SwNodes& rNodes, BOOL bSplitNd=TRUE );
void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos,
BOOL bNewFrms = TRUE ) const
{ _CopyNodes( rRg, rInsPos, bNewFrms ); }
void SectionUp( SwNodeRange *);
void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode );
BOOL CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const;
void GoStartOfSection(SwNodeIndex *) const;
void GoEndOfSection(SwNodeIndex *) const;
SwCntntNode* GoNext(SwNodeIndex *) const;
SwCntntNode* GoPrevious(SwNodeIndex *) const;
//Gehe zum naechsten/vorherigen Cntnt/Tabellennode, fuer den
//es LayoutFrames gibt, dabei Kopf-/Fusszeilen/Rahmen etc. nicht verlassen
SwNode* GoNextWithFrm(SwNodeIndex *) const;
SwNode* GoPreviousWithFrm(SwNodeIndex *) const;
// zum naechsten Content-Node, der nicht geschuetzt oder versteckt ist
// (beides auf FALSE ==> GoNext/GoPrevious!!!)
SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = TRUE,
int bSkipProtect = TRUE ) const;
SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = TRUE,
int bSkipProtect = TRUE ) const;
// erzeuge ein leere Section von Start und EndNode. Darf nur gerufen
// werden, wenn eine neue Section mit Inhalt erzeugt werden soll.
// Zum Beispiel bei den Filtern/Undo/...
SwStartNode* MakeEmptySection( const SwNodeIndex& rIdx,
SwStartNodeType = SwNormalStartNode );
SwCntntFrm *MakeFrm(const SwNodeIndex &rIndex);
// die Impl. von "Make...Node" stehen in den angegebenen .ccx-Files
SwTxtNode *MakeTxtNode( const SwNodeIndex & rWhere,
SwTxtFmtColl *pColl,
SwAttrSet* pAutoAttr = 0 ); // in ndtxt.cxx
SwStartNode* MakeTextSection( const SwNodeIndex & rWhere,
SwStartNodeType eSttNdTyp,
SwTxtFmtColl *pColl,
SwAttrSet* pAutoAttr = 0 );
SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
const UniString& rGrfName,
const UniString& rFltName,
const Graphic* pGraphic,
SwGrfFmtColl *pColl,
SwAttrSet* pAutoAttr = 0,
BOOL bDelayed = FALSE ); // in ndgrf.cxx
SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
SvInPlaceObject *pObj,
SwGrfFmtColl *pColl,
SwAttrSet* pAutoAttr = 0 ); // in ndole.cxx
SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
UniString &rName,
SwGrfFmtColl *pColl,
SwAttrSet* pAutoAttr = 0 ); // in ndole.cxx
// Array aller GliederiungsNodes;
const SwOutlineNodes& GetOutLineNds() const { return *pOutlineNds; }
// ab einem bestimmten TextNode alle Updaten
void UpdateOutlineNode( const SwNode&, BYTE nOldLevel, BYTE nNewLevel );
// alle Nodes Updaten - Rule/Format-Aenderung
void UpdateOutlineNodes();
// fuege die Nodes fuer die Tabelle ein
// wenn Lines angegeben, erzeuge die Matrix aus Lines & Boxen
// ansonsten nur die Anzahl von Boxen.
SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
USHORT nBoxes, SwTxtFmtColl* pCntntTxtColl,
USHORT nLines=0, SwTxtFmtColl* pHeadlineTxtColl=0 );
// erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
SwTableNode* TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
SwTableFmt* pTblFmt,
SwTableLineFmt* pLineFmt,
SwTableBoxFmt* pBoxFmt,
SwTxtFmtColl* pTxtColl,
SwUndoTxtToTbl* pUndo = 0 );
// erzeuge aus der Tabelle wieder normalen Text
BOOL TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SwUndoTblToTxt* = 0 );
// steht im untbl.cxx und darf nur vom Undoobject gerufen werden
SwTableNode* UndoTableToText( ULONG nStt, ULONG nEnd,
const SwTblToTxtSaves& rSavedData );
// fuege in der Line, vor der InsPos eine neue Box ein. Das Format
// wird von der nachfolgenden (vorhergenden;wenn an Ende) genommen
// in der Line muss schon eine Box vorhanden sein !
BOOL InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
// Formate fuer den TextNode der Box
SwTxtFmtColl*, SwAttrSet* pAutoAttr,
USHORT nInsPos, USHORT nCnt = 1 );
// Splittet eine Tabelle in der Grund-Zeile, in der der Index steht.
// Alle GrundZeilen dahinter wandern in eine neue Tabelle/-Node.
// Ist das Flag bCalcNewSize auf TRUE, wird fuer beide neuen Tabellen
// die neue SSize aus dem Max der Boxen errechnet; vorrausgesetzt,
// die SSize ist "absolut" gesetzt (LONG_MAX)
// (Wird zur Zeit nur fuer den RTF-Parser benoetigt)
SwTableNode* SplitTable( const SwNodeIndex& rPos, BOOL bAfter = TRUE,
BOOL bCalcNewSize = FALSE );
// fuegt 2 Tabellen, die hintereinander stehen, wieder zusammen
BOOL MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev = TRUE,
USHORT nMode = 0, SwHistory* pHistory = 0 );
// fuege eine neue SwSection ein
SwSectionNode* InsertSection( const SwNodeIndex& rNdIdx,
SwSectionFmt& rSectionFmt,
const SwSection&,
const SwNodeIndex* pEnde,
BOOL bInsAtStart = TRUE,
BOOL bCreateFrms = TRUE );
// in welchem Doc steht das Nodes-Array ?
SwDoc* GetDoc() { return pMyDoc; }
const SwDoc* GetDoc() const { return pMyDoc; }
// suche den vorhergehenden [/nachfolgenden ] ContentNode oder
// TabellenNode mit Frames. Wird kein Ende angeben, dann wird mit
// dem FrameIndex begonnen; ansonsten, wird mit dem vor rFrmIdx und
// dem hintern pEnd die Suche gestartet. Sollte kein gueltiger Node
// gefunden werden, wird 0 returnt. rFrmIdx zeigt auf dem Node mit
// Frames
SwNode* FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
const SwNode* pEnd = 0 ) const;
private:
// privater Constructor, weil nie kopiert werden darf !!
SwNodes( const SwNodes & rNodes );
};
#endif
+373
View File
@@ -0,0 +1,373 @@
/*************************************************************************
*
* $RCSfile: ndgrf.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDGRF_HXX
#define _NDGRF_HXX
#ifndef _LNKBASE_HXX //autogen
#include <so3/lnkbase.hxx>
#endif
#ifndef _GRFMGR_HXX //autogen
#include <goodies/grfmgr.hxx>
#endif
#ifndef _NDNOTXT_HXX
#include <ndnotxt.hxx>
#endif
class SwGrfFmtColl;
class SwDoc;
class GraphicAttr;
// Code for the new GraphicObject
#ifdef USE_GRFOBJECT
// --------------------
// SwGrfNode
// --------------------
class SwGrfNode: public SwNoTxtNode
{
friend class SwNodes;
friend class SwGrfFrm;
GraphicObject aGrfObj;
SvBaseLinkRef refLink; // falls Grafik nur als Link, dann Pointer gesetzt
Size nGrfSize;
String aStrmName; // SW3: Name des Storage-Streams fuer Embedded
String aNewStrmName; // SW3: name des Storage-Streams bei SaveAs
String aLowResGrf; // HTML: LowRes Grafik (Ersatzdarstellung bis
// die normale (HighRes) geladen ist.
BOOL bTransparentFlagValid :1;
BOOL bInSwapIn :1;
BOOL bGrafikArrived :1;
BOOL bChgTwipSize :1;
BOOL bLoadLowResGrf :1;
BOOL bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
//SwapIn zu verhindern.
BOOL bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
SwGrfNode( const SwNodeIndex& rWhere,
const String& rGrfName, const String& rFltName,
const Graphic* pGraphic,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr = 0 );
// Ctor fuer Einlesen (SW/G) ohne Grafik
SwGrfNode( const SwNodeIndex& rWhere,
const String& rGrfName, const String& rFltName,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr = 0 );
void InsertLink( const String& rGrfName, const String& rFltName );
void DelStreamName();
DECL_LINK( SwapGraphic, GraphicObject* );
public:
virtual ~SwGrfNode();
const Graphic& GetGrf() const { return aGrfObj.GetGraphic(); }
const GraphicObject& GetGrfObj() const { return aGrfObj; }
GraphicObject& GetGrfObj() { return aGrfObj; }
virtual SwCntntNode *SplitNode( const SwPosition & );
virtual Size GetTwipSize() const;
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
void SetTwipSize( const Size& rSz );
inline BOOL IsTransparent() const { return aGrfObj.IsTransparent(); }
inline BOOL IsAnimated() const { return aGrfObj.IsAnimated(); }
inline BOOL IsChgTwipSize() const { return bChgTwipSize; }
inline void SetChgTwipSize( BOOL b ) { bChgTwipSize = b; }
inline BOOL IsGrafikArrived() const { return bGrafikArrived; }
inline void SetGrafikArrived( BOOL b ) { bGrafikArrived = b; }
inline BOOL IsFrameInPaint() const { return bFrameInPaint; }
inline void SetFrameInPaint( BOOL b ) { bFrameInPaint = b; }
inline BOOL IsScaleImageMap() const { return bScaleImageMap; }
inline void SetScaleImageMap( BOOL b ) { bScaleImageMap = b; }
// alles fuers Laden der LowRes-Grafiken
inline BOOL IsLoadLowResGrf() const { return bLoadLowResGrf; }
inline void SetLoadLowResGrf( BOOL b ) { bLoadLowResGrf = b; }
const String& GetLowResGrfName() const { return aLowResGrf; }
void SetLowResGrfName( const String& r ) { aLowResGrf = r; }
#endif
// steht in ndcopy.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
// erneutes Einlesen, falls Graphic nicht Ok ist. Die
// aktuelle wird durch die neue ersetzt.
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
BOOL ReRead( const String& rGrfName, const String& rFltName,
const Graphic* pGraphic = 0, BOOL bModify = TRUE );
// Laden der Grafik unmittelbar vor der Anzeige
short SwapIn( BOOL bWaitForData = FALSE );
// Entfernen der Grafik, um Speicher freizugeben
short SwapOut();
// Schreiben der Grafik
BOOL StoreGraphics( SvStorage* pDocStg = NULL );
// Zugriff auf den Storage-Streamnamen
const String& GetStreamName() const;
void SetStreamName( const String& r ) { aStrmName = r; }
void SaveCompleted( BOOL bClear );
#endif
// Der Grafik sagen, dass sich der Node im Undobereich befindet
virtual BOOL SavePersistentData();
virtual BOOL RestorePersistentData();
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
// Abfrage der Link-Daten
BOOL IsGrfLink() const { return refLink.Is(); }
inline BOOL IsLinkedFile() const;
inline BOOL IsLinkedDDE() const;
SvBaseLinkRef GetLink() const { return refLink; }
BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
void ReleaseLink();
// Prioritaet beim Laden der Grafik setzen. Geht nur, wenn der Link
// ein FileObject gesetzt hat
void SetTransferPriority( USHORT nPrio );
// Skalieren einer Image-Map: Die Image-Map wird um den Faktor
// zwischen Grafik-Groesse und Rahmen-Groesse vergroessert/verkleinert
void ScaleImageMap();
// returns the with our graphic attributes filled Graphic-Attr-Structure
GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const;
#endif
};
/* */
#else
// USE_GRFOBJECT
// --------------------
// SwGrfNode
// --------------------
class SwGrfNode: public SwNoTxtNode
{
friend class SwNodes;
friend class SwGrfFrm;
friend class SwGraphicAccess;
Graphic aGraphic;
SvBaseLinkRef refLink; // falls Grafik nur als Link, dann Pointer gesetzt
Size nGrfSize;
String aStrmName; // SW3: Name des Storage-Streams fuer Embedded
String aNewStrmName; // SW3: name des Storage-Streams bei SaveAs
String aLowResGrf; // HTML: LowRes Grafik (Ersatzdarstellung bis
// die normale (HighRes) geladen ist.
const void *pCchMagic; // "MagicNumber" innerhalb des Grafikcaches
USHORT nCchIndex; // Index im Grafikcache
BOOL bTransparentFlagValid :1;
BOOL bIsTransparent :1;
BOOL bInSwapIn :1;
BOOL bGrafikArrived :1;
BOOL bChgTwipSize :1;
BOOL bLoadLowResGrf :1;
BOOL bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
//SwapIn zu verhindern.
BOOL bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
SwGrfNode( const SwNodeIndex& rWhere,
const String& rGrfName, const String& rFltName,
const Graphic* pGraphic,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr = 0 );
// Ctor fuer Einlesen (SW/G) ohne Grafik
SwGrfNode( const SwNodeIndex& rWhere,
const String& rGrfName, const String& rFltName,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr = 0 );
void InsertLink( const String& rGrfName, const String& rFltName );
void DelStreamName();
void Impl_IsTransparent();
public:
~SwGrfNode();
const Graphic& GetGrf() const { return aGraphic; }
virtual SwCntntNode *SplitNode( const SwPosition & );
virtual Size GetTwipSize() const;
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
void SetTwipSize( const Size& rSz );
inline BOOL IsTransparent() const;
inline void InvalidateTransparentFlag() { bTransparentFlagValid = FALSE; }
inline void SetTransparent( BOOL bFlag )
{ bIsTransparent = bFlag, bTransparentFlagValid = TRUE; }
inline BOOL IsChgTwipSize() const { return bChgTwipSize; }
inline void SetChgTwipSize( BOOL b ) { bChgTwipSize = b; }
inline BOOL IsGrafikArrived() const { return bGrafikArrived; }
inline void SetGrafikArrived( BOOL b ) { bGrafikArrived = b; }
inline BOOL IsFrameInPaint() const { return bFrameInPaint; }
inline void SetFrameInPaint( BOOL b ) { bFrameInPaint = b; }
inline BOOL IsScaleImageMap() const { return bScaleImageMap; }
inline void SetScaleImageMap( BOOL b ) { bScaleImageMap = b; }
inline void SetCacheFlags( const void* p, USHORT nIdx = 0 )
{ pCchMagic = p; nCchIndex = nIdx; }
void ClearQBmpCache();
inline BOOL HasMagicId() const { return 0 != pCchMagic; }
// alles fuers Laden der LowRes-Grafiken
inline BOOL IsLoadLowResGrf() const { return bLoadLowResGrf; }
inline void SetLoadLowResGrf( BOOL b ) { bLoadLowResGrf = b; }
const String& GetLowResGrfName() const { return aLowResGrf; }
void SetLowResGrfName( const String& r ) { aLowResGrf = r; }
#endif
// steht in ndcopy.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
// erneutes Einlesen, falls Graphic nicht Ok ist. Die
// aktuelle wird durch die neue ersetzt.
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
BOOL ReRead( const String& rGrfName, const String& rFltName,
const Graphic* pGraphic = 0, BOOL bModify = TRUE );
// Laden der Grafik unmittelbar vor der Anzeige
short SwapIn( BOOL bWaitForData = FALSE );
// Entfernen der Grafik, um Speicher freizugeben
short SwapOut();
// Schreiben der Grafik
BOOL StoreGraphics( SvStorage* pDocStg = NULL );
// Zugriff auf den Storage-Streamnamen
const String& GetStreamName() const;
void SetStreamName( const String& r ) { aStrmName = r; }
void SaveCompleted( BOOL bClear );
#endif
// Der Grafik sagen, dass sich der Node im Undobereich befindet
virtual BOOL SavePersistentData();
virtual BOOL RestorePersistentData();
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
// Abfrage der Link-Daten
BOOL IsGrfLink() const { return refLink.Is(); }
inline BOOL IsLinkedFile() const;
inline BOOL IsLinkedDDE() const;
SvBaseLinkRef GetLink() const { return refLink; }
BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
void ReleaseLink();
// Prioritaet beim Laden der Grafik setzen. Geht nur, wenn der Link
// ein FileObject gesetzt hat
void SetTransferPriority( USHORT nPrio );
// Skalieren einer Image-Map: Die Image-Map wird um den Faktor
// zwischen Grafik-Groesse und Rahmen-Groesse vergroessert/verkleinert
void ScaleImageMap();
#endif
};
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
inline BOOL SwGrfNode::IsTransparent() const
{
if ( !bTransparentFlagValid )
((SwGrfNode*)this)->Impl_IsTransparent();
return bIsTransparent;
}
// fuer den Zugriff auf die CacheDaten
BOOL FindGrfSizeFromCache( const String& rGrfName, Size& rGrfSz );
#endif
/* */
#endif
// USE_GRFOBJECT
// ----------------------------------------------------------------------
// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
inline SwGrfNode *SwNode::GetGrfNode()
{
return ND_GRFNODE == nNodeType ? (SwGrfNode*)this : 0;
}
inline const SwGrfNode *SwNode::GetGrfNode() const
{
return ND_GRFNODE == nNodeType ? (const SwGrfNode*)this : 0;
}
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
inline BOOL SwGrfNode::IsLinkedFile() const
{
return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType();
}
inline BOOL SwGrfNode::IsLinkedDDE() const
{
return refLink.Is() && OBJECT_CLIENT_DDE == refLink->GetObjType();
}
#endif
#endif
+260
View File
@@ -0,0 +1,260 @@
/*************************************************************************
*
* $RCSfile: ndhints.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDHINTS_HXX
#define _NDHINTS_HXX
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
#ifndef _SVMEMPOOL_HXX //autogen
#include <tools/mempool.hxx>
#endif
#include "numrule.hxx"
class SwTxtNode;
class SwRegHistory; // steht im RolBck.hxx
class SwTxtAttr;
/*
* Ableitung der Klasse SwpHints ueber den Umweg ueber SwpHts, da
* lediglich die Klasse SwTxtNode Attribute einfuegen und
* loeschen koennen soll. Anderen Klassen wie den Frames steht
* lediglich ein lesender Zugriff ueber den Index-Operator zur
* Verfuegung.
* Groesse beim Anlegen gleich 1, weil nur dann ein Array erzeug wird, wenn
* auch ein Hint eingefuegt wird.
*/
/*************************************************************************
* class SwpHtStart/End
*************************************************************************/
SV_DECL_PTRARR_SORT(SwpHtStart,SwTxtAttr*,1,1)
SV_DECL_PTRARR_SORT(SwpHtEnd,SwTxtAttr*,1,1)
/*************************************************************************
* class SwpHintsArr
*************************************************************************/
// Das neue Hintsarray:
class SwpHintsArr : private SwpHtStart
{
protected:
SwpHtEnd aHtEnd;
public:
void Insert( const SwTxtAttr *pHt );
void Delete( const SwTxtAttr *pHt );
void DeleteAtPos( const USHORT nPosInStart );
BOOL Resort();
SwTxtAttr *Cut( const USHORT nPosInStart );
inline const SwTxtAttr *GetStart( const USHORT nPos ) const { return (*this)[nPos]; }
inline const SwTxtAttr *GetEnd( const USHORT nPos ) const { return aHtEnd[nPos]; }
inline SwTxtAttr *GetStart( const USHORT nPos ) { return GetHt(nPos); }
inline SwTxtAttr *GetEnd( const USHORT nPos ) { return aHtEnd[nPos]; }
inline USHORT GetEndCount() const { return aHtEnd.Count(); }
inline USHORT GetStartCount() const { return Count(); }
inline USHORT GetStartOf( const SwTxtAttr *pHt ) const;
inline USHORT GetEndOf( const SwTxtAttr *pHt ) const;
inline USHORT GetPos( const SwTxtAttr *pHt ) const
// OS: in svmem.hxx wird fuer TCPP GetPos ohne const gerufen
#ifdef TCPP
{ return SwpHtStart::GetPos( (SwTxtAttr *)pHt ); }
#else
{ return SwpHtStart::GetPos( pHt ); }
#endif
#ifdef USED
// Der Zugriffsoperator soll bald nur noch const sein!
inline SwTxtAttr *operator[]( const USHORT nIdx ) { return SwpHtStart::operator[](nIdx); }
#endif
inline SwTxtAttr *GetHt( const USHORT nIdx ) { return SwpHtStart::operator[](nIdx); }
inline const SwTxtAttr *operator[]( const USHORT nIdx )const
{ return SwpHtStart::operator[](nIdx); }
inline USHORT Count() const { return SwpHtStart::Count(); }
// Methoden vom PtrArr weiterreichen, wird fuer Node::_Cut benoetigt
const SwTxtAttr** GetData() const { return SwpHtStart::GetData(); }
#ifndef PRODUCT
BOOL Check() const;
#endif
};
/*************************************************************************
* class SwpHints
*************************************************************************/
// Die public-Schnittstelle zum Node hin
class SwpHints: public SwpHintsArr
{
private:
SwRegHistory* pHistory;
// Numerierung
BOOL bVis :1; // HiddenParaFld
BOOL bFntChg :1; // Fontwechsel
BOOL bFtn :1; // Fussnoten
BOOL bInSplitNode: 1; // TRUE: der Node ist im Split und die Frames
// werden verschoben!
BOOL bDDEFlds : 1; // es sind DDE-Felder am TextNode vorhanden
BOOL bCalcVis : 1; // bVis ist invalid, CalcVisibleFlag() rufen
BOOL Resort( const USHORT nPos );
// loescht Hints, die keinen Zustaendigkeitsbereich mehr haben
void ClearDummies( SwTxtNode &rNode );
// Forget signalisiert, dass es ueberfluessig ist, das Attribut einzu-
// fuegen, da es keinen Zustaendigkeitsbereich haette.
BOOL Forget( const USHORT i, const USHORT nWhich,
const xub_StrLen nStrt, const xub_StrLen nEnd );
// Merge verschmilzt aneinanderreichende Hints mit gleichen Attributen
// und gleichen Werten, falls nichts dagegen spricht, d.h. wenn dadurch
// keine Ueberlappungen mit gleichartigen Attr. entstehen,
// Ist der Rueckgabewert TRUE, so wurde verschmolzen und dabei u.a. auch
// ein Resort ausgeloest.
BOOL Merge( SwTxtNode &rNode );
// Haelt ein neues Attribut in pHistory fest.
void NoteInHistory( SwTxtAttr *pAttr, const BOOL bNew = FALSE );
void CalcFlags( );
// die Delete Methoden duerfen nur vom TextNode gerufen werden !!
// Dieser sorgt dafuer, das bei Attributen ohne Ende auch das
// entsp. Zeichen entfernt wird !!
friend class SwTxtNode;
void DeleteAtPos( const USHORT nPos );
// Ist der Hint schon bekannt, dann suche die Position und loesche ihn.
// Ist er nicht im Array, so gibt es ein ASSERT !!
void Delete( SwTxtAttr* pTxtHt );
public:
inline BOOL CanBeDeleted() const { return !Count(); }
// damit das SwDoc::Undo ueber alle Attributaenderungen informiert
// wird, gibt es hier einen Pointer auf die History. Nur wenn dieser
// != 0 ist, muessen alle Attributaenderungen "gemeldet" werden.
void Register( SwRegHistory* pHist ) { pHistory = pHist; }
void DeRegister() { Register(0); }
void Insert( SwTxtAttr *pHt, SwTxtNode &rNode, USHORT nMode = 0 );
USHORT GetLang( const xub_StrLen nBegin, const xub_StrLen nLen) const;
inline void SetCalcVisible(){ bCalcVis = TRUE; }
inline void SetVisible( const BOOL bNew ) { bVis = bNew; }
inline BOOL IsVisible() const
{ if( bCalcVis ) ((SwpHints*)this)->CalcVisibleFlag(); return bVis; }
inline BOOL HasFntChg() const { return bFntChg; }
inline BOOL HasFtn() const { return bFtn; }
inline BOOL IsInSplitNode() const { return bInSplitNode; }
inline BOOL HasDDEFld() const { return bDDEFlds; }
// Konstruktor (wird im nur einmal benutzt!)
SwpHints()
{
pHistory = 0;
bFntChg = bVis = TRUE;
bDDEFlds = bFtn = bInSplitNode = bCalcVis = FALSE;
}
// Berechnung von bVis, return-Wert TRUE bei Aenderung
BOOL CalcVisibleFlag();
DECL_FIXEDMEMPOOL_NEWDEL(SwpHints)
};
// Ausgabeoperator fuer die Texthints
SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
/*************************************************************************
* Inline-Implementationen
*************************************************************************/
inline USHORT SwpHintsArr::GetStartOf( const SwTxtAttr *pHt ) const
{
USHORT nPos;
if( !Seek_Entry( pHt, &nPos ) )
nPos = USHRT_MAX;
return nPos;
}
inline USHORT SwpHintsArr::GetEndOf( const SwTxtAttr *pHt ) const
{
USHORT nPos;
if( !aHtEnd.Seek_Entry( pHt, &nPos ) )
nPos = USHRT_MAX;
return nPos;
}
inline SwTxtAttr *SwpHintsArr::Cut( const USHORT nPosInStart )
{
SwTxtAttr *pHt = GetHt(nPosInStart);
DeleteAtPos( nPosInStart );
return pHt;
}
#endif
+312
View File
@@ -0,0 +1,312 @@
/*************************************************************************
*
* $RCSfile: ndindex.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDINDEX_HXX
#define _NDINDEX_HXX
#include <limits.h>
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
#include "node.hxx"
#include "ndarr.hxx"
class SwNode;
class SwNodes;
class SwNodeIndex
{
friend void SwNodes::RegisterIndex( SwNodeIndex& );
friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
friend void SwNodes::RemoveNode( ULONG, ULONG, FASTBOOL );
#ifndef PRODUCT
static int nSerial;
int MySerial;
#endif
SwNode* pNd;
SwNodeIndex *pNext, *pPrev;
void Remove(); // Ausketten
// diese sind nicht erlaubt!
SwNodeIndex( SwNodes& rNds, USHORT nIdx );
SwNodeIndex( SwNodes& rNds, int nIdx );
public:
SwNodeIndex( SwNodes& rNds, ULONG nIdx = 0 );
SwNodeIndex( const SwNodeIndex &, long nDiff = 0 );
SwNodeIndex( const SwNode&, long nDiff = 0 );
~SwNodeIndex() { Remove(); }
inline ULONG operator++();
inline ULONG operator--();
#ifndef CFRONT
inline ULONG operator++(int);
inline ULONG operator--(int);
#endif
inline ULONG operator+=( ULONG );
inline ULONG operator-=( ULONG );
inline ULONG operator+=( const SwNodeIndex& );
inline ULONG operator-=( const SwNodeIndex& );
inline BOOL operator< ( const SwNodeIndex& ) const;
inline BOOL operator<=( const SwNodeIndex& ) const;
inline BOOL operator> ( const SwNodeIndex& ) const;
inline BOOL operator>=( const SwNodeIndex& ) const;
inline BOOL operator==( const SwNodeIndex& ) const;
inline BOOL operator!=( const SwNodeIndex& ) const;
inline BOOL operator< ( ULONG nWert ) const;
inline BOOL operator<=( ULONG nWert ) const;
inline BOOL operator> ( ULONG nWert ) const;
inline BOOL operator>=( ULONG nWert ) const;
inline BOOL operator==( ULONG nWert ) const;
inline BOOL operator!=( ULONG nWert ) const;
inline SwNodeIndex& operator=( ULONG );
SwNodeIndex& operator=( const SwNodeIndex& );
SwNodeIndex& operator=( const SwNode& );
// gebe den Wert vom Index als ULONG zurueck
inline ULONG GetIndex() const;
// ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren Objektes
SwNodeIndex& Assign( SwNodes& rNds, ULONG );
SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 );
// Herausgabe des Pointers auf das NodesArray,
inline const SwNodes& GetNodes() const;
inline SwNodes& GetNodes();
SwNode& GetNode() const { return *pNd; }
};
/*
* SwRange
*/
class SwNodeRange
{
public:
SwNodeIndex aStart;
SwNodeIndex aEnd;
SwNodeRange( const SwNodeIndex &rS, const SwNodeIndex &rE );
SwNodeRange( const SwNodeRange &rRange );
SwNodeRange( SwNodes& rArr, ULONG nSttIdx = 0, ULONG nEndIdx = 0 );
SwNodeRange( const SwNodeIndex& rS, long nSttDiff,
const SwNodeIndex& rE, long nEndDiff = 0 );
SwNodeRange( const SwNode& rS, long nSttDiff,
const SwNode& rE, long nEndDiff = 0 );
};
// fuer die inlines wird aber der node.hxx benoetigt. Dieses braucht aber
// auch wieder dieses. Also alle Inlines, die auf pNd zugreifen werden
// hier implementiert.
inline ULONG SwNodeIndex::GetIndex() const
{
return pNd->GetIndex();
}
inline const SwNodes& SwNodeIndex::GetNodes() const
{
return pNd->GetNodes();
}
inline SwNodes& SwNodeIndex::GetNodes()
{
return pNd->GetNodes();
}
inline BOOL SwNodeIndex::operator< ( ULONG nWert ) const
{
return pNd->GetIndex() < nWert;
}
inline BOOL SwNodeIndex::operator<=( ULONG nWert ) const
{
return pNd->GetIndex() <= nWert;
}
inline BOOL SwNodeIndex::operator> ( ULONG nWert ) const
{
return pNd->GetIndex() > nWert;
}
inline BOOL SwNodeIndex::operator>=( ULONG nWert ) const
{
return pNd->GetIndex() >= nWert;
}
inline BOOL SwNodeIndex::operator==( ULONG nWert ) const
{
return pNd->GetIndex() == nWert;
}
inline BOOL SwNodeIndex::operator!=( ULONG nWert ) const
{
return pNd->GetIndex() != nWert;
}
inline BOOL SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() < rIndex.GetIndex();
}
inline BOOL SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() <= rIndex.GetIndex();
}
inline BOOL SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() > rIndex.GetIndex();
}
inline BOOL SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() >= rIndex.GetIndex();
}
inline BOOL SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
{
return pNd == rIdx.pNd;
}
inline BOOL SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
{
return pNd != rIdx.pNd;
}
inline ULONG SwNodeIndex::operator++()
{
return ( pNd = GetNodes()[ pNd->GetIndex()+1 ] )->GetIndex();
}
inline ULONG SwNodeIndex::operator--()
{
return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex();
}
#ifndef CFRONT
inline ULONG SwNodeIndex::operator++(int)
{
ULONG nOldIndex = pNd->GetIndex();
pNd = GetNodes()[ nOldIndex + 1 ];
return nOldIndex;
}
inline ULONG SwNodeIndex::operator--(int)
{
ULONG nOldIndex = pNd->GetIndex();
pNd = GetNodes()[ nOldIndex - 1 ];
return nOldIndex;
}
#endif
inline ULONG SwNodeIndex::operator+=( ULONG nWert )
{
return ( pNd = GetNodes()[ pNd->GetIndex() + nWert ] )->GetIndex();
}
inline ULONG SwNodeIndex::operator-=( ULONG nWert )
{
return ( pNd = GetNodes()[ pNd->GetIndex() - nWert ] )->GetIndex();
}
inline ULONG SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
{
return ( pNd = GetNodes()[ pNd->GetIndex() + rIndex.GetIndex() ] )->GetIndex();
}
inline ULONG SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
{
return ( pNd = GetNodes()[ pNd->GetIndex() - rIndex.GetIndex() ] )->GetIndex();
}
inline SwNodeIndex& SwNodeIndex::operator=( ULONG nWert )
{
pNd = GetNodes()[ nWert ];
return *this;
}
//JP 29.09.97: impl. steht im ndindex.hxx - sollte moeglichst bald auf die
// neue Schnittstelle angepasst werden
inline SwNode* SwNodes::operator[]( const SwNodeIndex& rIdx ) const
{
return &rIdx.GetNode();
}
/******************************************************************
Source Code Control System - Header
$Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/inc/ndindex.hxx,v 1.1.1.1 2000-09-18 17:14:27 hr Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
Revision 1.3 2000/09/18 16:03:23 willem.vandorp
OpenOffice header added.
Revision 1.2 2000/09/08 13:24:18 willem.vandorp
Header and footer replaced
Revision 1.1 1997/10/09 13:12:34 JP
Umstellung NodeIndex/-Array/BigPtrArray
Rev 1.0 09 Oct 1997 15:12:34 JP
Umstellung NodeIndex/-Array/BigPtrArray
*******************************************************************/
#endif
+133
View File
@@ -0,0 +1,133 @@
/*************************************************************************
*
* $RCSfile: ndnotxt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDNOTXT_HXX
#define _NDNOTXT_HXX
#include "node.hxx"
class PolyPolygon;
// --------------------
// SwNoTxtNode
// --------------------
class SwNoTxtNode : public SwCntntNode
{
friend class SwNodes;
friend class SwNoTxtFrm;
String aAlternateText; // alternativer Text (HTML)
PolyPolygon *pContour; // Polygon fuer Konturumlauf
// erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
// fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
virtual void NewAttrSet( SwAttrPool& );
SwNoTxtNode( const SwNoTxtNode& ); //nicht erlaubt
SwNoTxtNode &operator=( const SwNoTxtNode& ); //nicht erlaubt
protected:
SwNoTxtNode( const SwNodeIndex &rWhere, const BYTE nNdType,
SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
public:
~SwNoTxtNode();
virtual SwCntntFrm *MakeFrm();
inline SwGrfFmtColl *GetGrfColl() const;
virtual Size GetTwipSize() const = 0;
virtual BOOL SavePersistentData();
virtual BOOL RestorePersistentData();
// alternativen Text abfragen/setzen
const String& GetAlternateText() const { return aAlternateText; }
void SetAlternateText( const String& rTxt ) { aAlternateText = rTxt; }
void SetContour( const PolyPolygon *pPoly );
const PolyPolygon *HasContour() const { return pContour; }
void GetContour( PolyPolygon &rPoly ) const;
void CreateContour();
//Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
Graphic GetGraphic() const;
};
inline SwGrfFmtColl* SwNoTxtNode::GetGrfColl() const
{
return (SwGrfFmtColl*)GetRegisteredIn();
}
// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
inline SwNoTxtNode *SwNode::GetNoTxtNode()
{
return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
}
inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
{
return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0;
}
#endif // _NDNOTXT_HXX
+217
View File
@@ -0,0 +1,217 @@
/*************************************************************************
*
* $RCSfile: ndole.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDOLE_HXX
#define _NDOLE_HXX
#ifndef _SWBASLNK_HXX
#include <swbaslnk.hxx> // fuer SwBaseLink
#endif
#ifndef _NDNOTXT_HXX
#include <ndnotxt.hxx>
#endif
class SwGrfFmtColl;
class SwDoc;
class SvInPlaceObjectRef;
class SvInPlaceObject;
class SwOLENode;
class SwOLELink;
class SwOLELRUCache;
class SwOLEObj
{
friend class SwOLENode;
static SwOLELRUCache* pOLELRU_Cache;
const SwOLENode* pOLENd;
SvBaseLinkRef refLink; // falls Object nur als Link, dann Pointer gesetzt
//Entweder Ref oder Name sind bekannt, wenn nur der Name bekannt ist, wird
//dir Ref bei Anforderung durch GetOleRef() vom Sfx besorgt.
SvInPlaceObjectRef *pOLERef; //new/delete, damit so2.hxx wegfaellt.
String aName;
SwOLEObj( const SwOLEObj& rObj ); //nicht erlaubt.
SwOLEObj();
void SetNode( SwOLENode* pNode );
public:
SwOLEObj( SvInPlaceObject *pObj );
SwOLEObj( const String &rName );
~SwOLEObj();
// OLE-Object aus dem "Speicher" entfernen
void Unload();
BOOL RemovedFromLRU();
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
SvInPlaceObjectRef GetOleRef();
const String &GetName() const { return aName; }
BOOL IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
BOOL IsOLELink() const { return refLink.Is(); }
inline SwOLELink* GetLink() const;
inline void SetLink( SwOLELink* pLink );
void ReleaseLink();
#endif
};
// --------------------
// SwOLENode
// --------------------
struct SwPersistentOleData;
class SwOLENode: public SwNoTxtNode
{
friend class SwNodes;
SwOLEObj aOLEObj;
SwPersistentOleData* pSavedData;
String sChartTblName; // bei Chart Objecten: Name der ref. Tabelle
BOOL bOLESizeInvalid; //Soll beim SwDoc::PrtOLENotify beruecksichtig
//werden (zum Beispiel kopiert). Ist nicht
//Persistent.
SwOLENode( const SwNodeIndex &rWhere,
SvInPlaceObject *,
SwGrfFmtColl *pGrfColl,
SwAttrSet* pAutoAttr = 0 );
SwOLENode( const SwNodeIndex &rWhere,
const String &rName,
SwGrfFmtColl *pGrfColl,
SwAttrSet* pAutoAttr = 0 );
// aOLEObj besitzt einen privaten Copy-CTOR, wir brauchen auch einen:
SwOLENode( const SwOLENode & );
public:
const SwOLEObj& GetOLEObj() const { return aOLEObj; }
SwOLEObj& GetOLEObj() { return aOLEObj; }
virtual SwCntntNode *SplitNode( const SwPosition & );
// steht in ndcopy.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
virtual Size GetTwipSize() const;
virtual BOOL SavePersistentData();
virtual BOOL RestorePersistentData();
BOOL IsInGlobalDocSection() const;
BOOL IsOLEObjectDeleted() const;
BOOL IsOLESizeInvalid() const { return bOLESizeInvalid; }
void SetOLESizeInvalid( BOOL b ){ bOLESizeInvalid = b; }
// OLE-Object aus dem "Speicher" entfernen
inline void Unload() { aOLEObj.Unload(); }
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
const String& GetChartTblName() const { return sChartTblName; }
void SetChartTblName( const String& rNm ) { sChartTblName = rNm; }
#endif
};
// --------------------
// SwOLELink
// --------------------
class SwOLELink : public SwBaseLink
{
friend class Sw3IoImp;
void SetCacheObj( SvEmbeddedObject * pObj )
{ SvBaseLink::SetCacheObj( pObj ); }
public:
SwOLELink( SwOLENode& rNode, SvPseudoObject* pObj )
: SwBaseLink( aEmptyStr, OBJECT_CLIENT_OLE_CACHE, pObj, &rNode )
{}
SwOLELink( SwOLENode& rNode )
: SwBaseLink( 0, 0, &rNode )
{}
};
// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
inline SwOLENode *SwNode::GetOLENode()
{
return ND_OLENODE == nNodeType ? (SwOLENode*)this : 0;
}
inline const SwOLENode *SwNode::GetOLENode() const
{
return ND_OLENODE == nNodeType ? (const SwOLENode*)this : 0;
}
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
inline SwOLELink* SwOLEObj::GetLink() const { return (SwOLELink*)&refLink; }
inline void SwOLEObj::SetLink( SwOLELink* pLink ) { refLink = pLink; }
#endif
#endif // _NDOLE_HXX
+377
View File
@@ -0,0 +1,377 @@
/*************************************************************************
*
* $RCSfile: ndtxt.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDTXT_HXX
#define _NDTXT_HXX
#ifndef _NODE_HXX
#include <node.hxx>
#endif
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _NDHINTS_HXX
#include <ndhints.hxx>
#endif
#ifndef _ERRHDL_HXX
#include <errhdl.hxx>
#endif
class SwNumRules;
class SwTxtFmtColl;
class SwCntntFrm;
class SwTxtFld; // Fuer GetTxtFld()
class SwAttrSet;
struct SwSpellArgs; // fuer Spell()
class SwInterHyphInfo; // Hyphenate(), splargs.hxx
class SwWrongList; // fuer OnlineSpelling
class SwNodeNum;
class OutputDevice;
// Konstanten fuer das Text-Insert:
#define INS_DEFAULT 0x0000 // keine Extras
#define INS_EMPTYEXPAND 0x0001 // leere Hints beim Einfuegen aufspannen
#define INS_NOHINTEXPAND 0x0002 // Hints an der InsPos nicht aufspannen
// --------------------
// SwTxtNode
// --------------------
class SwTxtNode: public SwCntntNode
{
// fuer das Erzeugen des ersten TextNode
friend class SwDoc; // CTOR und AppendTxtNode()
friend class SwNodes;
friend class SwTxtFrm;
friend void SwpHints::Insert( SwTxtAttr*, SwTxtNode&, USHORT );
//Kann 0 sein, nur dann nicht 0 wenn harte Attribute drin stehen.
//Also niemals direkt zugreifen!
SwpHints *pSwpHints;
SwWrongList *pWrong; // Rechtschreibfehler nach Online-Spelling
SwNodeNum *pNdNum; // Numerierung fuer diesen Absatz
SwNodeNum *pNdOutl; // Outline fuer diesen Absatz
XubString aText;
SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl,
SwAttrSet* pAutoAttr = 0 );
// Kopiert die Attribute an nStart nach pDest.
void CopyAttr( SwTxtNode *pDest, const xub_StrLen nStart, const xub_StrLen nOldPos);
SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, BOOL bNext = TRUE,
BOOL bChgFollow = TRUE );
void _Cut( SwTxtNode *pDest, const SwIndex &rDestStart,
const SwIndex &rStart, xub_StrLen nLen, BOOL bUpdate = TRUE );
SwTxtAttr* MakeTxtAttr( const SfxPoolItem& rNew, xub_StrLen nStt, xub_StrLen nEnd,
BOOL bPool = TRUE );
// Verlagere alles umfassende harte Attribute in den AttrSet des Absatzes
void MoveTxtAttr_To_AttrSet(); // wird von SplitNode gerufen.
// lege den spz. AttrSet an
virtual void NewAttrSet( SwAttrPool& );
void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
xub_StrLen nEndPos, BOOL bExpandFlds ) const;
public:
const String& GetTxt() const { return aText; }
// Zugriff auf SwpHints
inline SwpHints &GetSwpHints();
inline const SwpHints &GetSwpHints() const;
inline SwpHints *GetpSwpHints() { return pSwpHints; }
inline const SwpHints *GetpSwpHints() const { return pSwpHints; }
void SetWrong( SwWrongList *pNew );
inline SwWrongList *GetWrong() { return pWrong; }
inline const SwWrongList *GetWrong() const { return pWrong; }
inline BOOL HasHints() const { return pSwpHints ? TRUE : FALSE; }
inline SwpHints &GetOrCreateSwpHints();
virtual ~SwTxtNode();
virtual xub_StrLen Len() const;
// steht in itratr
void GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, ULONG &rAbs,
OutputDevice* pOut = 0 ) const;
/*
* Einfuegen anderer Datentypen durch Erzeugen eines
* temporaeren Strings.
*/
SwTxtNode& Insert( xub_Unicode c, const SwIndex &rIdx );
SwTxtNode& Insert( const XubString &rStr, const SwIndex &rIdx,
const USHORT nMode = INS_DEFAULT );
SwTxtNode& Erase( const SwIndex &rIdx, xub_StrLen nCount = STRING_LEN,
const USHORT nMode = INS_DEFAULT );
// Aktionen auf Attributen
// loesche alle TextAttribute die als Attribut im Set vorhanden sind
// (Set-Pointer != 0 ) oder alle deren Which-Wert mit nWhich mappen
// oder wenn Which = 0, alle.
void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich = 0,
const SfxItemSet* pSet = 0, BOOL bInclRefToxMark = FALSE );
void GCAttr();
// loesche das Text-Attribut (muss beim Pool abgemeldet werden!)
void DestroyAttr( SwTxtAttr* pAttr );
// loesche alle Attribute aus dem SwpHintsArray.
void ClearSwpHintsArr( int bDelAll = TRUE, int bDelFields = TRUE );
// uebernehme den Pointer auf das Text-Attribut
BOOL Insert( SwTxtAttr *pAttr, USHORT nMode = 0 );
// lege ein neues TextAttribut an und fuege es ins SwpHints-Array ein
// returne den neuen Pointer (oder 0 bei Fehlern)!
SwTxtAttr* Insert( const SfxPoolItem& rAttr,
xub_StrLen nStt, xub_StrLen nEnd, USHORT nMode = 0 );
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
BOOL SetAttr( const SfxItemSet& rSet,
xub_StrLen nStt, xub_StrLen nEnd, USHORT nMode = 0 );
// erfrage die Attribute vom TextNode ueber den Bereich
BOOL GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
BOOL bOnlyTxtAttr = FALSE,
BOOL bGetFromChrFmt = TRUE ) const;
// uebertrage Attribute eines AttrSets ( AutoFmt ) in das SwpHintsArray
void FmtToTxtAttr( SwTxtNode* pNd );
// loeschen eines einzelnen Attributes (fuer SwUndoAttr)
// ( nur das Attribut loeschen, dass mit Which,Start und End oder
// mit pTxtHint identisch ist (es gibt nur ein gueltiges))
// AUSNAHME: ToxMarks !!!
void Delete( USHORT nTxtWhich, xub_StrLen nStart, xub_StrLen nEnd = 0 );
void Delete( SwTxtAttr * pTxtAttr, BOOL bThisOnly = FALSE );
// Aktionen auf Text und Attributen
void Copy(SwTxtNode *pDest, const SwIndex &rStart, USHORT nLen);
void Copy(SwTxtNode *pDest, const SwIndex &rDestStart,
const SwIndex &rStart, xub_StrLen nLen);
void Cut(SwTxtNode *pDest, const SwIndex &rStart, xub_StrLen nLen);
inline void Cut(SwTxtNode *pDest, const SwIndex &rDestStart,
const SwIndex &rStart, xub_StrLen nLen);
// ersetze im String an Position nIdx das Zeichen
void Replace( const SwIndex& rStart, xub_Unicode cCh );
void Replace( const SwIndex& rStart, xub_StrLen nLen, const XubString& rText );
// virtuelle Methoden aus dem CntntNode
virtual SwCntntFrm *MakeFrm();
virtual SwCntntNode *SplitNode( const SwPosition & );
virtual SwCntntNode *JoinNext();
virtual SwCntntNode *JoinPrev();
SwCntntNode *AppendNode( const SwPosition & );
// setze ggf. das DontExpand-Flag an INet bzw. Zeichenvorlagen
BOOL DontExpandFmt( const SwIndex& rIdx, BOOL bFlag = TRUE,
BOOL bFmtToTxtAttributes = TRUE );
// gebe das vorgegebene Attribut, welches an der TextPosition (rIdx)
// gesetzt ist zurueck. Gibt es keines, returne 0-Pointer
// gesetzt heisst: Start <= rIdx < End
SwTxtAttr *GetTxtAttr( const SwIndex& rIdx, USHORT nWhichHt,
BOOL bExpand = FALSE ) const;
// Diese Methode liefert nur Textattribute auf der Position nIdx
// zurueck, die kein EndIdx besitzen und denselben Which besitzen.
// Ueblicherweise steht an dieser Position ein CH_TXTATR.
// Bei RES_TXTATR_END entfaellt die Pruefung auf den Which-Wert.
SwTxtAttr *GetTxtAttr( const xub_StrLen nIdx,
const USHORT nWhichHt = RES_TXTATR_END ) const;
SwTxtFld *GetTxtFld( const SwIndex& rIdx )
{ return (SwTxtFld *)GetTxtAttr( rIdx, RES_TXTATR_FIELD ); }
// Aktuelles Wort zurueckliefern
XubString GetCurWord(xub_StrLen);
USHORT Spell(SwSpellArgs*);
inline SwTxtFmtColl *GetTxtColl() const;
virtual SwFmtColl *ChgFmtColl( SwFmtColl* );
void _ChgTxtCollUpdateNum( const SwTxtFmtColl* pOld,
const SwTxtFmtColl* pNew );
// kopiere die Collection mit allen Autoformaten zum Dest-Node
// dieser kann auch in einem anderen Dokument stehen!
// (Methode steht im ndcopy.cxx!!)
void CopyCollFmt( SwTxtNode& rDestNd );
// Numerierung
const SwNodeNum* UpdateNum( const SwNodeNum& );
const SwNumRule *GetNumRule() const;
const SwNodeNum* GetNum() const { return pNdNum; }
// OutlineNumerierung
const SwNodeNum* UpdateOutlineNum( const SwNodeNum& );
const SwNodeNum* GetOutlineNum() const { return pNdOutl; }
void NumRuleChgd(); // Frames benachrichtigen
XubString GetNumString() const; // returnt Outline oder Num - String
long GetLeftMarginWithNum( BOOL bTxtLeft = FALSE ) const;
BOOL GetFirstLineOfsWithNum( short& rFirstOffset ) const;
USHORT GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0) const;
// steht in ndcopy.cxx
BOOL IsSymbol( const xub_StrLen nBegin ) const; // steht in itratr.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
// interaktive Trennung: wir finden den TxtFrm und rufen sein CalcHyph
BOOL Hyphenate( SwInterHyphInfo &rHyphInf );
void DelSoftHyph( const xub_StrLen nStart, const xub_StrLen nEnd );
// Liefert einen String mit expandierten Feldern zurueck
// opt. die Kapitel/Nummer-String zurueck
XubString GetExpandTxt( const xub_StrLen nIdx = 0,
const xub_StrLen nLen = STRING_LEN,
const BOOL bWithNum = FALSE ) const;
BOOL GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN,
BOOL bWithNum = FALSE ) const;
XubString GetRedlineTxt( xub_StrLen nIdx = 0,
xub_StrLen nLen = STRING_LEN,
BOOL bExpandFlds = FALSE,
BOOL bWithNum = FALSE ) const;
//Liefert fuer die Initalfunktion tatsaechliche Anzahl der Initialzeichen
//bei nWishLen == 0 die des ersten Wortes
USHORT GetDropLen( USHORT nWishLen) const;
// Berechnung des Visible-Flags
inline BOOL CalcVisibleFlag()
{ if(pSwpHints) return pSwpHints->CalcVisibleFlag(); return FALSE; }
// Setzen des CalcVisible-Flags
inline void SetCalcVisible(){ if(pSwpHints) pSwpHints->SetCalcVisible(); }
// Ist der Absatz sichtbar
inline BOOL IsVisible() const
{ return pSwpHints ? pSwpHints->IsVisible() : TRUE; }
// Besitzt der Absatz Fussnoten?
inline BOOL HasFtn() const {return pSwpHints ? pSwpHints->HasFtn() : FALSE;}
inline SwTxtAttr* MakeTmpTxtAttr( const SfxPoolItem& rNew )
{ return MakeTxtAttr( rNew, 0, 0, FALSE ); }
TYPEINFO(); // fuer rtti
// fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// virtual BOOL GetInfo( SfxPoolItem& ) const;
// aus SwIndexReg
virtual void Update( const SwIndex & aPos, USHORT xub_StrLen,
BOOL bNegativ = FALSE );
FASTBOOL IsInSymbolFont( USHORT xub_StrLen ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode)
};
//-----------------------------------------------------------------------------
inline SwpHints &SwTxtNode::GetSwpHints()
{
ASSERT_ID( pSwpHints, ERR_NOHINTS);
return *pSwpHints;
}
inline const SwpHints &SwTxtNode::GetSwpHints() const
{
ASSERT_ID( pSwpHints, ERR_NOHINTS);
return *pSwpHints;
}
inline SwpHints& SwTxtNode::GetOrCreateSwpHints()
{
if( !pSwpHints )
pSwpHints = new SwpHints;
return *pSwpHints;
}
inline SwTxtFmtColl* SwTxtNode::GetTxtColl() const
{
return (SwTxtFmtColl*)GetRegisteredIn();
}
// fuer den IBM-Compiler nicht inlinen wg. 42876
#ifndef ICC
// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
inline SwTxtNode *SwNode::GetTxtNode()
{
return ND_TEXTNODE == nNodeType ? (SwTxtNode*)this : 0;
}
inline const SwTxtNode *SwNode::GetTxtNode() const
{
return ND_TEXTNODE == nNodeType ? (const SwTxtNode*)this : 0;
}
#endif
inline void SwTxtNode::Cut(SwTxtNode *pDest, const SwIndex &rDestStart,
const SwIndex &rStart, xub_StrLen nLen)
{
_Cut( pDest, rDestStart, rStart, nLen, TRUE );
}
#endif
+105
View File
@@ -0,0 +1,105 @@
/*************************************************************************
*
* $RCSfile: ndtyp.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NDTYP_HXX
#define _NDTYP_HXX
#ifndef _SOLAR_H
#include <tools/solar.h>
#endif
// Ids fuer die verschiedenden Nodes; in der Basisklasse steht der Member,
// der angibt, um was fuer einen es sich handelt
const BYTE ND_ENDNODE = 0x01;
const BYTE ND_STARTNODE = 0x02;
const BYTE ND_TABLENODE = 0x06;
const BYTE ND_TEXTNODE = 0x08;
const BYTE ND_GRFNODE = 0x10;
const BYTE ND_OLENODE = 0x20;
const BYTE ND_CONTENTNODE = 0x38; // ContentNode (eines von den 3 Bits)
const BYTE ND_NOTXTNODE = 0x30; // NoTxtNode (eines von den 2 Bits)
const BYTE ND_SECTIONNODE = 0x42;
// nur fuer internen Gebrauch!!
const BYTE ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
// spezielle Types der StartNodes, die keine Ableitungen sind, aber
// "Bereiche" zusammenhalten.
enum SwStartNodeType
{
SwNormalStartNode = 0,
SwTableBoxStartNode,
SwFlyStartNode,
SwFootnoteStartNode,
SwHeaderStartNode,
SwFooterStartNode
};
// is the node the first and/or last node of a section?
// This information is used for the export filters. Our layout never have a
// distance before or after if the node is the first or last in a section.
const BYTE ND_HAS_PREV_LAYNODE = 0x01;
const BYTE ND_HAS_NEXT_LAYNODE = 0x02;
#endif
+108
View File
@@ -0,0 +1,108 @@
/*************************************************************************
*
* $RCSfile: newhdl.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NEWHDL_HXX
#define _NEWHDL_HXX
#ifndef _LINK_HXX //autogen
#include <tools/link.hxx>
#endif
#include "errhdl.hxx" // hier kommt auch swtypes rein, was ich brauche
// ----------------------------------------------------------------------------
extern void SW_NEW_HDL();
class SwNewHdl
{
friend void SW_NEW_HDL();
private:
char* pWarnMem;
char* pExceptMem;
Link aWarnLnk;
Link aErrLnk;
public:
void SetWarnLnk( const Link &rLink );
void SetErrLnk( const Link &rLink );
BOOL TryWarnMem();
BOOL Flush_WarnMem();
BOOL Flush_ExceptMem();
SwNewHdl();
~SwNewHdl();
};
/******************************************************************************
* INLINE
******************************************************************************/
inline void SwNewHdl::SetWarnLnk( const Link &rLink )
{
aWarnLnk = rLink;
}
inline void SwNewHdl::SetErrLnk( const Link &rLink )
{
aErrLnk = rLink;
}
#endif
+726
View File
@@ -0,0 +1,726 @@
/*************************************************************************
*
* $RCSfile: node.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NODE_HXX
#define _NODE_HXX
#ifndef _SVMEMPOOL_HXX //autogen
#include <tools/mempool.hxx>
#endif
#ifndef _GEN_HXX //autogen
#include <tools/gen.hxx>
#endif
#ifndef _NDARR_HXX
#include <ndarr.hxx>
#endif
#ifndef _NDTYP_HXX
#include <ndtyp.hxx>
#endif
#ifndef _INDEX_HXX
#include <index.hxx>
#endif
#ifndef _FMTCOL_HXX
#include <fmtcol.hxx>
#endif
// ---------------------
// forward Deklarationen
// ---------------------
class SvUShorts;
class SwCntntFrm;
class SwCntntNode;
class SwDoc;
class SwEndNode;
class SwFrm;
class SwFrmFmt;
class SwGrfNode;
class SwNoTxtNode;
class SwNodeIndex;
class SwNodeRange;
class SwOLENode;
class SwRect;
class SwSection;
class SwSectionFmt;
class SwSectionNode;
class SwStartNode;
class SwTabFrm;
class SwTable;
class SwTableNode;
class SwTableBox;
class SwTxtNode;
class SwPageDesc;
class ViewShell;
struct SwPosition;
// --------------------
// class SwNode
// --------------------
class SwNode : private /* public*/ BigPtrEntry
{
friend class SwNodes;
BYTE nNodeType;
BOOL bWrongDirty : 1; // Ist das Wrong-Feld auf invalid? (nur TxtNodes)
BOOL bACmplWrdDirty : 1; // die ACompl-Liste muss angepasst werden (erstmal nur TxtNodes)
// JP 28.03.96
// fuer Textnodes: Stufungslevel der Autoformatierung. Ist erstmal hier
// gelandet, weil noch Bits frei sind
BYTE nAFmtNumLvl : 3;
BYTE nSetNumLSpace : 1; // fuer Numerierung: TRUE Einzug setzen
protected:
SwStartNode* pStartOfSection;
SwNode( const SwNodeIndex &rWhere, const BYTE nNodeId );
// fuer den initialen StartNode
SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNodeId );
public:
virtual ~SwNode();
USHORT GetSectionLevel() const;
inline ULONG StartOfSectionIndex() const;
inline const SwStartNode* StartOfSectionNode() const;
inline SwStartNode* StartOfSectionNode();
inline ULONG EndOfSectionIndex() const;
inline const SwEndNode* EndOfSectionNode() const;
inline SwEndNode* EndOfSectionNode();
inline const BOOL IsWrongDirty() const { return bWrongDirty; }
inline void SetWrongDirty( BOOL bNew ) { bWrongDirty = bNew; }
inline const BOOL IsAutoCompleteWordDirty() const { return bACmplWrdDirty; }
inline void SetAutoCompleteWordDirty( BOOL bNew ) { bACmplWrdDirty = bNew; }
inline const BYTE GetAutoFmtLvl() const { return nAFmtNumLvl; }
inline void SetAutoFmtLvl( BYTE nVal ) { nAFmtNumLvl = nVal; }
inline const BOOL IsSetNumLSpace() const { return 0 != nSetNumLSpace; }
inline void SetNumLSpace( BOOL bFlag ) { nSetNumLSpace = bFlag ? 1 : 0; }
BYTE GetNodeType() const { return nNodeType; }
inline SwStartNode *GetStartNode();
inline const SwStartNode *GetStartNode() const;
inline SwCntntNode *GetCntntNode();
inline const SwCntntNode *GetCntntNode() const;
inline SwEndNode *GetEndNode();
inline const SwEndNode *GetEndNode() const;
#ifndef ICC
inline
#endif
SwTxtNode *GetTxtNode();
#ifndef ICC
inline
#endif
const SwTxtNode *GetTxtNode() const;
#ifndef COMPACT
inline SwOLENode *GetOLENode();
inline const SwOLENode *GetOLENode() const;
inline SwNoTxtNode *GetNoTxtNode();
inline const SwNoTxtNode *GetNoTxtNode() const;
inline SwGrfNode *GetGrfNode();
inline const SwGrfNode *GetGrfNode() const;
#endif
inline SwTableNode *GetTableNode();
inline const SwTableNode *GetTableNode() const;
inline SwSectionNode *GetSectionNode();
inline const SwSectionNode *GetSectionNode() const;
inline BOOL IsStartNode() const;
inline BOOL IsCntntNode() const;
inline BOOL IsEndNode() const;
inline BOOL IsTxtNode() const;
inline BOOL IsTableNode() const;
inline BOOL IsSectionNode() const;
#ifndef COMPACT
inline BOOL IsOLENode() const;
inline BOOL IsNoTxtNode() const;
inline BOOL IsGrfNode() const;
#endif
// suche den TabellenNode, in dem dieser steht. Wenn in keiner
// Tabelle wird 0 returnt.
SwTableNode *FindTableNode();
inline const SwTableNode *FindTableNode() const;
// suche den SectionNode, in dem dieser steht. Wenn es in keiner
// Section steht wird 0 returnt.
SwSectionNode *FindSectionNode();
inline const SwSectionNode *FindSectionNode() const;
const SwStartNode *FindStartNode() const { return pStartOfSection; }
SwStartNode *FindStartNode() { return pStartOfSection; }
SwStartNode* FindSttNodeByType( SwStartNodeType eTyp );
inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const;
const SwStartNode* FindTableBoxStartNode() const
{ return FindSttNodeByType( SwTableBoxStartNode ); }
const SwStartNode* FindFlyStartNode() const
{ return FindSttNodeByType( SwFlyStartNode ); }
const SwStartNode* FindFootnoteStartNode() const
{ return FindSttNodeByType( SwFootnoteStartNode ); }
const SwStartNode* FindHeaderStartNode() const
{ return FindSttNodeByType( SwHeaderStartNode ); }
const SwStartNode* FindFooterStartNode() const
{ return FindSttNodeByType( SwFooterStartNode ); }
// in welchem Nodes-Array/Doc steht der Node ?
inline SwNodes& GetNodes();
inline const SwNodes& GetNodes() const;
inline SwDoc* GetDoc();
inline const SwDoc* GetDoc() const;
// liegt der Node im Sichtbarenbereich der Shell ?
BOOL IsVisible( ViewShell* pSh = 0 ) const;
// befindet sich der Node in einem geschuetzten Bereich?
BOOL IsInProtectSect() const;
// befindet sich der Node in irgendetwas geschuetzten ?
// (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
// Rahmen/Fussnoten/..)
BOOL IsProtect() const;
// suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
// Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
// die harte Tour ueber die Nodes nach vorne suchen!!
const SwPageDesc* FindPageDesc( BOOL bCalcLay ) const;
// falls der Node in einem Fly steht, dann wird das entsprechende Format
// returnt
SwFrmFmt* GetFlyFmt() const;
// liefert das Format, an dem die LayoutFrames des StartNodes registriert sind,
// wird von SwSectionNode::MakeFrms benutzt
const SwFrmFmt* GetFrmFmt() const;
// falls der Node in einer Tabelle steht, dann wird die entsprechende
// TabellenBox returnt
SwTableBox* GetTblBox() const;
inline ULONG GetIndex() const { return GetPos(); }
const SwTxtNode* FindOutlineNodeOfLevel( BYTE nLvl ) const;
BYTE HasPrevNextLayNode() const;
BOOL HasPrevLayNode() const
{ return 0 != (ND_HAS_PREV_LAYNODE & HasPrevNextLayNode()); }
BOOL HasNextLayNode() const
{ return 0 != (ND_HAS_NEXT_LAYNODE & HasPrevNextLayNode()); }
private:
// privater Constructor, weil nie kopiert werden darf !!
SwNode( const SwNode & rNodes );
};
// --------------------
// class SwStartNode
// --------------------
class SwStartNode: public SwNode
{
friend class SwNode;
friend class SwNodes;
friend class SwEndNode; // um theEndOfSection zu setzen !!
SwEndNode* pEndOfSection;
SwStartNodeType eSttNdTyp;
// fuer den initialen StartNode
SwStartNode( SwNodes& rNodes, ULONG nPos );
protected:
SwStartNode( const SwNodeIndex &rWhere,
const BYTE nNodeType = ND_STARTNODE,
SwStartNodeType = SwNormalStartNode );
public:
DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)
SwStartNodeType GetStartNodeType() const { return eSttNdTyp; }
// an alle ContentNodes der Section das ChkCondColl rufen
void CheckSectionCondColl() const;
private:
// privater Constructor, weil nie kopiert werden darf !!
SwStartNode( const SwStartNode & rNode );
};
// --------------------
// class SwEndNode
// --------------------
class SwEndNode : public SwNode
{
friend class SwNodes;
friend class SwTableNode; // um seinen EndNode anlegen zukoennen
friend class SwSectionNode; // um seinen EndNode anlegen zukoennen
// fuer den initialen StartNode
SwEndNode( SwNodes& rNodes, ULONG nPos, SwStartNode& rSttNd );
protected:
SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
DECL_FIXEDMEMPOOL_NEWDEL(SwEndNode)
private:
// privater Constructor, weil nie kopiert werden darf !!
SwEndNode( const SwEndNode & rNode );
};
// --------------------
// SwCntntNode
// --------------------
class SwCntntNode: public SwModify, public SwNode, public SwIndexReg
{
// Der Reader darf NewAttrSet() aufrufen!
friend class SwSwgReader;
friend class Sw3IoImp;
//FEATURE::CONDCOLL
SwDepend* pCondColl;
//FEATURE::CONDCOLL
protected:
SwCntntNode( const SwNodeIndex &rWhere, const BYTE nNodeType,
SwFmtColl *pFmtColl );
virtual ~SwCntntNode();
// Attribut-Set fuer alle AUTO-Attribute eines CntntNodes
// ( z.B: TxtNode oder NoTxtNode
SwAttrSet *pAttrSet;
// lasse von den entsprechenden Nodes die spz. AttrSets anlegen
virtual void NewAttrSet( SwAttrPool& ) = 0;
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
virtual SwCntntFrm *MakeFrm() = 0;
virtual SwCntntNode *SplitNode(const SwPosition & ) = 0;
virtual SwCntntNode *JoinNext();
virtual SwCntntNode *JoinPrev();
// koennen 2 Nodes zusammengefasst werden ?
// in pIdx kann die 2. Position returnt werden.
int CanJoinNext( SwNodeIndex* pIdx =0 ) const;
int CanJoinPrev( SwNodeIndex* pIdx =0 ) const;
void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
BOOL GoNext(SwIndex *) const;
BOOL GoPrevious(SwIndex *) const;
SwCntntFrm *GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
const BOOL bCalcFrm = TRUE ) const;
// Gibt die tatsaechlcheGroesse des Frames zurueck bzw. ein leeres
// Rechteck, wenn kein Layout existiert.
// Wird fuer die Export Filter benoetigt.
SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
const Point* pPoint = 0,
const BOOL bCalcFrm = FALSE ) const;
SwRect FindPageFrmRect( const BOOL bPrtArea = FALSE,
const Point* pPoint = 0,
const BOOL bCalcFrm = FALSE ) const;
/*
* Methode erzeugt fuer den angegebenen Node alle Ansichten vom
* Dokument. Die erzeugten Contentframes werden in das entsprechende
* Layout gehaengt.
*/
void MakeFrms( SwCntntNode& rNode );
/*
* Methode loescht fuer den Node alle Ansichten vom
* Dokument. Die Contentframes werden aus dem entsprechenden
* Layout ausgehaengt.
*/
void DelFrms();
/*
* liefert die Anzahl der Elemente des Inhalts des Nodes;
* Default ist 1, Unterschiede gibt es beim TextNode und beim
* Formelnode.
*/
virtual xub_StrLen Len() const;
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0;
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
// SS fuer die PoolItems: (Harte-(Fmt)Attrbutierung)
// Ist bInParent FALSE, wird nur in diesem Node nach dem Attribut gesucht.
const SfxPoolItem& GetAttr( USHORT nWhich, BOOL bInParent=TRUE ) const;
BOOL GetAttr( SfxItemSet& rSet, BOOL bInParent=TRUE ) const;
BOOL SetAttr( const SfxPoolItem& );
BOOL SetAttr( const SfxItemSet& rSet );
BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
BOOL ResetAttr( const SvUShorts& rWhichArr );
USHORT ResetAllAttr();
// liefert das Attribut, das nicht ueber die bedingte Vorlage kommt!
const SfxPoolItem* GetNoCondAttr( USHORT nWhich, BOOL bInParents ) const;
// hat der Node schon eigene Auto-Attribute ?
// Zugriff auf SwAttrSet
inline SwAttrSet &GetSwAttrSet();
inline const SwAttrSet &GetSwAttrSet() const;
inline SwAttrSet *GetpSwAttrSet() { return pAttrSet; }
inline const SwAttrSet *GetpSwAttrSet() const { return pAttrSet; }
inline BOOL HasSwAttrSet() const { return pAttrSet ? TRUE : FALSE; }
virtual SwFmtColl* ChgFmtColl( SwFmtColl* );
SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); }
//FEATURE::CONDCOLL
inline SwFmtColl& GetAnyFmtColl() const;
void SetCondFmtColl( SwFmtColl* );
inline SwFmtColl* GetCondFmtColl() const;
BOOL IsAnyCondition( SwCollCondition& rTmp ) const;
void ChkCondColl();
//FEATURE::CONDCOLL
// invalidiert die am Node gesetzte NumRule. Diese wird
// spaetestend in EndAction einer Shell geupdatet
BOOL InvalidateNumRule();
private:
// privater Constructor, weil nie kopiert werden darf !!
SwCntntNode( const SwCntntNode & rNode );
};
//---------
// SwTableNode
//---------
class SwTableNode : public SwStartNode
{
friend class SwNodes;
SwTable* pTable;
protected:
virtual ~SwTableNode();
public:
SwTableNode( const SwNodeIndex & );
const SwTable& GetTable() const { return *pTable; }
SwTable& GetTable() { return *pTable; }
SwTabFrm *MakeFrm();
//Legt die Frms fuer den TableNode (also die TabFrms) an.
void MakeFrms( SwNodeIndex* pIdxBehind );
//Methode loescht fuer den Node alle Ansichten vom
//Dokument. Die Contentframes werden aus dem entsprechenden
//Layout ausgehaengt.
void DelFrms();
//Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
//Dokument. Die erzeugten Contentframes werden in das entsprechende
//Layout gehaengt.
void MakeFrms( const SwNodeIndex & rIdx );
SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
void SetNewTable( SwTable* , BOOL bNewFrames=TRUE );
private:
// privater Constructor, weil nie kopiert werden darf !!
SwTableNode( const SwTableNode & rNode );
};
//---------
// SwSectionNode
//---------
class SwSectionNode : public SwStartNode
{
friend class SwNodes;
SwSection* pSection;
protected:
virtual ~SwSectionNode();
public:
SwSectionNode( const SwNodeIndex&, SwSectionFmt& rFmt );
const SwSection& GetSection() const { return *pSection; }
SwSection& GetSection() { return *pSection; }
// setze ein neues SectionObject. Erstmal nur gedacht fuer die
// neuen VerzeichnisSections. Der geht ueber in den Besitz des Nodes!
void SetNewSection( SwSection* pNewSection );
SwFrm *MakeFrm();
//Legt die Frms fuer den SectionNode (also die SectionFrms) an.
//Im Defaultfall wird bis die Frames bis zum Ende des Bereichs angelegt,
//uebergibt man einen weiteren NodeIndex pEnd, so wird bis zu diesem
//ein MakeFrms gerufen, genutzt wird dies von TableToText
void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = NULL );
//Methode loescht fuer den Node alle Ansichten vom
//Dokument. Die Contentframes werden aus dem entsprechenden
//Layout ausgehaengt.
void DelFrms();
//Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
//Dokument. Die erzeugten Contentframes werden in das entsprechende
//Layout gehaengt.
void MakeFrms( const SwNodeIndex & rIdx );
SwSectionNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
// setze den Verweis im Format der Section auf sich selbst
void NodesArrChgd();
// ueberprueft bei _nicht_ versteckten Bereichen, ob es Inhalt gibt, der
// _nicht_ in einem versteckten (Unter-)Bereich liegt
BOOL IsCntntHidden() const;
private:
// privater Constructor, weil nie kopiert werden darf !!
SwSectionNode( const SwSection& rNode );
};
// ---------------------- einige Inline Methoden ----------------------
inline SwEndNode *SwNode::GetEndNode()
{
return ND_ENDNODE == nNodeType ? (SwEndNode*)this : 0;
}
inline const SwEndNode *SwNode::GetEndNode() const
{
return ND_ENDNODE == nNodeType ? (const SwEndNode*)this : 0;
}
inline SwStartNode *SwNode::GetStartNode()
{
return ND_STARTNODE & nNodeType ? (SwStartNode*)this : 0;
}
inline const SwStartNode *SwNode::GetStartNode() const
{
return ND_STARTNODE & nNodeType ? (const SwStartNode*)this : 0;
}
inline SwTableNode *SwNode::GetTableNode()
{
return ND_TABLENODE == nNodeType ? (SwTableNode*)this : 0;
}
inline const SwTableNode *SwNode::GetTableNode() const
{
return ND_TABLENODE == nNodeType ? (const SwTableNode*)this : 0;
}
inline SwSectionNode *SwNode::GetSectionNode()
{
return ND_SECTIONNODE == nNodeType ? (SwSectionNode*)this : 0;
}
inline const SwSectionNode *SwNode::GetSectionNode() const
{
return ND_SECTIONNODE == nNodeType ? (const SwSectionNode*)this : 0;
}
inline SwCntntNode *SwNode::GetCntntNode()
{
return ND_CONTENTNODE & nNodeType ? (SwCntntNode*)this : 0;
}
inline const SwCntntNode *SwNode::GetCntntNode() const
{
return ND_CONTENTNODE & nNodeType ? (const SwCntntNode*)this : 0;
}
inline BOOL SwNode::IsStartNode() const
{
return ND_STARTNODE & nNodeType ? TRUE : FALSE;
}
inline BOOL SwNode::IsCntntNode() const
{
return ND_CONTENTNODE & nNodeType ? TRUE : FALSE;
}
inline BOOL SwNode::IsEndNode() const
{
return ND_ENDNODE == nNodeType ? TRUE : FALSE;
}
inline BOOL SwNode::IsTxtNode() const
{
return ND_TEXTNODE == nNodeType ? TRUE : FALSE;
}
inline BOOL SwNode::IsTableNode() const
{
return ND_TABLENODE == nNodeType ? TRUE : FALSE;
}
inline BOOL SwNode::IsSectionNode() const
{
return ND_SECTIONNODE == nNodeType ? TRUE : FALSE;
}
#ifndef COMPACT
inline BOOL SwNode::IsNoTxtNode() const
{
return ND_NOTXTNODE & nNodeType ? TRUE : FALSE;
}
inline BOOL SwNode::IsOLENode() const
{
return ND_OLENODE == nNodeType ? TRUE : FALSE;
}
inline BOOL SwNode::IsGrfNode() const
{
return ND_GRFNODE == nNodeType ? TRUE : FALSE;
}
#endif
inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
{
return ((SwNode*)this)->FindSttNodeByType( eTyp );
}
inline const SwTableNode* SwNode::FindTableNode() const
{
return ((SwNode*)this)->FindTableNode();
}
inline const SwSectionNode* SwNode::FindSectionNode() const
{
return ((SwNode*)this)->FindSectionNode();
}
inline ULONG SwNode::StartOfSectionIndex() const
{
return pStartOfSection->GetIndex();
}
inline const SwStartNode* SwNode::StartOfSectionNode() const
{
return pStartOfSection;
}
inline SwStartNode* SwNode::StartOfSectionNode()
{
return pStartOfSection;
}
inline ULONG SwNode::EndOfSectionIndex() const
{
const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
return pStNd->pEndOfSection->GetIndex();
}
inline const SwEndNode* SwNode::EndOfSectionNode() const
{
const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
return pStNd->pEndOfSection;
}
inline SwEndNode* SwNode::EndOfSectionNode()
{
SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
return pStNd->pEndOfSection;
}
inline SwNodes& SwNode::GetNodes()
{
return (SwNodes&)GetArray();
}
inline const SwNodes& SwNode::GetNodes() const
{
return (SwNodes&)GetArray();
}
inline SwDoc* SwNode::GetDoc()
{
return GetNodes().GetDoc();
}
inline const SwDoc* SwNode::GetDoc() const
{
return GetNodes().GetDoc();
}
inline SwFmtColl* SwCntntNode::GetCondFmtColl() const
{
return pCondColl ? (SwFmtColl*)pCondColl->GetRegisteredIn() : 0;
}
inline SwFmtColl& SwCntntNode::GetAnyFmtColl() const
{
return pCondColl && pCondColl->GetRegisteredIn()
? *(SwFmtColl*)pCondColl->GetRegisteredIn()
: *(SwFmtColl*)GetRegisteredIn();
}
inline SwAttrSet& SwCntntNode::GetSwAttrSet()
{
return pAttrSet ? ( (SwAttrSet &) ( *pAttrSet ) )
: ( (SwAttrSet &) ( GetAnyFmtColl().GetAttrSet() ) );
}
inline const SwAttrSet& SwCntntNode::GetSwAttrSet() const
{
return pAttrSet ? ( (SwAttrSet &) ( *pAttrSet ) )
: ( (SwAttrSet &) ( GetAnyFmtColl().GetAttrSet() ) );
}
//FEATURE::CONDCOLL
inline const SfxPoolItem& SwCntntNode::GetAttr( USHORT nWhich,
BOOL bInParents ) const
{
return GetSwAttrSet().Get( nWhich, bInParents );
}
#endif
+422
View File
@@ -0,0 +1,422 @@
/*************************************************************************
*
* $RCSfile: numrule.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _NUMRULE_HXX
#define _NUMRULE_HXX
#ifndef _LINK_HXX //autogen
#include <tools/link.hxx>
#endif
#ifndef _SV_GEN_HXX //autogen wg. Size
#include <tools/gen.hxx>
#endif
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
#ifndef _SVX_SVXENUM_HXX //autogen
#include <svx/svxenum.hxx>
#endif
#ifndef _SWTYPES_HXX
#include <swtypes.hxx>
#endif
#ifndef _CALBCK_HXX
#include <calbck.hxx>
#endif
#ifndef _ERRHDL_HXX
#include <errhdl.hxx> // Fuer die inline-ASSERTs
#endif
#ifndef _SWERROR_H
#include <error.h> // Fuer die inline-ASSERTs
#endif
class Font;
class SvxBrushItem;
class SvxNumberFormat;
class SvxNumRule;
class SwCharFmt;
class SwDoc;
class SwFmtVertOrient;
class SwNodeNum;
class SwTxtNode;
extern char __FAR_DATA sOutlineStr[]; // SWG-Filter
const sal_Unicode cBulletChar = 0xF000 + 149; // Charakter fuer Aufzaehlungen
inline BYTE GetRealLevel( const BYTE nLvl )
{
return nLvl & (NO_NUMLEVEL - 1);
}
class SwNumType
{
void GetRomanStr( ULONG nNo, String& rStr ) const;
void GetCharStr( ULONG nNo, String& rStr ) const;
void GetCharStrN( ULONG nNo, String& rStr ) const;
public:
/* Reihenfolge der Elemente des enums ist fuer die
* UI-Seite interesssant -- bitte nicht ohne trifftigen
* Grund und Nachricht an die UI-Seite aendern.
*/
SvxExtNumType eType;
SwNumType() { eType = SVX_NUM_ARABIC; }
SwNumType( const SwNumType& rType ) : eType( rType.eType ) {}
String GetNumStr( ULONG nNo ) const;
};
class SwNumFmt : public SwClient, public SwNumType
{
String aPrefix; // vorangestellter Text
String aPostfix; // nachfolgender Text
// bei eType == USER_BITMAP ist folgendes ganz interessant
Size aGrfSize;
SvxBrushItem* pGrfBrush;
SwFmtVertOrient* pVertOrient;
// bei eType == CHAR_SPECIAL ist folgendes ganz interessant
Font* pBulletFont; // Pointer auf den BulletFont
SvxAdjust eNumAdjust; // Ausrichtung (Links/rechts/zent.)
short nFirstLineOffset; // Abstand zwischen Linken Rand und Text
short nLSpace; // relativer linker Rand
USHORT nAbsLSpace; // absoluter linker Rand
USHORT nCharTextOffset; // Abstand zwischen Zeichen und Text
USHORT nStart; // Startwert fuer die Nummer
BYTE nInclUpperLevel; // wieviele Levels
sal_Unicode cBullet; // das Bullet Char
BOOL bRelLSpace : 1; // LSpace als relative Angabe (UI)
void UpdateNumNodes( SwDoc* pDoc );
DECL_STATIC_LINK( SwNumFmt, GraphicArrived, void * );
public:
SwNumFmt();
SwNumFmt( const SwNumFmt& );
SwNumFmt( const SvxNumberFormat&, SwDoc* pDoc);
SvxNumberFormat MakeSvxFormat() const;
virtual ~SwNumFmt();
SwNumFmt& operator=( const SwNumFmt& );
BOOL operator==( const SwNumFmt& ) const;
BOOL operator!=( const SwNumFmt& r ) const { return !(*this == r); }
SwCharFmt* GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
void SetCharFmt( SwCharFmt* );
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
// ist der Font* == 0, wird der Font nicht gewechselt
void SetBulletFont(const Font*);
const Font* GetBulletFont() const { return pBulletFont; }
sal_Unicode GetBulletChar() const { return cBullet; }
void SetBulletChar( sal_Unicode c ) { cBullet = c; }
//------
// ALT
BOOL IsInclUpperLevel() const { return 1 < nInclUpperLevel; }
void SetInclUpperLevel( BOOL b ) { nInclUpperLevel = b ? MAXLEVEL : 1; }
// ALT
//------
BYTE GetUpperLevel() const { return nInclUpperLevel; }
void SetUpperLevel( BYTE nValue ) { nInclUpperLevel = nValue; }
BOOL IsRelLSpace() const { return bRelLSpace; }
void SetRelLSpace( BOOL b ) { bRelLSpace = b; }
SvxAdjust GetAdjust() const { return eNumAdjust; }
void SetAdjust( SvxAdjust eAdj ) { eNumAdjust = eAdj; }
short GetLSpace() const { return nLSpace; }
void SetLSpace( short n ) { nLSpace = n; }
USHORT GetAbsLSpace() const { return nAbsLSpace; }
void SetAbsLSpace( USHORT n ) { nAbsLSpace = n; }
short GetFirstLineOffset() const { return nFirstLineOffset; }
void SetFirstLineOffset( short n ) { nFirstLineOffset = n; }
USHORT GetCharTextOffset() const { return nCharTextOffset; }
void SetCharTextOffset( USHORT n ) { nCharTextOffset = n; }
USHORT GetStartValue() const { return nStart; }
void SetStartValue( USHORT n ) { nStart = n; }
const String& GetPrefix() const { return aPrefix; }
void SetPrefix( const String& rS ) { aPrefix = rS; }
const String& GetPostfix() const { return aPostfix; }
void SetPostfix( const String& rS ) { aPostfix = rS; }
const SvxBrushItem* GetGrfBrush() const { return pGrfBrush; }
const SwFmtVertOrient* GetGrfOrient() const { return pVertOrient; }
const Size& GetGrfSize() const { return aGrfSize; }
void SetGrfBrush( const SvxBrushItem* pGrfBr, const Size* pSz,
const SwFmtVertOrient* pVOrient );
void SetGraphic( const String& rName );
// Graphic ggfs. reinswappen
const Graphic* GetGraphic() const;
// kann fuer das Format ein Text erzeugt werden?
inline BOOL IsTxtFmt() const;
};
enum SwNumRuleType { OUTLINE_RULE = 0, NUM_RULE = 1, RULE_END = 2 };
class SwNumRule
{
friend void _FinitCore();
static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
static USHORT aDefNumIndents[ MAXLEVEL ];
static USHORT nRefCount;
static Font* pDefBulletFont;
static char* pDefOutlineName;
SwNumFmt* aFmts[ MAXLEVEL ];
String sName;
SwNumRuleType eRuleType;
USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte NumRules
USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
BOOL bAutoRuleFlag : 1;
BOOL bInvalidRuleFlag : 1;
BOOL bContinusNum : 1; // Fortlaufende Numerierung - ohne Ebenen
BOOL bAbsSpaces : 1; // die Ebenen repraesentieren absol. Einzuege
static void _MakeDefBulletFont();
public:
SwNumRule( const String& rNm, SwNumRuleType = NUM_RULE,
BOOL bAutoFlg = TRUE );
SwNumRule( const SwNumRule& );
~SwNumRule();
SwNumRule& operator=( const SwNumRule& );
BOOL operator==( const SwNumRule& ) const;
BOOL operator!=( const SwNumRule& r ) const { return !(*this == r); }
inline const SwNumFmt* GetNumFmt( USHORT i ) const;
inline const SwNumFmt& Get( USHORT i ) const;
void Set( USHORT i, const SwNumFmt* );
void Set( USHORT i, const SwNumFmt& );
String MakeNumString( const SwNodeNum&, BOOL bInclStrings = TRUE,
BOOL bOnlyArabic = FALSE ) const;
inline unsigned char GetBulletChar( const SwNodeNum& ) const;
inline const Font* GetBulletFont( const SwNodeNum& ) const;
static inline const Font& GetDefBulletFont();
static char* GetOutlineRuleName() { return pDefOutlineName; }
static inline USHORT GetNumIndent( BYTE nLvl );
static inline USHORT GetBullIndent( BYTE nLvl );
SwNumRuleType GetRuleType() const { return eRuleType; }
void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew;
bInvalidRuleFlag = TRUE; }
// eine Art Copy-Constructor, damit die Num-Formate auch an den
// richtigen CharFormaten eines Dokumentes haengen !!
// (Kopiert die NumFormate und returnt sich selbst)
SwNumRule& CopyNumRule( SwDoc*, const SwNumRule& );
// testet ob die CharFormate aus dem angegeben Doc sind und kopiert
// die gegebenfalls
void CheckCharFmts( SwDoc* pDoc );
// test ob der Einzug von dieser Numerierung kommt.
BOOL IsRuleLSpace( SwTxtNode& rNd ) const;
const String& GetName() const { return sName; }
void SetName( const String& rNm ) { sName = rNm; }
BOOL IsAutoRule() const { return bAutoRuleFlag; }
void SetAutoRule( BOOL bFlag ) { bAutoRuleFlag = bFlag; }
BOOL IsInvalidRule() const { return bInvalidRuleFlag; }
void SetInvalidRule( BOOL bFlag ) { bInvalidRuleFlag = bFlag; }
BOOL IsContinusNum() const { return bContinusNum; }
void SetContinusNum( BOOL bFlag ) { bContinusNum = bFlag; }
BOOL IsAbsSpaces() const { return bAbsSpaces; }
void SetAbsSpaces( BOOL bFlag ) { bAbsSpaces = bFlag; }
// erfragen und setzen der Poolvorlagen-Id's
USHORT GetPoolFmtId() const { return nPoolFmtId; }
void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
// erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
USHORT GetPoolHelpId() const { return nPoolHelpId; }
void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
void SetSvxRule(const SvxNumRule&, SwDoc* pDoc);
SvxNumRule MakeSvxNumRule() const;
};
class SwNodeNum
{
USHORT nLevelVal[ MAXLEVEL ]; // Nummern aller Levels
USHORT nSetValue; // vorgegeben Nummer
BYTE nMyLevel; // akt. Level
BOOL bStartNum; // Numerierung neu starten
public:
inline SwNodeNum( BYTE nLevel = NO_NUM, USHORT nSetVal = USHRT_MAX );
inline SwNodeNum& operator=( const SwNodeNum& rCpy );
BOOL operator==( const SwNodeNum& ) const;
BYTE GetLevel() const { return nMyLevel; }
void SetLevel( BYTE nVal ) { nMyLevel = nVal; }
BOOL IsStart() const { return bStartNum; }
void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; }
USHORT GetSetValue() const { return nSetValue; }
void SetSetValue( USHORT nVal ) { nSetValue = nVal; }
const USHORT* GetLevelVal() const { return nLevelVal; }
USHORT* GetLevelVal() { return nLevelVal; }
};
// ------------ inline Methoden ----------------------------
inline BOOL SwNumFmt::IsTxtFmt() const
{
return SVX_NUM_NUMBER_NONE != eType &&
SVX_NUM_CHAR_SPECIAL != eType &&
SVX_NUM_BITMAP != eType;
}
inline const SwNumFmt& SwNumRule::Get( USHORT i ) const
{
ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL);
return aFmts[ i ] ? *aFmts[ i ]
: *aBaseFmts[ eRuleType ][ i ];
}
inline const SwNumFmt* SwNumRule::GetNumFmt( USHORT i ) const
{
ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL);
return aFmts[ i ];
}
inline const Font& SwNumRule::GetDefBulletFont()
{
if( !pDefBulletFont )
SwNumRule::_MakeDefBulletFont();
return *pDefBulletFont;
}
inline USHORT SwNumRule::GetNumIndent( BYTE nLvl )
{
ASSERT( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
}
inline USHORT SwNumRule::GetBullIndent( BYTE nLvl )
{
ASSERT( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
}
inline unsigned char SwNumRule::GetBulletChar( const SwNodeNum& rNum ) const
{
return Get( rNum.GetLevel() & ~NO_NUMLEVEL ).GetBulletChar();
}
inline const Font* SwNumRule::GetBulletFont( const SwNodeNum& rNum ) const
{
return Get( rNum.GetLevel() & ~NO_NUMLEVEL ).GetBulletFont();
}
SwNodeNum::SwNodeNum( BYTE nLevel, USHORT nSetVal )
: nMyLevel( nLevel ), nSetValue( nSetVal ), bStartNum( FALSE )
{
memset( nLevelVal, 0, sizeof( nLevelVal ) );
}
inline SwNodeNum& SwNodeNum::operator=( const SwNodeNum& rCpy )
{
nSetValue = rCpy.nSetValue;
nMyLevel = rCpy.nMyLevel;
bStartNum = rCpy.bStartNum;
memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) );
return *this;
}
#endif // _NUMRULE_HXX

Some files were not shown because too many files have changed in this diff Show More