diff options
Diffstat (limited to 'sw/inc')
183 files changed, 47672 insertions, 0 deletions
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx new file mode 100644 index 000000000000..046c44affe91 --- /dev/null +++ b/sw/inc/acmplwrd.hxx @@ -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 diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx new file mode 100644 index 000000000000..d0d69c949d28 --- /dev/null +++ b/sw/inc/authfld.hxx @@ -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 + diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx new file mode 100644 index 000000000000..c69d1fd3b4c3 --- /dev/null +++ b/sw/inc/authratr.hxx @@ -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 diff --git a/sw/inc/bookmrk.hxx b/sw/inc/bookmrk.hxx new file mode 100644 index 000000000000..ade83966be93 --- /dev/null +++ b/sw/inc/bookmrk.hxx @@ -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 diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx new file mode 100644 index 000000000000..365fb2d66363 --- /dev/null +++ b/sw/inc/bparr.hxx @@ -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 Eintrge 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 diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx new file mode 100644 index 000000000000..e84370e4fc24 --- /dev/null +++ b/sw/inc/calbck.hxx @@ -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 diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx new file mode 100644 index 000000000000..b839ffe26463 --- /dev/null +++ b/sw/inc/calc.hxx @@ -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 diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx new file mode 100644 index 000000000000..e2fa5a71b4b2 --- /dev/null +++ b/sw/inc/cellatr.hxx @@ -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 diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx new file mode 100644 index 000000000000..89d7ba9a2910 --- /dev/null +++ b/sw/inc/cellfml.hxx @@ -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 diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx new file mode 100644 index 000000000000..7e65a2d47737 --- /dev/null +++ b/sw/inc/charatr.hxx @@ -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 diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx new file mode 100644 index 000000000000..0209942b6472 --- /dev/null +++ b/sw/inc/charfmt.hxx @@ -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 + + + diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx new file mode 100644 index 000000000000..fcca48550201 --- /dev/null +++ b/sw/inc/chpfld.hxx @@ -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 diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h new file mode 100644 index 000000000000..175464741804 --- /dev/null +++ b/sw/inc/cmdid.h @@ -0,0 +1,1225 @@ +/************************************************************************* + * + * $RCSfile: cmdid.h,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): _______________________________________ + * + * + ************************************************************************/ +/****************************************************************************** +Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr + erlaubt, da es von swicli.c included wird! +******************************************************************************/ + +#ifndef _SFX_HRC +#include <sfx2/sfx.hrc> +#endif + +/* Flags die mittels des Disable-Features in den Slot-Definitionen ausgenutzt + * werden */ +#define SW_DISABLE_ON_PROTECTED_CURSOR 0x00000001 +#define SW_DISABLE_ON_MAILBOX_EDITOR 0x00000002 + + +#define FN_FILE SID_SW_START +#define FN_EDIT (SID_SW_START + 100) +#define FN_VIEW (SID_SW_START + 200) +#define FN_INSERT (SID_SW_START + 300) +#define FN_FORMAT (SID_SW_START + 400) +#define FN_EXTRA (SID_SW_START + 600) +#define FN_WINDOW (SID_SW_START + 700) +#define FN_HELP (SID_SW_START + 800) +#define FN_SELECTION (SID_SW_START + 900) +#define FN_QUERY (SID_SW_START + 1000) +#define FN_ENVELP (SID_SW_START + 1050) +#define FN_PARAM (SID_SW_START + 1100) +#define FN_STAT (SID_SW_START + 1180) +#define FN_PRNOPT (SID_SW_START + 1200) +#define FN_PGPREVIEW (SID_SW_START + 1250) +#define FN_FRAME (SID_SW_START + 1300) +#define FN_INSERT2 (SID_SW_START + 1400) +#define FN_FORMAT2 (SID_SW_START + 1600) +#define FN_EDIT2 (SID_SW_START + 1800) +#define FN_QUERY2 (SID_SW_START + 2000) +#define FN_EXTRA2 (SID_SW_START + 2200) +#define FN_PARAM2 (SID_SW_START + 2400) + +#define HELP_OFFSET 1100 +#define CMD_STR_OFFSET 2200 +#define CMD_STR_OFFSET_MULTILANG 3300 +#define CMDID_END 5500 + +/*-------------------------------------------------------------------- + Bereich: Datei + --------------------------------------------------------------------*/ +#define FN_CLOSE_FILE (FN_FILE + 1 ) /* Schliessen */ +#define FN_LAUNCH_REGISTRY (FN_FILE + 2 ) /* Ablage */ + + +#define FN_NEW_GLOBAL_DOC (FN_FILE + 4 ) /* Globaldokument erzeugen */ +#define FN_NEW_FILE (FN_FILE + 5 ) /* Neu */ +#define FN_NEW_FILE_DLG (FN_FILE + 6 ) /* Neu Dialog */ +#define FN_OPEN_FILE (FN_FILE + 7 ) /* Oeffnen */ +#define FN_EDIT_FILE (FN_FILE + 8 ) /* Oeffnen oder ToTop */ + +#define FN_INETFILE (FN_FILE + 9 ) /* Internet File-Dialog */ + +#define FN_PRINT_FILE (FN_FILE + 10) /* Drucken */ +#define FN_PRINT_FILE_OPTIONS (FN_FILE + 11) /* Drucken Optionen */ +#define FN_SAVE_FILE_AS (FN_FILE + 12) /* Speichern unter */ +#define FN_SAVE_FILE (FN_FILE + 13) /* Speichern */ +#define FN_SETUP_PRINTER (FN_FILE + 14) /* Druckereinstellung */ +#define FN_SETUP_PRINTER_DLG (FN_FILE + 15) /* Druckereinstellung */ +#define FN_SHOW_PREVIEW (FN_FILE + 16) /* Druckbild */ +#define FN_EXIT (FN_FILE + 17) /* Writer beenden */ +#define FN_PRINT_CFG_DLG (FN_FILE + 18) /* Optionen Drucken */ + + + +#define FN_SAVE_ALL (FN_FILE + 23) /* Alle Files speichern */ +#define FN_NEW_FILE_DEFAULT (FN_FILE + 24) /* Neue Datei mit Standardvorlage */ +#define FN_PRINT_FILE_DEFAULT (FN_FILE + 25) /* Drucken mit Defaults */ +#define FN_LAUNCH_EQ_EDITOR (FN_FILE + 26) /* Formel Editor */ +#define FN_CHANGE_PRINTER (FN_FILE + 27) /* Drucker einstellen */ +#define FN_FAX_END (FN_FILE + 29) /* Faxen fertig, Id fuer PostMessage */ + +#define FN_SELECT_DATABASE (FN_FILE + 30) /* Selektion Datenbank */ +#define FN_DOC_INFO_DLG (FN_FILE + 31) /* Dokumentinfo */ +#define FN_DOC_MGR_DLG (FN_FILE + 32) /* Dokument-Manager */ + +#define FN_GET_DOCSTAT (FN_FILE + 33) /* Dokumentstatistik einzeln auslesen */ + + +#define FN_SAVE_SELECTION (FN_FILE + 35) /* Selektion speichern */ + +#define FN_OUTLINE_TO_IMPRESS (FN_FILE + 36) /* Outline zu StarImpress senden */ +#define FN_OUTLINE_TO_CLIPBOARD (FN_FILE + 37) /* Outline in das Clipboad copieren */ + +#define FN_NEW_HTML_DOC (FN_FILE + 40 ) /* HTML-Dokument "erzeugen" */ + +#define FN_APP_START (FN_FILE + 98) /* fuer Makro bei App.Start */ +#define FN_APP_END (FN_FILE + 99) /* fuer Makro bei App.Ende */ + +/*-------------------------------------------------------------------- + Bereich: Bearbeiten + --------------------------------------------------------------------*/ +#define FN_CLEAR (FN_EDIT + 1 ) /* Loeschen */ +#define FN_COPY (FN_EDIT + 2 ) /* Kopieren */ +#define FN_CUT (FN_EDIT + 3 ) /* Ausschneiden */ +#define FN_EDIT_FIELD (FN_EDIT + 4 ) /* Textbefehl bearbeiten */ +#define FN_EDIT_FIELD_DLG (FN_EDIT + 5 ) /* Textbefehl bearbeiten */ +#define FN_EDIT_FILE_INFO (FN_EDIT + 6 ) /* Dokumentinfo */ +#define FN_EDIT_FILE_INFO_DLG (FN_EDIT + 7 ) /* Dokumentinfo Dialog */ +#define FN_EDIT_LINK (FN_EDIT + 8 ) /* Verknuepfungen */ +#define FN_EDIT_LINK_DLG (FN_EDIT + 9 ) /* Verknuepfungen */ +#define FN_GOTO (FN_EDIT + 11) /* Gehe zu */ + +#define FN_PASTE (FN_EDIT + 13) /* Einfuegen */ +#define FN_PASTESPECIAL (FN_EDIT + 14) /* Verknuepfung einfuegen */ +#define FN_PASTESPECIAL_DLG (FN_EDIT + 15) /* Verknuepfung einfuegen */ + +#define FN_NUMBER_BULLETS (FN_EDIT + 21) /* Bullets */ +#define FN_REPEAT (FN_EDIT + 22) /* Letzten Befehl wiederholen */ +#define FN_EDIT_IDX_ENTRY_DLG (FN_EDIT + 23) /* Index-Entry bearbeiten */ +#define FN_UPDATE_FIELDS (FN_EDIT + 26) /* Feldinhalte erneuern */ +#define FN_EXECUTE_MACROFIELD (FN_EDIT + 27) /* Macrofeld ausfuehren */ +#define FN_EDIT_FORMULA (FN_EDIT + 28) /* Formel in RibbonBar bearbeiten */ +#define FN_CALC_TABLE (FN_EDIT + 29) /* Tabelle durchrechnen */ + +/*-------------------------------------------------------------------- + Bereich: Bullets + --------------------------------------------------------------------*/ +#define FN_NUM_BULLET_DOWN (FN_EDIT + 30) /* Runterstufen */ +#define FN_NUM_BULLET_UP (FN_EDIT + 31) /* Raufstufen */ +#define FN_NUM_BULLET_PREV (FN_EDIT + 32) /* zum vorigen Eintrag */ +#define FN_NUM_BULLET_NEXT (FN_EDIT + 33) /* zum naechsten Eintrag */ +#define FN_NUM_BULLET_MOVEUP (FN_EDIT + 34) /* nach oben schieben */ +#define FN_NUM_BULLET_MOVEDOWN (FN_EDIT + 35) /* nach unten schieben */ +#define FN_NUM_BULLET_NONUM (FN_EDIT + 36) /* Eintrag ohne Nummer */ +#ifndef FN_NUM_BULLET_OFF //in SVX already +#define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* Numerierung aus */ +#endif + + +// schon im SVX +//#define FN_NUM_BULLET_ON (FN_EDIT + 38) /* Numerierung mit Bullets an */ + +#define FN_NUM_BULLET_OUTLINE_DOWN (FN_EDIT + 39) /* Runterstufen mit Unterpunkten */ +#define FN_NUM_BULLET_OUTLINE_UP (FN_EDIT + 40) /* Raufstufen mit Unterpunkten */ +#define FN_NUM_BULLET_OUTLINE_MOVEUP (FN_EDIT + 41) /* nach oben schieben mit Unterpunkten */ +#define FN_NUM_BULLET_OUTLINE_MOVEDOWN (FN_EDIT + 42) /* nach unten schieben mit Unterpunkten */ +#define FN_UPDATE_INPUTFIELDS (FN_EDIT + 43) /* Eingabefelder updaten */ +// schon im SVX +//#define FN_NUM_NUMBERING_ON (FN_EDIT + 44) /* Numerierung an */ + +#define FN_NUM_OR_NONUM (FN_EDIT + 46) /* Nummer ein-/aus */ + +#define FN_GOTO_NEXT_INPUTFLD (FN_EDIT + 47) /* zum naechsten EingabeFeld */ +#define FN_GOTO_PREV_INPUTFLD (FN_EDIT + 48) /* zum vorherigen EingabeFeld */ + +#define FN_REPEAT_SEARCH (FN_EDIT + 50) /* Suche wiederholen */ +#define FN_REPEAT_REPLACE (FN_EDIT + 51) /* Ersetzen wiederholen */ +#define FN_UPDATE_GRAFIC (FN_EDIT + 53) /* Grafik aendern */ +#define FN_SETTAB_ATCURPOS (FN_EDIT + 54) /* Tab an der aktuellen Pos setzen */ +#define FN_SET_LR_IND_ATCURPOS (FN_EDIT + 55) /* EZE und LR setzen */ +#define FN_FRMCNT_TO_BODY (FN_EDIT + 56) /* Rahmeninhalt zu Text */ +#define FN_UPDATE_TOXBASE (FN_EDIT + 57) /* Naechstes Verzeichnis erneuern */ + +#define FN_REPAGINATE (FN_EDIT + 61) /* Neuformatierung erzwingen */ +#define FN_EDIT_FOOTNOTE (FN_EDIT + 62) /* Fussnote bearbeiten */ + +#define FN_EDIT_REGION (FN_EDIT + 65) /* Bereiche bearbeiten */ +#define FN_GOTO_REFERENCE (FN_EDIT + 66) /* Von der Refmark zur Referenz */ + +// schon im Svx definiert +#define FN_NEXT_BOOKMARK (FN_EDIT + 68) /* */ +#define FN_PREV_BOOKMARK (FN_EDIT + 69) /* */ + +/*Navigator ToolBoxen*/ +#define FN_SELECT_BOOKMARK (FN_EDIT + 70) /**/ +#define FN_ITEM_DOWN (FN_EDIT + 71) /**/ +#define FN_ITEM_LEFT (FN_EDIT + 72) /**/ +#define FN_ITEM_RIGHT (FN_EDIT + 73) /**/ +#define FN_ITEM_UP (FN_EDIT + 74) /**/ +#define FN_DOWN (FN_EDIT + 75) /**/ + +#define FN_SELECT_FOOTER (FN_EDIT + 77) /**/ +#define FN_SELECT_FRAME (FN_EDIT + 78) /**/ +#define FN_SELECT_HEADER (FN_EDIT + 79) /**/ +#define FN_PAGENUMBER (FN_EDIT + 80) /**/ +#define FN_SELECT_AUTO_BOOKMARK (FN_EDIT + 81) /**/ +#define FN_SELECT_FOOTNOTE (FN_EDIT + 82) /**/ +#define FN_SELECT_SET_AUTO_BOOKMARK (FN_EDIT + 83) /**/ +#define FN_SELECT_TABLE (FN_EDIT + 84) /**/ +#define FN_SELECT_INDEX (FN_EDIT + 85) /**/ +#define FN_UP (FN_EDIT + 86) /**/ + + +//#define FN_DELETE_REGION (FN_EDIT + 89) /* Bereiche loeschen */ + + +#define FN_SELECT_PARA (FN_EDIT + 97) /* Absatz selektieren */ + +#define FN_SELECT_CONTENT (FN_EDIT + 99) /* Navigator - Inhaltstyp */ + + + + +#define FN_UPDATE_ALL_LINKS (FN_EDIT2 + 24) /* alle Links updaten */ + +#define FN_REDLINE_ON (FN_EDIT2 + 25) /* Redlining anschalten */ +#define FN_REDLINE_SHOW (FN_EDIT2 + 26) /* Redlining anzeigen */ +#define FN_REDLINE_COMMENT (FN_EDIT2 + 27) /* Redlining kommentieren */ + +#define FN_UPDATE_ALL (FN_EDIT2 + 28) /* FN_UPDATE_ALL_LINKS, + FN_UPDATE_FIELDS, + FN_UPDATE_TOX, + CalcLayout */ + +#define FN_REDLINE_ACCEPT (FN_EDIT2 + 29) /* Redlining annehmen/ablehnen */ +#define FN_ATTR_COLUMNS (FN_EDIT2 + 31) /* SlotId fuer SwFmtCol */ +#define FN_EDIT_CURRENT_TOX (FN_EDIT2 + 32) /* edit current index */ +#define FN_EDIT_AUTH_ENTRY_DLG (FN_EDIT2 + 33) /* edit authorities entry*/ +#define FN_UPDATE_CHARTS (FN_EDIT2 + 34) /* update all charts */ + +#define FN_EDIT_HYPERLINK (FN_EDIT2 + 35) /* edit hyperlink */ + +/*-------------------------------------------------------------------- + Bereich: Bearbeiten + --------------------------------------------------------------------*/ + +#define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */ +#define FN_SHOW_OUTLINE_VIEW (FN_VIEW + 2) /* Gliederungsansicht */ + +#define FN_DRAW_WRAP_DLG (FN_VIEW + 3) /* Draw Umlauf-Dlg */ + +#define FN_RULER (FN_VIEW + 11) /* Horizontales Lineal */ + +#define FN_VIEW_GRAPHIC (FN_VIEW + 13) /* Grafiken anzeigen */ +#define FN_VIEW_BOUNDS (FN_VIEW + 14) /* Begrenzungen */ +#define FN_VIEW_FIELDS (FN_VIEW + 15) /* Textbefehle */ +#define FN_VLINEAL (FN_VIEW + 16) /* Vertikales Lineal */ +#define FN_VSCROLLBAR (FN_VIEW + 17) /* Vertikaler Scrollbar */ +#define FN_HSCROLLBAR (FN_VIEW + 18) /* Horizontaler Scrollbar */ +#define FN_TOOLBOX_TOGGLE (FN_VIEW + 19) /* Toolboxinhalte umschalten */ +#define FN_VIEWOPTIONS_ON (FN_VIEW + 20) /* Gruppe Viewoptions an */ +#define FN_VIEWOPTIONS_OFF (FN_VIEW + 21) /* Gruppe Viewoptions aus */ +#define FN_CONTROLS_ON (FN_VIEW + 22) /* Gruppe Bedienelemte an */ +#define FN_CONTROLS_OFF (FN_VIEW + 23) /* Gruppe Bedienelemte aus */ + +#define FN_VIEW_META_CHARS (FN_VIEW + 24) /* Sonderzeichen anzeigen */ +#define FN_VIEW_MARKS (FN_VIEW + 25) /* Markierungen anzeigen */ +#define FN_VIEW_FIELDNAME (FN_VIEW + 26) /* Feldname anzeigen */ +#define FN_VIEW_TABLEGRID (FN_VIEW + 27) /* Tabellenbegrenzungen anzeigen */ + +#define FN_LAUNCH_SIM (FN_VIEW + 28) /* StarImage starten */ +#define FN_SET_PAGE (FN_VIEW + 29) /* Seitenvorlage am Absatz setzen */ + +#define FN_TOOLBOX_SWITCH (FN_VIEW + 30) /* Auf Textshell umschalten */ + + +//noch mehr Navigator +#define FN_CONTENT_LB (FN_VIEW + 32) /**/ +#define FN_SHOW_CONTENT_BOX (FN_VIEW + 33) /**/ +#define FN_SHOW_ROOT (FN_VIEW + 34) /**/ +#define FN_DROP_REGION (FN_VIEW + 35) /**/ +#define FN_OUTLINE_LEVEL (FN_VIEW + 36) /**/ + +#define FN_PRINT_LAYOUT (FN_VIEW + 37) /* invertierter BrowseMode */ + +#define FN_DROP_REGION_LINK (FN_VIEW + 38) /**/ +#define FN_DROP_REGION_COPY (FN_VIEW + 39) /**/ + +#define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigationscontroller am Scrollbar*/ +#define FN_SCROLL_NEXT_PREV (FN_VIEW + 41) /* arbeitet den MoveType ab */ + +#define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* Versteckte Absaetze */ +#define FN_VIEW_SMOOTH_SCROLL (FN_VIEW + 43) + +#define FN_GLOBAL_SWITCH (FN_VIEW + 44) /* umschalten zw. Global und Inhalt*/ +#define FN_GLOBAL_EDIT (FN_VIEW + 45) /* bearbeiten */ +#define FN_GLOBAL_UPDATE (FN_VIEW + 46) /* aktualisieren */ +#define FN_GLOBAL_OPEN (FN_VIEW + 47) /* oeffnen */ +#define FN_GLOBAL_SAVE_CONTENT (FN_VIEW + 48) /* Inhalt der Verknuepfung mitspeichern */ +#define FN_CREATE_NAVIGATION (FN_VIEW + 49) /* Navigations-Controller erzeugen */ +#define FN_PREVIEW_PRINT_OPTIONS (FN_VIEW + 50) /* Optionsdialog Preview drucken */ +#define FN_PREVIEW_ZOOM (FN_VIEW + 51) /* der Tabellencontroller fuer den Zoom */ + +#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Zahlenerkennung in Tabellen */ + +/*-------------------------------------------------------------------- + Bereich: Einfuegen + --------------------------------------------------------------------*/ +// schon im Svx definiert +#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Sprungmarke einfuegen */ + +// schon im SVX unter der gleichen Id +//#define FN_INSERT_BREAK (FN_INSERT + 3 ) /* Umbruch */ + +#define FN_INSERT_BREAK_DLG (FN_INSERT + 4 ) /* Umbruch */ +#define FN_INSERT_COLUMN_BREAK (FN_INSERT + 5 ) /* Spaltenumbruch */ +#define FN_INSERT_DATE_TIME (FN_INSERT + 6 ) /* Datum/Uhrzeit */ +#define FN_INSERT_FIELD (FN_INSERT + 8 ) /* Textbefehl */ +#define FN_CHANGE_DBFIELD (FN_INSERT + 9 ) /* Datenbankfeld aendern */ + +#define FN_INSERT_CAPTION (FN_INSERT + 10) /* Beschriftung */ +#define FN_INSERT_FOOTNOTE_DLG (FN_INSERT + 12) /* Dialog Fussnote */ + +#define FN_INSERT_REF_FIELD (FN_INSERT + 13) /* Refernzfeld einfuegen */ + +#define FN_INSERT_HYPERLINK (FN_INSERT + 14) /* Zeichendialog/HyperlinkPage*/ + +#define FN_INSERT_INDEX (FN_INSERT + 16) /* Stichworteintrag */ +#define FN_INSERT_INDEX_DLG (FN_INSERT + 17) /* Stichworteintrag */ +#define FN_INSERT_LINEBREAK (FN_INSERT + 18) /* Zeilenumbruch */ + +#define FN_INSERT_OBJECT (FN_INSERT + 21) /* Object */ +#define FN_INSERT_OBJECT_DLG (FN_INSERT + 22) /* Object */ +#define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Seitenumbruch */ +#define FN_INSERT_PAGENO (FN_INSERT + 24) /* Seitennummer */ +#define FN_INSERT_PARAGRAPH (FN_INSERT + 25) /* Absatz */ +#define FN_INSERT_RECORD (FN_INSERT + 26) /* Datensatz einfuegen */ +#define FN_MERGE_RECORD (FN_INSERT + 27) /* Datensatz mischen */ +#define FN_INSERT_SYMBOL (FN_INSERT + 28) /* Sonderzeichen */ +#define FN_POSTIT (FN_INSERT + 29) /* PostIt einfuegen/bearbeiten */ +#define FN_INSERT_TABLE (FN_INSERT + 30) /* Tabelle */ +// schon im Svx definiert +#define FN_INSERT_COLS (FN_INSERT + 32) /* Spalten einfuegen */ +#define FN_INSERT_FRAME_INTERACT (FN_INSERT + 33) /* Rahmen einfuegen aktiv */ +#define FN_INSERT_FRAME (FN_INSERT + 34) /* Rahmen einfuegen */ + +#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* Verzeichniseintrag einfuegen */ +#define FN_INSERT_FRAME_INTERACT_NOCOL (FN_INSERT + 36) /*insert interactive non column frame*/ + +#define FN_INSERT_SOFT_HYPHEN (FN_INSERT + 43) /* weicher Trenner */ +#define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hartes Space */ +#define FN_INSERT_REGION (FN_INSERT + 45) /* Bereich einfuegen */ + + + +#define FN_TOOL_GROUP (FN_INSERT + 47) /* Objekte gruppieren */ +#define FN_TOOL_UNGROUP (FN_INSERT + 48) /* Gruppierng aufheben */ + +#define FN_TOOL_ANKER (FN_INSERT + 49) /* Draw-Objekt umankern */ +#define FN_TOOL_ANKER_PAGE (FN_INSERT + 50) /* Draw-Objekt an Seite verankern */ +#define FN_TOOL_ANKER_PARAGRAPH (FN_INSERT + 51) /* Draw-Objekt am Absatz verankern */ +#define FN_TOOL_HIERARCHIE (FN_INSERT + 52) /* Hierarchie aendern */ +#define FN_TOOL_VMIRROR (FN_INSERT + 53) /* Objekt in unteren Layer */ +#define FN_TOOL_HMIRROR (FN_INSERT + 54) /* Objekt in oberen Layer */ + +//#define FN_QRY_OPEN_DB (FN_INSERT + 55) /* Datenbank oeffnen (Basic) */ +//#define FN_QRY_DEFINE_DB (FN_INSERT + 56) /* Neue Datenbankdefinition anlegen (Basic) */ +//#define FN_QRY_SELECT (FN_INSERT + 57) /* SQL-Statement angeben (Basic) */ +//#define FN_QRY_TO_FIRST_REC (FN_INSERT + 58) /* Ersten Datensatz anwaehlen (Basic) */ +//#define FN_QRY_TO_NEXT_REC (FN_INSERT + 59) /* Naechsten Datensatz anwaehlen (Basic) */ +//#define FN_QRY_TO_REC (FN_INSERT + 60) /* Bestimmten Datensatz anwaehlen (Basic) */ +//#define FN_QRY_GET_RECORD_ID (FN_INSERT + 61) /* Datensatznummer erfragen (Basic) */ +//#define FN_QRY_GET_COLUMN_NUM (FN_INSERT + 62) /* Anzahl der Spalten (Basic) */ + +#define FN_QRY (FN_INSERT + 63) /* Datensatz einfuegen */ +#define FN_QRY_MERGE (FN_INSERT + 64) /* Datensatz einfuegen (Serienbrief) */ +#define FN_QRY_OPEN_TABLE (FN_INSERT + 65) /* Datenbank oeffnen (Basic) */ +#define FN_TOOL_ANKER_FRAME (FN_INSERT + 66) /* Draw-Objekt am Rahmen verankern */ +//#define FN_QRY_SWITCH (FN_INSERT + 67) /* Auf eine bestimmte Datenbank umschalten */ + +#define FN_INSERT_SIM (FN_INSERT + 68) /* Einfuegen StarImage */ +#define FN_INSERT_SMA (FN_INSERT + 69) /* Einfuegen StarMath */ + +#define FN_QRY_GET_COLUMN_NAME (FN_INSERT + 70) /* Anzahl der Spalten (Basic) */ +#define FN_QRY_GET_COLUMN_TYPE (FN_INSERT + 71) /* Type des Datenbankfeldes ermitteln (Basic) */ +#define FN_QRY_GET_COLUMN_TEXT (FN_INSERT + 72) /* Inhalt des aktuellen Datensatzes (Basic) */ +#define FN_QRY_DEL_DEFINED_DB (FN_INSERT + 75) /* Datenbankdefinition loeschen (Basic) */ + +#define FN_DRAWTEXT_ATTR_DLG (FN_INSERT + 76) /* DrawText positionieren */ + +#define FN_QRY_APPEND_RECORD (FN_INSERT + 77) /* Neuen Datensatz anhaengen */ +#define FN_QRY_UPDATE_RECORD (FN_INSERT + 78) /* Datensatzspalte aendern */ +#define FN_QRY_DELETE_RECORD (FN_INSERT + 79) /* Datensatz loeschen */ +#define FN_QRY_GET_PHYS_RECORD_ID (FN_INSERT + 80) /* Physikalische (absolute) Datensatznummer erfragen (Basic) */ + +#define FN_TOOL_ANKER_CHAR (FN_INSERT + 84) /* DrawObject zeichengebunden */ +#define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* Bindestrich ohne Umbruch*/ + +#define FN_QRY_INSERT (FN_INSERT + 86) /* Datensatz-Selektion in Text einfuegen */ +#define FN_QRY_MERGE_FIELD (FN_INSERT + 87) /* Datensatz-Selektion in Felder einfuegen */ +#define FN_QRY_INSERT_FIELD (FN_INSERT + 88) /* Datenbankfeld einfuegen */ + +#define FN_INSERT_CTRL (FN_INSERT + 89) /* Werkzeugleistencontroller Einfuegen*/ +#define FN_INSERT_OBJ_CTRL (FN_INSERT + 90) /* Werkzeugleistencontroller Einfuegen/Objekt*/ +#define FN_INSERT_FIELD_CTRL (FN_INSERT + 91) /* Werkzeugleistencontroller Einfuegen/Feldbefehle*/ + +#define FN_INSERT_FLD_DATE (FN_INSERT + 92) +#define FN_INSERT_FLD_TIME (FN_INSERT + 93) +#define FN_INSERT_FLD_PGNUMBER (FN_INSERT + 94) +#define FN_INSERT_FLD_PGCOUNT (FN_INSERT + 95) +#define FN_INSERT_FLD_TOPIC (FN_INSERT + 96) +#define FN_INSERT_FLD_TITLE (FN_INSERT + 97) +#define FN_INSERT_FLD_AUTHOR (FN_INSERT + 98) +#define FN_INSERT_FOOTNOTE (FN_INSERT + 99) + +/*-------------------------------------------------------------------- + Bereich: Einfuegen (2.Teil) + --------------------------------------------------------------------*/ + +#define FN_QRY_GET_ALL_DBNAME (FN_INSERT2 + 1) /* Alle konfigurierten Datenabanknamen ermitteln */ +#define FN_QRY_GET_DBNAME_COUNT (FN_INSERT2 + 2) /* Anzahl aller konfigurierten Datenabanknamen */ +#define FN_QRY_GET_TABLE_NAME (FN_INSERT2 + 3) /* Tabellenname einer Datenbank ermitteln */ +#define FN_QRY_GET_TABLE_COUNT (FN_INSERT2 + 4) /* Anzahl aller Tabellen einer Datenbank ermitteln */ + +#define FN_INSERT_HEADER (FN_INSERT2 + 5) /* Kopfzeile im Html-mode ein/ausschalten */ +#define FN_INSERT_FOOTER (FN_INSERT2 + 6) /* Fuzeile im Html-mode ein/ausschalten */ +#define FN_SBA_BRW_UPDATE (FN_INSERT2 + 7) /* Datensaetze in Felder einfuegen */ +#define FN_SBA_BRW_INSERT (FN_INSERT2 + 8) /* Datensaetze in Text einfuegen */ +#define FN_SBA_BRW_MERGE (FN_INSERT2 + 9) /* Serienbriefdruck */ +#define FN_JAVAEDIT (FN_INSERT2 + 10) /* Scriptfeld bearbeiten */ +#define FN_INSERT_HRULER (FN_INSERT2 + 11) /* horiz. Grafiklinie einfuegen */ +#define FN_TOOL_ANKER_AT_CHAR (FN_INSERT2 + 12) /* Object zeichengebunden */ + +#define FN_INSERT_PAGEHEADER (FN_INSERT2 + 13) /* Standard Kopfzeile einfuegen */ +#define FN_INSERT_PAGEFOOTER (FN_INSERT2 + 14) /* Standard Fusszeile einfuegen */ + +#define FN_INSERT_ENDNOTE (FN_INSERT2 + 18) /* Endnote einfuegen*/ +#define FN_INSERT_COLUMN_SECTION (FN_INSERT2 + 19) /* Spaltigen Bereich einfgen */ + +#define FN_INSERT_MULTI_TOX (FN_INSERT2 + 20) /* insert any TOX */ +#define FN_INSERT_AUTH_ENTRY_DLG (FN_INSERT2 + 21) /* insert entry for table of authorities*/ + +#define FN_SECTION_APPENDNODE (FN_INSERT2 + 22) /* insert an Paragraph behind the current section*/ + +/*-------------------------------------------------------------------- + Bereich: Format + --------------------------------------------------------------------*/ + +#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* Autoformat-Optionen anwenden */ +#define FN_AUTOFORMAT_AUTO (FN_FORMAT + 2 ) /* Autoformat waehrend der Eingabe */ +#define FN_GROW_FONT_SIZE (FN_FORMAT + 3 ) /* Groesse */ +#define FN_SHRINK_FONT_SIZE (FN_FORMAT + 4 ) /* Groesse */ +#define FN_UNDERLINE_DOUBLE (FN_FORMAT + 5 ) /* Doppelt unterstreichen */ +#define FN_AUTOFORMAT_REDLINE_APPLY (FN_FORMAT + 6 ) /* Autoformat mit Redlining anwenden */ +#define FN_SET_SUPER_SCRIPT (FN_FORMAT + 11) /* Hochstellung */ +#define FN_SET_SUB_SCRIPT (FN_FORMAT + 12) /* Tiefstellung */ + +#define FN_SET_CASEMAP (FN_FORMAT + 14) /* CaseMap */ +#define FN_SET_LANGUAGE (FN_FORMAT + 15) /* Sprache */ +#define FN_SET_KERNING (FN_FORMAT + 16) /* Kerning */ + +#define FN_INDENT_TO_TABSTOP (FN_FORMAT + 17) /* Einrueckung auf die naechste Tabpostion */ +//schon in svxids.hrc +//#define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21) /* Ausrichtung Absatz */ +#define FN_FLIP_HORZ_GRAFIC (FN_FORMAT + 25) /* Spiegeln horizontal */ +#define FN_FLIP_VERT_GRAFIC (FN_FORMAT + 26) /* Spiegeln vertikal */ +#define FN_SET_LINE_SPACE (FN_FORMAT + 27) /* Zeilenabstand parametrisiert */ +#define FN_SET_ADJUST (FN_FORMAT + 28) /* Ausrichtung parametrisiert */ +#define FN_SET_LRMARGIN (FN_FORMAT + 29) /* linker/rechter Rand */ +#define FN_SET_ULMARGIN (FN_FORMAT + 30) /* oberer/unterer Rand */ +#define FN_UNINDENT_TO_TABSTOP (FN_FORMAT + 31) /* Einrueckung auf die vorgige Tabpostion */ + +#define FN_SET_HYPHEN_ZONE (FN_FORMAT + 32) /* Silbentrennung */ +#define FN_SET_KEEP_TOGETHER (FN_FORMAT + 34) /* nicht trennen */ +#define FN_SET_KEEP_WITH_NEXT (FN_FORMAT + 35) /* mit folgendem zus. */ +#define FN_SET_WIDOW (FN_FORMAT + 36) /* Widows */ +#define FN_SET_ORPHAN (FN_FORMAT + 37) /* Orphans */ + + +#define FN_REGISTER_COLLECTION (FN_FORMAT + 43) /* Referenzvorlage an der Seite */ +#define FN_REGISTER_MODE (FN_FORMAT + 44) /* Registermodus an/aus */ +#define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45) /* Zahlenformat in Tabelle */ +#define FN_FORMAT_BORDER_DLG (FN_FORMAT + 48) /* Umrandung */ +#define FN_FORMAT_PAGE_COLUMN_DLG (FN_FORMAT + 49) /* Spalten pro Seite */ +#define FN_FORMAT_BACKGROUND_DLG (FN_FORMAT + 50) /* Hintergrund */ +#define FN_FORMAT_PAGE (FN_FORMAT + 51) /* Seite */ +#define FN_FORMAT_PAGE_DLG (FN_FORMAT + 52) /* Seite */ +#define FN_FORMAT_COLUMN (FN_FORMAT + 53) /* Spalten */ +#define FN_FORMAT_DROPCAPS (FN_FORMAT + 54) /* Initialien */ +#define FN_FORMAT_FRAME (FN_FORMAT + 55) /* Rahmen */ +#define FN_FORMAT_FRAME_DLG (FN_FORMAT + 56) /* Rahmen */ +#define FN_FORMAT_GRAFIC (FN_FORMAT + 57) /* Grafik */ +#define FN_FORMAT_GRAFIC_DLG (FN_FORMAT + 58) /* Grafik */ +#define FN_FORMAT_TABLE (FN_FORMAT + 59) /* Tabelle */ +#define FN_FORMAT_TABLE_DLG (FN_FORMAT + 60) /* Tabelle */ +#define FN_FORMAT_OLE_DLG (FN_FORMAT + 61) /* OLE bearbeiten */ + +#define FN_NEW_STYLE_BY_EXAMPLE (FN_FORMAT + 62) /* Vorlage erzeugen by Example */ +#define FN_UPDATE_STYLE_BY_EXAMPLE (FN_FORMAT + 63) /* Vorlage aktualisieren */ +#define FN_STYLE_SHEET_FRAME_DLG (FN_FORMAT + 64) /* Rahmenvorlage */ +#define FN_STYLE_SHEET_DOC_DLG (FN_FORMAT + 65) /* Dokumentvorlage */ +#define FN_STYLE_SHEET_GRAFIK_DLG (FN_FORMAT + 66) /* Dokumentvorlage */ +#define FN_FORMAT_FOOTNOTE (FN_FORMAT + 67) /* Fussnoten */ +#define FN_FORMAT_FOOTNOTE_DLG (FN_FORMAT + 68) /* Fussnoten-Dialog */ + +// schon im Svx definiert +//#define FN_FORMAT_RESET (FN_FORMAT + 69) /* Format zuruecksetzen */ + +#define FN_FRAME_TO_TOP (FN_FORMAT + 70) /* Rahmen nach oben */ +#define FN_FRAME_TO_BOTTOM (FN_FORMAT + 71) /* Rahmen nach unten */ + +#define FN_FRAME_NOWRAP (FN_FORMAT + 72) /* Rahmen kein Umlauf */ +#define FN_FRAME_WRAP (FN_FORMAT + 73) /* Rahmen Umlauf */ +#define FN_FRAME_WRAPTHRU (FN_FORMAT + 74) /* Rahmen Durchlauf */ + +#define FN_FRAME_ALIGN_HORZ_LEFT (FN_FORMAT + 75) /* Rahmen horz. links */ +#define FN_FRAME_ALIGN_HORZ_RIGHT (FN_FORMAT + 76) /* Rahmen horz. rechts */ +#define FN_FRAME_ALIGN_HORZ_CENTER (FN_FORMAT + 77) /* Rahmen horz. zentriert */ +#define FN_FRAME_ALIGN_VERT_TOP (FN_FORMAT + 78) /* Rahmen vert. oben */ +#define FN_FRAME_ALIGN_VERT_BOTTOM (FN_FORMAT + 79) /* Rahmen vert. unten */ +#define FN_FRAME_ALIGN_VERT_CENTER (FN_FORMAT + 80) /* Rahmen vert. zentriert */ + +#define FN_SET_FRM_POSITION (FN_FORMAT + 82)/* Rahmenposition -- " -- */ +#define FN_SET_FRM_OPTIONS (FN_FORMAT + 86)/* Rahmenoptionen -- " -- */ + +#define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* Anwenden Seitenv. */ + + +#define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */ +#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* Konvertierung Text <-> Tabelle */ +#define FN_TABLE_INSERT_ROW (FN_FORMAT + 101) /* Tabelle: Zeile einfuegen */ +#define FN_TABLE_INSERT_COL (FN_FORMAT + 102) /* Tabelle: Spalte einfuegen */ +#define FN_TABLE_DELETE_ROW (FN_FORMAT + 103) /* Tabelle: Zeile loeschen */ +#define FN_TABLE_DELETE_COL (FN_FORMAT + 104) /* Tabelle: Spalte loeschen */ +#define FN_TABLE_SPLIT_CELLS (FN_FORMAT + 105) /* Tabelle: Zellen teilen */ +#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* Tabelle: Zellen verbinden */ +#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* Tabelle: Zeilenhoehe setzen */ +#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* Tabelle: Spaltenbreite setzen */ +#define FN_TABLE_SET_ULSPACE (FN_FORMAT + 109) /* Tabelle: oberen / unteren Abstand einstellen */ +#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem fuer Optimierung in Tabellen */ +#define FN_TABLE_SET_SHADOW (FN_FORMAT + 111) /* Tabelle: Schatten einstellen */ +#define FN_TABLE_GOTO_CELL (FN_FORMAT + 112) /* Tabelle: Zelle anspringen */ +#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* Tabelle: Zeile selektieren */ +#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* Tabelle: Spalte selektieren */ +#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* Tabelle: Tabelle selektieren */ +#define FN_TABLE_SET_READ_ONLY (FN_FORMAT + 116) /* Tabelle: Tabelle schuetzen */ +#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* Tabelle: Tabellezellen schuetzen */ +#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* Tabelle: Tabellezellen schuetzen aufheben */ +#define FN_TABLE_HEADLINE_REPEAT (FN_FORMAT + 120) /* used in SwXTextTable*/ +#define FN_TABLE_ADJUST_CELLS (FN_FORMAT + 121) /* Tabelle: Zellen anpassen */ + +#define FN_FRAME_UP (FN_FORMAT + 122) /* Rahmen um eine Ebene nach oben */ +#define FN_FRAME_DOWN (FN_FORMAT + 123) /* Rahmen um eine Ebene nach unten */ + +#define FN_TABLE_INSERT_CHART (FN_FORMAT + 124) + +#define FN_SET_FRM_LRSPACE (FN_FORMAT + 125) /* Rahmen Seitenabstand */ +#define FN_SET_FRM_ULSPACE (FN_FORMAT + 126) /* Rahmen Kopf-/Fussabstand */ +#define FN_TABLE_SET_LRSPACE (FN_FORMAT + 127) /* Tabelle: linker / rechter Abstand einstellen */ +#define FN_TABLE_OPTIMAL_HEIGHT (FN_FORMAT + 128) /* Zellenhoehe optimal*/ + +/*-------------------------------------------------------------------- + Bereich: Seitenvorlage + --------------------------------------------------------------------*/ + +#define FN_NEW_PAGE_STYLE (FN_FORMAT + 129) /* Anlegen Seitenvorlage */ +#define FN_PAGE_STYLE_SET_LR_MARGIN (FN_FORMAT + 130) /* linker / rechter Rand */ +#define FN_PAGE_STYLE_SET_UL_MARGIN (FN_FORMAT + 131) /* oberer / unterer Rand */ +#define FN_PAGE_STYLE_SET_PAGE (FN_FORMAT + 134) /* linke, rechte... */ +#define FN_PAGE_STYLE_SET_PAPER_SIZE (FN_FORMAT + 135) /* Papiergroesse */ +#define FN_PAGE_STYLE_SET_PAPER_BIN (FN_FORMAT + 136) /* Druckerschacht */ +#define FN_PAGE_STYLE_SET_NUMBER_FORMAT (FN_FORMAT + 137) /* Numerierungsart */ +#define FN_PAGE_STYLE_SET_COLS (FN_FORMAT + 138) /* Spaltenanzahl */ + + +/* OS: Diese Ids werden nur noch fuer die Hilfe benoetigt und sind fuer den + Dialog durch die Ids ohne _DLG ersetzt*/ +#define FN_TABLE_INSERT_COL_DLG (FN_FORMAT + 142) /* Tabelle: Dlg. Spalte einfuegen */ +#define FN_TABLE_INSERT_ROW_DLG (FN_FORMAT + 143) /* Tabelle: Dlg. Zeile einfuegen */ + + + +//hier geht's weiter ! +/*-------------------------------------------------------------------- + Bereich: Ribbon + --------------------------------------------------------------------*/ + +#define FN_SET_BACKGROUND_COLOR (FN_FORMAT + 150) /* Hintergrundfarbe */ + +#define FN_SET_BORDER_POS (FN_FORMAT + 152) /* Position Umrandung */ +#define FN_SET_BORDER_LINES (FN_FORMAT + 153) /* Linienart Umrandung */ +#define FN_SET_BORDER_COLOR (FN_FORMAT + 154) /* Farbe Umrandung */ + +#define FN_FORMULA_CALC (FN_FORMAT + 156) /* Formelauswahl */ +#define FN_FORMULA_CANCEL (FN_FORMAT + 157) /* Formel nicht uebernehmen */ +#define FN_FORMULA_APPLY (FN_FORMAT + 158) /* Formel uebernehmen */ + +#define FN_TABLE_UNSET_READ_ONLY (FN_FORMAT + 159) /* Zellenschutz fuer Tab. aufheben */ + +#define FN_FORMULA_POSITION (FN_FORMAT + 160) /* Positionsanzeige */ +#define FN_FORMULA_EDIT (FN_FORMAT + 161) /* Editfeld */ + + +#define FN_FRAME_WRAP_IDEAL (FN_FORMAT + 163) /* Rahmen Idealer Umlauf */ +#define FN_FRAME_WRAPTHRU_TRANSP (FN_FORMAT + 164) /* Rahmen Transparenter Durchlauf */ + +#define FN_FRAME_ALIGN_VERT_ROW_TOP (FN_FORMAT + 165) /* Rahmen vert. Zeile oben */ +#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM (FN_FORMAT + 166) /* Rahmen vert. Zeile unten */ +#define FN_FRAME_ALIGN_VERT_ROW_CENTER (FN_FORMAT + 167) /* Rahmen vert. Zeile zentriert */ + +#define FN_FRAME_ALIGN_VERT_CHAR_TOP (FN_FORMAT + 168) /* Rahmen vert. Zeichen oben */ +#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM (FN_FORMAT + 169) /* Rahmen vert. Zeichen unten */ +#define FN_FRAME_ALIGN_VERT_CHAR_CENTER (FN_FORMAT + 170) /* Rahmen vert. Zeichen zentriert */ + +#define FN_TABLE_SET_DEF_BORDER (FN_FORMAT + 171) /* vordefinierte Umrandungen setzen */ + +#define FN_FRAME_WRAP_LEFT (FN_FORMAT + 172) /* Rahmen Umlauf links */ +#define FN_FRAME_WRAP_RIGHT (FN_FORMAT + 173) /* Rahmen Umlauf links */ + +#define FN_TABLE_SET_ROW_AUTOHEIGHT (FN_FORMAT + 174) /* Tabelle: Minimale automatische Zeilenhoehe setzen */ + + +#define FN_WRAP_ANCHOR_ONLY (FN_FORMAT + 181) /* Umlauf nur fuer ersten Absatz */ + +#define FN_TABLE_BALANCE_CELLS (FN_FORMAT + 182) /* Spalten gleichmaessig verteilen */ +#define FN_TABLE_BALANCE_ROWS (FN_FORMAT + 183) /* Zeilen gleichmaessig verteilen */ + +#define FN_FRAME_WRAP_CONTOUR (FN_FORMAT + 184) /* Rahmen Kunturumlauf */ + +#define FN_TABLE_VERT_NONE (FN_FORMAT + 185) /* vertikale Ausrichtung in Tabellenzellen */ +#define FN_TABLE_VERT_CENTER (FN_FORMAT + 186) /* -"- */ +#define FN_TABLE_VERT_BOTTOM (FN_FORMAT + 187) /* -"- */ +#define FN_TABLE_SET_VERT_ALIGN (FN_FORMAT + 188) /* -"- */ +#define FN_TABLE_MODE_FIX (FN_FORMAT + 189) /* Tabellenmodus */ +#define FN_TABLE_MODE_FIX_PROP (FN_FORMAT + 190) /* -"- */ +#define FN_TABLE_MODE_VARIABLE (FN_FORMAT + 191) /* -"- */ + +#define FN_TABLE_AUTOSUM (FN_FORMAT + 195) /* Autosumme*/ +#define FN_SET_CONTROL_HANDLER (FN_FORMAT + 199) /* Macro setzen */ + +#define FN_IS_IMAGE (FN_FORMAT2 + 6) /* Numerierung : mit Grafik?*/ + +#define FN_GOTO_NEXT_REGION (FN_FORMAT2 + 9) /* Naechsten Bereich anspringen */ +#define FN_GOTO_PREV_REGION (FN_FORMAT2 + 10) /* Vorherigen " */ + +#define FN_GET_SBXCONTROL (FN_FORMAT2 + 11) /* SbxObject rausreichen */ +#define FN_ABSTRACT_NEWDOC (FN_FORMAT2 + 12) /* Abstract in neuem Doc */ +#define FN_ABSTRACT_STARIMPRESS (FN_FORMAT2 + 13) /* Abstract an StarImpress */ + + + + + + + +#define FN_NUMBER_FORMAT (FN_FORMAT2 + 120) /* Boxen/NumberFormatter eistellen */ +#define FN_NUMBER_STANDARD (FN_FORMAT2 + 121) +#define FN_NUMBER_TWODEC (FN_FORMAT2 + 123) +#define FN_NUMBER_SCIENTIFIC (FN_FORMAT2 + 124) +#define FN_NUMBER_DATE (FN_FORMAT2 + 125) +#define FN_NUMBER_TIME (FN_FORMAT2 + 126) +#define FN_NUMBER_CURRENCY (FN_FORMAT2 + 127) +#define FN_NUMBER_PERCENT (FN_FORMAT2 + 128) + + + +#define FN_FRAME_CHAIN (FN_FORMAT2 + 136) +#define FN_FRAME_UNCHAIN (FN_FORMAT2 + 137) + +#define FN_NUMBER_NEWSTART (FN_FORMAT2 + 138) +#define FN_NUMBER_NEWSTART_AT (FN_FORMAT2 + 139) + +#define FN_FRAME_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 140) +#define FN_GRAPHIC_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 141) + +#define FN_TABLE_SPLIT_TABLE (FN_FORMAT2 + 142) +#define FN_SYNC_LABELS (FN_FORMAT2 + 143) + + +#define FN_TABLE_RELATIVE_WIDTH (FN_FORMAT2 + 147) /* Tabelle: relative Breite - UNO */ +#define FN_TABLE_WIDTH (FN_FORMAT2 + 148) /* Tabelle: Breite - UNO */ +#define FN_TABLE_IS_RELATIVE_WIDTH (FN_FORMAT2 + 149) /* Tabelle: ist Breite relativ?- UNO */ + +#define FN_INC_INDENT_OFFSET (FN_FORMAT2 + 150) +#define FN_DEC_INDENT_OFFSET (FN_FORMAT2 + 151) + +#define FN_TABLE_MERGE_TABLE (FN_FORMAT2 + 152) + +/*-------------------------------------------------------------------- + Bereich: Extras + --------------------------------------------------------------------*/ + +#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* Zeilennumerierung */ +#define FN_THESAURUS_DLG (FN_EXTRA + 3 ) /* Thesaurus */ +#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* Silbentrennung */ +#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* Woerter lernen */ +#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* Woerterbuecher */ +#define FN_NUMBERING (FN_EXTRA + 9 ) /* Nummerierung/Bullets */ +#define FN_NUMBERING_DLG (FN_EXTRA + 10) /* Nummerierung/Bullets */ +#define FN_NUMBERING_OUTLINE (FN_EXTRA + 11) /* Gliederungsnumerierung */ +#define FN_NUMBERING_OUTLINE_DLG (FN_EXTRA + 12) /* Gliederungsnumerierung */ +#define FN_SORTING_DLG (FN_EXTRA + 14) /* Sortieren */ +#define FN_CALCULATE (FN_EXTRA + 15) /* Berechnen */ +#define FN_GENERATE_TOC_DLG (FN_EXTRA + 16) /* Inhaltsverzeichnis */ +#define FN_GENERATE_INDEX_DLG (FN_EXTRA + 17) /* Stichwortverzeichnis */ +#define FN_GENERATE_DIR_DLG (FN_EXTRA + 18) /* Verzeichnis */ +#define FN_GLOSSARY_DLG (FN_EXTRA + 20) /* Textbausteine */ +#define FN_MACRO_CHOOSER (FN_EXTRA + 21) /* Makro aufnehmen */ +#define FN_SPELLING_DLG (FN_EXTRA + 22) /* Rechtschreibung */ + +#define FN_PLAY_MACRO (FN_EXTRA + 23) /* Makro abspielen */ +#define FN_LAUNCH_BASIC (FN_EXTRA + 25) /* Makro abspielen */ +#define FN_EXPAND_GLOSSARY (FN_EXTRA + 28) /* Textbausteine expandieren */ +#define FN_CONFIG_TOOLBOX (FN_EXTRA + 29) /* Konfiguration Toolbox */ +#define FN_CONFIG_MENU (FN_EXTRA + 30) /* Konfiguration Menu */ +#define FN_CONFIG_KEY (FN_EXTRA + 31) /* Konfiguration Tastatur */ +#define FN_CHANGE_PAGENUM (FN_EXTRA + 34) /* Seitennummer aendern */ + +#define FN_MACRO_POPUP (FN_EXTRA + 37) /* Alle Macrofunktionen */ +#define FN_BULLET (FN_EXTRA + 38) /* Bullet-Liste */ + + +// Bereich: Gloassaries + +// schon im Svx definiert + +//#define FN_GET_GLOSSARY_GROUP_COUNT (FN_EXTRA + 42) /* Anzahl der Bausteingruppen */ + +#define FN_AUTO_CORRECT (FN_EXTRA + 49 ) /* Autocorrect aus Basic */ +#define FN_AUTO_CORRECT_DLG (FN_EXTRA + 50 ) /* Dialog Autocorrect */ + +#define FN_UPDATE_TOX (FN_EXTRA + 53) /* alle Verzeichnisse aktualisieren */ +#define FN_UPDATE_CUR_TOX (FN_EXTRA + 54) /* aktuelles Verzeichnisse aktualisieren */ +#define FN_REMOVE_CUR_TOX (FN_EXTRA + 55) /* remove the current TOX*/ + +#define FN_NAVIGATION_PI_GOTO_PAGE (FN_EXTRA + 59 ) /* Seitenanwahl aus Navi-PI */ + + +#define FN_LETTER_WIZZARD (FN_EXTRA + 60 ) +#define FN_FAX_WIZZARD (FN_EXTRA + 61 ) +#define FN_MEMO_WIZZARD (FN_EXTRA + 62 ) +#define FN_AGENDA_WIZZARD (FN_EXTRA + 63 ) + +#define FN_SET_BASIC_METRIC (FN_EXTRA + 80) /* Defaultmetrik Basic setzen */ + +#define FN_RESERVED_9 (FN_EXTRA + 86) /* Platzhalter */ +#define FN_RESERVED_8 (FN_EXTRA + 87) /* Platzhalter */ +#define FN_RESERVED_7 (FN_EXTRA + 88) /* Platzhalter */ +#define FN_RESERVED_6 (FN_EXTRA + 89) /* Platzhalter */ +#define FN_RESERVED_5 (FN_EXTRA + 90) /* Platzhalter */ +#define FN_RESERVED_4 (FN_EXTRA + 91) /* Platzhalter */ +#define FN_RESERVED_3 (FN_EXTRA + 92) /* Platzhalter */ +#define FN_RESERVED_2 (FN_EXTRA + 93) /* Platzhalter */ +#define FN_RESERVED_1 (FN_EXTRA + 94) /* Platzhalter */ + +#define FN_COLLECTION_GROUP_CNT (FN_EXTRA + 96) +#define FN_COLLECTION_GROUP_IDX (FN_EXTRA + 97) +#define FN_COLL_TYPE (FN_EXTRA + 98) /* Typ fuer GlobalDoc-Collection*/ +#define FN_COLL_ADD (FN_EXTRA + 99) + +#define FN_COLL_TITLE (FN_EXTRA2 + 1) /* Bereichsname oder Index-Title */ +#define FN_SHADOWCURSOR (FN_EXTRA2 + 4) /* Shadow Cursor ein/ausschalten */ + + +#define FN_VIEW_IN_FRAME (FN_EXTRA2 + 8) /* die View befindet sich in einem FrameDoc*/ + +#define FN_UNO_PARA_STYLE (FN_EXTRA2 + 9) // jetzt kommen diverse UNO-Ids fuer die +#define FN_UNO_PAGE_STYLE (FN_EXTRA2 + 10) // PropertyMap + +#define FN_UNO_FRAME_STYLE (FN_EXTRA2 + 12) +#define FN_UNO_NUM_START_VALUE (FN_EXTRA2 + 13) +#define FN_UNO_NUM_LEVEL (FN_EXTRA2 + 14) +#define FN_UNO_NUM_RULES (FN_EXTRA2 + 15) +#define FN_UNO_DOCUMENT_INDEX_MARK (FN_EXTRA2 + 16) +#define FN_UNO_DOCUMENT_INDEX (FN_EXTRA2 + 17) +#define FN_UNO_TEXT_FIELD (FN_EXTRA2 + 18) +#define FN_UNO_TEXT_TABLE (FN_EXTRA2 + 19) +#define FN_UNO_CELL (FN_EXTRA2 + 20) +#define FN_UNO_TEXT_FRAME (FN_EXTRA2 + 21) +#define FN_UNO_REFERENCE_MARK (FN_EXTRA2 + 22) +#define FN_UNO_TEXT_SECTION (FN_EXTRA2 + 23) +#define FN_UNO_FOOTNOTE (FN_EXTRA2 + 24) +#define FN_UNO_ENDNOTE (FN_EXTRA2 + 25) +#define FN_UNO_RANGE_COL_LABEL (FN_EXTRA2 + 26) +#define FN_UNO_RANGE_ROW_LABEL (FN_EXTRA2 + 27) +#define FN_UNO_TABLE_COLUMS (FN_EXTRA2 + 28) +#define FN_UNO_TABLE_BORDER (FN_EXTRA2 + 29) +#define FN_UNO_TABLE_COLUMN_SEPARATORS (FN_EXTRA2 + 30) +#define FN_UNO_TABLE_COLUMN_RELATIVE_SUM (FN_EXTRA2 + 31) +#define FN_UNO_TABLE_CELL_BACKGROUND (FN_EXTRA2 + 32) +#define FN_UNO_ROW_HEIGHT (FN_EXTRA2 + 33) +#define FN_UNO_ROW_AUTO_HEIGHT (FN_EXTRA2 + 34) +#define FN_UNO_HEADER (FN_EXTRA2 + 35) +#define FN_UNO_HEADER_LEFT (FN_EXTRA2 + 36) +#define FN_UNO_HEADER_RIGHT (FN_EXTRA2 + 37) +#define FN_UNO_FOOTER (FN_EXTRA2 + 38) +#define FN_UNO_FOOTER_LEFT (FN_EXTRA2 + 39) +#define FN_UNO_FOOTER_RIGHT (FN_EXTRA2 + 40) +#define FN_UNO_HEADER_BACKGROUND (FN_EXTRA2 + 41) +#define FN_UNO_HEADER_BOX (FN_EXTRA2 + 42) +#define FN_UNO_HEADER_LR_SPACE (FN_EXTRA2 + 43) +#define FN_UNO_HEADER_SHADOW (FN_EXTRA2 + 44) +#define FN_UNO_FOOTER_BACKGROUND (FN_EXTRA2 + 45) +#define FN_UNO_FOOTER_BOX (FN_EXTRA2 + 46) +#define FN_UNO_FOOTER_LR_SPACE (FN_EXTRA2 + 47) +#define FN_UNO_FOOTER_SHADOW (FN_EXTRA2 + 48) +#define FN_UNO_HEADER_BODY_DISTANCE (FN_EXTRA2 + 49) +#define FN_UNO_HEADER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 50) +#define FN_UNO_FOOTER_BODY_DISTANCE (FN_EXTRA2 + 51) +#define FN_UNO_FOOTER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 52) +#define FN_UNO_HEADER_SHARE_CONTENT (FN_EXTRA2 + 53) +#define FN_UNO_FOOTER_SHARE_CONTENT (FN_EXTRA2 + 54) +#define FN_UNO_HEADER_HEIGHT (FN_EXTRA2 + 55) +#define FN_UNO_FOOTER_HEIGHT (FN_EXTRA2 + 56) +#define FN_UNO_HEADER_ON (FN_EXTRA2 + 57) +#define FN_UNO_FOOTER_ON (FN_EXTRA2 + 58) +#define FN_UNO_FOLLOW_STYLE (FN_EXTRA2 + 59) + +#define FN_API_CALL (FN_EXTRA2 + 60) + +#define FN_UNO_IS_PHYSICAL (FN_EXTRA2 + 61) +#define FN_UNO_IS_AUTO_UPDATE (FN_EXTRA2 + 62) +#define FN_UNO_DISPLAY_NAME (FN_EXTRA2 + 63) + +#define FN_UNO_WRAP (FN_EXTRA2 + 64) +#define FN_UNO_ANCHOR_TYPES (FN_EXTRA2 + 65) +#define FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL (FN_EXTRA2 + 66) +#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME (FN_EXTRA2 + 67) + +#define FN_UNO_CATEGORY (FN_EXTRA2 + 68) +#define FN_UNO_IS_NUMBER (FN_EXTRA2 + 69) +#define FN_UNO_TEXT_WRAP (FN_EXTRA2 + 70) +#define FN_UNO_ANCHOR_TYPE (FN_EXTRA2 + 71) +/*-------------------------------------------------------------------- + Bereich: Fenster + --------------------------------------------------------------------*/ + +#define FN_SOURCEVIEW SID_SOURCEVIEW +/*-------------------------------------------------------------------- + Bereich: Hilfe + --------------------------------------------------------------------*/ + + +#define FN_LAUNCH_HELP (FN_HELP + 1) /* Hilfe */ +#define FN_SHOW_HELP_INDEX (FN_HELP + 2) /* Hilfeindex */ +#define FN_SHOW_KEYBOARD_HELP (FN_HELP + 3) /* Hilfe */ +#define FN_SHOW_HELP_MANUAL (FN_HELP + 4) /* Hilfe */ +#define FN_SHOW_UPDATE_HELP (FN_HELP + 5) /* Hilfe */ + +#define FN_BALLOON_HELP (FN_HELP + 7) /* Toggle Balloon Help */ +#define FN_HELP_POPUP (FN_HELP + 8) /* Popup Help */ + + +/*-------------------------------------------------------------------- + Bereich: Traveling & Selektion + --------------------------------------------------------------------*/ + +#define FN_CHAR_LEFT (FN_SELECTION + 1 ) /* */ +#define FN_CHAR_RIGHT (FN_SELECTION + 2 ) /* */ +#define FN_LINE_UP (FN_SELECTION + 3 ) /* */ +#define FN_LINE_DOWN (FN_SELECTION + 4 ) /* */ +#define FN_START_OF_LINE (FN_SELECTION + 5 ) /* StartOfLine */ +#define FN_END_OF_LINE (FN_SELECTION + 6 ) /* EndOfLine */ +#define FN_START_OF_DOCUMENT (FN_SELECTION + 7 ) /* StartOfDocument */ +//schon in svxids.hrc +//#define FN_END_OF_DOCUMENT (FN_SELECTION + 8 ) /* EndOfDocument */ +#define FN_START_OF_NEXT_PAGE (FN_SELECTION + 9 ) /* StartOfNextPage ??? */ +#define FN_END_OF_NEXT_PAGE (FN_SELECTION + 10) /* ??? */ +#define FN_START_OF_PREV_PAGE (FN_SELECTION + 11) /* StartOfPrevPage ??? */ +#define FN_END_OF_PREV_PAGE (FN_SELECTION + 12) /* ??? */ +#define FN_START_OF_PAGE (FN_SELECTION + 13) /* StartOfPage */ +#define FN_END_OF_PAGE (FN_SELECTION + 14) /* EndOfPage */ +#define FN_START_OF_WINDOW (FN_SELECTION + 15) /* StartOfWindow */ +#define FN_END_OF_WINDOW (FN_SELECTION + 16) /* EndOfWindow */ +#define FN_START_OF_COLUMN (FN_SELECTION + 17) /* StartOfColumn */ +#define FN_END_OF_COLUMN (FN_SELECTION + 18) /* EndOfColumn */ +#define FN_START_OF_PARA (FN_SELECTION + 19) /* StartOfPara */ +#define FN_END_OF_PARA (FN_SELECTION + 20) /* EndOfPara */ +#define FN_NEXT_WORD (FN_SELECTION + 21) /* NextWord */ +#define FN_PREV_WORD (FN_SELECTION + 22) /* PrevWord */ +#define FN_NEXT_SENT (FN_SELECTION + 23) /* NextSentence */ +#define FN_PREV_SENT (FN_SELECTION + 24) /* PrevSentence */ +#define FN_DELETE (FN_SELECTION + 25) /* Delete */ +#define FN_BACKSPACE (FN_SELECTION + 26) /* Backspace */ +#define FN_DELETE_SENT (FN_SELECTION + 27) /* DeleteToEndOfSentence */ +#define FN_DELETE_BACK_SENT (FN_SELECTION + 28) /* DeleteToStartOfSentence */ +#define FN_DELETE_WORD (FN_SELECTION + 29) /* DeleteToEndOfWord */ +#define FN_DELETE_BACK_WORD (FN_SELECTION + 30) /* DeleteToStartOfWord */ +#define FN_DELETE_LINE (FN_SELECTION + 31) /* DeleteToEndOfLine */ +#define FN_DELETE_BACK_LINE (FN_SELECTION + 32) /* DeleteToStartOfLine */ +#define FN_DELETE_PARA (FN_SELECTION + 33) /* DeleteToEndOfPara */ +#define FN_DELETE_BACK_PARA (FN_SELECTION + 34) /* DeleteToStartOfPara */ +#define FN_DELETE_WHOLE_LINE (FN_SELECTION + 35) /* DeleteLine ??? */ +#define FN_SET_INS_MODE (FN_SELECTION + 36) /* Einfuegemodus / Overwrite */ +#define FN_PAGEUP (FN_SELECTION + 37) /* PageUpWithCursor */ +#define FN_PAGEDOWN (FN_SELECTION + 38) /* PageDownWithCursor */ +#define FN_SET_ADD_MODE (FN_SELECTION + 39) /* Selektionsmodus */ +#define FN_SET_EXT_MODE (FN_SELECTION + 40) /* Selektionsmodus */ +#define FN_ESCAPE (FN_SELECTION + 41) /* Normal */ +#define FN_SHIFT_BACKSPACE (FN_SELECTION + 42) /* wie Backspace */ +#define FN_SELECT_WORD (FN_SELECTION + 43) /* Wort selektieren */ + +#define FN_GOTO_NEXT_OBJ (FN_SELECTION + 44) /* Nchstes Objekt anspringen */ +#define FN_GOTO_PREV_OBJ (FN_SELECTION + 45) /* Vorhergehendes Objekt anspringen */ + +#define FN_START_TABLE (FN_SELECTION + 47) /* an den Anfang der Tabelle */ +#define FN_END_TABLE (FN_SELECTION + 48) /* an das Ende der Tabelle */ +#define FN_NEXT_TABLE (FN_SELECTION + 49) /* zur vorhergehenden Tabelle */ +#define FN_PREV_TABLE (FN_SELECTION + 50) /* zur naechsten Tabelle */ + +#define FN_START_OF_NEXT_COLUMN (FN_SELECTION + 51) /* zum Anfang der naechsten Spalte */ +#define FN_END_OF_NEXT_COLUMN (FN_SELECTION + 52) /* zum Ende der naechsten Spalte */ +#define FN_START_OF_PREV_COLUMN (FN_SELECTION + 53) /* zum Anfang der vorhergehenden Spalte */ +#define FN_END_OF_PREV_COLUMN (FN_SELECTION + 54) /* zum Ende der vorhergehenden Spalte */ + +#define FN_FOOTNOTE_TO_ANCHOR (FN_SELECTION + 55) /* aus der Fussnote zum Anchor */ +#define FN_NEXT_FOOTNOTE (FN_SELECTION + 56) /* zur naechsten Fussnote */ +#define FN_PREV_FOOTNOTE (FN_SELECTION + 57) /* zur vorhergehenden Fussnote */ + +#define FN_CNTNT_TO_NEXT_FRAME (FN_SELECTION + 58) /* aus dem Inhalt zum naechsten Rahmen */ +#define FN_FRAME_TO_ANCHOR (FN_SELECTION + 59) /* vom Rahmen zum Anker */ + +#define FN_TO_HEADER (FN_SELECTION + 60) /* Toggle zwischen Content und Kopfzeile */ +#define FN_TO_FOOTER (FN_SELECTION + 61) /* Toggle zwischen Content und Fusszeile */ + +#define FN_IDX_MARK_TO_IDX (FN_SELECTION + 62) /* von der Verzeichnismarkierung zum Verzeichnis */ + + + + + +#define FN_PREV_PARA (FN_SELECTION + 74) +#define FN_NEXT_PARA (FN_SELECTION + 75) + +#define FN_GOTO_NEXT_MARK (FN_SELECTION + 76) /* Nchsten Platzhalter anspringen */ +#define FN_GOTO_PREV_MARK (FN_SELECTION + 77) /* Vorhergehenden Platzhalter anspringen */ + +// schon im SVX unter der gleichen Id +//#define FN_START_DOC_DIRECT (FN_SELECTION + 78) /* Direkt zum Dokanfang springen */ +//#define FN_END_DOC_DIRECT (FN_SELECTION + 79) /* Direkt zum Dokanfang springen */ + +#define FN_NEXT_TOXMARK (FN_SELECTION + 83) /* zur naechsten Verz. Markierung */ +#define FN_PREV_TOXMARK (FN_SELECTION + 84) /* zur vorherigen Verz. Markierung */ +#define FN_NEXT_TBLFML (FN_SELECTION + 85) /* zur naechsten Tabellenformel */ +#define FN_PREV_TBLFML (FN_SELECTION + 86) /* zur vorherigen Tabellenformel */ +#define FN_NEXT_TBLFML_ERR (FN_SELECTION + 87) /* zur naechsten fehl. Tabellenformel */ +#define FN_PREV_TBLFML_ERR (FN_SELECTION + 88) /* zur vorherigen fehl. Tabellenformel */ + + +/*-------------------------------------------------------------------- + QUERY-Block + --------------------------------------------------------------------*/ + + + +#define FN_IS_MODIFIED (FN_QUERY +16) /* Dokument geaendert? */ +#define FN_RESET_MODIFIED (FN_QUERY +17) /* Geaendert-Flag zuruecksetzen */ + +#define FN_GET_DOC_INFO (FN_QUERY +22) /* Wert Dokumentinfo erfragen */ +#define FN_GET_ERRNO (FN_QUERY +26) /* Error-Nummer abfragen */ +#define FN_GET_DOCMAN_PATH (FN_QUERY +27) /* Pfad zu einer Gruppe im Docmgr erfragen */ + +#define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribut */ +#define FN_EXECUTE_DRAG (FN_QUERY +30) /* D&D starten */ + +#define FN_GET_PRINT_AREA (FN_QUERY +32) /* Attribut fuer druckbaren Seitenbereich besorgen */ + + + +// #define FN_IS_START_OF_PAGE (FN_QUERY +40) /**/ +// #define FN_IS_END_OF_PAGE (FN_QUERY +41) /**/ + +#define FN_GET_PARAGRAPH (FN_QUERY +48) /* Paragraph-Object von der Textshell + an die View weiterreichen*/ +// hier ist Schluss!!! + + +/*-------------------------------------------------------------------- + Bereich: Envelope + --------------------------------------------------------------------*/ + +#define FN_ENVELOP (FN_ENVELP ) +#define FN_LABEL (FN_ENVELP + 1) +#define FN_BUSINESS_CARD (FN_ENVELP + 2) + +/*-------------------------------------------------------------------- + Bereich: Parameter + --------------------------------------------------------------------*/ + +#define FN_PARAM_TABLE_COLS (FN_PARAM) +#define FN_PARAM_TABLE_ROWS (FN_PARAM+1) + +#define FN_PARAM_SEARCH_WORDONLY (FN_PARAM+5) +#define FN_PARAM_SEARCH_EXACT (FN_PARAM+6) +#define FN_PARAM_SEARCH_REGEXP (FN_PARAM+7) +#define FN_PARAM_SEARCH_BACKWARDS (FN_PARAM+8) +#define FN_PARAM_SEARCH_FINDALL (FN_PARAM+9) +#define FN_PARAM_SEARCH_SELECTION (FN_PARAM+10) +#define FN_PARAM_SEARCH_TEXT (FN_PARAM+11) +#define FN_PARAM_SEARCH_TEXTREPLACE (FN_PARAM+12) + +#define FN_PARAM_PARADLGLIMITS (FN_PARAM+15) +#define FN_PARAM_FRMMODE (FN_PARAM+16) + +#define FN_PARAM_ADDPRINTER (FN_PARAM+18) +#define FN_PARAM_GRID (FN_PARAM+19) +#define FN_PARAM_DOCDISP (FN_PARAM+20) +#define FN_PARAM_ELEM (FN_PARAM+21) +#define FN_PARAM_SWTEST (FN_PARAM+22) + +#define FN_PARAM_FTN_INFO (FN_PARAM+23) + +#define FN_PARAM_REGION_NAME (FN_PARAM+24) +#define FN_PARAM_REGION_CONDITION (FN_PARAM+25) +#define FN_PARAM_REGION_HIDDEN (FN_PARAM+26) +#define FN_PARAM_REGION_PROTECT (FN_PARAM+27) + +#define FN_PARAM_INSERT_AFTER (FN_PARAM+29) +#define FN_PARAM_FILTER (FN_PARAM+30) +#define FN_PARAM_INDEX_NAME (FN_PARAM+31) +#define FN_PARAM_INDEX_OPTIONS (FN_PARAM+32) +#define FN_PARAM_INDEX_FORMAT (FN_PARAM+33) +#define FN_PARAM_INDEX_LEVEL (FN_PARAM+34) +#define FN_PARAM_INDEX_TEMPLATE (FN_PARAM+35) +#define FN_PARAM_INDEX_ALTSTR (FN_PARAM+36) +#define FN_PARAM_INDEX_PRIMKEY (FN_PARAM+37) +#define FN_PARAM_INDEX_SECKEY (FN_PARAM+38) +#define FN_PARAM_WIDTH (FN_PARAM+39) +#define FN_PARAM_LOCATION (FN_PARAM+40) +#define FN_PARAM_DIR (FN_PARAM+41) +#define FN_PARAM_COUNT (FN_PARAM+42) +#define FN_PARAM_COLOR (FN_PARAM+43) + +#define FN_PARAM_TABLE_NAME (FN_PARAM+44) +#define FN_PARAM_TABLE_WIDTH (FN_PARAM+45) +#define FN_PARAM_TABLE_ULSPACE (FN_PARAM+46) +#define FN_PARAM_TABLE_LRSPACE (FN_PARAM+47) +#define FN_PARAM_TABLE_SHADOW (FN_PARAM+48) +#define FN_PARAM_TABLE_ALIGN (FN_PARAM+49) +#define FN_PARAM_TABLE_HEADLINE (FN_PARAM+50) +#define FN_PARAM_TABLE_SPACE (FN_PARAM+51) +#define FN_PARAM_TABLE_COLUMNS (FN_PARAM+52) + +#define FN_PARAM_GRF_CONNECT (FN_PARAM+54) + + +#define FN_PARAM_EVENT (FN_PARAM+68) +#define FN_PARAM_URL (FN_PARAM+69) +#define FN_PARAM_GRF_REALSIZE (FN_PARAM+70) +#define FN_PARAM_GRF_DIALOG (FN_PARAM+71) +#define FN_PARAM_GRF_CLIENTMAP (FN_PARAM+74) /* ClientMap */ +#define FN_PARAM_GRF_SERVERMAP (FN_PARAM+75) /* ServerMap */ +#define FN_PARAM_GRF_TARGETFRAME (FN_PARAM+76) /* TargetFrame */ +#define FN_INET_FIELD_MACRO (FN_PARAM+77) /* Id fuer URL-Feld-Macros*/ + +#define FN_PARAM_PRINTER (FN_PARAM+78) /* Drucker* */ +#define FN_PARAM_STDFONTS (FN_PARAM+79) /* ConfigItem Standardfonts */ + +#define FN_PARAM_WRTSHELL (FN_PARAM2) /* SwWrtShell */ + +#define FN_COND_COLL (FN_PARAM2+1) /* Item fuer bed. Vorlagen */ +#define FN_PARAM_SELECTION (FN_PARAM2+2) /* selektiertes Wort fuer Format/Zeichen/Hyperlink */ + +#define FN_PARAM_ACT_NUMBER (FN_PARAM2+3) /* PointerItem die aktuelle NumRule */ +#define FN_PARAM_CHILD_LEVELS (FN_PARAM2+4) /* Werden Child-Levels benutzt ?*/ + +#define FN_PARAM_NUM_PRESET (FN_PARAM2+5) /* vorgewaehlte Numerierung*/ + +#define FN_PARAM_HEIGHT (FN_PARAM2+6) /* Param fuer Hoehe */ +#define FN_PARAM_DIST (FN_PARAM2+7) /* und Breite, wg. metrischer Umwandlung */ + +#define FN_PARAM_SHADOWCURSOR (FN_PARAM2+8) /* Fuer ShadowCursor Optionen */ + +#define FN_PARAM_ACT_NUMLEVEL (FN_PARAM2+9) /* BYTE-Item mit aktuellen NumLevel */ + +#define FN_PARAM_9 (FN_PARAM2+10) +#define FN_PARAM_10 (FN_PARAM2+11) + +#define FN_TEXT_RANGE (FN_PARAM2+12) /* TextRange Property*/ + +#define FN_PARAM_CRSR_IN_PROTECTED (FN_PARAM2+13) /* Cursor in geschuetzten Bereichen*/ +#define FN_PARAM_TOX_TYPE (FN_PARAM2+14) /* TOX type in tox dialog*/ +#define FN_PARAM_LINK_DISPLAY_NAME (FN_PARAM2+15) /* LinkDisplayName property*/ +#define FN_PARAM_NUM_LEVEL (FN_PARAM2+16) /* rtf filter*/ +/*-------------------------------------------------------------------- + Bereich: Druckoptionen + --------------------------------------------------------------------*/ + +#define FN_PRNOPT_GRAPHIC (FN_PRNOPT + 1) +#define FN_PRNOPT_TABLE (FN_PRNOPT + 2) +#define FN_PRNOPT_LEFT_PAGE (FN_PRNOPT + 3) +#define FN_PRNOPT_RIGHT_PAGE (FN_PRNOPT + 4) +#define FN_PRNOPT_REVERSE (FN_PRNOPT + 5) +#define FN_PRNOPT_PAPER_FROM_SETUP (FN_PRNOPT + 6) +#define FN_PRNOPT_POSTITS (FN_PRNOPT + 8) + +#define FN_PRNOPT_BEGIN FN_PRNOPT_GRAPHIC +#define FN_PRNOPT_END FN_PRNOPT_POSTITS + +/*-------------------------------------------------------------------- + Beschreibung: Status : nicht mehr als 19! + --------------------------------------------------------------------*/ + +#define FN_STAT_PAGE (FN_STAT + 1) +#define FN_STAT_TEMPLATE (FN_STAT + 2) +#define FN_STAT_ZOOM (FN_STAT + 3) +#define FN_STAT_INSOVER (FN_STAT + 4) +#define FN_STAT_SELMODE (FN_STAT + 5) +#define FN_STAT_HYPERLINKS (FN_STAT + 6) /* Hyperlinks ausfuehren */ +#define FN_STAT_CONTEXT (FN_STAT + 7) +#define FN_STAT_BOOKMARK (FN_STAT + 8) /* Fuer Popup Bookmarks*/ + +/*-------------------------------------------------------------------- + Bereich: Seitenvorschau + --------------------------------------------------------------------*/ + +#define FN_SHOW_TWO_PAGES (FN_PGPREVIEW + 1) +#define FN_SHOW_FOUR_PAGES (FN_PGPREVIEW + 2) +#define FN_PRINT_PAGEPREVIEW (FN_PGPREVIEW + 3) + +/*-------------------------------------------------------------------- + Bereich: Rahmenattribute + --------------------------------------------------------------------*/ + +#define FN_OPAQUE (FN_FRAME + 1) +#define FN_SET_PROTECT (FN_FRAME + 2) +#define FN_SURROUND (FN_FRAME + 3) +#define FN_VERT_ORIENT (FN_FRAME + 4) +#define FN_HORI_ORIENT (FN_FRAME + 5) +#define FN_SET_FRM_NAME (FN_FRAME + 6) +#define FN_KEEP_ASPECT_RATIO (FN_FRAME + 7) +#define FN_GRF_KEEP_ZOOM (FN_FRAME + 8) + +#define FN_IID_COL1 (FN_FRAME + 13) +#define FN_IID_COL2 (FN_FRAME + 14) +#define FN_IID_COL3 (FN_FRAME + 15) +#define FN_IID_COLLEFT (FN_FRAME + 16) +#define FN_IID_COLRIGHT (FN_FRAME + 17) + +#define FN_SET_FRM_ALT_NAME (FN_FRAME + 18) + + +//Member-Ids fuer Fill/SetVariable an Items +#define MID_STYLE 0xe0 +#define MID_PWIDTH 0xe1 +#define MID_ADJUST 0xe2 +#define MID_TDIST 0xe3 +#define MID_BDIST 0xe4 +#define MID_LINES 0xe5 +#define MID_CHARS 0xe6 +#define MID_DIST 0xe7 + +#define MID_1 0xe8 +#define MID_2 0xe9 +#define MID_3 0xea +#define MID_4 0xeb +#define MID_5 0xec +#define MID_6 0xed +#define MID_7 0xee +#define MID_8 0xef +#define MID_9 0xf0 +#define MID_A 0xf1 +#define MID_B 0xf2 +#define MID_C 0xf3 +#define MID_D 0xf4 +#define MID_E 0xf5 +#define MID_F 0xf6 +#define MID_10 0xf7 +#define MID_11 0xf8 +#define MID_12 0xf9 +#define MID_13 0xfa + +#ifndef SID_SW_DOCMAN_PATH +#define SID_SW_DOCMAN_PATH (SID_OFASLOTS_START + 6) +#endif + +// defines fuer Event-Zuweisung per Macro +#define MAC_EVENT_MOUSEOVER 0x01 // +#define MAC_EVENT_MOUSECLICK 0x02 // Hyperlink ausloesen +#define MAC_EVENT_MOUSEOUT 0x03 // +#define MAC_EVENT_OBJECT_SELECT 0x04 // Obj. selektieren +#define MAC_EVENT_KEYINPUT_ALPHA 0x05 // +#define MAC_EVENT_KEYINPUT_NOALPHA 0x06 // +#define MAC_EVENT_FRM_RESIZE 0x07 // +#define MAC_EVENT_FRM_MOVE 0x08 // +#define MAC_EVENT_IMAGE_LOAD 0x09 // +#define MAC_EVENT_IMAGE_ABORT 0x0a // +#define MAC_EVENT_IMAGE_ERROR 0x0b // + diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc new file mode 100644 index 000000000000..56ee86d328fa --- /dev/null +++ b/sw/inc/comcore.hrc @@ -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 + + + diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx new file mode 100644 index 000000000000..523d8de73309 --- /dev/null +++ b/sw/inc/crsrsh.hxx @@ -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 diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx new file mode 100644 index 000000000000..e712b0c12278 --- /dev/null +++ b/sw/inc/crstate.hxx @@ -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 + + diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx new file mode 100644 index 000000000000..269673eaa656 --- /dev/null +++ b/sw/inc/cshtyp.hxx @@ -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 diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx new file mode 100644 index 000000000000..c6fca4ada324 --- /dev/null +++ b/sw/inc/dbfld.hxx @@ -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 diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx new file mode 100644 index 000000000000..07ddffd79730 --- /dev/null +++ b/sw/inc/dbmgr.hxx @@ -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 fr Serienbrief selektierten Eintrge + 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 + diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx new file mode 100644 index 000000000000..b91a07efb6a0 --- /dev/null +++ b/sw/inc/dcontact.hxx @@ -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 + diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx new file mode 100644 index 000000000000..32e48f01a814 --- /dev/null +++ b/sw/inc/ddefld.hxx @@ -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 diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx new file mode 100644 index 000000000000..02f337b058f0 --- /dev/null +++ b/sw/inc/dlelstnr.hxx @@ -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 + diff --git a/sw/inc/dobjfac.hxx b/sw/inc/dobjfac.hxx new file mode 100644 index 000000000000..a7af1c30c38e --- /dev/null +++ b/sw/inc/dobjfac.hxx @@ -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 + diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx new file mode 100644 index 000000000000..d26acabd17dc --- /dev/null +++ b/sw/inc/doc.hxx @@ -0,0 +1,1770 @@ +/************************************************************************* + * + * $RCSfile: doc.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 _DOC_HXX +#define _DOC_HXX + +#define _SVSTDARR_STRINGSDTOR +#include <svtools/svstdarr.hxx> + +#ifndef _TIMER_HXX //autogen +#include <vcl/timer.hxx> +#endif +#ifndef _SWTYPES_HXX +#include <swtypes.hxx> +#endif +#ifndef _NDARR_HXX +#include <ndarr.hxx> +#endif +#ifndef _SWATRSET_HXX +#include <swatrset.hxx> +#endif +#ifndef _TOXE_HXX +#include <toxe.hxx> // enums +#endif +#ifndef _REDLENUM_HXX +#include <redlenum.hxx> // enums +#endif +#ifndef _BKMRKE_HXX +#include <bkmrke.hxx> +#endif +#ifndef _FLYENUM_HXX +#include <flyenum.hxx> +#endif +#ifndef _ITABENUM_HXX +#include <itabenum.hxx> +#endif + +#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_ +#include <com/sun/star/linguistic/XSpellChecker1.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATEDWORD_HPP_ +#include <com/sun/star/linguistic/XHyphenatedWord.hpp> +#endif + +class SwExtTextInput; +class DateTime; +class EditFieldInfo; +class JobSetup; +class Color; +class KeyCode; +class Outliner; +class OutputDevice; +class Point; +class SbxArray; +class SdrModel; +class SdrObject; +class SdrUndoAction; +class SfxDocumentInfo; +class SfxPrinter; +class SvData; +class SvEmbeddedObjectRef; +class SvNumberFormatter; +class SvPersist; +class SvPseudoObject; +class SvStorage; +class SvStrings; +class SvStringsSort; +class SvUShorts; +class SvUShortsSort; +class SvxAutoCorrDoc; +class SvxLinkManager; +class SvxMacro; +class SvxMacroTableDtor; +class SvxBorderLine; +class SwAutoCompleteWord; +class SwAutoCorrExceptWord; +class SwBookmark; +class SwBookmarks; +class SwCalc; +class SwCellFrm; +class SwCharFmt; +class SwCharFmts; +class SwClient; +class SwConditionTxtFmtColl; +class SwCrsrShell; +class SwCursor; +class SwDBNameInfField; +class SwDocShell; +class SwDocUpdtFld; +class SwDrawFrmFmt; +class SwDrawView; +class SwEditShell; +class SwFieldType; +class SwFldTypes; +class SwFlyFrm; +class SwFlyFrmFmt; +class SwFmt; +class SwFmtCol; +class SwFmtINetFmt; +class SwFmtRefMark; +class SwFrmFmt; +class SwFrmFmts; +class SwFtnIdxs; +class SwFtnInfo; +class SwEndNoteInfo; +class SwGrfFmtColl; +class SwGrfFmtColls; +class SwLineNumberInfo; +class SwNewDBMgr; +class SwNoTxtNode; +class SwNodeIndex; +class SwNodeRange; +class SwNumRule; +class SwNumRuleTbl; +class SwPageDesc; +class SwPosFlyFrms; +class SwPagePreViewPrtData; +class SwRedline; +class SwRedlineTbl; +class SwRootFrm; +class SwSectionFmt; +class SwSectionFmts; +class SwSelBoxes; +class SwSpzFrmFmts; +class SwTOXBase; +class SwTOXBaseSection; +class SwTOXMark; +class SwTOXMarks; +class SwTOXType; +class SwTOXTypes; +class SwTabCols; +class SwTable; +class SwTableAutoFmt; +class SwTableBox; +class SwTableBoxFmt; +class SwTableFmt; +class SwTableLineFmt; +class SwTableNode; +class SwTextBlocks; +class SwTxtFld; +class SwTxtFmtColl; +class SwTxtFmtColls; +class SwURLStateChanged; +class SwUndo; +class SwUndoIds; +class SwUndoIter; +class SwUndos; +class SwUnoCrsr; +class SwUnoCrsrTbl; +class ViewShell; +class _SetGetExpFld; +class SwDrawContact; +class SwLayouter; +class SdrView; +class SdrMarkList; +class SwAuthEntry; +class SwUnoCallBack; +struct SwCallMouseEvent; +struct SwDocStat; +struct SwHash; +struct SwSortOptions; +struct SwDefTOXBase_Impl; + +//PageDescriptor-Schnittstelle, Array hier wegen inlines. +typedef SwPageDesc* SwPageDescPtr; +SV_DECL_PTRARR_DEL( SwPageDescs, SwPageDescPtr, 4, 4 ); + +enum SwMoveFlags +{ + DOC_MOVEDEFAULT = 0x00, + DOC_MOVEALLFLYS = 0x01, + DOC_CREATEUNDOOBJ = 0x02, + DOC_MOVEREDLINES = 0x04 +}; + +#define DUMMY_PARASPACEMAX 0x04 +#define DUMMY_PARASPACEMAX_AT_PAGES 0x20 + + +#define SW_HYPH_ERROR 0 +#define SW_HYPH_OK 1 +#define SW_HYPH_ABORTED 2 +#define SW_HYPH_CONTINUE 3 + +class SwDoc +{ + friend class SwReader; // fuers Undo von Insert(SwDoc) + friend class SwSwgReader; // Zugriff auf bDtor-Flag (wg. Loeschen v.Frames) + friend class Sw3IoImp; // Zugriff u.a. auf den Drawing Layer + friend class SwCompareData; // fuers Undo vom CompareDoc + + friend void _InitCore(); + friend void _FinitCore(); + + //Fuer das Loeschen der Header-/Footer-Formate + //Implementierung und Benutzung in frmatr.cxx + friend void DelHFFormat( SwClient *, SwFrmFmt * ); + +#if !( defined(PRODUCT) || defined(MAC) || defined(PM2) ) + friend class SwUndoWriter; // fuers Schreiben der Undo/Redo-History +#endif + + //---------------- private Member -------------------------------- + + // ------------------------------------------------------------------- + // die Objecte + SwNodes aNodes; // Inhalt des Dokumentes + SwNodes aUndoNodes; // Inhalt fuer das Undo + SwAttrPool aAttrPool; // der Attribut Pool + SwPageDescs aPageDescs; // PageDescriptoren + Link aOle2Link; // OLE 2.0-Benachrichtigung + AutoTimer aIdleTimer; // der eigene IdleTimer + Timer aChartTimer; // der Timer fuers Update aller Charts + Timer aOLEModifiedTimer; // Timer for update modified OLE-Objecs + String aDBName; // logischer Datenbankname + String sSectionPasswd; // Passwort fuer geschuetzte Bereiche + String sTOIAutoMarkURL; // ::com::sun::star::util::URL of table of index AutoMark file + SvStringsDtor aPatternNms; // Array fuer die Namen der Dokument-Vorlagen + + + // ------------------------------------------------------------------- + // die Pointer + //Defaultformate + SwFrmFmt *pDfltFrmFmt; + SwFrmFmt *pEmptyPageFmt; // Format fuer die Default-Leerseite. + SwFrmFmt *pColumnContFmt; // Format fuer Spaltencontainer + SwCharFmt *pDfltCharFmt; + SwTxtFmtColl *pDfltTxtFmtColl; // Defaultformatcollections + SwGrfFmtColl *pDfltGrfFmtColl; + + SwFrmFmts *pFrmFmtTbl; // Formattabellen + SwCharFmts *pCharFmtTbl; + SwSpzFrmFmts *pSpzFrmFmtTbl; + SwSectionFmts *pSectionFmtTbl; + SwFrmFmts *pTblFrmFmtTbl; // spz. fuer Tabellen + SwTxtFmtColls *pTxtFmtCollTbl; // FormatCollections + SwGrfFmtColls *pGrfFmtCollTbl; + + SwBookmarks *pBookmarkTbl; //Bookmarks + + SwTOXTypes *pTOXTypes; // Verzeichnisse + SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's + + SwRootFrm *pLayout; // Rootframe des spezifischen Layouts. + SdrModel *pDrawModel; // StarView Drawing + + SwUndos *pUndos; // Undo/Redo History + + SwDocUpdtFld *pUpdtFlds; // Struktur zum Field-Update + SwFldTypes *pFldTypes; // Feldtypen + SwNewDBMgr *pNewDBMgr; // Pointer auf den neuen DBMgr fuer + // Evaluierung der DB-Fields + SfxPrinter *pPrt; + + SwDoc *pGlossaryDoc; // Pointer auf das Glossary-Dokument. Dieses + + SwNumRule *pOutlineRule; + SwFtnInfo *pFtnInfo; + SwEndNoteInfo *pEndNoteInfo; + SwLineNumberInfo *pLineNumberInfo; + SwFtnIdxs *pFtnIdxs; + SwDocStat *pDocStat; // Statistic Informationen + SfxDocumentInfo *pSwgInfo; // Dokumentinformationen + SvxMacroTableDtor *pMacroTable; // Tabelle der dokumentglobalen Macros + + SwDocShell *pDocShell; // Ptr auf die SfxDocShell vom Doc + SvEmbeddedObjectRef* pDocShRef; // fuers Kopieren von OLE-Nodes (wenn keine + // DocShell gesetzt ist, muss dieser + // Ref-Pointer gesetzt sein!!!!) + SvxLinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE) + + SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von + // autokorrigierten Woertern, die "zurueck" + // verbessert werden + SwURLStateChanged *pURLStateChgd; // SfxClient fuer Aenderungen in der + // INetHistory + SvNumberFormatter *pNumberFormatter; // NumFormatter fuer die Tabellen/Felder + SwNumRuleTbl *pNumRuleTbl; // Liste aller benannten NumRules + SwRedlineTbl *pRedlineTbl; // Liste aller Redlines + String *pAutoFmtRedlnComment; // Kommentar fuer Redlines, die + // uebers Autoformat eingefuegt werden + SwUnoCrsrTbl *pUnoCrsrTbl; + + SwPagePreViewPrtData *pPgPViewPrtData; // Einzuege/Abstaende fuers + // Drucken der Seitenansicht + SwPaM *pExtInputRing; + + SwLayouter *pLayouter; // ::com::sun::star::frame::Controller for complex layout formatting + // like footnote/endnote in sections + + SwUnoCallBack *pUnoCallBack; + // ------------------------------------------------------------------- + // sonstige + sal_uInt16 nUndoPos; // akt. Undo-InsertPosition (fuers Redo!) + sal_uInt16 nUndoSavePos; // Position im Undo-Array, ab der das Doc + // nicht als modifiziert gilt + sal_uInt16 nUndoCnt; // Anzahl von Undo Aktionen + sal_uInt16 nUndoSttEnd; // != 0 -> innerhalb einer Klammerung + + sal_uInt16 nAutoFmtRedlnCommentNo; // SeqNo fuers UI-seitige zusammenfassen + // von AutoFmt-Redlines. Wird vom SwAutoFmt + // verwaltet! + sal_uInt16 nLinkUpdMode; // UpdateMode fuer Links + sal_uInt16 nFldUpdMode; // Mode fuer Felder/Charts automatisch aktualisieren + + SwRedlineMode eRedlineMode; // aktueller Redline Modus + + sal_Int8 nLinkCt; // wieviele kennen das Dokument + sal_Int8 nLockExpFld; // Wenn != 0 hat UpdateExpFlds() keine Wirkung + + sal_Int8 nHeaven; // LayerIds, Heaven == ueber dem Dokument + sal_Int8 nHell; // Hell == unter dem Dokument + sal_Int8 nControls; // Controls == ganz oben + + sal_Bool bGlossDoc : 1; //TRUE: ist ein Textbaustein Dokument + sal_Bool bModified : 1; //TRUE: Dokument ist veraendert + sal_Bool bDtor : 1; //TRUE: ist im SwDoc DTOR + // leider auch temporaer von + // SwSwgReader::InLayout(), wenn fehlerhafte + //Frames geloescht werden muessen + sal_Bool bUndo : 1; // TRUE: Undo eingeschaltet + sal_Bool bGroupUndo : 1; // TRUE: Undos werden gruppiert + sal_Bool bPageNums : 1; // TRUE: es gibt virtuelle Seitennummern + sal_Bool bLoaded : 1; // TRUE: ein geladenes Doc + sal_Bool bUpdateExpFld : 1; // TRUE: Expression-Felder updaten + sal_Bool bNewDoc : 1; // TRUE: neues Doc + sal_Bool bNewFldLst : 1; // TRUE: Felder-Liste neu aufbauen + sal_Bool bCopyIsMove : 1; // TRUE: Copy ist ein verstecktes Move + sal_Bool bNoDrawUndoObj : 1; // TRUE: keine DrawUndoObjecte speichern + sal_Bool bVisibleLinks : 1; // TRUE: Links werden sichtbar eingefuegt + sal_Bool bBrowseMode : 1; // TRUE: Dokument im BrowseModus anzeigen + sal_Bool bInReading : 1; // TRUE: Dokument wird gerade gelesen + sal_Bool bUpdateTOX : 1; // TRUE: nach Dokument laden die TOX Updaten + sal_Bool bInLoadAsynchron: 1; // TRUE: Dokument wird gerade asynchron geladen + sal_Bool bHTMLMode : 1; // TRUE: Dokument ist im HTMLMode + sal_Bool bHeadInBrowse : 1; // TRUE: Header sind im BrowseMode aktiviert + sal_Bool bFootInBrowse : 1; // TRUE: Footer sind im BrowseMode aktiviert + sal_Bool bFrmBeepEnabled : 1; // TRUE: Frames beepen wenn der Inhalt zu gross wird + sal_Bool bInCallModified : 1; // TRUE: im Set/Reset-Modified Link + sal_Bool bIsGlobalDoc : 1; // TRUE: es ist ein GlobalDokument + sal_Bool bGlblDocSaveLinks : 1; // TRUE: im GlobalDoc. gelinkte Sect. mit speichern + sal_Bool bIsLabelDoc : 1; // TRUE: es ist ein Etiketten-Dokument + sal_Bool bIsAutoFmtRedline : 1; // TRUE: die Redlines werden vom Autoformat aufgezeichnet + sal_Bool bOLEPrtNotifyPending:1; // TRUE: Printer ist geaendert und beim + // Erzeugen der ::com::sun::star::sdbcx::View ist eine Benachrichtigung + // der OLE-Objekte PrtOLENotify() notwendig. + sal_Bool bAllOLENotify :1; // True: Benachrichtigung aller Objekte ist notwendig + sal_Bool bIsRedlineMove : 1; // True: die Redlines werden in/aus der Section verschoben + sal_Bool bInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc + sal_Bool bContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage + sal_Bool bPurgeOLE : 1; // TRUE: Purge OLE-Objects + + // ------------------------------------------------------------------- + // static - Members + static SvStringsDtor *pTextNmArray, // Array fuer alle + *pListsNmArray, // Pool-Vorlagen-Namen + *pExtraNmArray, + *pRegisterNmArray, + *pDocNmArray, + *pHTMLNmArray; + static SvStringsDtor *pFrmFmtNmArray, + *pChrFmtNmArray, + *pHTMLChrFmtNmArray; + static SvStringsDtor *pPageDescNmArray; + static SvStringsDtor *pNumRuleNmArray; + + static SwAutoCompleteWord *pACmpltWords; // Liste aller Worte fuers AutoComplete + static sal_uInt16 nUndoActions; // anzahl von Undo ::com::sun::star::chaos::Action + + // ------------------------------------------------------------------- + // Dummies Members fuers FileFormat + String sDummy1; // Dummy-Member. + String sDummy2; + sal_uInt32 n32Dummy1; + sal_uInt32 n32Dummy2; + sal_Int8 n8Dummy1; + sal_Int8 n8Dummy2; + + + //---------------- private Methoden ------------------------------ + + void AppendUndo(SwUndo*); // interne Verkuerzung fuer Insert am Ende + void ClearRedo(); // loescht alle UndoObjecte von nUndoPos + // bis zum Ende des Undo-Arrays + sal_Bool DelUndoObj( sal_uInt16 nEnde ); // loescht alle UndoObjecte vom Anfang + // bis zum angegebenen Ende + DECL_LINK( AddDrawUndo, SdrUndoAction * ); + // DrawModel + void DrawNotifyUndoHdl(); // wegen CLOOKs + void DrawSetRefDevice(); // wegen CLOOKs + + // nur fuer den internen Gebrauch deshalb privat. + // Kopieren eines Bereiches im oder in ein anderes Dokument ! + // Die Position darf nicht im Bereich liegen !! + sal_Bool _Copy( SwPaM&, SwPosition&, + sal_Bool MakeNewFrms = sal_True, SwPaM* pCpyRng = 0 ) const; // in ndcopy.cxx + + SwFlyFrmFmt* _MakeFlySection( const SwPosition& rAnchPos, + const SwCntntNode& rNode, RndStdIds eRequestId, + const SfxItemSet* pFlyAttrSet, + SwFrmFmt* = 0 ); + + SwFlyFrmFmt* _InsNoTxtNode( const SwPosition&rPos, SwNoTxtNode*, + const SfxItemSet* pFlyAttrSet, + const SfxItemSet* pGrfAttrSet, + SwFrmFmt* = 0 ); + + void _CopyFlyInFly( const SwNodeRange& rRg, const SwNodeIndex& rSttIdx, + sal_Bool bCopyFlyAtFly = sal_False ) const; // steht im ndcopy.cxx + sal_Bool SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms ); + + typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt* ); + SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr, + FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt ); + void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr, + FNCopyFmt fnCopyFmt, SwFmt& rDfltFmt ); + void _CopyPageDescHeaderFooter( sal_Bool bCpyHeader, + const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt ); + SwFmt* FindFmtByName( const SvPtrarr& rFmtArr, + const String& rName ) const; + SfxPrinter* _GetPrt() const; + void PrtDataChanged(); //Printer oder JobSetup geandert, es muss + //fuer entsprechende Invalidierungen und + //Benachrichtigungen gesorgt werden. + + static SvStringsDtor* NewNmArray( SvStringsDtor*&, sal_uInt16 nStt, sal_uInt16 nEnd ); + SvStringsDtor* NewTextNmArray() const; + SvStringsDtor* NewListsNmArray() const; + SvStringsDtor* NewExtraNmArray() const; + SvStringsDtor* NewRegisterNmArray() const; + SvStringsDtor* NewDocNmArray() const; + SvStringsDtor* NewHTMLNmArray() const; + SvStringsDtor* NewFrmFmtNmArray() const; + SvStringsDtor* NewChrFmtNmArray() const; + SvStringsDtor* NewHTMLChrFmtNmArray() const; + SvStringsDtor* NewPageDescNmArray() const; + SvStringsDtor* NewNumRuleNmArray() const; + + + // gcc: aFtnInfo::CopyCtor ist private, also muessen wir uns auch schuetzen + SwDoc( const SwDoc &); + + //wird nur von SwSwgReader::InlayoutFrames() verwendet! + inline void SetInDtor( sal_Bool b ) { bDtor = b; } + + // fuer Felder: + void _InitFieldTypes(); // wird vom CTOR gerufen!! + void _MakeFldList( int eMode ); + void RenameUserFld( const String& rOldName, const String& rNewName, + String& rFormel ); + // Datenbankfelder: + void UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc ); + void AddUsedDBToList( SvStringsDtor& rDBNameList, + const SvStringsDtor& rUsedDBNames ); + void AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName ); + sal_Bool IsNameInArray( const SvStringsDtor& rOldNames, const String& rName ); + void GetAllDBNames( SvStringsDtor& rAllDBNames ); + void ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames, + const String& rNewName, String& rFormel ); + SvStringsDtor& FindUsedDBs( const SvStringsDtor& rAllDBNames, + const String& rFormel, + SvStringsDtor& rUsedDBNames ); + + void InitDrawModel(); + void ReleaseDrawModel(); + + void _CreateNumberFormatter(); + + sal_Bool _UnProtectTblCells( SwTable& rTbl ); + + // erzeuge Anhand der vorgebenen Collection Teildokumente + // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene + sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath, + const SwTxtFmtColl* pSplitColl ); + + // Charts der angegebenen Tabelle updaten + void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const; + + // unser eigener 'IdlTimer' ruft folgende Methode + DECL_LINK( DoIdleJobs, Timer * ); + // der CharTimer ruft diese Methode + DECL_LINK( DoUpdateAllCharts, Timer * ); + DECL_LINK( DoUpdateModifiedOLE, Timer * ); + +public: + SwDoc(); + ~SwDoc(); + + SwNodes& GetNodes() { return aNodes; } + const SwNodes& GetNodes() const { return aNodes; } + + DECL_STATIC_LINK( SwDoc, BackgroundDone, SvxBrushItem *); + DECL_LINK(CalcFieldValueHdl, EditFieldInfo*); + + // Links un-/sichtbar in LinkManager einfuegen (gelinkte Bereiche) + sal_Bool IsVisibleLinks() const { return bVisibleLinks; } + void SetVisibleLinks( sal_Bool bFlag ) { bVisibleLinks = bFlag; } + + SvxLinkManager& GetLinkManager() { return *pLinkMgr; } + const SvxLinkManager& GetLinkManager() const { return *pLinkMgr; } + + // erfrage das spezifische Layout + const SwRootFrm* GetRootFrm() const { return pLayout; } + SwRootFrm* GetRootFrm() { return pLayout; } + // der alte muss !! von der Shell geloescht werden !! + void SetRootFrm( SwRootFrm* pNew ) { pLayout = pNew; } + + void StartIdleTimer() { aIdleTimer.Start(); } + void StopIdleTimer() { aIdleTimer.Stop(); } + sal_Bool IsIdleTimerActive() const { return aIdleTimer.IsActive(); } + + sal_Bool IsOLEPrtNotifyPending() const { return bOLEPrtNotifyPending; } + void SetOLEPrtNotifyPending() { bOLEPrtNotifyPending = sal_True; } + void PrtOLENotify( sal_Bool bAll ); //Alle oder nur Markierte + + sal_Bool IsPurgeOLE() const { return bPurgeOLE; } + void SetPurgeOLE( sal_Bool bFlag ) { bPurgeOLE = bFlag; } + + // das Dokument im Browse-Modus anzeigen + void SetBrowseMode( sal_Bool bFlag = sal_True ) { bBrowseMode = bFlag; } + sal_Bool IsBrowseMode() const { return bBrowseMode; } + void SetHTMLMode( sal_Bool bFlag = sal_True ) { bHTMLMode = bFlag; } + sal_Bool IsHTMLMode() const { return bHTMLMode; } + void SetHeadInBrowse( sal_Bool bFlag = sal_True ) { bHeadInBrowse = bFlag; } + sal_Bool IsHeadInBrowse() const { return bHeadInBrowse; } + void SetFootInBrowse( sal_Bool bFlag = sal_True ) { bFootInBrowse = bFlag; } + sal_Bool IsFootInBrowse() const { return bFootInBrowse; } + void SetFrmBeepEnabled( sal_Bool bFlag = sal_True ) { bFrmBeepEnabled = bFlag; } + sal_Bool IsFrmBeepEnabled() const { return bFrmBeepEnabled; } + + void SetGlobalDoc( sal_Bool bFlag = sal_True ) { bIsGlobalDoc = bFlag; } + sal_Bool IsGlobalDoc() const { return bIsGlobalDoc; } + void SetGlblDocSaveLinks( sal_Bool bFlag=sal_True ) { bGlblDocSaveLinks = bFlag; } + sal_Bool IsGlblDocSaveLinks() const { return bGlblDocSaveLinks; } + + void SetLabelDoc( sal_Bool bFlag = sal_True ) { bIsLabelDoc = bFlag; } + sal_Bool IsLabelDoc() const { return bIsLabelDoc; } + + sal_uInt16 GetLinkUpdMode() const; + void SetLinkUpdMode( sal_uInt16 nMode ) { nLinkUpdMode = nMode; } + // nur fuer den Writer, weil dieser das richtige Enum schreiben muss! + sal_uInt16 _GetLinkUpdMode() const { return nLinkUpdMode; } + + inline sal_Bool IsInDtor() const { return bDtor; } + + // SS fuer das Drawing, Model und LayerId's + const SdrModel* GetDrawModel() const { return pDrawModel; } + SdrModel* GetDrawModel() { return pDrawModel; } + sal_Int8 GetHeavenId() const { return nHeaven; } + sal_Int8 GetHellId() const { return nHell; } + sal_Int8 GetControlsId() const { return nControls; } + + // liefert zu allen fliegenden Rahmen die Position im Dokument. + // Wird ein Pam-Pointer uebergeben, muessen die absatzgebundenen + // FlyFrames von der ::com::sun::star::awt::Selection vollstaendig umschlossen sein + // ( Start < Pos < End ) !!! + // (wird fuer die Writer benoetigt) + void GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* = 0, + sal_Bool bDrawAlso = sal_False ) const; + + // dokumentglobale Macros + sal_Bool HasGlobalMacro(sal_uInt16 nEvent) const; + const SvxMacro& GetGlobalMacro(sal_uInt16 nEvent) const; + void SetGlobalMacro(sal_uInt16 nEvent, const SvxMacro&); + sal_Bool DelGlobalMacro(sal_uInt16 nEvent); + const SvxMacroTableDtor& GetMacroTable() const { return *pMacroTable; } + + // Fussnoten Informationen + const SwFtnInfo& GetFtnInfo() const { return *pFtnInfo; } + void SetFtnInfo(const SwFtnInfo& rInfo); + const SwEndNoteInfo& GetEndNoteInfo() const { return *pEndNoteInfo; } + void SetEndNoteInfo(const SwEndNoteInfo& rInfo); + + // Zeilennummerierung + const SwLineNumberInfo& GetLineNumberInfo() const { return *pLineNumberInfo; } + void SetLineNumberInfo(const SwLineNumberInfo& rInfo); + + SwFtnIdxs& GetFtnIdxs() { return *pFtnIdxs; } + const SwFtnIdxs& GetFtnIdxs() const { return *pFtnIdxs; } + // Fussnoten im Bereich aendern + sal_Bool SetCurFtn( const SwPaM& rPam, const String& rNumStr, + sal_uInt16 nNumber, sal_Bool bIsEndNote ); + + // wegen swrtf.cxx und define private public, jetzt hier + SwFlyFrmFmt *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom); + SwDrawFrmFmt *MakeDrawFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom); + + SwLayouter* GetLayouter() { return pLayouter; } + const SwLayouter* GetLayouter() const { return pLayouter; } + void SetLayouter( SwLayouter* pNew ) { pLayouter = pNew; } + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + Spell(SwPaM&, ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XSpellChecker1 > &, + sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) const; + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenatedWord > + Hyphenate( SwPaM *pPam, const Point &rCrsrPos, + sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); + + const SwBookmarks& GetBookmarks() const { return *pBookmarkTbl; } + SwBookmark* MakeBookmark( const SwPaM& rPaM, const KeyCode&, + const String& rName, const String& rShortName, BOOKMARK_TYPE eMark = BOOKMARK); + void DelBookmark( sal_uInt16 nPos ); + void DelBookmark( const String& rName ); + sal_uInt16 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 ); + // Anzahl der ::com::sun::star::text::Bookmarks, gfs. nur "echte" + sal_uInt16 GetBookmarkCnt(sal_Bool bBkmrk = sal_False) const; + SwBookmark& GetBookmark( sal_uInt16, sal_Bool bBkmrk = sal_False); + + // Textbaustein Dokument? + void SetGlossDoc( sal_Bool bGlssDc = sal_True ) { bGlossDoc = bGlssDc; } + sal_Bool IsGlossDoc() const { return bGlossDoc; } + sal_Bool IsInsOnlyTextGlossary() const { return bInsOnlyTxtGlssry; } + + //Bei Formataenderungen muss das zu Fuss gerufen werden! + void SetModified(); + void ResetModified(); + sal_Bool IsModified() const { return bModified; } //Dokumentaenderungen? + + sal_Bool IsInCallModified() const { return bInCallModified; } + void SetUndoNoResetModified() { nUndoSavePos = USHRT_MAX; } + sal_Bool IsUndoNoResetModified() const { return USHRT_MAX == nUndoSavePos; } + + //Die neuen (hoffentlich bestaendigen) Schnittstellen fuer alles, + //was mit dem Layout zu tun hat. + SwFrmFmt *MakeLayoutFmt( RndStdIds eRequest, + SwFrmFmt* = 0, + const SfxItemSet* pSet = 0 ); + // JP 08.05.98: fuer Flys muss jetzt diese Schnittstelle benutzt + // werden. pAnchorPos muss gesetzt sein, wenn keine + // Seitenbindung vorliegt UND der ::com::sun::star::chaos::Anchor nicht schon + // im FlySet/FrmFmt mit gueltiger CntntPos gesetzt ist + SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType, + const SwPosition* pAnchorPos, + const SfxItemSet* pSet = 0, + SwFrmFmt *pParent = 0 ); + SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet, + const SwSelBoxes* pSelBoxes = 0, + SwFrmFmt *pParent = 0 ); + + void DelLayoutFmt( SwFrmFmt *pFmt ); + SwFrmFmt *CopyLayoutFmt( const SwFrmFmt& rSrc, + const SwFmtAnchor& rNewAnchor, + sal_Bool bSetTxtFlyAtt = sal_True, sal_Bool bMakeFrms = sal_True ); + void CopyWithFlyInFly( const SwNodeRange& rRg, + const SwNodeIndex& rInsPos, + sal_Bool bMakeNewFrms = sal_True, + sal_Bool bDelRedlines = sal_True, + sal_Bool bCopyFlyAtFly = sal_False ) const; + sal_Bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const; + + sal_Bool SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet ); + sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt, + SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False ); + + // Abstakt fuellen + void Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress ); + + /* Verwaltet SwDoc::nLinkCt, sollte (paarig!) von allen benutzt werden, + * die einen Pointer auf dieses Dokument halten, denn wenn Remove() 0 + * liefert, wird das Dokument zerstoert! Oder anders: Jeder bei dem + * Remove() 0 liefert, muss das Dokument zerstoeren. + */ + sal_Int8 AddLink() { return nLinkCt++; } + sal_Int8 RemoveLink() { return nLinkCt ? --nLinkCt : nLinkCt; } + sal_Int8 GetLinkCnt() const { return nLinkCt; } + + // UndoHistory am Dokument pflegen + // bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ??? + void DoUndo(sal_Bool bUn = sal_True) { bUndo = bUn; } + sal_Bool DoesUndo() const { return bUndo; } + // Zusammenfassen von Kontinuierlichen Insert/Delete/Overwrite von + // Charaktern. Default ist ::com::sun::star::sdbcx::Group-Undo. + void DoGroupUndo(sal_Bool bUn = sal_True) { bGroupUndo = bUn; } + sal_Bool DoesGroupUndo() const { return bGroupUndo; } + + // macht rueckgaengig: + // 0 letzte Aktion, sonst Aktionen bis zum Start der Klammerung nUndoId + // In rUndoRange wird der restaurierte Bereich gesetzt. + sal_Bool Undo( SwUndoIter& ); + // setzt Undoklammerung auf, nUndoId kommt von der UI-Seite + sal_uInt16 StartUndo( sal_uInt16 nUndoId = 0 ); + // schliesst Klammerung der nUndoId + sal_uInt16 EndUndo( sal_uInt16 nUndoId = 0 ); + // loescht die gesamten UndoObjecte ( fuer Methoden die am Nodes + // Array drehen ohne entsprechendes Undo !!) + void DelAllUndoObj(); + // liefert die Id der letzten undofaehigen Aktion zurueck + // oder USHRT_MAX + // fuellt ggf. VARARR mit ::com::sun::star::sdbcx::User-UndoIds + sal_uInt16 GetUndoIds( String* pStr = 0, SwUndoIds *pUndoIds = 0) const; + // gibt es Klammerung mit der Id? + sal_Bool HasUndoId(sal_uInt16 nId) const; + // die drei folgenden Methoden werden beim Undo und nur dort + // benoetigt. Sollten sonst nicht aufgerufen werden. + const SwNodes* GetUndoNds() const { return &aUndoNodes; } + + // bei einstufigem Undo muss die History und das Undo-Array geloescht + // werden. Dabei ist aber zu beachten, das nur vollstaendige Gruppen + // geloescht werden koennen. + // Sind beide FLAGS auf sal_False, kann erfragt werden, ob sich in der + // History eine offene Gruppe befindet. ( return = sal_True ) + // bDelHisory = sal_True: loesche die Undo-History + // bDelUndoNds = sal_True: loesche das Undo-Nodes-Arary + sal_Bool DelUndoGroups( sal_Bool bDelUndoNds=sal_True, sal_Bool bDelHistory=sal_True ); + SwUndo* RemoveLastUndo( sal_uInt16 nUndoId ); + + // abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions + static sal_uInt16 GetUndoActionCount() { return nUndoActions; } + static void SetUndoActionCount( sal_uInt16 nNew ) { nUndoActions = nNew; } + + // Redo + // wiederholt + sal_Bool Redo( SwUndoIter& ); + // liefert die Id der letzten Redofaehigen Aktion zurueck + // fuellt ggf. VARARR mit RedoIds + sal_uInt16 GetRedoIds( String* pStr = 0, SwUndoIds *pRedoIds = 0) const; + + // Repeat + // wiederholt + sal_Bool Repeat( SwUndoIter&, sal_uInt16 nRepeatCnt = 1 ); + // liefert die Id der letzten Repeatfaehigen Aktion zurueck + // fuellt ggf. VARARR mit RedoIds + sal_uInt16 GetRepeatIds( String* pStr = 0, SwUndoIds *pRedoIds = 0) const; + + /* Felder */ + const SwFldTypes *GetFldTypes() const { return pFldTypes; } + SwFieldType *InsertFldType(const SwFieldType &); + SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const; + SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const; + void RemoveFldType(sal_uInt16 nFld); + void UpdateFlds( SfxPoolItem* pNewHt = 0, sal_Bool bCloseDB = sal_False ); + void InsDeletedFldType( SwFieldType & ); + sal_Bool RenameUserFields(const String& rOldName, const String& rNewName); + + // rufe das Update der Expression Felder auf; alle Ausdruecke werden + // neu berechnet. + void UpdateRefFlds( SfxPoolItem* pHt = 0); + void UpdateTblFlds( SfxPoolItem* pHt = 0); + void UpdateExpFlds( SwTxtFld* pFld = 0, sal_Bool bUpdateRefFlds = sal_True ); + void UpdateUsrFlds(); + void UpdatePageFlds( SfxPoolItem* ); + void LockExpFlds() { ++nLockExpFld; } + void UnlockExpFlds() { if( nLockExpFld ) --nLockExpFld; } + sal_Bool IsExpFldsLocked() const { return 0 != nLockExpFld; } + SwDocUpdtFld& GetUpdtFlds() const { return *pUpdtFlds; } + sal_Bool SetFieldsDirty( sal_Bool b, const SwNode* pChk = 0, sal_uInt32 nLen = 0 ); + + void SetFixFields( sal_Bool bOnlyTimeDate = sal_False, + const DateTime* pNewDateTime = 0 ); + + sal_uInt16 GetFldUpdateFlags() const; + void SetFldUpdateFlags( sal_uInt16 eMode ) { nFldUpdMode = eMode; } + // nur fuer den Writer, weil dieser das richtige Enum schreiben muss! + sal_uInt16 _GetFldUpdateFlags() const { return nFldUpdMode; } + + void ChangeAuthorityData(const SwAuthEntry* pNewData); + + // Zustaende ueber Ladezustand + // frueher DocInfo + // + sal_Bool IsPageNums() const { return bPageNums; } + sal_Bool IsLoaded() const { return bLoaded; } + sal_Bool IsUpdateExpFld() const { return bUpdateExpFld; } + sal_Bool IsNewDoc() const { return bNewDoc; } + + void SetPageNums(sal_Bool b = sal_True) { bPageNums = b; } + void SetNewDoc(sal_Bool b = sal_True) { bNewDoc = b; } + void SetUpdateExpFldStat(sal_Bool b = sal_True) { bUpdateExpFld = b; } + void SetLoaded(sal_Bool b = sal_True) { bLoaded = b; } + + // Setze im Calculator alle SetExpresion Felder, die bis zur + // angegebenen Position (Node [ + ::com::sun::star::ucb::Content]) gueltig sind. Es kann + // eine erzeugte Liste aller Felder mit uebergegeben werden. + // (ist die Adresse != 0, und der Pointer == 0 wird eine neue + // Liste returnt.) + void FldsToCalc( SwCalc& rCalc, sal_uInt32 nLastNd = ULONG_MAX, + sal_uInt16 nLastCntnt = USHRT_MAX ); + void FldsToCalc( SwCalc& rCalc, const _SetGetExpFld& rToThisFld ); + void FldsToExpand( SwHash**& ppTbl, sal_uInt16& rTblSize, + const _SetGetExpFld& rToThisFld ); + sal_Bool IsNewFldLst() const { return bNewFldLst; } + void SetNewFldLst( sal_Bool bFlag = sal_True ) { bNewFldLst = bFlag; } + void InsDelFldInFldLst( sal_Bool bIns, const SwTxtFld& rFld ); + + /* Datenbank && DB-Manager */ + void SetNewDBMgr( SwNewDBMgr* pNewMgr ) { pNewDBMgr = pNewMgr; } + SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; } + void ChangeDBFields( const SvStringsDtor& rOldNames, + const String& rNewName ); + void SetInitDBFields(sal_Bool b); + // Von Feldern verwendete Datenbanken herausfinden + void GetAllUsedDB( SvStringsDtor& rDBNameList, + const SvStringsDtor* pAllDBNames = 0 ); + + void ChgDBName( const String& rNewName ); + String GetDBName(); + const String& GetDBDesc(); + const String& _GetDBDesc() const { return aDBName; } + + + // Kopieren eines Bereiches im oder in ein anderes Dokument ! + // Die Position kann auch im Bereich liegen !! + sal_Bool Copy( SwPaM&, SwPosition& ) const; // in ndcopy.cxx + + // Loesche die Section, in der der Node steht. + void DeleteSection( SwNode *pNode ); + + sal_Bool Delete( SwPaM& ); //loeschen eines Bereiches + sal_Bool DelFullPara( SwPaM& ); //loeschen gesamter Absaetze + sal_Bool DeleteAndJoin( SwPaM& ); //komplett loeschen eines Bereiches + + sal_Bool Move( SwPaM&, SwPosition&, SwMoveFlags = DOC_MOVEDEFAULT ); //verschieben eines Bereiches + sal_Bool Move( SwNodeRange&, SwNodeIndex&, + SwMoveFlags = DOC_MOVEDEFAULT ); // verschieben ganzer Nodes + sal_Bool MoveAndJoin( SwPaM&, SwPosition&, SwMoveFlags = DOC_MOVEDEFAULT ); //verschieben eines Bereiches + //Ueberschreiben eines einzelnen Zeichens. rRg.Start() bezeichnet + //den Node und die Position in dem Node, an der eingefuegt wird, + sal_Bool Overwrite( const SwPaM &rRg, sal_Unicode c ); + //Ueberschreiben eines Strings in einem bestehenden Textnode. + sal_Bool Overwrite(const SwPaM &rRg, const String& rStr ); + //Einfuegen eines einzelnen Zeichens. rRg.Start() bezeichnet + //den Node und die Position in dem Node, an der eingefuegt wird. + sal_Bool Insert(const SwPaM &rRg, sal_Unicode c ); + //Einfuegen eines Strings in einen bestehenden + //Textnode. Der Text wird kopiert. + sal_Bool Insert( const SwPaM &rRg, const String &, + sal_Bool bHintExpand = sal_True ); + + //Einfuegen einer Grafik, Formel. Die XXXX werden kopiert. + SwFlyFrmFmt* Insert(const SwPaM &rRg, + const String& rGrfName, + const String& rFltName, + const Graphic* pGraphic = 0, + const SfxItemSet* pFlyAttrSet = 0, + const SfxItemSet* pGrfAttrSet = 0, + SwFrmFmt* = 0 ); + // austauschen einer Grafik (mit Undo) + void ReRead( SwPaM&, const String& rGrfName, const String& rFltName, + const Graphic* pGraphic ); + + //Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel + // angemeldet sein. + SwDrawFrmFmt* Insert( const SwPaM &rRg, + SdrObject& rDrawObj, + const SfxItemSet* pFlyAttrSet = 0, + SwFrmFmt* = 0 ); + String GetUniqueGrfName() const; + + //Einfuegen von OLE-Objecten. + SwFlyFrmFmt* Insert( const SwPaM &rRg, SvInPlaceObject *, + const SfxItemSet* pFlyAttrSet = 0, + const SfxItemSet* pGrfAttrSet = 0, + SwFrmFmt* = 0 ); + String GetUniqueOLEName() const; + + void GrfToOle( const SwPaM &rRg, SvInPlaceObject * ); + void OleToGrf( const SwPaM &rRg, const Graphic *pGrf ); + + // ein bischen wa fuer die benannten FlyFrames + String GetUniqueFrameName() const; + void SetFlyName( SwFlyFrmFmt& rFmt, const String& rName ); + const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_Int8 nNdTyp = 0 ) const; + + void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName, + String* pFltName ) const; + + // setze bei allen Flys ohne Namen einen gueltigen (Wird von den Readern + // nach dem Einlesen gerufen ) + void SetAllUniqueFlyNames(); + + //Aufspalten eines Nodes an rPos (nur fuer den TxtNode implementiert) + sal_Bool SplitNode(const SwPosition &rPos, sal_Bool bChkTableStart = sal_False ); + sal_Bool AppendTxtNode( SwPosition& rPos ); // nicht const! + + // 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..&" + sal_Bool Replace( SwPaM& rPam, const String& rNewStr, + sal_Bool bRegExpRplc = sal_False ); + + /* + * Einfuegen eines Attributs. Erstreckt sich rRg ueber + * mehrere Nodes, wird das Attribut aufgespaltet, sofern + * dieses Sinn macht. Nodes, in denen dieses Attribut keinen + * Sinn macht, werden ignoriert. In vollstaendig in der + * Selektion eingeschlossenen Nodes wird das Attribut zu + * harter Formatierung, in den anderen (Text-)Nodes wird das + * Attribut in das Attributearray eingefuegt. Bei einem + * Zeichenattribut wird ein "leerer" Hint eingefuegt, + * wenn keine Selektion + * vorliegt; andernfalls wird das Attribut als harte + * Formatierung dem durch rRg.Start() bezeichneten Node + * hinzugefuegt. Wenn das Attribut nicht eingefuegt werden + * konnte, liefert die Methode sal_False. + */ + sal_Bool Insert( const SwPaM &rRg, const SfxPoolItem&, sal_uInt16 nFlags = 0 ); + sal_Bool Insert( const SwPaM &rRg, const SfxItemSet&, sal_uInt16 nFlags = 0 ); + + //Zuruecksetzen der Attribute; es werden alle TxtHints und bei + //vollstaendiger Selektion harte Formatierung (AUTO-Formate) entfernt + void ResetAttr(const SwPaM &rRg, sal_Bool bTxtAttr = sal_True, + const SvUShortsSort* = 0 ); + void RstTxtAttr(const SwPaM &rRg, BOOL bInclRefToxMark = FALSE ); + + // Setze das Attribut im angegebenen Format. Ist Undo aktiv, wird + // das alte in die Undo-History aufgenommen + void SetAttr( const SfxPoolItem&, SwFmt& ); + void SetAttr( const SfxItemSet&, SwFmt& ); + + // Setze das Attribut als neues default Attribut in diesem Dokument. + // Ist Undo aktiv, wird das alte in die Undo-History aufgenommen + void SetDefault( const SfxPoolItem& ); + void SetDefault( const SfxItemSet& ); + + // Erfrage das Default Attribut in diesem Dokument. + const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const; + // TextAttribute nicht mehr aufspannen lassen + sal_Bool DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag = sal_True ); + + /* Formate */ + const SwFrmFmts* GetFrmFmts() const { return pFrmFmtTbl; } + SwFrmFmts* GetFrmFmts() { return pFrmFmtTbl; } + const SwCharFmts* GetCharFmts() const { return pCharFmtTbl;} + + /* LayoutFormate (Rahmen, DrawObjecte), mal const mal nicht */ + const SwSpzFrmFmts* GetSpzFrmFmts() const { return pSpzFrmFmtTbl; } + SwSpzFrmFmts* GetSpzFrmFmts() { return pSpzFrmFmtTbl; } + + const SwFrmFmt *GetDfltFrmFmt() const { return pDfltFrmFmt; } + SwFrmFmt *GetDfltFrmFmt() { return pDfltFrmFmt; } + const SwFrmFmt *GetEmptyPageFmt() const { return pEmptyPageFmt; } + SwFrmFmt *GetEmptyPageFmt() { return pEmptyPageFmt; } + const SwFrmFmt *GetColumnContFmt() const{ return pColumnContFmt; } + SwFrmFmt *GetColumnContFmt() { return pColumnContFmt; } + const SwCharFmt *GetDfltCharFmt() const { return pDfltCharFmt;} + SwCharFmt *GetDfltCharFmt() { return pDfltCharFmt;} + + SwFrmFmt *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom); + void DelFrmFmt( SwFrmFmt *pFmt ); + SwFrmFmt* FindFrmFmtByName( const String& rName ) const + { return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); } + SwFrmFmt* FindSpzFrmFmtByName( const String& rName ) const + { return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pSpzFrmFmtTbl, rName ); } + + SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom); + void DelCharFmt(sal_uInt16 nFmt); + void DelCharFmt(SwCharFmt* pFmt); + SwCharFmt* FindCharFmtByName( const String& rName ) const + { return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); } + + /* Formatcollections (Vorlagen) */ + // TXT + const SwTxtFmtColl* GetDfltTxtFmtColl() const { return pDfltTxtFmtColl; } + const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; } + SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName, + SwTxtFmtColl *pDerivedFrom ); + SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName, + SwTxtFmtColl *pDerivedFrom ); + void DelTxtFmtColl(sal_uInt16 nFmt); + void DelTxtFmtColl( SwTxtFmtColl* pColl ); + sal_Bool SetTxtFmtColl( const SwPaM &rRg, SwTxtFmtColl *pFmt, + sal_Bool bReset = sal_True); + SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const + { return (SwTxtFmtColl*)FindFmtByName( (SvPtrarr&)*pTxtFmtCollTbl, rName ); } + + // GRF + const SwGrfFmtColl* GetDfltGrfFmtColl() const { return pDfltGrfFmtColl; } + const SwGrfFmtColls *GetGrfFmtColls() const { return pGrfFmtCollTbl; } + SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtName, + SwGrfFmtColl *pDerivedFrom); + void DelGrfFmtColl(sal_uInt16 nFmt); + void DelGrfFmtColl( SwGrfFmtColl* pColl ); + SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const + { return (SwGrfFmtColl*)FindFmtByName( (SvPtrarr&)*pGrfFmtCollTbl, rName ); } + + // Tabellen-Formate + const SwFrmFmts* GetTblFrmFmts() const { return pTblFrmFmtTbl; } + SwFrmFmts* GetTblFrmFmts() { return pTblFrmFmtTbl; } + sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed ) const; + SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const; + SwTableFmt* MakeTblFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom); + void DelTblFrmFmt( SwTableFmt* pFmt ); + SwTableFmt* FindTblFmtByName( const String& rName, sal_Bool bAll = sal_False ) const; + + //Rahmenzugriff + //iterieren ueber Flys - fuer Basic-Collections + sal_uInt16 GetFlyCount(FlyCntType eType = FLYCNTTYPE_ALL) const; + SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL); + + + // kopiere die Formate in die eigenen Arrays und returne diese + SwFrmFmt *CopyFrmFmt ( const SwFrmFmt& ); + SwCharFmt *CopyCharFmt( const SwCharFmt& ); + SwTxtFmtColl* CopyTxtColl( const SwTxtFmtColl& rColl ); + SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl ); + + // ersetze alle Formate mit denen aus rSource + void ReplaceStyles( SwDoc& rSource ); + + // Gebe die "Auto-Collection" mit der Id zurueck. Existiert + // sie noch nicht, dann erzuege sie + // Ist der String-Pointer definiert, dann erfrage nur die + // Beschreibung der Attribute, !! es legt keine Vorlage an !! + SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, String* pDescription = 0, + SfxItemPresentation ePres = SFX_ITEM_PRESENTATION_COMPLETE, + SfxMapUnit eCoreMetric = SFX_MAPUNIT_TWIP, + SfxMapUnit ePresMetric = SFX_MAPUNIT_TWIP ); + // return das geforderte automatische Format - Basis-Klasse ! + SwFmt* GetFmtFromPool( sal_uInt16 nId, String* pDescription = 0, + SfxItemPresentation ePres = SFX_ITEM_PRESENTATION_COMPLETE, + SfxMapUnit eCoreMetric = SFX_MAPUNIT_TWIP, + SfxMapUnit ePresMetric = SFX_MAPUNIT_TWIP ); + // returne das geforderte automatische Format + SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId, String* pDescription = 0 ) + { return (SwFrmFmt*)GetFmtFromPool( nId, pDescription ); } + SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId, String* pDescription = 0 ) + { return (SwCharFmt*)GetFmtFromPool( nId, pDescription ); } + // returne die geforderte automatische Seiten-Vorlage + SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, String* pDescription = 0, + SfxItemPresentation ePres = SFX_ITEM_PRESENTATION_COMPLETE, + SfxMapUnit eCoreMetric = SFX_MAPUNIT_TWIP, + SfxMapUnit ePresMetric = SFX_MAPUNIT_TWIP ); + SwNumRule* GetNumRuleFromPool( sal_uInt16 nId, String* pDescription = 0, + SfxItemPresentation ePres = SFX_ITEM_PRESENTATION_COMPLETE, + SfxMapUnit eCoreMetric = SFX_MAPUNIT_TWIP, + SfxMapUnit ePresMetric = SFX_MAPUNIT_TWIP ); + + // pruefe, ob diese "Auto-Collection" in Dokument schon/noch + // benutzt wird + sal_Bool IsPoolTxtCollUsed( sal_uInt16 nId ) const; + sal_Bool IsPoolFmtUsed( sal_uInt16 nId ) const; + sal_Bool IsPoolPageDescUsed( sal_uInt16 nId ) const; + sal_Bool IsPoolNumRuleUsed( sal_uInt16 nId ) const; + + // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird + sal_Bool IsUsed( const SwModify& ) const; + sal_Bool IsUsed( const SwNumRule& ) const; + + // ist der Name ein Pool-Vorlagen-Name, returne seine ID, + // sonst USHRT_MAX + sal_uInt16 GetPoolId( const String& rName, SwGetPoolIdFromName ) const; + + const SvStringsDtor& GetTextNmArray() const + { return pTextNmArray ? *pTextNmArray : *NewTextNmArray(); } + const SvStringsDtor& GetListsNmArray() const + { return pListsNmArray ? *pListsNmArray : *NewListsNmArray(); } + const SvStringsDtor& GetExtraNmArray() const + { return pExtraNmArray ? *pExtraNmArray : *NewExtraNmArray(); } + const SvStringsDtor& GetRegisterNmArray() const + { return pRegisterNmArray ? *pRegisterNmArray : *NewRegisterNmArray(); } + const SvStringsDtor& GetDocNmArray() const + { return pDocNmArray ? *pDocNmArray : *NewDocNmArray(); } + const SvStringsDtor& GetHTMLNmArray() const + { return pHTMLNmArray ? *pHTMLNmArray : *NewHTMLNmArray(); } + const SvStringsDtor& GetFrmFmtNmArray() const + { return pFrmFmtNmArray ? *pFrmFmtNmArray : *NewFrmFmtNmArray(); } + const SvStringsDtor& GetChrFmtNmArray() const + { return pChrFmtNmArray ? *pChrFmtNmArray : *NewChrFmtNmArray(); } + const SvStringsDtor& GetHTMLChrFmtNmArray() const + { return pHTMLChrFmtNmArray ? *pHTMLChrFmtNmArray : *NewHTMLChrFmtNmArray(); } + const SvStringsDtor& GetPageDescNmArray() const + { return pPageDescNmArray ? *pPageDescNmArray : *NewPageDescNmArray(); } + const SvStringsDtor& GetNumRuleNmArray() const + { return pNumRuleNmArray ? *pNumRuleNmArray : *NewNumRuleNmArray(); } + + // erfrage zu einer PoolId den Namen (steht im poolfmt.cxx) + static String& GetPoolNm( sal_uInt16 nId, String& rFillNm ); + + // setze den Namen der neu geladenen Dokument-Vorlage + sal_uInt16 SetDocPattern( const String& rPatternName ); + // gebe die Anzahl von geladenen Dok-VorlagenNamen zurueck. + // !! Die nicht mehr benutzten sind 0-Pointer !! + sal_uInt16 GetDocPatternCnt() const { return aPatternNms.Count(); } + // gebe den Dok-VorlagenNamen zurueck. !!! Kann auch 0 sein !!! + String* GetDocPattern( sal_uInt16 nPos ) const { return aPatternNms[nPos]; } + // loeche die nicht mehr benutzten Pattern-Namen aus dem Array. + + // alle nicht mehr referenzierten Namen werden durch 0-Pointer + // ersetzt. Diese Positionen koennen wieder vergeben werden. + void ReOrgPatternHelpIds(); + + + // Loesche alle nicht referenzierten FeldTypen + void GCFieldTypes(); // impl. in docfld.cxx + + // akt. Dokument mit Textbausteindokument verbinden/erfragen + void SetGlossaryDoc( SwDoc* pDoc ) { pGlossaryDoc = pDoc; } + SwDoc* GetGlossaryDoc() const { return pGlossaryDoc; } + // jetzt mit einem verkappten Reader/Writer/Dokument + + // travel over PaM Ring + sal_Bool InsertGlossary( SwTextBlocks& rBlock, const String& rEntry, + SwPaM& rPaM, SwCrsrShell* pShell = 0); + + String GetCurWord(SwPaM&); + + // JobSetup und Freunde + SfxPrinter* GetPrt( sal_Bool bCreate ) const + { if( !bCreate || pPrt ) return pPrt; else return _GetPrt(); } + SfxPrinter* GetPrt() const { return pPrt; } + inline void _SetPrt( SfxPrinter *pP ) { pPrt = pP; } + void SetPrt( SfxPrinter *pP ); + const JobSetup* GetJobsetup() const; + void SetJobsetup( const JobSetup& rJobSetup ); + + // Dokument - Info + // legt sie auf jedenfall an! + const SfxDocumentInfo* GetInfo(); + // kann auch 0 sein !!! + const SfxDocumentInfo* GetpInfo() const { return pSwgInfo; } + + // setze ueber die DocShell in den entsp. Storage-Stream. Hier wird + // jetzt die DocInfo verwaltet. Fuer die Felder ist am Doc eine Kopie + // der Info, um einen schnellen Zugriff zu ermoeglichen. + // (impl. in docsh2.cxx) + void SetInfo( const SfxDocumentInfo& rInfo ); + // die DocInfo hat siche geaendert (Notify ueber die DocShell) + // stosse die entsp. Felder zum Updaten an. + void DocInfoChgd( const SfxDocumentInfo& rInfo ); + + // Dokument - Statistics + inline const SwDocStat &GetDocStat() const { return *pDocStat; } + void SetDocStat( const SwDocStat& rStat ); + void UpdateDocStat( SwDocStat& rStat, sal_uInt16 nNumPages ); + + //PageDescriptor-Schnittstelle + sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); } + const SwPageDesc& GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; } + SwPageDesc* FindPageDescByName( const String& rName, + sal_uInt16* pPos = 0 ) const; + + // kopiere den gesamten PageDesc - ueber Dokumentgrenzen und "tief"! + // optional kann das kopieren der PoolFmtId, -HlpId verhindert werden + void CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, + sal_Bool bCopyPoolIds = sal_True ); + + // kopiere die Kopzeile (mit dem Inhalt!) aus dem SrcFmt + // ins DestFmt ( auch ueber Doc grenzen hinaus!) + void CopyHeader( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt ) + { _CopyPageDescHeaderFooter( sal_True, rSrcFmt, rDestFmt ); } + // kopiere die Fusszeile (mit dem Inhalt!) aus dem SrcFmt + // ins DestFmt ( auch ueber Doc grenzen hinaus!) + void CopyFooter( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt ) + { _CopyPageDescHeaderFooter( sal_False, rSrcFmt, rDestFmt ); } + + //fuer Reader + SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; } + void ChgPageDesc( sal_uInt16 i, const SwPageDesc& ); + void DelPageDesc( sal_uInt16 i ); + sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0 ); + + // Methoden fuer die Verzeichnisse: + // - Verzeichnismarke einfuegen loeschen travel + sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const; + void Delete( SwTOXMark* pTOXMark ); + const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark, + SwTOXSearch eDir, sal_Bool bInReadOnly ); + + // - Verzeichnis einfuegen, und bei Bedarf erneuern + const SwTOXBaseSection* InsertTableOf( const SwPosition& rPos, + const SwTOXBase& rTOX, + const SfxItemSet* pSet = 0, + sal_Bool bExpand = sal_False ); + const SwTOXBaseSection* InsertTableOf( sal_uInt32 nSttNd, sal_uInt32 nEndNd, + const SwTOXBase& rTOX, + const SfxItemSet* pSet = 0 ); + const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const; + const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const; + + sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False ); + String GetUniqueTOXBaseName( const SwTOXType& rType, + const String* pChkStr = 0 ) const; + + sal_Bool SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName); + void SetTOXBaseProtection(const SwTOXBase& rTOXBase, sal_Bool bProtect); + + // nach einlesen einer Datei alle Verzeichnisse updaten + void SetUpdateTOX( sal_Bool bFlag = sal_True ) { bUpdateTOX = bFlag; } + sal_Bool IsUpdateTOX() const { return bUpdateTOX; } + + const String& GetTOIAutoMarkURL() const {return sTOIAutoMarkURL;} + void SetTOIAutoMarkURL(const String& rSet) {sTOIAutoMarkURL = rSet;} + void ApplyAutoMark(); + + sal_Bool IsInReading() const { return bInReading; } + + // - Verzeichnis-Typen verwalten + sal_uInt16 GetTOXTypeCount( TOXTypes eTyp ) const; + const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const; + sal_Bool DeleteTOXType( TOXTypes eTyp, sal_uInt16 nId ); + const SwTOXType* InsertTOXType( const SwTOXType& rTyp ); + const SwTOXTypes& GetTOXTypes() const { return *pTOXTypes; } + + const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False ); + void SetDefaultTOXBase(const SwTOXBase& rBase); + + // - Schluessel fuer die Indexverwaltung + sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const; + + // Sortieren Tabellen Text + sal_Bool SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions&); + sal_Bool SortText(const SwPaM&, const SwSortOptions&); + + // korrigiere die im Dokument angemeldeten SwPosition-Objecte, + // wie z.B. die ::com::sun::star::text::Bookmarks oder die Verzeichnisse. + // JP 22.06.95: ist bMoveCrsr gesetzt, verschiebe auch die Crsr + + // Setzt alles in rOldNode auf rNewPos + Offset + void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos, + const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False ); + // Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos + void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode, + const SwPosition& rNewPos, sal_Bool bMoveCrsr = sal_False ); + // Setzt alles im Bereich von rRange nach rNewPos + void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos, + sal_Bool bMoveCrsr = sal_False ); + // Setzt alles in rOldNode auf relative Pos + void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos, + const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False ); + + // GliederungsRegeln erfragen / setzen + const SwNumRule* GetOutlineNumRule() const { return pOutlineRule; } + void SetOutlineNumRule( const SwNumRule& rRule ); + // Gliederung - hoch-/runterstufen + sal_Bool OutlineUpDown( const SwPaM& rPam, short nOffset = 1 ); + // Gliederung - hoch-/runtermoven + sal_Bool MoveOutlinePara( const SwPaM& rPam, short nOffset = 1); + // zu diesem Gliederungspunkt + sal_Bool GotoOutline( SwPosition& rPos, const String& rName ) const; + // die Aenderungen an den Gliederungsvorlagen in die OutlineRule uebernehmen + void SetOutlineLSpace( sal_uInt8 nLevel, short nFirstLnOfst, sal_uInt16 nLSpace ); + + // setzt, wenn noch keine Numerierung, sonst wird geaendert + // arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren + void SetNumRule( const SwPaM&, const SwNumRule&, + sal_Bool bSetAbsLSpace = sal_True ); + // ab hier neu starten lassen oder den Start wieder aufheben + void SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag = sal_True ); + void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt = USHRT_MAX ); + + SwNumRule* GetCurrNumRule( const SwPosition& rPos ) const; + SwNumRuleTbl& GetNumRuleTbl() { return *pNumRuleTbl; } + const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; } + sal_uInt16 MakeNumRule( const String &rName, const SwNumRule* pCpy = 0 ); + sal_uInt16 FindNumRule( const String& rName ) const; + SwNumRule* FindNumRulePtr( const String& rName ) const; + // loeschen geht nur, wenn die ::com::sun::star::chaos::Rule niemand benutzt! + sal_Bool DelNumRule( const String& rName ); + String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const; + void UpdateNumRule( const String& rName, sal_uInt32 nUpdPos ); + void UpdateNumRule(); // alle invaliden Updaten + void ChgNumRuleFmts( const SwNumRule& rRule ); + sal_Bool ReplaceNumRule( const SwPosition& rPos, const String& rOldRule, + const String& rNewRule ); + + // zum naechsten/vorhergehenden Punkt auf gleicher Ebene + sal_Bool GotoNextNum( SwPosition&, sal_Bool bOverUpper = sal_True, + sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 ); + sal_Bool GotoPrevNum( SwPosition&, sal_Bool bOverUpper = sal_True, + sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 ); + + // Absaetze ohne Numerierung, aber mit Einzuegen + sal_Bool NoNum( const SwPaM& ); + // Loeschen, Splitten der Aufzaehlungsliste + sal_Bool DelNumRules( const SwPaM& ); + // Hoch-/Runterstufen + sal_Bool NumUpDown( const SwPaM&, sal_Bool bDown = sal_True ); + // Bewegt selektierte Absaetze (nicht nur Numerierungen) + // entsprechend des Offsets. (negativ: zum Doc-Anf.) + sal_Bool MoveParagraph( const SwPaM&, long nOffset = 1, sal_Bool bIsOutlMv = sal_False ); + // No-/Numerierung ueber Delete/Backspace ein/abschalten + sal_Bool NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel = sal_False, + sal_Bool bOutline = sal_False ); + // Animation der Grafiken stoppen + void StopNumRuleAnimations( OutputDevice* ); + + // fuege eine neue Tabelle auf der Position rPos ein. (es + // wird vor dem Node eingefuegt !!) + //JP 28.10.96: + // fuer AutoFormat bei der Eingabe: dann muessen die Spalten + // auf die vordefinierten Breite gesetzt werden. Im Array stehen die + // Positionen der Spalten!! (nicht deren Breite!) + const SwTable* InsertTable( const SwPosition& rPos, sal_uInt16 nRows, + sal_uInt16 nCols, SwHoriOrient eAdjust, + sal_uInt16 nInsert = HEADLINE_NO_BORDER, + const SwTableAutoFmt* pTAFmt = 0, + const SvUShorts* pColArr = 0 ); + + // steht der Index in einer Tabelle, dann returne den TableNode sonst 0 + SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ); + inline const SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ) const; + + // erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle + const SwTable* TextToTable( const SwPaM& rRange, sal_Unicode cCh, + SwHoriOrient eAdjust, + sal_uInt16 nInsert = HEADLINE_NO_BORDER, + const SwTableAutoFmt* = 0 ); + // erzeuge aus der Tabelle wieder normalen Text + sal_Bool TableToText( const SwTableNode* pTblNd, sal_Unicode cCh ); + // einfuegen von Spalten/Zeilen in der Tabelle + sal_Bool InsertCol( const SwCursor& rCursor, + sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); + sal_Bool InsertCol( const SwSelBoxes& rBoxes, + sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); + sal_Bool InsertRow( const SwCursor& rCursor, + sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); + sal_Bool InsertRow( const SwSelBoxes& rBoxes, + sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); + // loeschen von Spalten/Zeilen in der Tabelle + sal_Bool DeleteRowCol( const SwSelBoxes& rBoxes ); + sal_Bool DeleteRow( const SwCursor& rCursor ); + sal_Bool DeleteCol( const SwCursor& rCursor ); + // teilen / zusammenfassen von Boxen in der Tabelle + sal_Bool SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert = sal_True, sal_uInt16 nCnt=1 ); + // returnt den enum TableMergeErr + sal_uInt16 MergeTbl( SwPaM& rPam ); + String GetUniqueTblName() const; + sal_Bool IsInsTblFormatNum() const; + sal_Bool IsInsTblChangeNumFormat() const; + sal_Bool IsInsTblAlignNum() const; + + // aus der FEShell wg.. Undo und bModified + void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, + const SwCellFrm* pBoxFrm = 0 ) const; + void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly, + const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 ); + + // Direktzugriff fuer Uno + void SetTabCols(SwTable& rTab, const SwTabCols &rNew, SwTabCols &rOld, + const SwTableBox *pStart, sal_Bool bCurRowOnly); + + void SetHeadlineRepeat( SwTable &rTable, sal_Bool bSet ); + // AutoFormat fuer die Tabelle/TabellenSelection + sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew ); + // Erfrage wie attributiert ist + sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet ); + // setze das TabelleAttribut Undo auf: + void AppendUndoForAttrTable( const SwTable& rTbl ); + // setze die Spalten/Zeilen/ZTellen Breite/Hoehe + sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType, + SwTwips nAbsDiff, SwTwips nRelDiff ); + SwTableBoxFmt* MakeTableBoxFmt(); + SwTableLineFmt* MakeTableLineFmt(); + // teste ob die Box ein numerischen Wert darstellt und aender dann ggfs. + // das Format der Box + void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate ); + void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet ); + void ClearBoxNumAttrs( const SwNodeIndex& rNode ); + + sal_Bool CopyTblInTbl( const SwTable& rSrcTable, SwTable& rDestTbl, + const SwNodeIndex& rBoxIdx ); + sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, + const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False, + sal_Bool bCorrPos = sal_False ); + + sal_Bool UnProtectCells( const String& rTblName ); + sal_Bool UnProtectCells( const SwSelBoxes& rBoxes ); + sal_Bool UnProtectTbls( const SwPaM& rPam ); + sal_Bool HasTblAnyProtection( const SwPosition* pPos, + const String* pTblName = 0, + sal_Bool* pFullTblProtection = 0 ); + + // Tabelle an der Position in der GrundLine aufsplitten, sprich eine + // neue Tabelle erzeugen. + sal_Bool SplitTable( const SwPosition& rPos, sal_uInt16 eMode = 0, + sal_Bool bCalcNewSize = sal_False ); + // und die Umkehrung davon. rPos muss in der Tabelle stehen, die bestehen + // bleibt. Das Flag besagt ob die aktuelle mit der davor oder dahinter + // stehenden vereint wird. + sal_Bool MergeTable( const SwPosition& rPos, sal_Bool bWithPrev = sal_True, + sal_uInt16 nMode = 0 ); + + // Raeume die Umrandung innerhalb der Tabelle ein wenig auf (doppelte + // an einer Kante erkennen und beseitigen) + sal_Bool GCTableBorder( const SwPosition& rPos ); + // Charts der angegebenen Tabelle zum Update bewegen + void UpdateCharts( const String &rName ) const; + // update all charts, for that exists any table + void UpdateAllCharts() { DoUpdateAllCharts( 0 ); } + // Tabelle wird umbenannt und aktualisiert die Charts + void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName ); + + // returne zum Namen die im Doc gesetzte Referenz + const SwFmtRefMark* GetRefMark( const String& rName ) const; + // returne die RefMark per Index - fuer Uno + const SwFmtRefMark* GetRefMark( sal_uInt16 nIndex ) const; + // returne die Namen aller im Doc gesetzten Referenzen. + // Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark + // gesetzt ist + sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const; + + //Einfuegen einer Beschriftung - falls ein FlyFormat erzeugt wird, so + // returne dieses. + SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, + const sal_Bool bBefore, const sal_uInt16 nId, const sal_uInt32 nIdx, + const sal_Bool bCpyBrd = sal_True ); + SwFlyFrmFmt* InsertDrawLabel( const String &rTxt, const sal_uInt16 nId, + SdrObject& rObj ); + + // erfrage den Attribut Pool + const SwAttrPool& GetAttrPool() const { return aAttrPool; } + SwAttrPool& GetAttrPool() { return aAttrPool; } + + // suche ueber das Layout eine EditShell und ggfs. eine ViewShell + SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const; + + // OLE 2.0-Benachrichtung + inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;} + inline const Link& GetOle2Link() const {return aOle2Link;} + + // SS fuer Bereiche + SwSection* Insert( const SwPaM& rRange, const SwSection& rNew, + const SfxItemSet* pAttr = 0, sal_Bool bUpdate = sal_True ); + sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange, + const SwNode** ppSttNd = 0 ) const; + SwSection* GetCurrSection( const SwPosition& rPos ) const; + SwSectionFmts& GetSections() { return *pSectionFmtTbl; } + const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; } + SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom ); + void DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes = sal_False ); + void ChgSection( sal_uInt16 nSect, const SwSection&, const SfxItemSet* = 0 ); + String GetUniqueSectionName( const String* pChkStr = 0 ) const; + + // Passwort fuer geschuetzte Bereiche erfragen/setzen + void ChgSectionPasswd( const String& sNew ); + const String& GetSectionPasswd() const { return sSectionPasswd; } + + // Pointer auf die SfxDocShell vom Doc, kann 0 sein !!! + SwDocShell* GetDocShell() { return pDocShell; } + const SwDocShell* GetDocShell() const { return pDocShell; } + void SetDocShell( SwDocShell* pDSh ); + + // falls beim Kopieren von OLE-Nodes eine DocShell angelegt werden muss, + // dann MUSS der Ref-Pointer besetzt sein!!!! + SvEmbeddedObjectRef* GetRefForDocShell() { return pDocShRef; } + void SetRefForDocShell( SvEmbeddedObjectRef* p ) { pDocShRef = p; } + + // fuer die TextBausteine - diese habe nur ein SvPersist zur + // Verfuegung + SvPersist* GetPersist() const; + void SetPersist( SvPersist* ); + + // Pointer auf den Storage des SfxDocShells, kann 0 sein !!! + SvStorage* GetDocStorage(); + + // abfrage/setze Flag, ob das Dokument im asynchronen Laden ist + sal_Bool IsInLoadAsynchron() const { return bInLoadAsynchron; } + void SetInLoadAsynchron( sal_Bool bFlag ) { bInLoadAsynchron = bFlag; } + + // SS fuers Linken von Dokumentteilen + sal_Bool GetData( const String& rItem, SvData& rData ) const; + sal_Bool ChangeData( const String& rItem, const SvData& rData ); + SvPseudoObject* CreateHotLink( const String& rItem ); + // erzeuge um das zu Servende Object eine Selektion + sal_Bool SelectServerObj( const String& rStr, SwPaM*& rpPam, + SwNodeRange*& rpRange ) const; + // erfage alle zu servendenen Objecte + sal_uInt16 GetServerObjects( SvStrings& rStrArr ) const; + + // fuer Drag&Move: ( z.B. RefMarks "verschieben" erlauben ) + sal_Bool IsCopyIsMove() const { return bCopyIsMove; } + void SetCopyIsMove( sal_Bool bFlag ) { bCopyIsMove = bFlag; } + + // fuers Draw-Undo: Aktionen auf Flys wollen wir selbst behandeln + sal_Bool IsNoDrawUndoObj() const { return bNoDrawUndoObj; } + void SetNoDrawUndoObj( sal_Bool bFlag ) { bNoDrawUndoObj = bFlag; } + SwDrawContact* GroupSelection( SdrView& ); + void UnGroupSelection( SdrView& ); + sal_Bool DeleteSelection( SwDrawView& ); + + // Invalidiert OnlineSpell-WrongListen + void SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong ); + void InvalidateAutoCompleteFlag(); + + SdrModel* _MakeDrawModel(); + inline SdrModel* MakeDrawModel() + { return GetDrawModel() ? GetDrawModel() : _MakeDrawModel(); } + void SetCalcFieldValueHdl(Outliner* pOutliner); + + // erfrage ob die ::com::sun::star::util::URL besucht war. Uebers Doc, falls nur ein ::com::sun::star::text::Bookmark + // angegeben ist. Dann muss der Doc. Name davor gesetzt werden! + sal_Bool IsVisitedURL( const String& rURL ) const; + + // speicher die akt. Werte fuer die automatische Aufnahme von Ausnahmen + // in die Autokorrektur + void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew ); + SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return pACEWord; } + + const SwFmtINetFmt* FindINetAttr( const String& rName ) const; + + // rufe ins dunkle Basic, mit evt. Return String + sal_Bool ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 ); + // rufe ins dunkle Basic/JavaScript + sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, + sal_Bool bChkPtr = sal_False, SbxArray* pArgs = 0, + const Link* pCallBack = 0 ); + + // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von + // Numerierungen), optional kann man "um" den Offset stufen oder "auf" + // die Position gestuft werden (bModulus = sal_True) + void MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight = sal_True, + sal_Bool bModulus = sal_True ); + + // Numberformatter erfragen + inline SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ); + inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const; + + // loesche den nicht sichtbaren ::com::sun::star::ucb::Content aus dem Document, wie z.B.: + // versteckte Bereiche, versteckte Absaetze + sal_Bool RemoveInvisibleContent(); + // embedded alle lokalen Links (Bereiche/Grafiken) + sal_Bool EmbedAllLinks(); + // erzeuge Anhand der vorgebenen Collection Teildokumente + // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene + sal_Bool GenerateGlobalDoc( const String& rPath, + const SwTxtFmtColl* pSplitColl = 0 ); + sal_Bool GenerateHTMLDoc( const String& rPath, + const SwTxtFmtColl* pSplitColl = 0 ); + + + // alles fuers Redlining + SwRedlineMode GetRedlineMode() const { return eRedlineMode; } + sal_Bool IsRedlineOn() const { return ::IsRedlineOn( eRedlineMode ); } + sal_Bool IsIgnoreRedline() const { return REDLINE_IGNORE & eRedlineMode; } + void SetRedlineMode_intern( sal_uInt16 eMode ) { eRedlineMode = (SwRedlineMode)eMode; } + void SetRedlineMode( sal_uInt16 eMode ); + + const SwRedlineTbl& GetRedlineTbl() const { return *pRedlineTbl; } + sal_Bool AppendRedline( SwRedline* pPtr, sal_Bool bCallDelete = sal_True ); + sal_Bool SplitRedline( const SwPaM& rPam ); + sal_Bool DeleteRedline( const SwPaM& rPam, sal_Bool bSaveInUndo = sal_True, + sal_uInt16 nDelType = USHRT_MAX ); + sal_Bool DeleteRedline( const SwStartNode& rSection, sal_Bool bSaveInUndo = sal_True, + sal_uInt16 nDelType = USHRT_MAX ); + void DeleteRedline( sal_uInt16 nPos ); + sal_uInt16 GetRedlinePos( const SwNode& rNd, sal_uInt16 nType = USHRT_MAX ) const; + void CompressRedlines(); + const SwRedline* GetRedline( const SwPosition& rPos, + sal_uInt16* pFndPos = 0 ) const; + + sal_Bool IsRedlineMove() const { return bIsRedlineMove; } + void SetRedlineMove( sal_Bool bFlag ) { bIsRedlineMove = bFlag; } + + sal_Bool AcceptRedline( sal_uInt16 nPos, sal_Bool bCallDelete = sal_True ); + sal_Bool AcceptRedline( const SwPaM& rPam, sal_Bool bCallDelete = sal_True ); + sal_Bool RejectRedline( sal_uInt16 nPos, sal_Bool bCallDelete = sal_True ); + sal_Bool RejectRedline( const SwPaM& rPam, sal_Bool bCallDelete = sal_True ); + const SwRedline* SelNextRedline( SwPaM& rPam ) const; + const SwRedline* SelPrevRedline( SwPaM& rPam ) const; + + // alle Redline invalidieren, die Darstellung hat sich geaendert + void UpdateRedlineAttr(); + // legt gegebenenfalls einen neuen Author an + sal_uInt16 GetRedlineAuthor(); + // fuer die Reader usw. - neuen Author in die Tabelle eintragen + sal_uInt16 InsertRedlineAuthor( const String& ); + // Kommentar am Redline an der Position setzen + sal_Bool SetRedlineComment( const SwPaM& rPam, const String& rS ); + + // vergleiche zwei Dokument miteinander + long CompareDoc( const SwDoc& rDoc ); + // merge zweier Dokumente + long MergeDoc( const SwDoc& rDoc ); + // setze Kommentar-Text fuers Redline, das dann per AppendRedline + // hereinkommt. Wird vom Autoformat benutzt. 0-Pointer setzt den Modus + // wieder zurueck. Die SequenceNummer ist fuers UI-seitige zusammen- + // fassen von Redlines. + void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 ); + + sal_Bool IsAutoFmtRedline() const { return bIsAutoFmtRedline; } + void SetAutoFmtRedline( sal_Bool bFlag ) { bIsAutoFmtRedline = bFlag; } + + // fuer AutoFormat: mit Undo/Redlining - Behandlung + void SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId, + const SfxItemSet* pSet = 0 ); + void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxPoolItem& ); + + // !!!NUR fuer die SW-Textblocks!! beachtet kein LAYOUT!!! + void ClearDoc(); // loescht den gesamten Inhalt. + + // erfrage / setze die Daten fuer die PagePreView + const SwPagePreViewPrtData* GetPreViewPrtData() const { return pPgPViewPrtData; } + // wenn der Pointer == 0 ist, dann wird im Doc der Pointer zerstoert, + // ansonsten wird das Object kopiert. + // Der Pointer geht NICHT in den Besitz des Doc's!! + void SetPreViewPrtData( const SwPagePreViewPrtData* pData ); + + // update all modified OLE-Objects. The modification is called over the + // StarOne - Interface --> Bug 67026 + void SetOLEObjModified() + { if( GetRootFrm() ) aOLEModifiedTimer.Start(); } + + // -------------------- Uno - Schnittstellen --------------------------- + const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; } + SwUnoCrsr* CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr = sal_False ); + // -------------------- Uno - Schnittstellen --------------------------- + + // -------------------- FeShell - Schnittstellen ----------------------- + // !!!!! diese gehen immer davon aus, das ein Layout existiert !!!! + sal_Bool ChgAnchor( const SdrMarkList &rMrkList, int eAnchorId, + sal_Bool bSameOnly, sal_Bool bPosCorr ); + + void SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew ); + void GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const; + sal_Bool BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly = sal_True ); + void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew ); + sal_Bool GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const; + void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ); + void SetTabLineStyle( const SwCursor& rCursor, + const Color* pColor, sal_Bool bSetLine, + const SvxBorderLine* pBorderLine ); + void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const; + void SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ); + sal_Bool GetBoxBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const; + void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign ); + sal_uInt16 GetBoxAlign( const SwCursor& rCursor ) const; + void AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance = sal_False ); + + int Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest ); + int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest ); + void Unchain( SwFrmFmt &rFmt ); + + // fuers Copy/Move aus der FrmShell + SdrObject* CloneSdrObj( const SdrObject&, sal_Bool bMoveWithinDoc = sal_False, + sal_Bool bInsInPage = sal_True ); + + // + // -------------------- FeShell - Schnittstellen Ende ------------------ + + + // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe + // von japanischen/chinesischen Zeichen) + SwExtTextInput* CreateExtTextInput( const SwPaM& rPam ); + void DeleteExtTextInput( SwExtTextInput* pDel ); + SwExtTextInput* GetExtTextInput( const SwNode& rNd, + xub_StrLen nCntntPos = STRING_NOTFOUND) const; + + // Schnistelle fuer den Zugriff auf die AutoComplete-Liste + static SwAutoCompleteWord& GetAutoCompleteWords() { return *pACmpltWords; } + + sal_Bool ContainsMSVBasic() const { return bContains_MSVBasic; } + void SetContainsMSVBasic( sal_Bool bFlag ) { bContains_MSVBasic = bFlag; } + + // ------------------- Zugriff auf Dummy-Member -------------------- + + sal_Bool IsParaSpaceMax() const { return n8Dummy1 & DUMMY_PARASPACEMAX; } + sal_Bool IsParaSpaceMaxAtPages() const { return n8Dummy1 & DUMMY_PARASPACEMAX_AT_PAGES; } + void SetParaSpaceMax( sal_Bool bNew, sal_Bool bAtPages ) + { + if( bNew ) n8Dummy1 |= DUMMY_PARASPACEMAX; else n8Dummy1 &= ~DUMMY_PARASPACEMAX; + if( bAtPages ) n8Dummy1 |= DUMMY_PARASPACEMAX_AT_PAGES; else n8Dummy1 &= ~DUMMY_PARASPACEMAX_AT_PAGES; + } + + void SetULongDummy1( sal_uInt32 n ) { n32Dummy1 = n; } + void SetULongDummy2( sal_uInt32 n ) { n32Dummy2 = n; } + void SetByteDummy1( sal_Int8 n ) { n8Dummy1 = n; } + void SetByteDummy2( sal_Int8 n ) { n8Dummy2 = n; } + void SetStringDummy1( const String& r ) { sDummy1 = r; } + void SetStringDummy2( const String& r ) { sDummy2 = r; } + sal_uInt32 GetULongDummy1() const { return n32Dummy1; } + sal_uInt32 GetULongDummy2() const { return n32Dummy2; } + sal_Int8 GetByteDummy1() const { return n8Dummy1; } + sal_Int8 GetByteDummy2() const { return n8Dummy2; } + const String& GetStringDummy1() const { return sDummy1; } + const String& GetStringDummy2() const { return sDummy2; } + + // call back for API wrapper + SwModify* GetUnoCallBack() const; +}; + + +// Diese Methode wird im Dtor vom SwDoc gerufen und loescht den Cache +// der Konturobjekte +void ClrContourCache(); + + +//------------------ inline impl. --------------------------------- + +inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const +{ + return ((SwDoc*)this)->IsIdxInTbl( rIdx ); +} + +inline SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) +{ + if( bCreate && !pNumberFormatter ) + _CreateNumberFormatter(); + return pNumberFormatter; +} + +inline const SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) const +{ + return ((SwDoc*)this)->GetNumberFormatter( bCreate ); +} + + +// ist das NodesArray das normale vom Doc? (nicht das UndoNds, .. ) +// Implementierung steht hier, weil man dazu Doc kennen muss! +inline sal_Bool SwNodes::IsDocNodes() const +{ + return this == &pMyDoc->GetNodes(); +} + + + +#endif //_DOC_HXX diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx new file mode 100644 index 000000000000..d904c90b1cdc --- /dev/null +++ b/sw/inc/docary.hxx @@ -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 diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx new file mode 100644 index 000000000000..d73888366b63 --- /dev/null +++ b/sw/inc/docfac.hxx @@ -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 + diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx new file mode 100644 index 000000000000..9c6af7bd89b3 --- /dev/null +++ b/sw/inc/docsh.hxx @@ -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 diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx new file mode 100644 index 000000000000..4581e70d9aea --- /dev/null +++ b/sw/inc/docstat.hxx @@ -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 diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx new file mode 100644 index 000000000000..709dda4bcc7b --- /dev/null +++ b/sw/inc/docstyle.hxx @@ -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 diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx new file mode 100644 index 000000000000..516ebb23a923 --- /dev/null +++ b/sw/inc/docufld.hxx @@ -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 diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx new file mode 100644 index 000000000000..e865bacf36dd --- /dev/null +++ b/sw/inc/dpage.hxx @@ -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 + + + diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx new file mode 100644 index 000000000000..9b1047bd22e0 --- /dev/null +++ b/sw/inc/edglbldc.hxx @@ -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 diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx new file mode 100644 index 000000000000..2b463ad00453 --- /dev/null +++ b/sw/inc/edimp.hxx @@ -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 diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx new file mode 100644 index 000000000000..652aa39797b3 --- /dev/null +++ b/sw/inc/editsh.hxx @@ -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 diff --git a/sw/inc/errhdl.hxx b/sw/inc/errhdl.hxx new file mode 100644 index 000000000000..23fdf06dfaba --- /dev/null +++ b/sw/inc/errhdl.hxx @@ -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 diff --git a/sw/inc/error.h b/sw/inc/error.h new file mode 100644 index 000000000000..fd093a5ed7b7 --- /dev/null +++ b/sw/inc/error.h @@ -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 diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx new file mode 100644 index 000000000000..274553e011a4 --- /dev/null +++ b/sw/inc/expfld.hxx @@ -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 diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx new file mode 100644 index 000000000000..4f79b7a64e5c --- /dev/null +++ b/sw/inc/extinput.hxx @@ -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 + diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx new file mode 100644 index 000000000000..91b654861472 --- /dev/null +++ b/sw/inc/fchrfmt.hxx @@ -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 + diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx new file mode 100644 index 000000000000..7117003c5e78 --- /dev/null +++ b/sw/inc/fesh.hxx @@ -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 fr 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 diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx new file mode 100644 index 000000000000..a60f82c18798 --- /dev/null +++ b/sw/inc/fldbas.hxx @@ -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, // Whrungsformat 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 diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx new file mode 100644 index 000000000000..660e8ef3da45 --- /dev/null +++ b/sw/inc/flddat.hxx @@ -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 diff --git a/sw/inc/fldinit.hxx b/sw/inc/fldinit.hxx new file mode 100644 index 000000000000..b2003c663a55 --- /dev/null +++ b/sw/inc/fldinit.hxx @@ -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 diff --git a/sw/inc/fldupde.hxx b/sw/inc/fldupde.hxx new file mode 100644 index 000000000000..c491f8f1084c --- /dev/null +++ b/sw/inc/fldupde.hxx @@ -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 diff --git a/sw/inc/flyenum.hxx b/sw/inc/flyenum.hxx new file mode 100644 index 000000000000..85056f0bef4a --- /dev/null +++ b/sw/inc/flyenum.hxx @@ -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 + + diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx new file mode 100644 index 000000000000..75d8ed745a60 --- /dev/null +++ b/sw/inc/flypos.hxx @@ -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 diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx new file mode 100644 index 000000000000..d52d41dacb28 --- /dev/null +++ b/sw/inc/fmtanchr.hxx @@ -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 + diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx new file mode 100644 index 000000000000..7d938d60458c --- /dev/null +++ b/sw/inc/fmtclbl.hxx @@ -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 + diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx new file mode 100644 index 000000000000..1a3f7194048c --- /dev/null +++ b/sw/inc/fmtclds.hxx @@ -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 + diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx new file mode 100644 index 000000000000..df18bed1a5a6 --- /dev/null +++ b/sw/inc/fmtcnct.hxx @@ -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 + diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx new file mode 100644 index 000000000000..45b00d904c7a --- /dev/null +++ b/sw/inc/fmtcntnt.hxx @@ -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 + diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx new file mode 100644 index 000000000000..57e67b9dbf7a --- /dev/null +++ b/sw/inc/fmtcol.hxx @@ -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 + diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx new file mode 100644 index 000000000000..1ffdeeb96e82 --- /dev/null +++ b/sw/inc/fmteiro.hxx @@ -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 + diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx new file mode 100644 index 000000000000..3a494ace8a1a --- /dev/null +++ b/sw/inc/fmtflcnt.hxx @@ -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 + diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx new file mode 100644 index 000000000000..ecd0932d92c4 --- /dev/null +++ b/sw/inc/fmtfld.hxx @@ -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 + diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx new file mode 100644 index 000000000000..98dde73738ae --- /dev/null +++ b/sw/inc/fmtfordr.hxx @@ -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 + diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx new file mode 100644 index 000000000000..d52461d34d0e --- /dev/null +++ b/sw/inc/fmtfsize.hxx @@ -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 + diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx new file mode 100644 index 000000000000..45d843289664 --- /dev/null +++ b/sw/inc/fmtftn.hxx @@ -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 + diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx new file mode 100644 index 000000000000..4547809ab7e7 --- /dev/null +++ b/sw/inc/fmtftntx.hxx @@ -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 + diff --git a/sw/inc/fmthbsh.hxx b/sw/inc/fmthbsh.hxx new file mode 100644 index 000000000000..2a9e5f0a5294 --- /dev/null +++ b/sw/inc/fmthbsh.hxx @@ -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 + diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx new file mode 100644 index 000000000000..9cbd226e222e --- /dev/null +++ b/sw/inc/fmthdft.hxx @@ -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 + diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx new file mode 100644 index 000000000000..752866cff4d5 --- /dev/null +++ b/sw/inc/fmtinfmt.hxx @@ -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 + diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx new file mode 100644 index 000000000000..cb7ec347a351 --- /dev/null +++ b/sw/inc/fmtline.hxx @@ -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 + diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx new file mode 100644 index 000000000000..22228c5d0454 --- /dev/null +++ b/sw/inc/fmtlsplt.hxx @@ -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 + diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx new file mode 100644 index 000000000000..64b424528295 --- /dev/null +++ b/sw/inc/fmtornt.hxx @@ -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 + diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx new file mode 100644 index 000000000000..d8353ea33e87 --- /dev/null +++ b/sw/inc/fmtpdsc.hxx @@ -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 + diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx new file mode 100644 index 000000000000..4886aabdd59a --- /dev/null +++ b/sw/inc/fmtrfmrk.hxx @@ -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 + diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx new file mode 100644 index 000000000000..2e6318821cdf --- /dev/null +++ b/sw/inc/fmtsrnd.hxx @@ -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 + diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx new file mode 100644 index 000000000000..07cf3148ce81 --- /dev/null +++ b/sw/inc/fmturl.hxx @@ -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 + diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx new file mode 100644 index 000000000000..b31111c3ce1e --- /dev/null +++ b/sw/inc/format.hxx @@ -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 diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx new file mode 100644 index 000000000000..f6b84500ea14 --- /dev/null +++ b/sw/inc/frmatr.hxx @@ -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 diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx new file mode 100644 index 000000000000..ed22cfea3b22 --- /dev/null +++ b/sw/inc/frmfmt.hxx @@ -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 + diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx new file mode 100644 index 000000000000..bd75a59f037c --- /dev/null +++ b/sw/inc/ftnidx.hxx @@ -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 + diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx new file mode 100644 index 000000000000..d82677346cac --- /dev/null +++ b/sw/inc/ftninfo.hxx @@ -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 diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc new file mode 100644 index 000000000000..3d54169f382d --- /dev/null +++ b/sw/inc/globals.hrc @@ -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 diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx new file mode 100644 index 000000000000..87218b6e771b --- /dev/null +++ b/sw/inc/globdoc.hxx @@ -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 + diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx new file mode 100644 index 000000000000..0dd99346626c --- /dev/null +++ b/sw/inc/grfatr.hxx @@ -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 diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h new file mode 100644 index 000000000000..51d80db859f7 --- /dev/null +++ b/sw/inc/helpid.h @@ -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 ) diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx new file mode 100644 index 000000000000..6d77b7a021a5 --- /dev/null +++ b/sw/inc/hintids.hxx @@ -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 diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx new file mode 100644 index 000000000000..458017fa9675 --- /dev/null +++ b/sw/inc/hints.hxx @@ -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 diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx new file mode 100644 index 000000000000..656e11cf2f4c --- /dev/null +++ b/sw/inc/htmltbl.hxx @@ -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 diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx new file mode 100644 index 000000000000..ec1cff8f1b66 --- /dev/null +++ b/sw/inc/index.hxx @@ -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 diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx new file mode 100644 index 000000000000..aa6db674a437 --- /dev/null +++ b/sw/inc/inetfld.hxx @@ -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 diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx new file mode 100644 index 000000000000..00a9c814d4f9 --- /dev/null +++ b/sw/inc/init.hxx @@ -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 diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx new file mode 100644 index 000000000000..570a43efd28c --- /dev/null +++ b/sw/inc/io.hxx @@ -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 + diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx new file mode 100644 index 000000000000..92406bda2647 --- /dev/null +++ b/sw/inc/itabenum.hxx @@ -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 + diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx new file mode 100644 index 000000000000..4622bec63796 --- /dev/null +++ b/sw/inc/lineinfo.hxx @@ -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 + diff --git a/sw/inc/linkenum.hxx b/sw/inc/linkenum.hxx new file mode 100644 index 000000000000..ea15f28748cd --- /dev/null +++ b/sw/inc/linkenum.hxx @@ -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 + diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx new file mode 100644 index 000000000000..b9e3ee9c4b25 --- /dev/null +++ b/sw/inc/mdiexp.hxx @@ -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 diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx new file mode 100644 index 000000000000..c6958373c493 --- /dev/null +++ b/sw/inc/ndarr.hxx @@ -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 diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx new file mode 100644 index 000000000000..36bea7f6326c --- /dev/null +++ b/sw/inc/ndgrf.hxx @@ -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 diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx new file mode 100644 index 000000000000..abd81a89d4e8 --- /dev/null +++ b/sw/inc/ndhints.hxx @@ -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 diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx new file mode 100644 index 000000000000..d4eaf6a50937 --- /dev/null +++ b/sw/inc/ndindex.hxx @@ -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 diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx new file mode 100644 index 000000000000..523dd3915436 --- /dev/null +++ b/sw/inc/ndnotxt.hxx @@ -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 diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx new file mode 100644 index 000000000000..7a00e889080e --- /dev/null +++ b/sw/inc/ndole.hxx @@ -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 + diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx new file mode 100644 index 000000000000..19794a05e5d2 --- /dev/null +++ b/sw/inc/ndtxt.hxx @@ -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 diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx new file mode 100644 index 000000000000..5133cad17caf --- /dev/null +++ b/sw/inc/ndtyp.hxx @@ -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 diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx new file mode 100644 index 000000000000..ac0ecdf4c7d4 --- /dev/null +++ b/sw/inc/newhdl.hxx @@ -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 diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx new file mode 100644 index 000000000000..a9eb6581a8c7 --- /dev/null +++ b/sw/inc/node.hxx @@ -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 diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx new file mode 100644 index 000000000000..cd0ba88d165c --- /dev/null +++ b/sw/inc/numrule.hxx @@ -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 diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx new file mode 100644 index 000000000000..4684ceb4ec79 --- /dev/null +++ b/sw/inc/pagedesc.hxx @@ -0,0 +1,348 @@ +/************************************************************************* + * + * $RCSfile: pagedesc.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 _PAGEDESC_HXX +#define _PAGEDESC_HXX + +#ifndef _FRACT_HXX +#include <tools/fract.hxx> +#endif + +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif +#ifndef _SWTYPES_HXX +#include <swtypes.hxx> //fuer SwTwips +#endif +#ifndef _FRMFMT_HXX +#include <frmfmt.hxx> +#endif +#ifndef _NUMRULE_HXX +#include <numrule.hxx> +#endif + +class SfxPoolItem; +class SwTxtFmtColl; +class SwNode; + +//Adjustierung der Trennlinie. +enum SwFtnAdj +{ + FTNADJ_LEFT, + FTNADJ_CENTER, + FTNADJ_RIGHT +}; + +//Fussnoteninformationen +class SwPageFtnInfo +{ + SwTwips nMaxHeight; //Maximalraum auf der Seite. +// Pen aPen; //Pen fuer Trennstrich. + ULONG nLineWidth; //width of separator line + Color aLineColor; //color of the separator line + Fraction aWidth; //Prozentuale Breite des Trennstriches. + SwFtnAdj eAdj; //Ausrichtung des Trennstriches. + SwTwips nTopDist; //Abstand zwischen Body und Trennstrich. + SwTwips nBottomDist; //Abstand zwischen Trennstrich und 1. Fussnote. +public: + SwTwips GetHeight() const { return nMaxHeight; } + ULONG GetLineWidth() const { return nLineWidth; } + const Color& GetLineColor() const { return aLineColor;} +// const Pen& GetPen() const { return aPen; } + const Fraction& GetWidth() const { return aWidth; } + SwFtnAdj GetAdj() const { return eAdj; } + SwTwips GetTopDist()const { return nTopDist; } + SwTwips GetBottomDist() const { return nBottomDist; } + + void SetHeight( SwTwips nNew ) { nMaxHeight = nNew; } +// void SetPen ( const Pen& rNew ) { aPen = rNew; } + void SetLineWidth(ULONG nSet ) { nLineWidth = nSet; } + void SetLineColor(const Color& rCol ) { aLineColor = rCol;} + void SetWidth( const Fraction &rNew){ aWidth = rNew; } + void SetAdj ( SwFtnAdj eNew ) { eAdj = eNew; } + void SetTopDist ( SwTwips nNew ) { nTopDist = nNew; } + void SetBottomDist( SwTwips nNew ) { nBottomDist = nNew; } + + SwPageFtnInfo(); + SwPageFtnInfo( const SwPageFtnInfo& ); + SwPageFtnInfo& operator=( const SwPageFtnInfo& ); + + BOOL operator ==( const SwPageFtnInfo& ) const; +}; + +/* + * Verwendung des UseOnPage (eUse) und der FrmFmt'e + * + * RIGHT - aMaster nur fuer rechte Seiten, linke Seiten immer leer. + * LEFT - aLeft fuer linke Seiten, rechte Seiten immer leer. + * aLeft ist eine Kopie des Master. + * ALL - aMaster fuer rechte Seiten, aLeft fuer Linke Seiten. + * aLeft ist eine Kopie des Master. + * MIRROR - aMaster fuer rechte Seiten, aLeft fuer linke Seiten. + * aLeft ist eine Kopie des Master, Raender sind gespiegelt. + * + * UI dreht auschliesslich am Master! aLeft wird beim Chg am Dokument + * enstprechend dem eUse eingestellt. + * + * Damit es die Filter etwas einfacher haben werden weitere Werte im + * eUse untergebracht: + * + * HEADERSHARE - Headerinhalt auf beiden Seiten gleich + * FOOTERSHARE - Footerinhalt auf beiden Seiten gleich + * + * Die Werte werden bei den entsprechenden Get-/Set-Methden ausmaskiert. + * Zugriff auf das volle eUse inclusive der Header-Footer information + * per ReadUseOn(), WriteUseOn() (fuer Filter und CopyCTor)! + * + * Die FrmFormate fuer Header/Footer werden anhand der Attribute fuer + * Header/Footer vom UI am Master eingestellt (Hoehe, Raender, Hintergrund...); + * Header/Footer fuer die Linke Seite werden entsprechen kopiert bzw. + * gespielt (Chg am Dokument). + * Das jew. Attribut fuer den Inhalt wird automatisch beim Chg am + * Dokument versorgt (entsprechen den SHARE-informationen werden Inhalte + * erzeugt bzw. entfernt). + * + */ + +enum UseOnPage +{ PD_NONE = 0x0000, //for internal use only. + PD_LEFT = 0x0001, + PD_RIGHT = 0x0002, + PD_ALL = 0x0003, + PD_MIRROR = 0x0007, + PD_HEADERSHARE = 0x0040, + PD_FOOTERSHARE = 0x0080, + PD_NOHEADERSHARE = 0x00BF, //for internal use only + PD_NOFOOTERSHARE = 0x007F //for internal use only +}; + +class SwPageDesc : public SwModify +{ + friend class SwDoc; + + //nicht (mehr) implementiert. + SwPageDesc& operator=( const SwPageDesc& ); + + String aDescName; + SwNumType aNumType; + SwFrmFmt aMaster; + SwFrmFmt aLeft; + SwDepend aDepend; // wg. Registerhaltigkeit + SwPageDesc *pFollow; + USHORT nRegHeight; // Zeilenabstand und Fontascent der Vorlage + USHORT nRegAscent; // fuer die Registerhaltigkeit + UseOnPage eUse; + BOOL bLandscape; + + //Fussnoteninformationen + SwPageFtnInfo aFtnInfo; + + //Wird zum Spiegeln vom Chg (Doc) gerufen. + //Kein Abgleich an anderer Stelle. + void Mirror(); + + SwPageDesc(const String&, SwFrmFmt*, SwDoc *pDc ); +public: + const String &GetName() const { return aDescName; } + void SetName( const String& rNewName ) { aDescName = rNewName; } + + BOOL GetLandscape() const { return bLandscape; } + void SetLandscape( BOOL bNew ) { bLandscape = bNew; } + + const SwNumType &GetNumType() const { return aNumType; } + void SetNumType( const SwNumType& rNew ) { aNumType = rNew; } + + const SwPageFtnInfo &GetFtnInfo() const { return aFtnInfo; } + SwPageFtnInfo &GetFtnInfo() { return aFtnInfo; } + void SetFtnInfo( const SwPageFtnInfo &rNew ) { aFtnInfo = rNew; } + + inline BOOL IsHeaderShared() const; + inline BOOL IsFooterShared() const; + inline void ChgHeaderShare( BOOL bNew ); + inline void ChgFooterShare( BOOL bNew ); + + inline void SetUseOn( UseOnPage eNew ); + inline UseOnPage GetUseOn() const; + + void WriteUseOn( UseOnPage eNew ) { eUse = eNew; } + UseOnPage ReadUseOn () const { return eUse; } + + SwFrmFmt &GetMaster() { return aMaster; } + SwFrmFmt &GetLeft() { return aLeft; } + const SwFrmFmt &GetMaster() const { return aMaster; } + const SwFrmFmt &GetLeft() const { return aLeft; } + + //Mit den folgenden Methoden besorgt sich das Layout ein Format + //um eine Seite erzeugen zu koennen + inline SwFrmFmt *GetRightFmt(); + inline const SwFrmFmt *GetRightFmt() const; + inline SwFrmFmt *GetLeftFmt(); + inline const SwFrmFmt *GetLeftFmt() const; + + USHORT GetRegHeight() const { return nRegHeight; } + USHORT GetRegAscent() const { return nRegAscent; } + void SetRegHeight( USHORT nNew ){ nRegHeight = nNew; } + void SetRegAscent( USHORT nNew ){ nRegAscent = nNew; } + + inline void SetFollow( const SwPageDesc* pNew ); + const SwPageDesc* GetFollow() const { return pFollow; } + SwPageDesc* GetFollow() { return pFollow; } + + void SetRegisterFmtColl( const SwTxtFmtColl* rFmt ); + const SwTxtFmtColl* GetRegisterFmtColl() const; + virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue ); + void RegisterChange(); + + // erfragen und setzen der PoolFormat-Id + USHORT GetPoolFmtId() const { return aMaster.GetPoolFmtId(); } + void SetPoolFmtId( USHORT nId ) { aMaster.SetPoolFmtId( nId ); } + USHORT GetPoolHelpId() const { return aMaster.GetPoolHelpId(); } + void SetPoolHelpId( USHORT nId ) { aMaster.SetPoolHelpId( nId ); } + BYTE GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); } + void SetPoolHlpFileId( BYTE nId ) { aMaster.SetPoolHlpFileId( nId ); } + // erfrage die Attribut-Beschreibung, returnt den reingereichten String + void GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const; + + // erfrage vom Client Informationen + virtual BOOL GetInfo( SfxPoolItem& ) const; + + const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd, + BOOL bCheckForThisPgDc = TRUE ) const; + BOOL IsFollowNextPageOfNode( const SwNode& rNd ) const; + + SwPageDesc( const SwPageDesc& ); + ~SwPageDesc(); +}; + +inline void SwPageDesc::SetFollow( const SwPageDesc* pNew ) +{ + pFollow = pNew ? (SwPageDesc*)pNew : this; +} + +inline BOOL SwPageDesc::IsHeaderShared() const +{ + return eUse & PD_HEADERSHARE ? TRUE : FALSE; +} +inline BOOL SwPageDesc::IsFooterShared() const +{ + return eUse & PD_FOOTERSHARE ? TRUE : FALSE; +} +inline void SwPageDesc::ChgHeaderShare( BOOL bNew ) +{ + if ( bNew ) + eUse = (UseOnPage) (eUse | PD_HEADERSHARE); + // (USHORT&)eUse |= (USHORT)PD_HEADERSHARE; + else + eUse = (UseOnPage) (eUse & PD_NOHEADERSHARE); + // (USHORT&)eUse &= (USHORT)PD_NOHEADERSHARE; +} +inline void SwPageDesc::ChgFooterShare( BOOL bNew ) +{ + if ( bNew ) + eUse = (UseOnPage) (eUse | PD_FOOTERSHARE); + // (USHORT&)eUse |= (USHORT)PD_FOOTERSHARE; + else + eUse = (UseOnPage) (eUse & PD_NOFOOTERSHARE); + // (USHORT&)eUse &= (USHORT)PD_NOFOOTERSHARE; +} +inline void SwPageDesc::SetUseOn( UseOnPage eNew ) +{ + UseOnPage eTmp = PD_NONE; + if ( eUse & PD_HEADERSHARE ) + eTmp = PD_HEADERSHARE; + // (USHORT&)eTmp |= (USHORT)PD_HEADERSHARE; + if ( eUse & PD_FOOTERSHARE ) + eTmp = (UseOnPage) (eTmp | PD_FOOTERSHARE); + // (USHORT&)eTmp |= (USHORT)PD_FOOTERSHARE; + eUse = (UseOnPage) (eTmp | eNew); + // (USHORT&)eUse = eTmp | eNew; +} +inline UseOnPage SwPageDesc::GetUseOn() const +{ + UseOnPage eRet = eUse; + eRet = (UseOnPage) (eRet & PD_NOHEADERSHARE); + // (USHORT&)eRet &= (USHORT)PD_NOHEADERSHARE; + eRet = (UseOnPage) (eRet & PD_NOFOOTERSHARE); + // (USHORT&)eRet &= (USHORT)PD_NOFOOTERSHARE; + return eRet; +} + +inline SwFrmFmt *SwPageDesc::GetRightFmt() +{ + return PD_RIGHT & eUse ? &aMaster : 0; +} +inline const SwFrmFmt *SwPageDesc::GetRightFmt() const +{ + return PD_RIGHT & eUse ? &aMaster : 0; +} +inline SwFrmFmt *SwPageDesc::GetLeftFmt() +{ + return PD_LEFT & eUse ? &aLeft : 0; +} +inline const SwFrmFmt *SwPageDesc::GetLeftFmt() const +{ + return PD_LEFT & eUse ? &aLeft : 0; +} + +#endif //_PAGEDESC_HXX diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx new file mode 100644 index 000000000000..bc6c8a57ba29 --- /dev/null +++ b/sw/inc/pageiter.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * $RCSfile: pageiter.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 _PAGEITER_HXX +#define _PAGEITER_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + +class SwDoc; +class SwPageFrm; +struct SwPosition; +class SwPageDesc; + +class SwPageIter { + const SwDoc &rPDoc; + const SwPageFrm *pPage; + +public: + SwPageIter( const SwDoc &rDoc, const SwPosition &rStartPos ); + + BOOL IsEnd() const { return 0 == pPage; } + BOOL NextPage(); + const SwPageDesc* GetPageDesc() const; + BOOL Seek( const SwPosition &rPos ); + BOOL GetPosition( SwPosition &rPos ) const; +}; + + +#endif + diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx new file mode 100644 index 000000000000..c0959fb3f235 --- /dev/null +++ b/sw/inc/pam.hxx @@ -0,0 +1,269 @@ +/************************************************************************* + * + * $RCSfile: pam.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 _PAM_HXX +#define _PAM_HXX + +#include <stddef.h> // fuer MemPool +#ifndef _GEN_HXX //autogen +#include <tools/gen.hxx> +#endif +#ifndef _SVMEMPOOL_HXX //autogen +#include <tools/mempool.hxx> +#endif + +#ifndef _CSHTYP_HXX +#include <cshtyp.hxx> // fuer die Funktions-Definitionen +#endif +#ifndef _RING_HXX +#include <ring.hxx> // Superklasse +#endif +#ifndef _INDEX_HXX +#include <index.hxx> // fuer SwIndex +#endif +#ifndef _NDINDEX_HXX +#include <ndindex.hxx> // fuer SwNodeIndex +#endif + + +class SwFmt; +class SfxPoolItem; +class SfxItemSet; +class SwDoc; +class SwNode; +class SwCntntNode; +class SearchParam; +class SearchText; +class SwNodes; +class SwPaM; + + +struct SwPosition +{ + SwNodeIndex nNode; + SwIndex nContent; + + SwPosition( const SwNode& rNode ); + SwPosition( const SwNodeIndex &rNode ); + SwPosition( const SwNodeIndex &rNode, const SwIndex &rCntnt ); + SwPosition( const SwPosition & ); + + SwPosition &operator=(const SwPosition &); + + FASTBOOL operator < (const SwPosition &) const; + FASTBOOL operator > (const SwPosition &) const; + FASTBOOL operator <=(const SwPosition &) const; + FASTBOOL operator >=(const SwPosition &) const; + FASTBOOL operator ==(const SwPosition &) const; + FASTBOOL operator !=(const SwPosition &) const; +}; + + +// das Ergebnis eines Positions Vergleiches +enum SwComparePosition { + POS_BEFORE, // Pos1 liegt vor Pos2 + POS_BEHIND, // Pos1 liegt hinter Pos2 + POS_INSIDE, // Pos1 liegt vollstaendig in Pos2 + POS_OUTSIDE, // Pos2 liegt vollstaendig in Pos1 + POS_EQUAL, // Pos1 ist genauso gross wie Pos2 + POS_OVERLAP_BEFORE, // Pos1 ueberlappt Pos2 am Anfang + POS_OVERLAP_BEHIND // Pos1 ueberlappt Pos2 am Ende +}; +SwComparePosition ComparePosition( + const SwPosition& rStt1, const SwPosition& rEnd1, + const SwPosition& rStt2, const SwPosition& rEnd2 ); + + +// SwPointAndMark / SwPaM +struct SwMoveFnCollection; +typedef SwMoveFnCollection* SwMoveFn; +extern SwMoveFn fnMoveForward, fnMoveBackward; + +typedef FASTBOOL (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove ); +extern SwGoInDoc fnGoDoc, fnGoSection, fnGoNode, fnGoCntnt; + +void _InitPam(); + +class SwPaM : public Ring +{ + friend class SwTxtFrm; + friend FASTBOOL GoInDoc( SwPaM&, SwMoveFn ); + friend FASTBOOL GoInNode( SwPaM&, SwMoveFn ); + friend FASTBOOL GoInCntnt( SwPaM&, SwMoveFn ); + friend FASTBOOL GoPrevPara( SwPaM&, SwPosPara ); + friend FASTBOOL GoCurrPara( SwPaM&, SwPosPara ); + friend FASTBOOL GoNextPara( SwPaM&, SwPosPara ); + friend FASTBOOL GoPrevSection( SwPaM&, SwPosSection ); + friend FASTBOOL GoCurrSection( SwPaM&, SwPosSection ); + friend FASTBOOL GoNextSection( SwPaM&, SwPosSection ); + + SwPosition aBound1; + SwPosition aBound2; + SwPosition *pPoint; + SwPosition *pMark; + + SwPaM* MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg = 0 ); + +public: + SwPaM( const SwPosition& rPos, SwPaM* pRing = 0 ); + SwPaM( const SwPosition& rMk, const SwPosition& rPt, SwPaM* pRing = 0 ); + SwPaM( SwPaM & ); + SwPaM( const SwNodeIndex& rMk, const SwNodeIndex& rPt, + long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 ); + SwPaM( const SwNode& rMk, const SwNode& rPt, + long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 ); + SwPaM( const SwNodeIndex& rMk, xub_StrLen nMkCntnt, + const SwNodeIndex& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 ); + SwPaM( const SwNode& rMk, xub_StrLen nMkCntnt, + const SwNode& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 ); + SwPaM( const SwNode& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 ); + SwPaM( const SwNodeIndex& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 ); + virtual ~SwPaM(); + + // Bewegen des Cursors + FASTBOOL Move( SwMoveFn fnMove = fnMoveForward, + SwGoInDoc fnGo = fnGoCntnt ); + + // Suchen + BYTE Find( const SearchParam& rParam, SearchText& rSTxt, + SwMoveFn fnMove = fnMoveForward, + const SwPaM *pPam =0, FASTBOOL bInReadOnly = FALSE); + FASTBOOL Find( const SwFmt& rFmt, + SwMoveFn fnMove = fnMoveForward, + const SwPaM *pPam =0, FASTBOOL bInReadOnly = FALSE); + FASTBOOL Find( const SfxPoolItem& rAttr, FASTBOOL bValue = TRUE, + SwMoveFn fnMove = fnMoveForward, + const SwPaM *pPam =0, FASTBOOL bInReadOnly = FALSE ); + FASTBOOL Find( const SfxItemSet& rAttr, FASTBOOL bNoColls = FALSE, + SwMoveFn fnMove = fnMoveForward, + const SwPaM *pPam =0, FASTBOOL bInReadOnly = FALSE ); + + virtual void SetMark(); + void DeleteMark() { pMark = pPoint; } +#ifdef PRODUCT + void Exchange() + { + if(pPoint != pMark) + { + SwPosition *pTmp = pPoint; + pPoint = pMark; + pMark = pTmp; + } + } +#else + void Exchange(); +#endif + /* + * Undokumented Feature: Liefert zurueck, ob das Pam ueber + * eine Selektion verfuegt oder nicht. Definition einer + * Selektion: Point und Mark zeigen auf unterschiedliche + * Puffer. + */ + FASTBOOL HasMark() const { return pPoint == pMark? FALSE : TRUE; } + + const SwPosition *GetPoint() const { return pPoint; } + SwPosition *GetPoint() { return pPoint; } + const SwPosition *GetMark() const { return pMark; } + SwPosition *GetMark() { return pMark; } + + const SwPosition *Start() const + { return (*pPoint) <= (*pMark)? pPoint: pMark; } + SwPosition *Start() + { return (*pPoint) <= (*pMark)? pPoint: pMark; } + const SwPosition *End() const + { return (*pPoint) > (*pMark)? pPoint: pMark; } + SwPosition *End() + { return (*pPoint) > (*pMark)? pPoint: pMark; } + + SwPaM& operator=( SwPaM & ); + + // erfrage vom SwPaM den aktuellen Node/ContentNode am SPoint / Mark + SwNode* GetNode( BOOL bPoint = TRUE ) const + { + return &( bPoint ? pPoint->nNode : pMark->nNode ).GetNode(); + } + SwCntntNode* GetCntntNode( BOOL bPoint = TRUE ) const + { + return ( bPoint ? pPoint->nNode : pMark->nNode ).GetNode().GetCntntNode(); + } + + // erfrage vom SwPaM das Dokument, in dem er angemeldet ist + SwDoc* GetDoc() const { return pPoint->nNode.GetNode().GetDoc(); } + SwPosition& GetBound( BOOL bOne = TRUE ) + { return bOne ? aBound1 : aBound2; } + const SwPosition& GetBound( BOOL bOne = TRUE ) const + { return bOne ? aBound1 : aBound2; } + + // erfrage die Seitennummer auf der der Cursor steht + USHORT GetPageNum( BOOL bAtPoint = TRUE, const Point* pLayPos = 0 ); + + // steht in etwas geschuetztem oder in die Selektion umspannt + // etwas geschuetztes. + FASTBOOL HasReadonlySel() const; + + DECL_FIXEDMEMPOOL_NEWDEL(SwPaM) +}; + + +FASTBOOL CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, FASTBOOL ); +FASTBOOL GoInCntnt( SwPaM & rPam, SwMoveFn fnMove ); + + +#endif // _PAM_HXX diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx new file mode 100644 index 000000000000..28fd5634e148 --- /dev/null +++ b/sw/inc/paratr.hxx @@ -0,0 +1,285 @@ +/************************************************************************* + * + * $RCSfile: paratr.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 _PARATR_HXX +#define _PARATR_HXX + +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#include "hintids.hxx" +#include "calbck.hxx" +#include "swatrset.hxx" +#include "format.hxx" +#include "swtypes.hxx" + +class SwCharFmt; +class International; + +/************************************************************************* +|* class SwFmtDrop +*************************************************************************/ + +#define DROP_WHOLEWORD ((USHORT)0x0001) + +//Wenn ein SwFmtDrop Client ist, so ist dies das CharFmt welches den Font fuer +//die DropCaps beschreibt. Ist es kein Client, so wird von der Formatierung +//das CharFmt des Absatzes benutzt. +//Wird das CharFmt verandert, so wird diese Aenderung ueber das Modify des +//SwFmtDrop an die Absatze propagiert. +class SwFmtDrop: public SfxPoolItem, public SwClient +{ + SwModify* pDefinedIn; // Modify-Object, in dem der DropCaps steht + // kann nur TxtFmtCollection/TxtNode sein + USHORT nDistance; // Abstand zum Textbeginn + USHORT nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!) + BYTE nLines; // Anzahl der Zeilen + BYTE nChars; // Anzahl der Zeichen + BOOL bWholeWord; // Erstes Wort als Initialen +public: + TYPEINFO(); //Bereits in der Basisklasse SwClient + + SwFmtDrop(); + SwFmtDrop( const SwFmtDrop & ); + ~SwFmtDrop(); + + // "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; + + inline BYTE GetLines() const { return nLines; } + inline BYTE &GetLines() { return nLines; } + + inline BYTE GetChars() const { return nChars; } + inline BYTE &GetChars() { return nChars; } + + inline BOOL GetWholeWord() const { return bWholeWord; } + inline BYTE &GetWholeWord() { return bWholeWord; } + + inline USHORT GetDistance() const { return nDistance; } + inline USHORT &GetDistance() { return nDistance; } + + // fuer den Sw3-Reader: CharFormat-Id (Pool laden!) + inline USHORT GetReadFmt() const { return nReadFmt; } + inline void SetReadFmt( USHORT n ) { nReadFmt = n; } + + inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; } + inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; } + void SetCharFmt( SwCharFmt *pNew ); + virtual void Modify( SfxPoolItem*, SfxPoolItem* ); + // erfrage vom Client Informationen + virtual BOOL GetInfo( SfxPoolItem& ) const; + + // erfrage und setze den Modify-Pointer + inline const SwModify* GetDefinedIn() const { return pDefinedIn; } + inline void ChgDefinedIn( const SwModify* pNew ) + { pDefinedIn = (SwModify*)pNew; } + + // this item must be ignored while comparing item sets during XML export + virtual BOOL equalsXML( const SfxPoolItem& ) const; +}; + +class SwRegisterItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + inline SwRegisterItem( const BOOL bRegister = FALSE ); + inline SwRegisterItem& operator=( const SwRegisterItem& rRegister ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT ) 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 importXML( const NAMESPACE_RTL(OUString)& rValue,USHORT, + const SvXMLUnitConverter& rUnitConv ); + virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT, + const SvXMLUnitConverter& rUnitConv ) const; +}; + +inline SwRegisterItem::SwRegisterItem( const BOOL bRegister ) : + SfxBoolItem( RES_PARATR_REGISTER, bRegister ) +{} + +inline SwRegisterItem& SwRegisterItem::operator=( + const SwRegisterItem& rRegister ) +{ + SetValue( rRegister.GetValue() ); + return *this; +} + +class SwNumRuleItem : public SfxStringItem +{ + SwModify* pDefinedIn; // Modify-Object, in dem das NumRule steht + // kann nur TxtFmtCollection/TxtNode sein +public: + TYPEINFO(); + + SwNumRuleItem() + : SfxStringItem( RES_PARATR_NUMRULE, aEmptyStr ), pDefinedIn(0) {} + + SwNumRuleItem( const String& rRuleName ) + : SfxStringItem( RES_PARATR_NUMRULE, rRuleName ), pDefinedIn(0) {} + + SwNumRuleItem( const SwNumRuleItem& rCpy ) + : SfxStringItem( RES_PARATR_NUMRULE, rCpy.GetValue() ), pDefinedIn(0) {} + + + SwNumRuleItem& operator=( const SwNumRuleItem& rCpy ) + { SetValue( rCpy.GetValue() ); pDefinedIn=0; return *this; } + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT ) 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 ) const; + virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + // this item must be ignored while comparing item sets during XML export + virtual BOOL equalsXML( const SfxPoolItem& ) const; + + // erfrage und setze den Modify-Pointer + inline const SwModify* GetDefinedIn() const { return pDefinedIn; } + inline void ChgDefinedIn( const SwModify* pNew ) + { pDefinedIn = (SwModify*)pNew; } +}; + + + +/****************************************************************************** + * Implementierung der Paragraph-Attribut Methoden vom SwAttrSet + ******************************************************************************/ + +inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(BOOL bInP) const + { return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); } +inline const SvxAdjustItem &SwAttrSet::GetAdjust(BOOL bInP) const + { return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); } +inline const SvxFmtSplitItem &SwAttrSet::GetSplit(BOOL bInP) const + { return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); } +inline const SwRegisterItem &SwAttrSet::GetRegister(BOOL bInP) const + { return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); } +inline const SvxWidowsItem &SwAttrSet::GetWidows(BOOL bInP) const + { return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); } +inline const SvxOrphansItem &SwAttrSet::GetOrphans(BOOL bInP) const + { return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); } +inline const SvxTabStopItem &SwAttrSet::GetTabStops(BOOL bInP) const + { return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); } +inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(BOOL bInP) const + { return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); } +inline const SwFmtDrop &SwAttrSet::GetDrop(BOOL bInP) const + { return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); } +inline const SwNumRuleItem &SwAttrSet::GetNumRule(BOOL bInP) const + { return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); } + +/****************************************************************************** + * Implementierung der Paragraph-Attribut Methoden vom SwFmt + ******************************************************************************/ + +inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(BOOL bInP) const + { return aSet.GetLineSpacing(bInP); } +inline const SvxAdjustItem &SwFmt::GetAdjust(BOOL bInP) const + { return aSet.GetAdjust(bInP); } +inline const SvxFmtSplitItem &SwFmt::GetSplit(BOOL bInP) const + { return aSet.GetSplit(bInP); } +inline const SwRegisterItem &SwFmt::GetRegister(BOOL bInP) const + { return aSet.GetRegister(bInP); } +inline const SvxWidowsItem &SwFmt::GetWidows(BOOL bInP) const + { return aSet.GetWidows(bInP); } +inline const SvxOrphansItem &SwFmt::GetOrphans(BOOL bInP) const + { return aSet.GetOrphans(bInP); } +inline const SvxTabStopItem &SwFmt::GetTabStops(BOOL bInP) const + { return aSet.GetTabStops(bInP); } +inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(BOOL bInP) const + { return aSet.GetHyphenZone(bInP); } +inline const SwFmtDrop &SwFmt::GetDrop(BOOL bInP) const + { return aSet.GetDrop(bInP); } +inline const SwNumRuleItem &SwFmt::GetNumRule(BOOL bInP) const + { return aSet.GetNumRule(bInP); } + + +#endif diff --git a/sw/inc/poolfmt.awk b/sw/inc/poolfmt.awk new file mode 100644 index 000000000000..810d714dff95 --- /dev/null +++ b/sw/inc/poolfmt.awk @@ -0,0 +1,73 @@ +#************************************************************************* +#* +#* $Workfile: dbgxtor.awk +#* +#* Ersterstellung JP 05.10.95 +#* Letzte Aenderung $Author: hr $ $Date: 2000-09-18 17:14:27 $ +#* $Revision: 1.1.1.1 $ +#* +#* $Logfile: T:/sw/inc/poolfmt.awv $ +#* +#* Copyright (c) 1990-1996, STAR DIVISION +#* +#************************************************************************* + +# +# Dieses awk-script generiert ein cxx-file, das alle PoolIds der Vorlage dumpt. +# wird fuer den HelpPI gebraucht. +# Aufruf: awk -f poolid.awk poolfmt.hxx > poolid.cxx +# cl poolid.cxx +# poolid.exe > ???.hrc +# + +function Header() { + print "// This is an outputfile of an awk-script: $Workfile: poolfmt.awk $" + print "#include <solar.h> " + print + print "#include <stdio.h>" + print "#include <stdlib.h>" + print + print "#pragma hdrstop" + print + print "#include <iostream.hxx> " + print "#include \"poolfmt.hxx\"" + print +} + +function Main() { + print + print "void main( int , char *[] ) {" + sStr = "#define" + print " int nSize = (sizeof(ppPoolIds) / sizeof(PoolFmtIds)) - 1;" + print " for( int n = 0; n < nSize; n++ )" + print " printf( \"" sStr " %s\\t%8d\\n\", ppPoolIds[ n ].pStr, ppPoolIds[ n ].nId );" + print "}" +} + +function TableHead() { + print + print "struct PoolFmtIds { int nId; const char* pStr; };" + print "static PoolFmtIds ppPoolIds[] = {" +} + +function TableTail() { + print " 0, \"\" };" + print +} + +BEGIN { + Header(); + TableHead(); +} + +/^[ \t]*RES_/ && !index( $1, "_BEGIN" ) && !index( $1, "_END" ) && !index( $1, "_POOL_" ) { + sStr = $1; + split( $1, sStr, "," ); + print " " sStr[1] ", \"" sStr[1] "\"," +} + +END { + TableTail(); + Main(); +} + diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc new file mode 100644 index 000000000000..285f40e32989 --- /dev/null +++ b/sw/inc/poolfmt.hrc @@ -0,0 +1,533 @@ +/************************************************************************* + * + * $RCSfile: poolfmt.hrc,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 _POOLFMT_HRC +#define _POOLFMT_HRC + +#include "rcid.hrc" + +// --------------- +// die Formate +// --------------- + +// Zeichenvorlagen: +#define STR_POOLCHR_FOOTNOTE (RC_POOLCHRFMT_BEGIN+ 0) +#define STR_POOLCHR_PAGENO (RC_POOLCHRFMT_BEGIN+ 1) +#define STR_POOLCHR_LABEL (RC_POOLCHRFMT_BEGIN+ 2) +#define STR_POOLCHR_DROPCAPS (RC_POOLCHRFMT_BEGIN+ 3) +#define STR_POOLCHR_NUM_LEVEL (RC_POOLCHRFMT_BEGIN+ 4) +#define STR_POOLCHR_BUL_LEVEL (RC_POOLCHRFMT_BEGIN+ 5) +#define STR_POOLCHR_INET_NORMAL (RC_POOLCHRFMT_BEGIN+ 6) +#define STR_POOLCHR_INET_VISIT (RC_POOLCHRFMT_BEGIN+ 7) +#define STR_POOLCHR_JUMPEDIT (RC_POOLCHRFMT_BEGIN+ 8) +#define STR_POOLCHR_TOXJUMP (RC_POOLCHRFMT_BEGIN+ 9) +#define STR_POOLCHR_ENDNOTE (RC_POOLCHRFMT_BEGIN+ 10) +#define STR_POOLCHR_LINENUM (RC_POOLCHRFMT_BEGIN+ 11) +#define STR_POOLCHR_IDX_MAIN_ENTRY (RC_POOLCHRFMT_BEGIN+ 12) +#define STR_POOLCHR_FOOTNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 13) +#define STR_POOLCHR_ENDNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 14) + +#define STR_POOLCHR_HTML_EMPHASIS (RC_POOLCHRFMT_HTML_BEGIN+ 0) +#define STR_POOLCHR_HTML_CITIATION (RC_POOLCHRFMT_HTML_BEGIN+ 1) +#define STR_POOLCHR_HTML_STRONG (RC_POOLCHRFMT_HTML_BEGIN+ 2) +#define STR_POOLCHR_HTML_CODE (RC_POOLCHRFMT_HTML_BEGIN+ 3) +#define STR_POOLCHR_HTML_SAMPLE (RC_POOLCHRFMT_HTML_BEGIN+ 4) +#define STR_POOLCHR_HTML_KEYBOARD (RC_POOLCHRFMT_HTML_BEGIN+ 5) +#define STR_POOLCHR_HTML_VARIABLE (RC_POOLCHRFMT_HTML_BEGIN+ 6) +#define STR_POOLCHR_HTML_DEFINSTANCE (RC_POOLCHRFMT_HTML_BEGIN+ 7) +#define STR_POOLCHR_HTML_TELETYPE (RC_POOLCHRFMT_HTML_BEGIN+ 8) + +#define STR_POOLCHR_PRGM_FOOTNOTE (RC_POOLCHRFMT_PRGM_BEGIN + 0) +#define STR_POOLCHR_PRGM_PAGENO (RC_POOLCHRFMT_PRGM_BEGIN + 1) +#define STR_POOLCHR_PRGM_LABEL (RC_POOLCHRFMT_PRGM_BEGIN + 2) +#define STR_POOLCHR_PRGM_DROPCAPS (RC_POOLCHRFMT_PRGM_BEGIN + 3) +#define STR_POOLCHR_PRGM_NUM_LEVEL (RC_POOLCHRFMT_PRGM_BEGIN + 4) +#define STR_POOLCHR_PRGM_BUL_LEVEL (RC_POOLCHRFMT_PRGM_BEGIN + 5) +#define STR_POOLCHR_PRGM_INET_NORMAL (RC_POOLCHRFMT_PRGM_BEGIN + 6) +#define STR_POOLCHR_PRGM_INET_VISIT (RC_POOLCHRFMT_PRGM_BEGIN + 7) +#define STR_POOLCHR_PRGM_JUMPEDIT (RC_POOLCHRFMT_PRGM_BEGIN + 8) +#define STR_POOLCHR_PRGM_TOXJUMP (RC_POOLCHRFMT_PRGM_BEGIN + 9) +#define STR_POOLCHR_PRGM_ENDNOTE (RC_POOLCHRFMT_PRGM_BEGIN + 10) +#define STR_POOLCHR_PRGM_LINENUM (RC_POOLCHRFMT_PRGM_BEGIN + 11) +#define STR_POOLCHR_PRGM_IDX_MAIN_ENTRY (RC_POOLCHRFMT_PRGM_BEGIN + 12) +#define STR_POOLCHR_PRGM_FOOTNOTE_ANCHOR (RC_POOLCHRFMT_PRGM_BEGIN + 13) +#define STR_POOLCHR_PRGM_ENDNOTE_ANCHOR (RC_POOLCHRFMT_PRGM_BEGIN + 14) + +#define STR_POOLCHR_PRGM_CURRENT_END STR_POOLCHR_PRGM_ENDNOTE_ANCHOR + + +#define STR_POOLCHR_PRGM_HTML_EMPHASIS (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 0) +#define STR_POOLCHR_PRGM_HTML_CITIATION (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 1) +#define STR_POOLCHR_PRGM_HTML_STRONG (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 2) +#define STR_POOLCHR_PRGM_HTML_CODE (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 3) +#define STR_POOLCHR_PRGM_HTML_SAMPLE (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 4) +#define STR_POOLCHR_PRGM_HTML_KEYBOARD (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 5) +#define STR_POOLCHR_PRGM_HTML_VARIABLE (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 6) +#define STR_POOLCHR_PRGM_HTML_DEFINSTANCE (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 7) +#define STR_POOLCHR_PRGM_HTML_TELETYPE (RC_POOLCHRFMT_PRGM_HTML_BEGIN + 8) + +#define STR_POOLCHR_PRGM_HTML_CURRENT_END STR_POOLCHR_PRGM_HTML_TELETYPE + +// Rahmen-Vorlagen: +#define STR_POOLFRM_FRAME (RC_POOLFRMFMT_BEGIN+ 0) +#define STR_POOLFRM_GRAPHIC (RC_POOLFRMFMT_BEGIN+ 1) +#define STR_POOLFRM_OLE (RC_POOLFRMFMT_BEGIN+ 2) +#define STR_POOLFRM_FORMEL (RC_POOLFRMFMT_BEGIN+ 3) +#define STR_POOLFRM_MARGINAL (RC_POOLFRMFMT_BEGIN+ 4) +#define STR_POOLFRM_WATERSIGN (RC_POOLFRMFMT_BEGIN+ 5) +#define STR_POOLFRM_LABEL (RC_POOLFRMFMT_BEGIN+ 6) + +#define STR_POOLFRM_PRGM_FRAME (RC_POOLFRMFMT_PRGM_BEGIN+ 0) +#define STR_POOLFRM_PRGM_GRAPHIC (RC_POOLFRMFMT_PRGM_BEGIN+ 1) +#define STR_POOLFRM_PRGM_OLE (RC_POOLFRMFMT_PRGM_BEGIN+ 2) +#define STR_POOLFRM_PRGM_FORMEL (RC_POOLFRMFMT_PRGM_BEGIN+ 3) +#define STR_POOLFRM_PRGM_MARGINAL (RC_POOLFRMFMT_PRGM_BEGIN+ 4) +#define STR_POOLFRM_PRGM_WATERSIGN (RC_POOLFRMFMT_PRGM_BEGIN+ 5) +#define STR_POOLFRM_PRGM_LABEL (RC_POOLFRMFMT_PRGM_BEGIN+ 6) + +// --------------- +// die Vorlagen +// --------------- +// Gruppe Text +#define STR_POOLCOLL_STANDARD (RC_POOLCOLL_TEXT_BEGIN+ 0) +#define STR_POOLCOLL_TEXT (RC_POOLCOLL_TEXT_BEGIN+ 1) +#define STR_POOLCOLL_TEXT_IDENT (RC_POOLCOLL_TEXT_BEGIN+ 2) +#define STR_POOLCOLL_TEXT_NEGIDENT (RC_POOLCOLL_TEXT_BEGIN+ 3) +#define STR_POOLCOLL_TEXT_MOVE (RC_POOLCOLL_TEXT_BEGIN+ 4) +#define STR_POOLCOLL_GREETING (RC_POOLCOLL_TEXT_BEGIN+ 5) +#define STR_POOLCOLL_SIGNATURE (RC_POOLCOLL_TEXT_BEGIN+ 6) +#define STR_POOLCOLL_CONFRONTATION (RC_POOLCOLL_TEXT_BEGIN+ 7) +#define STR_POOLCOLL_MARGINAL (RC_POOLCOLL_TEXT_BEGIN+ 8) + + // Untergruppierung Ueberschriften +#define STR_POOLCOLL_HEADLINE_BASE (RC_POOLCOLL_TEXT_BEGIN+ 9) +#define STR_POOLCOLL_HEADLINE1 (RC_POOLCOLL_TEXT_BEGIN+ 10) +#define STR_POOLCOLL_HEADLINE2 (RC_POOLCOLL_TEXT_BEGIN+ 11) +#define STR_POOLCOLL_HEADLINE3 (RC_POOLCOLL_TEXT_BEGIN+ 12) +#define STR_POOLCOLL_HEADLINE4 (RC_POOLCOLL_TEXT_BEGIN+ 13) +#define STR_POOLCOLL_HEADLINE5 (RC_POOLCOLL_TEXT_BEGIN+ 14) +#define STR_POOLCOLL_HEADLINE6 (RC_POOLCOLL_TEXT_BEGIN+ 15) +#define STR_POOLCOLL_HEADLINE7 (RC_POOLCOLL_TEXT_BEGIN+ 16) +#define STR_POOLCOLL_HEADLINE8 (RC_POOLCOLL_TEXT_BEGIN+ 17) +#define STR_POOLCOLL_HEADLINE9 (RC_POOLCOLL_TEXT_BEGIN+ 18) +#define STR_POOLCOLL_HEADLINE10 (RC_POOLCOLL_TEXT_BEGIN+ 19) + +// Gruppe Listen +#define STR_POOLCOLL_NUMBUL_BASE (RC_POOLCOLL_LISTS_BEGIN+ 0) + // Untergruppe Nummerierung +#define STR_POOLCOLL_NUM_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 1) +#define STR_POOLCOLL_NUM_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 2) +#define STR_POOLCOLL_NUM_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 3) +#define STR_POOLCOLL_NUM_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 4) +#define STR_POOLCOLL_NUM_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 5) +#define STR_POOLCOLL_NUM_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 6) +#define STR_POOLCOLL_NUM_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 7) +#define STR_POOLCOLL_NUM_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 8) +#define STR_POOLCOLL_NUM_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 9) +#define STR_POOLCOLL_NUM_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 10) +#define STR_POOLCOLL_NUM_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 11) +#define STR_POOLCOLL_NUM_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 12) +#define STR_POOLCOLL_NUM_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 13) +#define STR_POOLCOLL_NUM_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 14) +#define STR_POOLCOLL_NUM_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 15) +#define STR_POOLCOLL_NUM_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 16) +#define STR_POOLCOLL_NUM_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 17) +#define STR_POOLCOLL_NUM_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 18) +#define STR_POOLCOLL_NUM_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 19) +#define STR_POOLCOLL_NUM_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 20) + + // Untergruppe Aufzaehlung +#define STR_POOLCOLL_BUL_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 21) +#define STR_POOLCOLL_BUL_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 22) +#define STR_POOLCOLL_BUL_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 23) +#define STR_POOLCOLL_BUL_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 24) +#define STR_POOLCOLL_BUL_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 25) +#define STR_POOLCOLL_BUL_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 26) +#define STR_POOLCOLL_BUL_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 27) +#define STR_POOLCOLL_BUL_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 28) +#define STR_POOLCOLL_BUL_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 29) +#define STR_POOLCOLL_BUL_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 30) +#define STR_POOLCOLL_BUL_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 31) +#define STR_POOLCOLL_BUL_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 32) +#define STR_POOLCOLL_BUL_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 33) +#define STR_POOLCOLL_BUL_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 34) +#define STR_POOLCOLL_BUL_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 35) +#define STR_POOLCOLL_BUL_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 36) +#define STR_POOLCOLL_BUL_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 37) +#define STR_POOLCOLL_BUL_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 38) +#define STR_POOLCOLL_BUL_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 39) +#define STR_POOLCOLL_BUL_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 40) + +// Sonderbereiche + // Untergruppe Header +#define STR_POOLCOLL_HEADER (RC_POOLCOLL_EXTRA_BEGIN+ 0) +#define STR_POOLCOLL_HEADERL (RC_POOLCOLL_EXTRA_BEGIN+ 1) +#define STR_POOLCOLL_HEADERR (RC_POOLCOLL_EXTRA_BEGIN+ 2) + + // Untergruppe Footer +#define STR_POOLCOLL_FOOTER (RC_POOLCOLL_EXTRA_BEGIN+ 3) +#define STR_POOLCOLL_FOOTERL (RC_POOLCOLL_EXTRA_BEGIN+ 4) +#define STR_POOLCOLL_FOOTERR (RC_POOLCOLL_EXTRA_BEGIN+ 5) + + // Untergruppe Tabelle +#define STR_POOLCOLL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 6) +#define STR_POOLCOLL_TABLE_HDLN (RC_POOLCOLL_EXTRA_BEGIN+ 7) + + // Untergruppe Labels +#define STR_POOLCOLL_LABEL (RC_POOLCOLL_EXTRA_BEGIN+ 8) +#define STR_POOLCOLL_LABEL_ABB (RC_POOLCOLL_EXTRA_BEGIN+ 9) +#define STR_POOLCOLL_LABEL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 10) +#define STR_POOLCOLL_LABEL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 11) + + // sonstiges +#define STR_POOLCOLL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 12) +#define STR_POOLCOLL_FOOTNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 13) +#define STR_POOLCOLL_JAKETADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 14) +#define STR_POOLCOLL_SENDADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 15) +#define STR_POOLCOLL_ENDNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 16) + +#define STR_POOLCOLL_LABEL_DRAWING (RC_POOLCOLL_EXTRA_BEGIN+ 17) + +// Gruppe Verzeichnisse +#define STR_POOLCOLL_REGISTER_BASE (RC_POOLCOLL_REGISTER_BEGIN+ 0) + // Untergruppe Index-Verzeichnisse +#define STR_POOLCOLL_TOX_IDXH (RC_POOLCOLL_REGISTER_BEGIN+ 1) +#define STR_POOLCOLL_TOX_IDX1 (RC_POOLCOLL_REGISTER_BEGIN+ 2) +#define STR_POOLCOLL_TOX_IDX2 (RC_POOLCOLL_REGISTER_BEGIN+ 3) +#define STR_POOLCOLL_TOX_IDX3 (RC_POOLCOLL_REGISTER_BEGIN+ 4) +#define STR_POOLCOLL_TOX_IDXBREAK (RC_POOLCOLL_REGISTER_BEGIN+ 5) + + // Untergruppe Inhalts-Verzeichnisse +#define STR_POOLCOLL_TOX_CNTNTH (RC_POOLCOLL_REGISTER_BEGIN+ 6) +#define STR_POOLCOLL_TOX_CNTNT1 (RC_POOLCOLL_REGISTER_BEGIN+ 7) +#define STR_POOLCOLL_TOX_CNTNT2 (RC_POOLCOLL_REGISTER_BEGIN+ 8) +#define STR_POOLCOLL_TOX_CNTNT3 (RC_POOLCOLL_REGISTER_BEGIN+ 9) +#define STR_POOLCOLL_TOX_CNTNT4 (RC_POOLCOLL_REGISTER_BEGIN+ 10) +#define STR_POOLCOLL_TOX_CNTNT5 (RC_POOLCOLL_REGISTER_BEGIN+ 11) + + // Untergruppe Benutzer-Verzeichnisse: +#define STR_POOLCOLL_TOX_USERH (RC_POOLCOLL_REGISTER_BEGIN+ 12) +#define STR_POOLCOLL_TOX_USER1 (RC_POOLCOLL_REGISTER_BEGIN+ 13) +#define STR_POOLCOLL_TOX_USER2 (RC_POOLCOLL_REGISTER_BEGIN+ 14) +#define STR_POOLCOLL_TOX_USER3 (RC_POOLCOLL_REGISTER_BEGIN+ 15) +#define STR_POOLCOLL_TOX_USER4 (RC_POOLCOLL_REGISTER_BEGIN+ 16) +#define STR_POOLCOLL_TOX_USER5 (RC_POOLCOLL_REGISTER_BEGIN+ 17) + + // Untergruppe Inhalts-Verzeichnisse mehr Ebenen 5 - 10 +#define STR_POOLCOLL_TOX_CNTNT6 (RC_POOLCOLL_REGISTER_BEGIN+ 18) +#define STR_POOLCOLL_TOX_CNTNT7 (RC_POOLCOLL_REGISTER_BEGIN+ 19) +#define STR_POOLCOLL_TOX_CNTNT8 (RC_POOLCOLL_REGISTER_BEGIN+ 20) +#define STR_POOLCOLL_TOX_CNTNT9 (RC_POOLCOLL_REGISTER_BEGIN+ 21) +#define STR_POOLCOLL_TOX_CNTNT10 (RC_POOLCOLL_REGISTER_BEGIN+ 22) + +// illustrations index +#define STR_POOLCOLL_TOX_ILLUSH (RC_POOLCOLL_REGISTER_BEGIN+ 23) +#define STR_POOLCOLL_TOX_ILLUS1 (RC_POOLCOLL_REGISTER_BEGIN+ 24) + +// object index +#define STR_POOLCOLL_TOX_OBJECTH (RC_POOLCOLL_REGISTER_BEGIN+ 25) +#define STR_POOLCOLL_TOX_OBJECT1 (RC_POOLCOLL_REGISTER_BEGIN+ 26) + +// tables index +#define STR_POOLCOLL_TOX_TABLESH (RC_POOLCOLL_REGISTER_BEGIN+ 27) +#define STR_POOLCOLL_TOX_TABLES1 (RC_POOLCOLL_REGISTER_BEGIN+ 28) + +// index of authorities +#define STR_POOLCOLL_TOX_AUTHORITIESH (RC_POOLCOLL_REGISTER_BEGIN+ 29) +#define STR_POOLCOLL_TOX_AUTHORITIES1 (RC_POOLCOLL_REGISTER_BEGIN+ 30) + + // Untergruppe Benutzer-Verzeichnisse mehr Ebenen 5 - 10 +#define STR_POOLCOLL_TOX_USER6 (RC_POOLCOLL_REGISTER_BEGIN+ 31) +#define STR_POOLCOLL_TOX_USER7 (RC_POOLCOLL_REGISTER_BEGIN+ 32) +#define STR_POOLCOLL_TOX_USER8 (RC_POOLCOLL_REGISTER_BEGIN+ 33) +#define STR_POOLCOLL_TOX_USER9 (RC_POOLCOLL_REGISTER_BEGIN+ 34) +#define STR_POOLCOLL_TOX_USER10 (RC_POOLCOLL_REGISTER_BEGIN+ 35) + + +// Gruppe Kapitel/Dokument +#define STR_POOLCOLL_DOC_TITEL (RC_POOLCOLL_DOC_BEGIN+ 0) +#define STR_POOLCOLL_DOC_SUBTITEL (RC_POOLCOLL_DOC_BEGIN+ 1) + +// Gruppe HTML-Vorlagen +#define STR_POOLCOLL_HTML_BLOCKQUOTE (RC_POOLCOLL_HTML_BEGIN+ 0) +#define STR_POOLCOLL_HTML_PRE (RC_POOLCOLL_HTML_BEGIN+ 1) +#define STR_POOLCOLL_HTML_HR (RC_POOLCOLL_HTML_BEGIN+ 2) +#define STR_POOLCOLL_HTML_DD (RC_POOLCOLL_HTML_BEGIN+ 3) +#define STR_POOLCOLL_HTML_DT (RC_POOLCOLL_HTML_BEGIN+ 4) + +// programmatic names of para styles + +// Gruppe Text +#define STR_POCO_PRGM_STANDARD (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 0) +#define STR_POCO_PRGM_TEXT (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 1) +#define STR_POCO_PRGM_TEXT_IDENT (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 2) +#define STR_POCO_PRGM_TEXT_NEGIDENT (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 3) +#define STR_POCO_PRGM_TEXT_MOVE (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 4) +#define STR_POCO_PRGM_GREETING (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 5) +#define STR_POCO_PRGM_SIGNATURE (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 6) +#define STR_POCO_PRGM_CONFRONTATION (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 7) +#define STR_POCO_PRGM_MARGINAL (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 8) + + // Untergruppierung Ueberschriften +#define STR_POCO_PRGM_HEADLINE_BASE (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 9) +#define STR_POCO_PRGM_HEADLINE1 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 10) +#define STR_POCO_PRGM_HEADLINE2 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 11) +#define STR_POCO_PRGM_HEADLINE3 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 12) +#define STR_POCO_PRGM_HEADLINE4 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 13) +#define STR_POCO_PRGM_HEADLINE5 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 14) +#define STR_POCO_PRGM_HEADLINE6 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 15) +#define STR_POCO_PRGM_HEADLINE7 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 16) +#define STR_POCO_PRGM_HEADLINE8 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 17) +#define STR_POCO_PRGM_HEADLINE9 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 18) +#define STR_POCO_PRGM_HEADLINE10 (RC_POOLCOLL_PRGM_TEXT_BEGIN+ 19) + +// Gruppe Listen +#define STR_POCO_PRGM_NUMBUL_BASE (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 0) + // Untergruppe Nummerierung +#define STR_POCO_PRGM_NUM_LEVEL1S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 1) +#define STR_POCO_PRGM_NUM_LEVEL1 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 2) +#define STR_POCO_PRGM_NUM_LEVEL1E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 3) +#define STR_POCO_PRGM_NUM_NONUM1 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 4) +#define STR_POCO_PRGM_NUM_LEVEL2S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 5) +#define STR_POCO_PRGM_NUM_LEVEL2 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 6) +#define STR_POCO_PRGM_NUM_LEVEL2E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 7) +#define STR_POCO_PRGM_NUM_NONUM2 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 8) +#define STR_POCO_PRGM_NUM_LEVEL3S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 9) +#define STR_POCO_PRGM_NUM_LEVEL3 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 10) +#define STR_POCO_PRGM_NUM_LEVEL3E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 11) +#define STR_POCO_PRGM_NUM_NONUM3 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 12) +#define STR_POCO_PRGM_NUM_LEVEL4S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 13) +#define STR_POCO_PRGM_NUM_LEVEL4 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 14) +#define STR_POCO_PRGM_NUM_LEVEL4E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 15) +#define STR_POCO_PRGM_NUM_NONUM4 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 16) +#define STR_POCO_PRGM_NUM_LEVEL5S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 17) +#define STR_POCO_PRGM_NUM_LEVEL5 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 18) +#define STR_POCO_PRGM_NUM_LEVEL5E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 19) +#define STR_POCO_PRGM_NUM_NONUM5 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 20) + + // Untergruppe Aufzaehlung +#define STR_POCO_PRGM_BUL_LEVEL1S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 21) +#define STR_POCO_PRGM_BUL_LEVEL1 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 22) +#define STR_POCO_PRGM_BUL_LEVEL1E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 23) +#define STR_POCO_PRGM_BUL_NONUM1 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 24) +#define STR_POCO_PRGM_BUL_LEVEL2S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 25) +#define STR_POCO_PRGM_BUL_LEVEL2 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 26) +#define STR_POCO_PRGM_BUL_LEVEL2E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 27) +#define STR_POCO_PRGM_BUL_NONUM2 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 28) +#define STR_POCO_PRGM_BUL_LEVEL3S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 29) +#define STR_POCO_PRGM_BUL_LEVEL3 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 30) +#define STR_POCO_PRGM_BUL_LEVEL3E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 31) +#define STR_POCO_PRGM_BUL_NONUM3 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 32) +#define STR_POCO_PRGM_BUL_LEVEL4S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 33) +#define STR_POCO_PRGM_BUL_LEVEL4 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 34) +#define STR_POCO_PRGM_BUL_LEVEL4E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 35) +#define STR_POCO_PRGM_BUL_NONUM4 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 36) +#define STR_POCO_PRGM_BUL_LEVEL5S (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 37) +#define STR_POCO_PRGM_BUL_LEVEL5 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 38) +#define STR_POCO_PRGM_BUL_LEVEL5E (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 39) +#define STR_POCO_PRGM_BUL_NONUM5 (RC_POOLCOLL_PRGM_LISTS_BEGIN+ 40) + +// Sonderbereiche + // Untergruppe Header +#define STR_POCO_PRGM_HEADER (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 0) +#define STR_POCO_PRGM_HEADERL (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 1) +#define STR_POCO_PRGM_HEADERR (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 2) + + // Untergruppe Footer +#define STR_POCO_PRGM_FOOTER (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 3) +#define STR_POCO_PRGM_FOOTERL (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 4) +#define STR_POCO_PRGM_FOOTERR (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 5) + + // Untergruppe Tabelle +#define STR_POCO_PRGM_TABLE (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 6) +#define STR_POCO_PRGM_TABLE_HDLN (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 7) + + // Untergruppe Labels +#define STR_POCO_PRGM_LABEL (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 8) +#define STR_POCO_PRGM_LABEL_ABB (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 9) +#define STR_POCO_PRGM_LABEL_TABLE (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 10) +#define STR_POCO_PRGM_LABEL_FRAME (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 11) + + // sonstiges +#define STR_POCO_PRGM_FRAME (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 12) +#define STR_POCO_PRGM_FOOTNOTE (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 13) +#define STR_POCO_PRGM_JAKETADRESS (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 14) +#define STR_POCO_PRGM_SENDADRESS (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 15) +#define STR_POCO_PRGM_ENDNOTE (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 16) + +#define STR_POCO_PRGM_LABEL_DRAWING (RC_POOLCOLL_PRGM_EXTRA_BEGIN+ 17) + +// Gruppe Verzeichnisse +#define STR_POCO_PRGM_REGISTER_BASE (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 0) + // Untergruppe Index-Verzeichnisse +#define STR_POCO_PRGM_TOX_IDXH (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 1) +#define STR_POCO_PRGM_TOX_IDX1 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 2) +#define STR_POCO_PRGM_TOX_IDX2 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 3) +#define STR_POCO_PRGM_TOX_IDX3 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 4) +#define STR_POCO_PRGM_TOX_IDXBREAK (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 5) + + // Untergruppe Inhalts-Verzeichnisse +#define STR_POCO_PRGM_TOX_CNTNTH (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 6) +#define STR_POCO_PRGM_TOX_CNTNT1 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 7) +#define STR_POCO_PRGM_TOX_CNTNT2 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 8) +#define STR_POCO_PRGM_TOX_CNTNT3 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 9) +#define STR_POCO_PRGM_TOX_CNTNT4 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 10) +#define STR_POCO_PRGM_TOX_CNTNT5 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 11) + + // Untergruppe Benutzer-Verzeichnisse: +#define STR_POCO_PRGM_TOX_USERH (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 12) +#define STR_POCO_PRGM_TOX_USER1 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 13) +#define STR_POCO_PRGM_TOX_USER2 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 14) +#define STR_POCO_PRGM_TOX_USER3 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 15) +#define STR_POCO_PRGM_TOX_USER4 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 16) +#define STR_POCO_PRGM_TOX_USER5 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 17) + + // Untergruppe Inhalts-Verzeichnisse mehr Ebenen 5 - 10 +#define STR_POCO_PRGM_TOX_CNTNT6 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 18) +#define STR_POCO_PRGM_TOX_CNTNT7 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 19) +#define STR_POCO_PRGM_TOX_CNTNT8 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 20) +#define STR_POCO_PRGM_TOX_CNTNT9 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 21) +#define STR_POCO_PRGM_TOX_CNTNT10 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 22) + +// illustrations index +#define STR_POCO_PRGM_TOX_ILLUSH (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 23) +#define STR_POCO_PRGM_TOX_ILLUS1 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 24) + +// object index +#define STR_POCO_PRGM_TOX_OBJECTH (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 25) +#define STR_POCO_PRGM_TOX_OBJECT1 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 26) + +// tables index +#define STR_POCO_PRGM_TOX_TABLESH (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 27) +#define STR_POCO_PRGM_TOX_TABLES1 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 28) + +// index of authorities +#define STR_POCO_PRGM_TOX_AUTHORITIESH (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 29) +#define STR_POCO_PRGM_TOX_AUTHORITIES1 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 30) + + // Untergruppe Benutzer-Verzeichnisse mehr Ebenen 5 - 10 +#define STR_POCO_PRGM_TOX_USER6 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 31) +#define STR_POCO_PRGM_TOX_USER7 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 32) +#define STR_POCO_PRGM_TOX_USER8 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 33) +#define STR_POCO_PRGM_TOX_USER9 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 34) +#define STR_POCO_PRGM_TOX_USER10 (RC_POOLCOLL_PRGM_REGISTER_BEGIN+ 35) + + +// Gruppe Kapitel/Dokument +#define STR_POCO_PRGM_DOC_TITEL (RC_POOLCOLL_PRGM_DOC_BEGIN+ 0) +#define STR_POCO_PRGM_DOC_SUBTITEL (RC_POOLCOLL_PRGM_DOC_BEGIN+ 1) + +// Gruppe HTML-Vorlagen +#define STR_POCO_PRGM_HTML_BLOCKQUOTE (RC_POOLCOLL_PRGM_HTML_BEGIN+ 0) +#define STR_POCO_PRGM_HTML_PRE (RC_POOLCOLL_PRGM_HTML_BEGIN+ 1) +#define STR_POCO_PRGM_HTML_HR (RC_POOLCOLL_PRGM_HTML_BEGIN+ 2) +#define STR_POCO_PRGM_HTML_DD (RC_POOLCOLL_PRGM_HTML_BEGIN+ 3) +#define STR_POCO_PRGM_HTML_DT (RC_POOLCOLL_PRGM_HTML_BEGIN+ 4) + + +//----------------- +// Page styles +//----------------- +#define STR_POOLPAGE_STANDARD (RC_POOLPAGEDESC_BEGIN+ 0) +#define STR_POOLPAGE_FIRST (RC_POOLPAGEDESC_BEGIN+ 1) +#define STR_POOLPAGE_LEFT (RC_POOLPAGEDESC_BEGIN+ 2) +#define STR_POOLPAGE_RIGHT (RC_POOLPAGEDESC_BEGIN+ 3) +#define STR_POOLPAGE_JAKET (RC_POOLPAGEDESC_BEGIN+ 4) +#define STR_POOLPAGE_REGISTER (RC_POOLPAGEDESC_BEGIN+ 5) +#define STR_POOLPAGE_HTML (RC_POOLPAGEDESC_BEGIN+ 6) +#define STR_POOLPAGE_FOOTNOTE (RC_POOLPAGEDESC_BEGIN+ 7) +#define STR_POOLPAGE_ENDNOTE (RC_POOLPAGEDESC_BEGIN+ 8) + +#define STR_POOLPAGE_PRGM_STANDARD (RC_POOLPAGEDESC_PRGM_BEGIN+ 0) +#define STR_POOLPAGE_PRGM_FIRST (RC_POOLPAGEDESC_PRGM_BEGIN+ 1) +#define STR_POOLPAGE_PRGM_LEFT (RC_POOLPAGEDESC_PRGM_BEGIN+ 2) +#define STR_POOLPAGE_PRGM_RIGHT (RC_POOLPAGEDESC_PRGM_BEGIN+ 3) +#define STR_POOLPAGE_PRGM_JAKET (RC_POOLPAGEDESC_PRGM_BEGIN+ 4) +#define STR_POOLPAGE_PRGM_REGISTER (RC_POOLPAGEDESC_PRGM_BEGIN+ 5) +#define STR_POOLPAGE_PRGM_HTML (RC_POOLPAGEDESC_PRGM_BEGIN+ 6) +#define STR_POOLPAGE_PRGM_FOOTNOTE (RC_POOLPAGEDESC_PRGM_BEGIN+ 7) +#define STR_POOLPAGE_PRGM_ENDNOTE (RC_POOLPAGEDESC_PRGM_BEGIN+ 8) + +//----------------- +// Numbering styles +//----------------- +#define STR_POOLNUMRULE_NUM1 (RC_POOLNUMRULE_BEGIN+ 0) +#define STR_POOLNUMRULE_NUM2 (RC_POOLNUMRULE_BEGIN+ 1) +#define STR_POOLNUMRULE_NUM3 (RC_POOLNUMRULE_BEGIN+ 2) +#define STR_POOLNUMRULE_NUM4 (RC_POOLNUMRULE_BEGIN+ 3) +#define STR_POOLNUMRULE_NUM5 (RC_POOLNUMRULE_BEGIN+ 4) +#define STR_POOLNUMRULE_BUL1 (RC_POOLNUMRULE_BEGIN+ 5) +#define STR_POOLNUMRULE_BUL2 (RC_POOLNUMRULE_BEGIN+ 6) +#define STR_POOLNUMRULE_BUL3 (RC_POOLNUMRULE_BEGIN+ 7) +#define STR_POOLNUMRULE_BUL4 (RC_POOLNUMRULE_BEGIN+ 8) +#define STR_POOLNUMRULE_BUL5 (RC_POOLNUMRULE_BEGIN+ 9) + +#define STR_POOLNUMRULE_PRGM_NUM1 (RC_POOLNUMRULE_PRGM_BEGIN+ 0) +#define STR_POOLNUMRULE_PRGM_NUM2 (RC_POOLNUMRULE_PRGM_BEGIN+ 1) +#define STR_POOLNUMRULE_PRGM_NUM3 (RC_POOLNUMRULE_PRGM_BEGIN+ 2) +#define STR_POOLNUMRULE_PRGM_NUM4 (RC_POOLNUMRULE_PRGM_BEGIN+ 3) +#define STR_POOLNUMRULE_PRGM_NUM5 (RC_POOLNUMRULE_PRGM_BEGIN+ 4) +#define STR_POOLNUMRULE_PRGM_BUL1 (RC_POOLNUMRULE_PRGM_BEGIN+ 5) +#define STR_POOLNUMRULE_PRGM_BUL2 (RC_POOLNUMRULE_PRGM_BEGIN+ 6) +#define STR_POOLNUMRULE_PRGM_BUL3 (RC_POOLNUMRULE_PRGM_BEGIN+ 7) +#define STR_POOLNUMRULE_PRGM_BUL4 (RC_POOLNUMRULE_PRGM_BEGIN+ 8) +#define STR_POOLNUMRULE_PRGM_BUL5 (RC_POOLNUMRULE_PRGM_BEGIN+ 9) + +#endif diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx new file mode 100644 index 000000000000..a4b31cf51825 --- /dev/null +++ b/sw/inc/poolfmt.hxx @@ -0,0 +1,478 @@ +/************************************************************************* + * + * $RCSfile: poolfmt.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 _POOLFMT_HXX +#define _POOLFMT_HXX + +#include <limits.h> + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + +// POOLCOLL-IDs: +// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +// !User! Bereich ! 0 ! Offset ! +// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +// +// Bereich: 1 - Text +// 2 - Listen +// 3 - Sonderbereiche +// 4 - Verzeichnisse +// 5 - Kapitel / Dokument +// 6 - HTML-Vorlagen + +// Andere IDs: +// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +// !User! Bereich ! 1 ! Offset ! +// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +// Bereich: 0 - Zeichenvorlagen +// 1 - Frame-Vorlagen +// 2 - Seitenvorlagen +// 3 - Absatzformate (?) +// 4 - Grafikformate (?) + +// Fr alle IDs gilt: +// Herkunft: 0 -Pool +// 1 -Benutzer +// Offset: innerhalb der Gruppe + + +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// +// ACHTUNG: neue ID's koennen nur noch am Ende der jeweiligen Gruppe +// zugefuegt werden. Diese Id's werden vom Reader/Writer ge- +// lesen und geschrieben. Diese kennen nur den Offset zum Start +// +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +// Maske fuer Erkennung von COLLPOOL-Ids: + +const USHORT POOLGRP_NOCOLLID = (1 << 10); + +// POLLCOLL-Gruppen: + +const USHORT USER_FMT = (1 << 15); +const USHORT POOL_FMT = (0 << 15); + +const USHORT COLL_TEXT_BITS = (1 << 11); +const USHORT COLL_LISTS_BITS = (2 << 11); +const USHORT COLL_EXTRA_BITS = (3 << 11); +const USHORT COLL_REGISTER_BITS = (4 << 11); +const USHORT COLL_DOC_BITS = (5 << 11); +const USHORT COLL_HTML_BITS = (6 << 11); +const USHORT COLL_GET_RANGE_BITS = (15 << 11); + +// Sonstige Gruppen: + +const USHORT POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID; +const USHORT POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID; +const USHORT POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID; +const USHORT POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID; +//const USHORT POOLGRP_GRFFMT = (4 << 11) + POOLGRP_NOCOLLID; // ? + +// fuer Erkennung ob Benutzer-Vorlage oder nicht: +const USHORT POOL_IDUSER_FMT = + USHRT_MAX & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID); + +inline BOOL IsPoolUserFmt( USHORT nId ) +{ + return POOL_IDUSER_FMT == + (nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID)) + ? TRUE : FALSE; +} + + +// ID-s fuer die Bereiche +enum RES_POOLFMT +{ +RES_POOLFMT_BEGIN = 1, // HIER GEHT'S LOS !!! +RES_POOL_CHRFMT = RES_POOLFMT_BEGIN, +RES_POOL_FRMFMT, +RES_POOL_TXTCOLL, +RES_POOL_PAGEFMT, + +RES_POOL_PARFMT, // ??? +RES_POOL_GRFFMT, // ??? +RES_POOLFMT_END +}; + +// Bereiche fuer die Id's der einzelnen Formate + +// die Id's fuer die Zeichen-Vorlagen +enum RES_POOL_CHRFMT_TYPE +{ +RES_POOLCHR_BEGIN = POOLGRP_CHARFMT, +RES_POOLCHR_NORMAL_BEGIN = POOLGRP_CHARFMT, + +RES_POOLCHR_FOOTNOTE = RES_POOLCHR_NORMAL_BEGIN, // Fussnote +RES_POOLCHR_PAGENO, // Seiten/Feld +RES_POOLCHR_LABEL, // Beschriftung +RES_POOLCHR_DROPCAPS, // Initialienzeichen +RES_POOLCHR_NUM_LEVEL, // Nummerierungszeichen +RES_POOLCHR_BUL_LEVEL, // Aufzaehlungszeichen + +RES_POOLCHR_INET_NORMAL, // Internet normal +RES_POOLCHR_INET_VISIT, // Internet besucht +RES_POOLCHR_JUMPEDIT, // Platzhalter +RES_POOLCHR_TOXJUMP, // Sprung aus Verzeichnis +RES_POOLCHR_ENDNOTE, // Endnote +RES_POOLCHR_LINENUM, // Zeilennummerierung +RES_POOLCHR_IDX_MAIN_ENTRY, // main entry in indexes +RES_POOLCHR_FOOTNOTE_ANCHOR, // Fussnotenanker +RES_POOLCHR_ENDNOTE_ANCHOR, // Endnotenanker + +RES_POOLCHR_NORMAL_END, + +RES_POOLCHR_HTML_BEGIN = RES_POOLCHR_BEGIN + 50, // HTML-Vorlagen +RES_POOLCHR_HTML_EMPHASIS= RES_POOLCHR_HTML_BEGIN, +RES_POOLCHR_HTML_CITIATION, +RES_POOLCHR_HTML_STRONG, +RES_POOLCHR_HTML_CODE, +RES_POOLCHR_HTML_SAMPLE, +RES_POOLCHR_HTML_KEYBOARD, +RES_POOLCHR_HTML_VARIABLE, +RES_POOLCHR_HTML_DEFINSTANCE, +RES_POOLCHR_HTML_TELETYPE, +RES_POOLCHR_HTML_END, + +RES_POOLCHR_END = RES_POOLCHR_HTML_END +}; + + +// die Id's fuer die Rahmen-Vorlagen +enum RES_POOL_FRMFMT_TYPE +{ +RES_POOLFRM_BEGIN = POOLGRP_FRAMEFMT, + +RES_POOLFRM_FRAME = RES_POOLFRM_BEGIN, // Rahmen +RES_POOLFRM_GRAPHIC, // Graphic +RES_POOLFRM_OLE, // OLE +RES_POOLFRM_FORMEL, // Formeln +RES_POOLFRM_MARGINAL, // Marginalen +RES_POOLFRM_WATERSIGN, // Wasserzeichen +RES_POOLFRM_LABEL, // Etikette + +RES_POOLFRM_END +}; + +// die Id's fuer die Seiten-Vorlagen +enum RES_POOL_PAGEFMT_TYPE +{ +RES_POOLPAGE_BEGIN = POOLGRP_PAGEDESC, + +RES_POOLPAGE_STANDARD = RES_POOLPAGE_BEGIN, // Standard-Seite +RES_POOLPAGE_FIRST, // Erste Seite +RES_POOLPAGE_LEFT, // Linke Seite +RES_POOLPAGE_RIGHT, // Rechte Seite +RES_POOLPAGE_JAKET, // Umschlag +RES_POOLPAGE_REGISTER, // Verzeichnis +RES_POOLPAGE_HTML, // HTML +RES_POOLPAGE_FOOTNOTE, // Fussnote bei Dokumentende +RES_POOLPAGE_ENDNOTE, // Endnotensseite + +RES_POOLPAGE_END +}; + +// die Id's fuer die NumRule-Vorlagen +enum RES_POOL_NUMRULE_TYPE +{ +RES_POOLNUMRULE_BEGIN = POOLGRP_NUMRULE, +RES_POOLNUMRULE_NUM1 = RES_POOLNUMRULE_BEGIN, // NumRule Numerierung 1 +RES_POOLNUMRULE_NUM2, // NumRule Numerierung 2 +RES_POOLNUMRULE_NUM3, // NumRule Numerierung 3 +RES_POOLNUMRULE_NUM4, // NumRule Numerierung 4 +RES_POOLNUMRULE_NUM5, // NumRule Numerierung 5 +RES_POOLNUMRULE_BUL1, // NumRule Bullets 1 +RES_POOLNUMRULE_BUL2, // NumRule Bullets 2 +RES_POOLNUMRULE_BUL3, // NumRule Bullets 3 +RES_POOLNUMRULE_BUL4, // NumRule Bullets 4 +RES_POOLNUMRULE_BUL5, // NumRule Bullets 5 +RES_POOLNUMRULE_END +}; + +// die Id's fuer die Absatz-Vorlagen +enum RES_POOL_COLLFMT_TYPE +{ +// Gruppe Text +RES_POOLCOLL_TEXT_BEGIN = COLL_TEXT_BITS, + +RES_POOLCOLL_STANDARD = RES_POOLCOLL_TEXT_BEGIN, // Standard +RES_POOLCOLL_TEXT, // Textkoerper +RES_POOLCOLL_TEXT_IDENT, // Textkoerper Einzug +RES_POOLCOLL_TEXT_NEGIDENT, // Textkoerper neg. Einzug +RES_POOLCOLL_TEXT_MOVE, // Textkoerper Einrueckung +RES_POOLCOLL_GREETING, // Grussformel +RES_POOLCOLL_SIGNATURE, // Unterschrift +RES_POOLCOLL_CONFRONTATION, // Gegenueberstellung +RES_POOLCOLL_MARGINAL, // Marginalie + + // Untergruppierung Ueberschriften +RES_POOLCOLL_HEADLINE_BASE, // Basis-Ueberschrift +RES_POOLCOLL_HEADLINE1, // Ueberschrift 1 +RES_POOLCOLL_HEADLINE2, // Ueberschrift 2 +RES_POOLCOLL_HEADLINE3, // Ueberschrift 3 +RES_POOLCOLL_HEADLINE4, // Ueberschrift 4 +RES_POOLCOLL_HEADLINE5, // Ueberschrift 5 +RES_POOLCOLL_HEADLINE6, // Ueberschrift 6 +RES_POOLCOLL_HEADLINE7, // Ueberschrift 7 +RES_POOLCOLL_HEADLINE8, // Ueberschrift 8 +RES_POOLCOLL_HEADLINE9, // Ueberschrift 9 +RES_POOLCOLL_HEADLINE10, // Ueberschrift 10 + +RES_POOLCOLL_TEXT_END, + + +// Gruppe Listen +RES_POOLCOLL_LISTS_BEGIN = COLL_LISTS_BITS, + +RES_POOLCOLL_NUMBUL_BASE = RES_POOLCOLL_LISTS_BEGIN, // Basis-Liste + + // Untergruppe Nummerierung +RES_POOLCOLL_NUM_LEVEL1S, // Start Level1 +RES_POOLCOLL_NUM_LEVEL1, // 1. Level +RES_POOLCOLL_NUM_LEVEL1E, // Ende Level1 +RES_POOLCOLL_NUM_NONUM1, // keine Nummerierung +RES_POOLCOLL_NUM_LEVEL2S, // Start 2. Level +RES_POOLCOLL_NUM_LEVEL2, // 2. Level +RES_POOLCOLL_NUM_LEVEL2E, // Ende 2. Level +RES_POOLCOLL_NUM_NONUM2, // keine Nummerierung +RES_POOLCOLL_NUM_LEVEL3S, // Start 3. Level +RES_POOLCOLL_NUM_LEVEL3, // 3. Level +RES_POOLCOLL_NUM_LEVEL3E, // Ende 3. Level +RES_POOLCOLL_NUM_NONUM3, // keine Nummerierung +RES_POOLCOLL_NUM_LEVEL4S, // Start 4. Level +RES_POOLCOLL_NUM_LEVEL4, // 4. Level +RES_POOLCOLL_NUM_LEVEL4E, // Ende 4. Level +RES_POOLCOLL_NUM_NONUM4, // keine Nummerierung +RES_POOLCOLL_NUM_LEVEL5S, // Start 5. Level +RES_POOLCOLL_NUM_LEVEL5, // 5. Level +RES_POOLCOLL_NUM_LEVEL5E, // Ende 5. Level +RES_POOLCOLL_NUM_NONUM5, // keine Nummerierung + + // Untergruppe Aufzaehlung +RES_POOLCOLL_BUL_LEVEL1S, // Start Level1 +RES_POOLCOLL_BUL_LEVEL1, // 1. Level +RES_POOLCOLL_BUL_LEVEL1E, // Ende Level1 +RES_POOLCOLL_BUL_NONUM1, // keine Nummerierung +RES_POOLCOLL_BUL_LEVEL2S, // Start 2. Level +RES_POOLCOLL_BUL_LEVEL2, // 2. Level +RES_POOLCOLL_BUL_LEVEL2E, // Ende 2. Level +RES_POOLCOLL_BUL_NONUM2, // keine Nummerierung +RES_POOLCOLL_BUL_LEVEL3S, // Start 3. Level +RES_POOLCOLL_BUL_LEVEL3, // 3. Level +RES_POOLCOLL_BUL_LEVEL3E, // Ende 3. Level +RES_POOLCOLL_BUL_NONUM3, // keine Nummerierung +RES_POOLCOLL_BUL_LEVEL4S, // Start 4. Level +RES_POOLCOLL_BUL_LEVEL4, // 4. Level +RES_POOLCOLL_BUL_LEVEL4E, // Ende 4. Level +RES_POOLCOLL_BUL_NONUM4, // keine Nummerierung +RES_POOLCOLL_BUL_LEVEL5S, // Start 5. Level +RES_POOLCOLL_BUL_LEVEL5, // 5. Level +RES_POOLCOLL_BUL_LEVEL5E, // Ende 5. Level +RES_POOLCOLL_BUL_NONUM5, // keine Nummerierung + +RES_POOLCOLL_LISTS_END, + + +// Sonderbereiche +RES_POOLCOLL_EXTRA_BEGIN = COLL_EXTRA_BITS, + + // Untergruppe Header +RES_POOLCOLL_HEADER = RES_POOLCOLL_EXTRA_BEGIN, // Header Left&Right +RES_POOLCOLL_HEADERL, // Header Left +RES_POOLCOLL_HEADERR, // Header Right + + // Untergruppe Footer +RES_POOLCOLL_FOOTER, // Footer Left&Right +RES_POOLCOLL_FOOTERL, // Footer Left +RES_POOLCOLL_FOOTERR, // Footer Right + + // Untergruppe Tabelle +RES_POOLCOLL_TABLE, // Tabelle "Inhalt" +RES_POOLCOLL_TABLE_HDLN, // Tabellen-Headline + + + // Untergruppe Beschriftung +RES_POOLCOLL_LABEL, // Beschriftung-Basis +RES_POOLCOLL_LABEL_ABB, // Beschriftung-Abbildung +RES_POOLCOLL_LABEL_TABLE, // Beschriftung-Tabelle +RES_POOLCOLL_LABEL_FRAME, // Beschriftung-Rahmen + + // sonstiges +RES_POOLCOLL_FRAME, // Rahmen +RES_POOLCOLL_FOOTNOTE, // Fussnoten +RES_POOLCOLL_JAKETADRESS, // UmschlagAdresse +RES_POOLCOLL_SENDADRESS, // AbsenderAdresse +RES_POOLCOLL_ENDNOTE, // Endnoten + +RES_POOLCOLL_LABEL_DRAWING, // Beschriftung-Zeichen-Objekte +RES_POOLCOLL_EXTRA_END, + + +// Gruppe Verzeichnisse +RES_POOLCOLL_REGISTER_BEGIN = COLL_REGISTER_BITS, + +RES_POOLCOLL_REGISTER_BASE = RES_POOLCOLL_REGISTER_BEGIN, // Basis-Verzeichnis + + // Untergruppe Index-Verzeichnisse +RES_POOLCOLL_TOX_IDXH, // Header +RES_POOLCOLL_TOX_IDX1, // 1. Ebene +RES_POOLCOLL_TOX_IDX2, // 2. Ebene +RES_POOLCOLL_TOX_IDX3, // 3. Ebene +RES_POOLCOLL_TOX_IDXBREAK, // Trenner + + // Untergruppe Inhalts-Verzeichnisse +RES_POOLCOLL_TOX_CNTNTH, // Header +RES_POOLCOLL_TOX_CNTNT1, // 1. Ebene +RES_POOLCOLL_TOX_CNTNT2, // 2. Ebene +RES_POOLCOLL_TOX_CNTNT3, // 3. Ebene +RES_POOLCOLL_TOX_CNTNT4, // 4. Ebene +RES_POOLCOLL_TOX_CNTNT5, // 5. Ebene + + // Untergruppe Benutzer-Verzeichnisse: +RES_POOLCOLL_TOX_USERH, // Header +RES_POOLCOLL_TOX_USER1, // 1. Ebene +RES_POOLCOLL_TOX_USER2, // 2. Ebene +RES_POOLCOLL_TOX_USER3, // 3. Ebene +RES_POOLCOLL_TOX_USER4, // 4. Ebene +RES_POOLCOLL_TOX_USER5, // 5. Ebene + + +RES_POOLCOLL_TOX_CNTNT6, // Inhalt 6. Ebene +RES_POOLCOLL_TOX_CNTNT7, // Inhalt 7. Ebene +RES_POOLCOLL_TOX_CNTNT8, // Inhalt 8. Ebene +RES_POOLCOLL_TOX_CNTNT9, // Inhalt 9. Ebene +RES_POOLCOLL_TOX_CNTNT10, // Inhalt 10. Ebene + +// illustrations index +RES_POOLCOLL_TOX_ILLUSH, // illustrations header +RES_POOLCOLL_TOX_ILLUS1, // illustrations all levels + +// object index +RES_POOLCOLL_TOX_OBJECTH, // objects header +RES_POOLCOLL_TOX_OBJECT1, // objects all levels + +// tables index +RES_POOLCOLL_TOX_TABLESH, // tables header +RES_POOLCOLL_TOX_TABLES1, // tables all levels + +// index of authorities +RES_POOLCOLL_TOX_AUTHORITIESH, // authorities header +RES_POOLCOLL_TOX_AUTHORITIES1, // authorities all levels + +// user index 6..10 +RES_POOLCOLL_TOX_USER6, // level 6 +RES_POOLCOLL_TOX_USER7, // level 7 +RES_POOLCOLL_TOX_USER8, // level 8 +RES_POOLCOLL_TOX_USER9, // level 9 +RES_POOLCOLL_TOX_USER10, // level 10 + +RES_POOLCOLL_REGISTER_END, + + +// Gruppe Kapitel/Dokument +RES_POOLCOLL_DOC_BEGIN = COLL_DOC_BITS, + +RES_POOLCOLL_DOC_TITEL = RES_POOLCOLL_DOC_BEGIN, // Doc. Titel +RES_POOLCOLL_DOC_SUBTITEL, // Doc. UnterTitel + +RES_POOLCOLL_DOC_END, + +// Gruppe HTML-Vorlagen +RES_POOLCOLL_HTML_BEGIN = COLL_HTML_BITS, + +RES_POOLCOLL_HTML_BLOCKQUOTE = RES_POOLCOLL_HTML_BEGIN, +RES_POOLCOLL_HTML_PRE, +RES_POOLCOLL_HTML_HR, +RES_POOLCOLL_HTML_DD, +RES_POOLCOLL_HTML_DT, + +RES_POOLCOLL_HTML_END + +// Ende der Textformat-Vorlagen Sammlung +}; + + + +// erfrage den definierten Parent zu einer POOL-Id +// returnt: 0 -> Standard +// USHRT_MAX -> kein Parent +// sonst -> den Parent +USHORT GetPoolParent( USHORT nId ); + +// erfrage zu einer PoolId den Namen (steht im poolfmt.cxx) +class String; +String& GetDocPoolNm( USHORT nId, String& rFillNm ); + +inline BOOL IsConditionalByPoolId(USHORT nId) + { + return RES_POOLCOLL_TEXT == nId; + } +// die Id's fuer die Grafik-Formate +/*enum RES_POOL_GRFFMT_TYPE +{ +RES_POOLGRF_BEGIN = RES_POOLPAR_END, +RES_POOLGRF_1 = RES_POOLGRF_BEGIN, +RES_POOLGRF_END +}; +*/ + +#endif diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx new file mode 100644 index 000000000000..91f784a3ee7d --- /dev/null +++ b/sw/inc/pvprtdat.hxx @@ -0,0 +1,120 @@ +/************************************************************************* + * + * $RCSfile: pvprtdat.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 _PVPRTDAT_HXX +#define _PVPRTDAT_HXX + + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + +class SwPagePreViewPrtData +{ + ULONG nLeftSpace, nRightSpace, nTopSpace, nBottomSpace, + nHorzSpace, nVertSpace; + BYTE nRow, nCol; + BOOL bLandscape : 1; + BOOL bStretch : 1; +public: + SwPagePreViewPrtData() + : nLeftSpace(0), nRightSpace(0), nTopSpace(0), nBottomSpace(0), + nHorzSpace(0), nVertSpace(0), nRow(1), nCol(1), + bLandscape(0),bStretch(0) + {} + + ULONG GetLeftSpace() const { return nLeftSpace; } + void SetLeftSpace( ULONG n ) { nLeftSpace = n; } + + ULONG GetRightSpace() const { return nRightSpace; } + void SetRightSpace( ULONG n ) { nRightSpace = n; } + + ULONG GetTopSpace() const { return nTopSpace; } + void SetTopSpace( ULONG n ) { nTopSpace = n; } + + ULONG GetBottomSpace() const { return nBottomSpace; } + void SetBottomSpace( ULONG n ) { nBottomSpace = n; } + + ULONG GetHorzSpace() const { return nHorzSpace; } + void SetHorzSpace( ULONG n ) { nHorzSpace = n; } + + ULONG GetVertSpace() const { return nVertSpace; } + void SetVertSpace( ULONG n ) { nVertSpace = n; } + + BYTE GetRow() const { return nRow; } + void SetRow(BYTE n ) { nRow = n; } + + BYTE GetCol() const { return nCol; } + void SetCol( BYTE n ) { nCol = n; } + + BOOL GetLandscape() const { return bLandscape; } + void SetLandscape( BOOL b ) { bLandscape = b; } + + // JP 19.08.98: wird zur Zeit nicht ausgewertet, weil der Font sich + // nicht enstprechend stretch laesst. + BOOL GetStretch() const { return bStretch; } + void SetStretch( BOOL b ) { bStretch = b; } +}; + + +#endif + + diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc new file mode 100644 index 000000000000..11faf7eb934e --- /dev/null +++ b/sw/inc/rcid.hrc @@ -0,0 +1,316 @@ +/************************************************************************* + * + * $RCSfile: rcid.hrc,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 _RDIC_HRC +#define _RDIC_HRC + +#ifndef _SFXSIDS_HRC //autogen +#include <sfx2/sfxsids.hrc> +#endif + +// ---------------------------------------------------------------- +// Bereiche fuer die UI-Verzeichnisse +// ---------------------------------------------------------------- + +#define RC_BASE RID_SW_START // aus solar.hrc + +#define RC_APP RC_BASE +#define RC_DIALOG (RC_BASE + 200) +#define RC_DOCVW (RC_BASE + 300) +#define RC_WEB (RC_BASE + 400) +#define RC_GLOBDOC (RC_BASE + 500) +#define RC_VIEW (RC_BASE + 600) +#define RC_CHRDLG (RC_BASE + 700) +#define RC_RIBBAR (RC_BASE + 720) +#define RC_GLOBALS (RC_BASE + 820) +#define RC_FMTUI (RC_BASE + 920) +#define RC_FRMDLG (RC_BASE + 1000) +#define RC_FLDDLG (RC_BASE + 1100) +#define RC_UTLUI (RC_BASE + 1250) +#define RC_ATTR (RC_BASE + 1350) +#define RC_TABLE (RC_BASE + 1450) +#define RC_CONFIG (RC_BASE + 1550) +#define RC_MISC (RC_BASE + 1650) +#define RC_WRTSH (RC_BASE + 1750) +#define RC_INDEX (RC_BASE + 1950) +#define RC_DBUI (RC_BASE + 2050) +#define RC_DOCHDL (RC_BASE + 2150) +#define RC_POOLCHRFMT (RC_BASE + 2250) +#define RC_POOLHTMLCHRFMT (RC_BASE + 2290) +#define RC_POOLFRMFMT (RC_BASE + 2330) +#define RC_POOLTXTCOLL (RC_BASE + 2360) +#define RC_POOLPAGEDESC (RC_BASE + 2550) +#define RC_POOLNUMRULE (RC_BASE + 2650) +#define RC_ENVELP (RC_BASE + 2750) +#define RC_STATLIN_STR (RC_BASE + 2850) +#define RC_COMMON_CORE (RC_BASE + 2950) +#define RC_WIZARD (RC_BASE + 3050) +#define RC_POPUPS (RC_BASE + 3150) +#define RC_SHELLS (RC_BASE + 3250) +#define RC_CFGITEMS (RC_BASE + 3350) +#define RC_LINGU (RC_BASE + 3450) +#define RC_POOLCHRFMT_PRGM (RC_BASE + 3550) +#define RC_POOLHTMLCHRFMT_PRGM (RC_BASE + 3590) +#define RC_POOLFRMFMT_PRGM (RC_BASE + 3630) +#define RC_POOLTXTCOLL_PRGM (RC_BASE + 3660) +#define RC_POOLPAGEDESC_PRGM (RC_BASE + 3850) +#define RC_POOLNUMRULE_PRGM (RC_BASE + 3900) + +/*-------------------------------------------------------------------- + Beschreibung: Bereiche ausspannen + --------------------------------------------------------------------*/ + +// App-Verzeichnis +#define RC_APP_BEGIN RC_APP +#define RC_APP_END (RC_APP_BEGIN + 199) + + + +// Dialog-Verzeichnis +#define RC_DIALOG_BEGIN RC_DIALOG +#define RC_DIALOG_END (RC_DIALOG_BEGIN + 99) + +// Editwin & Co +#define RC_DOCVW_BEGIN RC_DOCVW +#define RC_DOCVW_END (RC_DOCVW_BEGIN + 99) + +// SW/Web +#define RC_WEB_BEGIN RC_WEB +#define RC_WEB_END (RC_WEB_BEGIN + 199) + +//Globaldocument +#define RC_GLOBDOC_BEGIN RC_GLOBDOC +#define RC_GLOBDOC_END (RC_GLOBDOC_BEGIN + 99) + +// UI-View +#define RC_VIEW_BEGIN RC_VIEW +#define RC_VIEW_END (RC_VIEW_BEGIN + 99) + +// Zeichen Absatz Tab-Dialog +#define RC_CHRDLG_BEGIN RC_CHRDLG +#define RC_CHRDLG_END (RC_CHRDLG_BEGIN + 9) + +// Unsere Shell +#define RC_WRTSH_BEGIN RC_WRTSH +#define RC_WRTSH_END (RC_WRTSH_BEGIN + 199) + +// Verzeichnisse +#define RC_INDEX_BEGIN RC_INDEX +#define RC_INDEX_END (RC_INDEX + 99) + +// +#define RC_RIBBAR_BEGIN RC_RIBBAR +#define RC_RIBBAR_END (RC_RIBBAR_BEGIN + 99) + +// globale Ressourcen +#define RC_GLOBALS_BEGIN RC_GLOBALS +#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 99) + +// Format-Vorlagen +#define RC_FMTUI_BEGIN RC_FMTUI +#define RC_FMTUI_END (RC_FMTUI_BEGIN + 69) + + +// Grafik Dialoge +#define RC_GRFDLG_BEGIN RC_GRFDLG +#define RC_GRFDLG_END (RC_GRFDLG_BEGIN + 99) + +// ???? +#define RC_FSTDLG_BEGIN RC_FSTDLG +#define RC_FSTDLG_END (RC_FSTDLG_BEGIN + 99) + +// Rahmen Dialoge +#define RC_FRMDLG_BEGIN RC_FRMDLG +#define RC_FRMDLG_END (RC_FRMDLG_BEGIN + 99) + +// Feld Dialoge +#define RC_FLDDLG_BEGIN RC_FLDDLG +#define RC_FLDDLG_END (RC_FLDDLG_BEGIN + 149) + +// Utilities UI +#define RC_UTLUI_BEGIN RC_UTLUI +#define RC_UTLUI_END (RC_UTLUI + 99) + +// Utilities UI-Attribute +#define RC_ATTR_BEGIN RC_ATTR +#define RC_ATTR_END (RC_ATTR + 99) + +// Tabellen +#define RC_TABLE_BEGIN RC_TABLE +#define RC_TABLE_END (RC_TABLE + 99) + +// Konfiguration +#define RC_CONFIG_BEGIN RC_CONFIG +#define RC_CONFIG_END (RC_CONFIG + 99) + + +// Verschiedenes +#define RC_MISC_BEGIN RC_MISC +#define RC_MISC_END (RC_MISC + 99) + +// DBMgr +#define RC_DBUI_BEGIN RC_DBUI +#define RC_DBUI_END (RC_DBUI + 99) + +// Der Rest der Imp-Klassen +#define RC_DOCHDL_BEGIN RC_DOCHDL +#define RC_DOCHDL_END (RC_DOCHDL + 99) + +// Zeichenvorlagen +#define RC_POOLCHRFMT_BEGIN RC_POOLCHRFMT +#define RC_POOLCHRFMT_END (RC_POOLCHRFMT + 29) +#define RC_POOLCHRFMT_HTML_BEGIN RC_POOLHTMLCHRFMT +#define RC_POOLCHRFMT_HTML_END (RC_POOLHTMLCHRFMT+ 30) + +#define RC_POOLCHRFMT_PRGM_BEGIN RC_POOLCHRFMT_PRGM +#define RC_POOLCHRFMT_PRGM_END (RC_POOLCHRFMT_PRGM + 29) +#define RC_POOLCHRFMT_PRGM_HTML_BEGIN RC_POOLHTMLCHRFMT_PRGM +#define RC_POOLCHRFMT_PRGM_HTML_END (RC_POOLHTMLCHRFMT_PRGM+ 30) + +// Rahmenvorlagen +#define RC_POOLFRMFMT_BEGIN RC_POOLFRMFMT +#define RC_POOLFRMFMT_END (RC_POOLFRMFMT + 20) + +#define RC_POOLFRMFMT_PRGM_BEGIN RC_POOLFRMFMT_PRGM +#define RC_POOLFRMFMT_PRGM_END (RC_POOLFRMFMT_PRGM + 20) + +// Collections +#define RC_POOLTXTCOLL_BEGIN RC_POOLTXTCOLL + +#define RC_POOLCOLL_TEXT_BEGIN RC_POOLTXTCOLL +#define RC_POOLCOLL_TEXT_END (RC_POOLTXTCOLL + 19) +#define RC_POOLCOLL_LISTS_BEGIN (RC_POOLTXTCOLL + 20) +#define RC_POOLCOLL_LISTS_END (RC_POOLTXTCOLL + 69) +#define RC_POOLCOLL_EXTRA_BEGIN (RC_POOLTXTCOLL + 70) +#define RC_POOLCOLL_EXTRA_END (RC_POOLTXTCOLL + 89) +#define RC_POOLCOLL_REGISTER_BEGIN (RC_POOLTXTCOLL + 90) +#define RC_POOLCOLL_REGISTER_END (RC_POOLTXTCOLL + 119) +#define RC_POOLCOLL_DOC_BEGIN (RC_POOLTXTCOLL + 130) +#define RC_POOLCOLL_DOC_END (RC_POOLTXTCOLL + 139) +#define RC_POOLCOLL_HTML_BEGIN (RC_POOLTXTCOLL + 140) +#define RC_POOLCOLL_HTML_END (RC_POOLTXTCOLL + 169) + +#define RC_POOLTXTCOLL_END RC_POOLCOLL_HTML_END + +#define RC_POOLCOLL_PRGM_PRGM__BEGIN RC_POOLTXTCOLL_PRGM + +#define RC_POOLCOLL_PRGM_TEXT_BEGIN RC_POOLTXTCOLL_PRGM +#define RC_POOLCOLL_PRGM_TEXT_END (RC_POOLTXTCOLL_PRGM + 19) +#define RC_POOLCOLL_PRGM_LISTS_BEGIN (RC_POOLTXTCOLL_PRGM + 20) +#define RC_POOLCOLL_PRGM_LISTS_END (RC_POOLTXTCOLL_PRGM + 69) +#define RC_POOLCOLL_PRGM_EXTRA_BEGIN (RC_POOLTXTCOLL_PRGM + 70) +#define RC_POOLCOLL_PRGM_EXTRA_END (RC_POOLTXTCOLL_PRGM + 89) +#define RC_POOLCOLL_PRGM_REGISTER_BEGIN (RC_POOLTXTCOLL_PRGM + 90) +#define RC_POOLCOLL_PRGM_REGISTER_END (RC_POOLTXTCOLL_PRGM + 119) +#define RC_POOLCOLL_PRGM_DOC_BEGIN (RC_POOLTXTCOLL_PRGM + 130) +#define RC_POOLCOLL_PRGM_DOC_END (RC_POOLTXTCOLL_PRGM + 139) +#define RC_POOLCOLL_PRGM_HTML_BEGIN (RC_POOLTXTCOLL_PRGM + 140) +#define RC_POOLCOLL_PRGM_HTML_END (RC_POOLTXTCOLL_PRGM + 169) + +#define RC_POOLTXTCOLL_PRGM__END RC_POOLCOLL_PRGM_HTML_END + +// Poolvorlagen Seite +#define RC_POOLPAGEDESC_BEGIN RC_POOLPAGEDESC +#define RC_POOLPAGEDESC_END (RC_POOLPAGEDESC + 10) + +#define RC_POOLPAGEDESC_PRGM_BEGIN RC_POOLPAGEDESC_PRGM +#define RC_POOLPAGEDESC_PRGM_END (RC_POOLPAGEDESC_PRGM + 10) + +// Poolvorlagen Numerierung +#define RC_POOLNUMRULE_BEGIN RC_POOLNUMRULE +#define RC_POOLNUMRULE_END (RC_POOLNUMRULE + 10) + +#define RC_POOLNUMRULE_PRGM_BEGIN RC_POOLNUMRULE_PRGM +#define RC_POOLNUMRULE_PRGM_END (RC_POOLNUMRULE_PRGM + 10) + +// Envelp-Verzeichnis +#define RC_ENVELP_BEGIN (RC_ENVELP ) +#define RC_ENVELP_END (RC_ENVELP + 99) + +// Statuszeile mit Laufbalken +#define RC_STATLIN_STR_BEGIN (RC_STATLIN_STR) +#define RC_STATLIN_STR_END (RC_STATLIN_STR + 49) + +// Gemeinsame Core-Strings +#define RC_COMCORE_BEGIN (RC_COMMON_CORE) +#define RC_COMCORE_END (RC_COMMON_CORE + 49) + +// Wizzards +#define RC_WIZARD_BEGIN RC_WIZARD +#define RC_WIZARD_END (RC_WIZARD + 99) + +// Shell-Verzeichnis +#define RC_SHELLS_BEGIN RC_SHELLS +#define RC_SHELLS_END (RC_SHELLS + 99) + +// PopUpMenu's +#define RC_POPUPS_BEGIN RC_POPUPS +#define RC_POPUPS_END (RC_POPUPS + 99) + +// Strings fuer ConfigItems in div. Verzeichnissen +#define RC_CFGITEMS_BEGIN RC_CFGITEMS +#define RC_CFGITEMS_END (RC_CFGITEMS + 99) + +// Lingu +#define RC_LINGU_BEGIN RC_LINGU +#define RC_LINGU_END (RC_LINGU + 99) + + +#endif diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx new file mode 100644 index 000000000000..51b54f0e1630 --- /dev/null +++ b/sw/inc/redline.hxx @@ -0,0 +1,312 @@ +/************************************************************************* + * + * $RCSfile: redline.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 _REDLINE_HXX +#define _REDLINE_HXX + +#ifndef _DATETIME_HXX //autogen +#include <tools/datetime.hxx> +#endif +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif + +#ifndef _PAM_HXX +#include "pam.hxx" +#endif +#ifndef _REDLENUM_HXX +#include "redlenum.hxx" // enums +#endif + +class SfxItemSet; + +class SwRedlineExtraData +{ + SwRedlineExtraData( const SwRedlineExtraData& ); + SwRedlineExtraData& operator=( const SwRedlineExtraData& ); + +protected: + SwRedlineExtraData() {} + +public: + virtual ~SwRedlineExtraData(); + virtual SwRedlineExtraData* CreateNew() const = 0; + + virtual void Accept( SwPaM& rPam ) const; + virtual void Reject( SwPaM& rPam ) const; + virtual int operator == ( const SwRedlineExtraData& ) const; +}; + +class SwRedlineExtraData_FmtColl : public SwRedlineExtraData +{ + String sFmtNm; + SfxItemSet* pSet; + USHORT nPoolId; +public: + SwRedlineExtraData_FmtColl( const String& rColl, USHORT nPoolFmtId, + const SfxItemSet* pSet = 0 ); + virtual ~SwRedlineExtraData_FmtColl(); + virtual SwRedlineExtraData* CreateNew() const; + virtual void Reject( SwPaM& rPam ) const; + virtual int operator == ( const SwRedlineExtraData& ) const; + + void SetItemSet( const SfxItemSet& rSet ); +}; + +class SwRedlineExtraData_Format : public SwRedlineExtraData +{ + USHORT nWhich; +public: + SwRedlineExtraData_Format( USHORT nWhich ); + virtual SwRedlineExtraData* CreateNew() const; + virtual void Reject( SwPaM& rPam ) const; + virtual int operator == ( const SwRedlineExtraData& ) const; +}; + + +class SwRedlineData +{ + friend class SwRedline; + SwRedlineData* pNext; // Verweis auf weitere Daten + SwRedlineExtraData* pExtraData; + + String sComment; + DateTime aStamp; + SwRedlineType eType; + USHORT nAuthor, nSeqNo; + +public: + SwRedlineData( SwRedlineType eT, USHORT nAut ); + SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext = TRUE ); + + // fuer sw3io: pNext/pExtraData gehen in eigenen Besitz ueber! + SwRedlineData( SwRedlineType eT, USHORT nAut, const DateTime& rDT, + const String& rCmnt, SwRedlineData* pNxt, + SwRedlineExtraData* pExtraData = 0 ); + + ~SwRedlineData(); + + int operator==( const SwRedlineData& rCmp ) const + { + return nAuthor == rCmp.nAuthor && + eType == rCmp.eType && + sComment == rCmp.sComment && + (( !pNext && !rCmp.pNext ) || + ( pNext && rCmp.pNext && *pNext == *rCmp.pNext )) && + (( !pExtraData && !rCmp.pExtraData ) || + ( pExtraData && rCmp.pExtraData && + *pExtraData == *rCmp.pExtraData )); + } + int operator!=( const SwRedlineData& rCmp ) const + { return !operator==( rCmp ); } + + SwRedlineType GetType() const + { return SwRedlineType( eType & REDLINE_NO_FLAG_MASK); } + SwRedlineType GetRealType() const { return eType; } + USHORT GetAuthor() const { return nAuthor; } + const String& GetComment() const { return sComment; } + const DateTime& GetTimeStamp() const { return aStamp; } + inline const SwRedlineData* Next() const{ return pNext; } + + void SetTimeStamp( const DateTime& rDT) + { aStamp = rDT; aStamp.SetSec( 0 ); aStamp.Set100Sec( 0 ); } + void SetComment( const String& rS ) { sComment = rS; } + void SetAutoFmtFlag() + { eType = SwRedlineType( eType | REDLINE_FORM_AUTOFMT ); } + int CanCombine( const SwRedlineData& rCmp ) const + { + return nAuthor == rCmp.nAuthor && + eType == rCmp.eType && + sComment == rCmp.sComment && + GetTimeStamp() == rCmp.GetTimeStamp() && + (( !pNext && !rCmp.pNext ) || + ( pNext && rCmp.pNext && + pNext->CanCombine( *rCmp.pNext ))) && + (( !pExtraData && !rCmp.pExtraData ) || + ( pExtraData && rCmp.pExtraData && + *pExtraData == *rCmp.pExtraData )); + } + + // ExtraData wird kopiert, der Pointer geht also NICHT in den Besitz + // des RedlineObjectes! + void SetExtraData( const SwRedlineExtraData* pData ); + const SwRedlineExtraData* GetExtraData() const { return pExtraData; } + + // fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur + // fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei, + // das es noch weitere geben kann! + USHORT GetSeqNo() const { return nSeqNo; } + void SetSeqNo( USHORT nNo ) { nSeqNo = nNo; } +}; + + +class SwRedline : public SwPaM +{ + SwRedlineData* pRedlineData; + SwNodeIndex* pCntntSect; + BOOL bDelLastPara : 1; + BOOL bIsLastParaDelete : 1; + BOOL bIsVisible : 1; + + void MoveToSection(); + void CopyToSection(); + void DelCopyOfSection(); + void MoveFromSection(); + +public: + SwRedline( SwRedlineType eType, const SwPaM& rPam ); + SwRedline( SwRedlineType eTyp, const SwPosition& rPos ); + SwRedline( const SwRedlineData& rData, const SwPaM& rPam ); + SwRedline( const SwRedlineData& rData, const SwPosition& rPos ); + // fuer sw3io: pData geht in eigenen Besitz ueber! + SwRedline( SwRedlineData* pData, const SwPosition& rPos, BOOL bVsbl, + BOOL bDelLP, BOOL bIsPD ) : + SwPaM( rPos ), pCntntSect( 0 ), pRedlineData( pData ), + bIsVisible( bVsbl ), bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ) + {} + SwRedline( const SwRedline& ); + virtual ~SwRedline(); + + SwNodeIndex* GetContentIdx() const { return pCntntSect; } + // fuers Undo + void SetContentIdx( const SwNodeIndex* ); + + BOOL IsVisible() const { return bIsVisible; } + BOOL IsDelLastPara() const { return bDelLastPara; } + BOOL IsLastParaDelete() const { return bIsLastParaDelete; } + + // das BOOL besagt, ob nach dem setzen der Pos kein Bereich mehr + // aufgespannt ist. -> TRUE, ansonten Bereich und FALSE + void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = 0 ) + { + if( !pSttPtr ) pSttPtr = Start(); + *pSttPtr = rPos; + } + void SetEnd( const SwPosition& rPos, SwPosition* pEndPtr = 0 ) + { + if( !pEndPtr ) pEndPtr = End(); + *pEndPtr = rPos; + } + // liegt eine gueltige Selektion vor? + BOOL HasValidRange() const; + + USHORT GetAuthor() const { return pRedlineData->GetAuthor(); } + const DateTime& GetTimeStamp() const { return pRedlineData->GetTimeStamp(); } + SwRedlineType GetType() const { return pRedlineData->GetType(); } + SwRedlineType GetRealType() const { return pRedlineData->GetRealType(); } + const SwRedlineData& GetRedlineData() const { return *pRedlineData; } + int operator==( const SwRedlineData& rCmp ) const + { return *pRedlineData == rCmp; } + int operator!=( const SwRedlineData& rCmp ) const + { return *pRedlineData != rCmp; } + void SetAutoFmtFlag() { pRedlineData->SetAutoFmtFlag(); } + + USHORT GetStackCount() const; + USHORT GetAuthor( USHORT nPos ) const; + const String& GetAuthorString( USHORT nPos = 0 ) const; + const DateTime& GetTimeStamp( USHORT nPos ) const; + SwRedlineType GetRealType( USHORT nPos ) const; + SwRedlineType GetType( USHORT nPos ) const + { return SwRedlineType( GetRealType( nPos ) & REDLINE_NO_FLAG_MASK); } + const String& GetComment( USHORT nPos ) const; + + const String& GetComment() const { return pRedlineData->GetComment(); } + void SetComment( const String& rS ) { pRedlineData->SetComment( rS ); } + + // ExtraData wird kopiert, der Pointer geht also NICHT in den Besitz + // des RedlineObjectes! + void SetExtraData( const SwRedlineExtraData* pData ) + { pRedlineData->SetExtraData( pData ); } + const SwRedlineExtraData* GetExtraData() const + { return pRedlineData->GetExtraData(); } + + // fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur + // fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei, + // das es noch weitere geben kann! + USHORT GetSeqNo() const { return pRedlineData->GetSeqNo(); } + void SetSeqNo( USHORT nNo ) { pRedlineData->SetSeqNo( nNo ); } + + // Beim Hide/ShowOriginal wird 2 mal ueber die Liste gelaufen, damit + // die Del-Redlines per Copy und Delete versteckt werden. Beim Move + // wird sonst die Attributierung falsch behandelt. + // Alle anderen Aufrufer muessen immer 0 angeben. + void CallDisplayFunc( USHORT nLoop = 0 ); + void Show( USHORT nLoop = 0 ); + void Hide( USHORT nLoop = 0 ); + void ShowOriginal( USHORT nLoop = 0 ); + + void InvalidateRange(); // das Layout anstossen + + BOOL IsOwnRedline( const SwRedline& rRedl ) const + { return GetAuthor() == rRedl.GetAuthor(); } + BOOL CanCombine( const SwRedline& rRedl ) const; + + void PushData( const SwRedline& rRedl, BOOL bOwnAsNext = TRUE ); + BOOL PopData(); + + int operator==( const SwRedline& ) const; + int operator<( const SwRedline& ) const; +}; + + + + + +#endif diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx new file mode 100644 index 000000000000..1930c1febe9c --- /dev/null +++ b/sw/inc/redlnaut.hxx @@ -0,0 +1,106 @@ +/************************************************************************* + * + * $RCSfile: redlnaut.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 _REDLNAUT_HXX +#define _REDLNAUT_HXX + +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif +#ifndef _SV_COLOR_HXX //autogen +#include <vcl/color.hxx> +#endif + +#include "swtypes.hxx" + +class SfxItemSet; + +class SwRedlineAuthor +{ + String sAuthor; + Color aChgLineColor; + SfxItemSet *pInsAttrSet, *pDelAttrSet, *pFmtAttrSet; + SwHoriOrient eChgLineOrient; + BYTE cDelChar; +public: + SwRedlineAuthor( SwAttrPool& rPool, const String& ); + SwRedlineAuthor( const SwRedlineAuthor& ); + ~SwRedlineAuthor(); + + SwRedlineAuthor& operator=( const SwRedlineAuthor& ); + + const String& GetAuthor() const { return sAuthor; } + + SfxItemSet& GetInsAttrSet() const { return *pInsAttrSet; } + SfxItemSet& GetDelAttrSet() const { return *pDelAttrSet; } + SfxItemSet& GetFmtAttrSet() const { return *pFmtAttrSet; } + + const Color& GetChgLineColor() const { return aChgLineColor; } + void SetChgLineColor( const Color& rCol ) { aChgLineColor = rCol; } + + SwHoriOrient GetChgLineOrient() const { return eChgLineOrient; } + void SetChgLineOrient( SwHoriOrient eVal ) { eChgLineOrient = eVal; } + + BYTE GetDelChar() const { return cDelChar; } + void SetDelChar( BYTE cCh = 0 ) { cDelChar = cCh; } +}; + + +#endif diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx new file mode 100644 index 000000000000..f48af6c4901e --- /dev/null +++ b/sw/inc/reffld.hxx @@ -0,0 +1,162 @@ +/************************************************************************* + * + * $RCSfile: reffld.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 _REFFLD_HXX +#define _REFFLD_HXX + +#ifndef _FLDBAS_HXX +#include <fldbas.hxx> +#endif + +class SfxPoolItem; +class SwDoc; +class SwTxtAttr; +class SwTxtNode; + +enum REFERENCESUBTYPE +{ + REF_SETREFATTR = 0, + REF_SEQUENCEFLD, + REF_BOOKMARK, + REF_OUTLINE, + REF_FOOTNOTE, + REF_ENDNOTE +}; + +enum REFERENCEMARK +{ + REF_BEGIN, + REF_PAGE = REF_BEGIN, + REF_CHAPTER, + REF_CONTENT, + REF_UPDOWN, + REF_PAGE_PGDESC, + REF_ONLYNUMBER, + REF_ONLYCAPTION, + REF_ONLYSEQNO, + REF_END +}; + + +/*-------------------------------------------------------------------- + Beschreibung: Referenz holen + --------------------------------------------------------------------*/ + +class SwGetRefFieldType : public SwFieldType +{ + SwDoc* pDoc; +public: + SwGetRefFieldType(SwDoc* pDoc ); + virtual SwFieldType* Copy() const; + + SwDoc* GetDoc() const { return pDoc; } + // ueberlagert, um alle Ref-Felder zu updaten + virtual void Modify( SfxPoolItem *, SfxPoolItem * ); + + void MergeWithOtherDoc( SwDoc& rDestDoc ); + + static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark, + USHORT nSubType, USHORT nSeqNo, + USHORT* pStt, USHORT* pEnd = 0 ); +}; + +/*-------------------------------------------------------------------- + Beschreibung: Referenzfeld + --------------------------------------------------------------------*/ + +class SwGetRefField : public SwField +{ + String sSetRefName; + String sTxt; + USHORT nSubType; + USHORT nSeqNo; +public: + SwGetRefField( SwGetRefFieldType*, const String& rSetRef, + USHORT nSubType, USHORT nSeqNo, ULONG nFmt ); + + virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String Expand() const; + virtual SwField* Copy() const; + + const String& GetSetRefName() const { return sSetRefName; } + + void UpdateField(); + void SetExpand( const String& rStr ) { sTxt = rStr; } + + // SubType erfragen/setzen + virtual USHORT GetSubType() const; + virtual void SetSubType( USHORT n ); + + // SequenceNo erfragen/setzen (nur fuer REF_SEQUENCEFLD interressant) + USHORT GetSeqNo() const { return nSeqNo; } + void SetSeqNo( USHORT n ) { nSeqNo = n; } + + // Name der Referenz + virtual const String& GetPar1() const; + virtual void SetPar1(const String& rStr); + + virtual String GetPar2() 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 // _REFFLD_HXX + diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx new file mode 100644 index 000000000000..750c7ec1a007 --- /dev/null +++ b/sw/inc/ring.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * $RCSfile: ring.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 _RING_HXX +#define _RING_HXX + +class Ring +{ + Ring *pNext; + Ring* pPrev; // zur Optimierung, damit das ein/ausketten schneller geht! + +protected: + Ring() { pNext = this; pPrev = this; } + Ring( Ring * ); +public: + virtual ~Ring(); + void MoveTo( Ring *pDestRing ); + void MoveRingTo( Ring *pDestRing ); + + Ring* GetNext() const { return pNext; } + Ring* GetPrev() const { return pPrev; } +}; + + +#endif diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx new file mode 100644 index 000000000000..434d3edc0462 --- /dev/null +++ b/sw/inc/rolbck.hxx @@ -0,0 +1,433 @@ +/************************************************************************* + * + * $RCSfile: rolbck.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 _ROLBCK_HXX +#define _ROLBCK_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif +#ifndef _SVSTDARR_HXX +#define _SVSTDARR_USHORTS +#define _SVSTDARR_USHORTSSORT +#include <svtools/svstdarr.hxx> +#endif + +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +//Nur die History anziehen, um das docnew.cxx gegen die CLOOK's zu behaupten. + +class SwDoc; +class SwFmt; +class SwFmtColl; +class SwHstryHint; +class SwBookmark; +class SwTxtAttr; +class SfxPoolItem; +class SwTxtNode; +class SwCntntNode; +class SwUndoSaveSection; +class SwTxtFtn; +class SwTxtFlyCnt; +class SwUndoDelLayFmt; +class SwFlyFrmFmt; +class SwFmtFld; +class SwTxtFld; +class SwFieldType; +class SwTxtTOXMark; +class SwTxtRefMark; +class SwFrmFmt; +class SwNodeIndex; +class SwpHints; +class SwFmtChain; +class SwNode; + +#ifndef ROLBCK_HISTORY_ONLY + +#ifndef _TOX_HXX +#include <tox.hxx> +#endif + +#ifndef PRODUCT +class Writer; +#define OUT_HSTR_HINT( name ) \ + friend Writer& OutUndo_Hstr_ ## name( Writer&, const SwHstryHint& ); +#else +#define OUT_HSTR_HINT( name ) +#endif + +enum HISTORY_HINT { + HSTRY_SETFMTHNT, + HSTRY_RESETFMTHNT, + HSTRY_SETTXTHNT, + HSTRY_SETTXTFLDHNT, + HSTRY_SETREFMARKHNT, + HSTRY_SETTOXMARKHNT, + HSTRY_RESETTXTHNT, + HSTRY_SETFTNHNT, + HSTRY_CHGFMTCOLL, + HSTRY_FLYCNT, + HSTRY_BOOKMARK, + HSTRY_SETATTRSET, + HSTRY_RESETATTRSET, + HSTRY_CHGFLYANCHOR, + HSTRY_CHGFLYCHAIN, + HSTRY_END +}; +class SwHstryHint +{ + HISTORY_HINT eWhichId; +public: + SwHstryHint( HISTORY_HINT eWh ) : eWhichId( eWh ) {} + virtual ~SwHstryHint() {} // jetzt inline + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ) = 0; + HISTORY_HINT Which() const { return eWhichId; } +}; + +class SwSetFmtHint : public SwHstryHint +{ + SfxPoolItem* pAttr; + ULONG nNode; + USHORT nSetStt; + BYTE nNumLvl; + BOOL bNumStt; +public: + SwSetFmtHint( const SfxPoolItem* pFmtHt, ULONG nNode ); + virtual ~SwSetFmtHint(); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(SetFmtHnt) +}; + +class SwResetFmtHint : public SwHstryHint +{ + ULONG nNode; + USHORT nWhich; +public: + SwResetFmtHint( const SfxPoolItem* pFmtHt, ULONG nNode ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(ResetFmtHnt) +}; + +class SwSetTxtHint : public SwHstryHint +{ + SfxPoolItem *pAttr; + ULONG nNode; + xub_StrLen nStart, nEnd; +public: + SwSetTxtHint( /*const*/ SwTxtAttr* pTxtHt, ULONG nNode ); + virtual ~SwSetTxtHint(); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(SetTxtHnt) +}; + +class SwSetTxtFldHint : public SwHstryHint +{ + SwFmtFld* pFld; + SwFieldType* pFldType; + ULONG nNode; + xub_StrLen nPos; + USHORT nFldWhich; +public: + SwSetTxtFldHint( SwTxtFld* pTxtFld, ULONG nNode ); + virtual ~SwSetTxtFldHint(); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(SetTxtFldHnt) +}; + +class SwSetRefMarkHint : public SwHstryHint +{ + String aRefName; + ULONG nNode; + xub_StrLen nStart, nEnd; +public: + SwSetRefMarkHint( SwTxtRefMark* pTxtHt, ULONG nNode ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(SetRefMarkHnt) +}; + +class SwSetTOXMarkHint : public SwHstryHint +{ + String aTOXName; + TOXTypes eTOXTypes; + SwTOXMark aTOXMark; + ULONG nNode; + xub_StrLen nStart, nEnd; +public: + SwSetTOXMarkHint( SwTxtTOXMark* pTxtHt, ULONG nNode ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + int IsEqual( const SwTOXMark& rCmp ) const; + OUT_HSTR_HINT(SetToxMarkHnt) +}; + +class SwResetTxtHint : public SwHstryHint +{ + ULONG nNode; + xub_StrLen nStart, nEnd; + USHORT nAttr; +public: + SwResetTxtHint( USHORT nWhich, xub_StrLen nStt, xub_StrLen nEnd, ULONG nNode ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + + USHORT GetWhich() const { return nAttr; } + ULONG GetNode() const { return nNode; } + xub_StrLen GetCntnt() const { return nStart; } + OUT_HSTR_HINT(ResetTxtHnt) +}; + +class SwSetFtnHint : public SwHstryHint +{ + String aFtnStr; + SwUndoSaveSection* pUndo; + ULONG nNode; + xub_StrLen nStart; + BOOL bEndNote; +public: + SwSetFtnHint( SwTxtFtn* pTxtFtn, ULONG nNode ); + SwSetFtnHint( const SwTxtFtn& ); + ~SwSetFtnHint(); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + + const SwUndoSaveSection* GetUndoObj() const { return pUndo; } + SwUndoSaveSection* GetUndoObj() { return pUndo; } + OUT_HSTR_HINT(SetFtnHnt) +}; + +class SwChgFmtColl : public SwHstryHint +{ + const SwFmtColl* pColl; + ULONG nNode; + USHORT nSetStt; + BYTE nNdWhich, nNumLvl; + BOOL bNumStt; +public: + SwChgFmtColl( const SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(ChgFmtColl) +}; + +class SwHstryTxtFlyCnt : public SwHstryHint +{ + SwUndoDelLayFmt* pUndo; +public: + SwHstryTxtFlyCnt( SwTxtFlyCnt* pTxtFly ); // fuer Zeichengebundene + SwHstryTxtFlyCnt( SwFlyFrmFmt* pFlyFmt ); // fuer Absatzgebundene + ~SwHstryTxtFlyCnt(); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + SwUndoDelLayFmt* GetUDelLFmt() { return pUndo; } + OUT_HSTR_HINT(FlyCnt) +}; + +class SwHstryBookmark : public SwHstryHint +{ + String aName, aShortName; + ULONG nNode1, nNode2; + xub_StrLen nCntnt1, nCntnt2; + USHORT nKeyCode; + BYTE nTyp; +public: + enum { BKMK_POS = 1, BKMK_OTHERPOS = 2 }; + SwHstryBookmark( const SwBookmark&, BYTE nTyp ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(Bookmark) + + BOOL IsEqualBookmark( const SwBookmark& ); +}; + +class SwHstrySetAttrSet : public SwHstryHint +{ + SfxItemSet aOldSet; + SvUShorts aResetArr; + ULONG nNode; + USHORT nSetStt; + BYTE nNumLvl; + BOOL bNumStt; +public: + SwHstrySetAttrSet( const SfxItemSet& rSet, ULONG nNode, + const SvUShortsSort& rSetArr ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + OUT_HSTR_HINT(SetAttrSet) +}; + + +class SwHstryResetAttrSet : public SwHstryHint +{ + ULONG nNode; + xub_StrLen nStart, nEnd; + SvUShorts aArr; +public: + SwHstryResetAttrSet( const SfxItemSet& rSet, ULONG nNode, + xub_StrLen nStt = STRING_MAXLEN, + xub_StrLen nEnd = STRING_MAXLEN ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); + + const SvUShorts& GetArr() const { return aArr; } + ULONG GetNode() const { return nNode; } + xub_StrLen GetCntnt() const { return nStart; } + OUT_HSTR_HINT(ResetAttrSet) +}; + +class SwHstryChgFlyAnchor : public SwHstryHint +{ + SwFrmFmt* pFmt; + ULONG nOldPos; + xub_StrLen nOldCnt; +public: + SwHstryChgFlyAnchor( const SwFrmFmt& rFmt ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); +}; + +class SwHstryChgFlyChain : public SwHstryHint +{ + SwFlyFrmFmt *pPrevFmt, *pNextFmt, *pFlyFmt; +public: + SwHstryChgFlyChain( const SwFlyFrmFmt& rFmt, const SwFmtChain& rAttr ); + virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); +}; + + +#endif + +typedef SwHstryHint* SwHstryHintPtr; +SV_DECL_PTRARR_DEL( SwpHstry, SwHstryHintPtr, 0, 2 ) +class SwHistory : private SwpHstry +{ + friend class SwDoc; // eig. darf nur SwDoc::DelUndoObj zugreifen + friend class SwUndoWriter; // fuer den Undo/Redo-Writer + friend class SwRegHistory; // fuer Insert, von Histoy-Attributen + + USHORT nEndDiff; +public: + SwHistory( USHORT nInitSz = 0, USHORT nGrowSz = 2 ); + ~SwHistory(); + // loesche die History ab Start bis zum Ende + void Delete( USHORT nStart = 0 ); + // alle Objecte zwischen nStart und Array-Ende aufrufen und loeschen + BOOL Rollback( SwDoc* pDoc, USHORT nStart = 0 ); + // alle Objecte zwischen nStart und temporaeren Ende aufrufen und + // den Start als temporaeres Ende speichern + BOOL TmpRollback( SwDoc* pDoc, USHORT nStart, BOOL ToFirst = TRUE ); + + void Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue, + ULONG nNodeIdx ); + void Add( const SwTxtAttr* pTxtHt, ULONG nNodeIdx, + BOOL bNewAttr = TRUE ); + void Add( const SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd ); + void Add( const SwFmt*, ULONG nNodeIdx, BYTE nWhichNd ); + void Add( const SwBookmark&, BYTE ); + void Add( const SwFrmFmt& rFmt ); + void Add( const SwFlyFrmFmt&, USHORT& rSetPos ); + void Add( const SwTxtFtn& ); + + USHORT Count() const { return SwpHstry::Count(); } + USHORT GetTmpEnd() const { return SwpHstry::Count() - nEndDiff; } + USHORT SetTmpEnd( USHORT nTmpEnd ); // returne alten Wert + SwHstryHint* operator[]( USHORT nPos ) const { return SwpHstry::operator[](nPos); } + + // fuer SwUndoDelete::Undo/Redo + void Move( USHORT nPos, SwHistory *pIns, + USHORT nStart = 0, USHORT nEnd = USHRT_MAX ) + { + SwpHstry::Insert( pIns, nPos, nStart, nEnd ); + SwpHstry* pDel = pIns; + pDel->Remove( nStart, nEnd == USHRT_MAX + ? pDel->Count() - nStart + : nEnd ); + } + + // Hilfs-Methoden zum Sichern von Attributen in der History. + // Wird von UndoKlasse benutzt (Delete/Overwrite/Inserts) + void CopyAttr( const SwpHints* pHts, ULONG nNodeIdx, xub_StrLen nStt, + xub_StrLen nEnd, BOOL bFields ); + void CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx ); +}; + +#ifndef ROLBCK_HISTORY_ONLY + +class SwRegHistory : public SwClient +{ + SvUShortsSort aSetWhichIds; + SwHistory* pHstry; + const SwCntntNode * pNode; + ULONG nNodeIdx; + + void _MakeSetWhichIds(); +public: + SwRegHistory( SwHistory* pHst ); + SwRegHistory( SwTxtNode* pTxtNd, SwTxtAttr* pTxtHt, + USHORT nFlags, SwHistory* pHst ); + SwRegHistory( SwTxtNode* pTxtNode, const SfxItemSet& rSet, + xub_StrLen nStart, xub_StrLen nEnd, USHORT nFlags, + SwHistory* pHst ); + SwRegHistory( const SwNode& rNd, SwHistory* pHst ); + SwRegHistory( SwModify* pRegIn, const SwNode& rNd, SwHistory* pHst ); + + virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); + void Add( SwTxtAttr* pHt, const BOOL bNew = FALSE ); + + void RegisterInModify( SwModify* pRegIn, const SwNode& rNd ); +}; + +#endif + + +#endif // _ROLBCK_HXX + diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx new file mode 100644 index 000000000000..21ce689c636a --- /dev/null +++ b/sw/inc/section.hxx @@ -0,0 +1,444 @@ +/************************************************************************* + * + * $RCSfile: section.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 _SECTION_HXX +#define _SECTION_HXX + + +#ifndef _LNKBASE_HXX //autogen +#include <so3/lnkbase.hxx> +#endif +#ifndef _RTTI_HXX //autogen +#include <tools/rtti.hxx> +#endif +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif +#ifndef _SO2REF_HXX //autogen +#include <so3/so2ref.hxx> +#endif +#ifndef _FRMFMT_HXX +#include <frmfmt.hxx> +#endif + +// Forward Deklaration +class SwSectionFmt; +class SwDoc; +class SwSection; +class SwTOXBase; + +#ifndef SW_DECL_SWSERVEROBJECT_DEFINED +#define SW_DECL_SWSERVEROBJECT_DEFINED +class SvPseudoObject; +SO2_DECL_REF( SwServerObject ) +#endif + +SV_DECL_PTRARR( SwSections, SwSection*, 0, 4 ) + +enum SectionType { CONTENT_SECTION, + TOX_HEADER_SECTION, + TOX_CONTENT_SECTION, + DDE_LINK_SECTION = OBJECT_CLIENT_DDE, + FILE_LINK_SECTION = OBJECT_CLIENT_FILE +/* +// verbleiben noch: + OBJECT_CLIENT_SO = 0x80, + OBJECT_CLIENT_OLE = 0x82, + OBJECT_CLIENT_OLE_CACHE = 0x83, +*/ + }; + +enum LinkCreateType +{ + CREATE_NONE, // nichts weiter tun + CREATE_CONNECT, // Link gleich connecten + CREATE_UPDATE // Link connecten und updaten +}; + + +class SwSection : public SwClient +{ + // damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird! + friend class SwSectionNode; + // the "read CTOR" of SwSectionFrm have to change the Hiddenflag + friend class SwSectionFrm; + + String sSectionNm; + String sCondition; // erstmal, vielleicht auch mal ein Feld ?? + String sLinkFileName, sLinkFilePassWd; + + SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt + SvBaseLinkRef refLink; + + SectionType eType; + + BOOL bProtectFlag : 1; // Flags fuer schnelle Abfragen, wird ueber + // Attribut im Format gesetzt + BOOL bHiddenFlag : 1; // Flag: Absaetze versteckt ? + BOOL bHidden : 1; // alle Absaetze nicht sichtbar ? + BOOL bCondHiddenFlag : 1; // Hiddenflag fuer die Bedingung ? + BOOL bConnectFlag : 1; // Flag: "Verbindung zum Server" vorhanden? + + + void _SetHiddenFlag( int bHidden, int bCondition ); + void _SetProtectFlag( int bFlag ) { bProtectFlag = bFlag; } + + int _IsProtect() const; + +public: + TYPEINFO(); // rtti + + SwSection( SectionType eType, const String& rName, + SwSectionFmt* pFmt = 0 ); + ~SwSection(); + + // kopiere nur die Daten der Section! + // Ableitung bleibt (beim Left) erhalten. + SwSection& operator=( const SwSection& ); + int operator==( const SwSection& rCmp ) const; + + const String& GetName() const { return sSectionNm; } + void SetName( const String& rName ) { sSectionNm = rName; } + const SectionType GetType() const { return eType; } + void SetType( SectionType eNew ) { eType = eNew; } + + SwSectionFmt* GetFmt() { return (SwSectionFmt*)pRegisteredIn; } + SwSectionFmt* GetFmt() const { return (SwSectionFmt*)pRegisteredIn; } + + virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); + + // setze die Hidden/Protected -> gesamten Baum updaten ! + // (Attribute/Flags werden gesetzt/erfragt) + int IsHidden() const { return bHidden; } + int IsProtect() const { return GetFmt() ? _IsProtect() + : IsProtectFlag(); } + + void SetHidden( int bFlag = TRUE ); + void SetProtect( int bFlag = TRUE ); + + // erfrage die internen Flags (Zustand inklusive Parents nicht, was + // aktuell an der Section gesetzt ist!!) + int IsHiddenFlag() const { return bHiddenFlag; } + int IsProtectFlag() const { return bProtectFlag; } + + void SetCondHidden( int bFlag = TRUE ); + int IsCondHidden() const { return bCondHiddenFlag; } + // erfrage (auch ueber die Parents), ob diese Section versteckt sein soll. + int CalcHiddenFlag() const; + + + inline SwSection* GetParent() const; + + // setze/erfrage die Bedingung + const String& GetCondition() const { return sCondition; } + void SetCondition( const String& rNew ) { sCondition = rNew; } + + // setze/erfrage den gelinkten FileNamen + const String& GetLinkFileName() const; + void SetLinkFileName( const String& rNew, const String* pPassWd = 0 ); + // Passwort des gelinkten Files (nur waehrend der Laufzeit gueltig!) + const String& GetLinkFilePassWd() const { return sLinkFilePassWd; } + void SetLinkFilePassWd( const String& rS ) { sLinkFilePassWd = rS; } + + // Daten Server-Methoden + void SetRefObject( SvPseudoObject* pObj ); + const SwServerObject* GetObject() const { return &refObj; } + SwServerObject* GetObject() { return &refObj; } + BOOL IsServer() const { return refObj.Is(); } + + // Methoden fuer gelinkte Bereiche + USHORT GetUpdateType() const { return refLink->GetUpdateMode(); } + void SetUpdateType( USHORT nType ) { refLink->SetUpdateMode( nType ); } + + BOOL IsConnected() const { return refLink.Is(); } + void UpdateNow() { refLink->Update(); } + void Disconnect() { refLink->Disconnect(); } + + const SvBaseLink& GetBaseLink() const { return *refLink; } + + void CreateLink( LinkCreateType eType ); + + void MakeChildLinksVisible( const SwSectionNode& rSectNd ); + + BOOL IsLinkType() const + { return DDE_LINK_SECTION == eType || FILE_LINK_SECTION == eType; } + + // Flags fuer UI - Verbindung geklappt? + BOOL IsConnectFlag() const { return bConnectFlag; } + void SetConnectFlag( BOOL bFlag = TRUE ) { bConnectFlag = bFlag; } + + // return the TOX base class if the section is a TOX section + const SwTOXBase* GetTOXBase() const; + +private: + // privater Constructor, weil nie kopiert werden darf !! + SwSection( const SwSection& ); +}; + + +enum SectionSort { SORTSECT_NOT, SORTSECT_NAME, SORTSECT_POS }; + +class SwSectionFmt : public SwFrmFmt +{ + friend class SwDoc; + SwSection* _GetSection() const; + void UpdateParent(); // Parent wurde veraendert + +protected: + SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc ); + +public: + TYPEINFO(); //Bereits in Basisklasse Client drin. + ~SwSectionFmt(); + + //Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt). + virtual void DelFrms(); + + //Erzeugt die Ansichten + virtual void MakeFrms(); + + virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); + // erfrage vom Format Informationen + virtual BOOL GetInfo( SfxPoolItem& ) const; + + SwSection* GetSection() const { return (SwSection*)_GetSection(); } + inline SwSectionFmt* GetParent() const; + inline SwSection* GetParentSection() const; + + // alle Sections, die von dieser abgeleitet sind + // - sortiert nach : Name oder Position oder unsortiert + // - alle oder nur die, die sich im normalten Nodes-Array befinden + USHORT GetChildSections( SwSections& rArr, + SectionSort eSort = SORTSECT_NOT, + int bAllSections = TRUE ) const; + + // erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array + // befindet. + int IsInNodesArr() const; + + SwSectionNode* GetSectionNode( BOOL bAlways = FALSE ); + const SwSectionNode* GetSectionNode( BOOL bAlways = FALSE ) const + { return ((SwSectionFmt*)this)->GetSectionNode( bAlways ); } + + // ist die Section eine gueltige fuers GlobalDocument? + const SwSection* GetGlobalDocSection() const; +}; + +// -------------- inlines --------------------------------- + +inline SwSection* SwSection::GetParent() const +{ + register SwSectionFmt* pFmt = GetFmt(); + register SwSection* pRet = 0; + if( pFmt ) + pRet = pFmt->GetParentSection(); + return pRet; +} + +inline SwSectionFmt* SwSectionFmt::GetParent() const +{ + register SwSectionFmt* pRet = 0; + if( GetRegisteredIn() ) + pRet = PTR_CAST( SwSectionFmt, GetRegisteredIn() ); + return pRet; +} + +inline SwSection* SwSectionFmt::GetParentSection() const +{ + register SwSectionFmt* pParent = GetParent(); + register SwSection* pRet = 0; + if( pParent ) + pRet = pParent->_GetSection(); + return pRet; +} + +/************************************************************************* + + $Log: not supported by cvs2svn $ + Revision 1.40 2000/09/18 16:03:26 willem.vandorp + OpenOffice header added. + + Revision 1.39 2000/09/08 13:24:23 willem.vandorp + Header and footer replaced + + Revision 1.38 2000/04/19 15:41:58 jp + Unicode changes + + Revision 1.37 2000/02/11 14:26:27 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.36 1999/11/18 17:52:28 jp + new: GetTOXBase + + Revision 1.35 1999/07/27 18:20:18 JP + replace class SwTOXBaseRange with SwTOXBaseSection - TOX use now SwSections + + + Rev 1.34 27 Jul 1999 20:20:18 JP + replace class SwTOXBaseRange with SwTOXBaseSection - TOX use now SwSections + + Rev 1.33 23 Jul 1999 15:53:40 JP + Bug #67465#: SwSectionFrm CTOR have to change the hiddenflag + + Rev 1.32 21 Jun 1999 10:08:44 JP + new enums for new TOXs + + Rev 1.31 25 Mar 1999 21:20:34 JP + Bug #63929#: autom. erzeugen von Tabs im Inhaltsverzeichnis + + Rev 1.30 29 Oct 1998 14:26:18 JP + Task #58637#: neu Is-/SetConnectFlag + + Rev 1.29 26 Oct 1998 17:29:44 JP + Bug #54342#: Section merkt sich das Passwort der Datei + + Rev 1.28 12 Jun 1998 14:33:16 JP + Bug #51097#: im DTOR des SectionFormates ggfs. die ChildLinks sichbar machen + + Rev 1.27 27 Apr 1998 21:16:44 JP + Set-/SetCondition: Flag fuers Convertieren entfernt + + Rev 1.26 04 Aug 1997 16:43:06 MH + chg: header + + Rev 1.25 23 Jun 1997 15:44:16 JP + neu: GetGlobalDocSection + + Rev 1.24 13 Jun 1997 14:54:10 JP + neu: CalcHiddenFlag + + Rev 1.23 29 Oct 1996 16:17:58 MA + includes + + Rev 1.22 16 Oct 1996 16:31:22 JP + unbenutzte Methoden entfernt + + Rev 1.21 10 Jul 1996 17:58:54 OM + LocalizeDBName in Expfld verschoben + + Rev 1.20 10 Jul 1996 17:49:02 OM + LocalizeDBName in Expfld verschoben + + Rev 1.19 25 Jun 1996 12:24:14 MA + headerfiles + + Rev 1.18 11 Jun 1996 16:56:56 JP + GetLinkFileName: nicht mehr als Inline muessen ggfs. auf den Link zugreifen + + Rev 1.17 24 May 1996 15:42:14 OM + Bedingungen in Bereichen wandeln + + Rev 1.16 07 Mar 1996 18:11:16 JP + IsConnect - auf Is() abfragen + + Rev 1.15 12 Feb 1996 18:16:18 JP + Erweiterung: gelinkte Bereiche + + Rev 1.14 08 Feb 1996 19:14:26 JP + Erweiterung fuer gelinkte Bereiche + + Rev 1.13 30 Nov 1995 12:54:36 JP + _SetHiddenFlag - beide Flags ueber geben (Hidden&CondHidden) + + Rev 1.12 08 Nov 1995 10:03:06 OS + ChangeCondition => SetCondition + + Rev 1.11 11 Jul 1995 18:39:46 JP + neu: GetSectionNode, Set-/IsCondHidden - Bedingung auswerten + + Rev 1.10 29 Jun 1995 21:11:06 JP + Section mit Servier-Funktionalitaet + + Rev 1.9 19 Jun 1995 16:45:16 MA + Umbau fuer daemliche Compiler + + Rev 1.8 14 Jun 1995 16:07:46 JP + inline vor den inline Methoden + + Rev 1.7 06 Apr 1995 12:42:24 JP + neu: Member & Methoden fuer den 'gelinkten' Filenamen + + Rev 1.6 23 Feb 1995 17:38:46 JP + neu: SetName - setze neuen Namen an der Section + + Rev 1.5 03 Feb 1995 18:17:30 JP + IsProtect jetzt inline + + Rev 1.4 01 Feb 1995 10:52:32 JP + neu: erfrage/setze Bedingung + + Rev 1.3 26 Jan 1995 18:47:56 JP + GetChildSection: erweitert fuer UI + + Rev 1.2 26 Jan 1995 11:35:18 JP + SectionNode als friend der Section - zum Pfegen des HiddenFlags + + Rev 1.1 24 Jan 1995 20:03:12 JP + neu: IsInNodesArr - abfrage, ob Section nicht im UndoNodes-Array steht + + Rev 1.0 18 Jan 1995 19:22:58 JP + Initial revision. + +*************************************************************************/ + +#endif + //_SECTION_HXX + diff --git a/sw/inc/segdefs.hxx b/sw/inc/segdefs.hxx new file mode 100644 index 000000000000..5cd2ae79114c --- /dev/null +++ b/sw/inc/segdefs.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * $RCSfile: segdefs.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): _______________________________________ + * + * + ************************************************************************/ +#include "segdefs_.hxx" diff --git a/sw/inc/segdefs_.hxx b/sw/inc/segdefs_.hxx new file mode 100644 index 000000000000..0b3e6e3a3e73 --- /dev/null +++ b/sw/inc/segdefs_.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * $RCSfile: segdefs_.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): _______________________________________ + * + * + ************************************************************************/ diff --git a/sw/inc/shellid.hxx b/sw/inc/shellid.hxx new file mode 100644 index 000000000000..e6a9a3296e50 --- /dev/null +++ b/sw/inc/shellid.hxx @@ -0,0 +1,106 @@ +/************************************************************************* + * + * $RCSfile: shellid.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 _SHELLID_HXX +#define _SHELLID_HXX + +#ifndef _SFX_SHELL_HXX //autogen +#include <sfx2/shell.hxx> +#endif + +/*-------------------------------------------------------------------- + Beschreibung: Mapping fuer UI-Parameter + --------------------------------------------------------------------*/ + +#define SW_BASESHELL (SFX_INTERFACE_SW_START + 1) +#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + 2) +#define SW_LISTSHELL (SFX_INTERFACE_SW_START + 3) +#define SW_TABSHELL (SFX_INTERFACE_SW_START + 4) +#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + 5) +#define SW_GRFSHELL (SFX_INTERFACE_SW_START + 6) +#define SW_OLESHELL (SFX_INTERFACE_SW_START + 7) +#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + 8) +#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + 9) + +#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + 10) +#define SW_DOCSHELL (SFX_INTERFACE_SW_START + 11) +#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + 12) +#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + 13) +#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + 14) +#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + 15) + +#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + 16) +#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + 17) +#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + 18) + +#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + 19) +#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + 20) +#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + 21) +#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + 22) +#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + 23) +#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + 24) +#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + 25) +#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + 26) +#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + 27) +#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + 28) +#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + 29) +#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + 30) + +#endif // _UIPARAM_HXX diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx new file mode 100644 index 000000000000..3fe1e4765887 --- /dev/null +++ b/sw/inc/shellio.hxx @@ -0,0 +1,696 @@ +/************************************************************************* + * + * $RCSfile: shellio.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 _SHELLIO_HXX +#define _SHELLIO_HXX + +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif +#ifndef _DATE_HXX //autogen +#include <tools/date.hxx> +#endif +#ifndef _TIME_HXX //autogen +#include <tools/time.hxx> +#endif +#ifndef _DATETIME_HXX //autogen +#include <tools/datetime.hxx> +#endif +#ifndef _REF_HXX //autogen +#include <tools/ref.hxx> +#endif +#ifndef _SOT_FORMATS_HXX //autogen +#include <sot/formats.hxx> +#endif + +#ifndef _SWTYPES_HXX +#include <swtypes.hxx> +#endif +#ifndef _DOCFAC_HXX +#include <docfac.hxx> // SwDocFac +#endif + +// einige Forward - Deklarationen +class SfxFactoryFilterContainer; +class SfxFilter; +class SfxItemPool; +class SfxItemSet; +class SfxMedium; +class SvPtrarr; +class SvStorage; +class SvStorageStreamRef; +class SvStream; +class SvStringsSortDtor; +class SvxFontItem; +class SvxMacroTableDtor; +class Sw3Io; +class SwCntntNode; +class SwCrsrShell; +class SwDoc; +class SwPaM; +class SwTextBlocks; +struct SwPosition; +struct Writer_Impl; + +// ab so vielen chars wird ein mit einem ASCII/W4W-Reader eingelesener +// Absatz zwangsweise umgebrochen. Muss immer groesser als 200 sein !!! +#define MAX_ASCII_PARA 10000 + + +class SwAsciiOptions +{ + String sFont; + rtl_TextEncoding eCharSet; + USHORT nLanguage; + LineEnd eCRLF_Flag; + +public: + + const String& GetFontName() const { return sFont; } + void SetFontName( const String& rFont ) { sFont = rFont; } + + rtl_TextEncoding GetCharSet() const { return eCharSet; } + void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; } + + USHORT GetLanguage() const { return nLanguage; } + void SetLanguage( USHORT nVal ) { nLanguage = nVal; } + + LineEnd GetParaFlags() const { return eCRLF_Flag; } + void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; } + + void Reset() + { + sFont.Erase(); + eCRLF_Flag = GetSystemLineEnd(); + eCharSet = ::gsl_getSystemTextEncoding(); + nLanguage = 0; + } + // for the automatic conversion (mail/news/...) + void ReadUserData( const String& ); + void WriteUserData( String& ); + + SwAsciiOptions() { Reset(); } +}; + +/**************** SwReader/Reader ************************/ +// Basisklasse der moeglichen Optionen fuer einen speziellen Reader +class Reader; +// Ruft den Reader mit seinen Optionen, Dokument, Cursor etc. +class SwReader; +// SwRead ist der Pointer auf die Read-Optionen-Basisklasse +typedef Reader *SwRead; + +class SwgReaderOption +{ + SwAsciiOptions aASCIIOpts; + union + { + BOOL bFmtsOnly; + struct + { + BOOL bFrmFmts: 1; + BOOL bPageDescs: 1; + BOOL bTxtFmts: 1; + BOOL bNumRules: 1; + BOOL bMerge:1; + } Fmts; + } What; + +public: + void ResetAllFmtsOnly() { What.bFmtsOnly = 0; } + void SetAllFmtsOnly() { What.bFmtsOnly = (BOOL)0xff; } + BOOL IsFmtsOnly() const { return What.bFmtsOnly; } + + BOOL IsFrmFmts() const { return What.Fmts.bFrmFmts; } + void SetFrmFmts( const BOOL bNew) { What.Fmts.bFrmFmts = bNew; } + + BOOL IsPageDescs() const { return What.Fmts.bPageDescs; } + void SetPageDescs( const BOOL bNew) { What.Fmts.bPageDescs = bNew; } + + BOOL IsTxtFmts() const { return What.Fmts.bTxtFmts; } + void SetTxtFmts( const BOOL bNew) { What.Fmts.bTxtFmts = bNew; } + + BOOL IsNumRules() const { return What.Fmts.bNumRules; } + void SetNumRules( const BOOL bNew) { What.Fmts.bNumRules = bNew; } + + BOOL IsMerge() const { return What.Fmts.bMerge; } + void SetMerge( const BOOL bNew ) { What.Fmts.bMerge = bNew; } + + const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; } + void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; } + void ResetASCIIOpts() { aASCIIOpts.Reset(); } + + SwgReaderOption() + { ResetAllFmtsOnly(); aASCIIOpts.Reset(); } +}; + +class SwReader: public SwDocFac +{ + SvStream* pStrm; + SvStorage* pStg; + SfxMedium* pMedium; // wer ein Medium haben will (W4W) + + SwPaM* pCrsr; + String aFileName; + +public: + /* + * Initiales Einlesen. Dokument wird erst beim Read(..) angelegt. + * JP 25.04.95: oder falls es mitgegeben wird, in dieses. + * Sonderfall fuer Load mit Sw3Reader + */ + SwReader( SvStream&, const String& rFilename, SwDoc *pDoc = 0 ); + SwReader( SvStorage&, const String& rFilename, SwDoc *pDoc = 0 ); + SwReader( SfxMedium&, const String& rFilename, SwDoc *pDoc = 0 ); + /* + * In ein existierendes Dokument einlesen, Dokument und + * Position im Dokument werden aus dem SwPaM uebernommen. + */ + SwReader( SvStream&, const String& rFilename, SwPaM& ); + SwReader( SvStorage&, const String& rFilename, SwPaM& ); + SwReader( SfxMedium&, const String& rFilename, SwPaM& ); + + /* + * Nur SwReader::Read(...) ist die Export-Schnittstelle!!! + */ + BOOL NeedsPasswd( const Reader& ); + BOOL CheckPasswd( const String&, const Reader& ); + ULONG Read( const Reader& ); + + // ask for glossaries + BOOL HasGlossaries( const Reader& ); + BOOL ReadGlossaries( const Reader&, SwTextBlocks&, BOOL bSaveRelFiles ); +}; + + + +/* */ +/**************** SPEZIELLE Reader ************************/ + +// spezielle - Reader koennen beides sein !! (Excel, W4W, .. ) +#define SW_STREAM_READER 1 +#define SW_STORAGE_READER 2 + +class Reader +{ + friend class SwReader; + SwDoc* pTemplate; + String aTemplateNm; + Date aDStamp; + Time aTStamp; + DateTime aChkDateTime; + +protected: + SvStream* pStrm; + SvStorage* pStg; + SfxMedium* pMedium; // wer ein Medium haben will (W4W) + + SwgReaderOption aOpt; + BOOL bInsertMode : 1; + BOOL bTmplBrowseMode : 1; + BOOL bReadUTF8: 1; // Stream als UTF-8 interpretieren + +public: + Reader(); + virtual ~Reader(); + + virtual int GetReaderType(); + SwgReaderOption& GetReaderOpt() { return aOpt; } + + virtual void SetFltName( const String& rFltNm ); + static void SetNoOutlineNum( SwDoc& rDoc ); + + // den Item-Set eines Frm-Formats an das alte Format anpassen + static void ResetFrmFmtAttrs( SfxItemSet &rFrmSet ); + + // die Rahmen-/Grafik-/OLE-Vorlagen an das alte Format (ohne + // Umrandung etc.) anpassen + static void ResetFrmFmts( SwDoc& rDoc ); + + // Die Filter-Vorlage laden, setzen und wieder freigeben + SwDoc* GetTemplateDoc(); + BOOL SetTemplate( SwDoc& rDoc ); + void ClearTemplate(); + void SetTemplateName( const String& rDir ); + void MakeHTMLDummyTemplateDoc(); + + BOOL IsReadUTF8() const { return bReadUTF8; } + void SetReadUTF8( BOOL bSet ) { bReadUTF8 = bSet; } + + virtual BOOL HasGlossaries() const; + virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const; + +private: + virtual ULONG Read(SwDoc &,SwPaM &,const String &)=0; + + // alle die die Streams / Storages nicht geoeffnet brauchen, + // muessen die Methode ueberladen (W4W!!) + virtual int SetStrmStgPtr(); +}; + +class RtfReader: public Reader +{ + virtual ULONG Read( SwDoc &,SwPaM &,const String &); +}; + + +class AsciiReader: public Reader +{ + friend class SwReader; + virtual ULONG Read( SwDoc &,SwPaM &,const String &); +public: + AsciiReader(): Reader() {} + + virtual void SetFltName( const String& rFltNm ); +}; + +class SwgReader: public Reader +{ + virtual ULONG Read( SwDoc &,SwPaM &,const String &); +}; + +class StgReader : public Reader +{ + String aFltName; + +protected: + ULONG OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ); + +public: + virtual int GetReaderType(); + const String& GetFltName() { return aFltName; } + virtual void SetFltName( const String& r ); +}; + + +class Sw3Reader : public StgReader +{ + Sw3Io* pIO; + virtual ULONG Read( SwDoc &,SwPaM &,const String &); +public: + Sw3Reader() : pIO( 0 ) {} + + Sw3Io* GetSw3Io() { return pIO; } + const Sw3Io* GetSw3Io() const { return pIO; } + void SetSw3Io( Sw3Io* pIo ) { pIO = pIo; } +}; + +/* */ +//////////////////////////////////////////////////////////////////////////// + +// Der uebergebene Stream muss dynamisch angelegt werden und +// vor dem Loeschen der Instanz per Stream() angefordert +// und geloescht werden! + +class SwImpBlocks; + +class SwTextBlocks +{ + friend class Sw2TextBlocks; + friend class Sw3IoImp; + SwImpBlocks* pImp; + ULONG nErr; + +public: + SwTextBlocks( const String& ); + SwTextBlocks( SvStorage& ); + ~SwTextBlocks(); + + void Flush(){} + + SwDoc* GetDoc(); + void ClearDoc(); // Doc-Inhalt loeschen + const String& GetName(); + void SetName( const String& ); + ULONG GetError() const { return nErr; } + + BOOL IsOld() const; + ULONG ConvertToNew(); // Textbausteine konvertieren + + USHORT GetCount() const; // Anzahl Textbausteine ermitteln + USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln + USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln + const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck + const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck + + BOOL Delete( USHORT ); // Loeschen + USHORT Rename( USHORT, const String*, const String* ); // Umbenennen + ULONG CopyBlock( SwTextBlocks& rSource, String& rSrcShort, + const String& rLong ); // Block kopieren + + BOOL BeginGetDoc( USHORT ); // Textbaustein einlesen + void EndGetDoc(); // Textbaustein wieder loslassen + + BOOL BeginPutDoc( const String&, const String& ); // Speichern Beginn + USHORT PutDoc(); // Speichern Ende + + const String& GetText( USHORT ); // Textinhalt einlesen + USHORT PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text) + + BOOL IsOnlyTextBlock( USHORT ) const; + BOOL IsOnlyTextBlock( const String& rShort ) const; + + const String& GetFileName() const; // Dateiname von pImp + BOOL IsReadOnly() const; // ReadOnly-Flag von pImp + + BOOL GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl ); + + String GetValidShortCut( const String& rLong, + BOOL bCheckInBlock = FALSE ) const; + + BOOL StartPutMuchBlockEntries(); + void EndPutMuchBlockEntries(); +}; + + +extern void _InitFilter(); +extern void _FinitFilter(); +extern SwRead ReadRtf, ReadAscii, ReadSwg, ReadSw3, ReadHTML, ReadXML; + +extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx + + +/* */ +///////////////////////////////////////////////////////////////////////////// + +/* + * Schreiben, Writer + */ + + +/* Basis-Klasse aller Writer */ + +class Writer : public SvRefBase +{ + SwAsciiOptions aAscOpts; + + void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ); + +protected: + Writer_Impl* pImpl; + + SvStream* pStrm; + SwPaM* pOrigPam; // der letze zu bearbeitende Pam + const String* pOrigFileName; + + void ResetWriter(); + BOOL CopyNextPam( SwPaM ** ); + + void PutNumFmtFontsInAttrPool(); + void PutEditEngFontsInAttrPool(); + + virtual ULONG WriteStream() = 0; + +public: + SwDoc* pDoc; + SwPaM* pCurPam; + BOOL bWriteAll : 1; + BOOL bShowProgress : 1; + BOOL bWriteClipboardDoc : 1; + BOOL bWriteOnlyFirstTable : 1; + BOOL bASCII_ParaAsCR : 1; + BOOL bASCII_ParaAsBlanc : 1; + BOOL bASCII_NoLastLineEnd : 1; + BOOL bUCS2_WithStartChar : 1; + + Writer(); + virtual ~Writer(); + + virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 ); + ULONG Write( SwPaM&, SvStream&, const String* = 0 ); + virtual ULONG Write( SwPaM&, SvStorage&, const String* = 0 ); + + virtual void SetPasswd( const String& ); + virtual void SetVersion( const String&, long ); + virtual BOOL IsStgWriter() const; + virtual BOOL IsSw3Writer() const; + + BOOL ShowProgress() const { return bShowProgress; } + void SetShowProgress( BOOL bFlag = FALSE ) { bShowProgress = bFlag; } + + const String* GetOrigFileName() const { return pOrigFileName; } + + const SwAsciiOptions& GetAsciiOptions() const { return aAscOpts; } + void SetAsciiOptions( const SwAsciiOptions& rOpt ) { aAscOpts = rOpt; } + + // suche die naechste Bookmark-Position aus der Bookmark-Tabelle + USHORT FindPos_Bkmk( const SwPosition& rPos ) const; + // build a bookmark table, which is sort by the node position. The + // OtherPos of the bookmarks also inserted. + void CreateBookmarkTbl(); + // search alle Bookmarks in the range and return it in the Array + USHORT GetBookmarks( const SwCntntNode& rNd, + xub_StrLen nStt, xub_StrLen nEnd, + SvPtrarr& rArr ); + + // lege einen neuen PaM an der Position an + SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, + BOOL bNodesArray = TRUE ) const; + + // kopiere ggfs. eine lokale Datei ins Internet + BOOL CopyLocalFileToINet( String& rFileNm, BOOL bFileToFile=FALSE ); + + // Stream-spezifische Routinen, im Storage-Writer NICHT VERWENDEN! + + // Optimierung der Ausgabe auf den Stream. + SvStream& OutLong( SvStream& rStrm, long nVal ); + SvStream& OutULong( SvStream& rStrm, ULONG nVal ); + + // Hex-Zahl ausgeben, default ist 2.stellige Zahl + SvStream& OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen = 2 ); + // 4-st. Hex-Zahl ausgeben + inline SvStream& OutHex4( SvStream& rStrm, USHORT nHex ) + { return OutHex( rStrm, nHex, 4 ); } + // 8-st. Hex-Zahl ausgeben + inline SvStream& OutHex8( SvStream& rStrm, ULONG nHex ) + { return OutHex( rStrm, nHex, 8 ); } + + inline SvStream& OutHex( USHORT nHex, BYTE nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); } + inline SvStream& OutHex4( USHORT nHex ) { return OutHex( Strm(), nHex, 4 ); } + inline SvStream& OutHex8( ULONG nHex ) { return OutHex( Strm(), nHex, 8 ); } + inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); } + inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); } + + void SetStrm( SvStream& rStrm ) { pStrm = &rStrm; } +#ifdef PRODUCT + SvStream& Strm() { return *pStrm; } +#else + SvStream& Strm(); +#endif +}; + +#ifndef SW_DECL_WRITER_DEFINED +#define SW_DECL_WRITER_DEFINED +SV_DECL_REF(Writer) +#endif +SV_IMPL_REF(Writer) + +// Basisklasse fuer alle Storage-Writer + +class StgWriter : public Writer +{ +protected: + String aFltName; + SvStorage* pStg; + + // Fehler beim Aufruf erzeugen + virtual ULONG WriteStream(); + virtual ULONG WriteStorage() = 0; + +public: + StgWriter() : Writer(), pStg( 0 ) {} + + virtual BOOL IsStgWriter() const; + virtual ULONG Write( SwPaM&, SvStorage&, const String* = 0 ); + + SvStorage& GetStorage() const { return *pStg; } + const String& GetFltName() const { return aFltName; } + void SetFltName( const String& r ) { aFltName = r; } +}; + +class Sw3Writer : public StgWriter +{ + Sw3Io* pIO; + BOOL bSaveAs : 1; + + virtual ULONG WriteStorage(); + +public: + Sw3Writer() : pIO( 0 ), bSaveAs( FALSE ) {} + + Sw3Io* GetSw3Io() { return pIO; } + const Sw3Io* GetSw3Io() const { return pIO; } + void SetSw3Io( Sw3Io* pIo, BOOL bSvAs = FALSE ) + { pIO = pIo; bSaveAs = bSvAs; } + + virtual BOOL IsSw3Writer() const; +}; + + + +// Schnittstellenklasse fuer den allgemeinen Zugriff auf die +// speziellen Writer + +class SwWriter +{ + SvStream* pStrm; + SvStorage* pStg; + SfxMedium* pMedium; + + SwPaM* pOutPam; + SwCrsrShell *pShell; + SwDoc &rDoc; + BOOL bWriteAll; + +public: + ULONG Write( WriterRef& rxWriter, const String* = 0); + + SwWriter( SvStream&, SwCrsrShell &,BOOL bWriteAll = FALSE ); + SwWriter( SvStream&, SwDoc & ); + SwWriter( SvStream&, SwPaM &, BOOL bWriteAll = FALSE ); + +// SwWriter( SvStorage&, SwCrsrShell &,BOOL bWriteAll = FALSE ); + SwWriter( SvStorage&, SwDoc & ); +// SwWriter( SvStorage&, SwPaM&, BOOL bWriteAll = FALSE ); + + SwWriter( SfxMedium&, SwCrsrShell &,BOOL bWriteAll = FALSE ); + SwWriter( SfxMedium&, SwDoc & ); +// SwWriter( SfxMedium&, SwPaM&, BOOL bWriteAll = FALSE ); +}; + + +/* */ +///////////////////////////////////////////////////////////////////////////// + +void GetRTFWriter( const String&, WriterRef& ); +void GetASCWriter( const String&, WriterRef& ); +void GetSw3Writer( const String&, WriterRef& ); +void GetHTMLWriter( const String&, WriterRef& ); +void GetXMLWriter( const String&, WriterRef& ); + +// Die folgende Klasse ist ein Wrappe fuer die Basic-I/O-Funktionen +// des Writer 3.0. Alles ist statisch. Alle u.a. Filternamen sind die +// Writer-internen Namen, d.h. die namen, die in INSTALL.INI vor dem +// Gleichheitszeichen stehen, z.b. SWG oder ASCII. + +class SwIoSystem +{ +public: + // suche ueber den Filtertext den Filtereintrag + static const SfxFilter* GetFilterOfFilterTxt( const String& rFilterNm, + const SfxFactoryFilterContainer* pCnt = 0 ); + // suche ueber den internen FormatNamen den Filtereintrag + static const SfxFilter* GetFilterOfFormat( const String& rFormat, + const SfxFactoryFilterContainer* pCnt = 0 ); + + // Feststellen des zu verwendenden Filters fuer die uebergebene + // Datei. Der Filtername wird zurueckgeliefert. Konnte kein Filter + // zurueckgeliefert werden, wird der Name des ASCII-Filters geliefert! + static const SfxFilter* GetFileFilter( const String& rFileName, + const String& rPrefFltName, + SfxMedium* pMedium = 0 ); + + // Feststellen ob das File in dem vorgegebenen Format vorliegt. + // Z.z werden nur unsere eigene Filter unterstuetzt!! + static FASTBOOL IsFileFilter( SfxMedium& rMedium, const String& rFmtName, + const SfxFilter** ppFlt = 0 ); + + static FASTBOOL IsValidStgFilter( SvStorage& , const SfxFilter& ); + + // gebe einen bestimmten Reader zurueck + static Reader* GetReader( const String& rFltName ); + // gebe einen bestimmten Writer zurueck + static void GetWriter( const String& rFltName, WriterRef& xWrt ); + + static const String GetSubStorageName( const SfxFilter& rFltr ); +}; + + +// ---------------------------------- +// diese Filter sind immer vorhanden und koennen ueber die +// Formatnamen gesucht werden. Alle anderen Filter sind nur intern +// bekannt. Die UI-Seite benutzt die GetReader()/GetWriter() -Funktionen, +// um die speziellen zu erhalten. + +extern sal_Char __FAR_DATA FILTER_SWG[]; // SWG-Filter +extern sal_Char __FAR_DATA FILTER_RTF[]; // RTF-Filter +extern sal_Char* FILTER_ANSI; // Ascii-Filter mit Default-CodeSet +extern sal_Char __FAR_DATA FILTER_BAS[]; // StarBasic (identisch mit ANSI) +extern sal_Char __FAR_DATA FILTER_W4W[]; // W4W-Filter +extern sal_Char __FAR_DATA FILTER_WW8[]; // WinWord 97-Filter +extern sal_Char __FAR_DATA FILTER_SW3[]; // SW3-Storage Filter +extern sal_Char __FAR_DATA FILTER_SW4[]; // SW4-Storage Filter +extern sal_Char __FAR_DATA FILTER_SW4[]; // SW4-Storage Filter +extern sal_Char __FAR_DATA FILTER_SW5[]; // SW5-Storage Filter +extern sal_Char __FAR_DATA FILTER_SWGV[]; // SWG-Vorlagen Filter +extern sal_Char __FAR_DATA FILTER_SW3V[]; // SW3-Storage Vorlagen Filter +extern sal_Char __FAR_DATA FILTER_SW4V[]; // SW4-Storage Vorlagen Filter +extern sal_Char __FAR_DATA FILTER_SW5V[]; // SW5-Storage Vorlagen Filter +extern sal_Char __FAR_DATA FILTER_SWW4V[]; // SW/Web Storage Vorlagen Filter +extern sal_Char __FAR_DATA FILTER_SWW5V[]; // SW/Web Storage Vorlagen Filter +extern sal_Char __FAR_DATA FILTER_TEXT_DLG[]; // text filter with encoding dialog +extern sal_Char __FAR_DATA FILTER_XML[]; // XML filter + + +// gebe einen gueltigen temp-Filenamen zurueck +String GetTmpFileName(); + + +#endif diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx new file mode 100644 index 000000000000..97fdb8cb0bf6 --- /dev/null +++ b/sw/inc/shellres.hxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * $RCSfile: shellres.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 _SHELLRES_HXX +#define _SHELLRES_HXX + + +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif + +#ifndef _BITMAP_HXX //autogen +#include <vcl/bitmap.hxx> +#endif + +#ifndef _SVSTDARR_HXX +#define _SVSTDARR_STRINGSDTOR +#include <svtools/svstdarr.hxx> +#endif + +struct ShellResource : public Resource +{ + + String aPostItAuthor; + String aPostItPage; + String aPostItLine; + + // Calc Fehlerstrings + String aCalc_Syntax; + String aCalc_ZeroDiv; + String aCalc_Brack; + String aCalc_Pow; + String aCalc_VarNFnd; + String aCalc_Overflow; + String aCalc_WrongTime; + String aCalc_Default; + String aCalc_Error; + + // fuers GetRefFeld - oben/unten + String aGetRefFld_Up, aGetRefFld_Down; + // fuer dynamisches Menu - String "alle" + String aStrAllPageHeadFoot; + // fuer einige Listboxen - String "keine" + String aStrNone; + // fuer Felder, die Fixiert sind + String aFixedStr; + + //names of TOXs + String aTOXIndexName; + String aTOXUserName; + String aTOXContentName; + String aTOXIllustrationsName; + String aTOXObjectsName; + String aTOXTablesName; + String aTOXAuthoritiesName; + + SvStringsDtor aDocInfoLst; + + // Fly-Anker Bmps +// Bitmap aAnchorBmp; +// Bitmap aDragAnchorBmp; + + // die AutoFormat-Redline-Kommentare + inline const SvStringsDtor& GetAutoFmtNameLst() const; + + ShellResource(); + ~ShellResource(); + +private: + void _GetAutoFmtNameLst() const; + SvStringsDtor *pAutoFmtNameLst; +}; + +inline const SvStringsDtor& ShellResource::GetAutoFmtNameLst() const +{ + if( !pAutoFmtNameLst ) + _GetAutoFmtNameLst(); + return *pAutoFmtNameLst; +} + + +#endif //_SHELLRES_HXX diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx new file mode 100644 index 000000000000..f971c5ebaad5 --- /dev/null +++ b/sw/inc/sortopt.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * + * $RCSfile: sortopt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SORTOPT_HXX +#define _SORTOPT_HXX + + +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif + +enum SwSortKeyType { SRT_APLHANUM, SRT_NUMERIC }; +enum SwSortOrder { SRT_ASCENDING, SRT_DESCENDING }; +enum SwSortDirection { SRT_COLUMNS, SRT_ROWS }; + +/*-------------------------------------------------------------------- + Beschreibung: SortierSchluessel + --------------------------------------------------------------------*/ +struct SwSortKey +{ + SwSortKey(); + SwSortKey(USHORT nId, SwSortKeyType eTyp, SwSortOrder eOrder); + SwSortKey(const SwSortKey& rOld); + + USHORT nColumnId; + SwSortKeyType eSortKeyType; + SwSortOrder eSortOrder; +}; + +SV_DECL_PTRARR(SwSortKeys, SwSortKey*, 3, 1) + +struct SwSortOptions +{ + SwSortOptions(); + ~SwSortOptions(); + SwSortOptions(const SwSortOptions& rOpt); + + BOOL bTable; + char nDeli; + SwSortDirection eDirection; + SwSortKeys aKeys; +}; + +#endif // _SORTOPT_HXX diff --git a/sw/inc/statstr.hrc b/sw/inc/statstr.hrc new file mode 100644 index 000000000000..8ed1814fbc36 --- /dev/null +++ b/sw/inc/statstr.hrc @@ -0,0 +1,88 @@ +/************************************************************************* + * + * $RCSfile: statstr.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _STATSTR_HRC +#define _STATSTR_HRC + +#include "rcid.hrc" + +#define STR_STATSTR_W4WREAD (RC_STATLIN_STR + 0) +#define STR_STATSTR_W4WWRITE (RC_STATLIN_STR + 1) +#define STR_STATSTR_SWGREAD (RC_STATLIN_STR + 2) +#define STR_STATSTR_SWGWRITE (RC_STATLIN_STR + 3) +#define STR_STATSTR_REFORMAT (RC_STATLIN_STR + 4) +#define STR_STATSTR_AUTOFORMAT (RC_STATLIN_STR + 5) +#define STR_STATSTR_IMPGRF (RC_STATLIN_STR + 6) +#define STR_STATSTR_SEARCH (RC_STATLIN_STR + 7) +#define STR_STATSTR_FORMAT (RC_STATLIN_STR + 8) +#define STR_STATSTR_PRINT (RC_STATLIN_STR + 9) +#define STR_STATSTR_LAYOUTINIT (RC_STATLIN_STR + 10) +#define STR_STATSTR_LETTER (RC_STATLIN_STR + 11) +#define STR_STATSTR_SPELL (RC_STATLIN_STR + 12) +#define STR_STATSTR_HYPHEN (RC_STATLIN_STR + 13) +#define STR_STATSTR_TOX_INSERT (RC_STATLIN_STR + 14) +#define STR_STATSTR_TOX_UPDATE (RC_STATLIN_STR + 15) +#define STR_STATSTR_SUMMARY (RC_STATLIN_STR + 16) +#define STR_STATSTR_SWGPRTOLENOTIFY (RC_STATLIN_STR + 17) + +#endif + + + diff --git a/sw/inc/sw.mk b/sw/inc/sw.mk new file mode 100644 index 000000000000..990a5046c51e --- /dev/null +++ b/sw/inc/sw.mk @@ -0,0 +1,150 @@ +#************************************************************************* +# +# $RCSfile: sw.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ +# +# 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): _______________________________________ +# +# +# +#************************************************************************* + +# CDEFS=$(CDEFS) -DXXX + +# Bereiche aktivieren + +#CDEFS+=-DXML_CORE_API +CDEFS+=-DNUM_RELSPACE + +# use the new GrahicObject - the old code with our own GraphicCache will be removed +# if all the new code runs correct. +CDEFS+=-DUSE_GRFOBJECT +USE_GRFOBJECT=TRUE + +# MakeDepn nicht das segdefs.hxx und die PCHs auswerten lassen +# PCHs werden nur in den ..._1st Verzeichnissen aufgenommen +EXCDEPN=segdefs.hxx +EXCDEPNPCH=core_pch.hxx;filt_pch.hxx;ui_pch.hxx +MKDEPFLAGS+=-E:$(EXCDEPN);$(EXCDEPNPCH) + +.IF "$(GUI)" == "WIN" || "$(GUI)" == "WNT" || "$(GUI)" == "OS2" +CDEFS+=-DSBASIC +.ENDIF + +.IF "$(GUI)" == "WIN" +CDEFS+=-DOLE -DOLE2 +.ENDIF + +.IF "$(compact)" != "" +CDEFS+=-DCOMPACT +.ENDIF + +.IF "$(debug)" != "" +DB=cv +.ENDIF + +.IF "$(prjpch)" != "" +CDEFS+=-DPRECOMPILED +.ENDIF + + +# ------------------------------------------------------------------ +# alte defines fuer die Sourcen +# ------------------------------------------------------------------ + +.IF "$(GUI)" == "WIN" +CDEFS+=-DW30 +.ENDIF + +.IF "$(GUI)" == "OS2" +CDEFS+=-DPM2 -DPM20 +RSCFLAGS+=-DPM2 -DPM20 +.IF "$(debug)" != "" +# fuer OS/2 und debug groessere Pages +LIBFLAGS=/C /P512 +.ENDIF +.ENDIF + +.IF "$(COM)" == "BLC" +CDEFS+=-DTCPP +.ENDIF + +.IF "$(COM)" == "STC" +CDEFS+=-DZTC +.ENDIF + +.IF "$(COM)" == "ICC" +CDEFS+=-DCSET +.ENDIF + + +# ------------------------------------------------------------------------ +# WINMSCI Compiler +# ------------------------------------------------------------------------ +.IF "$(GUI)$(COM)" == "WINMSC" + +.IF "$(optimize)" != "" +CFLAGS+=-OV9 +.ENDIF + +# kein -GEfs wegen dann fehlender inlinings +CFLAGSOBJGUIST=-Alfd -GA -GEd + +.ENDIF # WINMSCI +# ------------------------------------------------------------------------ + +# ------------------------------------------------------------------------ +# add uno headers to inlude path +# ------------------------------------------------------------------------ +INCPRE+=$(SOLARINCDIR)$/offuh diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx new file mode 100644 index 000000000000..7c86df4274f5 --- /dev/null +++ b/sw/inc/swacorr.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * $RCSfile: swacorr.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWACORR_HXX +#define _SWACORR_HXX + +#ifndef _MySVXACORR_HXX //autogen +#include <svx/svxacorr.hxx> +#endif + + +class SwAutoCorrect : public SvxAutoCorrect +{ +protected: + // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen + // koennen aus der Wortliste herausgeholt werden!) + // rShort ist der Stream-Name - gecryptet! + virtual BOOL GetLongText( SvStorage&, const String& rShort, String& rLong ); + // - Text mit Attributierung (kann nur der SWG - SWG-Format!) + // rShort ist der Stream-Name - gecryptet! + virtual BOOL PutText( SvStorage&, const String& rShort, SfxObjectShell& , + String& ); + +public: + TYPEINFO(); + + SwAutoCorrect( const String& rAutocorrFile ); + SwAutoCorrect( const SvxAutoCorrect& rACorr ); + virtual ~SwAutoCorrect(); +}; + + +#endif + diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx new file mode 100644 index 000000000000..792efce4c2d5 --- /dev/null +++ b/sw/inc/swatrset.hxx @@ -0,0 +1,382 @@ +/************************************************************************* + * + * $RCSfile: swatrset.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWATRSET_HXX +#define _SWATRSET_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + +#ifndef _SVMEMPOOL_HXX //autogen +#include <tools/mempool.hxx> +#endif +#ifndef _SFXITEMSET_HXX //autogen +#include <svtools/itemset.hxx> +#endif +#ifndef _SFXITEMPOOL_HXX //autogen +#include <svtools/itempool.hxx> +#endif +class SwModify; +class SwDoc; + +class SfxBoolItem; +class SvxPostureItem; +class SvxWeightItem; +class SvxShadowedItem; +class SvxAutoKernItem; +class SvxWordLineModeItem; +class SvxContourItem; +class SvxKerningItem; +class SvxUnderlineItem; +class SvxCrossedOutItem; +class SvxFontHeightItem; +class SvxPropSizeItem; +class SvxFontItem; +class SvxColorItem; +class SvxCharSetColorItem; +class SvxLanguageItem; +class SvxEscapementItem; +class SvxCaseMapItem; +class SvxNoHyphenItem; +class SvxBlinkItem; + +// Frame-Attribute +class SwFmtFillOrder; +class SwFmtFrmSize; +class SvxPaperBinItem; +class SvxLRSpaceItem; +class SvxULSpaceItem; +class SwFmtCntnt; +class SwFmtHeader; +class SwFmtFooter; +class SvxPrintItem; +class SvxOpaqueItem; +class SvxProtectItem; +class SwFmtSurround; +class SwFmtVertOrient; +class SwFmtHoriOrient; +class SwFmtAnchor; +class SvxBoxItem; +class SvxBrushItem; +class SvxShadowItem; +class SwFmtPageDesc; +class SvxFmtBreakItem; +class SwFmtCol; +class SvxMacroItem; +class SvxFmtKeepItem; +class SwFmtURL; +class SwFmtLineNumber; +class SwFmtEditInReadonly; +class SwFmtLayoutSplit; +class SwFmtChain; +class SwFmtFtnAtTxtEnd; +class SwFmtEndAtTxtEnd; +class SwFmtNoBalancedColumns; + +// Grafik-Attribute +class SwMirrorGrf; +class SwCropGrf; +class SwRotationGrf; +class SwLuminanceGrf; +class SwContrastGrf; +class SwChannelRGrf; +class SwChannelGGrf; +class SwChannelBGrf; +class SwGammaGrf; +class SwInvertGrf; +class SwTransparencyGrf; +class SwDrawModeGrf; + +// Paragraph-Attribute +class SvxLineSpacingItem; +class SvxAdjustItem; +class SvxFmtSplitItem; +class SwRegisterItem; +class SwNumRuleItem; +class SvxWidowsItem; +class SvxOrphansItem; +class SvxTabStopItem; +class SvxHyphenZoneItem; +class SwFmtDrop; + +// TabellenBox-Attribute +class SwTblBoxNumFormat; +class SwTblBoxFormula; +class SwTblBoxValue; + + +class SwAttrPool : public SfxItemPool +{ + friend void _InitCore(); // fuers anlegen/zerstoeren der + friend void _FinitCore(); // Versionsmaps + static USHORT* pVersionMap1; + static USHORT* pVersionMap2; + static USHORT* pVersionMap3; + + SwDoc* pDoc; + +public: + SwAttrPool( SwDoc* pDoc ); + + SwDoc* GetDoc() { return pDoc; } + const SwDoc* GetDoc() const { return pDoc; } + + static USHORT* GetVersionMap1() { return pVersionMap1; } + static USHORT* GetVersionMap2() { return pVersionMap2; } + static USHORT* GetVersionMap3() { return pVersionMap3; } +}; + + +class SwAttrSet : public SfxItemSet +{ + // Pointer fuers Modify-System + SwAttrSet *pOldSet, *pNewSet; + + // Notification-Callback + virtual void Changed( const SfxPoolItem& rOld, const SfxPoolItem& rNew ); + + void PutChgd( const SfxPoolItem& rI ) { SfxItemSet::PutDirect( rI ); } +public: + SwAttrSet( SwAttrPool&, USHORT nWhich1, USHORT nWhich2 ); + SwAttrSet( SwAttrPool&, const USHORT* nWhichPairTable ); + SwAttrSet( const SwAttrSet& ); + + int Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew ); + int Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); + + // ein Item oder einen Bereich loeschen + USHORT ClearItem_BC( USHORT nWhich, SwAttrSet* pOld, SwAttrSet* pNew ); + USHORT ClearItem_BC( USHORT nWhich1, USHORT nWhich2, + SwAttrSet* pOld = 0, SwAttrSet* pNew = 0 ); + + int Intersect_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); + int Differentiate_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); + int MergeValues_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); + + void GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const; + + SwAttrPool* GetPool() const { return (SwAttrPool*)SfxItemSet::GetPool(); } + + // kopiere die Attribute ggfs. ueber Dokumentgrenzen + void CopyToModify( SwModify& rMod ) const; + + // ---------------------------------------------------------------- + // Sonderbehandlung fuer einige Attribute + // Setze den Modify-Pointer (alten pDefinedIn) bei folgenden Attributen: + // - SwFmtDropCaps + // - SwFmtPageDesc + // (Wird beim Einfuegen in Formate/Nodes gerufen) + void SetModifyAtAttr( const SwModify* pModify ); + + // Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer + // im Zugriff. + const SwDoc *GetDoc() const { return GetPool()->GetDoc(); } + SwDoc *GetDoc() { return GetPool()->GetDoc(); } + + // 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 + inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const; + inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const; + 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 SwFmtHeader &GetHeader( BOOL = TRUE ) const; + inline const SwFmtFooter &GetFooter( 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 SwFmtSurround &GetSurround( BOOL = TRUE ) const; + inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const; + inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const; + inline const SwFmtAnchor &GetAnchor( 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 SwFmtCol &GetCol( 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; + + // 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; + + DECL_FIXEDMEMPOOL_NEWDEL(SwAttrSet) +}; + + +/************************************************************************* + + $Log: not supported by cvs2svn $ + Revision 1.48 2000/09/18 16:03:29 willem.vandorp + OpenOffice header added. + + Revision 1.47 2000/09/08 13:24:27 willem.vandorp + Header and footer replaced + + Revision 1.46 2000/07/31 19:23:08 jp + new attributes for CJK/CTL and graphic + + Revision 1.45 2000/05/26 07:08:20 os + old SW Basic API Slots removed + + Revision 1.44 2000/01/03 18:19:55 jp + Bug #71411#: new attribut + + Revision 1.43 1999/09/07 14:33:46 ama + New #66878#: EndOfTxt-Items for footnotes and endnotes + + Revision 1.42 1999/03/19 12:33:58 OS + #63701# unbenutztes Break-Attribut aus den Sections entfernt + + + Rev 1.41 19 Mar 1999 13:33:58 OS + #63701# unbenutztes Break-Attribut aus den Sections entfernt + + Rev 1.40 05 Feb 1999 17:42:26 JP + Task #61467#: Attrset ueber Dokumentgrenzen kopieren, dabei PageDesc/Numrule mit erzeugen + + Rev 1.39 28 Jan 1999 18:11:48 JP + Task #57749#: Undo von Bereichs-Attributen (Spalten, Hintergr...) + + Rev 1.38 04 Feb 1998 14:09:20 MA + new: SwFmtLineNumber + + Rev 1.37 15 Dec 1997 16:23:40 AMA + New: SwSectItem: Soll der uebergeordnete Bereich aufgebrochen werden? + +*************************************************************************/ + // #ifndef _SWATRSET_HXX +#endif diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx new file mode 100644 index 000000000000..34aed0581ced --- /dev/null +++ b/sw/inc/swbaslnk.hxx @@ -0,0 +1,127 @@ +/************************************************************************* + * + * $RCSfile: swbaslnk.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWBASLNK_HXX +#define _SWBASLNK_HXX + + +#ifndef _LNKBASE_HXX //autogen +#include <so3/lnkbase.hxx> +#endif + +class SwNode; +class SwCntntNode; +class SwNodeIndex; + +class SwBaseLink : public SvBaseLink +{ + SwCntntNode* pCntntNode; + BOOL bSwapIn : 1; + BOOL bNoDataFlag : 1; + BOOL bIgnoreDataChanged : 1; + +protected: + SwBaseLink() {} + + SwBaseLink( const String& rNm, USHORT nObjectType, SvPseudoObject* pObj, + SwCntntNode* pNode = 0 ) + : SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ), + bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ) + {} + +public: + TYPEINFO(); + + SwBaseLink( USHORT nMode, USHORT nFormat, SwCntntNode* pNode = 0 ) + : SvBaseLink( nMode, nFormat ), pCntntNode( pNode ), + bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ) + {} + virtual ~SwBaseLink(); + + virtual void DataChanged( SvData& rData ); + virtual void Closed(); + + virtual const SwNode* GetAnchor() const; + + SwCntntNode *GetCntntNode() { return pCntntNode; } + + // nur fuer Grafiken + FASTBOOL SwapIn( BOOL bWaitForData = FALSE, BOOL bNativFormat = FALSE ); + + FASTBOOL IsShowQuickDrawBmp() const; // nur fuer Grafiken + + FASTBOOL Connect() { return 0 != SvBaseLink::GetRealObject(); } + SvLinkName* GetCacheName() const { return SvBaseLink::GetCacheName(); } + + // nur fuer Grafik-Links ( zum Umschalten zwischen DDE / Grf-Link) + void SetObjType( USHORT nType ) { SvBaseLink::SetObjType( nType ); } + + BOOL IsRecursion( const SwBaseLink* pChkLnk ) const; + virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0, + xub_StrLen nEnd = STRING_NOTFOUND ) const; + + void SetNoDataFlag() { bNoDataFlag = TRUE; } + BOOL ChkNoDataFlag() { return bNoDataFlag ? !(bNoDataFlag = FALSE) : FALSE; } + BOOL IsNoDataFlag() const { return bNoDataFlag; } +}; + + +#endif + diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx new file mode 100644 index 000000000000..b87b94d2fc21 --- /dev/null +++ b/sw/inc/swcrsr.hxx @@ -0,0 +1,348 @@ +/************************************************************************* + * + * $RCSfile: swcrsr.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWCRSR_HXX +#define _SWCRSR_HXX + +#ifndef _WORDSEL_HXX //autogen +#include <svtools/wordsel.hxx> +#endif +#ifndef _PAM_HXX //autogen +#include <pam.hxx> +#endif +#ifndef _TBLSEL_HXX //autogen +#include <tblsel.hxx> +#endif +#ifndef _CSHTYP_HXX //autogen +#include <cshtyp.hxx> +#endif + + +class SwShellCrsr; +class SwShellTableCrsr; +class SwTableCursor; +class SwUnoCrsr; +class SwUnoTableCrsr; +struct _SwCursor_SavePos; + +// ein Basis-Struktur fuer die Parameter der Find-Methoden +// return - Werte vom Found-Aufruf. +const int FIND_NOT_FOUND = 0; +const int FIND_FOUND = 1; +const int FIND_NO_RING = 2; + +struct SwFindParas +{ + virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, FASTBOOL ) = 0; + virtual int IsReplaceMode() const = 0; +}; + +enum SwCursorSelOverFlags +{ + SELOVER_NONE = 0x00, + SELOVER_CHECKNODESSECTION = 0x01, + SELOVER_TOGGLE = 0x02, + SELOVER_ENABLEREVDIREKTION = 0x04, + SELOVER_CHANGEPOS = 0x08 +}; + +class SwCursor : public SwPaM +{ + friend class SwCrsrSaveState; + + _SwCursor_SavePos* pSavePos; + + ULONG FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges ); + +protected: + virtual _SwCursor_SavePos* CreateNewSavePos() const; + void SaveState(); + void RestoreState(); + + const _SwCursor_SavePos* GetSavePos() const { return pSavePos; } + +public: + SwCursor( const SwPosition &rPos, SwPaM* pRing = 0 ); + SwCursor( SwCursor& ); + virtual ~SwCursor(); + + virtual SwCursor* Create( SwPaM* pRing = 0 ) const; + + virtual operator SwShellCrsr* (); + virtual operator SwShellTableCrsr* (); + virtual operator SwTableCursor* (); + virtual operator SwUnoCrsr* (); + virtual operator SwUnoTableCrsr* (); + + inline operator const SwShellCrsr* () const; + inline operator const SwShellTableCrsr* () const; + inline operator const SwTableCursor* () const; + inline operator const SwUnoCrsr* () const; + inline operator const SwUnoTableCrsr* () const; + + virtual FASTBOOL MaxReplaceArived(); + virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); + + void FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const; + SwMoveFnCollection* MakeFindRange( SwDocPositions, SwDocPositions, + SwPaM* ) const; + + ULONG Find( const SearchParam& rParam, + SwDocPositions nStart, SwDocPositions nEnde, + FindRanges = FND_IN_BODY, + int bReplace = FALSE ); + + ULONG Find( const SwTxtFmtColl& rFmtColl, + SwDocPositions nStart, SwDocPositions nEnde, + FindRanges = FND_IN_BODY, + const SwTxtFmtColl* pReplFmt = 0 ); + + ULONG Find( const SfxItemSet& rSet, FASTBOOL bNoCollections, + SwDocPositions nStart, SwDocPositions nEnde, + FindRanges = FND_IN_BODY, + const SearchParam* pTextPara = 0, + const SfxItemSet* rReplSet = 0 ); + +/* int IsWordFNC( FNIsWord fnIsWord ) const; + int GoWordFNC( FNGoWord fnGoWord ); + FASTBOOL IsStartWord()const { return IsWordFNC( WordSelection::IsStartWord ); } + FASTBOOL IsEndWord() const { return IsWordFNC( WordSelection::IsEndWord ); } + FASTBOOL IsInWord() const { return IsWordFNC( WordSelection::IsInWord ); } + FASTBOOL GoStartWord() { return GoWordFNC( WordSelection::GoStartWord ); } + FASTBOOL GoEndWord() { return GoWordFNC( WordSelection::GoEndWord ); } + FASTBOOL GoNextWord() { return GoWordFNC( WordSelection::GoNextWord ); } + FASTBOOL GoPrevWord() { return GoWordFNC( WordSelection::GoPrevWord ); } +*/ + FASTBOOL IsStartWord()const; + FASTBOOL IsEndWord() const; + FASTBOOL IsInWord() const; + FASTBOOL GoStartWord(); + FASTBOOL GoEndWord(); + FASTBOOL GoNextWord(); + FASTBOOL GoPrevWord(); + FASTBOOL SelectWord( const Point* pPt = 0 ); + + enum SentenceMoveType + { + NEXT_SENT, + PREV_SENT, + START_SENT, + END_SENT + }; + FASTBOOL GoSentence(SentenceMoveType eMoveType); + FASTBOOL GoNextSentence(){return GoSentence(NEXT_SENT);} + FASTBOOL GoPrevSentence(){return GoSentence(PREV_SENT);} + + FASTBOOL LeftRight( BOOL bLeft, USHORT nCnt = 1 ); + FASTBOOL UpDown( BOOL bUp, USHORT nCnt = 1, + Point* pPt = 0, long nUpDownX = 0 ); + FASTBOOL LeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE ); + FASTBOOL IsAtLeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE ) const; + FASTBOOL SttEndDoc( BOOL bSttDoc ); + FASTBOOL GoPrevNextCell( BOOL bNext, USHORT nCnt ); + + 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 LeftRightMargin( TRUE ); } + FASTBOOL RightMargin() { return LeftRightMargin( FALSE ); } + FASTBOOL SttDoc() { return SttEndDoc( TRUE ); } + FASTBOOL EndDoc() { return SttEndDoc( FALSE ); } + FASTBOOL GoNextCell( USHORT nCnt = 1 ) { return GoPrevNextCell( TRUE, nCnt ); } + FASTBOOL GoPrevCell( USHORT nCnt = 1 ) { return GoPrevNextCell( FALSE, nCnt ); } + FASTBOOL GotoTable( const String& rName ); + FASTBOOL GotoTblBox( const String& rName ); + FASTBOOL GotoRegion( const String& rName ); + FASTBOOL GotoFtnAnchor(); + FASTBOOL GotoFtnTxt(); + FASTBOOL GotoNextFtnAnchor(); + FASTBOOL GotoPrevFtnAnchor(); + FASTBOOL GotoNextFtnCntnt(); + FASTBOOL GotoPrevFtnCntnt(); + + FASTBOOL MovePara( SwWhichPara, SwPosPara ); + FASTBOOL MoveSection( SwWhichSection, SwPosSection ); + FASTBOOL MoveTable( SwWhichTable, SwPosTable ); + FASTBOOL MoveRegion( SwWhichRegion, SwPosRegion ); + + + // gibt es eine Selection vom Content in die Tabelle + // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt + virtual FASTBOOL IsSelOvr( int eFlags = + ( SELOVER_CHECKNODESSECTION | + SELOVER_TOGGLE | SELOVER_CHANGEPOS )); + virtual FASTBOOL IsInProtectTable( FASTBOOL bMove = FALSE, + FASTBOOL bChgCrsr = TRUE ); + FASTBOOL IsNoCntnt() const; + + void RestoreSavePos(); // Point auf die SavePos setzen + + // TRUE: an die Position kann der Cursor gesetzt werden + virtual FASTBOOL IsAtValidPos( BOOL bPoint = TRUE ) const; + + // darf der Cursor in ReadOnlyBereiche? + FASTBOOL IsReadOnlyAvailable() const; + + DECL_FIXEDMEMPOOL_NEWDEL( SwCursor ) +}; + + +class SwCrsrSaveState +{ + SwCursor& rCrsr; +public: + SwCrsrSaveState( SwCursor& rC ) : rCrsr( rC ) { rC.SaveState(); } + ~SwCrsrSaveState() { rCrsr.RestoreState(); } +}; + +struct _SwCursor_SavePos +{ + ULONG nNode; + xub_StrLen nCntnt; + _SwCursor_SavePos* pNext; + + _SwCursor_SavePos( const SwCursor& rCrsr ) + : nNode( rCrsr.GetPoint()->nNode.GetIndex() ), + nCntnt( rCrsr.GetPoint()->nContent.GetIndex() ), + pNext( 0 ) + {} + virtual ~_SwCursor_SavePos() {} +}; + + + +class SwTableCursor : public virtual SwCursor +{ + +protected: + ULONG nTblPtNd, nTblMkNd; + xub_StrLen nTblPtCnt, nTblMkCnt; + SwSelBoxes aSelBoxes; + BOOL bChg : 1; + BOOL bParked : 1; // Tabellen-Cursor wurde geparkt + +public: + SwTableCursor( const SwPosition &rPos, SwPaM* pRing = 0 ); + SwTableCursor( SwTableCursor& ); + virtual ~SwTableCursor(); + + virtual operator SwTableCursor* (); + + void InsertBox( const SwTableBox& rTblBox ); + void DeleteBox( USHORT nPos ) { aSelBoxes.Remove( nPos ); bChg = TRUE; } + USHORT GetBoxesCount() const { return aSelBoxes.Count(); } + const SwSelBoxes& GetBoxes() const { return aSelBoxes; } + + // Baut fuer alle Boxen die Cursor auf + SwCursor* MakeBoxSels( SwCursor* pAktCrsr ); + // sind irgendwelche Boxen mit einem Schutz versehen? + FASTBOOL HasReadOnlyBoxSel() const; + + // wurde der TabelleCursor veraendert ? Wenn ja speicher gleich + // die neuen Werte. + FASTBOOL IsCrsrMovedUpdt(); + // wurde der TabelleCursor veraendert ? + FASTBOOL IsCrsrMoved() const + { + return nTblMkNd != GetMark()->nNode.GetIndex() || + nTblPtNd != GetPoint()->nNode.GetIndex() || + nTblMkCnt != GetMark()->nContent.GetIndex() || + nTblPtCnt != GetPoint()->nContent.GetIndex(); + } + + FASTBOOL IsChgd() const { return bChg; } + + // Parke den Tabellen-Cursor auf dem StartNode der Boxen. + void ParkCrsr(); + +}; + + +// --------------------------- inline Methoden ---------------------- + +inline SwCursor::operator const SwShellCrsr* () const +{ + return (SwShellCrsr*)*((SwCursor*)this); +} + +inline SwCursor::operator const SwShellTableCrsr* () const +{ + return (SwShellTableCrsr*)*((SwCursor*)this); +} + +inline SwCursor::operator const SwTableCursor* () const +{ + return (SwTableCursor*)*((SwCursor*)this); +} + +inline SwCursor::operator const SwUnoCrsr* () const +{ + return (SwUnoCrsr*)*((SwCursor*)this); +} + +inline SwCursor::operator const SwUnoTableCrsr* () const +{ + return (SwUnoTableCrsr*)*((SwCursor*)this); +} + + +#endif + diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx new file mode 100644 index 000000000000..e26727a8dd16 --- /dev/null +++ b/sw/inc/swddetbl.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * $RCSfile: swddetbl.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWDDETBL_HXX +#define _SWDDETBL_HXX + +#include "swtable.hxx" + +class SwDDEFieldType; + +class SwDDETable : public SwTable +{ + SwDepend aDepend; +public: + TYPEINFO(); + // Constructor movet alle Lines/Boxen aus der SwTable zu sich. + // Die SwTable ist danach Leer und muss geloescht werden. + SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType ); + ~SwDDETable(); + + void Modify( SfxPoolItem*, SfxPoolItem* ); + void ChangeContent(); + BOOL NoDDETable(); + + SwDDEFieldType* GetDDEFldType(); + inline const SwDDEFieldType* GetDDEFldType() const; +}; + + +// ----------- Inlines ----------------------------- + +inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const +{ + return ((SwDDETable*)this)->GetDDEFldType(); +} + +#endif diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx new file mode 100644 index 000000000000..bdabfeafdd62 --- /dev/null +++ b/sw/inc/swdll.hxx @@ -0,0 +1,171 @@ +/************************************************************************* + * + * $RCSfile: swdll.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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_SWDLL_HXX +#define SW_SWDLL_HXX + +class ResMgr; +class SvFactory; +class SotFactory; +class StatusBar; + +class SfxMedium; +class SfxFilter; + +#ifndef _SFXDEFS_HXX //autogen +#include <sfx2/sfxdefs.hxx> +#endif +#ifndef _SFXMODULE_HXX //autogen +#include <sfx2/module.hxx> +#endif + +//#include <sal/types.h> + +//------------------------------------------------------------------------- + +class SwDLL + +/* [Description] + + This class is a wrapper for a Load-On-Demand-DLL. One instance + per SfxApplication will be created for the runtime of + SfxApplication-subclass::Main(). + + Remember: Do export this class! It is used by the application. +*/ + +{ + + static void RegisterFactories(); + static void RegisterInterfaces(); + static void RegisterControls(); +public: + // Ctor/Dtor must be linked to the application + SwDLL(); + ~SwDLL(); + + // static-init/exit-code must be linked to the application + static void LibInit(); // called from SfxApplication-subclass::Init() + static void LibExit(); // called from SfxApplication-subclass::Exit() + static void PreExit(); // muss vor LibExit gerufen werden + + // DLL-init/exit-code must be linked to the DLL only + static void Init(); // called directly after loading the DLL + static void Exit(); // called directly befor unloading the DLL + + + static void FillStatusBar(StatusBar &rBar); + + static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter, + SfxFilterFlags nMust, SfxFilterFlags nDont ); + static ULONG GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter, + SfxFilterFlags nMust, SfxFilterFlags nDont ); + + static sal_Bool RegisterFrameLoaders( void* pServiceManager, void* pRegistryKey ); + static void* CreateFrameLoader( const sal_Char* pImplementationName, void* pServiceManager, void *pRegistryKey ); +}; + +//------------------------------------------------------------------------- + +class SwModuleDummy : public SfxModule + +/* [Description] + + This tricky class keeps pointers to the SvFactories while + the DLL isn`t loaded. A pointer to the one instance is available + through SXX_MOD() (shared-lib-app-data). +*/ + +{ +public: + virtual ~SwModuleDummy(); + TYPEINFO(); + // SvFactory name convention: + // 'p' + SfxObjectShell-subclass + 'Factory' + SotFactory* pSwDocShellFactory; + SotFactory* pSwWebDocShellFactory; + SotFactory* pSwGlobalDocShellFactory; + + SwModuleDummy( ResMgr *pResMgr, BOOL bDummy, + SotFactory* pFact, + SotFactory* pWebFact, + SotFactory* pGlobalFact ) + : SfxModule(pResMgr, bDummy, + (SfxObjectFactory*)pFact, + (SfxObjectFactory*)pWebFact, + (SfxObjectFactory*)pGlobalFact, 0L), + pSwDocShellFactory( pFact ), + pSwWebDocShellFactory( pWebFact ), + pSwGlobalDocShellFactory( pGlobalFact ) + {} + + virtual SfxModule* Load(); + + static SvGlobalName GetID(USHORT nFileFormat); + static USHORT HasID(const SvGlobalName& rName); +}; + +//------------------------------------------------------------------------- + +#define SW_DLL() ( *(SwModuleDummy**) GetAppData(SHL_WRITER) ) + +#endif + diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h new file mode 100644 index 000000000000..3665609242fc --- /dev/null +++ b/sw/inc/swerror.h @@ -0,0 +1,151 @@ +/************************************************************************* + * + * $RCSfile: swerror.h,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWSWERROR_H +#define _SWSWERROR_H + +#ifndef _ERRCODE_HXX +#include <tools/errcode.hxx> +#endif + +#define ERROR_SW_BASE (ERRCODE_AREA_SW) +#define ERROR_SW_READ_BASE (ERROR_SW_BASE | ERRCODE_CLASS_READ) +#define ERROR_SW_WRITE_BASE (ERROR_SW_BASE | ERRCODE_CLASS_WRITE) + +#define WARN_SW_BASE (ERRCODE_AREA_SW | ERRCODE_WARNING_MASK) +#define WARN_SW_READ_BASE (WARN_SW_BASE | ERRCODE_CLASS_READ ) +#define WARN_SW_WRITE_BASE (WARN_SW_BASE | ERRCODE_CLASS_WRITE ) + + +// Import Fehler +#define ERR_SWG_FILE_FORMAT_ERROR (ERROR_SW_READ_BASE | 1 ) +#define ERR_SWG_READ_ERROR (ERROR_SW_READ_BASE | 2 ) + +#define ERR_SW6_INPUT_FILE (ERROR_SW_READ_BASE | 4 ) +#define ERR_SW6_NOWRITER_FILE (ERROR_SW_READ_BASE | 5 ) +#define ERR_SW6_UNEXPECTED_EOF (ERROR_SW_READ_BASE | 6 ) +#define ERR_SW6_PASSWD (ERROR_SW_READ_BASE | 7 ) + +#define ERR_WW6_NO_WW6_FILE_ERR (ERROR_SW_READ_BASE | 8 ) +#define ERR_WW6_FASTSAVE_ERR (ERROR_SW_READ_BASE | 9 ) + +#define ERR_W4W_WRITE_TMP_ERROR (ERROR_SW_READ_BASE | 10 ) +#define ERR_EXCLOT_WRONG_RANGE (ERROR_SW_READ_BASE | 11 ) + +#define ERR_FORMAT_ROWCOL (ERROR_SW_READ_BASE | 12) + +#define ERR_SWG_NEW_VERSION (ERROR_SW_READ_BASE | 13) +#define ERR_WW8_NO_WW8_FILE_ERR (ERROR_SW_READ_BASE | 14) + +// Export Fehler +#define ERR_SWG_WRITE_ERROR (ERROR_SW_WRITE_BASE | 30 ) +#define ERR_SWG_OLD_GLOSSARY (ERROR_SW_WRITE_BASE | 31 ) +#define ERR_SWG_CANNOT_WRITE (ERROR_SW_WRITE_BASE | 32 ) +#define ERR_W4W_READ_TMP_ERROR (ERROR_SW_WRITE_BASE | 33 ) +#define ERR_SWG_LARGE_DOC_ERROR (ERROR_SW_WRITE_BASE | 34 ) + +// Import/Export Fehler +#define ERR_SWG_INTERNAL_ERROR (ERROR_SW_BASE | 50 ) + +#define ERR_W4W_MEM (ERROR_SW_BASE | 51 ) +#define ERR_W4W_WRITE_FULL (ERROR_SW_BASE | 52 ) +#define ERR_W4W_INTERNAL_ERROR (ERROR_SW_BASE | 53 ) +#define ERR_W4W_DLL_ERROR (ERROR_SW_BASE | 54 ) + +#define ERR_TXTBLOCK_NEWFILE_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 ) + +// weitere Fehler und Fehlerklassen +#define ERR_AUTOPATH_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 ) +#define ERR_TBLSPLIT_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 ) +#define ERR_TBLINSCOL_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 ) +#define ERR_TBLDDECHG_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 58 ) + +// ----- Warnings --------------------------- + +// Import - Warnings +#define WARN_SWG_NO_DRAWINGS (WARN_SW_READ_BASE | 70 ) +#define WARN_WW6_FASTSAVE_ERR (WARN_SW_READ_BASE | 71 ) + +// Import & Export - Warnings +#define WARN_SWG_FEATURES_LOST (WARN_SW_BASE | 72 ) +#define WARN_SWG_OLE (WARN_SW_BASE | 73 ) +#define WARN_SWG_POOR_LOAD (WARN_SW_BASE | 74 ) + +// Export warnings +#define WARN_SWG_HTML_NO_MACROS (WARN_SW_WRITE_BASE |75) + +#ifndef __RSC + +inline FASTBOOL IsWarning( ULONG nErr ) +{ + return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr ); +} + +inline FASTBOOL IsError( ULONG nErr ) +{ + return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr ); +} + +#endif + + +#endif + diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx new file mode 100644 index 000000000000..2dc79cbe6ca8 --- /dev/null +++ b/sw/inc/swevent.hxx @@ -0,0 +1,151 @@ +/************************************************************************* + * + * $RCSfile: swevent.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWEVENT_HXX +#define _SWEVENT_HXX + +// #include ***************************************************************** + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + +#ifndef _SFX_HRC +#include <sfx2/sfx.hrc> +#endif + +#define SW_EVENT_OBJECT_SELECT ( EVENT_APP_START + 0 ) +#define SW_EVENT_START_INS_GLOSSARY ( EVENT_APP_START + 1 ) +#define SW_EVENT_END_INS_GLOSSARY ( EVENT_APP_START + 2 ) +#define SW_EVENT_MAIL_MERGE ( EVENT_APP_START + 3 ) +#define SW_EVENT_FRM_KEYINPUT_ALPHA ( EVENT_APP_START + 4 ) +#define SW_EVENT_FRM_KEYINPUT_NOALPHA ( EVENT_APP_START + 5 ) +#define SW_EVENT_FRM_RESIZE ( EVENT_APP_START + 6 ) +#define SW_EVENT_FRM_MOVE ( EVENT_APP_START + 7 ) +#define SW_EVENT_PAGE_COUNT ( EVENT_APP_START + 8 ) + + +class SwFrmFmt; +class SwFmtINetFmt; +class IMapObject; + +// enum fuer Objecte die Events ins Basic oder in JavaScript Callen +enum SwCallEventObjectType +{ + EVENT_OBJECT_NONE = 0, // Null ist garnichts + EVENT_OBJECT_IMAGE, + EVENT_OBJECT_INETATTR, + EVENT_OBJECT_URLITEM, + EVENT_OBJECT_IMAGEMAP +}; + +// structur fuer den Austausch zwischen UI/CORE + +struct SwCallMouseEvent +{ + SwCallEventObjectType eType; + union + { + // EVENT_OBJECT_IMAGE/EVENT_OBJECT_URLITEM + const SwFrmFmt* pFmt; + + // EVENT_OBJECT_INETATTR + const SwFmtINetFmt* pINetAttr; + + // EVENT_OBJECT_IMAGEMAP + struct + { + const SwFrmFmt* pFmt; + const IMapObject* pIMapObj; + } IMAP; + } PTR; + + SwCallMouseEvent() + : eType( EVENT_OBJECT_NONE ) + { PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; } + + void Set( SwCallEventObjectType eTyp, const SwFrmFmt* pFmt ) + { eType = eTyp; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = 0; } + + void Set( const SwFrmFmt* pFmt, const IMapObject* pIMapObj ) + { eType = EVENT_OBJECT_IMAGEMAP; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = pIMapObj; } + + void Set( const SwFmtINetFmt* pINetAttr ) + { eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; PTR.IMAP.pIMapObj = 0; } + + int operator==( const SwCallMouseEvent& rEvent ) const + { + return eType == rEvent.eType && + PTR.pFmt == rEvent.PTR.pFmt && + PTR.IMAP.pIMapObj == rEvent.PTR.IMAP.pIMapObj; + } + int operator!=( const SwCallMouseEvent& rEvent ) const + { return !( *this == rEvent ); } + + void Clear() + { eType = EVENT_OBJECT_NONE; PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; } + + BOOL HasEvent() const { return EVENT_OBJECT_NONE != eType; } +}; + + +#endif + diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx new file mode 100644 index 000000000000..0887529c907b --- /dev/null +++ b/sw/inc/swgstr.hxx @@ -0,0 +1,190 @@ +/************************************************************************* + * + * $RCSfile: swgstr.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWGSTR_HXX +#define _SWGSTR_HXX + +#ifndef _STREAM_HXX //autogen +#include <tools/stream.hxx> +#endif + +typedef long long3; // Zur Dokumentation: 3-byte-Longs + +#define MAX_BEGIN 64 // Maximale Blockschachtelung +#define PASSWDLEN 16 // Maximale Passwortlaenge + +// Neue Version mit SvStreams + +// Passwort- und Codierungs-Funktionalitaet + +class swcrypter { +protected: + sal_Char cPasswd[ PASSWDLEN ]; // Passwort-Puffer + BOOL bPasswd; // TRUE wenn mit Passwort + void encode( sal_Char*, USHORT ); // Puffer codieren/decodieren +public: + swcrypter(); + BOOL setpasswd( const String& ); // Passwort setzen + void copypasswd( const sal_Char* ); // Passwort direkt setzen + const sal_Char* getpasswd() { return cPasswd; } +}; + +// Reader/Writer-Stream-Basisklasse mit Pufferverwaltung fuer Texte +// und Spezial-I/O fuer 3-Byte-Longs + +class swstreambase : public swcrypter { +protected: + SvStream* pStrm; // eigentlicher Stream + sal_Char* pBuf; // Zwischenpuffer + USHORT nBuflen; // Laenge des Zwischenpuffers + short nLong; // Long-Laenge (3 oder 4) + BOOL bTempStrm; // TRUE: Stream loeschen + void checkbuf( USHORT ); // Testen der Pufferlaenge + + swstreambase( SvStream& ); + + swstreambase( const swstreambase& ); + int operator=( const swstreambase& ); +public: + ~swstreambase(); + SvStream& Strm() { return *pStrm; } + void clear(); // Puffer loeschen + sal_Char* GetBuf() { return pBuf; } + + // Zusatzfunktionen zur I/O von LONGs als 3-Byte-Zahlen + + void long3() { nLong = 3; } + void long4() { nLong = 4; } + + void sync( swstreambase& r ) { pStrm->Seek( r.tell() ); } + + // Alias- und Hilfsfunktionen + + void seek( long nPos ) { pStrm->Seek( nPos ); } + long tell() { return pStrm->Tell(); } + long filesize(); // Dateigroesse + void flush() { pStrm->Flush(); } + + void setbad(); + int good() { return ( pStrm->GetError() == SVSTREAM_OK ); } + int bad() { return ( pStrm->GetError() != SVSTREAM_OK ); } + int operator!() { return ( pStrm->GetError() != SVSTREAM_OK ); } + int eof() { return pStrm->IsEof(); } + + BYTE get(); + void get( void* p, USHORT n ) { pStrm->Read( (sal_Char*) p, n ); } + + inline swstreambase& operator>>( sal_Char& ); + inline swstreambase& operator>>( BYTE& ); + inline swstreambase& operator>>( short& ); + inline swstreambase& operator>>( USHORT& ); + swstreambase& operator>>( long& ); + inline swstreambase& operator>>( ULONG& ); +}; + +inline swstreambase& swstreambase::operator>>( sal_Char& c ) +{ + *pStrm >> c; return *this; +} + +inline swstreambase& swstreambase::operator>>( BYTE& c ) +{ + *pStrm >> c; return *this; +} + +inline swstreambase& swstreambase::operator>>( short& c ) +{ + *pStrm >> c; return *this; +} + +inline swstreambase& swstreambase::operator>>( USHORT& c ) +{ + *pStrm >> c; return *this; +} + +inline swstreambase& swstreambase::operator>>( ULONG& c ) +{ + return *this >> (long&) c; +} + +class swistream : public swstreambase { + BYTE cType; // Record-Typ + ULONG nOffset; // Record-Offset-Portion +public: + swistream( SvStream& ); + + BYTE peek(); // 1 Byte testen + BYTE next(); // Blockstart + BYTE cur() { return cType; } // aktueller Block + BYTE skipnext(); // Record ueberspringen + void undonext(); // next() rueckgaengig machen + long getskip() { return nOffset; } + void skip( long = -1L ); // Block ueberspringen + sal_Char* text(); // Textstring lesen (nach BEGIN) + long size(); // aktuelle Record-Laenge + +private: + swistream( const swistream& ); + int operator=( const swistream& ); +}; + + +#endif diff --git a/sw/inc/swhints.hxx b/sw/inc/swhints.hxx new file mode 100644 index 000000000000..721857bb3bc0 --- /dev/null +++ b/sw/inc/swhints.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * $RCSfile: swhints.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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_HINTS_HXX +#define SW_HINTS_HXX + +#ifndef _SFXSMPLHINT_HXX //autogen +#include <svtools/smplhint.hxx> +#endif + +#define SW_BROADCASTID_START SFX_HINT_USER00 +#define SW_BROADCAST_DRAWVIEWS_CREATED SW_BROADCASTID_START + + +#endif diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx new file mode 100644 index 000000000000..5fecd2cbb7fd --- /dev/null +++ b/sw/inc/swmodule.hxx @@ -0,0 +1,303 @@ +/************************************************************************* + * + * $RCSfile: swmodule.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWMODULE_HXX +#define _SWMODULE_HXX + + +#ifndef _LINK_HXX //autogen +#include <tools/link.hxx> +#endif +#ifndef _SFXMODULE_HXX //autogen +#include <sfx2/module.hxx> +#endif + +#ifndef _SFXLSTNER_HXX //autogen +#include <svtools/lstner.hxx> +#endif +#ifndef SW_SWDLL_HXX +#include <swdll.hxx> +#endif +#include "shellid.hxx" +#ifndef _STRING_HXX +#include <tools/string.hxx> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLISTEVENTLISTENER_HPP_ +#include <com/sun/star/linguistic/XDictionaryListEventListener.hpp> +#endif + +class SvStringsDtor; +class Color; +class AuthorCharAttr; +class SfxItemSet; +class SfxRequest; +class SfxErrorHandler; +class SwSrcViewConfig; +class SwModuleOptions; +class SwMasterUsrPref; +class SwViewOption; +class SwView; +class SwWrtShell; +class SwPrintOptions; +class SwAutoFmtOpt; +class SwChapterNumRules; +class SwStdFontConfig; +class SwNavigationConfig; +class SwDataExchange; +class SwToolbarConfigItem; +class SwAttrPool; +#define VIEWOPT_DEST_VIEW 0 +#define VIEWOPT_DEST_TEXT 1 +#define VIEWOPT_DEST_WEB 2 +#define VIEWOPT_DEST_VIEW_ONLY 3 //ViewOptions werden nur an der ::com::sun::star::sdbcx::View, nicht an der Appl. gesetzt + +namespace com{ namespace sun{ namespace star{ namespace scanner{ + class XScannerManager; +}}}} + +class SwModule: public SwModuleDummy , public SfxListener +{ + String sActAuthor; + + // ConfigItems + SwSrcViewConfig* pSrcViewConfig; + SwModuleOptions* pModuleConfig; + SwMasterUsrPref* pUsrPref; + SwMasterUsrPref* pWebUsrPref; + SwPrintOptions* pPrtOpt; + SwPrintOptions* pWebPrtOpt; + SwChapterNumRules* pChapterNumRules; + SwStdFontConfig* pStdFontConfig; + SwNavigationConfig* pNavigationConfig; + SwToolbarConfigItem*pToolbarConfig; //fr gestackte Toolbars, welche + SwToolbarConfigItem*pWebToolbarConfig; //war sichtbar? + + SfxErrorHandler* pErrorHdl; + + SwAttrPool *pAttrPool; + + // Die aktuelle ::com::sun::star::sdbcx::View wird hier gehalten um nicht ueber + // GetActiveView arbeiten zu muessen + // Die ::com::sun::star::sdbcx::View ist solange gueltig bis Sie im Activate + // zerstoert oder ausgetauscht wird + SwView* pView; + + // Liste aller Redline-Autoren + SvStringsDtor* pAuthorNames; + + // DictionaryList listener to trigger spellchecking or hyphenation + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > xDicListEvtListener; + ::com::sun::star::uno::Reference< ::com::sun::star::scanner::XScannerManager > m_xScannerManager; + + sal_Bool bAuthorInitialised : 1; + sal_Bool bEmbeddedLoadSave : 1; + + virtual void FillStatusBar( StatusBar& ); + + // Hint abfangen fuer DocInfo + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + +protected: + // Briefumschlaege, Etiketten + void InsertEnv(); + void InsertLab(sal_Bool bLabel); + +public: + TYPEINFO(); + SFX_DECL_INTERFACE(SW_INTERFACE_MODULE); + + // dieser Ctor nur fuer SW-Dll + SwModule( SvFactory* pFact, + SvFactory* pWebFact, + SvFactory* pGlobalFact ); + // dieser Ctor nur fuer Web-Dll + SwModule( SvFactory* pWebFact ); + + ~SwModule(); + + virtual SfxModule* Load(); + + // ::com::sun::star::sdbcx::View setzen nur fuer internen Gebrauch, + // aus techn. Gruenden public + // + inline void SetView(SwView* pVw) { pView = pVw; } + inline SwView* GetView() { return pView; } + + //Die Handler fuer die Slots + void StateOther(SfxItemSet &); // andere + void StateViewOptions(SfxItemSet &); + void StateIsView(SfxItemSet &); + + void ExecOther(SfxRequest &); // Felder, Formel .. + void ExecViewOptions(SfxRequest &); + void ExecWizzard(SfxRequest &); + void ExecDB(SfxRequest &); // DBManager + + // Benutzereinstellungen modifizieren + const SwMasterUsrPref *GetUsrPref(sal_Bool bWeb); + const SwViewOption* GetViewOption(sal_Bool bWeb); + void MakeUsrPref( SwViewOption &rToFill, sal_Bool bWeb ) const; + void ApplyUsrPref(const SwViewOption &, SwView*, + sal_uInt16 nDest = VIEWOPT_DEST_VIEW ); + + // ConfigItems erzeugen + SwSrcViewConfig* GetSourceViewConfig(); + SwModuleOptions* GetModuleConfig() { return pModuleConfig;} + SwPrintOptions* GetPrtOptions(sal_Bool bWeb); + SwChapterNumRules* GetChapterNumRules(); + SwStdFontConfig* GetStdFontConfig() { return pStdFontConfig; } + SwNavigationConfig* GetNavigationConfig(); + SwToolbarConfigItem*GetToolbarConfig() { return pToolbarConfig; } + SwToolbarConfigItem*GetWebToolbarConfig() { return pWebToolbarConfig; } + + // UNO +// virtual Reflection* GetReflection( UsrUik aUIK ); + + // Ueber Sichten iterieren + static SwView* GetFirstView(); + static SwView* GetNextView(SwView*); + + sal_Bool IsEmbeddedLoadSave() const { return bEmbeddedLoadSave; } + void SetEmbeddedLoadSave( sal_Bool bFlag ) { bEmbeddedLoadSave = bFlag; } + + + // Public Data + // + SwDataExchange* pClipboard; + SwDataExchange* pDragDrop; + + void ShowDBObj(SwWrtShell& rShell, const String& rDBName, sal_Bool bShowError = sal_False); + + // Tabellenmodi + sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const; + sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const; + sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const; + + // Redlining + sal_uInt16 GetRedlineAuthor(); + sal_uInt16 GetRedlineAuthorCount(); + const String& GetRedlineAuthor(sal_uInt16 nPos); + sal_uInt16 InsertRedlineAuthor(const String& rAuthor); + + void GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet); + void GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet); + void GetFormatAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet); + + const AuthorCharAttr& GetInsertAuthorAttr() const; + const AuthorCharAttr& GetDeletedAuthorAttr() const; + const AuthorCharAttr& GetFormatAuthorAttr() const; + + sal_uInt16 GetRedlineMarkPos(); + const Color& GetRedlineMarkColor(); + + // returne den definierten DocStat - WordDelimiter + const String& GetDocStatWordDelim() const; + + // Durchreichen der Metric von der ModuleConfig (fuer HTML-Export) + sal_uInt16 GetMetric( sal_Bool bWeb ) const; + + // Update-Stati durchreichen + sal_uInt16 GetLinkUpdMode( sal_Bool bWeb ) const; + sal_uInt16 GetFldUpdateFlags( sal_Bool bWeb ) const; + + //virtuelle Methoden fuer den Optionendialog + virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ); + virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ); + virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet ); + + //hier wird der Pool angelegt und an der SfxShell gesetzt + void InitAttrPool(); + //Pool loeschen bevor es zu spaet ist + void RemoveAttrPool(); + + // Invalidiert ggf. OnlineSpell-WrongListen + void CheckSpellChanges( sal_Bool bOnlineSpelling, + sal_Bool bIsSpellWrongAgain, sal_Bool bIsSpellAllAgain ); + + inline ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > GetDicListEvtListener(); + inline void SetDicListEvtListener(::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > xLstnr); + + ::com::sun::star::uno::Reference< ::com::sun::star::scanner::XScannerManager > GetScannerManager() const {return m_xScannerManager;} + +}; + + +inline ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > SwModule::GetDicListEvtListener() +{ + return xDicListEvtListener; +} + +inline void SwModule::SetDicListEvtListener(::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > xLstnr) +{ + xDicListEvtListener = xLstnr; +} + + +/*-----------------08.07.97 10.33------------------- + Zugriff auf das SwModule, die ::com::sun::star::sdbcx::View und die Shell +--------------------------------------------------*/ + +#define SW_MOD() ( *(SwModule**) GetAppData(SHL_WRITER)) +SwView* GetActiveView(); +SwWrtShell* GetActiveWrtShell(); + + + +#endif diff --git a/sw/inc/swpre.mk b/sw/inc/swpre.mk new file mode 100644 index 000000000000..55cb472d2705 --- /dev/null +++ b/sw/inc/swpre.mk @@ -0,0 +1,85 @@ +#************************************************************************* +# +# $RCSfile: swpre.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ +# +# 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): _______________________________________ +# +# +# +#************************************************************************* + + +#====================================================================== +# standardmaessig mit Optimierung, muss explizit mit nopt=t ausgeschaltet +# werden, wenn nicht gewuenscht +#---------------------------------------------------------------------- + +.IF "$(nopt)"!="" || "$(NOPT)"!="" +nopt=true +NOPT=TRUE +optimize= +OPTIMIZE= +.ELSE +.IF "$(debug)$(DEBUG)"=="" +optimize=true +OPTIMIZE=TRUE +.ENDIF +.ENDIF + +# falls dependencies auf s:\solver\... erstellt werden sollen +# MKDEPENDSOLVER=YES +PROJECTPCH4DLL=TRUE + + diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx new file mode 100644 index 000000000000..7128fd1eed97 --- /dev/null +++ b/sw/inc/swprtopt.hxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: swprtopt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWPRTOPT_HXX +#define _SWPRTOPT_HXX + +#ifndef _SV_MULTISEL_HXX //autogen +#include <tools/multisel.hxx> +#endif + +#define POSTITS_NONE 0 +#define POSTITS_ONLY 1 +#define POSTITS_ENDDOC 2 +#define POSTITS_ENDPAGE 3 + +class SwPrtOptions +{ + USHORT nJobNo; + String sJobName; + +public: + SwPrtOptions( const String& rJobName ) : aOffset( Point(0,0) ), + nMergeCnt( 0 ), nMergeAct( 0 ), sJobName( rJobName ), + nJobNo( 1 ) + {} + + const String& MakeNextJobName(); // steht in vprint.cxx + const String& GetJobName() const { return sJobName; } + +#if defined(TCPP) + // seit neuestem (SV 223) kann der keinen mehr generieren + inline SwPrtOptions(const SwPrtOptions& rNew) {*this = rNew;} +#endif + + MultiSelection aMulti; + Point aOffset; + ULONG nMergeCnt; // Anzahl der Serienbriefe + ULONG nMergeAct; // Aktueller Serienbriefnr. + USHORT nCopyCount; + USHORT nPrintPostIts; + BOOL bPrintGraph, //Grafiken/OLE Drucken + bPrintTable, //Tabellen Drucken + bPrintDraw, //Zeichenobjekte Drucken + bPrintControl, //Controls Drucken + bPrintLeftPage, + bPrintRightPage, + bPrintReverse, + bPaperFromSetup, + bCollate, + bPrintSelection, // Markierung drucken + bPrintPageBackground, + bPrintBlackFont, + bSinglePrtJobs, + bJobStartet; +}; + + +#endif //_SWPRTOPT_HXX + + + + + + + + + + + + + + + diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx new file mode 100644 index 000000000000..1abad52ea72f --- /dev/null +++ b/sw/inc/swrect.hxx @@ -0,0 +1,370 @@ +/************************************************************************* + * + * $RCSfile: swrect.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWRECT_HXX +#define _SWRECT_HXX + +#include "errhdl.hxx" + +#ifndef _GEN_HXX //autogen +#include <tools/gen.hxx> +#endif +class SvStream; + + +class SwRect +{ + long nX; + long nY; + long nWidth; + long nHeight; + +public: + inline SwRect(); + inline SwRect( const SwRect &rRect ); + inline SwRect( const Point& rLT, const Size& rSize ); + inline SwRect( const Point& rLT, const Point& rRB ); + inline SwRect( long X, long Y, long Width, long Height ); + + //SV-SS z.B. SwRect( pWin->GetClipRect() ); + SwRect( const Rectangle &rRect ); + + //Set-Methoden + inline void Chg( const Point& rNP, const Size &rNS ); + inline void Pos( const Point& rNew ); + inline void Pos( const long nNewX, const long nNewY ); + inline void SSize( const Size& rNew ); + inline void SSize( const long nHeight, const long nWidth ); + inline void Width( long nNew ); + inline void Height( long nNew ); + inline void Left( const long nLeft ); + inline void Right( const long nRight ); + inline void Top( const long nTop ); + inline void Bottom( const long nBottom ); + + //Get-Methoden + inline const Point &Pos() const; + inline const Size &SSize() const; + inline long Width() const; + inline long Height() const; + inline long Left() const; + inline long Right() const; + inline long Top() const; + inline long Bottom() const; + + //Damit Layoutseitig per Memberpointer auf die Member von Pos und SSize + //zugegriffen werden kann. + inline Point &Pos(); + inline Size &SSize(); + + Point Center() const; + + void Justify(); + + SwRect &Union( const SwRect& rRect ); + SwRect &Intersection( const SwRect& rRect ); + //Wie Intersection nur wird davon ausgegangen, dass die Rects ueberlappen! + SwRect &_Intersection( const SwRect &rRect ); + inline SwRect GetUnion( const SwRect& rRect ) const; + inline SwRect GetIntersection( const SwRect& rRect ) const; + + BOOL IsInside( const Point& rPOINT ) const; + BOOL IsNear(const Point& rPoint, long nTolerance ) const; + BOOL IsInside( const SwRect& rRect ) const; + BOOL IsOver( const SwRect& rRect ) const; + inline BOOL HasArea() const; + inline BOOL IsEmpty() const; + inline void Clear(); + + inline SwRect &operator = ( const SwRect &rRect ); + + inline BOOL operator == ( const SwRect& rRect ) const; + inline BOOL operator != ( const SwRect& rRect ) const; + + inline SwRect &operator+=( const Point &rPt ); + inline SwRect &operator-=( const Point &rPt ); + + inline SwRect &operator+=( const Size &rSz ); + inline SwRect &operator-=( const Size &rSz ); + + //SV-SS z.B. pWin->DrawRect( aSwRect.SVRect() ); + inline Rectangle SVRect() const; + + //Zortech wuerde hier fehlerhaften Code erzeugen. +// inline operator SRectangle() const; +// inline operator Rectangle() const { return Rectangle( aPos, aSize ); } + + // Ausgabeoperator fuer die Debugging-Gemeinde + friend SvStream &operator<<( SvStream &rStream, const SwRect &rRect ); +}; + +// Implementation in in swrect.cxx +extern SvStream &operator<<( SvStream &rStream, const SwRect &rRect ); + + + +//---------------------------------- Set-Methoden +inline void SwRect::Chg( const Point& rNP, const Size &rNS ) +{ + nX = rNP.X(); nY = rNP.Y(); + nWidth = rNS.Width(); nHeight = rNS.Height(); +} +inline void SwRect::Pos( const Point& rNew ) +{ + nX = rNew.X(); nY = rNew.Y(); +} +inline void SwRect::Pos( const long nNewX, const long nNewY ) +{ + nX = nNewX; nY = nNewY; +} +inline void SwRect::SSize( const Size& rNew ) +{ + nWidth = rNew.Width(); nHeight = rNew.Height(); +} +inline void SwRect::SSize( const long nNewHeight, const long nNewWidth ) +{ + nWidth = nNewWidth; nHeight = nNewHeight; +} +inline void SwRect::Width( long nNew ) +{ + nWidth = nNew; +} +inline void SwRect::Height( long nNew ) +{ + nHeight = nNew; +} +inline void SwRect::Left( const long nLeft ) +{ + nWidth += nX - nLeft; + nX = nLeft; +} +inline void SwRect::Right( const long nRight ) +{ + nWidth = nRight - nX + 1; +} +inline void SwRect::Top( const long nTop ) +{ + nHeight += nY - nTop; + nY = nTop; +} +inline void SwRect::Bottom( const long nBottom ) +{ + nHeight = nBottom - nY + 1; +} + +//----------------------------------- Get-Methoden +inline const Point &SwRect::Pos() const +{ + return *(Point*)(&nX); +} +inline Point &SwRect::Pos() +{ + return *(Point*)(&nX); +} +inline const Size &SwRect::SSize() const +{ + return *(Size*)(&nWidth); +} +inline Size &SwRect::SSize() +{ + return *(Size*)(&nWidth); +} +inline long SwRect::Width() const +{ + return nWidth; +} +inline long SwRect::Height() const +{ + return nHeight; +} +inline long SwRect::Left() const +{ + return nX; +} +inline long SwRect::Right() const +{ + return nWidth ? nX + nWidth - 1 : nX; +} +inline long SwRect::Top() const +{ + return nY; +} +inline long SwRect::Bottom() const +{ + return nHeight ? nY + nHeight - 1 : nY; +} + +//----------------------------------- operatoren +inline SwRect &SwRect::operator = ( const SwRect &rRect ) +{ + nX = rRect.Left(); + nY = rRect.Top(); + nWidth = rRect.Width(); + nHeight = rRect.Height(); + return *this; +} +inline BOOL SwRect::operator == ( const SwRect& rRect ) const +{ + return (nX == rRect.Left() && + nY == rRect.Top() && + nWidth == rRect.Width() && + nHeight == rRect.Height()); +} +inline BOOL SwRect::operator != ( const SwRect& rRect ) const +{ + return (nX != rRect.Left() || + nY != rRect.Top() || + nWidth != rRect.Width() || + nHeight != rRect.Height()); +} + +inline SwRect &SwRect::operator+=( const Point &rPt ) +{ + nX += rPt.X(); nY += rPt.Y(); + return *this; +} +inline SwRect &SwRect::operator-=( const Point &rPt ) +{ + nX -= rPt.X(); nY -= rPt.Y(); + return *this; +} + +inline SwRect &SwRect::operator+=( const Size &rSz ) +{ + nWidth += rSz.Width(); nHeight += rSz.Height(); + return *this; +} +inline SwRect &SwRect::operator-=( const Size &rSz ) +{ + nWidth -= rSz.Width(); nHeight -= rSz.Height(); + return *this; +} + + +//--------------------------- Sonstiges +inline Rectangle SwRect::SVRect() const +{ + ASSERT( nWidth && nHeight, "SVRect() ohne Widht oder Height" ); + return Rectangle( nX, nY, + nX + nWidth - 1, //Right() + nY + nHeight - 1 ); //Bottom() +} + +inline SwRect SwRect::GetUnion( const SwRect& rRect ) const +{ + return SwRect( *this ).Union( rRect ); +} +inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const +{ + return SwRect( *this ).Intersection( rRect ); +} + +inline BOOL SwRect::HasArea() const +{ + return nHeight && nWidth; +} +inline BOOL SwRect::IsEmpty() const +{ + return !(nHeight && nWidth); +} +inline void SwRect::Clear() +{ + nX = nY = nWidth = nHeight = 0; +} + +//-------------------------- CToren +inline SwRect::SwRect() : + nX( 0 ), + nY( 0 ), + nWidth ( 0 ), + nHeight( 0 ) +{ +} +inline SwRect::SwRect( const SwRect &rRect ) : + nX( rRect.Left() ), + nY( rRect.Top() ), + nWidth ( rRect.Width() ), + nHeight( rRect.Height() ) +{ +} +inline SwRect::SwRect( const Point& rLT, const Size& rSize ) : + nX( rLT.X() ), + nY( rLT.Y() ), + nWidth ( rSize.Width() ), + nHeight( rSize.Height()) +{ +} +inline SwRect::SwRect( const Point& rLT, const Point& rRB ) : + nX( rLT.X() ), + nY( rLT.Y() ), + nWidth ( rRB.X() - rLT.X() + 1 ), + nHeight( rRB.Y() - rLT.Y() + 1 ) +{ +} +inline SwRect::SwRect( long X, long Y, long Width, long Height ) : + nX( X ), + nY( Y ), + nWidth ( Width ), + nHeight( Height ) +{ +} + + +#endif //_SWRECT_HXX diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx new file mode 100644 index 000000000000..ac61ff811e35 --- /dev/null +++ b/sw/inc/swregion.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * + * $RCSfile: swregion.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWREGION_HXX +#define _SWREGION_HXX + +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif + +#include "swrect.hxx" + +SV_DECL_VARARR( SwRects, SwRect, 20, 8 ); + +class SwRegionRects : public SwRects +{ + SwRect aOrigin; // die Kopie des StartRects + + inline void InsertRect( const SwRect &rRect, const USHORT nPos, FASTBOOL &rDel); + +public: + SwRegionRects( const SwRect& rStartRect, USHORT nInit = 20, + USHORT nGrow = 8 ); + // Zum Ausstanzen aus aOrigin. + void operator-=( const SwRect& rRect ); + + // Aus Loechern werden Flaechen, aus Flaechen werden Loecher. + void Invert(); + // Benachbarte Rechtecke zusammenfassen. + void Compress( BOOL bFuzzy = TRUE ); + + inline const SwRect &GetOrigin() const { return aOrigin; } + inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; } +}; + +#endif //_SWREGION_HXX diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx new file mode 100644 index 000000000000..5e5a51171a18 --- /dev/null +++ b/sw/inc/swserv.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * $RCSfile: swserv.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWSERV_HXX +#define _SWSERV_HXX + +#ifndef _PSEUDO_HXX //autogen +#include <so3/pseudo.hxx> +#endif + +class SwBookmark; +class SwSectionNode; +class SwBaseLink; +class SwTableNode; +struct SwPosition; +class SwPaM; + +class SwServerObject : public SvPseudoObject +{ +protected: + enum ServerModes { BOOKMARK_SERVER, TABLE_SERVER, SECTION_SERVER, NONE_SERVER } eType; + union { + SwBookmark* pBkmk; + SwTableNode* pTblNd; + SwSectionNode* pSectNd; + } CNTNT_TYPE; + + SwServerObject(); + +public: + SwServerObject( SwBookmark& rBookmark ) + : eType( BOOKMARK_SERVER ) + { + CNTNT_TYPE.pBkmk = &rBookmark; + } + SwServerObject( SwTableNode& rTableNd ) + : eType( TABLE_SERVER ) + { + CNTNT_TYPE.pTblNd = &rTableNd; + } + SwServerObject( SwSectionNode& rSectNd ) + : eType( SECTION_SERVER ) + { + CNTNT_TYPE.pSectNd = &rSectNd; + } + virtual ~SwServerObject(); + + virtual BOOL GetData( SvData* ); + virtual BOOL ChangeData( SvData& ); + + ULONG GetSelectorCount() const + { return SvPseudoObject::GetSelectorCount(); } + + virtual void SendDataChanged( const SwPosition& rPos ); + virtual void SendDataChanged( const SwPaM& rRange ); + + BOOL IsLinkInServer( const SwBaseLink* ) const; + + void SetNoServer() + { CNTNT_TYPE.pBkmk = 0, eType = NONE_SERVER; } +}; + +#ifndef SW_DECL_SWSERVEROBJECT_DEFINED +#define SW_DECL_SWSERVEROBJECT_DEFINED +class SvPseudoObject; +SO2_DECL_REF( SwServerObject ) +#endif + + +#endif // _SWSERV_HXX + diff --git a/sw/inc/swstyle.h b/sw/inc/swstyle.h new file mode 100644 index 000000000000..cc80cf1af63f --- /dev/null +++ b/sw/inc/swstyle.h @@ -0,0 +1,75 @@ +/************************************************************************* + * + * $RCSfile: swstyle.h,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWSTYLE_H +#define _SWSTYLE_H + + +#define SWSTYLEBIT_TEXT 0x0001 +#define SWSTYLEBIT_CHAPTER 0x0002 +#define SWSTYLEBIT_LIST 0x0004 +#define SWSTYLEBIT_IDX 0x0008 +#define SWSTYLEBIT_EXTRA 0x0010 +#define SWSTYLEBIT_HTML 0x0020 +#define SWSTYLEBIT_CONDCOLL 0x0040 + + +#endif + diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx new file mode 100644 index 000000000000..23ea03e1aa93 --- /dev/null +++ b/sw/inc/swtable.hxx @@ -0,0 +1,393 @@ +/************************************************************************* + * + * $RCSfile: swtable.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWTABLE_HXX +#define _SWTABLE_HXX + +#ifndef _SVMEMPOOL_HXX //autogen +#include <tools/mempool.hxx> +#endif +#ifndef _SO2REF_HXX //autogen +#include <so3/so2ref.hxx> +#endif +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif +#ifndef _TBLENUM_HXX +#include <tblenum.hxx> +#endif +#ifndef _SWTYPES_HXX +#include <swtypes.hxx> +#endif +#ifndef _CALBCK_HXX +#include <calbck.hxx> +#endif +#ifndef _SWRECT_HXX +#include <swrect.hxx> +#endif + +#ifdef PRODUCT +#ifndef _NODE_HXX +#include <node.hxx> // fuer StartNode->GetMyIndex +#endif +#else +class SwStartNode; +#endif + +class Color; +class SwFrmFmt; +class SwTableFmt; +class SwTableLineFmt; +class SwTableBoxFmt; +class SwHTMLTableLayout; +class SwTableLine; +class SwTableBox; +class SwTableNode; +class SwTabCols; +class SwDoc; +class SwSelBoxes; +class SwTblCalcPara; +class SwChartLines; +struct SwPosition; +class SwNodeIndex; +class SfxPoolItem; +class SchMemChart; +class SwUndoTblMerge; +class SwUndo; +class SwTableBox_Impl; +class SwUndoTblCpyTbl; + +#ifndef SW_DECL_SWSERVEROBJECT_DEFINED +#define SW_DECL_SWSERVEROBJECT_DEFINED +class SvPseudoObject; +SO2_DECL_REF( SwServerObject ) +#endif + +SV_DECL_PTRARR_DEL(SwTableLines, SwTableLine*, 10, 20); +SV_DECL_PTRARR_DEL(SwTableBoxes, SwTableBox*, 25, 50); + +// speicher die Inhaltstragenden Box-Pointer zusaetzlich in einem +// sortierten Array (fuers rechnen in der Tabelle) +typedef SwTableBox* SwTableBoxPtr; +SV_DECL_PTRARR_SORT( SwTableSortBoxes, SwTableBoxPtr, 25, 50 ); + +class SwTable: public SwClient //Client vom FrmFmt +{ +protected: + SwTableLines aLines; + SwTableSortBoxes aSortCntBoxes; + SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt + + SwHTMLTableLayout *pHTMLLayout; + +//SOLL das fuer jede Tabelle einstellbar sein? + TblChgMode eTblChgMode; + + USHORT nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import + // noch ein Resize der Tbl. anstossen + + BOOL bModifyLocked :1; + BOOL bHeadlineRepeat:1; + + BOOL IsModifyLocked(){ return bModifyLocked;} + +public: + TYPEINFO(); + + SwTable( SwTableFmt* ); + SwTable( const SwTable& rTable ); // kein Copy der Lines !! + ~SwTable(); + + SwHTMLTableLayout *GetHTMLTableLayout() { return pHTMLLayout; } + const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; } + void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Eigentumsuebergang! + + USHORT IncGrfsThatResize() { return ++nGrfsThatResize; } + USHORT DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; } + + void LockModify() { bModifyLocked = TRUE; } //Muessen _immer_ paarig + void UnlockModify() { bModifyLocked = FALSE;} //benutzt werden! + + BOOL IsHeadlineRepeat() const { return bHeadlineRepeat; } + void SetHeadlineRepeat( BOOL bSet ) { bHeadlineRepeat = bSet; } + + SwTableLines &GetTabLines() { return aLines; } + const SwTableLines &GetTabLines() const { return aLines; } + + SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; } + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; } + + virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); + + void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart, + FASTBOOL bHidden = FALSE ) const; + void SetTabCols( const SwTabCols &rNew, SwTabCols &rOld, + const SwTableBox *pStart, BOOL bCurRowOnly ); + + BOOL InsertCol( SwDoc*, const SwSelBoxes& rBoxes, + USHORT nCnt = 1, BOOL bBehind = TRUE ); + BOOL InsertRow( SwDoc*, const SwSelBoxes& rBoxes, + USHORT nCnt = 1, BOOL bBehind = TRUE ); + BOOL AppendRow( SwDoc* pDoc, USHORT nCnt = 1 ); + BOOL DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, SwUndo* pUndo = 0, + const BOOL bDelMakeFrms = TRUE, + const BOOL bCorrBorder = TRUE ); + BOOL SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1 ); + BOOL SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1 ); + BOOL Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, + SwTableBox* pMergeBox, SwUndoTblMerge* = 0 ); + + SwTableSortBoxes& GetTabSortBoxes() { return aSortCntBoxes; } + const SwTableSortBoxes& GetTabSortBoxes() const { return aSortCntBoxes; } + + // gebe den Zellnamen zu der angebenen Row/Col zurueck. Das ist + // nur fuer ausgeglichene Tabellen interessant, weil diese keine + // "Sub"Boxen kennen. Es wird z.B. aus (0,0) ein "A1". + static String GetBoxName( USHORT nRow, USHORT nCol ); + // lese die 1. Nummer und loesche sie aus dem String + // (wird von GetTblBox und SwTblFld benutzt) + static USHORT _GetBoxNum( String& rStr, BOOL bFirst = FALSE ); + // suche die Inhaltstragende Box mit dem Namen + const SwTableBox* GetTblBox( const String& rName ) const; + // kopiere die selektierten Boxen in ein anderes Dokument. + BOOL MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&, + BOOL bCpyNds = TRUE, BOOL bCpyName = FALSE ) const; + // kopiere die Tabelle in diese. (die Logik steht im TBLRWCL.CXX) + BOOL InsTable( const SwTable& rCpyTbl, const SwNodeIndex&, + SwUndoTblCpyTbl* pUndo = 0 ); + BOOL InsTable( const SwTable& rCpyTbl, const SwSelBoxes&, + SwUndoTblCpyTbl* pUndo = 0 ); + // kopiere die Headline (mit Inhalt!) der Tabelle in eine andere + BOOL CopyHeadlineIntoTable( SwTableNode& rTblNd ); + + // erfrage die Box, dessen Start-Index auf nBoxStt steht + SwTableBox* GetTblBox( ULONG nSttIdx ); + const SwTableBox* GetTblBox( ULONG nSttIdx ) const + { return ((SwTable*)this)->GetTblBox( nSttIdx ); } + + // returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden + BOOL IsTblComplex() const; + + //returnt TRUE wenn die Tabelle oder Selektion ausgeglichen ist + BOOL IsTblComplexForChart( const String& rSel, + SwChartLines* pGetCLines = 0 ) const; + + // suche alle Inhaltstragenden-Boxen der Grundline in der diese Box + // steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen + //JP 31.01.97: bToTop = TRUE -> hoch bis zur Grundline, + // FALSE-> sonst nur die Line der Box + SwSelBoxes& SelLineFromBox( const SwTableBox* pBox, + SwSelBoxes& rBoxes, BOOL bToTop = TRUE ) const; + // erfrage vom Client Informationen + virtual BOOL GetInfo( SfxPoolItem& ) const; + + // suche im Format nach der angemeldeten Tabelle + static SwTable* FindTable( SwFrmFmt* pFmt ); + + // Struktur ein wenig aufraeumen + void GCLines(); + // BorderLine ein wenig aufraeumen + void GCBorderLines(); + + SwTableNode* GetTableNode() const; + + // Daten Server-Methoden + void SetRefObject( SvPseudoObject* ); + const SwServerObject* GetObject() const { return &refObj; } + SwServerObject* GetObject() { return &refObj; } + BOOL IsServer() const { return refObj.Is(); } + + //Daten fuer das Chart fuellen. + SchMemChart *UpdateData( SchMemChart *pData, + const String* pSelection = 0 ) const; + + TblChgMode GetTblChgMode() const { return eTblChgMode; } + void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; } + + BOOL SetColWidth( SwTableBox& rAktBox, USHORT eType, + SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); + BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType, + SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); +}; + +class SwTableLine: public SwClient // Client vom FrmFmt +{ + SwTableBoxes aBoxes; + SwTableBox *pUpper; + +public: + TYPEINFO(); + + SwTableLine( SwTableLineFmt*, USHORT nBoxes, SwTableBox *pUp ); + ~SwTableLine(); + + SwTableBoxes &GetTabBoxes() { return aBoxes; } + const SwTableBoxes &GetTabBoxes() const { return aBoxes; } + + SwTableBox *GetUpper() { return pUpper; } + const SwTableBox *GetUpper() const { return pUpper; } + void SetUpper( SwTableBox *pNew ) { pUpper = pNew; } + + + SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; } + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; } + + //Macht ein eingenes FrmFmt wenn noch mehr Lines von ihm abhaengen. + SwFrmFmt* ClaimFrmFmt(); + void ChgFrmFmt( SwTableLineFmt* pNewFmt ); + + // suche nach der naechsten/vorherigen Box mit Inhalt + SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0, + BOOL bOvrTblLns=TRUE ) const; + SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0, + BOOL bOvrTblLns=TRUE ) const; + + SwRect GetLineRect( const BOOL bPrtArea = FALSE ) const; +}; + +class SwTableBox: public SwClient //Client vom FrmFmt +{ + friend class SwNodes; // um den Index umzusetzen ! + friend void DelBoxNode(SwTableSortBoxes&); // um den StartNode* zu loeschen ! + friend class SwXMLTableContext; + + //nicht (mehr) implementiert. + SwTableBox( const SwTableBox & ); + + SwTableLines aLines; + const SwStartNode * pSttNd; + SwTableLine *pUpper; + SwTableBox_Impl* pImpl; + + SwTableBox &operator=( const SwTableBox &); //gibts nicht. + // falls das Format schon Formeln/Values enthaelt, muss ein neues + // fuer die neue Box erzeugt werden. + SwTableBoxFmt* CheckBoxFmt( SwTableBoxFmt* ); + +public: + TYPEINFO(); + + SwTableBox( SwTableBoxFmt*, USHORT nLines, SwTableLine *pUp = 0 ); + SwTableBox( SwTableBoxFmt*, const SwStartNode&, SwTableLine *pUp = 0 ); + SwTableBox( SwTableBoxFmt*, const SwNodeIndex&, SwTableLine *pUp = 0 ); + ~SwTableBox(); + + SwTableLines &GetTabLines() { return aLines; } + const SwTableLines &GetTabLines() const { return aLines; } + + SwTableLine *GetUpper() { return pUpper; } + const SwTableLine *GetUpper() const { return pUpper; } + void SetUpper( SwTableLine *pNew ) { pUpper = pNew; } + + SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; } + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; } + + //Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen. + SwFrmFmt* ClaimFrmFmt(); + void ChgFrmFmt( SwTableBoxFmt *pNewFmt ); + + const SwStartNode *GetSttNd() const { return pSttNd; } + ULONG GetSttIdx() const +#ifdef PRODUCT + { return pSttNd ? pSttNd->GetIndex() : 0; } +#else + ; +#endif + + // suche nach der naechsten/vorherigen Box mit Inhalt + SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0, + BOOL bOvrTblLns=TRUE ) const; + SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0, + BOOL bOvrTblLns=TRUE ) const; + // gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt + // und ergibt sich aus der Position in den Lines/Boxen/Tabelle + String GetName() const; + // gebe den "Wert" der Box zurueck (fuers rechnen in der Tabelle) + double GetValue( SwTblCalcPara& rPara ) const; + + BOOL IsInHeadline( const SwTable* pTbl = 0 ) const; + + // enthaelt die Box Inhalt, der als Nummer formatiert werden kann? + BOOL HasNumCntnt( double& rNum, ULONG& rFmtIndex, + BOOL& rIsEmptyTxtNd ) const; + ULONG IsValidNumTxtNd( BOOL bCheckAttr = TRUE ) const; + // teste ob der BoxInhalt mit der Nummer uebereinstimmt, wenn eine + // Tabellenformel gesetzt ist. (fuers Redo des Change vom NumFormat!) + BOOL IsNumberChanged() const; + + // ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum) + // Was es ist, besagt der ReturnWert - die WhichId des Attributes + // Leere Boxen haben den ReturnWert USHRT_MAX !! + USHORT IsFormulaOrValueBox() const; + + // fuers Laden - tauscht bei Value Zellen den Inhalt aus, falls sie + // fuer die Sprache System formatiert sind. + void ChgByLanguageSystem(); + + DECL_FIXEDMEMPOOL_NEWDEL(SwTableBox) + + // zugriff auf interne Daten - z.Z. benutzt fuer den NumFormatter + inline const Color* GetSaveUserColor() const; + inline const Color* GetSaveNumFmtColor() const; + inline void SetSaveUserColor(const Color* p ); + inline void SetSaveNumFmtColor( const Color* p ); +}; + +#endif //_SWTABLE_HXX diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx new file mode 100644 index 000000000000..559db74d7865 --- /dev/null +++ b/sw/inc/swtblfmt.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * $RCSfile: swtblfmt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWTBLFMT_HXX +#define _SWTBLFMT_HXX + +#ifndef _FRMFMT_HXX +#include <frmfmt.hxx> +#endif + +class SwDoc; + +class SwTableFmt : public SwFrmFmt +{ + friend class SwDoc; + +protected: + SwTableFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, + SwFrmFmt *pDrvdFrm ) + : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) + {} + SwTableFmt( SwAttrPool& rPool, const String &rFmtNm, + SwFrmFmt *pDrvdFrm ) + : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) + {} + + +public: + TYPEINFO(); //Bereits in Basisklasse Client drin. + + DECL_FIXEDMEMPOOL_NEWDEL(SwTableFmt) +}; + +class SwTableLineFmt : public SwFrmFmt +{ + friend class SwDoc; + +protected: + SwTableLineFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, + SwFrmFmt *pDrvdFrm ) + : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) + {} + SwTableLineFmt( SwAttrPool& rPool, const String &rFmtNm, + SwFrmFmt *pDrvdFrm ) + : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) + {} + +public: + TYPEINFO(); //Bereits in Basisklasse Client drin. + + DECL_FIXEDMEMPOOL_NEWDEL(SwTableLineFmt) +}; + +class SwTableBoxFmt : public SwFrmFmt +{ + friend class SwDoc; + +protected: + SwTableBoxFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, + SwFrmFmt *pDrvdFrm ) + : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) + {} + SwTableBoxFmt( SwAttrPool& rPool, const String &rFmtNm, + SwFrmFmt *pDrvdFrm ) + : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) + {} + +public: + TYPEINFO(); //Bereits in Basisklasse Client drin. + + // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute) + virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue ); + + DECL_FIXEDMEMPOOL_NEWDEL(SwTableBoxFmt) +}; + + +#endif diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx new file mode 100644 index 000000000000..7feecac77e08 --- /dev/null +++ b/sw/inc/swtypes.hxx @@ -0,0 +1,298 @@ +/************************************************************************* + * + * $RCSfile: swtypes.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWTYPES_HXX +#define _SWTYPES_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif +#include <limits.h> //fuer LONG_MAX + +#ifdef PM20 +#include <stdlib.h> +#endif +#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ +#include <com/sun/star/uno/Reference.h> +#endif +#ifndef _HORIORNT_HXX +#include <horiornt.hxx> +#endif + +// wenn das hier geaendert wird, dann auch im globals.hrc aendern!!! +//#define SW_FILEFORMAT_40 SOFFICE_FILEFORMAT_40 + +namespace com{namespace sun{namespace star{ + namespace linguistic{ + class XDictionaryList; + class XSpellChecker1; + class XHyphenator; + class XThesaurus; + } + namespace beans{ + class XPropertySet; + } +}}} +class Size; +class MapMode; +class ResMgr; +class UniString; +class ByteString; +class SwPathFinder; +class Graphic; +class OutputDevice; +class CharClass; + +typedef long SwTwips; +#define INVALID_TWIPS LONG_MAX +#define TWIPS_MAX (LONG_MAX - 1) + +#define MM50 283 // 1/2 cm in TWIPS + +#define MINFLY 23 //Minimalgroesse fuer FlyFrms +#define MINLAY 23 //Minimalgroesse anderer Frms + +// Default-Spaltenabstand zweier Textspalten entspricht 0.3 cm +#define DEF_GUTTER_WIDTH (MM50 / 5 * 3) + +//Minimale Distance (Abstand zum Text) fuer das BorderAttribut, damit +//die aligned'en Linien nicht geplaettet werden. +//28 Twips == 0,4mm +#define MIN_BORDER_DIST 28 + + /* minimaler Dokmentrand */ +const SwTwips lMinBorder = 1134; + +//Die Wiesenbreite links neben und ueber dem Dokument. +//Die halbe Wiesenbreite ist der Abstand zwischen den Seiten. +#define DOCUMENTBORDER 568L + +//initiale UndoActionCount +#define UNDO_ACTION_COUNT 20 + +// Konstante Strings +extern UniString aEmptyStr; // "" +extern ByteString aEmptyByteStr; // "" +extern UniString aDotStr; // '.' + +extern const sal_Char* __FAR_DATA pDefWordDelim; // alle Worttrenner +extern const sal_Char* __FAR_DATA pGlosExt; // def. Ext. fuer AutoText in glosdoc.cxx + + +//Zum Einfuegen von Beschriftungen (wie bzw. wo soll eingefuegt werden). +//Hier weil ein eigenes hxx nicht lohnt und es sonst nirgendwo so recht +//hinpasst. +enum SwLabelType +{ + LTYPE_TABLE, //Beschriftung einer Tabelle + LTYPE_OBJECT, //Beschriftung von Grafik oder OLE + LTYPE_FLY, //Beschriftung eines (Text-)Rahmens + LTYPE_DRAW //Beschriftung eines Zeichen-Objektes +}; + + +const BYTE OLD_MAXLEVEL = 5; +const BYTE MAXLEVEL = 10; //Ehemals numrule.hxx +const BYTE NO_NUM = 200; //Ehemals numrule.hxx +const BYTE NO_NUMBERING = 201; //Ehemals numrule.hxx +const BYTE NO_INIT = 202; //Ehemals numrule.hxx + +// fuer Absaetze mit NO_NUM aber auf unterschiedlichen Leveln +// DAMIT entfaellt das NO_NUM !!!! +const BYTE NO_NUMLEVEL = 0x20; // wird mit den Levels verodert + + +/* + * Nette Funktionen als MACRO oder inline + */ + +/* ein KiloByte sind 1024 Byte */ +#define KB 1024 + +#define SET_CURR_SHELL( shell ) CurrShell aCurr( shell ) + +// pPathFinder wird von der UI initialisiert. Die Klasse liefert alle +// benoetigten Pfade. +extern SwPathFinder *pPathFinder; + +// Werte fuer die Einzuege an der Nummerierung und BulletListe +// (fuer die weiteren Ebenen sind die Werte mit den Ebenen+1 zu +// multiplizieren; Ebenen 0..4 !!!) +const USHORT lBullIndent = 567 / 2; +const short lBullFirstLineOffset = -567 / 2; +const USHORT lNumIndent = 567 / 2; +const short lNumFirstLineOffset = -567 / 2; + + + // Enum um am Doc abzufragen, ob es sich bei dem Namen um einem + // aus unserem Pool handelt. +enum SwGetPoolIdFromName +{ + GET_POOLID_TXTCOLL = 0x01, + GET_POOLID_CHRFMT = 0x02, + GET_POOLID_FRMFMT = 0x04, + GET_POOLID_PAGEDESC = 0x08, + GET_POOLID_NUMRULE = 0x10 +}; + +// Anzahl der SystemField-Types vom SwDoc +#define INIT_FLDTYPES 30 +// Anzahl der vordefinierten Seq-Feldtypen. Es handelt sich dabei +// immer um die letzen Felder vor INIT_FLDTYPES +#define INIT_SEQ_FLDTYPES 4 + +//Die ehemaligen Rendevouz-Ids leben weiter: +//Es gibt Ids fuer die Anker (SwFmtAnchor) und ein paar weitere die nur fuer +//Schnittstellen Bedeutung haben (SwDoc). +enum RndStdIds +{ + FLY_AT_CNTNT, //Absatzgebundener Rahmen + FLY_IN_CNTNT, //Zeichengebundener Rahmen + FLY_PAGE, //Seitengebundener Rahmen + FLY_AT_FLY, //Rahmengebundener Rahmen ( LAYER_IMPL ) + FLY_AUTO_CNTNT, //Automatisch positionierter, absatzgebundener Rahmen + //Der Rest wird nur fuer SS benutzt. + RND_STD_HEADER, + RND_STD_FOOTER, + RND_STD_HEADERL, + RND_STD_HEADERR, + RND_STD_FOOTERL, + RND_STD_FOOTERR, + + RND_DRAW_OBJECT // ein Draw-Object !! nur fuer die SwDoc-Schnittstelle! +}; + + +extern ResMgr* pSwResMgr; // steht in swapp0.cxx +#define SW_RES(i) ResId(i,pSwResMgr) +#define SW_RESSTR(i) UniString(ResId(i,pSwResMgr)) + +#if defined( WIN ) || defined( WNT ) || defined( PM2 ) +#define DDE_AVAILABLE +#endif + +// SpellChecker, Hyphenator kommen aus der OFA. +// +::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XSpellChecker1 > GetSpellChecker(); +::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XHyphenator > GetHyphenator(); +::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XThesaurus > GetThesaurus(); +::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XDictionaryList > GetDictionaryList(); +::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > GetLinguPropertySet(); + +// reutns the twip size of this graphic +Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev ); + + +// Seperator fuer Sprunge im Dokument auf verschiedene Inhalttype +const sal_Unicode cMarkSeperator = '|'; +extern const sal_Char* __FAR_DATA pMarkToTable; // Strings stehen +extern const sal_Char* __FAR_DATA pMarkToFrame; // im Init.cxx +extern const sal_Char* __FAR_DATA pMarkToRegion; +extern const sal_Char* __FAR_DATA pMarkToOutline; +extern const sal_Char* __FAR_DATA pMarkToText; +extern const sal_Char* __FAR_DATA pMarkToGraphic; +extern const sal_Char* __FAR_DATA pMarkToOLE; + +#ifndef DB_DELIM // Ist in OFA definiert!!! +#define DB_DELIM ((sal_Unicode)0xff) // Datenbank <-> Tabellen-Trenner +#endif + + +enum SetAttrMode +{ + SETATTR_DEFAULT = 0x0000, // default + SETATTR_DONTEXPAND = 0x0001, // TextAttribute nicht weiter expand. + SETATTR_DONTREPLACE = 0x0002, // kein anderes TextAttrib verdraengen + + SETATTR_NOTXTATRCHR = 0x0004, // bei Attr ohne Ende kein 0xFF einfuegen + SETATTR_NOHINTADJUST = 0x0008, // keine Zusammenfassung von Bereichen. + SETATTR_NOFORMATATTR = 0x0010, // nicht zum FormatAttribut umwandeln + SETATTR_DONTCHGNUMRULE = 0x0020 // nicht die NumRule veraendern +}; + +//Umrechnung Twip<-> 1/100 mm fuer UNO + +#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) +#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L)) + +#define SW_ISPRINTABLE( c ) ( c >= ' ' && 127 != c ) + +#ifndef SW_CONSTASCII_DECL +#define SW_CONSTASCII_DECL( n, s ) n[sizeof(s)] +#endif +#ifndef SW_CONSTASCII_DEF +#define SW_CONSTASCII_DEF( n, s ) n[sizeof(s)] = s +#endif + + +#define CHAR_HARDBLANK ((sal_Unicode)0x00A0) +#define CHAR_HARDHYPHEN ((sal_Unicode)0x2011) +#define CHAR_SOFTHYPHEN ((sal_Unicode)0x00AD) + +// returns the APP - CharClass instance - used for all ToUpper/ToLower/... +CharClass& GetAppCharClass(); + + +#endif diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx new file mode 100644 index 000000000000..1ee581ef1eae --- /dev/null +++ b/sw/inc/swundo.hxx @@ -0,0 +1,197 @@ +/************************************************************************* + * + * $RCSfile: swundo.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWUNDO_HXX +#define _SWUNDO_HXX + +// die Ids fuer StdAktionen +enum SwUndoStdId +{ + UNDO_STD_BEGIN = 1, + UNDO_START = UNDO_STD_BEGIN, // 1 + UNDO_END, // 2 + REPEAT_START, // alle UndoIds zwischen REPEAT_START und + // REPEAT_END sind Repeat-Faehig !! + UNDO_DELETE = REPEAT_START, // 3 + UNDO_INSERT, // 4 + UNDO_OVERWRITE, // 5 + UNDO_SPLITNODE, // 6 + UNDO_INSATTR, // 7 + UNDO_SETFMTCOLL, // 8 + UNDO_RESETATTR, // 9 + UNDO_INSFMTATTR, // 10 + UNDO_INSDOKUMENT, // 11 + UNDO_COPY, // 12 + UNDO_INSTABLE, // 13 + UNDO_TABLETOTEXT, // 14 + UNDO_TEXTTOTABLE, // 15 + UNDO_SORT_TXT, // 16 + UNDO_INSLAYFMT, // 17 + UNDO_TABLEHEADLINE, // 18 + UNDO_INSSECTION, // 19 + UNDO_OUTLINE_LR, // 20 + UNDO_OUTLINE_UD, // 21 + UNDO_INSNUM, // 22 + UNDO_NUMUPDOWN, // 23 + UNDO_MOVENUM, // 24 + UNDO_INSDRAWFMT, // 25 + UNDO_NUMORNONUM, // 26 + UNDO_INC_LEFTMARGIN, // 27 + UNDO_DEC_LEFTMARGIN, // 28 + UNDO_INSERTLABEL, // 29 + UNDO_SETNUMRULESTART, // 30 + UNDO_CHGFTN, // 31 + UNDO_REDLINE, // 32 + UNDO_ACCEPT_REDLINE, // 33 + UNDO_REJECT_REDLINE, // 34 + UNDO_SPLIT_TABLE, // 35 + UNDO_DONTEXPAND, // 36 + UNDO_AUTOCORRECT, // 37 + UNDO_MERGE_TABLE, // 38 + + UNDO_REPEAT_DUMMY_3, // 39 + UNDO_REPEAT_DUMMY_4, // 40 + UNDO_REPEAT_DUMMY_5, // 41 + UNDO_REPEAT_DUMMY_6, // 42 + UNDO_REPEAT_DUMMY_7, // 43 + UNDO_REPEAT_DUMMY_8, // 44 + UNDO_REPEAT_DUMMY_9, // 45 + REPEAT_END, + + UNDO_MOVE = REPEAT_END, // 46 + UNDO_INSGLOSSARY, // 47 + UNDO_DELBOOKMARK, // 48 + UNDO_INSBOOKMARK, // 49 + UNDO_SORT_TBL, // 50 + UNDO_DELLAYFMT, // 51 + UNDO_AUTOFORMAT, // 52 + UNDO_REPLACE, // 53 + UNDO_DELSECTION, // 54 + UNDO_CHGSECTION, // 55 + UNDO_CHGSECTIONPASSWD, // 56 + UNDO_SETDEFTATTR, // 57 + UNDO_DELNUM, // 58 + UNDO_DRAWUNDO, // 59 + UNDO_DRAWGROUP, // 60 + UNDO_DRAWUNGROUP, // 61 + UNDO_DRAWDELETE, // 62 + UNDO_REREAD, // 63 + UNDO_DELGRF, // 64 + UNDO_DELOLE, // 65 + UNDO_TABLE_ATTR, // 66 + UNDO_TABLE_AUTOFMT, // 67 + UNDO_TABLE_INSCOL, // 68 + UNDO_TABLE_INSROW, // 69 + UNDO_TABLE_DELBOX, // 70 + UNDO_TABLE_SPLIT, // 71 + UNDO_TABLE_MERGE, // 72 + UNDO_TBLNUMFMT, // 73 + UNDO_INSTOX, // 74 + UNDO_CLEARTOXRANGE, // 75 + UNDO_TBLCPYTBL, // 76 + UNDO_CPYTBL, // 77 + UNDO_INS_FROM_SHADOWCRSR, // 78 + UNDO_CHAINE, // 79 + UNDO_UNCHAIN, // 80 + UNDO_FTNINFO, // 81 + UNDO_ENDNOTEINFO, // 82 + UNDO_COMPAREDOC, // 83 + UNDO_SETFLYFRMFMT, // 84 + + UNDO_DUMMY_1, // 85 + UNDO_DUMMY_2, // 86 + UNDO_DUMMY_3, // 87 + UNDO_DUMMY_4, // 88 + UNDO_DUMMY_5, // 89 + UNDO_DUMMY_6, // 90 + UNDO_DUMMY_7, // 91 + UNDO_DUMMY_8, // 92 + UNDO_DUMMY_9, // 93 + UNDO_STD_END // 94 +}; + + +/* MA: 24. May. 97, zur Zeit nicht verwendet. +#define INIT_UNDOIDS 2 +#define GROW_UNDOIDS 2 +// Das Array der verwendeten Undo-Ids +SV_DECL_VARARR( SwUndoIds, USHORT, INIT_UNDOIDS, GROW_UNDOIDS ) +*/ + +// Undo-Ids fuer die UI-Seite +enum SwUIUndoIds +{ + UIUNDO_REPLACE = UNDO_STD_END, + UIUNDO_INSERT_PAGE_BREAK, + UIUNDO_INSERT_COLUMN_BREAK, + UIUNDO_PLAY_MACRO, + UIUNDO_INSERT_ENVELOPE, + UIUNDO_DRAG_AND_COPY, + UIUNDO_DRAG_AND_MOVE, + UIUNDO_INSERT_RULER, + UIUNDO_INSERT_CHART, + UIUNDO_INSERT_FOOTNOTE, + UIUNDO_INSERT_URLBTN, + UIUNDO_INSERT_URLTXT, + UIUNDO_DELETE_INVISIBLECNTNT +}; + + +#endif diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx new file mode 100644 index 000000000000..0b107d3230e4 --- /dev/null +++ b/sw/inc/swurl.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: swurl.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWURL_HXX +#define _SWURL_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + + +class UniString; +class ViewShell; + +#define URLLOAD_NOFILTER 0x0000 +#define URLLOAD_DOWNLOADFILTER 0x0001 +#define URLLOAD_CHOOSEFILTER 0x0002 +#define URLLOAD_NEWVIEW 0x8000 + + +void LoadURL( const UniString& rName, ViewShell* pSh, + USHORT nFilter = URLLOAD_NOFILTER, + const UniString *pTargetFrameName = 0 ); + + + +#endif diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx new file mode 100644 index 000000000000..73e009332038 --- /dev/null +++ b/sw/inc/swwait.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * $RCSfile: swwait.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _SWWAIT_HXX +#define _SWWAIT_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + +class SwDocShell; + +class SwWait +{ + SwDocShell &rDoc; + BOOL bLock; +public: + SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher ); + ~SwWait(); +}; + +#endif diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx new file mode 100644 index 000000000000..0110e27c4a66 --- /dev/null +++ b/sw/inc/tabcol.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * $RCSfile: tabcol.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TABCOL_HXX +#define _TABCOL_HXX + +#ifndef _SVSTDARR_HXX +#define _SVSTDARR_LONGS +#define _SVSTDARR_BOOLS +#include <svtools/svstdarr.hxx> +#endif + +class SwTabCols : public SvLongs +{ + long nLeftMin, //Linker aeusserer Rand (Bezugspunkt) in + //Dokumentkordinaten. + //Alle anderen Werte relativ zu diesem Punkt! + nLeft, //Linker Rand der Tabelle. + nRight, //Rechter Rand der Tabelle. + nRightMax; //Maximaler rechter Rand der Tabelle. + + + + SvBools aHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht. + //Wenn das Flag Hidden TRUE ist liegt der Spalten- + //trenner nicht in der aktuellen Zeile; er muss + //mit gepflegt werden, darf aber nicht angezeigt + //werden. + +public: + SwTabCols( USHORT nSize = 0 ); + SwTabCols( const SwTabCols& ); + SwTabCols &operator=( const SwTabCols& ); + BOOL operator==( const SwTabCols& rCmp ) const; + + BOOL IsHidden( USHORT nPos ) const { return aHidden[nPos]; } + void SetHidden( USHORT nPos, BOOL bValue ) { aHidden[nPos] = bValue; } + inline void InsertHidden( USHORT nPos, BOOL bValue ); + inline void DeleteHidden( USHORT nPos, USHORT nAnz = 1 ); + + //fuer den CopyCTor + const SvBools& GetHidden() const { return aHidden; } + + long GetLeftMin() const { return nLeftMin; } + long GetLeft() const { return nLeft; } + long GetRight() const { return nRight; } + long GetRightMax()const { return nRightMax;} + + void SetLeftMin ( long nNew ) { nLeftMin = nNew; } + void SetLeft ( long nNew ) { nLeft = nNew; } + void SetRight ( long nNew ) { nRight = nNew; } + void SetRightMax( long nNew ) { nRightMax = nNew;} +}; + +inline void SwTabCols::InsertHidden( USHORT nPos, BOOL bValue ) +{ + aHidden.Insert( bValue, nPos ); +} +inline void SwTabCols::DeleteHidden( USHORT nPos, USHORT nAnz ) +{ + aHidden.Remove( nPos, nAnz ); +} + +#endif //_TABCOL_HXX diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx new file mode 100644 index 000000000000..c0decd5e754c --- /dev/null +++ b/sw/inc/tblafmt.hxx @@ -0,0 +1,383 @@ +/************************************************************************* + * + * $RCSfile: tblafmt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TBLAFMT_HXX +#define _TBLAFMT_HXX + +/************************************************************************* +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +JP 20.07.95: + + Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden. + Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc + eingelesen/geschrieben. + Sollte sich doch mal eine Aenderung nicht vermeiden lassen, dann auf + jedenfall in beiden Applikationen aendern. + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +**************************************************************************/ + +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif + +#include "hintids.hxx" //_immmer_ vor den solar-items! + +#define ITEMID_HORJUSTIFY 0 +#define ITEMID_VERJUSTIFY 0 +#define ITEMID_ORIENTATION 0 +#define ITEMID_MARGIN 0 + +#ifndef _SVX_ALGITEM_HXX //autogen +#include <svx/algitem.hxx> +#endif +#ifndef _SVX_FONTITEM_HXX //autogen +#include <svx/fontitem.hxx> +#endif +#ifndef _SVX_FHGTITEM_HXX //autogen +#include <svx/fhgtitem.hxx> +#endif +#ifndef _SVX_WGHTITEM_HXX //autogen +#include <svx/wghtitem.hxx> +#endif +#ifndef _SVX_POSTITEM_HXX //autogen +#include <svx/postitem.hxx> +#endif +#ifndef _SVX_UDLNITEM_HXX //autogen +#include <svx/udlnitem.hxx> +#endif +#ifndef _SVX_CRSDITEM_HXX //autogen +#include <svx/crsditem.hxx> +#endif +#ifndef _SVX_CNTRTITEM_HXX //autogen +#include <svx/cntritem.hxx> +#endif +#ifndef _SVX_SHDDITEM_HXX //autogen +#include <svx/shdditem.hxx> +#endif +#ifndef _SVX_COLRITEM_HXX //autogen +#include <svx/colritem.hxx> +#endif +#ifndef _SVX_BOXITEM_HXX //autogen +#include <svx/boxitem.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen +#include <svx/brshitem.hxx> +#endif +#ifndef _SVX_ADJITEM_HXX //autogen +#include <svx/adjitem.hxx> +#endif +#ifndef _SVX_ROTMODIT_HXX //autogen +#include <svx/rotmodit.hxx> +#endif +#ifndef _SFXINTITEM_HXX //autogen +#include <svtools/intitem.hxx> +#endif + +struct SwAfVersions; + +class SvNumberFormatter; + +class SwBoxAutoFmt +{ + // gemeinsamer Teil von StarCalc und StarWriter + SvxFontItem aFont; + + SvxFontHeightItem aHeight; + SvxWeightItem aWeight; + SvxPostureItem aPosture; + SvxUnderlineItem aUnderline; + SvxCrossedOutItem aCrossedOut; + SvxContourItem aContour; + SvxShadowedItem aShadowed; + SvxColorItem aColor; + SvxBoxItem aBox; + SvxBrushItem aBackground; + + // StarWriter spezifisches + SvxAdjustItem aAdjust; + + // StarCalc spezifisches + SvxHorJustifyItem aHorJustify; + SvxVerJustifyItem aVerJustify; + SvxOrientationItem aOrientation; + SvxMarginItem aMargin; + SfxBoolItem aLinebreak; + SfxInt32Item aRotateAngle; + SvxRotateModeItem aRotateMode; + + // und als letzes das Zahlenformat fuer die Box + String sNumFmtString; + LanguageType eSysLanguage, eNumFmtLanguage; + +public: + SwBoxAutoFmt(); + SwBoxAutoFmt( const SwBoxAutoFmt& rNew ); + ~SwBoxAutoFmt(); + + int operator==( const SwBoxAutoFmt& rCmp ) const; + SwBoxAutoFmt& operator=( const SwBoxAutoFmt& rNew ); + + // die Get-Methoden + const SvxFontItem &GetFont() const { return aFont; } + const SvxFontHeightItem &GetHeight() const { return aHeight; } + const SvxWeightItem &GetWeight() const { return aWeight; } + const SvxPostureItem &GetPosture() const { return aPosture; } + const SvxUnderlineItem &GetUnderline() const { return aUnderline; } + const SvxCrossedOutItem &GetCrossedOut() const { return aCrossedOut; } + const SvxContourItem &GetContour() const { return aContour; } + const SvxShadowedItem &GetShadowed() const { return aShadowed; } + const SvxColorItem &GetColor() const { return aColor; } + const SvxAdjustItem &GetAdjust() const { return aAdjust; } + const SvxBoxItem &GetBox() const { return aBox; } + const SvxBrushItem &GetBackground() const { return aBackground; } + void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const + { rFmt = sNumFmtString; rLng = eNumFmtLanguage; rSys = eSysLanguage; } + + // die SetMethoden + void SetFont( const SvxFontItem& rNew ) { aFont = rNew; } + void SetHeight( const SvxFontHeightItem& rNew ) { aHeight = rNew; } + void SetWeight( const SvxWeightItem& rNew ) { aWeight = rNew; } + void SetPosture( const SvxPostureItem& rNew ) { aPosture = rNew; } + void SetUnderline( const SvxUnderlineItem& rNew ) { aUnderline = rNew; } + void SetCrossedOut( const SvxCrossedOutItem& rNew ) { aCrossedOut = rNew; } + void SetContour( const SvxContourItem& rNew ) { aContour = rNew; } + void SetShadowed( const SvxShadowedItem& rNew ) { aShadowed = rNew; } + void SetColor( const SvxColorItem& rNew ) { aColor = rNew; } + void SetAdjust( const SvxAdjustItem& rNew ) + { + aAdjust.SetAdjust( rNew.GetAdjust() ); + aAdjust.SetOneWord( rNew.GetOneWord() ); + aAdjust.SetLastBlock( rNew.GetLastBlock() ); + } + void SetBox( const SvxBoxItem& rNew ) { aBox = rNew; } + void SetBackground( const SvxBrushItem& rNew ) { aBackground = rNew; } + void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys ) + { sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; } + + BOOL Load( SvStream& rStream, const SwAfVersions& rVersions, USHORT nVer ); + BOOL Save( SvStream& rStream ) const; + BOOL SaveVerionNo( SvStream& rStream ) const; + +#ifdef READ_OLDVERS + // lade alte Version + BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] ); +#endif +}; + +class SwTableAutoFmt +{ + friend void _FinitCore(); // zum Zerstoeren des dflt. Pointers + static SwBoxAutoFmt* pDfltBoxAutoFmt; + + String aName; + USHORT nStrResId; + BOOL bInclFont : 1; + BOOL bInclJustify : 1; + BOOL bInclFrame : 1; + BOOL bInclBackground : 1; + BOOL bInclValueFormat : 1; + + // StarCalc Spezifisches + BOOL bInclWidthHeight : 1; + + SwBoxAutoFmt* aBoxAutoFmt[ 16 ]; + +public: + SwTableAutoFmt( const String& rName ); + SwTableAutoFmt( const SwTableAutoFmt& rNew ); + ~SwTableAutoFmt(); + + SwTableAutoFmt& operator=( const SwTableAutoFmt& rNew ); + + void SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos ); + const SwBoxAutoFmt& GetBoxFmt( BYTE nPos ) const; + + void SetName( const String& rNew ) { aName = rNew; nStrResId = USHRT_MAX; } + const String& GetName() const { return aName; } + + enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 }; + SwBoxAutoFmt& UpdateFromSet( BYTE nPos, const SfxItemSet& rSet, + UpdateFlags eFlags, SvNumberFormatter* ); + void UpdateToSet( BYTE nPos, SfxItemSet& rSet, UpdateFlags eFlags, + SvNumberFormatter* ) const ; + + BOOL IsFont() const { return bInclFont; } + BOOL IsJustify() const { return bInclJustify; } + BOOL IsFrame() const { return bInclFrame; } + BOOL IsBackground() const { return bInclBackground; } + BOOL IsValueFormat() const { return bInclValueFormat; } + BOOL IsWidthHeight() const { return bInclWidthHeight; } + + void SetFont( const BOOL bNew ) { bInclFont = bNew; } + void SetJustify( const BOOL bNew ) { bInclJustify = bNew; } + void SetFrame( const BOOL bNew ) { bInclFrame = bNew; } + void SetBackground( const BOOL bNew ) { bInclBackground = bNew; } + void SetValueFormat( const BOOL bNew ) { bInclValueFormat = bNew; } + void SetWidthHeight( const BOOL bNew ) { bInclWidthHeight = bNew; } + + BOOL Load( SvStream& rStream, const SwAfVersions& ); + BOOL Save( SvStream& rStream ) const; + +#ifdef READ_OLDVERS + // lade alte Version + BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] ); +#endif +}; +typedef SwTableAutoFmt* SwTableAutoFmtPtr ; + +SV_DECL_PTRARR_DEL( _SwTableAutoFmtTbl, SwTableAutoFmtPtr, 1, 5 ) + +class SwTableAutoFmtTbl : public _SwTableAutoFmtTbl +{ + BOOL Load( SvStream& rStream ); + BOOL Save( SvStream& rStream ) const; +public: + SwTableAutoFmtTbl(); + + BOOL Load(); + BOOL Save() const; +}; + + + +/************************************************************************* + + Source Code Control System - Header + + $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/inc/tblafmt.hxx,v 1.1.1.1 2000-09-18 17:14:28 hr Exp $ + + Source Code Control System - Update + + $Log: not supported by cvs2svn $ + Revision 1.22 2000/09/18 16:03:31 willem.vandorp + OpenOffice header added. + + Revision 1.21 2000/09/08 13:24:29 willem.vandorp + Header and footer replaced + + Revision 1.20 1999/10/11 15:23:51 jp + TableautoFormatnames with resource ids + + Revision 1.19 1998/09/29 08:12:48 NN + #53381# bei Zahlformat Systemsprache beim Erzeugen mitspeichern + + + Rev 1.18 29 Sep 1998 10:12:48 NN + #53381# bei Zahlformat Systemsprache beim Erzeugen mitspeichern + + Rev 1.17 15 Sep 1998 21:23:02 ER + #47738# gedrehter Text in Tabellen-AutoFormat + + Rev 1.16 02 Jun 1998 10:35:02 JP + TabellenAutoFormat: Load/Save ohne Stream - erzeugen diesen selbst + + Rev 1.15 14 May 1998 15:16:48 JP + neu: Numberformat vom Boxen unterstuetzen + + Rev 1.14 12 May 1998 23:34:52 JP + neu: Zuweisungsoperator fuer SwTableAutoFmt + + Rev 1.13 04 Sep 1997 09:02:58 MA + includes + + Rev 1.12 09 Aug 1997 12:45:06 OS + paraitem/frmitems/textitem aufgeteilt + + Rev 1.11 07 Aug 1997 14:43:12 OM + Headerfile-Umstellung + + Rev 1.10 24 Jun 1996 18:35:28 MA + includes + + Rev 1.9 13 Dec 1995 09:55:02 MA + opt: Bessere Defaults fuer Arrays + + Rev 1.8 11 Dec 1995 13:38:48 HJS + anpassung fuer unix + + Rev 1.7 30 Nov 1995 20:22:30 JP + DefaultTblAutoFmt erst auf Bedarf anlegen + + Rev 1.6 31 Jul 1995 10:17:50 AMA + International-Umstellung wg. Update 253 + + Rev 1.5 20 Jul 1995 19:39:48 JP + Aederung fuer gemeinsamen Import/Export der Tabellen-Autoformatierung von Calc/Writer + + Rev 1.4 10 Jun 1995 16:05:20 JP + Save/Load nochmals umgestellt + + Rev 1.3 10 Jun 1995 12:51:26 JP + SwBoxAutoFmt::Load - Load-Version mit geben + + Rev 1.2 06 Mar 1995 05:07:02 JP + Load & Save als Dummy + + Rev 1.1 04 Mar 1995 20:42:22 JP + Adjust nachgetragen + + Rev 1.0 04 Mar 1995 15:46:14 JP + Initial revision. + +*************************************************************************/ + // #ifndef _... +#endif diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx new file mode 100644 index 000000000000..bd08f50730c2 --- /dev/null +++ b/sw/inc/tblenum.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * $RCSfile: tblenum.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TBLENUM_HXX +#define _TBLENUM_HXX + +//fuers aendern der Tabellen/Spalten/Zeilen Breiten/Hoehen +enum TblChgWidthHeightType +{ + WH_COL_LEFT, + WH_COL_RIGHT, + WH_ROW_TOP, + WH_ROW_BOTTOM, + WH_CELL_LEFT, + WH_CELL_RIGHT, + WH_CELL_TOP, + WH_CELL_BOTTOM, + + + // folgende koennen hinein verodert werden + WH_FLAG_INSDEL = 0x4000, // Insert/Del-Modus: das Bigger-Flag + // besagt was passiert: + // bBigger -> Box wird entfernt + // !bBigger-> Box wird eingefuegt + WH_FLAG_BIGGER = 0x8000 // Box wird groesser -> sonst kleiner +}; + +enum TblChgMode +{ + TBLFIX_CHGABS, // Tabelle feste Breite, den Nachbar andern + TBLFIX_CHGPROP, // Tabelle feste Breite, alle Nachbarn aendern + TBLVAR_CHGABS // Tabelle variable, alle Nachbarn aendern +}; + + +enum SplitTbl_HeadlineOption +{ + HEADLINE_NONE = 0, // lasse alles wie es ist + HEADLINE_BORDERCOPY, // von der davor obere Line der vorhergehen Line + HEADLINE_CNTNTCOPY, // kopiere die 1. Line komplett mit Inhalt + HEADLINE_BOXATTRCOPY, // kopiere von der 1. Line die Box Attribute + HEADLINE_BOXATRCOLLCOPY // kopiere von der 1. Line die Box Attribute + // und die Absatzvorlagen +}; + +enum TableMergeErr +{ + TBLMERGE_OK, + TBLMERGE_NOSELECTION, + TBLMERGE_TOOCOMPLEX +}; + + +#endif diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx new file mode 100644 index 000000000000..e9c471c472df --- /dev/null +++ b/sw/inc/tblsel.hxx @@ -0,0 +1,269 @@ +/************************************************************************* + * + * $RCSfile: tblsel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TBLSEL_HXX +#define _TBLSEL_HXX + +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif + +#ifndef _SWTABLE_HXX +#include <swtable.hxx> +#endif +#ifndef _SWRECT_HXX +#include <swrect.hxx> +#endif + +class SwCrsrShell; +class SwCursor; +class SwTableCursor; +class SwFrm; +class SwTabFrm; +class SwTableBox; +class SwTableLine; +class SwLayoutFrm; +class SwPaM; +class SwNode; +class SwTable; +class SwUndoTblMerge; +class SwCellFrm; + +SV_DECL_PTRARR( SwCellFrms, SwCellFrm*, 16, 16 ) +SV_DECL_PTRARR_SORT( SwSelBoxes, SwTableBoxPtr, 10, 20 ) + + +//Sucht alle Boxen zusammen, die in der Tabelle selektiert sind. +//Je nach enum-Parameter wird die Selektion in der angegebenen Richtung +//erweitert. +//Die Boxen werden ueber das Layout zusammengsucht, es wird auch bei +//aufgespaltenen Tabellen korrekt gearbeitet (siehe: MakeSelUnions()). +enum SwTblSearchType +{ + TBLSEARCH_NONE = 0x1, // keine Erweiterung + TBLSEARCH_ROW = 0x2, // erweiter auf Zeilen + TBLSEARCH_COL = 0x3, // erweiter auf Spalten + + // als Flag zu den anderen Werten!! + TBLSEARCH_PROTECT = 0x8, // auch geschuetzte Boxen einsammeln + TBLSEARCH_NO_UNION_CORRECT = 0x10 // die zusammenges. Union nicht korrigieren +}; + +void GetTblSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes, + const SwTblSearchType = TBLSEARCH_NONE ); + +void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, + const SwTblSearchType = TBLSEARCH_NONE ); + +//wie vor, jedoch wird nicht von der Selektion sondern von den +//Start- EndFrms ausgegangen. +void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, + SwSelBoxes& rBoxes, const SwTblSearchType = TBLSEARCH_NONE ); + +// Desgleichen nocheinmal direkt per PaM's +void GetTblSelCrs( const SwCrsrShell& rShell, SwSelBoxes& rBoxes ); +void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes ); + +// suche fuer eine AutoSumme die beteiligten Boxen zusammen +BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& ); + +// check if the SelBoxes contains protected Boxes +BOOL HasProtectedCells( const SwSelBoxes& rBoxes ); + +// teste, ob die Selektion ausgeglichen ist +SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16, 16); +SV_DECL_PTRARR_DEL( SwChartLines, SwChartBoxes*, 25, 50); + +BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, + SwChartLines* pGetCLines = 0 ); + +// teste ob die Celle in die SSelection gehoert +// (wurde eine Funktion, damit GetTblSel() und MakeTblCrsr() immer +// das "gleiche Verstaendnis" fuer die Selektion haben) +BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ); + +// bestimme die Boxen, die zusammen gefasst werden sollen. +// Dabei wird auf Layout Basis das Rechteck "angepasst". D.H. es +// werden Boxen zugefuegt wenn welche an den Seiten ueberlappen +// Zusaetzlich wird die neue Box erzeugt und mit dem entsprechenden +// Inhalt gefuellt. +void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, + SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo = 0 ); + +// teste ob die selektierten Boxen ein gueltiges Merge erlauben +USHORT CheckMergeSel( const SwPaM& rPam ); +USHORT CheckMergeSel( const SwSelBoxes& rBoxes ); + +// teste ob ein Split oder InsertCol dazu fuehrt, das eine Box +// kleiner als MINLAY wird. +BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv, + const SwTblSearchType = TBLSEARCH_NONE ); +BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv, + const SwTblSearchType = TBLSEARCH_NONE ); + +//Fuer das Arbeiten auf TabSelektion auch fuer aufgespaltene Tabellen. +class SwSelUnion +{ + SwRect aUnion; //Das die Sel umschliessende Rechteck. + SwTabFrm *pTable; //Die (Follow-)Table zu der Union. + +public: + SwSelUnion( const SwRect &rRect, SwTabFrm *pTab ) : + aUnion( rRect ), pTable( pTab ) {} + + const SwRect& GetUnion() const { return aUnion; } + SwRect& GetUnion() { return aUnion; } + const SwTabFrm *GetTable() const { return pTable; } + SwTabFrm *GetTable() { return pTable; } +}; + +SV_DECL_PTRARR_DEL( SwSelUnions, SwSelUnion*, 10, 20 ) + +//Ermittelt die von einer Tabellenselektion betroffenen Tabellen und die +//Union-Rechteckte der Selektionen - auch fuer aufgespaltene Tabellen. +//Wenn ein Parameter != TBLSEARCH_NONE uebergeben wird, so wird die +//Selektion in der angegebenen Richtung erweitert. +void MakeSelUnions( SwSelUnions&, const SwLayoutFrm *pStart, + const SwLayoutFrm *pEnd, + const SwTblSearchType = TBLSEARCH_NONE ); + + +// ------------------------------------------------------------------- +// Diese Klassen kopieren die aktuelle Tabellen-Selektion (rBoxes) +// unter Beibehaltung der Tabellen-Strubktur in eine eigene Struktur + +class _FndBox; +class _FndLine; + +SV_DECL_PTRARR_DEL( _FndBoxes, _FndBox*, 10, 20 ) +SV_DECL_PTRARR_DEL( _FndLines, _FndLine*,10, 20 ) + +class _FndBox +{ + SwTableBox* pBox; + _FndLines aLines; + _FndLine* pUpper; + + SwTableLine *pLineBefore; //Zum Loeschen/Restaurieren des Layouts. + SwTableLine *pLineBehind; + +public: + _FndBox( SwTableBox* pB, _FndLine* pFL ) : + pBox(pB), pUpper(pFL), pLineBefore( 0 ), pLineBehind( 0 ) {} + + const _FndLines& GetLines() const { return aLines; } + _FndLines& GetLines() { return aLines; } + const SwTableBox* GetBox() const { return pBox; } + SwTableBox* GetBox() { return pBox; } + const _FndLine* GetUpper() const { return pUpper; } + _FndLine* GetUpper() { return pUpper; } + + void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable ); + void SetTableLines( const SwTable &rTable ); + void DelFrms ( SwTable &rTable ); + void MakeFrms( SwTable &rTable ); + void MakeNewFrms( SwTable &rTable, const USHORT nNumber, + const BOOL bBehind ); + BOOL AreLinesToRestore( const SwTable &rTable ) const; + + //Auch die Charts zu der Tabelle muessen etwas von den Veraenderungen + //mitbekommen. + void SaveChartData( const SwTable &rTable ); + void RestoreChartData( const SwTable &rTable ); +}; + + +class _FndLine +{ + SwTableLine* pLine; + _FndBoxes aBoxes; + _FndBox* pUpper; +public: + _FndLine(SwTableLine* pL, _FndBox* pFB=0) : pLine(pL), pUpper(pFB) {} + const _FndBoxes& GetBoxes() const { return aBoxes; } + _FndBoxes& GetBoxes() { return aBoxes; } + const SwTableLine* GetLine() const { return pLine; } + SwTableLine* GetLine() { return pLine; } + const _FndBox* GetUpper() const { return pUpper; } + _FndBox* GetUpper() { return pUpper; } + + void SetUpper( _FndBox* pUp ) { pUpper = pUp; } +}; + + +struct _FndPara +{ + _FndBox* pFndBox; + _FndLine* pFndLine; + const SwSelBoxes& rBoxes; + + _FndPara( const SwSelBoxes& rBxs, _FndBox* pFB ) + : rBoxes( rBxs ), pFndBox( pFB ) {} + _FndPara( const _FndPara& rPara, _FndBox* pFB ) + : rBoxes(rPara.rBoxes), pFndLine(rPara.pFndLine), pFndBox(pFB) {} + _FndPara( const _FndPara& rPara, _FndLine* pFL ) + : rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {} +}; + +BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara ); +BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara ); + + +#endif // _TBLSEL_HXX diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx new file mode 100644 index 000000000000..d7d1aecd78ba --- /dev/null +++ b/sw/inc/tox.hxx @@ -0,0 +1,702 @@ +/************************************************************************* + * + * $RCSfile: tox.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TOX_HXX +#define _TOX_HXX + +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif + +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif + +#ifndef _SFXPOOLITEM_HXX //autogen +#include <svtools/poolitem.hxx> +#endif + +#ifndef _SWTYPES_HXX +#include <swtypes.hxx> +#endif +#ifndef _TOXE_HXX +#include <toxe.hxx> +#endif +#ifndef _CALBCK_HXX +#include <calbck.hxx> +#endif +#ifndef _ERRHDL_HXX +#include <errhdl.hxx> +#endif + +class SwTOXType; +class SwTOXMark; +class SwTxtTOXMark; +class SwDoc; + +SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10) + +/*-------------------------------------------------------------------- + Beschreibung: Eintrag fuer Inhaltsverzeichnis oder Benutzerverz. + --------------------------------------------------------------------*/ + +#define IVER_TOXMARK_STRPOOL ((USHORT)1) +#define IVER_TOXMARK_NEWTOX ((USHORT)2) + +class SwTOXMark : public SfxPoolItem, public SwClient +{ + friend void _InitCore(); + friend class SwTxtTOXMark; + + String aAltText; // Der Text des Eintrages ist unterschiedlich + String aPrimaryKey, aSecondaryKey; + + SwTxtTOXMark* pTxtAttr; + + USHORT nLevel; + BOOL bAutoGenerated : 1; // generated using a concordance file + BOOL bMainEntry : 1; // main entry emphasized by character style + + + SwTOXMark(); // for crete the dflt. atr. in _InitCore + +public: + TYPEINFO(); // fuers rtti + + SwTOXMark( const SwTOXType* pTyp ); + SwTOXMark( const SwTOXMark& rCopy ); + virtual ~SwTOXMark(); + + // "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; + + SwTOXMark& operator=( const SwTOXMark& rCopy ); + String GetText() const; + + inline BOOL IsAlternativeText() const; + inline const String& GetAlternativeText() const; + + inline void SetAlternativeText( const String& rAlt ); + + // Inhalts-/Benutzerverzeichnis - spezifisch + inline void SetLevel(USHORT nLevel); + inline USHORT GetLevel() const; + + // Index - spezifisch + inline void SetPrimaryKey(const String& rStr ); + inline void SetSecondaryKey(const String& rStr); + inline const String& GetPrimaryKey() const; + inline const String& GetSecondaryKey() const; + + BOOL IsAutoGenerated() const {return bAutoGenerated;} + void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;} + + BOOL IsMainEntry() const {return bMainEntry;} + void SetMainEntry(BOOL bSet) { bMainEntry = bSet;} + + inline const SwTOXType* GetTOXType() const; + + const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; } + SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; } +}; + +/*-------------------------------------------------------------------- + Beschreibung: Typen einzelner Verzeichnisse + --------------------------------------------------------------------*/ + +class SwTOXType : public SwModify +{ +public: + SwTOXType(TOXTypes eTyp, const String& aName); + SwTOXType(const SwTOXType& rCopy); + + inline const String& GetTypeName() const; + void SetTypeName(const String& rName); + inline TOXTypes GetType() const; + +private: + String aName; + TOXTypes eType; +}; + +/*-------------------------------------------------------------------- + Beschreibung: Muster fuer Zeilen eines Verzeichnisses + --------------------------------------------------------------------*/ + +#define FORM_TITLE 0 +#define FORM_ALPHA_DELIMITTER 1 +#define FORM_PRIMARY_KEY 2 +#define FORM_SECONDARY_KEY 3 +#define FORM_ENTRY 4 + +/* + Pattern structure + + <E#> - entry number <E# CharStyleName,PoolId> + <ET> - entry text <ET CharStyleName,PoolId> + <E> - entry text and number <E CharStyleName,PoolId> + <T> - tab stop <T,,Position,Adjust> + <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId> + <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER> + <#> - Page number <# CharStyleName,PoolId> + <LS> - Link start <LS> + <LE> - Link end <LE> + <A00> - Authority entry field <A02 CharStyleName, PoolId> + */ + +// These enum values are stored and must not change! +enum FormTokenType +{ + TOKEN_ENTRY_NO, + TOKEN_ENTRY_TEXT, + TOKEN_ENTRY, + TOKEN_TAB_STOP, + TOKEN_TEXT, + TOKEN_PAGE_NUMS, + TOKEN_CHAPTER_INFO, + TOKEN_LINK_START, + TOKEN_LINK_END, + TOKEN_AUTHORITY, + TOKEN_END +}; + +struct SwFormToken +{ + String sText; + String sCharStyleName; + SwTwips nTabStopPosition; + FormTokenType eTokenType; + USHORT nPoolId; + USHORT eTabAlign; + USHORT nChapterFormat; //SwChapterFormat; + USHORT nAuthorityField; //enum ToxAuthorityField + sal_Unicode cTabFillChar; + + SwFormToken(FormTokenType eType ) : + eTokenType(eType), + nTabStopPosition(ULONG_MAX), + nPoolId(USHRT_MAX), + eTabAlign(0 /*SVX_TAB_ADJUST_LEFT*/), + cTabFillChar(' '), + nChapterFormat(0 /*CF_NUMBER*/), + nAuthorityField(0)/*AUTH_FIELD_IDENTIFIER*/{} + + String GetString() const; +}; + +class SwFormTokenEnumerator +{ + String sPattern; + xub_StrLen nCurPatternPos; + xub_StrLen nCurPatternLen; + + FormTokenType _SearchNextToken( xub_StrLen nStt, xub_StrLen& rEnd, + xub_StrLen* pTokenLen = 0 ) const; + SwFormToken BuildToken( FormTokenType, xub_StrLen ) const; + +public: + SwFormTokenEnumerator( const String& rPattern ); + BOOL HasNextToken() const + { return nCurPatternPos + nCurPatternLen < sPattern.Len(); } + + SwFormToken GetNextToken(); + SwFormToken GetCurToken() const; + + FormTokenType GetCurTokenType(); + FormTokenType GetNextTokenType(); + FormTokenType GetPrevTokenType(); + void RemoveCurToken(); + void InsertToken( const SwFormToken& rToken ); + const String& GetPattern() const { return sPattern; } +}; + +class SwForm +{ + String aPattern[ AUTH_TYPE_END + 1 ]; + String aTemplate[ AUTH_TYPE_END + 1 ]; + USHORT nType, nFormMaxLevel; + //USHORT nFirstTabPos; -> Value in tab token +// BOOL bHasFirstTabPos : 1; + BOOL bGenerateTabPos : 1; + BOOL bIsRelTabPos : 1; + BOOL bCommaSeparated : 1; + +public: + SwForm( USHORT nType = TOX_CONTENT ); + SwForm( const SwForm& rForm ); + + SwForm& operator=( const SwForm& rForm ); + + inline void SetTemplate(USHORT nLevel, const String& rName); + inline const String& GetTemplate(USHORT nLevel) const; + + inline void SetPattern(USHORT nLevel, const String& rName); + inline const String& GetPattern(USHORT nLevel) const; + + //convert pattern string from old to new format or vice versa + static String ConvertPatternTo51(const String& rSource); + static String ConvertPatternFrom51(const String& rSource, TOXTypes eType); + + // fill tab stop positions from template to pattern + void AdjustTabStops(SwDoc& rDoc); + + SwFormTokenEnumerator CreateTokenEnumerator(USHORT nLevel) const + {return SwFormTokenEnumerator(GetPattern(nLevel));} + + inline USHORT GetTOXType() const; + inline USHORT GetFormMax() const; + + USHORT GetFirstTabPos() const ; //{ return nFirstTabPos; } + void SetFirstTabPos( USHORT n ); //{ nFirstTabPos = n; } + + BOOL IsFirstTabPosFlag() const ; //{ return bHasFirstTabPos; } + void SetFirstTabPosFlag( BOOL b ); //{ bHasFirstTabPos = b; } + + BOOL IsGenerateTabPos() const { return bGenerateTabPos; } + void SetGenerateTabPos( BOOL b ) { bGenerateTabPos = b; } + + BOOL IsRelTabPos() const { return bIsRelTabPos; } + void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; } + + BOOL IsCommaSeparated() const { return bCommaSeparated;} + void SetCommaSeparated( BOOL b) { bCommaSeparated = b;} + + static USHORT GetFormMaxLevel( USHORT nType ); + + static const sal_Char* aFormEntry; // <E> + static BYTE nFormEntryLen; // 3 Zeichen + static const sal_Char* aFormTab; // <T> + static BYTE nFormTabLen; // 3 Zeichen + static const sal_Char* aFormPageNums; // <P> + static BYTE nFormPageNumsLen; // 3 Zeichen + static const sal_Char* aFormLinkStt; // <LS> + static BYTE nFormLinkSttLen; // 4 Zeichen + static const sal_Char* aFormLinkEnd; // <LE> + static BYTE nFormLinkEndLen; // 4 Zeichen + static const sal_Char* aFormEntryNum; // <E#> + static BYTE nFormEntryNumLen; // 4 Zeichen + static const sal_Char* aFormEntryTxt; // <ET> + static BYTE nFormEntryTxtLen; // 4 Zeichen + static const sal_Char* aFormChapterMark; // <C> + static BYTE nFormChapterMarkLen; // 3 Zeichen + static const sal_Char* aFormText; // <TX> + static BYTE nFormTextLen; // 4 Zeichen + static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value + static BYTE nFormAuthLen; // 3 chars +}; + +/*-------------------------------------------------------------------- + Beschreibung: Inhalte aus denen Verzeichnisse generiert werden + --------------------------------------------------------------------*/ + +enum SwTOXElement +{ + TOX_MARK = 1, + TOX_OUTLINELEVEL = 2, + TOX_TEMPLATE = 4, + TOX_OLE = 8, + TOX_TABLE = 16, + TOX_GRAPHIC = 32, + TOX_FRAME = 64, + TOX_SEQUENCE = 128 +}; + +enum SwTOIOptions +{ + TOI_SAME_ENTRY = 1, + TOI_FF = 2, + TOI_CASE_SENSITIVE = 4, + TOI_KEY_AS_ENTRY = 8, + TOI_ALPHA_DELIMITTER = 16, + TOI_DASH = 32, + TOI_INITIAL_CAPS = 64 +}; + +//which part of the caption is to be displayed +enum SwCaptionDisplay +{ + CAPTION_COMPLETE, + CAPTION_NUMBER, + CAPTION_TEXT +}; + +enum SwTOOElements +{ + TOO_MATH = 0x01, + TOO_CHART = 0x02, + TOO_IMAGE = 0x04, + TOO_CALC = 0x08, + TOO_DRAW_IMPRESS= 0x10, +// TOO_IMPRESS = 0x20, + + TOO_OTHER = 0x80 +}; + +#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) //JP 19.07.00: use a control char + +/*-------------------------------------------------------------------- + Beschreibung: Klasse aller Verzeichnisse + --------------------------------------------------------------------*/ + +class SwTOXBase : public SwClient +{ + // not implemented + SwTOXBase& operator=(const SwTOXBase& rSource); + +//protected: + + SwForm aForm; // Aussehen der Eintragzeile + String aName; // unique name + String aTitle; // Der Verzeichnistitel + + String sMainEntryCharStyle; // name of the character style applied to main index entries + + String aStyleNames[MAXLEVEL]; // (additional) style names TOX_CONTENT, TOX_USER + String sSequenceName; // FieldTypeName of a caption sequence + + union { + USHORT nLevel; // Gliederungsebenen beachten + USHORT nOptions; // Optionen fuer Index + } aData; + + USHORT nCreateType; // Quellen aus dem das Verzeichnis generiert wird + USHORT nOLEOptions; // OLE sources + SwCaptionDisplay eCaptionDisplay; // + BOOL bProtected : 1; // index protected ? + BOOL bFromChapter : 1; // create from chapter or document + BOOL bFromObjectNames : 1; // create a table or object index + // from the names rather than the caption + BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter +public: + SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm, + USHORT nCreaType, const String& rTitle ); + SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 ); + virtual ~SwTOXBase(); + + virtual BOOL GetInfo( SfxPoolItem& rInfo ) const; + + // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc. + // If not, so create it an copy all other used things. The return is this + SwTOXBase& CopyTOXBase( SwDoc*, const SwTOXBase& ); + + const SwTOXType* GetTOXType() const; // + + USHORT GetCreateType() const; // Aus Inhaltsformen generieren + + const String& GetTOXName() const {return aName;} + void SetTOXName(const String& rSet) {aName = rSet;} + + const String& GetTitle() const; // Titel des Verzeichnisses + const String& GetTypeName() const; // Name des Verzeichnisses + const SwForm& GetTOXForm() const; // Aussehen der Zeile + + void SetCreate(USHORT); + void SetTitle(const String& rTitle); + void SetTOXForm(const SwForm& rForm); + + TOXTypes GetType() const; + + const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;} + void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;} + + // Inhaltsverzeichnis - spezifisch + inline void SetLevel(USHORT); // Gliederungsebene beachten + inline USHORT GetLevel() const; + + // Index - spezifisch + inline USHORT GetOptions() const; // Optionen fuer Index + inline void SetOptions(USHORT nOpt); + + // index of objects + USHORT GetOLEOptions() const {return nOLEOptions;} + void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;} + + // index of objects + + // Benutzerverzeichnis - spezifisch + inline void SetTemplateName(const String& rName); // Absatzlayout beachten + inline String GetTemplateName() const; + + const String& GetStyleNames(USHORT nLevel) const + { + DBG_ASSERT( nLevel < MAXLEVEL, "Which level?"); + return aStyleNames[nLevel]; + } + void SetStyleNames(const String& rSet, USHORT nLevel) + { + DBG_ASSERT( nLevel < MAXLEVEL, "Which level?"); + aStyleNames[nLevel] = rSet; + } + BOOL HasAnyStyleNames() const; + + BOOL IsFromChapter() const { return bFromChapter;} + void SetFromChapter(BOOL bSet) { bFromChapter = bSet;} + + BOOL IsFromObjectNames() const {return bFromObjectNames;} + void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;} + + BOOL IsLevelFromChapter() const {return bLevelFromChapter;} + void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;} + + BOOL IsProtected() const { return bProtected; } + void SetProtected(BOOL bSet) { bProtected = bSet; } + + const String& GetSequenceName() const {return sSequenceName;} + void SetSequenceName(const String& rSet) {sSequenceName = rSet;} + + SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;} + void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;} + + BOOL IsTOXBaseInReadonly() const; + + const SfxItemSet* GetAttrSet() const; + void SetAttrSet( const SfxItemSet& ); + + static const String& GetTOXName(TOXTypes eType); // toxmgr.cxx + +}; + + +/*-------------------------------------------------------------------- + Beschreibung: Inlines + --------------------------------------------------------------------*/ + +// +//SwTOXMark +// +inline const String& SwTOXMark::GetAlternativeText() const + { return aAltText; } + +inline const SwTOXType* SwTOXMark::GetTOXType() const + { return (SwTOXType*)GetRegisteredIn(); } + +inline BOOL SwTOXMark::IsAlternativeText() const + { return aAltText.Len() > 0; } + +inline void SwTOXMark::SetAlternativeText(const String& rAlt) +{ + aAltText = rAlt; +} + +inline void SwTOXMark::SetLevel( USHORT nLvl ) +{ + ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + nLevel = nLvl; +} + +inline void SwTOXMark::SetPrimaryKey( const String& rKey ) +{ + ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + aPrimaryKey = rKey; +} + +inline void SwTOXMark::SetSecondaryKey( const String& rKey ) +{ + ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + aSecondaryKey = rKey; +} + +inline USHORT SwTOXMark::GetLevel() const +{ + ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + return nLevel; +} + +inline const String& SwTOXMark::GetPrimaryKey() const +{ + ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + return aPrimaryKey; +} + +inline const String& SwTOXMark::GetSecondaryKey() const +{ + ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + return aSecondaryKey; +} + + +// +//SwForm +// +inline void SwForm::SetTemplate(USHORT nLevel, const String& rName) +{ + ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX"); + aTemplate[nLevel] = rName; +} + +inline void SwForm::SetPattern(USHORT nLevel, const String& rName) +{ + ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX"); + aPattern[nLevel] = rName; +} + +inline const String& SwForm::GetPattern(USHORT nLevel) const +{ + ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX"); + return aPattern[nLevel]; +} + +inline const String& SwForm::GetTemplate(USHORT nLevel) const +{ + ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX"); + return aTemplate[nLevel]; +} + +inline USHORT SwForm::GetTOXType() const +{ + return nType; +} + +inline USHORT SwForm::GetFormMax() const +{ + return nFormMaxLevel; +} + + +// +//SwTOXType +// +inline const String& SwTOXType::GetTypeName() const + { return aName; } + +inline void SwTOXType::SetTypeName(const String& rName) + { aName = rName; } + +inline TOXTypes SwTOXType::GetType() const + { return eType; } + +// +// SwTOXBase +// +inline const SwTOXType* SwTOXBase::GetTOXType() const + { return (SwTOXType*)GetRegisteredIn(); } + +inline USHORT SwTOXBase::GetCreateType() const + { return nCreateType; } + +inline const String& SwTOXBase::GetTitle() const + { return aTitle; } + +inline const String& SwTOXBase::GetTypeName() const + { return GetTOXType()->GetTypeName(); } + +inline const SwForm& SwTOXBase::GetTOXForm() const + { return aForm; } + +inline void SwTOXBase::SetCreate(USHORT nCreate) + { nCreateType = nCreate; } + +inline void SwTOXBase::SetTitle(const String& rTitle) + { aTitle = rTitle; } + +inline void SwTOXBase::SetTOXForm(const SwForm& rForm) + { aForm = rForm; } + +inline TOXTypes SwTOXBase::GetType() const + { return GetTOXType()->GetType(); } + +inline void SwTOXBase::SetLevel(USHORT nLev) +{ + ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + aData.nLevel = nLev; +} + +inline USHORT SwTOXBase::GetLevel() const +{ + ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + return aData.nLevel; +} + +inline void SwTOXBase::SetTemplateName(const String& rName) +{ +// ASSERT(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp"); +// ASSERT(aData.pTemplateName, "pTemplateName == 0"); +// (*aData.pTemplateName) = rName; + DBG_WARNING("SwTOXBase::SetTemplateName obsolete") + aStyleNames[0] = rName; + +} + +inline String SwTOXBase::GetTemplateName() const +{ +// ASSERT(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp"); +// return *aData.pTemplateName; + DBG_WARNING("SwTOXBase::GetTemplateName obsolete") + return aStyleNames[0].GetToken(0, TOX_STYLE_DELIMITER); +} + +inline USHORT SwTOXBase::GetOptions() const +{ + ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + return aData.nOptions; +} + +inline void SwTOXBase::SetOptions(USHORT nOpt) +{ + ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + aData.nOptions = nOpt; +} + + +#endif // _TOX_HXX diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx new file mode 100644 index 000000000000..6a8c8bedf354 --- /dev/null +++ b/sw/inc/toxe.hxx @@ -0,0 +1,159 @@ +/************************************************************************* + * + * $RCSfile: toxe.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TOXE_HXX +#define _TOXE_HXX + +enum SwTOXSearch +{ + TOX_NXT, + TOX_PRV, + TOX_SAME_NXT, + TOX_SAME_PRV +}; + +enum SwTOIKeyType +{ + TOI_PRIMARY, + TOI_SECONDARY +}; + +enum TOXTypes +{ + TOX_INDEX, + TOX_USER, + TOX_CONTENT, + TOX_ILLUSTRATIONS, + TOX_OBJECTS, + TOX_TABLES, + TOX_AUTHORITIES +}; +// this enum contains all types of sources +enum ToxAuthorityType +{ + //BiBTeX - fields + AUTH_TYPE_ARTICLE, + AUTH_TYPE_BOOK, + AUTH_TYPE_BOOKLET, + AUTH_TYPE_CONFERENCE, + AUTH_TYPE_INBOOK, + AUTH_TYPE_INCOLLECTION, + AUTH_TYPE_INPROCEEDINGS, + AUTH_TYPE_JOURNAL, + AUTH_TYPE_MANUAL, + AUTH_TYPE_MASTERSTHESIS, + AUTH_TYPE_MISC, + AUTH_TYPE_PHDTHESIS, + AUTH_TYPE_PROCEEDINGS, + AUTH_TYPE_TECHREPORT, + AUTH_TYPE_UNPUBLISHED, + //additional types + AUTH_TYPE_EMAIL, + AUTH_TYPE_WWW, + AUTH_TYPE_CUSTOM1, + AUTH_TYPE_CUSTOM2, + AUTH_TYPE_CUSTOM3, + AUTH_TYPE_CUSTOM4, + AUTH_TYPE_CUSTOM5, + AUTH_TYPE_END +}; + +//this enum contains the fields of an authority entry +enum ToxAuthorityField +{ + AUTH_FIELD_IDENTIFIER, + AUTH_FIELD_AUTHORITY_TYPE, //ToxAuthorityType + //BibTex types + AUTH_FIELD_ADDRESS, + AUTH_FIELD_ANNOTE, + AUTH_FIELD_AUTHOR, + AUTH_FIELD_BOOKTITLE, + AUTH_FIELD_CHAPTER, + AUTH_FIELD_EDITION, + AUTH_FIELD_EDITOR, + AUTH_FIELD_HOWPUBLISHED, + AUTH_FIELD_INSTITUTION, + AUTH_FIELD_JOURNAL, +// AUTH_FIELD_KEY, // BiBTeX - Field + AUTH_FIELD_MONTH, + AUTH_FIELD_NOTE, + AUTH_FIELD_NUMBER, + AUTH_FIELD_ORGANIZATIONS, + AUTH_FIELD_PAGES, + AUTH_FIELD_PUBLISHER, + AUTH_FIELD_SCHOOL, + AUTH_FIELD_SERIES, + AUTH_FIELD_TITLE, + AUTH_FIELD_REPORT_TYPE, + AUTH_FIELD_VOLUME, + AUTH_FIELD_YEAR, + //additional types + AUTH_FIELD_URL, + AUTH_FIELD_CUSTOM1, + AUTH_FIELD_CUSTOM2, + AUTH_FIELD_CUSTOM3, + AUTH_FIELD_CUSTOM4, + AUTH_FIELD_CUSTOM5, + AUTH_FIELD_ISBN, + AUTH_FIELD_END +}; + + +#endif diff --git a/sw/inc/toxinit.hxx b/sw/inc/toxinit.hxx new file mode 100644 index 000000000000..25128fa9f434 --- /dev/null +++ b/sw/inc/toxinit.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * $RCSfile: toxinit.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TOXINIT_HXX +#define _TOXINIT_HXX + +class UniString; + +void SetTOUTableStr(const UniString& rStr); +void SetTOUGraphicStr(const UniString& rStr); +void SetTOUOLEStr(const UniString& rStr); + + +#endif // _TOXINIT_HXX diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx new file mode 100644 index 000000000000..81909ed02949 --- /dev/null +++ b/sw/inc/txatbase.hxx @@ -0,0 +1,482 @@ +/************************************************************************* + * + * $RCSfile: txatbase.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $ + * + * 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 _TXATBASE_HXX +#define _TXATBASE_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif +#ifndef _SFXPOOLITEM_HXX //autogen +#include <svtools/poolitem.hxx> +#endif +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif +#ifndef _ERRHDL_HXX +#include <errhdl.hxx> +#endif +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif + +class SwFont; +class SfxItemPool; + +class SvxBrushItem; +class SvxFontItem; +class SvxPostureItem; +class SvxWeightItem; +class SvxUnderlineItem; +class SvxFontHeightItem; +class SvxPropSizeItem; +class SvxShadowedItem; +class SvxAutoKernItem; +class SvxWordLineModeItem; +class SvxContourItem; +class SvxCrossedOutItem; +class SvxColorItem; +class SvxCharSetColorItem; +class SvXMLAttrContainerItem; + +class SwFmtCharFmt; +class SwFmtINetFmt; + +class SvxKerningItem; +class SvxCaseMapItem; +class SvxLanguageItem; +class SvxEscapementItem; +class SvxBlinkItem; +class SvxNoHyphenItem; + +class SwFmtSoftHyph; +class SwFmtHardBlank; +class SwFmtFld; +class SwFmtFtn; +class SwFmtFlyCnt; +class SwTOXMark; +class SwFmtRefMark; + +class SwTxtAttr +{ + const SfxPoolItem* pAttr; + xub_StrLen nStart; + BOOL bDontExpand : 1; + +protected: + SwTxtAttr( const SfxPoolItem& rAttr, xub_StrLen nStart ); + +public: + virtual ~SwTxtAttr(); + + // RemoveFromPool muss immer vorm DTOR Aufruf erfolgen!! + void RemoveFromPool( SfxItemPool& rPool ); + + // Start Position erfragen + xub_StrLen* GetStart() { return &nStart; } + const xub_StrLen* GetStart() const { return &nStart; } + + // End Position erfragen + virtual xub_StrLen* GetEnd(); + inline const xub_StrLen* GetEnd() const; + inline const xub_StrLen* GetAnyEnd() const; + + BOOL DontExpand() const { return bDontExpand; } + void SetDontExpand( BOOL bNew ) { bDontExpand = bNew; } + + inline const SfxPoolItem& GetAttr() const; + inline USHORT Which() const { return GetAttr().Which(); } + + virtual int operator==( const SwTxtAttr& ) const; + + virtual void ChgFnt( SwFont * ); + virtual void RstFnt( SwFont * ); + + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); + + inline const SvxFontItem &GetFont() const; + inline const SvxPostureItem &GetPosture() const; + inline const SvxWeightItem &GetWeight() const; + inline const SvxUnderlineItem &GetUnderline() const; + inline const SvxFontHeightItem &GetFontSize() const; + inline const SvxPropSizeItem &GetPropSize() const; + inline const SvxShadowedItem &GetShadowed() const; + inline const SvxAutoKernItem &GetAutoKern() const; + inline const SvxWordLineModeItem &GetWordLineMode() const; + inline const SvxContourItem &GetContour() const; + inline const SvxCrossedOutItem &GetCrossedOut() const; + inline const SvxColorItem &GetColor() const; + inline const SvxCharSetColorItem &GetCharSetColor() const; + inline const SwFmtCharFmt &GetCharFmt() const; + inline const SvxKerningItem &GetKerning() const; + inline const SvxCaseMapItem &GetCaseMap() const; + inline const SvxLanguageItem &GetLanguage() const; + inline const SvxEscapementItem &GetEscapement() const; + inline const SvxBlinkItem &GetBlink() const; + inline const SvxBrushItem &GetChrBackground() const; + inline const SvxNoHyphenItem &GetNoHyphenHere() const; + inline const SwFmtSoftHyph &GetSoftHyph() const; + inline const SwFmtHardBlank &GetHardBlank() const; + inline const SwFmtFld &GetFld() const; + inline const SwFmtFtn &GetFtn() const; + inline const SwFmtFlyCnt &GetFlyCnt() const; + inline const SwTOXMark &GetTOXMark() const; + inline const SwFmtRefMark &GetRefMark() const; + inline const SwFmtINetFmt &GetINetFmt() const; + inline const SvXMLAttrContainerItem &GetXMLAttrContainer() const; + +private: + SwTxtAttr( const SwTxtAttr& ); + SwTxtAttr& operator=( const SwTxtAttr& ); +}; + +class SwTxtAttrEnd : public SwTxtAttr +{ +protected: + xub_StrLen nEnd; + SwTxtAttrEnd( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd ); + +public: + + virtual xub_StrLen* GetEnd(); +}; + + +// --------------- Inline Implementierungen ------------------------ + +inline const xub_StrLen* SwTxtAttr::GetEnd() const +{ + return ((SwTxtAttr*)this)->GetEnd(); +} + +inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const +{ + const xub_StrLen* pEnd = GetEnd(); + return pEnd ? pEnd : &nStart; +} + +inline const SfxPoolItem& SwTxtAttr::GetAttr() const +{ + ASSERT( pAttr, "wo ist mein Attribut?" ); + return *pAttr; +} + +inline const SvxFontItem& SwTxtAttr::GetFont() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_FONT, "Falsche Abfrage" ); + return (const SvxFontItem&)*pAttr; +} + +inline const SvxPostureItem& SwTxtAttr::GetPosture() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_POSTURE, "Falsche Abfrage" ); + return (const SvxPostureItem&)*pAttr; +} + +inline const SvxWeightItem& SwTxtAttr::GetWeight() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_WEIGHT, "Falsche Abfrage" ); + return (const SvxWeightItem&)*pAttr; +} + +inline const SvxUnderlineItem& SwTxtAttr::GetUnderline() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_UNDERLINE, "Falsche Abfrage" ); + return (const SvxUnderlineItem&)*pAttr; +} + +inline const SvxFontHeightItem& SwTxtAttr::GetFontSize() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_FONTSIZE, "Falsche Abfrage" ); + return (const SvxFontHeightItem&)*pAttr; +} + +inline const SvxPropSizeItem& SwTxtAttr::GetPropSize() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_PROPORTIONALFONTSIZE, "Falsche Abfrage" ); + return (const SvxPropSizeItem&)*pAttr; +} + +inline const SvxShadowedItem& SwTxtAttr::GetShadowed() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_SHADOWED, "Falsche Abfrage" ); + return (const SvxShadowedItem&)*pAttr; +} + +inline const SvxAutoKernItem& SwTxtAttr::GetAutoKern() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_AUTOKERN, "Falsche Abfrage" ); + return (const SvxAutoKernItem&)*pAttr; +} + +inline const SvxWordLineModeItem& SwTxtAttr::GetWordLineMode() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_WORDLINEMODE, "Falsche Abfrage" ); + return (const SvxWordLineModeItem&)*pAttr; +} + +inline const SvxContourItem& SwTxtAttr::GetContour() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CONTOUR, "Falsche Abfrage" ); + return (const SvxContourItem&)*pAttr; +} + +inline const SvxCrossedOutItem& SwTxtAttr::GetCrossedOut() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CROSSEDOUT, "Falsche Abfrage" ); + return (const SvxCrossedOutItem&)*pAttr; +} + +inline const SvxColorItem& SwTxtAttr::GetColor() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_COLOR, "Falsche Abfrage" ); + return (const SvxColorItem&)*pAttr; +} + +inline const SvxCharSetColorItem& SwTxtAttr::GetCharSetColor() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CHARSETCOLOR, "Falsche Abfrage" ); + return (const SvxCharSetColorItem&)*pAttr; +} + +inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_CHARFMT, "Falsche Abfrage" ); + return (const SwFmtCharFmt&)*pAttr; +} + +inline const SvxKerningItem& SwTxtAttr::GetKerning() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_KERNING, "Falsche Abfrage" ); + return (const SvxKerningItem&)*pAttr; +} + +inline const SvxCaseMapItem& SwTxtAttr::GetCaseMap() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_CASEMAP, "Falsche Abfrage" ); + return (const SvxCaseMapItem&)*pAttr; +} + +inline const SvxLanguageItem& SwTxtAttr::GetLanguage() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_LANGUAGE, "Falsche Abfrage" ); + return (const SvxLanguageItem&)*pAttr; +} + +inline const SvxEscapementItem& SwTxtAttr::GetEscapement() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_ESCAPEMENT, "Falsche Abfrage" ); + return (const SvxEscapementItem&)*pAttr; +} + +inline const SvxBlinkItem& SwTxtAttr::GetBlink() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_BLINK, "Falsche Abfrage" ); + return (const SvxBlinkItem&)*pAttr; +} + +inline const SvxBrushItem& SwTxtAttr::GetChrBackground() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_BACKGROUND, "Falsche Abfrage" ); + return (const SvxBrushItem&)*pAttr; +} + +inline const SvxNoHyphenItem& SwTxtAttr::GetNoHyphenHere() const +{ + ASSERT( pAttr && pAttr->Which() == RES_CHRATR_NOHYPHEN, "Falsche Abfrage" ); + return (const SvxNoHyphenItem&)*pAttr; +} + +inline const SwFmtSoftHyph& SwTxtAttr::GetSoftHyph() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_SOFTHYPH, "Falsche Abfrage" ); + return (const SwFmtSoftHyph&)*pAttr; +} + +inline const SwFmtHardBlank& SwTxtAttr::GetHardBlank() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_HARDBLANK, "Falsche Abfrage" ); + return (const SwFmtHardBlank&)*pAttr; +} + +inline const SwFmtFld& SwTxtAttr::GetFld() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_FIELD, "Falsche Abfrage" ); + return (const SwFmtFld&)*pAttr; +} + +inline const SwFmtFtn& SwTxtAttr::GetFtn() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_FTN, "Falsche Abfrage" ); + return (const SwFmtFtn&)*pAttr; +} + +inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_FLYCNT, "Falsche Abfrage" ); + return (const SwFmtFlyCnt&)*pAttr; +} + +inline const SwTOXMark& SwTxtAttr::GetTOXMark() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_TOXMARK, "Falsche Abfrage" ); + return (const SwTOXMark&)*pAttr; +} + +inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_REFMARK, "Falsche Abfrage" ); + return (const SwFmtRefMark&)*pAttr; +} + +inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const +{ + ASSERT( pAttr && pAttr->Which() == RES_TXTATR_INETFMT, "Falsche Abfrage" ); + return (const SwFmtINetFmt&)*pAttr; +} + +inline const SvXMLAttrContainerItem& SwTxtAttr::GetXMLAttrContainer() const +{ + ASSERT( pAttr && pAttr->Which() == RES_UNKNOWNATR_CONTAINER, + "Falsche Abfrage" ); + return (const SvXMLAttrContainerItem&)*pAttr; +} + +/************************************************************************* + + $Log: not supported by cvs2svn $ + Revision 1.23 2000/09/18 16:03:31 willem.vandorp + OpenOffice header added. + + Revision 1.22 2000/09/08 13:24:29 willem.vandorp + Header and footer replaced + + Revision 1.21 2000/05/10 12:47:25 ama + Unicode changes + + Revision 1.20 1999/12/07 21:09:51 jp + Task #70258#: textattr for XMLAttrContainer + + Revision 1.19 1998/01/23 16:39:36 AMA + New: Redlining + Zeichenattribute + + + Rev 1.18 23 Jan 1998 17:39:36 AMA + New: Redlining + Zeichenattribute + + Rev 1.17 04 Aug 1997 16:43:08 MH + chg: header + + Rev 1.16 27 Sep 1996 14:21:12 JP + bDontExpand Flag in die TxtAttr-Basisklasse verschoben + + Rev 1.15 17 Sep 1996 19:16:44 HJS + add: forward + + Rev 1.14 17 Sep 1996 16:51:12 AMA + Chg: Zeichenhintergrund als Zeichenattribut + + Rev 1.13 02 Aug 1996 14:50:20 AMA + New: INet-Felder werden zu attributiertem Text. + + Rev 1.12 15 Jul 1996 17:16:24 AMA + Umbau: NoBlink -> Blink TXTATR -> CHRATR ... + + Rev 1.11 04 Jul 1996 16:33:46 AMA + New: Aus dem NoLinebreak wird ein NoBlink-Attribut + + Rev 1.10 24 Jun 1996 18:37:26 MA + includes + + Rev 1.9 08 Aug 1995 17:23:26 AMA + Umbau: GetPresentation statt GetValueText + + Rev 1.8 19 Jun 1995 16:50:54 MA + Umbau fuer daemliche Compiler + + Rev 1.7 27 Jan 1995 17:39:36 AMA + Neues Textattribut: SvxAutoKernItem + + Rev 1.6 06 Jan 1995 18:42:36 AMA + SEXPORT wg. DLL + + Rev 1.5 02 Nov 1994 12:18:16 AMA + Reimport Absatzattr. als Svx (paraitem.hxx) + SvxSizeItem->SvxFontHeight (textitem.hxx) + + Rev 1.4 14 Oct 1994 14:18:34 AMA + Umstellung auf SvxItems + + Rev 1.3 07 Sep 1994 17:45:02 SWG + Umstellung Attribute + + Rev 1.2 29 Aug 1994 19:30:38 JP + DTOR muss virtual sein. + + Rev 1.1 29 Aug 1994 10:02:48 JP + Ist der Return-Wert eine Referenz, muss auch dereferenziert werden! + + Rev 1.0 25 Aug 1994 16:54:32 JP + Umstellung Attribute (von SwHint -> SfxPoolItem) + +*************************************************************************/ + // #ifndef _TXATBASE_HXX +#endif diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx new file mode 100644 index 000000000000..8a7e2935168f --- /dev/null +++ b/sw/inc/txtatr.hxx @@ -0,0 +1,427 @@ +/************************************************************************* + * + * $RCSfile: txtatr.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _TXTATR_HXX +#define _TXTATR_HXX + +#ifndef _SV_GEN_HXX +#include <tools/gen.hxx> +#endif +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +#ifndef _LANG_HXX +#include <tools/lang.hxx> +#endif +#ifndef _SV_FONTTYPE_HXX //autogen +#include <vcl/fonttype.hxx> +#endif +#ifndef _SVX_SVXENUM_HXX //autogen +#include <svx/svxenum.hxx> +#endif + +#ifndef _TXATBASE_HXX +#include <txatbase.hxx> // SwTxtAttr/SwTxtAttrEnd +#endif + +class SwTxtNode; // fuer SwTxtFld +class SvxFont; +class SwCharSetCol; + +// ATT_FONT *********************************************************** + +class SwTxtFont: public SwTxtAttrEnd +{ + // Hier werden die alten Werte aus dem Font bei ChgFnt() gemerkt. + FontFamily ePrevFamily; + FontPitch ePrevPitch; + CharSet ePrevCharSet; + String aPrevName; + String aPrevStyleName; +public: + SwTxtFont( const SvxFontItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + ~SwTxtFont( ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_POSTURE *********************************************************** + +class SwTxtPosture : public SwTxtAttrEnd +{ + FontItalic ePrevPosture; +public: + SwTxtPosture( const SvxPostureItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_WEIGHT ************************************************************ + +class SwTxtWeight : public SwTxtAttrEnd +{ + // Hier merkt es sich das SV-Attribut Weight aus dem Font. + FontWeight ePrevWeight; +public: + SwTxtWeight( const SvxWeightItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_SHADOWED ********************************************************** + +class SwTxtShadowed : public SwTxtAttrEnd +{ + BOOL bPrevShadow; +public: + SwTxtShadowed( const SvxShadowedItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_AUTOKERN ********************************************************** + +class SwTxtAutoKern : public SwTxtAttrEnd +{ + BOOL bPrevAutoKern; +public: + SwTxtAutoKern( const SvxAutoKernItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); +}; + +// ATT_WORDLINEMODE ********************************************************** + +class SwTxtWordLineMode : public SwTxtAttrEnd +{ + BOOL bPrevWordLineMode; +public: + SwTxtWordLineMode( const SvxWordLineModeItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_CONTOUR *********************************************************** + +class SwTxtContour : public SwTxtAttrEnd +{ + BOOL bPrevContour; +public: + SwTxtContour( const SvxContourItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_CROSSEDOUT ******************************************************** + +class SwTxtCrossedOut : public SwTxtAttrEnd +{ + FontStrikeout ePrevCrossedOut; +public: + SwTxtCrossedOut( const SvxCrossedOutItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_UNDERLINE ********************************************************* + +class SwTxtUnderline : public SwTxtAttrEnd +{ + FontUnderline ePrevUnderline; +public: + SwTxtUnderline( const SvxUnderlineItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_SIZE ************************************************************** + +class SwTxtSize : public SwTxtAttrEnd +{ + Size aPrevSize; +public: + SwTxtSize( const SvxFontHeightItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_COLOR ************************************************************* + +class SwTxtColor : public SwTxtAttrEnd +{ + friend class SwTxtCharSetColor; + Color aPrevColor; +public: + SwTxtColor( const SvxColorItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_CHARSETCOLOR ****************************************************** + +class SwTxtCharSetColor : public SwTxtAttrEnd +{ + SwCharSetCol *pPrevCharSetCol; +public: + SwTxtCharSetColor( const SvxCharSetColorItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + ~SwTxtCharSetColor(); + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_CHARFMT ********************************************* + +class SwTxtCharFmt : public SwTxtAttrEnd +{ + SvxFont* pPrevFont; + const void* pFontNo; + SwTxtNode* pMyTxtNd; + Color* pPrevColor; + USHORT nFntIndex; + BOOL bPrevNoHyph : 1; + BOOL bPrevBlink : 1; + BOOL bPrevURL : 1; + BOOL bColor : 1; + +public: + SwTxtCharFmt( const SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + ~SwTxtCharFmt( ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + + // werden vom SwFmtCharFmt hierher weitergeleitet + virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient + virtual BOOL GetInfo( SfxPoolItem& rInfo ) const; + + // erfrage und setze den TxtNode Pointer + inline const SwTxtNode& GetTxtNode() const; + void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; } + +}; + + +// ATT_KERNING *********************************************************** + +class SwTxtKerning : public SwTxtAttrEnd +{ + short nPrevKern; +public: + SwTxtKerning( const SvxKerningItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_CASEMAP *********************************************************** + +class SwTxtCaseMap : public SwTxtAttrEnd +{ + SvxCaseMap ePrevCaseMap; +public: + SwTxtCaseMap( const SvxCaseMapItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_LANGUAGE ********************************************************** + +class SwTxtLanguage : public SwTxtAttrEnd +{ + LanguageType ePrevLang; +public: + SwTxtLanguage( const SvxLanguageItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); +}; + + +// ATT_ESCAPEMENT ******************************************************** + +class SwTxtEscapement : public SwTxtAttrEnd +{ + short nPrevEsc; + BYTE nPrevPropr; + +public: + SwTxtEscapement( const SvxEscapementItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_BLINK *********************** + +class SwTxtBlink : public SwTxtAttrEnd +{ + BOOL bPrev; +public: + SwTxtBlink( const SvxBlinkItem& rAttr, + xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_BACKGROUND *********************** + +class SwTxtBackground : public SwTxtAttrEnd +{ + Color *pPrevColor; +public: + SwTxtBackground( const SvxBrushItem& rAttr, + xub_StrLen nStart, xub_StrLen nEnd ); + ~SwTxtBackground(); + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + virtual void ChgTxtAttr( SwTxtAttr & ); + virtual void RstTxtAttr( SwTxtAttr & ); +}; + +// ATT_NOHYPHENHERE ************************** + +class SwTxtNoHyphenHere : public SwTxtAttrEnd +{ + BOOL bPrev; +public: + SwTxtNoHyphenHere( const SvxNoHyphenItem& rAttr, + xub_StrLen nStart, xub_StrLen nEnd ); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); +}; + +// ATT_HARDBLANK ****************************** + +class SwTxtHardBlank : public SwTxtAttr +{ + sal_Unicode cChar; +public: + SwTxtHardBlank( const SwFmtHardBlank& rAttr, xub_StrLen nStart ); + inline sal_Unicode GetChar() const { return cChar; } +}; + + +// ATT_XNLCONTAINERITEM ****************************** + +class SwTxtXMLAttrContainer : public SwTxtAttrEnd +{ +public: + SwTxtXMLAttrContainer( const SvXMLAttrContainerItem& rAttr, + xub_StrLen nStart, xub_StrLen nEnd ); +}; + + + +// --------------- Inline Implementierungen ------------------------ + + +inline const SwTxtNode& SwTxtCharFmt::GetTxtNode() const +{ + ASSERT( pMyTxtNd, "SwTxtCharFmt:: wo ist mein TextNode?" ); + return *pMyTxtNd; +} + + + +#endif diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx new file mode 100644 index 000000000000..334735e52b19 --- /dev/null +++ b/sw/inc/txtflcnt.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: txtflcnt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _TXTFLCNT_HXX +#define _TXTFLCNT_HXX + +#ifndef _TXATBASE_HXX //autogen +#include <txatbase.hxx> +#endif + +class SwFlyInCntFrm; +class SwFrm; +class SwTxtNode; +class SwDoc; + +// SWTXT_FLYCNT ******************************** +// Attribut fuer zeilengebundene Frames (ohne Endindex) + +class SwTxtFlyCnt : public SwTxtAttr +{ + SwFlyInCntFrm *_GetFlyFrm( const SwFrm *pCurrFrm ); + +public: + SwTxtFlyCnt( const SwFmtFlyCnt& rAttr, xub_StrLen nStart ); + + // Setzt den Anker im pFmt und + void SetAnchor( const SwTxtNode *pNode ); + + inline SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ); + inline const SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ) const; + + // erzeugt sich ein neues FlyFrameFormat + void CopyFlyFmt( SwDoc* pDoc ); +}; + +inline SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) +{ + return _GetFlyFrm( pCurrFrm ); +} + +inline const SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) const +{ + return ((SwTxtFlyCnt*)this)->_GetFlyFrm( pCurrFrm ); +} + +#endif + diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx new file mode 100644 index 000000000000..4e73a9a46fe7 --- /dev/null +++ b/sw/inc/txtfld.hxx @@ -0,0 +1,106 @@ +/************************************************************************* + * + * $RCSfile: txtfld.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _TXTFLD_HXX +#define _TXTFLD_HXX + +#ifndef _TXATBASE_HXX //autogen +#include <txatbase.hxx> +#endif +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif + +class SwTxtNode; + +// ATT_FLD *********************************** + +class SwTxtFld : public SwTxtAttr +{ + String aExpand; + SwTxtNode *pMyTxtNd; +public: + SwTxtFld( const SwFmtFld& rAttr, xub_StrLen nStart ); + ~SwTxtFld(); + + void CopyFld( SwTxtFld *pDest ) const; + void Expand(); + inline void ExpandAlways(); + + // erfrage und setze den TxtNode Pointer + const SwTxtNode* GetpTxtNode() const { return pMyTxtNd; } + inline const SwTxtNode& GetTxtNode() const; + void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; } +}; + +inline const SwTxtNode& SwTxtFld::GetTxtNode() const +{ + ASSERT( pMyTxtNd, "SwTxtFld:: wo ist mein TextNode?" ); + return *pMyTxtNd; +} + +inline void SwTxtFld::ExpandAlways() +{ + aExpand += ' '; + Expand(); +} + +#endif + diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx new file mode 100644 index 000000000000..c04d0e2c7cc8 --- /dev/null +++ b/sw/inc/txtftn.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * $RCSfile: txtftn.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _TXTFTN_HXX +#define _TXTFTN_HXX + +#ifndef _TXATBASE_HXX //autogen +#include <txatbase.hxx> +#endif + +class SwNodeIndex; +class SwTxtNode; +class SwNodes; +class SwDoc; + +// ATT_FTN ********************************************************** + +class SwTxtFtn : public SwTxtAttr +{ + SwNodeIndex *pStartNode; + SwTxtNode* pMyTxtNd; + USHORT nSeqNo; + + // Zuweisung und Copy-Ctor sind nicht erlaubt. + SwTxtFtn& operator=( const SwTxtFtn &rTxtFtn ); + SwTxtFtn( const SwTxtFtn &rTxtFtn ); + +public: + SwTxtFtn( const SwFmtFtn& rAttr, xub_StrLen nStart ); + ~SwTxtFtn(); + + inline SwNodeIndex *GetStartNode() const { return pStartNode; } + void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE ); + void SetNumber( const USHORT nNumber, const String* = 0 ); + void CopyFtn( SwTxtFtn *pDest ); + + // erfrage und setze den TxtNode Pointer + inline const SwTxtNode& GetTxtNode() const; + void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; } + + // lege eine neue leere TextSection fuer diese Fussnote an + void MakeNewTextSection( SwNodes& rNodes ); + + // loesche die FtnFrame aus der Seite + void DelFrms(); + // bedingten Absatzvorlagen checken + void CheckCondColl(); + + // fuer die Querverweise auf Fussnoten + USHORT SetSeqRefNo(); + void SetSeqNo( USHORT n ) { nSeqNo = n; } // fuer die Reader + USHORT GetSeqRefNo() const { return nSeqNo; } + + static void SetUniqueSeqRefNo( SwDoc& rDoc ); +}; + +inline const SwTxtNode& SwTxtFtn::GetTxtNode() const +{ + ASSERT( pMyTxtNd, "SwTxtFtn:: wo ist mein TextNode?" ); + return *pMyTxtNd; +} + +#endif + diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx new file mode 100644 index 000000000000..a39d7fd1328b --- /dev/null +++ b/sw/inc/txtinet.hxx @@ -0,0 +1,127 @@ +/************************************************************************* + * + * $RCSfile: txtinet.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _TXTINET_HXX +#define _TXTINET_HXX + +#ifndef _TXATBASE_HXX //autogen +#include <txatbase.hxx> +#endif +#ifndef _CALBCK_HXX //autogen +#include <calbck.hxx> +#endif + +class SvxFont; +class SwTxtNode; +class SwCharFmt; +class Color; + +// ATT_INETFMT ********************************************* + +class SwTxtINetFmt : public SwTxtAttrEnd, public SwClient +{ + SvxFont* pPrevFont; + Color* pPrevBackColor; + SwTxtNode* pMyTxtNd; + const void* pFontNo; + USHORT nFntIndex; + BOOL bPrevNoHyph : 1; + BOOL bPrevBlink : 1; + BOOL bPrevURL : 1; + BOOL bVisited : 1; // Besuchter Link? + BOOL bValidVis : 1; // Ist das bVisited-Flag gueltig? + BOOL bColor : 1; + +public: + SwTxtINetFmt( const SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); + virtual ~SwTxtINetFmt(); + TYPEINFO(); + + virtual void ChgFnt(SwFont *); + virtual void RstFnt(SwFont *); + + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + virtual BOOL GetInfo( SfxPoolItem& rInfo ) const; + + // erfrage und setze den TxtNode Pointer + const SwTxtNode* GetpTxtNode() const { return pMyTxtNd; } + inline const SwTxtNode& GetTxtNode() const; + void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; } + + SwCharFmt* GetCharFmt(); + const SwCharFmt* GetCharFmt() const + { return ((SwTxtINetFmt*)this)->GetCharFmt(); } + + const BOOL IsVisited() const { return bVisited; } + void SetVisited( BOOL bNew ) { bVisited = bNew; } + + const BOOL IsValidVis() const { return bValidVis; } + void SetValidVis( BOOL bNew ) { bValidVis = bNew; } + + BOOL IsProtect() const; +}; +inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const +{ + ASSERT( pMyTxtNd, "SwTxtINetFmt:: wo ist mein TextNode?" ); + return *pMyTxtNd; +} + +#endif + diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx new file mode 100644 index 000000000000..52e6ea84a5e6 --- /dev/null +++ b/sw/inc/txtrfmrk.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * $RCSfile: txtrfmrk.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _TXTRFMRK_HXX +#define _TXTRFMRK_HXX + +#ifndef _TXATBASE_HXX //autogen +#include <txatbase.hxx> +#endif + +class SwTxtNode; + +// SWTXT_REFMARK ************************************* +// Attribut fuer Inhalts-/Positions-Referenzen im Text + +class SwTxtRefMark : public SwTxtAttrEnd +{ + SwTxtNode* pMyTxtNd; + USHORT* pEnd; // fuer InhaltsReferenz / PositionRef. ohne Ende +public: + SwTxtRefMark( const SwFmtRefMark& rAttr, + xub_StrLen nStart, xub_StrLen * pEnd = 0 ); + + virtual xub_StrLen *GetEnd(); // SwTxtAttr + inline const xub_StrLen* GetEnd() const { return pEnd; } + + virtual void ChgFnt(SwFont *); // SwTxtAttr + virtual void RstFnt(SwFont *); // SwTxtAttr + + // erfrage und setze den TxtNode Pointer + inline const SwTxtNode& GetTxtNode() const; + void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; } +}; +inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const +{ + ASSERT( pMyTxtNd, "SwTxtRefMark:: wo ist mein TextNode?" ); + return *pMyTxtNd; +} + +#endif + diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx new file mode 100644 index 000000000000..a65fa3ce33c7 --- /dev/null +++ b/sw/inc/txttxmrk.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: txttxmrk.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _TXTTXMRK_HXX +#define _TXTTXMRK_HXX + +#ifndef _TXATBASE_HXX //autogen +#include <txatbase.hxx> +#endif + +class SwTxtNode; +class SwDoc; + +// SWTXT_TOXMARK ******************************* +// Attribut fuer die Verzeichnisse + +class SwTxtTOXMark : public SwTxtAttrEnd +{ + xub_StrLen* pEnd; // wenn AlternativText vom SwTOXMark dann 0 !! + SwTxtNode* pMyTxtNd; +public: + SwTxtTOXMark( const SwTOXMark& rAttr, + xub_StrLen nStart, xub_StrLen * pEnd = 0 ); + virtual ~SwTxtTOXMark(); + + virtual xub_StrLen *GetEnd(); // SwTxtAttr + inline const xub_StrLen* GetEnd() const { return pEnd; } + + virtual void ChgFnt(SwFont *); // SwTxtAttr + virtual void RstFnt(SwFont *); // SwTxtAttr + + void CopyTOXMark( SwDoc* pDestDoc ); + + // erfrage und setze den TxtNode Pointer + inline const SwTxtNode* GetpTxtNd() const { return pMyTxtNd; } + inline const SwTxtNode& GetTxtNode() const; + void ChgTxtNode( const SwTxtNode* pNew ) { pMyTxtNd = (SwTxtNode*)pNew; } +}; + +inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const +{ + ASSERT( pMyTxtNd, "SwTxtTOXMark:: wo ist mein TextNode?" ); + return *pMyTxtNd; +} + +#endif + diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx new file mode 100644 index 000000000000..6064c6377af2 --- /dev/null +++ b/sw/inc/undobj.hxx @@ -0,0 +1,1624 @@ +/************************************************************************* + * + * $RCSfile: undobj.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNDOBJ_HXX +#define _UNDOBJ_HXX + +#ifndef _SVMEMPOOL_HXX //autogen +#include <tools/mempool.hxx> +#endif +#ifndef _SVSTDARR_HXX +#define _SVSTDARR_USHORTS +#define _SVSTDARR_ULONGS +#define _SVSTDARR_BOOLS +#define _SVSTDARR_BYTES +#define _SVSTDARR_USHORTSSORT +#include <svtools/svstdarr.hxx> +#endif +#ifndef _SFXITEMSET_HXX //autogen +#include <svtools/itemset.hxx> +#endif +#ifndef _NUMRULE_HXX +#include <numrule.hxx> +#endif +#ifndef _REDLENUM_HXX +#include <redlenum.hxx> +#endif + +class SwUndoIter; +class SwHistory; + +class SwIndex; +class SwPaM; +struct SwPosition; +class SwDoc; +class SwNodes; +class SwFmt; +class SwFmtColl; +class SwTxtFmtColl; +class SwTxtNode; +class SwpHints; +class SwBookmark; +class SwTableNode; +class SwTable; +class SwTableBox; +struct SwSortOptions; +class SwFrmFmt; +class SwHstryBookmark; +class SwSection; +class SwSectionFmt; +class SvxTabStopItem; +class SwNumSection; +class SwDDEFieldType; +class Graphic; +class SwGrfNode; +class SwUndos; +class SwUndoRange; +class SwFtnInfo; +class SwEndNoteInfo; +class SwNodeIndex; +class SwNodeRange; + +struct SwUndoGroupObjImpl; +class SdrMarkList; +class SdrObject; +class SdrObjGroup; +class SdrUndoAction; +class SwDrawFrmFmt; +class _SaveTable; +class SwTableAutoFmt; +class SwSelBoxes; +class SwTableSortBoxes; +class SwUndoSaveSections; +class SwUndoMoves; +class SwStartNode; +class _SaveFlyArr; +class SwTblToTxtSaves; +class SwRedlineData; +class SwRedlineSaveData; +class SwRedline; + +#ifndef PRODUCT +class Writer; +class SwUndo; +#define OUT_UNDOBJ( name ) \ + friend Writer& OutUndo_ ## name( Writer&, const SwUndo& ); +#else +#define OUT_UNDOBJ( name ) +#endif + + +typedef SwRedlineSaveData* SwRedlineSaveDataPtr; +SV_DECL_PTRARR_DEL( SwRedlineSaveDatas, SwRedlineSaveDataPtr, 8, 8 ) + +class SwUndo +{ + USHORT nId; + USHORT nOrigRedlineMode; +protected: + void RemoveIdxFromSection( SwDoc&, ULONG nSttIdx, ULONG* pEndIdx = 0 ); + void RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext ); + void RemoveIdxRel( ULONG, const SwPosition& ); + + void SetId( USHORT nNew ) { nId = nNew; } + + static BOOL CanRedlineGroup( SwRedlineSaveDatas& rCurr, + const SwRedlineSaveDatas& rCheck, + BOOL bCurrIsEnd ); +public: + SwUndo( USHORT nI ) { nId = nI; nOrigRedlineMode = REDLINE_NONE; } + virtual ~SwUndo(); + + USHORT GetId() const { return nId; } + virtual void Undo( SwUndoIter& ) = 0; + virtual void Redo( SwUndoIter& ) = 0; + virtual void Repeat( SwUndoIter& ); + + // das UndoObject merkt sich, welcher Mode eingeschaltet war. + // In Undo/Redo/Repeat wird dann immer auf diesen zurueck geschaltet + USHORT GetRedlineMode() const { return nOrigRedlineMode; } + void SetRedlineMode( USHORT eMode ) { nOrigRedlineMode = eMode; } + + // sicher und setze die RedlineDaten + static BOOL FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData, + BOOL bDelRange = TRUE, BOOL bCopyNext = TRUE ); + static BOOL FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& ); + static void SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData ); + static BOOL HasHiddenRedlines( const SwRedlineSaveDatas& rSData ); +}; + + +// diese Klasse muss in ein Undo-Object vererbt werden, wenn dieses Inhalt +// fuers Redo/Undo ... speichert +class SwUndoSaveCntnt +{ +protected: + + SwHistory* pHistory; + + // wird fuer das loeschen von Inhalt benoetigt. Fuer das ReDo werden + // Inhalte in das UndoNodesArray verschoben. Diese Methoden fuegen + // am Ende eines TextNodes ein Trenner fuer die Attribute. Damit werden + // Attribute nicht expandiert. + // MoveTo.. verschiebt aus dem NodesArray in das UndoNodesArray + // MoveFrom.. verschiebt aus dem UndoNodesArray in das NodesArray + void MoveToUndoNds( SwPaM& rPam, + SwNodeIndex* pNodeIdx = 0, SwIndex* pCntIdx = 0, + ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 ); + void MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, xub_StrLen nCntntIdx, + SwPosition& rInsPos, + ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 ); + + // diese beiden Methoden bewegen den SPoint vom Pam zurueck/vor. Damit + // kann fuer ein Undo/Redo ein Bereich aufgespannt werden. (Der + // SPoint liegt dann vor dem manipuliertem Bereich !!) + // Das Flag gibt an, ob noch vorm SPoint Inhalt steht. + BOOL MovePtBackward( SwPaM& rPam ); + void MovePtForward( SwPaM& rPam, BOOL bMvBkwrd ); + + // vor dem Move ins UndoNodes-Array muss dafuer gesorgt werden, das + // die Inhaltstragenden Attribute aus dem Nodes-Array entfernt werden. + enum DelCntntType{ DELCNT_FTN = 0x01, + DELCNT_FLY = 0x02, + DELCNT_TOC = 0x04, + DELCNT_BKM = 0x08, + DELCNT_ALL = 0x0F, + DELCNT_CHKNOCNTNT = 0x80 // nur den NodeIndex beachten + }; + void DelCntntIndex( const SwPosition& pMark, const SwPosition& pPoint, + DelCntntType nDelCntntType = DELCNT_ALL ); + +public: + SwUndoSaveCntnt(); + ~SwUndoSaveCntnt(); + OUT_UNDOBJ( SaveCntnt ) +}; + + +// sicher eine vollstaendige Section im Nodes-Array +class SwUndoSaveSection : private SwUndoSaveCntnt +{ + SwNodeIndex *pMvStt; + SwRedlineSaveDatas* pRedlSaveData; + ULONG nMvLen; // Index ins UndoNodes-Array + ULONG nStartPos; + +protected: + SwNodeIndex* GetMvSttIdx() const { return pMvStt; } + ULONG GetMvNodeCnt() const { return nMvLen; } + +public: + SwUndoSaveSection(); + ~SwUndoSaveSection(); + + void SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx ); + void SaveSection( SwDoc* pDoc, const SwNodeRange& rRange ); + void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, USHORT nSectType ); + void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos ); + + const SwHistory* GetHistory() const { return pHistory; } + SwHistory* GetHistory() { return pHistory; } + OUT_UNDOBJ( SaveSection ) +}; + + +// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu +// einem PaM zusammensetzen +class SwUndRng +{ +public: + ULONG nSttNode, nEndNode; + xub_StrLen nSttCntnt, nEndCntnt; + + SwUndRng(); + SwUndRng( const SwPaM& ); + + void SetValues( const SwPaM& rPam ); + void SetPaM( SwPaM&, BOOL bCorrToCntnt = FALSE ) const; + void SetPaM( SwUndoIter&, BOOL bCorrToCntnt = FALSE ) const; +}; + + +class SwUndoStart: public SwUndo +{ + // Um innerhalb von Undo zuerkennen, wann ein Start vorliegt, gibt + // GetId() immer die UNDO_START zurueck. Die UserId kann ueber + // GetUserId() erfragt werden. + USHORT nUserId; + // fuer die "Verpointerung" von Start- und End-Undos + USHORT nEndOffset; +public: + SwUndoStart( USHORT nId ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + USHORT GetUserId() const { return nUserId; } + // Setzen vom End-Undo-Offset geschieht im Doc::EndUndo + USHORT GetEndOffset() const { return nEndOffset; } + void SetEndOffset( USHORT n ) { nEndOffset = n; } + OUT_UNDOBJ( Start ) +}; + +class SwUndoEnd: public SwUndo +{ + // Um innerhalb von Undo zuerkennen, wann ein Ende vorliegt, gibt + // GetId() immer die UNDO_END zurueck. Die UserId kann ueber + // GetUserId() erfragt werden. + USHORT nUserId; + // fuer die "Verpointerung" von Start- und End-Undos + USHORT nSttOffset; +public: + SwUndoEnd( USHORT nId ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + USHORT GetUserId() const { return nUserId; } + // Setzen vom Start-Undo-Offset geschieht im Doc::EndUndo + USHORT GetSttOffset() const { return nSttOffset; } + void SetSttOffset( USHORT n ) { nSttOffset = n; } + OUT_UNDOBJ( End ) +}; + +class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt +{ + SwPosition *pPos; // Inhalt fuers Redo + String* pTxt; + SwRedlineData* pRedlData; + ULONG nNode; + xub_StrLen nCntnt, nLen; + BOOL bIsWordDelim : 1; + BOOL bIsAppend : 1; + + friend class SwDoc; // eigentlich nur SwDoc::Insert( String ) + BOOL CanGrouping( sal_Unicode cIns ); + BOOL CanGrouping( const SwPosition& rPos ); + +public: + SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen, + BOOL bWDelim = TRUE ); + SwUndoInsert( const SwNodeIndex& rNode ); + virtual ~SwUndoInsert(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + BOOL CanGrouping( const SwPosition&, sal_Unicode cIns ); + OUT_UNDOBJ( Insert ) + + DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert) +}; + + +class SwUndoDelete: public SwUndo, private SwUndRng, private SwUndoSaveCntnt +{ + SwNodeIndex* pMvStt; // Position der Nodes im UndoNodes-Array + String *pSttStr, *pEndStr; + SwRedlineData* pRedlData; + SwRedlineSaveDatas* pRedlSaveData; + + ULONG nNode; + ULONG nNdDiff; // Differenz von Nodes vor-nach Delete + ULONG nSectDiff; // Diff. von Nodes vor/nach Move mit SectionNodes + USHORT nSetPos; + + BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in CanGrouping() ausgwertet !! + BOOL bBackSp : 1; // TRUE: wenn Gruppierung und der Inhalt davor geloescht wird + BOOL bJoinNext: 1; // TRUE: wenn der Bereich von Oben nach unten geht + BOOL bSectNdFnd : 1; // TRUE: Sonderbehandlung fuer SectionNodes + BOOL bMvAroundSectNd :1;// TRUE: Sonderbehandlung fuer SectionNodes + BOOL bTblDelLastNd : 1; // TRUE: TextNode hinter der Tabelle einf./loeschen + BOOL bDelFullPara : 1; // TRUE: gesamte Nodes wurden geloescht + BOOL bResetPgDesc : 1; // TRUE: am nachfolgenden Node das PgDsc zuruecksetzen + BOOL bResetPgBrk : 1; // TRUE: am nachfolgenden Node das PgBreak zuruecksetzen + + BOOL SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, + SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd ); +public: + SwUndoDelete( SwPaM&, BOOL bFullPara = FALSE ); + virtual ~SwUndoDelete(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + BOOL CanGrouping( SwDoc*, const SwPaM& ); + + void SetTblDelLastNd() { bTblDelLastNd = TRUE; } + + // fuer die PageDesc/PageBreak Attribute einer Tabelle + void SetPgBrkFlags( BOOL bPageBreak, BOOL bPageDesc ) + { bResetPgDesc = bPageDesc; bResetPgBrk = bPageBreak; } + + OUT_UNDOBJ( Delete ) + + DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete) +}; + + +class SwUndoOverwrite: public SwUndo, private SwUndoSaveCntnt +{ + String aDelStr, aInsStr; + SwRedlineSaveDatas* pRedlSaveData; + ULONG nSttNode; + xub_StrLen nSttCntnt; + BOOL bInsChar : 1; // kein Overwrite mehr; sondern Insert + BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in + // CanGrouping() ausgwertet !! +public: + SwUndoOverwrite( SwDoc*, SwPosition&, sal_Unicode cIns ); + virtual ~SwUndoOverwrite(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + BOOL CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns ); + OUT_UNDOBJ( Overwrite ) +}; + + +class SwUndoSplitNode: public SwUndo +{ + SwHistory* pHistory; + SwRedlineData* pRedlData; + ULONG nNode; + xub_StrLen nCntnt; + BOOL bTblFlag : 1; + BOOL bChkTblStt : 1; +public: + SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, BOOL bChkTbl ); + virtual ~SwUndoSplitNode(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + void SetTblFlag() { bTblFlag = TRUE; } + OUT_UNDOBJ( SplitNode ) +}; + + +class SwUndoMove : public SwUndo, private SwUndRng, private SwUndoSaveCntnt +{ + // nDest.. - Bereich, in den verschoben wurde (nach dem Move!) + // nIns.. - Position, von der verschoben wurde und wieder die neue InsPos. ist + // nMv.. Position auf die verschoben wird (vor dem Move!) ; fuers REDO + ULONG nDestSttNode, nDestEndNode, nInsPosNode, nMvDestNode; + xub_StrLen nDestSttCntnt, nDestEndCntnt, nInsPosCntnt, nMvDestCntnt; + + USHORT nFtnStt; // StartPos der Fussnoten in der History + + BOOL bJoinNext : 1, + bJoinPrev : 1, + bMoveRange : 1; + + void DelFtn( const SwPaM& ); +public: + SwUndoMove( const SwPaM&, const SwPosition& ); + SwUndoMove( SwDoc* pDoc, const SwNodeRange&, const SwNodeIndex& ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + // setze den Destination-Bereich nach dem Verschieben. + void SetDestRange( const SwPaM&, const SwPosition&, BOOL, BOOL ); + void SetDestRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd, + const SwNodeIndex& rInsPos ); + + BOOL IsMoveRange() const { return bMoveRange; } + ULONG GetEndNode() const { return nEndNode; } + ULONG GetDestSttNode() const { return nDestSttNode; } + xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; } + void AddTblMrgFlyHstry( SwHistory& rHstr ); + + OUT_UNDOBJ( Move ) +}; + + +class SwUndoAttr : public SwUndo, private SwUndRng +{ + SfxItemSet aSet; // Attribute fuers Redo + SwHistory* pHistory; // History fuers Undo + SwRedlineData* pRedlData; // Redlining + SwRedlineSaveDatas* pRedlSaveData; + ULONG nNdIdx; // fuers Redlining - Offset + USHORT nInsFlags; // Einfuege Flags + + void RemoveIdx( SwDoc& rDoc ); +public: + SwUndoAttr( const SwPaM&, const SfxItemSet&, USHORT nFlags = 0 ); + SwUndoAttr( const SwPaM&, const SfxPoolItem&, USHORT nFlags = 0 ); + virtual ~SwUndoAttr(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + SwHistory* GetHistory() { return pHistory; } + void SaveRedlineData( const SwPaM& rPam, BOOL bInsCntnt ); + + OUT_UNDOBJ( InsAttr ) +}; + +class SwUndoRstAttr : public SwUndo, private SwUndRng +{ + SwHistory* pHistory; + SvUShortsSort aIds; + USHORT nFmtId; // Format-Id fuer das Redo +public: + SwUndoRstAttr( const SwPaM&, USHORT nFmtId ); + SwUndoRstAttr( const SwDoc&, const SwPosition&, USHORT nWhichId ); + virtual ~SwUndoRstAttr(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + void SetAttrs( const SvUShortsSort& rArr ); + SwHistory* GetHistory() { return pHistory; } + OUT_UNDOBJ( ResetAttr ) +}; + + +class SwUndoFmtAttr : public SwUndo +{ + friend class SwUndoDefaultAttr; + SwFmt* pFmt; + SfxItemSet* pOldSet; // die alten Attribute + ULONG nNode; + USHORT nFmtWhich; + BOOL bSaveDrawPt; + + int IsFmtInDoc( SwDoc* ); // ist das Attribut-Format noch im Doc ? + void SaveFlyAnchor( BOOL bSaveDrawPt = FALSE ); + void RestoreFlyAnchor( SwUndoIter& rIter ); + void Init(); + +public: + // meldet sich im Format an und sichert sich die alten Attribute + SwUndoFmtAttr( const SfxItemSet& rOldSet, SwFmt& rFmt, + BOOL bSaveDrawPt = TRUE ); + SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rFmt, + BOOL bSaveDrawPt = TRUE ); + virtual ~SwUndoFmtAttr(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( InsFmtAttr ) + + void PutAttr( const SfxPoolItem& rItem ); + SwFmt* GetFmt( SwDoc& rDoc ); // prueft, ob es noch im Doc ist! +}; + +class SwUndoDontExpandFmt : public SwUndo +{ + ULONG nNode; + xub_StrLen nCntnt; +public: + SwUndoDontExpandFmt( const SwPosition& rPos ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); +}; + +// Hilfs-Klasse, um die geaenderten Sets zu "empfangen" +struct _UndoFmtAttr : public SwClient +{ + SwUndoFmtAttr* pUndo; + BOOL bSaveDrawPt; + + _UndoFmtAttr( SwFmt& rFmt, BOOL bSaveDrawPt = TRUE ); + virtual void Modify( SfxPoolItem*, SfxPoolItem* ); +}; + + +class SwUndoFmtColl : public SwUndo, private SwUndRng +{ + SwHistory* pHistory; + SwFmtColl* pFmtColl; +public: + SwUndoFmtColl( const SwPaM&, SwFmtColl* ); + virtual ~SwUndoFmtColl(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + SwHistory* GetHistory() { return pHistory; } + OUT_UNDOBJ( SetFmtColl ) +}; + + +class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng +{ + SwHistory* pHistory; + BOOL bModulus; +public: + SwUndoMoveLeftMargin( const SwPaM&, BOOL bRight, BOOL bModulus ); + virtual ~SwUndoMoveLeftMargin(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + SwHistory* GetHistory() { return pHistory; } + OUT_UNDOBJ( MoveLeftMargin ) +}; + +// Basis-Klasse fuer Insert von Dokument, Glossaries und Kopieren +class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveCntnt +{ + SwTxtFmtColl *pTxtFmtColl, *pLastNdColl; + SvPtrarr* pFrmFmts; + SwUndos* pFlyUndos; + SwRedlineData* pRedlData; + BOOL bSttWasTxtNd; +protected: + ULONG nNdDiff; + SwPosition *pPos; // Inhalt fuers Redo + USHORT nSetPos; // Start in der History-Liste + + SwUndoInserts( USHORT nUndoId, const SwPaM& ); +public: + virtual ~SwUndoInserts(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + // setze den Destination-Bereich nach dem Einlesen. + void SetInsertRange( const SwPaM&, BOOL bScanFlys = TRUE, + BOOL bSttWasTxtNd = TRUE ); + OUT_UNDOBJ( Inserts ) +}; + +class SwUndoInsDoc : public SwUndoInserts +{ +public: + SwUndoInsDoc( const SwPaM& ); + OUT_UNDOBJ( InsDoc ) +}; + +class SwUndoCpyDoc : public SwUndoInserts +{ +public: + SwUndoCpyDoc( const SwPaM& ); + OUT_UNDOBJ( Copy ) +}; + +class SwUndoInsTbl : public SwUndo +{ + String sTblNm; + SwDDEFieldType* pDDEFldType; + SvUShorts* pColWidth; + SwRedlineData* pRedlData; + SwTableAutoFmt* pAutoFmt; + ULONG nSttNode; + USHORT nRows, nCols; + USHORT nAdjust; + USHORT nInsTblFlags; + +public: + SwUndoInsTbl( const SwPosition&, USHORT nCols, USHORT nRows, + USHORT eAdjust, USHORT nInsert, + const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr ); + virtual ~SwUndoInsTbl(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( InsTable ) +}; + +class SwUndoTxtToTbl : public SwUndo, public SwUndRng +{ + String sTblNm; + SvULongs* pDelBoxes; + SwTableAutoFmt* pAutoFmt; + SwHistory* pHistory; + sal_Unicode cTrenner; + USHORT nAdjust; + USHORT nInsTblFlags; + BOOL bSplitEnd : 1; + +public: + SwUndoTxtToTbl( const SwPaM&, sal_Unicode , USHORT, USHORT nInsert, + const SwTableAutoFmt* pAFmt ); + virtual ~SwUndoTxtToTbl(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + SwHistory& GetHistory(); // wird ggfs. angelegt + void AddFillBox( const SwTableBox& rBox ); + OUT_UNDOBJ( TextToTable ) +}; + +class SwUndoTblToTxt : public SwUndo +{ + String sTblNm; + SwDDEFieldType* pDDEFldType; + _SaveTable* pTblSave; + SwTblToTxtSaves* pBoxSaves; + SwHistory* pHistory; + ULONG nSttNd, nEndNd; + USHORT nAdjust; + sal_Unicode cTrenner; + BOOL bCheckNumFmt : 1; + BOOL bHdlnRpt : 1; + +public: + SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh ); + virtual ~SwUndoTblToTxt(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + void SetRange( const SwNodeRange& ); + void AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, + xub_StrLen nCntntIdx = STRING_MAXLEN); + OUT_UNDOBJ( TableToText ) +}; + +class SwUndoAttrTbl : public SwUndo +{ + ULONG nSttNode; + _SaveTable* pSaveTbl; + BOOL bClearTabCol : 1; +public: + SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols = FALSE ); + virtual ~SwUndoAttrTbl(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( SetTableAttr ) +}; + +class SwUndoTblAutoFmt : public SwUndo +{ + ULONG nSttNode; + _SaveTable* pSaveTbl; + SwUndos* pUndos; + BOOL bSaveCntntAttr; + + void UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter ); + +public: + SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& ); + virtual ~SwUndoTblAutoFmt(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + void SaveBoxCntnt( const SwTableBox& rBox ); + OUT_UNDOBJ( TableAutoFmt ) +}; + +class SwUndoTblNdsChg : public SwUndo +{ + _SaveTable* pSaveTbl; + SvULongs aBoxes; + + union { + SvULongs* pNewSttNds; + SwUndoSaveSections* pDelSects; + } Ptrs; + SvBools aMvBoxes; // fuers SplitRow (aufgeteilte Nodes einer Box) + + ULONG nSttNode, nCurrBox; + USHORT nCount, nRelDiff, nAbsDiff, nSetColType; + BOOL bFlag; +public: + SwUndoTblNdsChg( USHORT UndoId, + const SwSelBoxes& rBoxes, + const SwTableNode& rTblNd, + USHORT nCnt, BOOL bFlg ); + + // fuer SetColWidth + SwUndoTblNdsChg( USHORT UndoId, const SwSelBoxes& rBoxes, + const SwTableNode& rTblNd ); + + virtual ~SwUndoTblNdsChg(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld ); + void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld, + const SwSelBoxes& rBoxes, const SvULongs& rNodeCnts ); + void SaveSection( SwStartNode* pSttNd ); + + void SetColWidthParam( ULONG nBoxIdx, USHORT nMode, USHORT nType, + SwTwips nAbsDif, SwTwips nRelDif ) + { + nCurrBox = nBoxIdx; + nCount = nMode; + nSetColType = nType; + nAbsDiff = (USHORT)nAbsDif; + nRelDiff = (USHORT)nRelDif; + } + OUT_UNDOBJ( TblNodesChg ) +}; + +class SwUndoTblMerge : public SwUndo, private SwUndRng +{ + ULONG nTblNode; + _SaveTable* pSaveTbl; + SvULongs aBoxes, aNewSttNds; + SwUndoMoves* pMoves; + SwHistory* pHistory; + +public: + SwUndoTblMerge( const SwPaM& rTblSel ); + virtual ~SwUndoTblMerge(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void MoveBoxCntnt( SwPaM& rPam, SwPosition& rPos, const _SaveFlyArr& ); + void MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos ); + + void SetSelBoxes( const SwSelBoxes& rBoxes ); + + void AddNewBox( ULONG nSttNdIdx ) + { aNewSttNds.Insert( nSttNdIdx, aNewSttNds.Count() ); } + + void SaveCollection( const SwTableBox& rBox ); + + OUT_UNDOBJ( TblMerge ) +}; + + +class SwUndoTblNumFmt : public SwUndo +{ + SfxItemSet *pBoxSet; + SwHistory* pHistory; + String aStr, aNewFml; + + ULONG nFmtIdx, nNewFmtIdx; + double fNum, fNewNum; + ULONG nNode; + + BOOL bNewFmt : 1; + BOOL bNewFml : 1; + BOOL bNewValue : 1; + +public: + SwUndoTblNumFmt( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 ); + virtual ~SwUndoTblNumFmt(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void SetNumFmt( ULONG nNewFmtIdx, const double& rNewNumber ) + { nFmtIdx = nNewFmtIdx; fNum = rNewNumber; } + void SetBox( const SwTableBox& rBox ); + OUT_UNDOBJ( TblNumFmt ) +}; + +class _UndoTblCpyTbl_Entries; + +class SwUndoTblCpyTbl : public SwUndo +{ + _UndoTblCpyTbl_Entries* pArr; + SwUndoTblNdsChg* pInsRowUndo; +public: + SwUndoTblCpyTbl(); + virtual ~SwUndoTblCpyTbl(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt ); + void AddBoxAfter( const SwTableBox& rBox, BOOL bDelCntnt ); + + BOOL IsEmpty() const; + BOOL InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, USHORT nCnt ); + OUT_UNDOBJ( TblCpyTbl ) +}; + +class SwUndoCpyTbl : public SwUndo +{ + SwUndoDelete* pDel; + ULONG nTblNode; +public: + SwUndoCpyTbl(); + virtual ~SwUndoCpyTbl(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void SetTableSttIdx( ULONG nIdx ) { nTblNode = nIdx; } + OUT_UNDOBJ( CpyTbl ) +}; + +class SwUndoSplitTbl : public SwUndo +{ + ULONG nTblNode, nOffset; + _SaveTable* pSavTbl; + SwHistory* pHistory; + USHORT nMode, nFmlEnd; + BOOL bCalcNewSize; +public: + SwUndoSplitTbl( const SwTableNode& rTblNd, USHORT nMode, BOOL bCalcNewSize ); + virtual ~SwUndoSplitTbl(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + void SetTblNodeOffset( ULONG nIdx ) { nOffset = nIdx - nTblNode; } + SwHistory* GetHistory() { return pHistory; } + void SaveFormula( SwHistory& rHistory ); +}; + +class SwUndoMergeTbl : public SwUndo +{ + String aName; + ULONG nTblNode; + _SaveTable* pSavTbl, *pSavHdl; + SwHistory* pHistory; + USHORT nMode; + BOOL bWithPrev; +public: + SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd, + BOOL bWithPrev, USHORT nMode ); + virtual ~SwUndoMergeTbl(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + SwHistory* GetHistory() { return pHistory; } + void SaveFormula( SwHistory& rHistory ); +}; + + +class SwUndoBookmark : public SwUndo +{ + SwHstryBookmark* pHBookmark; +protected: + SwUndoBookmark( USHORT nUndoId, const SwBookmark& ); + + void SetInDoc( SwDoc* ); + void ResetInDoc( SwDoc* ); + +public: + virtual ~SwUndoBookmark(); +}; + + +class SwUndoDelBookmark : public SwUndoBookmark +{ +public: + SwUndoDelBookmark( const SwBookmark& ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( DelBookmark ) +}; + +class SwUndoInsBookmark : public SwUndoBookmark +{ +public: + SwUndoInsBookmark( const SwBookmark& ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( InsBookmark ) +}; + + +/*-------------------------------------------------------------------- + Beschreibung: Undo auf Sorting + --------------------------------------------------------------------*/ + +struct SwSortUndoElement +{ + union { + struct { + ULONG nKenn; + ULONG nSource, nTarget; + } TXT; + struct { + String *pSource, *pTarget; + } TBL; + } SORT_TXT_TBL; + + SwSortUndoElement( const String& aS, const String& aT ) + { + SORT_TXT_TBL.TBL.pSource = new String( aS ); + SORT_TXT_TBL.TBL.pTarget = new String( aT ); + } + SwSortUndoElement( ULONG nS, ULONG nT ) + { + SORT_TXT_TBL.TXT.nSource = nS; + SORT_TXT_TBL.TXT.nTarget = nT; + SORT_TXT_TBL.TXT.nKenn = 0xffffffff; + } + ~SwSortUndoElement(); +}; + +SV_DECL_PTRARR_DEL(SwSortList, SwSortUndoElement*, 10,30) +SV_DECL_PTRARR(SwUndoSortList, SwNodeIndex*, 10,30) + +class SwUndoSort : public SwUndo, private SwUndRng +{ + SwSortOptions* pSortOpt; // die Optionen mit den Sortier-Kriterien + SwSortList aSortList; + SwUndoAttrTbl* pUndoTblAttr; + SwRedlineData* pRedlData; + ULONG nTblNd; + + void RemoveIdx( SwPaM& rPam ); +public: + SwUndoSort( const SwPaM&, const SwSortOptions& ); + SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode&, + const SwSortOptions&, BOOL bSaveTable ); + virtual ~SwUndoSort(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + void Insert( const String& rOrgPos, const String& rNewPos ); + void Insert( ULONG nOrgPos, ULONG nNewPos ); + + OUT_UNDOBJ( Sort ) +}; + + + +//-------------------------------------------------------------------- + +class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection +{ +protected: + SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat + ULONG nNdPgPos; + xub_StrLen nCntPos; // Seite/am Absatz/im Absatz + USHORT nRndId; + BOOL bDelFmt; // loesche das gespeicherte Format + + void InsFly( SwUndoIter&, BOOL bShowSel = TRUE ); + void DelFly( SwDoc* ); + + SwUndoFlyBase( SwFrmFmt* pFormat, USHORT nUndoId ); + + SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); } + ULONG GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); } + +public: + virtual ~SwUndoFlyBase(); + + virtual void Undo( SwUndoIter& ) = 0; + virtual void Redo( SwUndoIter& ) = 0; + OUT_UNDOBJ( FlyBase ) +}; + +class SwUndoInsLayFmt : public SwUndoFlyBase +{ +public: + SwUndoInsLayFmt( SwFrmFmt* pFormat ); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( InsLayFmt ) +}; + +class SwUndoDelLayFmt : public SwUndoFlyBase +{ + BOOL bShowSelFrm; +public: + SwUndoDelLayFmt( SwFrmFmt* pFormat ); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + void Redo(); // Schnittstelle fuers Rollback + + void ChgShowSel( BOOL bNew ) { bShowSelFrm = bNew; } + BOOL GetShowSel() const { return bShowSelFrm; } + OUT_UNDOBJ( DelLayFmt ) +}; + + +class SwUndoSetFlyFmt : public SwUndo, public SwClient +{ + SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat + SwFrmFmt* pOldFmt; // die alte Fly Vorlage + SwFrmFmt* pNewFmt; // die neue Fly Vorlage + SfxItemSet* pItemSet; // die zurueck-/ gesetzten Attribute + ULONG nOldNode, nNewNode; + xub_StrLen nOldCntnt, nNewCntnt; + USHORT nOldAnchorTyp, nNewAnchorTyp; + BOOL bAnchorChgd; + + void PutAttr( USHORT nWhich, const SfxPoolItem* pItem ); + void Modify( SfxPoolItem*, SfxPoolItem* ); + void GetAnchor( SwFmtAnchor& rAnhor, ULONG nNode, xub_StrLen nCntnt ); + +public: + SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt ); + virtual ~SwUndoSetFlyFmt(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); +}; + +//-------------------------------------------------------------------- + +class _UnReplaceData; +SV_DECL_PTRARR_DEL( _UnReplaceDatas, _UnReplaceData*, 10, 25 ); + +class SwUndoReplace : public SwUndo +{ + friend class SwDoc; + + BOOL bOldIterFlag; // Status vom Undo-Iter vorm 1. Aufruf + USHORT nAktPos; // fuer GetUndoRange und Undo/Redo + _UnReplaceDatas aArr; + SwRedlineData* pRedlData; + +public: + SwUndoReplace(); + virtual ~SwUndoReplace(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void AddEntry( const SwPaM& rPam, const String& rInsert, BOOL bRegExp ); + void SetEntryEnd( const SwPaM& rPam ); + + BOOL IsFull() const + { return ((USHRT_MAX / sizeof( void* )) - 50 ) < aArr.Count(); } + + OUT_UNDOBJ( Replace ) +}; + + +//-------------------------------------------------------------------- + + +class SwUndoTblHeadline : public SwUndo +{ + ULONG nTblNd; + BOOL bOldHeadline; +public: + SwUndoTblHeadline( const SwTable&, BOOL bOldHdl ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( SwUndoTblHeadline ) +}; + + +//------------ Undo von Insert-/Delete-Sections ---------------------- + +class SwUndoInsSection : public SwUndo, private SwUndRng +{ + SwHistory* pHistory; + SwSection* pSection; + SwRedlineData* pRedlData; + SfxItemSet* pAttr; + ULONG nSectNodePos; + BOOL bSplitAtStt : 1; + BOOL bSplitAtEnd : 1; + BOOL bUpdateFtn : 1; + + void Join( SwDoc& rDoc, ULONG nNode ); + +public: + SwUndoInsSection( const SwPaM&, const SwSection&, + const SfxItemSet* pSet ); + virtual ~SwUndoInsSection(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( SwUndoInsSection ) + + void SetSectNdPos( ULONG nPos ) { nSectNodePos = nPos; } + void SaveSplitNode( SwTxtNode* pTxtNd, BOOL bAtStt ); + void SetUpdtFtnFlag( BOOL bFlag ) { bUpdateFtn = bFlag; } +}; + +class SwUndoDelSection : public SwUndo +{ + ULONG nSttNd, nEndNd; + SwSection* pSection; + SfxItemSet* pAttr; +public: + SwUndoDelSection( const SwSectionFmt& ); + virtual ~SwUndoDelSection(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( SwUndoDelSection ) +}; + +class SwUndoChgSection : public SwUndo +{ + ULONG nSttNd; + SwSection* pSection; + SfxItemSet* pAttr; + BOOL bOnlyAttrChgd; +public: + SwUndoChgSection( const SwSectionFmt&, BOOL bOnlyAttrChgd ); + virtual ~SwUndoChgSection(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( SwUndoChgSection ) +}; + +class SwUndoChgSectPsswd : public SwUndo +{ + String sPasswd; +public: + SwUndoChgSectPsswd( const String& rOld ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( SwUndoChgSectPsswd ) +}; + +//------------ Undo von verschieben/stufen von Gliederung ---------------- + +class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng +{ + short nOffset; +public: + SwUndoOutlineLeftRight( const SwPaM& rPam, short nOffset ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( SwUndoOutlineLeftRight ) +}; + +//-------------------------------------------------------------------- + +class SwUndoDefaultAttr : public SwUndo +{ + SfxItemSet* pOldSet; // die alten Attribute + SvxTabStopItem* pTabStop; +public: + // meldet sich im Format an und sichert sich die alten Attribute + SwUndoDefaultAttr( const SfxItemSet& rOldSet ); + virtual ~SwUndoDefaultAttr(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + OUT_UNDOBJ( DefaultAttr ) +}; + +//-------------------------------------------------------------------- +// ---------- Undo fuer Numerierung ---------------------------------- + +class SwUndoInsNum : public SwUndo, private SwUndRng +{ + SwNumRule aNumRule; + SwHistory* pHistory; + ULONG nSttSet; + SwNumRule* pOldNumRule; + String sReplaceRule; + USHORT nLRSavePos; +public: + SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule ); + SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule ); + SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule, + const String& rReplaceRule ); + virtual ~SwUndoInsNum(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + SwHistory* GetHistory(); // wird ggfs. neu angelegt! + void SetSttNum( ULONG nNdIdx ) { nSttSet = nNdIdx; } + void SaveOldNumRule( const SwNumRule& rOld ); + + void SetLRSpaceEndPos(); + + OUT_UNDOBJ( InsNum ) +}; + +class SwUndoDelNum : public SwUndo, private SwUndRng +{ + SvULongs aNodeIdx; + SvBytes aLevels; + SvBools aRstLRSpaces; + SwHistory* pHistory; +public: + SwUndoDelNum( const SwPaM& rPam ); + virtual ~SwUndoDelNum(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + void AddNode( const SwTxtNode& rNd, BOOL bResetLRSpace ); + SwHistory* GetHistory() { return pHistory; } + + OUT_UNDOBJ( DelNum ) +}; + +class SwUndoMoveNum : public SwUndo, private SwUndRng +{ + ULONG nNewStt; + long nOffset; +public: + SwUndoMoveNum( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv = FALSE ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + void SetStartNode( ULONG nValue ) { nNewStt = nValue; } + OUT_UNDOBJ( MoveNum ) +}; + +class SwUndoNumUpDown : public SwUndo, private SwUndRng +{ + short nOffset; +public: + SwUndoNumUpDown( const SwPaM& rPam, short nOffset ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( NumUpDown ) +}; + +class SwUndoNumOrNoNum : public SwUndo +{ + ULONG nIdx; + BOOL bDel : 1; + BOOL bOutline : 1; +public: + SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL bDelete, BOOL bOutline ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( NumOrNoNum ) +}; + +class SwUndoNumRuleStart : public SwUndo +{ + ULONG nIdx; + USHORT nOldStt, nNewStt; + BOOL bSetSttValue : 1; + BOOL bFlag : 1; +public: + SwUndoNumRuleStart( const SwPosition& rPos, BOOL bDelete ); + SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt ); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + OUT_UNDOBJ( NumRuleStart ) +}; + +//-------------------------------------------------------------------- +// ---------- Undo fuer DrawObjecte ---------------------------------- + +class SwSdrUndo : public SwUndo +{ + SdrUndoAction* pSdrUndo; + SdrMarkList* pMarkList; // MarkList for all selected SdrObjects +public: + SwSdrUndo( SdrUndoAction* , const SdrMarkList* pMarkList ); + virtual ~SwSdrUndo(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + String GetComment() const; +}; + +class SwUndoDrawGroup : public SwUndo +{ + SwUndoGroupObjImpl* pObjArr; + USHORT nSize; + BOOL bDelFmt; + +public: + SwUndoDrawGroup( USHORT nCnt ); + virtual ~SwUndoDrawGroup(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void AddObj( USHORT nPos, SwDrawFrmFmt*, SdrObject* ); + void SetGroupFmt( SwDrawFrmFmt* ); +}; + +class SwUndoDrawUnGroup : public SwUndo +{ + SwUndoGroupObjImpl* pObjArr; + USHORT nSize; + BOOL bDelFmt; + +public: + SwUndoDrawUnGroup( SdrObjGroup* ); + virtual ~SwUndoDrawUnGroup(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void AddObj( USHORT nPos, SwDrawFrmFmt* ); +}; + +class SwUndoDrawDelete : public SwUndo +{ + SwUndoGroupObjImpl* pObjArr; + USHORT nSize; + BOOL bDelFmt; + +public: + SwUndoDrawDelete( USHORT nCnt ); + virtual ~SwUndoDrawDelete(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + void AddObj( USHORT nPos, SwDrawFrmFmt*, SdrObject* ); +}; + +//-------------------------------------------------------------------- + +class SwUndoReRead : public SwUndo +{ + Graphic *pGrf; + String *pNm, *pFltr; + ULONG nPos; + USHORT nMirr; + + void SaveGraphicData( const SwGrfNode& ); + void SetAndSave( SwUndoIter& ); + +public: + SwUndoReRead( const SwPaM& rPam, const SwGrfNode& pGrfNd ); + virtual ~SwUndoReRead(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); +}; + +//-------------------------------------------------------------------- + +class SwUndoInsertLabel : public SwUndo +{ + union { + struct { + // fuer NoTxtFrms + SwUndoInsLayFmt* pUndoFly; + SwUndoFmtAttr* pUndoAttr; + } OBJECT; + struct { + // fuer Tabelle/TextRahmen + SwUndoDelete* pUndoInsNd; + ULONG nNode; + } NODE; + }; + + String sText; + Point aPos; // fuer Zeichen-Objekte + USHORT nFldId; + SwLabelType eType; + BYTE nLayerId; // fuer Zeichen-Objekte + BOOL bBefore :1; + BOOL bUndoKeep :1; + BOOL bCpyBrd :1; + +public: + SwUndoInsertLabel( const SwLabelType eTyp, const String &rText, + const BOOL bBefore, const USHORT nId, + const BOOL bCpyBrd ); + virtual ~SwUndoInsertLabel(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + void SetNodePos( ULONG nNd ) + { if( LTYPE_OBJECT != eType ) NODE.nNode = nNd; } + + void SetUndoKeep() { bUndoKeep = TRUE; } + void SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, SwFrmFmt& rNewFly ); + void SetDrawObj( const Point& rPos, BYTE nLayerId ); +}; + +//-------------------------------------------------------------------- + +class SwUndoChgFtn : public SwUndo, private SwUndRng +{ + SwHistory* pHistory; + String sTxt; + USHORT nNo; + BOOL bEndNote; +public: + SwUndoChgFtn( const SwPaM& rRange, const String& rTxt, + USHORT nNum, BOOL bIsEndNote ); + virtual ~SwUndoChgFtn(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + virtual void Repeat( SwUndoIter& ); + + SwHistory* GetHistory() { return pHistory; } +}; + +class SwUndoFtnInfo : public SwUndo +{ + SwFtnInfo *pFtnInfo; + +public: + SwUndoFtnInfo( const SwFtnInfo &rInfo ); + virtual ~SwUndoFtnInfo(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); +}; + +class SwUndoEndNoteInfo : public SwUndo +{ + SwEndNoteInfo *pEndNoteInfo; + +public: + SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo ); + virtual ~SwUndoEndNoteInfo(); + + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); +}; + + +//-------------------------------------------------------------------- + +class SwUndoRedline : public SwUndo, public SwUndRng +{ +protected: + SwRedlineData* pRedlData; + SwRedlineSaveDatas* pRedlSaveData; + USHORT nUserId; + BOOL bHiddenRedlines; + + virtual void _Undo( SwUndoIter& ); + virtual void _Redo( SwUndoIter& ); + +public: + SwUndoRedline( USHORT nUserId, const SwPaM& rRange ); + virtual ~SwUndoRedline(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); + + USHORT GetUserId() const { return nUserId; } + USHORT GetRedlSaveCount() const + { return pRedlSaveData ? pRedlSaveData->Count() : 0; } +}; + +class SwUndoRedlineDelete : public SwUndoRedline +{ + BOOL bCanGroup : 1; + BOOL bIsDelim : 1; + BOOL bIsBackspace : 1; + + virtual void _Undo( SwUndoIter& ); + virtual void _Redo( SwUndoIter& ); + +public: + SwUndoRedlineDelete( const SwPaM& rRange, USHORT nUserId = 0 ); + + BOOL CanGrouping( const SwUndoRedlineDelete& rPrev ); +}; + +class SwUndoRedlineSort : public SwUndoRedline +{ + SwSortOptions* pOpt; + ULONG nSaveEndNode, nOffset; + xub_StrLen nSaveEndCntnt; + + virtual void _Undo( SwUndoIter& ); + virtual void _Redo( SwUndoIter& ); + +public: + SwUndoRedlineSort( const SwPaM& rRange, const SwSortOptions& rOpt ); + virtual ~SwUndoRedlineSort(); + virtual void Repeat( SwUndoIter& ); + + void SetSaveRange( const SwPaM& rRange ); + void SetOffset( const SwNodeIndex& rIdx ); +}; + +class SwUndoAcceptRedline : public SwUndoRedline +{ + virtual void _Redo( SwUndoIter& ); +public: + SwUndoAcceptRedline( const SwPaM& rRange ); + virtual void Repeat( SwUndoIter& ); +}; + +class SwUndoRejectRedline : public SwUndoRedline +{ + virtual void _Redo( SwUndoIter& ); +public: + SwUndoRejectRedline( const SwPaM& rRange ); + virtual void Repeat( SwUndoIter& ); +}; + +//-------------------------------------------------------------------- + +class SwUndoCompDoc : public SwUndo, public SwUndRng +{ + SwRedlineData* pRedlData; + SwUndoDelete* pUnDel; + SwRedlineSaveDatas* pRedlSaveData; + BOOL bInsert; +public: + SwUndoCompDoc( const SwPaM& rRg, BOOL bIns ); + SwUndoCompDoc( const SwRedline& rRedl ); + + virtual ~SwUndoCompDoc(); + virtual void Undo( SwUndoIter& ); + virtual void Redo( SwUndoIter& ); +}; + + +//-------------------------------------------------------------------- + +// Object der als Iterator durch die Undo-Liste laeuft, bis die +// letze oder die angegebene Klammerung/Id erreicht ist. + +class SwUndoIter +{ + friend class SwDoc; // um im SwDoc::Undo bWeiter zu stezen + friend void SwUndoEnd::Undo( SwUndoIter& ); + friend void SwUndoStart::Undo( SwUndoIter& ); + friend void SwUndoEnd::Redo( SwUndoIter& ); + friend void SwUndoStart::Redo( SwUndoIter& ); + friend void SwUndoEnd::Repeat( SwUndoIter& ); + friend void SwUndoStart::Repeat( SwUndoIter& ); + friend void SwUndoReplace::Undo( SwUndoIter& ); + friend void SwUndoReplace::Redo( SwUndoIter& ); + + USHORT nUndoId; + USHORT nEndCnt; + BOOL bWeiter : 1; + BOOL bUpdateAttr : 1; // Setze das GCAttr an der CursorShell + +public: + SwPaM * pAktPam; // Member fuer das Undo + SwUndo* pLastUndoObj; // fuers Redo, das vorherige UndoObj. + SwFrmFmt* pSelFmt; // ggfs. das Format Rahmen/Object-Selektionen + SdrMarkList* pMarkList; // MarkList for all selected SdrObjects + + SwUndoIter( SwPaM * pPam, USHORT nId = 0 ); + + BOOL IsNextUndo() const { return bWeiter; } + BOOL IsUpdateAttr() const { return bUpdateAttr; } + void SetUpdateAttr( BOOL bNew ) { bUpdateAttr = bNew; } + + inline SwDoc& GetDoc() const; + USHORT GetId() const { return nUndoId; } + USHORT GetLastUndoId() const + { return pLastUndoObj ? pLastUndoObj->GetId() : 0 ; } + void ClearSelections() { pSelFmt = 0; pMarkList = 0; } +}; + + + + +#endif diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx new file mode 100644 index 000000000000..dd68f25c0e37 --- /dev/null +++ b/sw/inc/unoatxt.hxx @@ -0,0 +1,277 @@ +/************************************************************************* + * + * $RCSfile: unoatxt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOATXT_HXX +#define _UNOATXT_HXX + +#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTGROUP_HPP_ +#include <com/sun/star/text/XAutoTextGroup.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTENTRY_HPP_ +#include <com/sun/star/text/XAutoTextEntry.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTCONTAINER_HPP_ +#include <com/sun/star/text/XAutoTextContainer.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_ +#include <com/sun/star/text/XText.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_ +#include <com/sun/star/container/XNamed.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_ +#include <com/sun/star/container/XIndexAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif +#ifndef _SFX_ITEMPROP_HXX +#include <svtools/itemprop.hxx> +#endif +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> // helper for implementations +#endif + +#ifndef _CPPUHELPER_IMPLBASE6_HXX_ +#include <cppuhelper/implbase6.hxx> // helper for implementations +#endif + + +class SwTextBlocks; +class SwGlossaries; +class SwDoc; +/****************************************************************************** + * + ******************************************************************************/ +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + SAL_CALL SwXAutoTextContainer_CreateInstance( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & ); + +class SwXAutoTextContainer : public cppu::WeakImplHelper3 +< + ::com::sun::star::text::XAutoTextContainer, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XIndexAccess +> +{ + SwGlossaries *pGlossaries; +public: + SwXAutoTextContainer(); + virtual ~SwXAutoTextContainer(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XAutoTextContainer + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextGroup > SAL_CALL insertNewByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; + +/* -----------------26.05.98 15:55------------------- + * + * --------------------------------------------------*/ +class SwXAutoTextGroup : public cppu::WeakImplHelper6 +< + ::com::sun::star::text::XAutoTextGroup, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::container::XNamed, + ::com::sun::star::lang::XUnoTunnel +> +{ + SfxItemPropertySet aPropSet; + SwGlossaries* pGlossaries; + rtl::OUString sName; + String sGroupName; + +public: + SwXAutoTextGroup(const rtl::OUString& rName, SwGlossaries* pGloss/*SwTextBlocks* pGroup*/); + virtual ~SwXAutoTextGroup(); + + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XAutoTextGroup + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getTitles(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL renameByName(const rtl::OUString& aElementName, const rtl::OUString& aNewElementName, const rtl::OUString& aNewElementTitle) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextEntry > SAL_CALL insertNewByName(const rtl::OUString& aName, const rtl::OUString& aTitle, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeByName(const rtl::OUString& aEntryName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException ); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // + void Invalidate(); +}; + +/* -----------------17.06.98 12:03------------------- + * + * --------------------------------------------------*/ +class SwXAutoTextEntry : public cppu::WeakImplHelper4 +< + ::com::sun::star::text::XAutoTextEntry, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::text::XText +> +{ + SwGlossaries* pGlossaries; + String sGroupName; + String sEntryName; + +public: + SwXAutoTextEntry(SwGlossaries* , const String& rGroupName, const String& rEntryName); + virtual ~SwXAutoTextEntry(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XText + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); + + //XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); + + //XAutoTextEntry + virtual void SAL_CALL applyTo(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange)throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void Invalidate() {pGlossaries = 0;} + const String& GetGroupName() {return sGroupName;} + const String& GetEntryName() {return sEntryName;} + +}; +#endif + + diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx new file mode 100644 index 000000000000..7a2ccd198197 --- /dev/null +++ b/sw/inc/unocoll.hxx @@ -0,0 +1,562 @@ +/************************************************************************* + * + * $RCSfile: unocoll.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOCOLL_HXX +#define _UNOCOLL_HXX + +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif +#ifndef _FLYENUM_HXX //autogen +#include <flyenum.hxx> +#endif +#ifndef _SV_TIMER_HXX +#include <vcl/timer.hxx> +#endif +#ifndef _COM_SUN_STAR_UTIL_XPROTECTABLE_HPP_ +#include <com/sun/star/util/XProtectable.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ +#include <com/sun/star/container/XNameAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_ +#include <com/sun/star/container/XIndexAccess.hpp> +#endif +#ifndef _STRING_HXX +#include <tools/string.hxx> +#endif + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> // helper for implementations +#endif +/*************************************************** + *************************************************** + * + ***************************************************/ +class SwDoc; +class SwFrmFmt; +namespace com{namespace sun {namespace star {namespace text +{ + class XTextTable; + class XTextSection; + class XFootnote; +}}}} +class SwXFrame; +class SwFrmFmt; +class SwFmtFtn; +class XBookmark; +class SwXReferenceMark; +class SwSectionFmt; +class SwBookmark; +class SwFmtRefMark; +class SwXReferenceMark; +class SwXBookmark; +/*-----------------11.03.98 11:19------------------- + +--------------------------------------------------*/ +class SwUnoCollection +{ + sal_Bool bObjectValid; + SwDoc* pDoc; + + public: + SwUnoCollection(SwDoc* p) : + pDoc(p), + bObjectValid(sal_True){} + + virtual void Invalidate(); + sal_Bool IsValid() const {return bObjectValid;} + + + SwDoc* GetDoc() const {return pDoc;} +}; + +/****************************************************************************** + * + ******************************************************************************/ +#define SW_SERVICE_TYPE_TEXTTABLE 0 // +#define SW_SERVICE_TYPE_TEXTFRAME 1 // +#define SW_SERVICE_TYPE_GRAPHIC 2 +#define SW_SERVICE_TYPE_OLE 3 +#define SW_SERVICE_TYPE_BOOKMARK 4 +#define SW_SERVICE_TYPE_FOOTNOTE 5 +#define SW_SERVICE_TYPE_ENDNOTE 6 +#define SW_SERVICE_TYPE_INDEXMARK 7 // Stichwortverzeichniseintrag +#define SW_SERVICE_TYPE_INDEX 8 // Stichwortverzeichnis +#define SW_SERVICE_REFERENCE_MARK 9 +#define SW_SERVICE_STYLE_CHARACTER_STYLE 10 +#define SW_SERVICE_STYLE_PARAGRAPH_STYLE 11 +#define SW_SERVICE_STYLE_FRAME_STYLE 12 +#define SW_SERVICE_STYLE_PAGE_STYLE 13 +#define SW_SERVICE_STYLE_NUMBERING_STYLE 14 +#define SW_SERVICE_CONTENT_INDEX_MARK 15 +#define SW_SERVICE_CONTENT_INDEX 16 +#define SW_SERVICE_USER_INDEX_MARK 17 +#define SW_SERVICE_USER_INDEX 18 +#define SW_SERVICE_TEXT_SECTION 19 +#define SW_SERVICE_FIELDTYPE_DATETIME 20 +#define SW_SERVICE_FIELDTYPE_USER 21 +#define SW_SERVICE_FIELDTYPE_SET_EXP 22 +#define SW_SERVICE_FIELDTYPE_GET_EXP 23 +#define SW_SERVICE_FIELDTYPE_FILE_NAME 24 +#define SW_SERVICE_FIELDTYPE_PAGE_NUM 25 +#define SW_SERVICE_FIELDTYPE_AUTHOR 26 +#define SW_SERVICE_FIELDTYPE_CHAPTER 27 +#define SW_SERVICE_FIELDTYPE_DUMMY_0 28 +#define SW_SERVICE_FIELDTYPE_GET_REFERENCE 29 +#define SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT 30 +#define SW_SERVICE_FIELDTYPE_ANNOTATION 31 +#define SW_SERVICE_FIELDTYPE_INPUT 32 +#define SW_SERVICE_FIELDTYPE_MACRO 33 +#define SW_SERVICE_FIELDTYPE_DDE 34 +#define SW_SERVICE_FIELDTYPE_HIDDEN_PARA 35 +#define SW_SERVICE_FIELDTYPE_DOC_INFO 36 +#define SW_SERVICE_FIELDTYPE_TEMPLATE_NAME 37 +#define SW_SERVICE_FIELDTYPE_USER_EXT 38 +#define SW_SERVICE_FIELDTYPE_REF_PAGE_SET 39 +#define SW_SERVICE_FIELDTYPE_REF_PAGE_GET 40 +#define SW_SERVICE_FIELDTYPE_JUMP_EDIT 41 +#define SW_SERVICE_FIELDTYPE_SCRIPT 42 +#define SW_SERVICE_FIELDTYPE_DATABASE_NEXT_SET 43 +#define SW_SERVICE_FIELDTYPE_DATABASE_NUM_SET 44 +#define SW_SERVICE_FIELDTYPE_DATABASE_SET_NUM 45 +#define SW_SERVICE_FIELDTYPE_DATABASE 46 +#define SW_SERVICE_FIELDTYPE_DATABASE_NAME 47 +#define SW_SERVICE_FIELDTYPE_TABLEFIELD 48 +#define SW_SERVICE_FIELDTYPE_PAGE_COUNT 49 +#define SW_SERVICE_FIELDTYPE_PARAGRAPH_COUNT 50 +#define SW_SERVICE_FIELDTYPE_WORD_COUNT 51 +#define SW_SERVICE_FIELDTYPE_CHARACTER_COUNT 52 +#define SW_SERVICE_FIELDTYPE_TABLE_COUNT 53 +#define SW_SERVICE_FIELDTYPE_GRAPHIC_OBJECT_COUNT 54 +#define SW_SERVICE_FIELDTYPE_EMBEDDED_OBJECT_COUNT 55 +#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_AUTHOR 56 +#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_DATE_TIME 57 +#define SW_SERVICE_FIELDTYPE_DOCINFO_EDIT_TIME 58 +#define SW_SERVICE_FIELDTYPE_DOCINFO_DESCRIPTION 59 +#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_AUTHOR 60 +#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_DATE_TIME 61 +#define SW_SERVICE_FIELDTYPE_DOCINFO_INFO_0 62 +#define SW_SERVICE_FIELDTYPE_DOCINFO_INFO_1 63 +#define SW_SERVICE_FIELDTYPE_DOCINFO_INFO_2 64 +#define SW_SERVICE_FIELDTYPE_DOCINFO_INFO_3 65 +#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_AUTHOR 66 +#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_DATE_TIME 67 +#define SW_SERVICE_FIELDTYPE_DOCINFO_KEY_WORDS 68 +#define SW_SERVICE_FIELDTYPE_DOCINFO_SUBJECT 69 +#define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE 70 +#define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION 71 +#define SW_SERVICE_FIELDTYPE_DUMMY_1 72 +#define SW_SERVICE_FIELDTYPE_DUMMY_2 73 +#define SW_SERVICE_FIELDTYPE_DUMMY_3 74 +#define SW_SERVICE_FIELDTYPE_DUMMY_4 75 +#define SW_SERVICE_FIELDTYPE_DUMMY_5 76 +#define SW_SERVICE_FIELDTYPE_DUMMY_6 77 +#define SW_SERVICE_FIELDTYPE_DUMMY_7 78 +#define SW_SERVICE_FIELDTYPE_DUMMY_8 79 +#define SW_SERVICE_FIELDMASTER_USER 80 +#define SW_SERVICE_FIELDMASTER_DDE 81 +#define SW_SERVICE_FIELDMASTER_SET_EXP 82 +#define SW_SERVICE_FIELDMASTER_DATABASE 83 +#define SW_SERVICE_FIELDMASTER_DUMMY1 84 +#define SW_SERVICE_FIELDMASTER_DUMMY2 85 +#define SW_SERVICE_FIELDMASTER_DUMMY3 86 +#define SW_SERVICE_FIELDMASTER_DUMMY4 87 +#define SW_SERVICE_FIELDMASTER_DUMMY5 88 +#define SW_SERVICE_INDEX_ILLUSTRATIONS 89 +#define SW_SERVICE_INDEX_OBJECTS 90 +#define SW_SERVICE_INDEX_TABLES 91 +#define SW_SERVICE_INDEX_BIBLIOGRAPHY 92 +#define SW_SERVICE_PARAGRAPH 93 +#define SW_SERVICE_FIELDTYPE_INPUT_USER 94 +#define SW_SERVICE_FIELDTYPE_HIDDEN_TEXT 95 +#define SW_SERVICE_STYLE_CONDITIONAL_PARAGRAPH_STYLE 96 +#define SW_SERVICE_NUMBERING_RULES 97 + +#define SW_SERVICE_LAST SW_SERVICE_NUMBERING_RULES + + +#define SW_SERVICE_INVALID USHRT_MAX + +class SwXServiceProvider +{ +public: + static rtl::OUString GetProviderName(sal_uInt16 nObjectType); + static sal_uInt16 GetProviderType(const rtl::OUString& rServiceName); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc); + static ::com::sun::star::uno::Sequence<rtl::OUString> GetAllServiceNames(); + +}; +/*-----------------11.12.97 09:38------------------- + +--------------------------------------------------*/ +typedef +cppu::WeakImplHelper3 +< + ::com::sun::star::container::XNameAccess, + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::lang::XServiceInfo +> +SwCollectionBaseClass; +class SwXTextTables : public SwCollectionBaseClass, + public SwUnoCollection +{ +public: + SwXTextTables(SwDoc* pDoc); + virtual ~SwXTextTables(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + static ::com::sun::star::text::XTextTable* GetObject( SwFrmFmt& rFmt ); +}; + +/*-----------------11.12.97 10:14------------------- + +--------------------------------------------------*/ +class SwXFrames : public SwCollectionBaseClass, + public SwUnoCollection +{ + const FlyCntType eType; +protected: + + SwXFrame* GetFrmByName( const String& rName ); + SwXFrame* GetFrmByIndex( sal_Int32 nIndex ); + + void RemoveFrame(const rtl::OUString& rName, FlyCntType eType); + +public: + SwXFrames(SwDoc* pDoc, FlyCntType eSet); + virtual ~SwXFrames(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + FlyCntType GetType()const{return eType;} + static SwXFrame* GetObject( SwFrmFmt& rFmt, FlyCntType eType ); + +}; + +/*-----------------20.02.98 10:51------------------- + +--------------------------------------------------*/ +class SwXTextFrames : public SwXFrames +{ +public: + SwXTextFrames(SwDoc* pDoc); + virtual ~SwXTextFrames(); + +// SMART_UNO_DECLARATION( SwXTextFrames, UsrObject ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; + +/*-----------------20.02.98 10:55------------------- + +--------------------------------------------------*/ +class SwXTextGraphicObjects : public SwXFrames +{ +public: + SwXTextGraphicObjects(SwDoc* pDoc); + virtual ~SwXTextGraphicObjects(); + +// SMART_UNO_DECLARATION( SwXTextGraphicObjects, UsrObject ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; + +/*-----------------20.02.98 10:57------------------- + +--------------------------------------------------*/ +class SwXTextEmbeddedObjects : public SwXFrames +{ + +public: + SwXTextEmbeddedObjects(SwDoc* pDoc); + virtual ~SwXTextEmbeddedObjects(); + +// SMART_UNO_DECLARATION( SwXTextEmbeddedObjects, UsrObject ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; + +/*-----------------12.02.98 07:58------------------- + +--------------------------------------------------*/ +class SwXTextSections : public cppu::WeakImplHelper4 +< + ::com::sun::star::container::XNameAccess, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::util::XProtectable +>, + public SwUnoCollection +{ + Timer aWrongPasswdTimer; + sal_uInt16 nWrongPasswd; + DECL_LINK(WrongPasswordTimerHdl, Timer*); +public: + SwXTextSections(SwDoc* pDoc); + virtual ~SwXTextSections(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XProtectable + virtual void SAL_CALL protect(const rtl::OUString& aPassword) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL unprotect(const rtl::OUString& aPassword) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL isProtected(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + static ::com::sun::star::text::XTextSection* GetObject( SwSectionFmt& rFmt ); +}; +/*-----------------12.02.98 07:51------------------- + +--------------------------------------------------*/ +class SwXBookmarks : public SwCollectionBaseClass, + public SwUnoCollection +{ +public: + SwXBookmarks(SwDoc* pDoc); + virtual ~SwXBookmarks(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + static SwXBookmark* GetObject( SwBookmark& rBkm, SwDoc* pDoc ); +}; + +/*-----------------12.02.98 08:01------------------- + +--------------------------------------------------*/ +typedef +cppu::WeakImplHelper2 +< + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::lang::XServiceInfo +> +SwSimpleIndexAccessBaseClass; +class SwXFootnotes : public SwSimpleIndexAccessBaseClass, + public SwUnoCollection +{ + sal_Bool bEndnote; + +public: + SwXFootnotes(sal_Bool bEnd, SwDoc* pDoc); + virtual ~SwXFootnotes(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + static ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt ); +}; + +/* -----------------27.08.98 13:10------------------- + * + * --------------------------------------------------*/ +class SwXReferenceMarks : public SwCollectionBaseClass, + public SwUnoCollection +{ +public: + SwXReferenceMarks(SwDoc* pDoc); + virtual ~SwXReferenceMarks(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + static SwXReferenceMark* GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark ); +}; + +/* -----------------01.09.98 14:06------------------- + * + * --------------------------------------------------*/ +class SwXRedlines : public SwSimpleIndexAccessBaseClass, + public SwUnoCollection +{ +public: + SwXRedlines(SwDoc* pDoc); + virtual ~SwXRedlines(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; +#endif + + + + + + diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx new file mode 100644 index 000000000000..558d6644e98e --- /dev/null +++ b/sw/inc/unocrsr.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * $RCSfile: unocrsr.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOCRSR_HXX +#define _UNOCRSR_HXX + +#include "swcrsr.hxx" +#include "calbck.hxx" + + +class SwUnoCrsr : public virtual SwCursor, public SwModify +{ + BOOL bRemainInSection; +public: + SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 ); + SwUnoCrsr( SwUnoCrsr& ); + virtual ~SwUnoCrsr(); + + virtual operator SwUnoCrsr* (); + +// virtual SwCursor* Create( SwPaM* pRing = 0 ) const; + + // gibt es eine Selection vom Content in die Tabelle + // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt + virtual FASTBOOL IsSelOvr( int eFlags = + ( SELOVER_CHECKNODESSECTION | + SELOVER_TOGGLE | SELOVER_CHANGEPOS )); + + BOOL IsRemainInSection() const { return bRemainInSection; } + void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; } + + DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr ) +}; + + + +class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor +{ + // die Selection hat die gleiche Reihenfolge wie die + // TabellenBoxen. D.h., wird aus dem einen Array an einer Position + // etwas geloescht, dann muss es auch im anderen erfolgen!! + SwCursor aTblSel; + +public: + SwUnoTableCrsr( const SwPosition& rPos ); + virtual ~SwUnoTableCrsr(); + +// virtual SwCursor* Create( SwPaM* pRing = 0 ) const; + + virtual operator SwUnoCrsr* (); + virtual operator SwUnoTableCrsr* (); + virtual operator SwTableCursor* (); + + // gibt es eine Selection vom Content in die Tabelle + // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt + virtual FASTBOOL IsSelOvr( int eFlags = + ( SELOVER_CHECKNODESSECTION | + SELOVER_TOGGLE | SELOVER_CHANGEPOS )); + + void MakeBoxSels(); + SwCursor& GetSelRing() { return aTblSel; } + const SwCursor& GetSelRing() const { return aTblSel; } +}; + + + +#endif diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx new file mode 100644 index 000000000000..00d50c2ecd48 --- /dev/null +++ b/sw/inc/unodraw.hxx @@ -0,0 +1,248 @@ +/************************************************************************* + * + * $RCSfile: unodraw.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNODRAW_HXX +#define _UNODRAW_HXX + +#ifndef _SVX_FMDPAGE_HXX //autogen +#include <svx/fmdpage.hxx> +#endif +#ifndef _CALBCK_HXX //autogen +#include <calbck.hxx> +#endif +#ifndef _FRMFMT_HXX //autogen +#include <frmfmt.hxx> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_ +#include <com/sun/star/text/XTextContent.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_ +#include <com/sun/star/drawing/XShape.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> // helper for implementations +#endif +#ifndef _SFX_ITEMPROP_HXX +#include <svtools/itemprop.hxx> +#endif + +class SdrMarkList; +class SdrView; +class SwDoc; +/****************************************************************************** + * + ******************************************************************************/ +class SwFmDrawPage : public SvxFmDrawPage +{ + SdrPageView* pPageView; +protected: + + // Erzeugen eines SdrObjects anhand einer Description. Kann von + // abgeleiteten Klassen dazu benutzt werden, eigene ::com::sun::star::drawing::Shapes zu + // unterstuetzen (z.B. Controls) + virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape ); + + // Die folgende Methode wird gerufen, wenn ein SvxShape-Objekt angelegt + // werden soll. abgeleitete Klassen koennen hier eine Ableitung oder + // ein ein SvxShape aggregierendes Objekt anlegen. + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const; + + +public: + SwFmDrawPage( SdrPage* pPage ); + virtual ~SwFmDrawPage(); + + const SdrMarkList& PreGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes); + void PreUnGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > xShapeGroup); +// void PostGroup(); ?? wird es noch gebraucht ?? + + SdrView* GetDrawView() {return pView;} + SdrPageView* GetPageView(); + void RemovePageView(); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetInterface( SdrObject* pObj ); +}; + +/* -----------------09.12.98 08:57------------------- + * + * --------------------------------------------------*/ +typedef cppu::WeakAggImplHelper3 +< + ::com::sun::star::drawing::XDrawPage, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::drawing::XShapeGrouper +> +SwXDrawPageBaseClass; +class SwXDrawPage : public SwXDrawPageBaseClass +{ + SwDoc* pDoc; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xPageAgg; + SwFmDrawPage* pDrawPage; +public: + SwXDrawPage(SwDoc* pDoc); + ~SwXDrawPage(); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XShapes + virtual void SAL_CALL add(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL remove(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException ); + + //XShapeGrouper + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > SAL_CALL group(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL ungroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > & aGroup) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + SwFmDrawPage* GetSvxPage(); + void Invalidate() {pDoc = 0;} +}; +/* -----------------22.01.99 10:20------------------- + * + * --------------------------------------------------*/ +class SwShapeDescriptor_Impl; +typedef +cppu::WeakAggImplHelper4 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::text::XTextContent, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel +> +SwXShapeBaseClass; +class SwXShape : public SwXShapeBaseClass, + public SwClient +{ + friend class SwHTMLImageWatcher; + friend class SwHTMLParser; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xShapeAgg; + SfxItemPropertySet aPropSet; + const SfxItemPropertyMap* _pMap; + + SwShapeDescriptor_Impl* pImpl; + + sal_Bool m_bDescriptor; + + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + + SvxShape* GetSvxShape(); +public: + SwXShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape); + virtual ~SwXShape(); + + TYPEINFO(); + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;} + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;} +}; +#endif + + diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx new file mode 100644 index 000000000000..74897d9228e9 --- /dev/null +++ b/sw/inc/unofield.hxx @@ -0,0 +1,331 @@ +/************************************************************************* + * + * $RCSfile: unofield.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOFIELD_HXX +#define _UNOFIELD_HXX + +#ifndef _COM_SUN_STAR_TEXT_XDEPENDENTTEXTFIELD_HPP_ +#include <com/sun/star/text/XDependentTextField.hpp> +#endif +#ifndef _COM_SUN_STAR_UTIL_XREFRESHABLE_HPP_ +#include <com/sun/star/util/XRefreshable.hpp> +#endif +#ifndef _CALBCK_HXX //autogen +#include <calbck.hxx> +#endif +#ifndef _UNOOBJ_HXX +#include <unoobj.hxx> +#endif +#ifndef _UNOCOLL_HXX +#include <unocoll.hxx> +#endif + +class SwFieldType; +class SwDoc; +class SwFmtFld; +class SwField; +/* -----------------04.12.98 12:49------------------- + * + * --------------------------------------------------*/ +class SwXFieldMaster : public cppu::WeakImplHelper4 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::lang::XComponent +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + sal_uInt16 nResTypeId; + SwDoc* m_pDoc; + + sal_Bool m_bIsDescriptor; + + String sParam1; //Content / Database / NumberingSeparator + String sParam2; // - /DataTablename + String sParam3; // - /DataFieldName + double fParam1; // Value / - + sal_Int8 nParam1; // ChapterNumberingLevel + sal_Bool bParam1; // IsExpression + +public: +// automatisch auskommentiert - [getImplementation] - Wird von OWeakObject nicht weiter untersttzt! +// // fuer getImplementation() und fuer den ServiceProvider + + SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId); + SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc); + virtual ~SwXFieldMaster(); + + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + SwFieldType* GetFldType() const { return (SwFieldType*)GetRegisteredIn(); } + SwDoc* GetDoc() {return m_pDoc;} + + sal_Bool IsDescriptor()const {return m_bIsDescriptor;} + sal_uInt16 GetResId() const {return nResTypeId;} +}; + +/* -----------------04.12.98 12:49------------------- + * + * --------------------------------------------------*/ +struct SwFieldProperties_Impl; +class SwXTextField : public cppu::WeakImplHelper4 +< + ::com::sun::star::text::XDependentTextField, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XUnoTunnel +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + const SwFmtFld* pFmtFld; + SwDoc* m_pDoc; + + sal_Bool m_bIsDescriptor; + sal_uInt16 m_nServiceId; + SwFieldProperties_Impl* m_pProps; + String m_sTypeName; + + + SwFieldType* GetFldType() const { return (SwFieldType*)GetRegisteredIn(); } + SwDoc* GetDoc() {return m_pDoc;} +public: + SwXTextField(sal_uInt16 nServiceId); + SwXTextField(const SwFmtFld& rFmt, SwDoc* pDoc); + virtual ~SwXTextField(); + + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XDependentTextField + virtual void SAL_CALL attachTextFieldMaster(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xFieldMaster) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getTextFieldMaster(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextField + virtual rtl::OUString SAL_CALL getPresentation(sal_Bool bShowCommand) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + const SwField* GetField() const; + const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; }; +}; +/* -----------------21.12.98 10:26------------------- + * + * --------------------------------------------------*/ +typedef +cppu::WeakImplHelper2 +< + ::com::sun::star::container::XNameAccess, + ::com::sun::star::lang::XServiceInfo +> +SwXTextFieldMastersBaseClass; +class SwXTextFieldMasters : public SwXTextFieldMastersBaseClass, + public SwUnoCollection +{ +public: + SwXTextFieldMasters(SwDoc* pDoc); + virtual ~SwXTextFieldMasters(); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; + +/* -----------------21.12.98 10:26------------------- + * + * --------------------------------------------------*/ +typedef +cppu::WeakImplHelper3 +< + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::util::XRefreshable +> +SwXTextFieldTypesBaseClass; +class SwXTextFieldTypes : public SwXTextFieldTypesBaseClass, + public SwUnoCollection +{ +public: + SwXTextFieldTypes(SwDoc* pDoc); + virtual ~SwXTextFieldTypes(); + + //XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::util::XRefreshable + virtual void SAL_CALL refresh( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; + +/* -----------------21.12.98 14:49------------------- + * + * --------------------------------------------------*/ +class SwXFieldEnumeration : public cppu::WeakImplHelper2 +< + ::com::sun::star::container::XEnumeration, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient +{ + SwDoc* pDoc; + const SwFieldType* pLastFieldType; + const SwFieldType* pNextFieldType; + const SwFmtFld* pLastFieldFmt; + const SwFmtFld* pNextFieldFmt; + +public: + SwXFieldEnumeration(SwDoc* pDoc); + virtual ~SwXFieldEnumeration(); + + //XEnumeration + virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; +#endif + + + diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx new file mode 100644 index 000000000000..fff9dd43f080 --- /dev/null +++ b/sw/inc/unoframe.hxx @@ -0,0 +1,363 @@ +/************************************************************************* + * + * $RCSfile: unoframe.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOFRAME_HXX +#define _UNOFRAME_HXX + +#ifndef _UNOOBJ_HXX +#include <unoobj.hxx> +#endif +#ifndef _SFX_OBJSH_HXX +#include <sfx2/objsh.hxx> +#endif +#ifndef _COM_SUN_STAR_DOCUMENT_XEMBEDDEDOBJECTSUPPLIER_HPP_ +#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTEMBEDDEDOBJECT_HPP_ +#include <com/sun/star/text/XTextEmbeddedObject.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTFRAME_HPP_ +#include <com/sun/star/text/XTextFrame.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_ +#include <com/sun/star/drawing/XShape.hpp> +#endif +#ifndef _COM_SUN_STAR_UTIL_XMODIFYLISTENER_HPP_ +#include <com/sun/star/util/XModifyListener.hpp> +#endif +#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ +#include <com/sun/star/frame/XModel.hpp> +#endif + +/*-----------------12.02.98 11:21------------------- + +--------------------------------------------------*/ +class BaseFrameProperties_Impl; +class SwXFrame : public cppu::WeakImplHelper6 +< + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::beans::XPropertyState, + ::com::sun::star::drawing::XShape, + ::com::sun::star::container::XNamed, + ::com::sun::star::lang::XUnoTunnel +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SfxItemPropertySet aPropSet; + const SfxItemPropertyMap* _pMap; + + const FlyCntType eType; + + // Descriptor-interface + BaseFrameProperties_Impl* pProps; + sal_Bool bIsDescriptor; + String sName; + +public: + SwXFrame(); + SwXFrame(FlyCntType eSet, + const SfxItemPropertyMap* pMap); //Descriptor-If + SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet, + const SfxItemPropertyMap* pMap); + virtual ~SwXFrame(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + TYPEINFO(); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XShape + virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); + + //XShapeDescriptor + virtual rtl::OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException ); + + //Basisimplementierung + //XComponent + virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + FlyCntType GetFlyCntType()const {return eType;} + + sal_Bool IsDescriptor() const {return bIsDescriptor;} + void ResetDescriptor(); +}; +/*-----------------20.02.98 11:28------------------- + +--------------------------------------------------*/ +typedef cppu::WeakImplHelper2 +< + ::com::sun::star::text::XTextFrame, + ::com::sun::star::container::XEnumerationAccess +> +SwXTextFrameBaseClass; + +class SwXTextFrame : public SwXTextFrameBaseClass, + public SwXText, + public SwXFrame +{ + const SfxItemPropertyMap* _pMap; + +protected: + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor(); +public: + SwXTextFrame(); + SwXTextFrame(SwFrmFmt& rFmt); + virtual ~SwXTextFrame(); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw(); + virtual void SAL_CALL release( ) throw(); + + //XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XTextFrame + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XText + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); + + //XEnumerationAccess - frueher XParagraphEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void * SAL_CALL operator new( size_t ) throw(); + void SAL_CALL operator delete( void * ) throw(); +}; +/*-----------------20.02.98 11:28------------------- + +--------------------------------------------------*/ +typedef cppu::WeakImplHelper1 +< + ::com::sun::star::text::XTextContent +> +SwXTextGraphicObjectBaseClass; +class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass, + public SwXFrame +{ +public: + SwXTextGraphicObject(); + SwXTextGraphicObject(SwFrmFmt& rFmt); + virtual ~SwXTextGraphicObject(); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw(); + virtual void SAL_CALL release( ) throw(); + + //XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void * SAL_CALL operator new( size_t ) throw(); + void SAL_CALL operator delete( void * ) throw(); +}; +/*-----------------20.02.98 11:28------------------- + +--------------------------------------------------*/ +typedef cppu::WeakImplHelper2 +< + ::com::sun::star::text::XTextEmbeddedObject, + ::com::sun::star::document::XEmbeddedObjectSupplier +>SwXTextEmbeddedObjectBaseClass; + +class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass, + public SwXFrame +{ +public: + SwXTextEmbeddedObject(); + SwXTextEmbeddedObject(SwFrmFmt& rFmt); + virtual ~SwXTextEmbeddedObject(); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw(); + virtual void SAL_CALL release( ) throw(); + + //XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XEmbeddedObjectSupplier, + virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL getEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XEmbeddedObject + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getObject( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setObject( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xObject ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void * SAL_CALL operator new( size_t ) throw(); + void SAL_CALL operator delete( void * ) throw(); +}; + + + +class SwXOLEListener : public cppu::WeakImplHelper1 +< + ::com::sun::star::util::XModifyListener +>, + public SwClient +{ + SvPtrarr aFmts; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModel( const SwFmt& rFmt, SwOLENode** ppNd = 0 ) const; + SfxObjectShell* GetObjShell( const SwFmt& rFmt, + SwOLENode** ppNd = 0 ) const; + sal_uInt16 FindEntry( const ::com::sun::star::lang::EventObject& Source, SwOLENode** ppNd = 0 ); +public: + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::util::XModifyListener + virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); + + sal_Bool AddOLEFmt( SwFrmFmt& rFmt ); + void Modify( SfxPoolItem*, SfxPoolItem* ); +}; + + + +#endif + diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx new file mode 100644 index 000000000000..ec211a034fcd --- /dev/null +++ b/sw/inc/unoidx.hxx @@ -0,0 +1,366 @@ +/************************************************************************* + * + * $RCSfile: unoidx.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOIDX_HXX +#define _UNOIDX_HXX + +#ifndef _COM_SUN_STAR_TEXT_XDOCUMENTINDEXMARK_HPP_ +#include <com/sun/star/text/XDocumentIndexMark.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XDOCUMENTINDEX_HPP_ +#include <com/sun/star/text/XDocumentIndex.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_ +#include <com/sun/star/container/XIndexReplace.hpp> +#endif +#ifndef _UNOOBJ_HXX +#include <unoobj.hxx> +#endif +#ifndef _UNOCOLL_HXX +#include <unocoll.hxx> +#endif +#ifndef _TOXE_HXX +#include <toxe.hxx> +#endif +class SwTOXBaseSection; +class SwTOXMark; +class SwTOXType; +/* -----------------07.12.98 10:08------------------- + * + * --------------------------------------------------*/ +class SwDocIdxProperties_Impl; +class SwXIndexStyleAccess_Impl; +class SwXIndexTokenAccess_Impl; + +class SwXDocumentIndex : public cppu::WeakImplHelper5 +< + ::com::sun::star::text::XDocumentIndex, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::container::XNamed, + ::com::sun::star::lang::XUnoTunnel +>, + public SwClient +{ + friend class SwXIndexStyleAccess_Impl; + friend class SwXIndexTokenAccess_Impl; + + SwEventListenerContainer aLstnrCntnr; + const SfxItemPropertyMap* _pMap; + SwDoc* m_pDoc; + const SwTOXBaseSection* pBase; + TOXTypes eTOXType; + + //Descriptor-Interface + sal_Bool bIsDescriptor; + SwDocIdxProperties_Impl* pProps; + + SwXIndexStyleAccess_Impl* pStyleAccess; + SwXIndexTokenAccess_Impl* pTokenAccess; + + SwSectionFmt* GetFmt()const {return (SwSectionFmt*)GetRegisteredIn();} + + sal_Bool IsDescriptor() const {return bIsDescriptor;} + const SwDocIdxProperties_Impl* GetProperties_Impl() const { return pProps;} + SwDocIdxProperties_Impl* GetProperties_Impl() { return pProps;} + TOXTypes GetTOXType() const {return eTOXType;} + + SwXIndexStyleAccess_Impl* GetStyleAccess() const {return pStyleAccess;} + void SetStyleAccess(SwXIndexStyleAccess_Impl* pSet) + {pStyleAccess = pSet;} + + SwXIndexTokenAccess_Impl* GetTokenAccess() const {return pTokenAccess;} + void SetTokenAccess(SwXIndexTokenAccess_Impl* pSet) + {pTokenAccess = pSet;} +public: + SwXDocumentIndex(const SwTOXBaseSection* = 0, SwDoc* = 0); + //Descriptor-Ctor + SwXDocumentIndex(TOXTypes eToxType, SwDoc& rDoc); + virtual ~SwXDocumentIndex(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XDocumentIndex + virtual ::rtl::OUString SAL_CALL getServiceName( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL update( ) throw(::com::sun::star::uno::RuntimeException); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); +}; +/* -----------------07.12.98 10:08------------------- + * + * --------------------------------------------------*/ +class SwXDocumentIndexMark : public cppu::WeakImplHelper4 +< + ::com::sun::star::text::XDocumentIndexMark, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XUnoTunnel +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SwDoc* m_pDoc; + const SwTOXMark* m_pTOXMark; + const SfxItemPropertyMap* _pMap; + + sal_Bool bIsDescriptor; + TOXTypes eType; + sal_uInt16 nLevel; + String sAltText; + String sPrimaryKey; + String sSecondaryKey; + String sUserIndexName; + + void InitMap(TOXTypes eToxType); +public: + SwXDocumentIndexMark(TOXTypes eToxType); + SwXDocumentIndexMark(const SwTOXType* pType, + const SwTOXMark* pMark, + SwDoc* pDc); + virtual ~SwXDocumentIndexMark(); + + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + virtual rtl::OUString SAL_CALL getMarkEntry(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setMarkEntry(const rtl::OUString& aIndexEntry) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + SwTOXType* GetTOXType() const {return (SwTOXType*)GetRegisteredIn();} + const SwTOXMark* GetTOXMark() const {return m_pTOXMark;} + + static SwXDocumentIndexMark* GetObject(SwTOXType* pType, const SwTOXMark* pMark, + SwDoc* pDoc); +}; +/* -----------------05.05.99 12:27------------------- + * + * --------------------------------------------------*/ + +class SwXDocumentIndexes : public SwCollectionBaseClass, + public SwUnoCollection +{ +public: + SwXDocumentIndexes(SwDoc* pDoc); + virtual ~SwXDocumentIndexes(); + +// SMART_UNO_DECLARATION( SwXDocumentIndexes, UsrObject ); + +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) + +// throw( ::com::sun::star::uno::RuntimeException ); +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut ); + + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; +/* -----------------13.09.99 16:39------------------- + + --------------------------------------------------*/ +class SwXIndexStyleAccess_Impl : public cppu::WeakImplHelper2 +< + ::com::sun::star::container::XIndexReplace, + ::com::sun::star::lang::XServiceInfo +> +{ + SwXDocumentIndex& rParent; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndex > xParent; +public: + SwXIndexStyleAccess_Impl(SwXDocumentIndex& rParentIdx); + virtual ~SwXIndexStyleAccess_Impl(); + + //XIndexReplace + virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; + +/* -----------------13.09.99 16:39------------------- + + --------------------------------------------------*/ +class SwXIndexTokenAccess_Impl : public cppu::WeakImplHelper2 +< + ::com::sun::star::container::XIndexReplace, + ::com::sun::star::lang::XServiceInfo +> +{ + SwXDocumentIndex& rParent; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndex > xParent; + sal_Int32 nCount; +public: + SwXIndexTokenAccess_Impl(SwXDocumentIndex& rParentIdx); + virtual ~SwXIndexTokenAccess_Impl(); + + + //XIndexReplace + virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; + +#endif + + diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx new file mode 100644 index 000000000000..5259c1c3134c --- /dev/null +++ b/sw/inc/unomap.hxx @@ -0,0 +1,290 @@ +/************************************************************************* + * + * $RCSfile: unomap.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOMAP_HXX +#define _UNOMAP_HXX + +#ifndef _SFX_ITEMPROP_HXX //autogen +#include <svtools/itemprop.hxx> +#endif + +#define PROPERTY_NONE 0 + +#define PROPERTY_MAP_TEXT_CURSOR 0 +#define PROPERTY_MAP_CHAR_STYLE 1 +#define PROPERTY_MAP_PARA_STYLE 2 +#define PROPERTY_MAP_FRAME_STYLE 3 +#define PROPERTY_MAP_PAGE_STYLE 4 +#define PROPERTY_MAP_NUM_STYLE 5 +#define PROPERTY_MAP_SECTION 6 +#define PROPERTY_MAP_TEXT_TABLE 7 +#define PROPERTY_MAP_TABLE_CELL 8 +#define PROPERTY_MAP_TABLE_RANGE 9 +#define PROPERTY_MAP_TEXT_SEARCH 10 +#define PROPERTY_MAP_TEXT_FRAME 11 +#define PROPERTY_MAP_TEXT_GRAPHIC 12 +#define PROPERTY_MAP_TEXT_SHAPE 13 +#define PROPERTY_MAP_INDEX_USER 14 +#define PROPERTY_MAP_INDEX_CNTNT 15 +#define PROPERTY_MAP_INDEX_IDX 16 +#define PROPERTY_MAP_USER_MARK 17 +#define PROPERTY_MAP_CNTIDX_MARK 18 +#define PROPERTY_MAP_INDEX_MARK 19 +#define PROPERTY_MAP_TEXT_TABLE_ROW 20 +#define PROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR 21 +#define PROPERTY_MAP_TEXT_TABLE_CURSOR 22 +#define PROPERTY_MAP_BOOKMARK 23 +#define PROPERTY_MAP_PARAGRAPH_EXTENSIONS 24 +#define PROPERTY_MAP_INDEX_ILLUSTRATIONS 25 +#define PROPERTY_MAP_INDEX_OBJECTS 26 +#define PROPERTY_MAP_INDEX_TABLES 27 +#define PROPERTY_MAP_BIBLIOGRAPHY 28 +#define PROPERTY_MAP_TEXT_DOCUMENT 29 +#define PROPERTY_MAP_LINK_TARGET 30 +#define PROPERTY_MAP_AUTO_TEXT_GROUP 31 +#define PROPERTY_MAP_PRINT_SETTINGS 32 +#define PROPERTY_MAP_VIEW_SETTINGS 33 +#define PROPERTY_MAP_TEXTPORTION_EXTENSIONS 34 +#define PROPERTY_MAP_FOOTNOTE 35 +#define PROPERTY_MAP_END 36 + +#define PROPERTY_SET_CHAR_STYLE 1 +#define PROPERTY_SET_PARA_STYLE 2 +#define PROPERTY_SET_FRAME_STYLE 3 +#define PROPERTY_SET_PAGE_STYLE 4 +#define PROPERTY_SET_NUM_STYLE 5 + +//S&E +#define WID_WORDS 0 +#define WID_BACKWARDS 1 +#define WID_REGULAR_EXPRESSION 2 +#define WID_CASE_SENSITIVE 3 +#define WID_IN_SELECTION 4 +#define WID_STYLES 5 +#define WID_SIMILARITY 6 +#define WID_SIMILARITY_RELAX 7 +#define WID_SIMILARITY_EXCHANGE 8 +#define WID_SIMILARITY_ADD 9 +#define WID_SIMILARITY_REMOVE 10 +#define WID_SEARCH_ALL 11 + +//Sections +#define WID_SECT_CONDITION 0 +#define WID_SECT_DDE_TYPE 1 +#define WID_SECT_DDE_FILE 2 +#define WID_SECT_DDE_ELEMENT 3 +#define WID_SECT_LINK 4 +#define WID_SECT_VISIBLE 5 +#define WID_SECT_PROTECTED 6 +#define WID_SECT_REGION 7 + +//Verzeichnisse +#define WID_PRIMARY_KEY 1000 +#define WID_SECONDARY_KEY 1001 +#define WID_ALT_TEXT 1002 +#define WID_IDX_TITLE 1003 +#define WID_LEVEL 1004 +#define WID_CREATE_FROM_MARKS 1005 +#define WID_CREATE_FROM_OUTLINE 1006 +//#define WID_PARAGRAPH_STYLE_NAMES 1007 +#define WID_CREATE_FROM_CHAPTER 1008 +#define WID_CREATE_FROM_LABELS 1009 +#define WID_PROTECTED 1000 +#define WID_USE_ALPHABETICAL_SEPARATORS 1010 +#define WID_USE_KEY_AS_ENTRY 1011 +#define WID_USE_COMBINED_ENTRIES 1012 +#define WID_IS_CASE_SENSITIVE 1013 +#define WID_USE_P_P 1014 +#define WID_USE_DASH 1015 +#define WID_USE_UPPER_CASE 1016 +#define WID_INDEX_AUTO_MARK_FILE_U_R_L 1017 +#define WID_LABEL_CATEGORY 1018 +#define WID_LABEL_DISPLAY_TYPE 1019 +#define WID_USE_LEVEL_FROM_SOURCE 1020 +#define WID_LEVEL_FORMAT 1021 +#define WID_LEVEL_PARAGRAPH_STYLES 1022 +#define WID_RECALC_TAB_STOPS 1023 +//#define WID_??? 1024 +#define WID_MAIN_ENTRY_CHARACTER_STYLE_NAME 1025 +#define WID_CREATE_FROM_TABLES 1026 +#define WID_CREATE_FROM_TEXT_FRAMES 1027 +#define WID_CREATE_FROM_GRAPHIC_OBJECTS 1028 +#define WID_CREATE_FROM_EMBEDDED_OBJECTS 1029 +#define WID_CREATE_FROM_STAR_MATH 1030 +#define WID_CREATE_FROM_STAR_IMAGE 1031 +#define WID_CREATE_FROM_STAR_CHART 1032 +#define WID_CREATE_FROM_STAR_CALC 1033 +#define WID_CREATE_FROM_STAR_DRAW 1034 +#define WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS 1035 +#define WID_USER_IDX_NAME 1036 +#define WID_PARA_HEAD 1037 +#define WID_PARA_SEP 1038 +#define WID_PARA_LEV1 1039 +#define WID_PARA_LEV2 1040 +#define WID_PARA_LEV3 1041 +#define WID_PARA_LEV4 1042 +#define WID_PARA_LEV5 1043 +#define WID_PARA_LEV6 1044 +#define WID_PARA_LEV7 1045 +#define WID_PARA_LEV8 1046 +#define WID_PARA_LEV9 1047 +#define WID_PARA_LEV10 1048 +#define WID_IS_COMMA_SEPARATED 1049 + +//text document +#define WID_DOC_CHAR_COUNT 1000 +#define WID_DOC_PARA_COUNT 1001 +#define WID_DOC_WORD_COUNT 1002 +#define WID_DOC_WORD_SEPARATOR 1003 +#define WID_DOC_CHANGES_SHOW 1004 +#define WID_DOC_CHANGES_RECORD 1005 +#define WID_DOC_AUTO_MARK_URL 1006 + +//AutoText +#define WID_GROUP_PATH 0 +#define WID_GROUP_TITLE 1 + +//ViewSettings +#define WID_VIEWSET_HRULER 0 +#define WID_VIEWSET_VRULER 1 +#define WID_VIEWSET_HSCROLL 2 +#define WID_VIEWSET_VSCROLL 3 +#define WID_VIEWSET_GRAPHICS 4 +#define WID_VIEWSET_TABLES 5 +#define WID_VIEWSET_DRAWINGS 6 +#define WID_VIEWSET_FIELD_COMMANDS 7 +#define WID_VIEWSET_ANNOTATIONS 8 +#define WID_VIEWSET_INDEX_MARK_BACKGROUND 9 +#define WID_VIEWSET_FOOTNOTE_BACKGROUND 10 +#define WID_VIEWSET_TEXT_FIELD_BACKGROUND 11 +#define WID_VIEWSET_PARA_BREAKS 12 +#define WID_VIEWSET_SOFT_HYPHENS 13 +#define WID_VIEWSET_SPACES 14 +#define WID_VIEWSET_PROTECTED_SPACES 15 +#define WID_VIEWSET_TABSTOPS 16 +#define WID_VIEWSET_BREAKS 17 +#define WID_VIEWSET_HIDDEN_TEXT 18 +#define WID_VIEWSET_HIDDEN_PARAGRAPHS 19 +#define WID_VIEWSET_TABLE_BOUNDARIES 20 +#define WID_VIEWSET_TEXT_BOUNDARIES 21 +#define WID_VIEWSET_SMOOTH_SCROLLING 22 +#define WID_VIEWSET_SOLID_MARK_HANDLES 23 +#define WID_VIEWSET_ZOOM 24 +#define WID_VIEWSET_ZOOM_TYPE 25 +#define WID_VIEWSET_ONLINE_LAYOUT 26 + +//PrintSettings +#define WID_PRTSET_LEFT_PAGES 0 +#define WID_PRTSET_RIGHT_PAGES 1 +#define WID_PRTSET_REVERSED 2 +#define WID_PRTSET_PROSPECT 3 +#define WID_PRTSET_GRAPHICS 4 +#define WID_PRTSET_TABLES 5 +#define WID_PRTSET_DRAWINGS 6 +#define WID_PRTSET_CONTROLS 7 +#define WID_PRTSET_PAGE_BACKGROUND 8 +#define WID_PRTSET_BLACK_FONTS 9 +#define WID_PRTSET_ANNOTATION_MODE 10 + +//NumberingRules +#define WID_IS_AUTOMATIC 0 +#define WID_CONTINUOUS 1 +#define WID_RULE_NAME 2 +#define WID_IS_ABS_MARGINS 3 + +/* -----------------04.07.98 11:41------------------- + * + * --------------------------------------------------*/ +class SwItemPropertySet : public SfxItemPropertySet +{ +protected: + virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const; +public: + SwItemPropertySet( const SfxItemPropertyMap *pMap ) : + SfxItemPropertySet( pMap ){} +}; +/* -----------------04.07.98 11:41------------------- + * + * --------------------------------------------------*/ +class SwUnoPropertyMapProvider +{ + SfxItemPropertyMap* aMapArr[PROPERTY_MAP_END]; + + SfxItemPropertySet* pCharStyleMap; + SfxItemPropertySet* pParaStyleMap; + SfxItemPropertySet* pFrameStyleMap; + SfxItemPropertySet* pPageStyleMap; + SfxItemPropertySet* pNumStyleMap; + + void Sort(sal_uInt16 nId); +public: + SwUnoPropertyMapProvider(); + ~SwUnoPropertyMapProvider(); + + const SfxItemPropertyMap* GetPropertyMap(sal_uInt16 PropertyId); + + SfxItemPropertySet& GetPropertySet(sal_Int8 nPropSetId); +}; + +extern SwUnoPropertyMapProvider aSwMapProvider; + +#endif + + diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h new file mode 100644 index 000000000000..ee45b744ca12 --- /dev/null +++ b/sw/inc/unomid.h @@ -0,0 +1,124 @@ +/************************************************************************* + * + * $RCSfile: unomid.h,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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_UNOMID_HXX +#define SW_UNOMID_HXX + + +#define MID_MIRROR_VERT 0 +#define MID_MIRROR_HORZ 1 +#define MID_MIRROR_HORZ_PAGETOGGLE 2 + +#define MID_PAGEDESC_PAGEDESCNAME 0 +#define MID_PAGEDESC_PAGENUMOFFSET 1 + +#define MID_SURROUND_SURROUNDTYPE 0 +#define MID_SURROUND_ANCHORONLY 1 +#define MID_SURROUND_CONTOUR 2 +#define MID_SURROUND_CONTOUROUTSIDE 3 + +#define MID_VERTORIENT_ORIENT 0 +#define MID_VERTORIENT_RELATION 1 +#define MID_VERTORIENT_POSITION 2 + +#define MID_HORIORIENT_ORIENT 0 +#define MID_HORIORIENT_RELATION 1 +#define MID_HORIORIENT_POSITION 2 +#define MID_HORIORIENT_PAGETOGGLE 3 + +#define MID_ANCHOR_ANCHORTYPE 0 +#define MID_ANCHOR_PAGENUM 1 + +#define MID_URL_HYPERLINKFORMAT 0 +#define MID_URL_HYPERLINKNAME 1 +#define MID_URL_CLIENTMAP 2 +#define MID_URL_SERVERMAP 3 +#define MID_URL_URL 4 +#define MID_URL_TARGET 5 +#define MID_URL_VISITED_FMT 6 +#define MID_URL_UNVISITED_FMT 7 + +#define MID_CHAIN_PREVNAME 0 +#define MID_CHAIN_NEXTNAME 1 + +#define MID_LINENUMBER_COUNT 0 +#define MID_LINENUMBER_STARTVALUE 1 + +#define MID_DROPCAP_FORMAT 0 +#define MID_DROPCAP_WHOLE_WORD 1 +#define MID_DROPCAP_CHAR_STYLE_NAME 2 + +#define MID_FRMSIZE_SIZE 0 +#define MID_FRMSIZE_REL_HEIGHT 1 +#define MID_FRMSIZE_REL_WIDTH 2 +#define MID_FRMSIZE_IS_SYNC_REL_SIZE 3 +#define MID_FRMSIZE_WIDTH 4 +#define MID_FRMSIZE_HEIGHT 5 +#define MID_FRMSIZE_SIZE_TYPE 6 +#define MID_FRMSIZE_IS_AUTO_HEIGHT 7 +/* XML only */ +#define MID_FRMSIZE_MIN_HEIGHT 8 +#define MID_FRMSIZE_FIX_HEIGHT 9 +#define MID_FRMSIZE_COL_WIDTH 10 +#define MID_FRMSIZE_REL_COL_WIDTH 11 + +#define MID_COLUMNS 0 +#define MID_COLUMN_SEPARATOR_LINE 1 +#endif diff --git a/sw/inc/unomod.hxx b/sw/inc/unomod.hxx new file mode 100644 index 000000000000..771004c6156f --- /dev/null +++ b/sw/inc/unomod.hxx @@ -0,0 +1,223 @@ +/************************************************************************* + * + * $RCSfile: unomod.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOMOD_HXX +#define _UNOMOD_HXX + +#ifndef _COM_SUN_STAR_TEXT_XMODULE_HPP_ +#include <com/sun/star/text/XModule.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_VIEW_XPRINTSETTINGSSUPPLIER_HPP_ +#include <com/sun/star/view/XPrintSettingsSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_VIEW_XVIEWSETTINGSSUPPLIER_HPP_ +#include <com/sun/star/view/XViewSettingsSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> // helper for implementations +#endif + +struct SfxItemPropertyMap; +class SwView; +/****************************************************************************** + * + ******************************************************************************/ +/*-----------------15.03.98 13:21------------------- + +--------------------------------------------------*/ + +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SwXModule_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & ); + +class SwXModule : public cppu::WeakImplHelper4 +< + ::com::sun::star::text::XModule, + ::com::sun::star::view::XViewSettingsSupplier, + ::com::sun::star::view::XPrintSettingsSupplier, + ::com::sun::star::lang::XServiceInfo +> +{ + + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxViewSettings; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxPrintSettings; + +public: + SwXModule(); + virtual ~SwXModule(); + + //XViewSettings + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getViewSettings(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XPrintSettings + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getPrintSettings(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; + +/*-----------------15.03.98 13:21------------------- + +--------------------------------------------------*/ +class SwXPrintSettings : public cppu::WeakImplHelper2 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo +> +{ + const SfxItemPropertyMap* _pMap; + sal_Bool bWeb : 1; +public: + SwXPrintSettings(sal_Bool bWeb); + virtual ~SwXPrintSettings(); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; +/*-----------------15.03.98 13:21------------------- + +--------------------------------------------------*/ +class SwXViewSettings : public cppu::WeakImplHelper2 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo +> +{ + const SfxItemPropertyMap* _pMap; + SwView* pView; + sal_Bool bObjectValid : 1; + sal_Bool bWeb : 1; +public: + SwXViewSettings(sal_Bool bWeb, SwView* pView); + virtual ~SwXViewSettings(); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + sal_Bool IsValid() const {return bObjectValid;} + void Invalidate() {bObjectValid = sal_False;} +}; +/* -----------------24.09.98 10:47------------------- + * + * --------------------------------------------------*/ +/*class SwXTerminateListener : public ::com::sun::star::frame::XTerminateListener, + public UsrObject +{ +public: + SwXTerminateListener(); + virtual ~SwXTerminateListener(); + + SMART_UNO_DECLARATION( SwXTerminateListener, UsrObject ); + + virtual UString getClassName(); +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual ::com::sun::star::uno::XInterface * queryInterface( ::com::sun::star::uno::Uik aUik); + +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void); + + + //XTerminateListener + virtual void queryTermination(const ::com::sun::star::lang::EventObject& aEvent); + virtual void notifyTermination(const ::com::sun::star::lang::EventObject& aEvent); + + //XEventListener + virtual void disposing(const ::com::sun::star::lang::EventObject& Source); +}; + +*/ +#endif + + diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx new file mode 100644 index 000000000000..98594a3a3918 --- /dev/null +++ b/sw/inc/unoobj.hxx @@ -0,0 +1,1483 @@ +/************************************************************************* + * + * $RCSfile: unoobj.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOOBJ_HXX +#define _UNOOBJ_HXX + +#ifndef _SFX_ITEMPROP_HXX +#include <svtools/itemprop.hxx> +#endif +#ifndef _CALBCK_HXX //autogen +#include <calbck.hxx> +#endif +#ifndef _FRMFMT_HXX //autogen +#include <frmfmt.hxx> +#endif +#ifndef _FLYENUM_HXX //autogen +#include <flyenum.hxx> +#endif +#ifndef _FLDBAS_HXX //autogen +#include <fldbas.hxx> +#endif +#ifndef _FMTCNTNT_HXX //autogen +#include <fmtcntnt.hxx> +#endif +#ifndef _PAM_HXX //autogen +#include <pam.hxx> +#endif +#ifndef _TOXE_HXX +#include <toxe.hxx> +#endif +#ifndef _SORTOPT_HXX //autogen +#include <sortopt.hxx> +#endif +#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINSERTABLE_HPP_ +#include <com/sun/star/document/XDocumentInsertable.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTCURSOR_HPP_ +#include <com/sun/star/text/XTextCursor.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XWORDCURSOR_HPP_ +#include <com/sun/star/text/XWordCursor.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XPARAGRAPHCURSOR_HPP_ +#include <com/sun/star/text/XParagraphCursor.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XSENTENCECURSOR_HPP_ +#include <com/sun/star/text/XSentenceCursor.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XFOOTNOTE_HPP_ +#include <com/sun/star/text/XFootnote.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTSECTION_HPP_ +#include <com/sun/star/text/XTextSection.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HPP_ +#include <com/sun/star/text/XTextField.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTRANGE_HPP_ +#include <com/sun/star/text/XTextRange.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_ +#include <com/sun/star/text/XText.hpp> +#endif +#ifndef _COM_SUN_STAR_UTIL_XSORTABLE_HPP_ +#include <com/sun/star/util/XSortable.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_ +#include <com/sun/star/container/XEnumerationAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XCONTENTENUMERATIONACCESS_HPP_ +#include <com/sun/star/container/XContentEnumerationAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_ +#include <com/sun/star/container/XIndexAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_ +#include <com/sun/star/container/XNamed.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_ +#include <com/sun/star/beans/XPropertyState.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTRANGECOMPARE_HPP_ +#include <com/sun/star/text/XTextRangeCompare.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XRELATIVETEXTCONTENTINSERT_HPP_ +#include <com/sun/star/text/XRelativeTextContentInsert.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XRELATIVETEXTCONTENTREMOVE_HPP_ +#include <com/sun/star/text/XRelativeTextContentRemove.hpp> +#endif +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif +#ifndef _CPPUHELPER_FACTORY_HXX_ +#include <cppuhelper/factory.hxx> // helper for factories +#endif +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE5_HXX_ +#include <cppuhelper/implbase5.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE6_HXX_ +#include <cppuhelper/implbase6.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE8_HXX_ +#include <cppuhelper/implbase8.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE10_HXX_ +#include <cppuhelper/implbase10.hxx> // helper for implementations +#endif + +#define C2U(cChar) rtl::OUString::createFromAscii(cChar) +#define C2S(cChar) UniString::CreateFromAscii(cChar) + +class SwUnoCrsr; +class SwBookmark; +class SwFmtFtn; +class SwFmtFld; +class SwFmtRefMark; +class SwEvtLstnrArray; +class GetCurTxtFmtColl; +/* -----------------29.04.98 07:35------------------- + * + * --------------------------------------------------*/ +enum CursorType +{ + CURSOR_INVALID, + CURSOR_BODY, + CURSOR_FRAME, + CURSOR_TBLTEXT, + CURSOR_FOOTNOTE, + CURSOR_HEADER, + CURSOR_FOOTER, + CURSOR_ALL // fuer Search&Replace +}; + +/* -----------------29.04.98 07:35------------------- + * + * --------------------------------------------------*/ +#define PUNOPAM (_pStartCrsr) + +#define FOREACHUNOPAM_START(pCrsr) \ + {\ + SwPaM *_pStartCrsr = pCrsr, *__pStartCrsr = _pStartCrsr; \ + do { + +#define FOREACHUNOPAM_END() \ + } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr ); \ + } + +/* -----------------26.06.98 16:18------------------- + * + * --------------------------------------------------*/ +SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName); +::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition(SwDoc* pDoc, + const SwPosition& rPos, const SwPosition* pMark); + +::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId(); + +/* -----------------29.04.98 07:35------------------- + * + * --------------------------------------------------*/ +class SwUnoInternalPaM : public SwPaM +{ + SwUnoInternalPaM( const SwUnoInternalPaM& ); +public: + SwUnoInternalPaM(SwDoc& rDoc); + ~SwUnoInternalPaM(); + + SwUnoInternalPaM& operator=(const SwPaM& rPaM); +}; + +/*-----------------04.03.98 11:54------------------- + Start/EndAction oder Start/EndAllAction +--------------------------------------------------*/ +class UnoActionContext +{ + SwDoc* pDoc; + public: + UnoActionContext(SwDoc* pDoc); + ~UnoActionContext(); + + void InvalidateDocument() {pDoc = 0;} +}; +/* -----------------07.07.98 12:03------------------- + * Actions kurzfristig unterbrechen + * --------------------------------------------------*/ +class UnoActionRemoveContext +{ + SwDoc* pDoc; + public: + UnoActionRemoveContext(SwDoc* pDoc); + ~UnoActionRemoveContext(); +}; + +/****************************************************************************** + * + ******************************************************************************/ +typedef com::sun::star::uno::Reference< com::sun::star::text::XTextRange > * XTextRangeRefPtr; +SV_DECL_PTRARR(XTextRangeArr, XTextRangeRefPtr, 4, 4); + +void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew); + +/* -----------------22.04.99 11:18------------------- + * Verwaltung der EventListener + * --------------------------------------------------*/ +class SwEventListenerContainer +{ + SwEvtLstnrArray* pListenerArr; + ::com::sun::star::uno::XInterface* pxParent; + public: + SwEventListenerContainer( ::com::sun::star::uno::XInterface* pxParent); + ~SwEventListenerContainer(); + + void AddListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener); + BOOL RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener); + void Disposing(); +}; +/* -----------------03.12.98 12:22------------------- + * + * --------------------------------------------------*/ +class SwXTextRange; +class SwXTextCursor; +class SwXText : public ::com::sun::star::text::XText, + ::com::sun::star::lang::XTypeProvider, + ::com::sun::star::text::XTextRangeCompare, + ::com::sun::star::text::XRelativeTextContentInsert, + ::com::sun::star::text::XRelativeTextContentRemove + +{ + SwDoc* pDoc; + BOOL bObjectValid; + CursorType eCrsrType; +protected: + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor(); + +public: + SwXText(SwDoc* pDc, CursorType eType) : + pDoc(pDc),bObjectValid(0 != pDc), eCrsrType(eType){} + virtual ~SwXText(); + + const SwDoc* GetDoc()const {return pDoc;} + SwDoc* GetDoc() {return pDoc;} + + // wenn ein SwXText attached wird, wird das Doc gesetzt + void SetDoc(SwDoc* pDc) + {DBG_ASSERT(!pDoc || !pDc, "Doc schon gesetzt?") + pDoc = pDc; + bObjectValid = 0 != pDc; + } + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + + //XText + virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); + + //XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextRangeCompare + sal_Int16 SAL_CALL compareRegionStarts( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + sal_Int16 SAL_CALL compareRegionEnds( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + //XRelativeTextContentInsert + virtual void SAL_CALL insertTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + //XRelativeTextContentRemove + virtual void SAL_CALL removeTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + // + INT16 ComparePositions(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos2) throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException); + BOOL CheckForOwnMember(const SwXTextRange* pRange1, const SwXTextCursor* pCursor1)throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + // + void Invalidate() {bObjectValid = sal_False;} + BOOL IsValid()const {return bObjectValid;} + + CursorType GetTextType() {return eCrsrType;} +}; + +/* -----------------03.12.98 12:16------------------- + * + * --------------------------------------------------*/ +class SwXTextCursor : public cppu::WeakImplHelper10 +< + ::com::sun::star::text::XSentenceCursor, + ::com::sun::star::text::XWordCursor, + ::com::sun::star::text::XParagraphCursor, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::beans::XPropertyState, + ::com::sun::star::document::XDocumentInsertable, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::util::XSortable, + ::com::sun::star::container::XContentEnumerationAccess +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SfxItemPropertySet aPropSet; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + SwSortOptions* pLastSortOptions; + + CursorType eType; + + void DeleteAndInsert(const String& rText); + +public: + SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, const SwPosition& rPos, + CursorType eSet, SwDoc* pDoc, const SwPosition* pMark = 0); + SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, SwUnoCrsr* pSourceCrsr, CursorType eSet = CURSOR_ALL); + //invalid Cursor! + SwXTextCursor(SwXText* pParent = 0); + virtual ~SwXTextCursor(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XTextCursor - neu + virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + + //XWordCursor - neu + virtual BOOL SAL_CALL isStartOfWord( ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL isEndOfWord( ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoNextWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoPreviousWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoEndOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoStartOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException); + + //XSentenceCursor - neu + virtual BOOL SAL_CALL isStartOfSentence( ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL isEndOfSentence( ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoNextSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoPreviousSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoStartOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); + virtual BOOL SAL_CALL gotoEndOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException); + + //XLineCursor - alt +// virtual BOOL goDown(sal_uInt16 nCount, BOOL Expand); +// virtual BOOL goUp(sal_uInt16 nCount, BOOL Expand); +// virtual BOOL isAtStartOfLine(void); +// virtual BOOL isAtEndOfLine(void); +// virtual void gotoEndOfLine(BOOL Expand); +// virtual void gotoStartOfLine(BOOL Expand); + + //ParagraphCursor - neu + virtual BOOL SAL_CALL isStartOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL isEndOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL gotoStartOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL gotoEndOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL gotoNextParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL gotoPreviousParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + static void SwXTextCursor::SetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Any SwXTextCursor::GetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SwXTextCursor::GetPropertyStates( SwPaM& rPaM, SfxItemPropertySet& rPropSet, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::beans::PropertyState SwXTextCursor::GetPropertyState( SwPaM& rPaM, SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + static void SwXTextCursor::SetPropertyToDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Any SwXTextCursor::GetPropertyDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertySetCloner - alt +// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > cloneProperties(void); +// virtual void applyProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & PropertySet); + + //XDocumentInsertable - neu + virtual void SAL_CALL insertDocumentFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ); + + //XAutoTextInsertable - alt +// virtual void insertAutoTextEntry(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextEntry > & ::com::sun::star::text::AutoTextEntry); + + //XSortable - neu + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException ); + + //XContentEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + const SwPaM* GetPaM() const; + const SwDoc* GetDoc()const; + SwDoc* GetDoc(); + SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();} + const SwUnoCrsr* GetCrsr()const{return (SwUnoCrsr*)GetRegisteredIn();} + + static void SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, BOOL bTableMode = sal_False); + static void GetCrsrAttr(SwPaM& rPam, SfxItemSet& rSet, BOOL bCurrentAttrOnly = FALSE); + static void getTextFromPam(SwPaM& aCrsr, rtl::OUString& rBuffer); + static SwFmtColl* GetCurTxtFmtColl(SwPaM& rPam, BOOL bConditional); + + static void SelectPam(SwPaM& rCrsr, sal_Bool bExpand); + static void SetString(SwUnoCrsr& rUnoCrsr, const rtl::OUString& rString); +}; + +/*-----------------20.03.98 07:47------------------- + +--------------------------------------------------*/ +/* das wird zunaechst nicht gebraucht - bisher fuer den XPropertySetCloner +class SwXPropertySet : public ::com::sun::star::beans::XPropertySet, + public UsrObject +{ + ::com::sun::star::uno::Sequence<::com::sun::star::uno::Any>* pAny; + ::com::sun::star::uno::Sequence< Property >* pInfo; + +public: + // Eigentumsuebergang der Pointer! + SwXPropertySet( ::com::sun::star::uno::Sequence<::com::sun::star::uno::Any>* pAny, + ::com::sun::star::uno::Sequence<Property>* pInfo ); + virtual ~SwXPropertySet(); + + SMART_UNO_DECLARATION( SwXPropertySet, UsrObject ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +}; +/*-----------------20.03.98 08:26------------------- + +--------------------------------------------------*/ +/* das wird zunaechst nicht gebraucht - bisher fuer den XPropertySetCloner + +class SwXPropertySetInfo: public ::com::sun::star::beans::XPropertySetInfo, UsrObject +{ + ::com::sun::star::uno::Sequence< Property >* pSeq; + +public: + SwXPropertySetInfo( const ::com::sun::star::uno::Sequence<Property>& rInfo ); + virtual ~SwXPropertySetInfo(); + + SMART_UNO_DECLARATION( SwXPropertySetInfo, UsrObject ); + + virtual ::com::sun::star::uno::Sequence< Property > getProperties(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual Property getPropertyByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL hasPropertyByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); +}; + +/*-----------------20.02.98 08:45------------------- + +--------------------------------------------------*/ +typedef +cppu::WeakImplHelper5 +< + ::com::sun::star::text::XTextContent, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XNamed, + ::com::sun::star::lang::XUnoTunnel +> +SwRefBookmarkBaseClass; +class SwXBookmark : public SwRefBookmarkBaseClass, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SwDoc* pDoc; + String m_aName; + BOOL bIsDescriptor; + +public: + SwXBookmark(SwBookmark* pBkm = 0, SwDoc* pDoc = 0); + virtual ~SwXBookmark(); + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + SwBookmark* GetBookmark() const { return (SwBookmark*)GetRegisteredIn(); } + SwDoc* GetDoc(){return pDoc;} +}; + +/*-----------------23.02.98 10:45------------------- + +--------------------------------------------------*/ + +typedef cppu::WeakAggImplHelper2 +< + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::lang::XServiceInfo +> SwXBodyTextBaseClass; +class SwXBodyText : public SwXBodyTextBaseClass, + public SwXText +{ +public: + SwXBodyText(SwDoc* pDoc); + virtual ~SwXBodyText(); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();} + virtual void SAL_CALL release( ) throw(){OWeakObject::release();} + + //XAggregation + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + + //XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XText + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); + + //XEnumerationAccess - frueher XParagraphEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > CreateTextCursor(BOOL bIgnoreTables = sal_False); +}; +/*-----------------23.02.98 12:05------------------- + +--------------------------------------------------*/ +class SwXTextRange : public cppu::WeakImplHelper6 +< + ::com::sun::star::text::XTextRange, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XContentEnumerationAccess, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::beans::XPropertyState +>, + public SwClient +{ + friend class SwXText; + enum RangePosition + { + RANGE_IN_TEXT, // 'normaler' ::com::sun::star::text::TextRange + RANGE_IN_FRAME,// TextPosition wurde mit einem Rahmen angelegt, der kein Uno-Objekt besitzt + RANGE_IN_CELL, // TextPosition wurde mit einer Zelle angelegt, die kein Uno-Objekt besitzt + RANGE_IS_TABLE, // Anker einer Tabelle + RANGE_INVALID // von NewInstance erzeugt + } eRangePosition; + + SwDoc* pDoc; + SwTableBox* pBox; + const SwStartNode* pBoxStartNode; + SwDepend aObjectDepend; //Format der Tabelle oder des Rahmens anmelden + SfxItemPropertySet aPropSet; + //SwDepend aFrameDepend; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + + + void _CreateNewBookmark(SwPaM& rPam); + //TODO: new exception type for protected content + void DeleteAndInsert(const String& rText) throw( ::com::sun::star::uno::RuntimeException ); + +public: + SwXTextRange(); + SwXTextRange(SwPaM& rPam, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rxParent); + SwXTextRange(SwFrmFmt& rFmt, SwPaM& rPam); + SwXTextRange(SwFrmFmt& rTblFmt, SwTableBox& rTblBox, SwPaM& rPam); + SwXTextRange(SwFrmFmt& rTblFmt, const SwStartNode& rStartNode, SwPaM& rPam); + SwXTextRange(SwFrmFmt& rTblFmt); + + virtual ~SwXTextRange(); + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); + + //XContentEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + BOOL GetPositions(SwPaM& rToFill) const; + const SwDoc* GetDoc()const {return pDoc;} + SwDoc* GetDoc(){return pDoc;} + + SwBookmark* GetBookmark() const { return (SwBookmark*)GetRegisteredIn(); } + + static BOOL XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, + const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange); +}; + +/* -----------------15.05.98 08:29------------------- + * + * --------------------------------------------------*/ +typedef cppu::WeakImplHelper3 +< + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::lang::XServiceInfo +> +SwXTextRangesBaseClass; +class SwXTextRanges : public SwXTextRangesBaseClass, + public SwClient +{ + XTextRangeArr* pRangeArr; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + XTextRangeArr* GetRangesArray(); + SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); } +public: + SwXTextRanges(); + SwXTextRanges( SwUnoCrsr* pCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent); + SwXTextRanges(SwPaM* pCrsr); + virtual ~SwXTextRanges(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + const SwUnoCrsr* GetCursor() const { return (const SwUnoCrsr*)GetRegisteredIn(); } +}; + +/*-----------------09.03.98 13:57------------------- + +--------------------------------------------------*/ +struct SwTextSectionProperties_Impl; +class SwXTextSection : public cppu::WeakImplHelper5 +< + ::com::sun::star::text::XTextSection, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XNamed, + ::com::sun::star::lang::XUnoTunnel +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SfxItemPropertySet aPropSet; + + BOOL m_bIsDescriptor; + String m_sName; + SwTextSectionProperties_Impl* pProps; +public: + SwXTextSection(SwSectionFmt* pFmt = 0); + virtual ~SwXTextSection(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + TYPEINFO(); + + //XTextSection + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > SAL_CALL getParentSection(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > > SAL_CALL getChildSections(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + SwSectionFmt* GetFmt()const {return (SwSectionFmt*)GetRegisteredIn();} + static SwXTextSection* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef ); +}; +/*-----------------12.02.98 08:01------------------- + +--------------------------------------------------*/ +typedef +cppu::WeakImplHelper5 +< + ::com::sun::star::text::XFootnote, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XUnoTunnel +> +SwXFootnoteBaseClass; +class SwXFootnote : public SwXFootnoteBaseClass, + public SwXText, + public SwClient +{ + friend class SwXFootnotes; + + SwEventListenerContainer aLstnrCntnr; + const SwFmtFtn* pFmtFtn; + BOOL m_bIsDescriptor; + String m_sLabel; + BOOL m_bIsEndnote; + +protected: + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor(); +public: + SwXFootnote(BOOL bEndnote); + SwXFootnote(SwDoc* pDoc, const SwFmtFtn& rFmt); + virtual ~SwXFootnote(); + + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw(){SwXFootnoteBaseClass::acquire();} + virtual void SAL_CALL release( ) throw(){SwXFootnoteBaseClass::release();} + + //XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XFootnote + virtual rtl::OUString SAL_CALL getLabel(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setLabel(const rtl::OUString& aLabel) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XText + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); + + //XEnumerationAccess - frueher XParagraphEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + const SwFmtFtn* FindFmt() const; + void Invalidate(); +}; + +/*-----------------07.04.98 08:10------------------- + +--------------------------------------------------*/ +class SwXParagraphEnumeration : public cppu::WeakImplHelper2 +< + ::com::sun::star::container::XEnumeration, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient +{ + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + + BOOL bFirstParagraph; + SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();} + CursorType eCursorType; +public: + SwXParagraphEnumeration(SwXText* pParent, SwPosition& rPos, CursorType eType); + SwXParagraphEnumeration(SwXText* pParent, SwUnoCrsr* pCrsr, CursorType eType); + virtual ~SwXParagraphEnumeration(); + + + //XEnumeration + virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; +/*-----------------07.04.98 08:15------------------- + +--------------------------------------------------*/ +SV_DECL_PTRARR(SwDependArr, SwDepend*, 2, 2); +class SwXParagraph : public cppu::WeakImplHelper8 +< + ::com::sun::star::text::XTextRange, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::beans::XPropertyState, + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::text::XTextContent, + ::com::sun::star::container::XContentEnumerationAccess +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SfxItemPropertySet aPropSet; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + rtl::OUString m_sText; + BOOL m_bIsDescriptor; + + SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();} +public: + SwXParagraph(); + SwXParagraph(SwXText* pParent, SwUnoCrsr* pCrsr); + virtual ~SwXParagraph(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XEnumerationAccess - war XTextPortionEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XContentEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + BOOL IsDescriptor() const {return m_bIsDescriptor;} + + static BOOL getDefaultTextContentValue(::com::sun::star::uno::Any& rAny, + const rtl::OUString& rPropertyName, USHORT nWID = 0); + static SwXParagraph* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef ); + //falls es mal als Service erzeugt werden kann + //void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + void attachToText(SwXText* pParent, SwUnoCrsr* pCrsr); +}; +/* -----------------23.03.99 12:57------------------- + * + * --------------------------------------------------*/ +#define PARAFRAME_PORTION_PARAGRAPH 0 +#define PARAFRAME_PORTION_CHAR 1 +#define PARAFRAME_PORTION_TEXTRANGE 2 + +class SwXParaFrameEnumeration : public cppu::WeakImplHelper2 +< + ::com::sun::star::container::XEnumeration, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient +{ + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xNextObject; //hasMoreElements legt das Objekt schon an + SwDependArr aFrameArr; //wird im Ctor gefuellt + + SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();} + BOOL CreateNextObject(); + void FillFrame(SwUnoCrsr& rUnoCrsr); +public: + SwXParaFrameEnumeration(const SwUnoCrsr& rUnoCrsr, sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0); + ~SwXParaFrameEnumeration(); + + //XEnumeration + virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; +/* -----------------29.05.98 14:42------------------- + * + * --------------------------------------------------*/ + +class SwXTextPortionEnumeration : public cppu::WeakImplHelper3 +< + ::com::sun::star::container::XEnumeration, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel +>, + public SwClient +{ + XTextRangeArr aPortionArr; //all portions are created in the ctor + SwDependArr aFrameArr; //wird im Ctor gefuellt - mit am Zeichen gebundenen Rahmen + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent; + BOOL bAtEnd; + BOOL bFirstPortion; + + + SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); } + SwXTextPortionEnumeration(); + void CreatePortions(); +public: + SwXTextPortionEnumeration(SwPaM& rParaCrsr, + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent); + virtual ~SwXTextPortionEnumeration(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XEnumeration + virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; + +/* -----------------29.05.98 14:42------------------- + * Keine Anmeldung am Feld - Das Feld muss am Cursor stehen + * --------------------------------------------------*/ +enum SwTextPortionType +{ + PORTION_TEXT, + PORTION_FIELD, + PORTION_FRAME, + PORTION_FOOTNOTE, + PORTION_CONTROL_CHAR, + PORTION_REFMARK_START, + PORTION_REFMARK_END, + PORTION_TOXMARK_START, + PORTION_TOXMARK_END, + PORTION_BOOKMARK_START, + PORTION_BOOKMARK_END +}; + +class SwXTextPortion : public cppu::WeakImplHelper6 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::text::XTextRange, + ::com::sun::star::text::XTextField, + ::com::sun::star::beans::XPropertyState, + ::com::sun::star::container::XContentEnumerationAccess, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SfxItemPropertySet aPropSet; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xRefMark; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xTOXMark; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xBookmark; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xFootnote; + const SwFmtFld* pFmtFld; + SwDepend aFrameDepend; + SwFrmFmt* pFrameFmt; + SwTextPortionType ePortionType; + sal_Int16 nControlChar; + + BOOL bIsCollapsed; + + SwFmtFld* GetFldFmt(BOOL bInit = sal_False); + SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); } +public: + SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, SwTextPortionType eType ); + SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, SwFrmFmt& rFmt ); + virtual ~SwXTextPortion(); + + //XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XTextField + virtual rtl::OUString SAL_CALL getPresentation(BOOL bShowCommand) throw( ::com::sun::star::uno::RuntimeException ); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XContentEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void SetRefMark( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark) + {xRefMark = xMark;} + + void SetTOXMark( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark) + {xTOXMark = xMark;} + + void SetBookmark( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark) + {xBookmark = xMark;} + + void SetFootnote( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xMark) + {xFootnote = xMark;} + + void SetControlChar(sal_Int16 nSet) {nControlChar = nSet;} + + void SetIsCollapsed(BOOL bSet) { bIsCollapsed = bSet;} + + //falls es mal als service erzeugt werden kann + //void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); +}; +/* -----------------29.09.98 09:01------------------- + * + * --------------------------------------------------*/ +/* os: 04.12.98 11:40 hier gibt es noch keine sinnvolle Definition +#define MAX_SORT_FIELDS 3 // das ist eher willkuerlich (wie im Dialog) +class SwXTextSortDescriptor : public XTextSortDescriptor, + public UsrObject +{ + SwSortOptions aSortOptions; + BOOL bUseHeader; +public: + SwXTextSortDescriptor(BOOL bUsedInTable); + virtual ~SwXTextSortDescriptor(); + + //XTextSortDescriptor + virtual sal_Unicode getTextColumnSeparator(void) const; + virtual void setTextColumnSeparator(sal_Unicode TextColumnSeparator_); + + //XSortDescriptor + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::SortField > getSortFields(void) const; + virtual void setSortFields(const ::com::sun::star::uno::Sequence< ::com::sun::star::util::SortField >& SortFields_); + virtual sal_uInt16 getMaxFieldCount(void) const; + virtual ColumnsOrRows getOrientation(void) const; + virtual void setOrientation(ColumnsOrRows Orientation_); + virtual BOOL getUseHeader(void) const; + virtual void setUseHeader(BOOL UseHeader_); + + const SwSortOptions& GetSortOptions() const {return aSortOptions;} + void SetSortOptions(const SwSortOptions& rSortOpt); +}; +*/ +/* -----------------25.08.98 11:02------------------- + * + * --------------------------------------------------*/ +typedef +cppu::WeakImplHelper2 +< + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XEnumerationAccess +> +SwXHeadFootTextBaseClass; +class SwXHeadFootText : public SwXHeadFootTextBaseClass, + public SwXText, + public SwClient +{ + SwFrmFmt* GetFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + BOOL bIsHeader; +protected: + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor(); +public: + SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader); + ~SwXHeadFootText(); + + TYPEINFO(); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw(){SwXHeadFootTextBaseClass::acquire();} + virtual void SAL_CALL release( ) throw(){SwXHeadFootTextBaseClass::release();} + + //XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XText + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XEnumerationAccess - frueher XParagraphEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; +/* -----------------27.08.98 15:11------------------- + * + * --------------------------------------------------*/ +class SwXReferenceMark : public SwRefBookmarkBaseClass, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SwDoc* pDoc; + const SwFmtRefMark* pMark; + String sMarkName; + BOOL m_bIsDescriptor; + + BOOL IsValid() const {return 0 != GetRegisteredIn();} + void InsertRefMark(SwPaM& rPam, SwDoc* pDoc); +public: + SwXReferenceMark(SwDoc* pDoc, const SwFmtRefMark* pMark); + ~SwXReferenceMark(); + + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + const SwFmtRefMark* GetMark()const {return pMark;} + const String& GetMarkName() const {return sMarkName;} + SwDoc* GetDoc() const{return pDoc;} + void Invalidate(); +}; +/* -----------------01.09.98 16:09------------------- + * + * --------------------------------------------------*/ +// os: 04.12.98 11:44 - keine Definition +//class SwXRedline : public XRedline, +/* +class SwXRedline : public XRedline, + public UsrObject, + public SwClient +{ + SwDoc* pDoc; + const SwRedline* pRedline; + + BOOL IsValid() const; +public: + SwXRedline(SwDoc* pDoc, const SwRedline* pRedline); + virtual ~SwXRedline(); + + //XRedline + virtual sal_uInt16 getActionType(void) const; + virtual rtl::OUString getAuthor(void) const; + virtual ::com::sun::star::util::DateTime getCreationDateTime(void) const; + virtual rtl::OUString getDescription(void) const; + virtual void setDescription(const rtl::OUString& Description_); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; + + +*/ +#endif + + diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx new file mode 100644 index 000000000000..b50df4f3296b --- /dev/null +++ b/sw/inc/unoprnms.hxx @@ -0,0 +1,536 @@ +/************************************************************************* + * + * $RCSfile: unoprnms.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOPRNMS_HXX +#define _UNOPRNMS_HXX + + +#ifndef _SAL_TYPES_H_ +#include <sal/types.h> +#endif +#ifndef _SOLAR_H +#include <tools/solar.h> +#endif + +struct SwPropNameLen +{ + const char* pName; + USHORT nNameLen; + SwPropNameLen(const char* pString, USHORT nLen) : + pName(pString), + nNameLen(nLen){} + + operator const char*()const {return pName;} +}; +#define SW_PROP_NAME(aPropName) aPropName.pName, aPropName.nNameLen + +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOLLOW_STYLE; + +//extern const sal_Char* __FAR_DATA UNO_NAME_FOLLOW_STYLE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_PHYSICAL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_AUTO_UPDATE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DISPLAY_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_FONT_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_FONT_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_FONT_FAMILY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_FONT_CHAR_SET ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_FONT_PITCH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_GRAPHIC_URL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_GRAPHIC_FILTER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_GRAPHIC_URL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_GRAPHIC_FILTER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_GRAPHIC_URL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_GRAPHIC_FILTER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BACK_GRAPHIC_URL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BACK_GRAPHIC_FILTER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BACK_GRAPHIC_LOCATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BACK_GRAPHIC_BITMAP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC_URL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC_FILTER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC_LOCATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC_SIZE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC_BITMAP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BULLET_FONT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_GRAPHIC_LOCATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_GRAPHIC_LOCATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_GRAPHIC_LOCATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_LEFT_PARA_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_RIGHT_PARA_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_LEFT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_RIGHT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_LEFT_MARGIN_RELATIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_RIGHT_MARGIN_RELATIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_FIRST_LINE_INDENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_FIRST_LINE_INDENT_RELATIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_IS_HYPHENATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LEFT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_RIGHT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_LEFT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_RIGHT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_LEFT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_RIGHT_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_RANGE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_ALIGNMENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BULLET_FONT_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BULLET_ID ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ANCHOR_CHAR_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SUFFIX ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PREFIX ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARENT_NUMBERING ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_START_WITH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_POSTURE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_WEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_AUTO_KERNING ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_UNDERLINE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_ESCAPEMENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_CASE_MAP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_SHADOWED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_STRIKEOUT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_CROSSED_OUT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_NO_HYPHENATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_AUTO_ESCAPEMENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_PROP_FONT_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_DIFF_FONT_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_ESCAPEMENT_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_COLOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_FLASH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_KERNING ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_LOCALE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_BACK_COLOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_TRANSPARENT_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_LINE_SPACING ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_TOP_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_BOTTOM_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_TOP_MARGIN_RELATIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_BOTTOM_MARGIN_RELATIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_EXPAND_SINGLE_WORD ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_END_NOTICE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_EMBEDDED_OBJECTS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ALPHABETICAL_SEPARATORS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BACKGROUND_COLOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BEGIN_NOTICE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CASE_SENSITIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FRAME_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_LEVEL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_START_VALUE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_IS_NUMBER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_COMBINE_ENTRIES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_COUNT_LINES_IN_FRAMES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DDE_COMMAND_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DDE_COMMAND_FILE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DDE_COMMAND_ELEMENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_AUTOMATIC_UPDATE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DEFAULT_TABSTOP_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DROP_CAP_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DROP_CAP_WHOLE_WORD ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DROP_CAP_CHAR_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FILE_LINK ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHICS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_PROTECTED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_KEY_AS_ENTRY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_KEEP_TOGETHER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_KEEP_TOGETHER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LANDSCAPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LINE_SEPARATOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_MARKS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBER_POSITION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_OUTLINES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PAGE_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PAGE_STYLE_LAYOUT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_ADJUST ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_REGISTER_MODE_ACTIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_LAST_LINE_ADJUST ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_LINE_NUMBER_COUNT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_LINE_NUMBER_START_VALUE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BACK_COLOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_BACK_COLOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_WIDOWS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_ORPHANS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_TRANSPARENT_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_POSITION_END_OF_DOC ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_POSITION_PROTECTED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ALTERNATIVE_TEXT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRIMARY_KEY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_TABLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_GRAPHICS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_REVERSED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_PROSPECT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_CONTROLS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_DRAWINGS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRING_RIGHT_PAGES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_BLACK_FONTS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINTER_PAPER_TRAY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_PAGE_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_ANNOTATION_MODE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REGISTER_MODE_ACTIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_RELATIVE_WIDTH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_RELATIVE_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REPEAT_HEADLINE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_BACKWARDS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_SIMILARITY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_IN_SELECTION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_CASE_SENSITIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_SIMILARITY_ADD ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_SIMILARITY_RELAX ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_SIMILARITY_REMOVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_REGULAR_EXPRESSION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_SIMILARITY_EXCHANGE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SECONDARY_KEY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEPARATOR_LINE_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_BREAKS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_SPACES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_TABLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_GRAPHICS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_DRAWINGS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_TABSTOPS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_VERT_RULER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_PARA_BREAKS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_HIDDEN_TEXT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_ANNOTATIONS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_SOFT_HYPHENS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_VERT_SCROLL_BAR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_HORI_SCROLL_BAR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_FIELD_COMMANDS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_TEXT_BOUNDARIES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_PROTECTED_SPACES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_TABLE_BOUNDARIES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_HIDDEN_PARAGRAPHS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_INDEX_MARK_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_FOOTNOTE_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_TEXT_FIELD_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SIZE_RELATIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SIZE_PROTECTED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SMOOTH_SCROLLING ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SOLID_MARK_HANDLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TABLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_FRAMES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_COLUMNS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TRANSPARENT_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_PP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USER_METRIC ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ANCHOR_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ANCHOR_TYPES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ANCHOR_PAGE_NO ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_AUTHOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BREAK_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAIN_NEXT_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAIN_PREV_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAPTER_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CLIENT_MAP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CONDITION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CONTENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_CONTOURED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CONTOUR_OUTSIDE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CONTENT_PROTECTED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_COUNT_EMPTY_LINES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DATA_BASE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DATA_TABLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DATA_COLUMN_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_DATA_BASE_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DATE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DATETIME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_DATE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_EDIT_IN_READONLY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FALSE_CONTENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FILE_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_FIXED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTNOTE_COUNTING ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FORMULA ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FRAME_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FULL_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_AUTO_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SIZE_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HINT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HORI_ORIENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HORI_MIRRORED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HORI_ORIENT_RELATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HORI_ORIENT_POSITION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HYPER_LINK_U_R_L ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HYPER_LINK_TARGET ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HYPER_LINK_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_INFO_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_INFO_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_INPUT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LEVEL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LINE_INTERVAL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LINK_REGION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_MACRO ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_MIRROR_PAGE_TOGGLE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SPLIT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_SPLIT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBER_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_RULES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_OFFSET ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ON ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_OPAQUE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PAGE_TOGGLE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PAGE_DESC_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PAGE_NUMBER_OFFSET ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PLACEHOLDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PLACEHOLDER_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PRINT_LEFT_PAGES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REFERENCE_FIELD_PART ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REFERENCE_FIELD_SOURCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REGISTER_PARAGRAPH_STYLE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SCRIPT_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_ALL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEARCH_WORDS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEQUENCE_VALUE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SERVER_MAP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SET_NUMBER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHADOW_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_HORI_RULER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SIZE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ACTUAL_SIZE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SOURCE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_START_AT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_STATISTIC_TYPE_ID ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SUB_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SURROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_EXPRESSION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_SHOW_FORMULA ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_WRAP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SURROUND_CONTOUR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SURROUND_ANCHORONLY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TABLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TABSTOPS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TITLE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TOP_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BOTTOM_MARGIN ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TRUE_CONTENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_URL_CONTENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USERTEXT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USER_DATA_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VALUE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VARIABLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VARIABLE_SUBTYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VERT_ORIENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VERT_MIRRORED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VERT_ORIENT_POSITION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VERT_ORIENT_RELATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_VISIBLE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_WIDTH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_WORD_MODE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_GRAPHIC_CROP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHARACTER_FORMAT_NONE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_POSITION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DOCUMENT_INDEX_MARK ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DOCUMENT_INDEX ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_FIELD ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BOOKMARK ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_TABLE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CELL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_FRAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REFERENCE_MARK ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_SECTION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTNOTE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ENDNOTE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHART_ROW_AS_LABEL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHART_COLUMN_AS_LABEL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TABLE_COLUMS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LEFT_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_RIGHT_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TOP_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BOTTOM_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BORDER_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LEFT_BORDER_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_RIGHT_BORDER_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TOP_BORDER_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_BOTTOM_BORDER_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TABLE_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TABLE_COLUMN_SEPARATORS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_TABLE_COLUMN_RELATIVE_SUM ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_TEXT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_TEXT_LEFT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_TEXT_RIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_TEXT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_TEXT_LEFT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_TEXT_RIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_BACK_COLOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_GRAPHIC ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_TRANSPARENT_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_LEFT_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_RIGHT_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_TOP_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_BOTTOM_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_BORDER_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_SHADOW_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_BODY_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_IS_DYNAMIC_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_SHARE_CONTENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADER_ON ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_BACK_COLOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_GRAPHIC ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_TRANSPARENT_BACKGROUND ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_LEFT_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_RIGHT_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_TOP_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_BOTTOM_BORDER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_BORDER_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_SHADOW_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_BODY_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_IS_DYNAMIC_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_SHARE_CONTENT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_HEIGHT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FOOTER_ON ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_OVERWRITE_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LOAD_NUMBERING_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LOAD_PAGE_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LOAD_FRAME_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LOAD_TEXT_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FILE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FILTER_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FILTER_OPTION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PASSWORD ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_COPY_COUNT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_COLLATE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SORT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PAGES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FIRST_LINE_OFFSET ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SYMBOL_TEXT_DISTANCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USER_INDEX_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REVISION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_UNVISITED_CHAR_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_VISITED_CHAR_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARAGRAPH_COUNT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_WORD_COUNT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_WORD_SEPARATOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHARACTER_COUNT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ZOOM_VALUE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ZOOM_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_MARKS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_OUTLINE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARAGRAPH_STYLE_NAMES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_CHAPTER ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_LABELS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_ALPHABETICAL_SEPARATORS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_KEY_AS_ENTRY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_COMBINED_ENTRIES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_CASE_SENSITIVE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_P_P ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_DASH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_UPPER_CASE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LABEL_CATEGORY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LABEL_DISPLAY_TYPE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USE_LEVEL_FROM_SOURCE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LEVEL_FORMAT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_LEVEL_PARAGRAPH_STYLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_RECALC_TAB_STOPS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_MAIN_ENTRY_CHARACTER_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_TABLES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_TEXT_FRAMES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_GRAPHIC_OBJECTS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_EMBEDDED_OBJECTS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_STAR_MATH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_STAR_IMAGE ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_STAR_CHART ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_STAR_CALC ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_STAR_DRAW ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CREATE_FROM_OTHER_EMBEDDED_OBJECTS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_INDEX_AUTO_MARK_FILE_U_R_L ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_COMMA_SEPARATED ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_CHANGES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_RECORD_CHANGES ; +extern const SwPropNameLen __FAR_DATA UNO_LINK_DISPLAY_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_LINK_DISPLAY_BITMAP ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_HEADING_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SHOW_ONLINE_LAYOUT ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_USER_DEFINED_ATTRIBUTES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_USER_DEFINED_ATTRIBUTES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAR_USER_DEFINED_ATTRIBUTES ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_FILE_PATH ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_PARA_CONDITIONAL_STYLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CHAPTER_NUMBERING_LEVEL ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_NUMBERING_SEPARATOR ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_CONTINUOUS_NUMBERING ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_AUTOMATIC ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_ABSOLUTE_MARGINS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CATEGORY ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DEPENDENT_TEXT_FIELDS ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CURRENT_PRESENTATION ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_ADJUST ; + +extern const SwPropNameLen __FAR_DATA UNO_NAME_TEXT_PORTION_TYPE; +extern const SwPropNameLen __FAR_DATA UNO_NAME_CONTROL_CHARACTER; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_COLLAPSED; +extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_START; +extern const SwPropNameLen __FAR_DATA UNO_NAME_SEQUENCE_NUMBER; +extern const SwPropNameLen __FAR_DATA UNO_NAME_REFERENCE_ID; +#endif + + diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx new file mode 100644 index 000000000000..deebd8f59cbb --- /dev/null +++ b/sw/inc/unosett.hxx @@ -0,0 +1,326 @@ +/************************************************************************* + * + * $RCSfile: unosett.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOSETT_HXX +#define _UNOSETT_HXX + +#include <swtypes.hxx> +#ifndef _CALBCK_HXX //autogen +#include <calbck.hxx> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTCOLUMNS_HPP_ +#include <com/sun/star/text/XTextColumns.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_ +#include <com/sun/star/container/XIndexReplace.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ +#include <com/sun/star/beans/PropertyValue.hpp> +#endif +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> // helper for implementations +#endif +#ifndef _STRING_HXX +#include <tools/string.hxx> +#endif + +class SwDoc; +class SwFmtCol; +class SwDocShell; +class SwNumRule; +struct SfxItemPropertyMap; + +/****************************************************************************** + * + ******************************************************************************/ +/* -----------------04.05.98 12:28------------------- + * + * --------------------------------------------------*/ +class SwXFootnoteProperties : public cppu::WeakAggImplHelper2 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo +> +{ + SwDoc* pDoc; + const SfxItemPropertyMap* _pMap; + +public: + SwXFootnoteProperties(SwDoc* pDoc); + virtual ~SwXFootnoteProperties(); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void Invalidate() {pDoc = 0;} +}; + +/* -----------------04.05.98 12:28------------------- + * + * --------------------------------------------------*/ +class SwXEndnoteProperties : public cppu::WeakAggImplHelper2 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo +> +{ + SwDoc* pDoc; + const SfxItemPropertyMap* _pMap; + +public: + SwXEndnoteProperties(SwDoc* pDoc); + virtual ~SwXEndnoteProperties(); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void Invalidate() {pDoc = 0;} +}; + +/* -----------------04.05.98 12:28------------------- + * + * --------------------------------------------------*/ +class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo +> +{ + SwDoc* pDoc; + const SfxItemPropertyMap* _pMap; +public: + SwXLineNumberingProperties(SwDoc* pDoc); + virtual ~SwXLineNumberingProperties(); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void Invalidate() {pDoc = 0;} +}; + +/* -----------------25.05.98 08:21------------------- + * + * --------------------------------------------------*/ +class SwXNumberingRules : public cppu::WeakAggImplHelper4 +< + ::com::sun::star::container::XIndexReplace, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient +{ + String sNewCharStyleNames[MAXLEVEL]; + String sNewBulletFontNames[MAXLEVEL]; + String sCreatedNumRuleName; //connects to a numbering in SwDoc + SwDoc* pDoc; // wird nur fuers anmelden gebraucht + SwDocShell* pDocShell; //nur, wenn als ChapterNumbering verwendet + SwNumRule* pNumRule; + const SfxItemPropertyMap* _pMap; + + static String sInvalidStyle; + +public: + SwXNumberingRules(); + SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering + SwXNumberingRules(const SwNumRule& rRule); // NumRule for paragraphs, numbering styles + SwXNumberingRules(SwDoc& rDoc); //create a new instance + SwXNumberingRules(SwDoc& rDoc, const String& rName); //XML import + virtual ~SwXNumberingRules(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & SwXNumberingRules::getUnoTunnelId(); + + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + + //XIndexReplace + virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getNumberingRuleByIndex(const SwNumRule& rNumRule, sal_Int32 nIndex)const; + void setNumberingRuleByIndex(SwNumRule& rNumRule, + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, sal_Int32 nIndex) + throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + const String* GetNewCharStyleNames() const {return sNewCharStyleNames;} + const String* GetBulletFontNames() const {return sNewBulletFontNames;} + const SwNumRule* GetNumRule() {return pNumRule;} + + static const String& GetInvalidStyle(); + void Invalidate() {pDocShell = 0;} +}; +/*-----------------12.02.98 08:27------------------- + +--------------------------------------------------*/ +class SwXChapterNumbering : public SwXNumberingRules +{ +public: + SwXChapterNumbering(SwDocShell& rDocSh); + virtual ~SwXChapterNumbering(); + + void Invalidate() {SwXNumberingRules::Invalidate();} + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + +}; + +/* -----------------27.05.98 15:44------------------- + * + * --------------------------------------------------*/ +class SwXTextColumns : public cppu::WeakAggImplHelper2 +< + ::com::sun::star::text::XTextColumns, + ::com::sun::star::lang::XServiceInfo +> +{ + sal_uInt32 nReference; + ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn> aTextColumns; + +public: + SwXTextColumns(const SwFmtCol& rFmtCol); + virtual ~SwXTextColumns(); + + //XTextColumns + virtual sal_Int32 SAL_CALL getReferenceValue( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Int16 SAL_CALL getColumnCount( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumnCount( sal_Int16 nColumns ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumns( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn >& Columns ) throw(::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; +#endif + + diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx new file mode 100644 index 000000000000..d45ca317c865 --- /dev/null +++ b/sw/inc/unosrch.hxx @@ -0,0 +1,171 @@ +/************************************************************************* + * + * $RCSfile: unosrch.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOSRCH_HXX +#define _UNOSRCH_HXX + +#ifndef _COM_SUN_STAR_UTIL_XPROPERTYREPLACE_HPP_ +#include <com/sun/star/util/XPropertyReplace.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> // helper for implementations +#endif +#ifndef _STRING_HXX +#include <tools/string.hxx> +#endif + +/****************************************************************************** + * + ******************************************************************************/ +struct SfxItemPropertyMap; +class SwXTextDocument; +class SwSearchProperties_Impl; +class SfxItemSet; +/*-----------------19.12.97 12:58------------------- + +--------------------------------------------------*/ +class SwXTextSearch : public cppu::WeakImplHelper3 +< + ::com::sun::star::util::XPropertyReplace, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel +> +{ + friend class SwXTextDocument; + + String sSearchText; + String sReplaceText; + + SwSearchProperties_Impl* pSearchProperties; + SwSearchProperties_Impl* pReplaceProperties; + + + const SfxItemPropertyMap* _pMap; + sal_Bool bAll : 1; + sal_Bool bWord : 1; + sal_Bool bBack : 1; + sal_Bool bExpr : 1; + sal_Bool bCase : 1; +// sal_Bool bInSel: 1; // wie geht Suchen in Selektionen? + sal_Bool bStyles:1; + sal_Bool bSimilarity : 1; + sal_Bool bLevRelax :1; + sal_Int16 nLevExchange; + sal_Int16 nLevAdd; + sal_Int16 nLevRemove; + + sal_Bool bIsValueSearch :1; + +public: + SwXTextSearch(); + virtual ~SwXTextSearch(); + + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XSearchDescriptor + virtual ::rtl::OUString SAL_CALL getSearchString( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSearchString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException); + + //XReplaceDescriptor + virtual ::rtl::OUString SAL_CALL getReplaceString(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setReplaceString(const ::rtl::OUString& aReplaceString) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertyReplace + virtual sal_Bool SAL_CALL getValueSearch(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setValueSearch(sal_Bool ValueSearch_) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getSearchAttributes(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setSearchAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getReplaceAttributes(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setReplaceAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void FillSearchItemSet(SfxItemSet& rSet) const; + void FillReplaceItemSet(SfxItemSet& rSet) const; + + sal_Bool HasSearchAttributes() const; + sal_Bool HasReplaceAttributes() const; + +}; + +#endif + diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx new file mode 100644 index 000000000000..8cc7da507600 --- /dev/null +++ b/sw/inc/unostyle.hxx @@ -0,0 +1,324 @@ +/************************************************************************* + * + * $RCSfile: unostyle.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOSTYLE_HXX +#define _UNOSTYLE_HXX + +#ifndef _SFXSTYLE_HXX //autogen +#include <svtools/style.hxx> +#endif +#ifndef _SFXLSTNER_HXX //autogen +#include <svtools/lstner.hxx> +#endif +#ifndef _UNOCOLL_HXX +#include <unocoll.hxx> +#endif +#ifndef _UNOMAP_HXX +#include <unomap.hxx> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLELOADER_HPP_ +#include <com/sun/star/style/XStyleLoader.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ +#include <com/sun/star/container/XNameContainer.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_ +#include <com/sun/star/beans/XPropertyState.hpp> +#endif +#ifndef _CPPUHELPER_IMPLBASE5_HXX_ +#include <cppuhelper/implbase5.hxx> // helper for implementations +#endif + +class SwDocShell; +struct SfxItemPropertyMap; +class SwXStyle; +class SwStyleProperties_Impl; +class SwStartNode; +/****************************************************************************** + * + ******************************************************************************/ +/*-----------------12.02.98 08:27------------------- + +--------------------------------------------------*/ +class SwXStyleFamilies : public cppu::WeakImplHelper4 +< + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::container::XNameAccess, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::style::XStyleLoader +>, + public SwUnoCollection +{ + SwDocShell* pDocShell; + + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxCharStyles; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxParaStyles; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxFrameStyles; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxPageStyles; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxNumberingStyles; + + sal_Bool bLoadStyleText : 1; + sal_Bool bLoadStyleFrame : 1; + sal_Bool bLoadStylePage : 1; + sal_Bool bLoadStyleOverwrite : 1; + sal_Bool bLoadStyleNumbering : 1; + +public: + SwXStyleFamilies(SwDocShell& rDocShell); + virtual ~SwXStyleFamilies(); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XStyleLoader + virtual void SAL_CALL loadStylesFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getStyleLoaderOptions(void) throw( ::com::sun::star::uno::RuntimeException ); + + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + static const String& GetProgrammaticName(const String& rUIName, SfxStyleFamily eFamily); + static const String& GetUIName(const String& rProgrammaticName, SfxStyleFamily eFamily); +}; + +/* -----------------26.05.98 10:56------------------- + * + * --------------------------------------------------*/ +class SwXStyleFamily : public cppu::WeakImplHelper3 +< + ::com::sun::star::container::XNameContainer, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::container::XIndexAccess +>, + public SfxListener +{ + SfxStyleFamily eFamily; // Familie + SfxStyleSheetBasePool* pBasePool; +// const SfxItemPropertyMap* _pPropMap; + SwDocShell* pDocShell; + + SwXStyle* _FindStyle(const String& rStyleName) const; +public: + SwXStyleFamily(SwDocShell* pDocShell, sal_uInt16 nFamily); + ~SwXStyleFamily(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + + //XNameContainer + virtual void SAL_CALL insertByName(const rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL replaceByName(const rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; +/* -----------------20.05.98 09:51------------------- + * + * --------------------------------------------------*/ +class SwXStyle : public cppu::WeakImplHelper5 +< + ::com::sun::star::style::XStyle, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::beans::XPropertyState +>, + public SfxListener +{ + friend class SwXStyleFamily; + SwDoc* m_pDoc; + String sStyleName; + SfxStyleSheetBasePool* pBasePool; + SfxStyleFamily eFamily; // fuer Notify + + sal_Bool bIsDescriptor : 1; + sal_Bool bIsConditional : 1; + String sParentStyleName; + SwStyleProperties_Impl* pPropImpl; + + void ApplyDescriptorProperties(); +protected: + void Invalidate(); + + const SfxStyleSheetBasePool* GetBasePool() const {return pBasePool;} + SfxStyleSheetBasePool* GetBasePool() {return pBasePool;} + + void SetStyleName(const String& rSet){ sStyleName = rSet;} +public: + SwXStyle(SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, BOOL bConditional = FALSE); + SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam, + SwDoc* pDoc, + const String& rStyleName);//, + //const SfxItemPropertyMap* _pMap); + ~SwXStyle(); + + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XStyle + virtual sal_Bool SAL_CALL isUserDefined(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL isInUse(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual rtl::OUString SAL_CALL getParentStyle(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setParentStyle(const rtl::OUString& aParentStyle) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + const String& GetStyleName() const { return sStyleName;} + SfxStyleFamily GetFamily() const {return eFamily;} + + sal_Bool IsDescriptor() const {return bIsDescriptor;} + sal_Bool IsConditional() const { return bIsConditional;} + const String& GetParentStyleName() const { return sParentStyleName;} + void SetDoc(SwDoc* pDc, SfxStyleSheetBasePool* pPool) + { + bIsDescriptor = sal_False; m_pDoc = pDc; + pBasePool = pPool; + StartListening(*pBasePool); + } +}; + +/* -----------------24.08.98 16:04------------------- + * + * --------------------------------------------------*/ +class SwXPageStyle : public SwXStyle +{ + SwDocShell* pDocShell; +public: + SwXPageStyle(SfxStyleSheetBasePool& rPool, SwDocShell* pDocSh, SfxStyleFamily eFam, + const String& rStyleName);//, + //const SfxItemPropertyMap* _pMap); + SwXPageStyle(SwDocShell* pDocSh); + ~SwXPageStyle(); + + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + const SwStartNode* GetStartNode(sal_Bool bHeader, sal_Bool bLeft); +}; +#endif + + diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx new file mode 100644 index 000000000000..01cb5461b56f --- /dev/null +++ b/sw/inc/unotbl.hxx @@ -0,0 +1,584 @@ +/************************************************************************* + * + * $RCSfile: unotbl.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _UNOTBL_HXX +#define _UNOTBL_HXX + +#ifndef _UNOOBJ_HXX +#include <unoobj.hxx> +#endif +#ifndef _COM_SUN_STAR_CHART_XCHARTDATA_HPP_ +#include <com/sun/star/chart/XChartData.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART_XCHARTDATAARRAY_HPP_ +#include <com/sun/star/chart/XChartDataArray.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTTABLECURSOR_HPP_ +#include <com/sun/star/text/XTextTableCursor.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTTABLE_HPP_ +#include <com/sun/star/text/XTextTable.hpp> +#endif +#ifndef _COM_SUN_STAR_TABLE_XCELLRANGE_HPP_ +#include <com/sun/star/table/XCellRange.hpp> +#endif +#ifndef _COM_SUN_STAR_TABLE_XAUTOFORMATTABLE_HPP_ +#include <com/sun/star/table/XAutoFormattable.hpp> +#endif + +#ifndef _CPPUHELPER_IMPLBASE9_HXX_ +#include <cppuhelper/implbase9.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE8_HXX_ +#include <cppuhelper/implbase8.hxx> // helper for implementations +#endif +#ifndef _CPPUHELPER_IMPLBASE5_HXX_ +#include <cppuhelper/implbase5.hxx> // helper for implementations +#endif + +class SwTableBoxFmt; +class SwTableLine; +class SwTableCursor; +class SwTableBoxFmt; +class SwTableLine; +class SwTableCursor; + +typedef +cppu::WeakImplHelper4 +< + ::com::sun::star::table::XCell, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::container::XEnumerationAccess +> +SwXCellBaseClass; +class SwXCell : public SwXCellBaseClass, + public SwXText, + public SwClient +{ + SfxItemPropertySet aPropSet; + const String sCellName; //kann auch leer sein! + SwTableBox* pBox; // only set in non-XML import + const SwStartNode* pStartNode; // only set in XML import + + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + +protected: + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor(); + sal_Bool IsValid(); +public: + SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, const String& rCellName); + SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode); // XML import interface + virtual ~SwXCell(); + + TYPEINFO(); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw(); + virtual void SAL_CALL release( ) throw(); + + //XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XCell + virtual ::rtl::OUString SAL_CALL getFormula( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw(::com::sun::star::uno::RuntimeException); + virtual double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::table::CellContentType SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getError( ) throw(::com::sun::star::uno::RuntimeException); + + //XText + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + //XEnumerationAccess - frueher XParagraphEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + const SwTableBox* GetTblBox()const {return pBox;} + static SwXCell* CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, const String* pCellName = 0); + static SwTableBox* FindBox(SwTable* pTable, SwTableBox* pBox); +}; +/* -----------------27.06.98 15:40------------------- + * + * --------------------------------------------------*/ +class SwXTextTableRow : public cppu::WeakImplHelper2 +< + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient +{ + SfxItemPropertySet aPropSet; + SwTableLine* pLine; + + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } +public: + SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLine); + virtual ~SwXTextTableRow(); + + TYPEINFO(); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + const SwTableLine* GetTblRow() const {return pLine;} + static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine); +}; +/* -----------------20.07.98 13:03------------------- + * + * --------------------------------------------------*/ +class SwXTextTableCursor : public cppu::WeakImplHelper3 +< + ::com::sun::star::text::XTextTableCursor, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::beans::XPropertySet +>, + public SwClient +{ + SwDepend aCrsrDepend; + SfxItemPropertySet aPropSet; + + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); } + +public: + SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox); + SwXTextTableCursor(SwFrmFmt& rTableFmt, + const SwTableCursor* pTableSelection); + virtual ~SwXTextTableCursor(); + + //XTextTableCursor + virtual ::rtl::OUString SAL_CALL getRangeName( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL gotoCellByName( const ::rtl::OUString& aCellName, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goUp( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goDown( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL mergeRange( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL splitRange( sal_Int16 Count, sal_Bool Horizontal ) throw(::com::sun::star::uno::RuntimeException); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; + +/*-----------------11.12.97 09:38------------------- + +--------------------------------------------------*/ +struct SwRangeDescriptor +{ + sal_uInt16 nTop; + sal_uInt16 nBottom; + sal_uInt16 nLeft; + sal_uInt16 nRight; +}; + +class SwTableProperties_Impl; +class SwXTextTable : public cppu::WeakImplHelper9 +< + ::com::sun::star::text::XTextTable, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::table::XCellRange, + ::com::sun::star::chart::XChartDataArray, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::container::XNamed, + ::com::sun::star::table::XAutoFormattable, + ::com::sun::star::util::XSortable, + ::com::sun::star::lang::XUnoTunnel +>, + public SwClient +{ + SwEventListenerContainer aLstnrCntnr; + SfxItemPropertySet aPropSet; + const SfxItemPropertyMap* _pMap; + SwSortOptions* pLastSortOptions; + + // Descriptor-interface + SwTableProperties_Impl* pTableProps; + String m_sTableName; + sal_Bool bIsDescriptor; + unsigned short nRows; + unsigned short nColumns; + + + sal_Bool bFirstRowAsLabel :1; + sal_Bool bFirstColumnAsLabel :1; + +public: + SwXTextTable(); + SwXTextTable(SwFrmFmt& rFrmFmt); + virtual ~SwXTextTable(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + TYPEINFO(); + + //XTextTable + virtual void SAL_CALL initialize( sal_Int32 nRows, sal_Int32 nColumns ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL getRows( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByName( const ::rtl::OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCellNames( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTableCursor > SAL_CALL createCursorByCellName( const ::rtl::OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException); + + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + + + //XCellRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) throw(::com::sun::star::uno::RuntimeException); + + //XChartDataArray + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException); + + //XChartData + virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException); + + //XSortable + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException ); + + //XAutoFormattable + virtual void SAL_CALL autoFormat(const rtl::OUString& aName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + + sal_uInt16 getRowCount(void); + sal_uInt16 getColumnCount(void); + ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable, + const String& sTLName, const String& sBRName, + SwRangeDescriptor& rDesc); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + + static SwXTextTable* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef ); +}; + +/* -----------------27.04.98 16:41------------------- + * + * --------------------------------------------------*/ +class SwXCellRange : public cppu::WeakImplHelper6 +< + ::com::sun::star::table::XCellRange, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::chart::XChartDataArray, + ::com::sun::star::util::XSortable +>, + public SwClient +{ + SwDepend aCursorDepend; //the cursor is removed after the doc has been removed + + SwRangeDescriptor aRgDesc; + SfxItemPropertySet aPropSet; + + SwUnoCrsr* pTblCrsr; + SwSortOptions* pLastSortOptions; + const SfxItemPropertyMap* _pMap; + + sal_Bool bFirstRowAsLabel :1; + sal_Bool bFirstColumnAsLabel :1; + +public: + SwXCellRange(); + SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt, SwRangeDescriptor& rDesc); + ~SwXCellRange(); + + TYPEINFO(); + + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + + //XCellRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) throw(::com::sun::star::uno::RuntimeException); + + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + //XChartData + virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException); + + //XChartDataArray + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException); + + //XSortable + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } + sal_uInt16 getRowCount(void); + sal_uInt16 getColumnCount(void); +}; +/* -----------------03.02.99 07:31------------------- + * + * --------------------------------------------------*/ +class SwXTableRows : public cppu::WeakImplHelper2 +< + ::com::sun::star::table::XTableRows, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient + +{ + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } +public: + SwXTableRows(SwFrmFmt& rFrmFmt); + virtual ~SwXTableRows(); + +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException ); + +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut ); + +// SMART_UNO_DECLARATION( SwXTableRows, UsrObject ); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XTableRows + virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; + +/* -----------------03.02.99 07:31------------------- + * + * --------------------------------------------------*/ +class SwXTableColumns : public cppu::WeakImplHelper2 +< + ::com::sun::star::table::XTableColumns, + ::com::sun::star::lang::XServiceInfo +>, + public SwClient + +{ + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } +public: + SwXTableColumns(SwFrmFmt& rFrmFmt); + virtual ~SwXTableColumns(); + +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException ); + +// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen! +// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut ); + +// SMART_UNO_DECLARATION( SwXTableColumns, UsrObject ); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + //XTableColumns + virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); + + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); +}; + +#endif + + + + diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx new file mode 100644 index 000000000000..7868ce7be81f --- /dev/null +++ b/sw/inc/usrfld.hxx @@ -0,0 +1,166 @@ +/************************************************************************* + * + * $RCSfile: usrfld.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _USRFLD_HXX +#define _USRFLD_HXX + +#include "fldbas.hxx" + +class SfxPoolItem; +class SwCalc; +class SwDoc; + +/*-------------------------------------------------------------------- + Beschreibung: Benutzerfelder + --------------------------------------------------------------------*/ + +class SwUserFieldType : public SwValueFieldType +{ + BOOL bValidValue : 1; + BOOL bDeleted : 1; + double nValue; + String aName; + String aContent; + USHORT nType; + +public: + SwUserFieldType( SwDoc* pDocPtr, const String& ); + + virtual const String& GetName() const; + virtual SwFieldType* Copy() const; + + String Expand(ULONG nFmt, USHORT nSubType, USHORT nLng); + + String GetContent( ULONG nFmt = 0 ); + void SetContent( const String& rStr, ULONG nFmt = 0 ); + void CtrlSetContent( const String& rStr ); + + inline BOOL IsValid() const; + inline void ChgValid( BOOL bNew ); + + virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); + + double GetValue(SwCalc& rCalc); // Member nValue neu berrechnen + inline double GetValue() const; + inline void SetValue(const double nVal); + + inline USHORT GetType() const; + inline void SetType(USHORT); + + BOOL IsDeleted() const { return bDeleted; } + void SetDeleted( BOOL b ) { bDeleted = b; } + + 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 SwUserFieldType::IsValid() const + { return bValidValue; } + +inline void SwUserFieldType::ChgValid( BOOL bNew ) + { bValidValue = bNew; } + +inline double SwUserFieldType::GetValue() const + { return nValue; } + +inline void SwUserFieldType::SetValue(const double nVal) + { nValue = nVal; } + +inline USHORT SwUserFieldType::GetType() const + { return nType; } + +inline void SwUserFieldType::SetType(USHORT nSub) +{ + nType = nSub; + EnableFormat(!(nSub & GSE_STRING)); +} + +/*-------------------------------------------------------------------- + Beschreibung: Benutzerfelder + --------------------------------------------------------------------*/ + +class SwUserField : public SwValueField +{ + USHORT nSubType; + +public: + SwUserField(SwUserFieldType*, USHORT nSub = 0, ULONG nFmt = 0); + + virtual USHORT GetSubType() const; + virtual void SetSubType(USHORT nSub); + + virtual double GetValue() const; + virtual void SetValue( const double& rVal ); + + virtual String Expand() const; + virtual SwField* Copy() const; + virtual String GetCntnt(BOOL bName = FALSE) const; + + // Name kann nicht geaendert werden + virtual const String& GetPar1() const; + + // Inhalt + 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 // _USRFLD_HXX diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx new file mode 100644 index 000000000000..73acc02a7090 --- /dev/null +++ b/sw/inc/viewopt.hxx @@ -0,0 +1,602 @@ +/************************************************************************* + * + * $RCSfile: viewopt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _VIEWOPT_HXX +#define _VIEWOPT_HXX + +#ifndef _GEN_HXX //autogen +#include <tools/gen.hxx> +#endif +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif +#ifndef _SV_COLOR_HXX //autogen +#include <vcl/color.hxx> +#endif +#include "authratr.hxx" + +class SwRect; +class Window; +class OutputDevice; +class ViewShell; +class SwDocShell; + +#define VIEWOPT_1_IDLE 0x00000001L +#define VIEWOPT_1_TAB 0x00000002L +#define VIEWOPT_1_BLANK 0x00000004L +#define VIEWOPT_1_HARDBLANK 0x00000008L +#define VIEWOPT_1_PARAGRAPH 0x00000010L +#define VIEWOPT_1_LINEBREAK 0x00000020L +#define VIEWOPT_1_PAGEBREAK 0x00000040L +#define VIEWOPT_1_COLUMNBREAK 0x00000080L +#define VIEWOPT_1_SOFTHYPH 0x00000100L +#define VIEWOPT_1_TOX 0x00000200L +#define VIEWOPT_1_REF 0x00000400L +#define VIEWOPT_1_FLDNAME 0x00000800L +#define VIEWOPT_1_FIELD 0x00001000L +#define VIEWOPT_1_FOOTNOTE 0x00002000L +#define VIEWOPT_1_POSTITS 0x00004000L +#define VIEWOPT_1_HIDDEN 0x00008000L +#define VIEWOPT_1_SUBSLINES 0x00010000L +#define VIEWOPT_1_GRAPHIC 0x00020000L +#define VIEWOPT_1_TABLE 0x00040000L +#define VIEWOPT_1_DRAW 0x00080000L +#define VIEWOPT_1_CONTROL 0x00100000L +#define VIEWOPT_1_SUBSTABLE 0x00200000L +#define VIEWOPT_1_CROSSHAIR 0x00400000L +#define VIEWOPT_1_SNAP 0x00800000L +#define VIEWOPT_1_SYNCHRONIZE 0x01000000L +#define VIEWOPT_1_GRIDVISIBLE 0x02000000L +#define VIEWOPT_1_ONLINESPELL 0x04000000L +#define VIEWOPT_1_HIDESPELL 0x08000000L +#define VIEWOPT_1_RESERVED1 0x10000000L +#define VIEWOPT_1_VIEWMETACHARS 0x20000000L +#define VIEWOPT_1_PAGEBACK 0x40000000L +#define VIEWOPT_1_SOLIDMARKHDL 0x80000000L + +#define VIEWOPT_CORE2_BLACKFONT 0x00000001L +#define VIEWOPT_CORE2_HIDDENPARA 0x00000002L +#define VIEWOPT_CORE2_SMOOTHSCROLL 0x00000004L +#define VIEWOPT_CORE2_CRSR_IN_PROT 0x00000008L +#define VIEWOPT_CORE2_SECTION_BOUNDS 0x00000010L +#define VIEWOPT_CORE2_INDEX_BACKGROUND 0x00000020L +#define VIEWOPT_CORE2_BIGMARKHDL 0x00000040L + +#define VIEWOPT_2_TOOLBOX 0x00000001L +#define VIEWOPT_2_TOOLBOXTEXT 0x00000002L +#define VIEWOPT_2_TOOLBOXBITMAP 0x00000004L +#define VIEWOPT_2_TOOLBOXBOTH 0x00000008L +#define VIEWOPT_2_TOOLBOXLEFT 0x00000010L +#define VIEWOPT_2_TOOLBOXRIGHT 0x00000020L +#define VIEWOPT_2_TOOLBOXTOP 0x00000040L +#define VIEWOPT_2_TOOLBOXBOTTOM 0x00000080L +#define VIEWOPT_2_UNUSED1 0x00000100L +#define VIEWOPT_2_RIBBONBAR 0x00000200L +#define VIEWOPT_2_TABWIN 0x00000400L +#define VIEWOPT_2_VSCROLLBAR 0x00000800L +#define VIEWOPT_2_HSCROLLBAR 0x00001000L +#define VIEWOPT_2_STATUSLINE 0x00002000L +#define VIEWOPT_2_VLIN 0x00004000L +#define VIEWOPT_2_SVLOOK 0x00008000L +#define VIEWOPT_2_MODIFIED 0x00010000L +#define VIEWOPT_2_KEEPASPECTRATIO 0x00020000L +#define VIEWOPT_2_GRFKEEPZOOM 0x00040000L +#define VIEWOPT_2_EXECHYPERLINKS 0x00080000L +#define VIEWOPT_2_RESERVED2 0x00100000L +#define VIEWOPT_2_RESERVED3 0x00200000L +#define VIEWOPT_2_RESERVED4 0x00400000L +#define VIEWOPT_2_PRTFORMAT 0x00800000L +#define VIEWOPT_2_SHADOWCRSR 0x01000000L + +//Tabellenhintergrund +#define TBL_DEST_CELL 0 +#define TBL_DEST_ROW 1 +#define TBL_DEST_TBL 2 + +// Implementierung in core/text/txtpaint.cxx +extern void SyncVout( const OutputDevice *pOut ); + +class SwViewOption +{ +protected: + static USHORT nPixelTwips;// 1 Pixel == ? Twips + + String sSymbolFont; // Symbolzeichensatz + UINT32 nCoreOptions; // Bits fuer die ViewShell + UINT32 nCore2Options; // Bits fuer die ViewShell + UINT32 nUIOptions; // UI-Bits + Color aRetoucheColor; // DefaultBackground fuer BrowseView + Color aShdwCrsrCol; // Farbe fuer den ShadowCrsr + Color aIdxBackgrndCol; // color of index background + Size aSnapSize; // Beschreibt hori. wie vert. Snap + short nDivisionX; // Rasterunterteilung + short nDivisionY; + BYTE nPagePrevRow; // Page Preview Row/Columns + BYTE nPagePrevCol; // Page Preview Row/Columns + BYTE nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr + BOOL bReadonly : 1; // Readonly-Doc + BOOL bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents) + + // Maszstab + USHORT nZoom; // Angaben in Prozent + BYTE eZoom; // 'enum' fuer Zoom + BYTE nTblDest; // Ziel fuer Tabellenhintergrund + +#ifndef PRODUCT + // korrespondieren zu den Angaben in ui/config/cfgvw.src + BOOL bTest1 :1; // Test-Flag "Layout not loading" + BOOL bTest2 :1; // Test-Flag "WYSIWYG++" + BOOL bTest3 :1; // Test-Flag "" + BOOL bTest4 :1; // Test-Flag "WYSIWYG debug" + BOOL bTest5 :1; // Test-Flag "No idle format" + BOOL bTest6 :1; // Test-Flag "No screen adj" + BOOL bTest7 :1; // Test-Flag "win format" + BOOL bTest8 :1; // Test-Flag "" + static BOOL bTest9; // Test-Flag "DrawingLayerNotLoading" + BOOL bTest10 :1; // Test-Flag "Format by Input" +#endif + +public: + SwViewOption(); // CTOR + SwViewOption(const SwViewOption&); // + ~SwViewOption(); // + + void Init( Window *pWin ); // Initialisierung der statischen Daten + + USHORT GetPixelTwips() const { return nPixelTwips; } + + inline UINT32 GetCoreOptions() const {return nCoreOptions;} + inline UINT32 GetUIOptions() const {return nUIOptions;} + inline void SetUIOptions( const SwViewOption& ); + +/*--------------------------------------------------------------------------- + Optionen aus nCoreOptions +----------------------------------------------------------------------------*/ + + inline BOOL IsIdle() const + { return nCoreOptions & VIEWOPT_1_IDLE ? TRUE : FALSE; } + inline void SetIdle( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_IDLE ) : ( nCoreOptions &= ~VIEWOPT_1_IDLE); } + + inline BOOL IsTab(BOOL bHard = FALSE) const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) && + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) + ? TRUE : FALSE; } + inline void SetTab( BOOL b ) { + (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); } + void PaintTab( OutputDevice *pOut, const SwRect &rRect ) const; + + + inline BOOL IsBlank(BOOL bHard = FALSE) const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) && + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) + ? TRUE : FALSE; } + inline void SetBlank( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); } + + inline BOOL IsHardBlank() const + { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? TRUE : FALSE; } + inline void SetHardBlank( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); } + + inline BOOL IsParagraph(BOOL bHard = FALSE) const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) && + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) + ? TRUE : FALSE; } + inline void SetParagraph( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); } + + inline BOOL IsLineBreak(BOOL bHard = FALSE) const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) && + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) + ? TRUE : FALSE; } + inline void SetLineBreak( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); } + void PaintLineBreak( OutputDevice *pOut, const SwRect &rRect ) const; + USHORT GetLineBreakWidth( const OutputDevice *pOut = 0 ) const; + + inline BOOL IsPageBreak() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_PAGEBREAK) ? TRUE : FALSE; } + inline void SetPageBreak( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); } + + inline BOOL IsColumnBreak() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_COLUMNBREAK) ? TRUE : FALSE; } + inline void SetColumnBreak( BOOL b) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); } + + inline BOOL IsSoftHyph() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? TRUE : FALSE; } + inline void SetSoftHyph( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); } + + inline BOOL IsTox() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_TOX) ? TRUE : FALSE; } + inline void SetTox( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TOX ) : ( nCoreOptions &= ~VIEWOPT_1_TOX); } + + inline BOOL IsRef() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_REF) ? TRUE : FALSE; } + inline void SetRef( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_REF ) : ( nCoreOptions &= ~VIEWOPT_1_REF); } + + inline BOOL IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? TRUE : FALSE; } + inline void SetFldName( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); } + + inline BOOL IsField() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_FIELD) ? TRUE : FALSE; } + inline void SetField( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FIELD ) : ( nCoreOptions &= ~VIEWOPT_1_FIELD); } + + inline BOOL IsFootNote() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_FOOTNOTE) ? TRUE : FALSE; } + inline void SetFootNote( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FOOTNOTE) : ( nCoreOptions &= ~VIEWOPT_1_FOOTNOTE); } + + inline BOOL IsPostIts() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_POSTITS) ? TRUE : FALSE; } + inline void SetPostIts( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); } + void PaintPostIts( OutputDevice *pOut, const SwRect &rRect, + long nCol ) const; + USHORT GetPostItsWidth( const OutputDevice *pOut = 0 ) const; + + inline BOOL IsHidden() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_HIDDEN) ? TRUE : FALSE; } + inline void SetHidden( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_HIDDEN); } + + inline BOOL IsSubsLines() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_SUBSLINES) ? TRUE : FALSE; } + inline void SetSubsLines( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SUBSLINES ) : ( nCoreOptions &= ~VIEWOPT_1_SUBSLINES); } + + inline BOOL IsGraphic() const + { return nCoreOptions & VIEWOPT_1_GRAPHIC ? TRUE : FALSE; } + inline void SetGraphic( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); } + + inline BOOL IsPageBack() const + { return nCoreOptions & VIEWOPT_1_PAGEBACK ? TRUE : FALSE; } + inline void SetPageBack( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); } + + inline BOOL IsSolidMarkHdl() const + { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? TRUE : FALSE; } + inline void SetSolidMarkHdl( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); } + + inline BOOL IsBigMarkHdl() const + { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? TRUE : FALSE;} + inline void SetBigMarkHdl(BOOL b) + { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);} + + inline BOOL IsTable() const + { return nCoreOptions & VIEWOPT_1_TABLE ? TRUE : FALSE; } + inline void SetTable( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); } + + inline BOOL IsDraw() const + { return nCoreOptions & VIEWOPT_1_DRAW ? TRUE : FALSE; } + inline void SetDraw( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); } + + inline BOOL IsControl() const + { return nCoreOptions & VIEWOPT_1_CONTROL ? TRUE : FALSE; } + inline void SetControl( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); } + + inline BOOL IsSubsTable() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_SUBSTABLE) ? TRUE : FALSE; } + inline void SetSubsTable( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SUBSTABLE ) : ( nCoreOptions &= ~VIEWOPT_1_SUBSTABLE); } + + inline BOOL IsSnap() const + { return nCoreOptions & VIEWOPT_1_SNAP ? TRUE : FALSE; } + inline void SetSnap( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); } + + inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; } + inline const Size &GetSnapSize() const { return aSnapSize; } + + inline BOOL IsGridVisible() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? TRUE : FALSE; } + inline void SetGridVisible( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); } + + inline BOOL IsOnlineSpell() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? TRUE : FALSE; } + inline void SetOnlineSpell( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); } + + inline BOOL IsHideSpell() const + { return nCoreOptions & VIEWOPT_1_HIDESPELL ? TRUE : FALSE; } + inline void SetHideSpell( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HIDESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_HIDESPELL); } + + inline BOOL IsViewMetaChars() const + { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? TRUE : FALSE; } + inline void SetViewMetaChars( BOOL b) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); } + + inline BOOL IsSynchronize() const + { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? TRUE : FALSE;} + inline void SetSynchronize( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); } + + inline BOOL IsCrossHair() const + { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? TRUE : FALSE; } + inline void SetCrossHair( BOOL b ) + { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); } + +/*--------------------------------------------------------------------------- + Optionen aus nCore2Options +----------------------------------------------------------------------------*/ + inline BOOL IsBlackFont() const + {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? TRUE : FALSE;} + + inline void SetBlackFont(BOOL b) + { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);} + + inline BOOL IsShowHiddenPara() const + {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? TRUE : FALSE;} + + inline void SetShowHiddenPara(BOOL b) + { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);} + + inline BOOL IsSmoothScroll() const + {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? TRUE : FALSE;} + + inline void SetSmoothScroll(BOOL b) + { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);} + + inline BOOL IsCursorInProtectedArea() const + {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? TRUE : FALSE;} + + inline void SetCursorInProtectedArea(BOOL b) + { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);} + + inline BOOL IsSectionBounds() const + {return !bReadonly && (nCore2Options & VIEWOPT_CORE2_SECTION_BOUNDS) ? TRUE : FALSE;} + + inline void SetSectionBounds(BOOL b) + { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SECTION_BOUNDS) : (nCore2Options &= ~VIEWOPT_CORE2_SECTION_BOUNDS);} + + inline BOOL IsIndexBackground() const + {return nCore2Options & VIEWOPT_CORE2_INDEX_BACKGROUND ? TRUE : FALSE;} + + inline void SetIndexBackground(BOOL b) + { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_INDEX_BACKGROUND) : (nCore2Options &= ~VIEWOPT_CORE2_INDEX_BACKGROUND);} + + + +/*--------------------------------------------------------------------------- + +----------------------------------------------------------------------------*/ + + + inline short GetDivisionX() const { return nDivisionX; } + inline void SetDivisionX( short n ){ nDivisionX = n; } + inline short GetDivisionY() const { return nDivisionY; } + inline void SetDivisionY( short n ){ nDivisionY = n; } + + inline BYTE GetPagePrevRow() const { return nPagePrevRow; } + inline void SetPagePrevRow( BYTE n ) { nPagePrevRow = n; } + inline BYTE GetPagePrevCol() const { return nPagePrevCol; } + inline void SetPagePrevCol( BYTE n ) { nPagePrevCol = n; } + BOOL IsReadonly() const { return bReadonly; } + void SetReadonly(BOOL bSet) { bReadonly = bSet; } + + BOOL IsAutoCompleteWords() const; + + +#ifndef PRODUCT + // korrespondieren zu den Angaben in ui/config/cfgvw.src + inline BOOL IsTest1() const { return bTest1; } + inline void SetTest1( BOOL b ) { bTest1 = b; } + inline BOOL IsTest2() const { return bTest2; } + inline void SetTest2( BOOL b ) { bTest2 = b; } + inline BOOL IsTest3() const { return bTest3; } + inline void SetTest3( BOOL b ) { bTest3 = b; } + inline BOOL IsTest4() const { return bTest4; } + inline void SetTest4( BOOL b ) { bTest4 = b; } + inline BOOL IsTest5() const { return bTest5; } + inline void SetTest5( BOOL b ) { bTest5 = b; } + inline BOOL IsTest6() const { return bTest6; } + inline void SetTest6( BOOL b ) { bTest6 = b; } + inline BOOL IsTest7() const { return bTest7; } + inline void SetTest7( BOOL b ) { bTest7 = b; } + inline BOOL IsTest8() const { return bTest8; } + inline void SetTest8( BOOL b ) { bTest8 = b; } + static inline BOOL IsTest9() { return bTest9; } + static inline void SetTest9( BOOL b ) { bTest9 = b; } + inline BOOL IsTest10() const { return bTest10; } + inline void SetTest10( BOOL b ) { bTest10 = b; } +#endif + + inline USHORT GetZoom() const { return nZoom; } + inline void SetZoom( USHORT n ){ nZoom = n; } + + void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const; + void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const; + + SwViewOption& operator=( const SwViewOption &rOpt ); + // Vergleichsmethoden + BOOL IsEqualFlags ( const SwViewOption &rOpt ) const; + inline BOOL operator==( const SwViewOption &rOpt ) const; + + +/*--------------------------------------------------------------------------- + Optionen aus nUIOptions +----------------------------------------------------------------------------*/ + + BOOL IsViewToolbox() const + { return nUIOptions & VIEWOPT_2_TOOLBOX ? TRUE : FALSE; } + BOOL IsViewRibbonBar() const + { return nUIOptions & VIEWOPT_2_RIBBONBAR ? TRUE : FALSE; } + BOOL IsViewVScrollBar() const + { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? TRUE : FALSE; } + BOOL IsViewHScrollBar() const + { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? TRUE : FALSE; } + BOOL IsViewSVLook() const + { return nUIOptions & VIEWOPT_2_SVLOOK ? TRUE : FALSE; } + BOOL IsKeepRatio() const + { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? TRUE : FALSE; } + BOOL IsGrfKeepZoom() const + { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? TRUE : FALSE; } + BOOL IsExecHyperlinks() const + { return nUIOptions & VIEWOPT_2_EXECHYPERLINKS ? TRUE : FALSE; } + BOOL IsPrtFormat() const + { return nUIOptions & VIEWOPT_2_PRTFORMAT ? TRUE : FALSE; } + + BYTE GetZoomType() const { return eZoom; } + + BYTE GetTblDest() const { return nTblDest; } + + void SetViewToolbox (BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_TOOLBOX ) : ( nUIOptions &= ~VIEWOPT_2_TOOLBOX); } + void SetViewRibbonBar (BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_RIBBONBAR ) : ( nUIOptions &= ~VIEWOPT_2_RIBBONBAR); } + void SetViewVScrollBar(BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); } + void SetViewHScrollBar(BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); } + void SetViewSVLook (BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_SVLOOK ) : ( nUIOptions &= ~VIEWOPT_2_SVLOOK); } + void SetKeepRatio (BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); } + void SetGrfKeepZoom (BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); } + void SetExecHyperlinks( BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_EXECHYPERLINKS) : (nUIOptions &= ~VIEWOPT_2_EXECHYPERLINKS); } + void SetPrtFormat( BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); } + + void SetZoomType (BYTE nZoom){ eZoom = nZoom; } + void SetTblDest( BYTE nNew ) { nTblDest = nNew; } + + const String& GetSymbolFont() const {return sSymbolFont;} + void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;} + + const Color& GetRetoucheColor() const { return aRetoucheColor;} + void SetRetoucheColor(const Color&r) { aRetoucheColor = r; } + + inline BOOL IsViewTabwin() const; + inline BOOL IsViewVLin() const; + inline void SetViewTabwin (BOOL b); + inline void SetViewVLin (BOOL b); + + // ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen + BOOL IsShadowCursor() const + { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? TRUE : FALSE; } + void SetShadowCursor(BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); } + + BOOL IsStarOneSetting() const {return bStarOneSetting; } + void SetStarOneSetting(BOOL bSet) {bStarOneSetting = bSet; } + + const Color& GetShdwCrsrColor() const { return aShdwCrsrCol; } + void SetShdwCrsrColor( const Color& rCol ) { aShdwCrsrCol = rCol; }; + + BYTE GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; } + void SetShdwCrsrFillMode( BYTE nMode ) { nShdwCrsrFillMode = nMode; }; + + const Color& GetIndexBackgrndColor() const { return aIdxBackgrndCol;} + void SetIndexBackgrndColor(const Color& rCol) {aIdxBackgrndCol = rCol;} +}; + + +inline BOOL SwViewOption::operator==( const SwViewOption &rOpt ) const +{ + return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom(); +} + +inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt ) +{ + nUIOptions = rVOpt.nUIOptions; + nTblDest = rVOpt.nTblDest; + nShdwCrsrFillMode = rVOpt.nShdwCrsrFillMode; + aShdwCrsrCol = rVOpt.aShdwCrsrCol; +} + +inline BOOL SwViewOption::IsViewTabwin() const +{ + return !bReadonly && (nUIOptions & VIEWOPT_2_TABWIN) ? TRUE : FALSE; +} + +inline BOOL SwViewOption::IsViewVLin() const +{ + return !bReadonly && (nUIOptions & VIEWOPT_2_VLIN) ? TRUE : FALSE; +} + +inline void SwViewOption::SetViewTabwin(BOOL b) +{ + b ? (nUIOptions |= VIEWOPT_2_TABWIN ) : ( nUIOptions &= ~VIEWOPT_2_TABWIN); +} + +inline void SwViewOption::SetViewVLin(BOOL b) +{ + b ? (nUIOptions |= VIEWOPT_2_VLIN ) : ( nUIOptions &= ~VIEWOPT_2_VLIN); +} + + +// Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten +USHORT GetHtmlMode(const SwDocShell*); + + +#endif diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx new file mode 100644 index 000000000000..afca768439d5 --- /dev/null +++ b/sw/inc/viewsh.hxx @@ -0,0 +1,490 @@ +/************************************************************************* + * + * $RCSfile: viewsh.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _VIEWSH_HXX +#define _VIEWSH_HXX + +#ifndef _RTTI_HXX //autogen +#include <tools/rtti.hxx> +#endif +#ifndef _SVARRAY_HXX //autogen +#include <svtools/svarray.hxx> +#endif + + +#include "swtypes.hxx" +#include "ring.hxx" +#include "swrect.hxx" +#include "errhdl.hxx" + +class SwDoc; +class SfxPrinter; +class SfxProgress; +class SwRootFrm; +class SwNodes; +class SdrView; +class SfxItemPool; +class SfxViewShell; + +#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLALTERNATIVES_HPP_ +#include <com/sun/star/linguistic/XSpellAlternatives.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_SPELLFAILURE_HPP_ +#include <com/sun/star/linguistic/SpellFailure.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_ +#include <com/sun/star/linguistic/XSpellChecker1.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XALTERNATIVESPELLING_HPP_ +#include <com/sun/star/linguistic/XAlternativeSpelling.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XPOSSIBLEHYPHENSSUPPLIER_HPP_ +#include <com/sun/star/linguistic/XPossibleHyphensSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HPP_ +#include <com/sun/star/linguistic/XHyphenator.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XPOSSIBLEHYPHENS_HPP_ +#include <com/sun/star/linguistic/XPossibleHyphens.hpp> +#endif +#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATEDWORD_HPP_ +#include <com/sun/star/linguistic/XHyphenatedWord.hpp> +#endif + + +class SwViewOption; +class SwViewImp; +class SwPrtOptions; +class SwPagePreViewPrtData; +class Window; +class OutputDevice; +class SwLayIdle; +struct ShellResource; +class SwRegionRects; +class SwFrm; + +//JP 19.07.98: - Bug 52312 +// define fuer Flags, die im CTOR oder den darunter liegenden Schichten +// benoetigt werden. +// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt +#define VSHELLFLAG_ISPREVIEW ((long)0x1) + +class ViewShell: public Ring +{ + friend void SetOutDev( ViewShell *pSh, OutputDevice *pOut ); + friend void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pOut, + Window *pWin, sal_uInt16 nZoom ); + + friend class SwViewImp; + friend class SwLayIdle; + + //Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert + //werden kann. + friend void SetSwVisArea( ViewShell *pSh, const SwRect & ); + + static sal_Bool bLstAct; // sal_True wenn Das EndAction der letzten Shell + // laeuft; also die EndActions der + // anderen Shells auf das Dokument + // abgearbeitet sind. + + SfxViewShell *pSfxViewShell; + SwViewImp *pImp; //Core-Interna der ViewShell. + //Der Pointer ist niemals 0. + + Window *pWin; //Ist 0, wenn gedruckt wird. + OutputDevice *pOut; //Fuer alle Ausgaben. Kann sein: + //Window, Printer, VirtDev, ... + OutputDevice *pRef; //Formatierreferenzdevice, soll zum + // Formatieren benutzt werden, wenn gesetzt (Prospekt+Seitenvorschaudruck) + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XSpellChecker1 > xSpell; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XHyphenator > xHyph; + SwViewOption *pOpt; + + Point aPrtOffst; //Ofst fuer den Printer, + //nicht bedruckbarer Rand. + + Size aBrowseBorder; //Rand fuer Framedokumente + SwRect aInvalidRect; + + sal_Bool bDocSizeChgd :1; //Fuer DocChgNotify(): Neue DocGroesse bei + //EndAction an das DocMDI melden. + sal_Bool bPaintWorks :1; //Normal Painten wenn sal_True, + //Paint merken wenn sal_False + sal_Bool bPaintInProgress :1; //Kein zweifaches Paint durchlassen. + sal_Bool bViewLocked :1; //Lockt den sichtbaren Bereich, + //MakeVisible laeuft dann in's leere. + sal_Bool bInEndAction :1; //Fiese unstaende vermeiden, siehe viewsh.cxx + sal_Bool bPreView :1; //Ist sal_True wenns eine PreView-ViewShell ist. + sal_Bool bFrameView :1; //sal_True wenn es ein (HTML-)Frame ist. + sal_Bool bEnableSmooth :1; //Disable des SmoothScroll z.B. fuer + //Drag der Scrollbars. + sal_Bool bEndActionByVirDev:1; //Paints aus der EndAction immer ueber virtuelles + //Device (etwa beim Browsen) + + //Initialisierung, wird von den verschiedenen Konstruktoren gerufen. + void Init( const SwViewOption *pNewOpt ); + + inline void ResetInvalidRect(); + + void SetSubsLines(); + + void Reformat(); //Invalidert das ges. Layout (ApplyViewOption) + + void PaintDesktop( const SwRect & ); // sammeln der Werte fuers + // Malen der Wiese und rufen + // PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt + void _PaintDesktop( const SwRegionRects &rRegion ); + + sal_Bool CheckInvalidForPaint( const SwRect & );//Direkt Paint oder lieber + //eine Aktion ausloesen. + + void Scroll(); //Scrollen wenn sich aus der LayAction Scrollmoeglichkeiten + //ergaben. + + void PrepareForPrint( const SwPrtOptions &rOptions ); + + void ImplApplyViewOptions( const SwViewOption &rOpt ); + +protected: + SwDoc *pDoc; //Das Dokument, niemals 0 + SwRect aVisArea; //Die moderne Ausfuerung der VisArea + static ShellResource* pShellRes; // Resourcen fuer die Shell + static Window* pCareWindow; // diesem Fenster ausweichen + + sal_uInt16 nStartAction; //ist != 0 wenn mindestens eine ::com::sun::star::chaos::Action laeuft + sal_uInt16 nLockPaint; //ist != 0 wenn das Paint gelocked ist. + +public: + TYPEINFO(); + + SwViewImp *Imp() { return pImp; } + const SwViewImp *Imp() const { return pImp; } + + const SwNodes& GetNodes() const; + + SfxPrinter* GetPrt( sal_Bool bCreate = sal_False ) const; + void InitPrt( SfxPrinter * ); //Nach Druckerwechsel, vom Doc + + //Klammerung von zusammengehoerenden Aktionen. + inline void StartAction(); + void ImplStartAction(); + inline void EndAction( const sal_Bool bIdleEnd = sal_False ); + void ImplEndAction( const sal_Bool bIdleEnd = sal_False ); + sal_uInt16 ActionCount() const { return nStartAction; } + sal_Bool ActionPend() const { return nStartAction != 0; } + sal_Bool IsInEndAction() const { return bInEndAction; } + + void SetEndActionByVirDev( sal_Bool b ) { bEndActionByVirDev = b; } + sal_Bool IsEndActionByVirDev() { return bEndActionByVirDev; } + + // Per UNO wird am RootFrame fuer alle shells der ActionCount kurzfristig + // auf Null gesetzt und wieder restauriert + void SetRestoreActions(sal_uInt16 nSet); + sal_uInt16 GetRestoreActions() const; + + inline sal_Bool HasInvalidRect() const { return aInvalidRect.HasArea(); } + void ChgHyphenation() { Reformat(); } + + //Methoden fuer Paint- und Scrollrects, die auf allen Shells im + //Ring arbeiten. + sal_Bool AddPaintRect( const SwRect &rRect ); + void AddScrollRect( const SwFrm *pFrm, const SwRect &rRect, long nOffs ); + void SetNoNextScroll(); + + void InvalidateWindows( const SwRect &rRect ); + virtual void Paint(const Rectangle &rRect); + sal_Bool IsPaintInProgress() const { return bPaintInProgress; } + + //Benachrichtung, dass sich der sichtbare Bereich geaendert hat. + //VisArea wird neu gesetzt, anschliessend wird gescrollt. + //Das uebergebene Rect liegt auf Pixelgrenzen, + //um Pixelfehler beim Scrollen zu vermeiden. + virtual void VisPortChgd( const SwRect & ); + sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser + void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; } + + const SwRect &VisArea() const { return aVisArea; } + //Es wird, wenn notwendig, soweit gescrollt, dass das + //uebergebene Rect im sichtbaren Ausschnitt liegt. + void MakeVisible( const SwRect & ); + + //Bei naechster Gelegenheit die neue Dokuemntgroesse an das UI weiterreichen. + void SizeChgNotify(const Size &); + void UISizeNotify(); //Das weiterreichen der aktuellen groesse. + + Point GetPagePos( sal_uInt16 nPageNum ) const; + + sal_uInt16 GetNumPages(); //Anzahl der aktuellen Seiten Layout erfragen. + + //Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring. + void SetFirstVisPageInvalid(); + + SwRootFrm *GetLayout() const; + sal_Bool IsNewLayout() const; //Wurde das Layout geladen oder neu + //erzeugt? + + Size GetDocSize() const;// erfrage die Groesse des Dokuments + + void CalcLayout(); //Durchformatierung des Layouts erzwingen. + + SwDoc *GetDoc() const { return pDoc; } //niemals 0. + + //'Drei' OutputDevices sind relevant: + //Der Drucker (am Dokument). Er bestimmt immer die FontMetriken. + //Das Window, gibt es nur wenn nicht gerade gedruckt wird. + //Das OutputDevice. Auf diesem Device finden grundstzlich alle + //Ausgaben statt. Der Pointer zeigt auf das Window, den Drucker oder + //auch mal ein VirtualDevice (z.B. Refresh der Scrollrects). + inline OutputDevice *GetOut() const { return pOut; } + inline Window *GetWin() const { return pWin; } + + inline OutputDevice *GetReferenzDevice() const { return pRef; } + inline void SetReferenzDevice( OutputDevice* pNew ) { pRef = pNew; } + static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; } + + // Setzt Drucker fuer ALLE Sichten im Ring; einschl. Invalidierungen + void SetPrt(SfxPrinter *); + + //Andern alle PageDescriptoren + void ChgAllPageOrientation( sal_uInt16 eOri ); + void ChgAllPageSize( Size &rSz ); + + //Druckauftrag abwickeln. + sal_Bool Prt( SwPrtOptions& rOptions, SfxProgress& rProgress ); + //"Drucken" fuer OLE 2.0 + static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, + OutputDevice* pOleOut, const Rectangle& rRect ); + + //Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten. + void CalcPagesForPrint( sal_uInt16 nMax, SfxProgress* pProgress = 0, + const String* pStr = NULL, sal_uInt32 nMergeAct = 0, sal_uInt32 nMergeCnt = 0 ); + + //All about fields. + void UpdateFlds(sal_Bool bCloseDB = sal_False); + sal_Bool IsAnyFieldInDoc() const; + // update all charts, for that exists any table + void UpdateAllCharts(); + sal_Bool HasCharts() const; + + // Sollen Absatzabstaende addiert oder maximiert werden? + sal_Bool IsParaSpaceMax() const; + sal_Bool IsParaSpaceMaxAtPages() const; + void SetParaSpaceMax( sal_Bool bNew, sal_Bool bAtPages ); + + //Ruft den Idle-Formatierer des Layouts + void LayoutIdle(); + + // Linguistik + inline ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XSpellChecker1 > + GetSpellChecker() const { return xSpell; } + inline ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic::XHyphenator > + GetHyphenator() const { return xHyph; } + + inline const SwViewOption *GetViewOptions() const { return pOpt; } + void ApplyViewOptions( const SwViewOption &rOpt ); + void SetUIOptions( const SwViewOption &rOpt ); + void SetReadonlyOption(sal_Bool bSet); // Readonly-Bit d. ViewOptions setzen + void SetPrtFormatOption(sal_Bool bSet); // PrtFormat-Bit d. ViewOptions setzen + + static void SetShellRes( ShellResource* pRes ) { pShellRes = pRes; } + static ShellResource* GetShellRes() { return pShellRes; } + + static void SetCareWin( Window* pNew ) { pCareWindow = pNew; } + static Window* GetCareWin() + { return pCareWindow ? pCareWindow : CareChildWin(); } + static Window* CareChildWin(); + + inline SfxViewShell *GetSfxViewShell() { return pSfxViewShell; } + inline void SetSfxViewShell(SfxViewShell *pNew) { pSfxViewShell = pNew; } + + // Selektion der Draw ::com::sun::star::script::Engine geaendert + virtual void DrawSelChanged(SdrView*); + + // SS fuer Seitenvorschau anzeigen + void PreViewPage( const Rectangle& rRect, sal_uInt16 nRowCol, + sal_uInt16 nSttPage, const Size& rPageSize ); + void RepaintCoreRect( const SwRect& rRect, sal_uInt16 nRowCol, + sal_uInt16 nSttPage, const Size& rPageSize ); + // und jetzt mal auf den Drucker + void PrintPreViewPage( SwPrtOptions& rOptions, sal_uInt16 nRowCol, + SfxProgress& rProgress, + const SwPagePreViewPrtData* = 0 ); + Size GetPagePreViewPrtMaxSize() const; + // errechnen & MapMode setzen + sal_uInt16 CalcPreViewPage( const Size& rWinWidth, sal_uInt16& nRowCol, + sal_uInt16 nSttPage, Size& rPageSize, + sal_uInt16& rVirtPageNo ); + sal_Bool IsPreViewDocPos( Point& rDocPt, sal_uInt16 nRowCol, sal_uInt16 nSttPage, + const Size& rMaxSize ); + + // Prospekt-Format drucken + void PrintProspect( SwPrtOptions&, SfxProgress& ); + + sal_Bool IsViewLocked() const { return bViewLocked; } + void LockView( sal_Bool b ) { bViewLocked = b; } + + inline void LockPaint(); + void ImplLockPaint(); + inline void UnlockPaint( sal_Bool bVirDev = sal_False ); + void ImplUnlockPaint( sal_Bool bVirDev ); + sal_Bool IsPaintLocked() const { return nLockPaint != 0; } + + // Abfragen/Erzeugen DrawView + PageView + const sal_Bool HasDrawView() const; + void MakeDrawView(); + + //DrawView darf u.U. am UI benutzt werden. + SdrView *GetDrawView(); + const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); } + + //sorge dafuer, das auf jedenfall die MarkListe aktuell ist (Bug 57153) + SdrView *GetDrawViewWithValidMarkList(); + + // erfrage den Attribut Pool + inline const SfxItemPool& GetAttrPool() const; + SfxItemPool& GetAttrPool(); + + sal_Bool IsPreView() const { return bPreView; } + + sal_Bool IsFrameView() const { return bFrameView; } + void SetFrameView( const Size& rBrowseBorder ) + { bFrameView = sal_True; aBrowseBorder = rBrowseBorder; } + + //Nimmt die notwendigen Invalidierungen vor, + //wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True + //oder, im BrowseModus, wenn sich die Groessenverhaeltnisse + //aendern (bBrowseChgd == sal_False) + void CheckBrowseView( FASTBOOL bBrowseChgd ); + + //Damit in der UI nicht ueberall das dochxx includet werden muss + sal_Bool IsBrowseMode() const; + + sal_Bool IsHeadInBrowse() const; + void SetHeadInBrowse( sal_Bool bOn = sal_True ); + sal_Bool IsFootInBrowse() const; + void SetFootInBrowse( sal_Bool bOn = sal_True ); + + const Size& GetBrowseBorder() const{ return aBrowseBorder; } + void SetBrowseBorder( const Size& rNew ); + + ViewShell( ViewShell*, Window *pWin = 0, OutputDevice *pOut = 0, + long nFlags = 0 ); + ViewShell( 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, + const SwViewOption *pOpt = 0, OutputDevice *pOut = 0, + long nFlags = 0 ); + virtual ~ViewShell(); + +}; + +//---- class CurrShell verwaltet den globalen ShellPointer ------------------- + +class CurrShell +{ +public: + ViewShell *pPrev; + SwRootFrm *pRoot; + + CurrShell( ViewShell *pNew ); + ~CurrShell(); +}; + +inline void ViewShell::ResetInvalidRect() +{ + aInvalidRect.Clear(); +} +inline void ViewShell::StartAction() +{ + if ( !nStartAction++ ) + ImplStartAction(); +} +inline void ViewShell::EndAction( const sal_Bool bIdleEnd ) +{ + if( 0 == (nStartAction - 1) ) + ImplEndAction( bIdleEnd ); + --nStartAction; +} + +inline void ViewShell::LockPaint() +{ + if ( !nLockPaint++ ) + ImplLockPaint(); +} +inline void ViewShell::UnlockPaint( sal_Bool bVirDev ) +{ + if ( 0 == --nLockPaint ) + ImplUnlockPaint( bVirDev ); +} +inline const SfxItemPool& ViewShell::GetAttrPool() const +{ + return ((ViewShell*)this)->GetAttrPool(); +} + + + +#endif //_VIEWSH_HXX diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx new file mode 100644 index 000000000000..688a5ac758a3 --- /dev/null +++ b/sw/inc/viscrs.hxx @@ -0,0 +1,249 @@ +/************************************************************************* + * + * $RCSfile: viscrs.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _VISCRS_HXX +#define _VISCRS_HXX + +#ifndef _CURSOR_HXX //autogen +#include <vcl/cursor.hxx> +#endif +#include "swcrsr.hxx" +#include "swrect.hxx" +#include "swregion.hxx" + +class SwCrsrShell; +class SwShellCrsr; +class Window; + + +// -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------ + +class SwVisCrsr +#ifdef SW_CRSR_TIMER + : private Timer +#endif +{ + friend void _InitCore(); + friend void _FinitCore(); + + BOOL bIsVisible : 1; + BOOL bIsDragCrsr : 1; + +#ifdef SW_CRSR_TIMER + BOOL bTimerOn : 1; +#endif + + Cursor aTxtCrsr; + const SwCrsrShell* pCrsrShell; + +#ifdef SW_CRSR_TIMER + virtual void Timeout(); +#endif + void _SetPosAndShow(); + +public: + SwVisCrsr( const SwCrsrShell * pCShell ); + ~SwVisCrsr(); + + void Show(); + void Hide(); + + FASTBOOL IsVisible() const { return bIsVisible; } + FASTBOOL IsDragCrsr() const { return bIsDragCrsr; } + void SetDragCrsr( BOOL bFlag = TRUE ) { bIsDragCrsr = bFlag; } + +#ifdef SW_CRSR_TIMER + FASTBOOL ChgTimerFlag( BOOL bTimerOn = TRUE ); +#endif +}; + + +// ------ Ab hier Klassen / Methoden fuer die Selectionen ------- + +class SwSelPaintRects : public SwRects +{ + friend void _InitCore(); + friend void _FinitCore(); + + static long nPixPtX, nPixPtY; + static MapMode *pMapMode; + + // die Shell + const SwCrsrShell* pCShell; + + void Paint( const SwRect& rRect ); + + virtual void Paint( const Rectangle& rRect ); + virtual void FillRects() = 0; + +public: + SwSelPaintRects( const SwCrsrShell& rCSh ); + ~SwSelPaintRects(); + + void Show(); + void Hide(); + void Invalidate( const SwRect& rRect ); + + const SwCrsrShell* GetShell() const { return pCShell; } + // check current MapMode of the shell and set possibly the static members. + // Optional set the parameters pX, pY + static void Get1PixelInLogic( const ViewShell& rSh, + long* pX = 0, long* pY = 0 ); +}; + + +class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects +{ + // Dokument-Positionen der Start/End-Charakter einer SSelection + Point aMkPt, aPtPt; + const SwPosition* pPt; // fuer Zuordung vom GetPoint() zum aPtPt + + virtual void FillRects(); // fuer Table- und normalen Crsr + +public: + SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos ); + SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos, + const Point& rPtPos, SwPaM* pRing = 0 ); + SwShellCrsr( SwShellCrsr& ); + virtual ~SwShellCrsr(); + + virtual operator SwShellCrsr* (); + + void Show(); // Update und zeige alle Selektionen an + void Hide(); // verstecke alle Selektionen + void Invalidate( const SwRect& rRect ); + + const Point& GetPtPos() const { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); } + Point& GetPtPos() { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); } + const Point& GetMkPos() const { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); } + Point& GetMkPos() { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); } + const Point& GetSttPos() const { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); } + Point& GetSttPos() { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); } + const Point& GetEndPos() const { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); } + Point& GetEndPos() { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); } + + virtual void SetMark(); + + virtual SwCursor* Create( SwPaM* pRing = 0 ) const; + + virtual FASTBOOL MaxReplaceArived(); + virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); + + FASTBOOL UpDown( BOOL bUp, USHORT nCnt = 1 ); + + // TRUE: an die Position kann der Cursor gesetzt werden + virtual FASTBOOL IsAtValidPos( BOOL bPoint = TRUE ) const; + +#ifndef PRODUCT +// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung +// am sichtbaren Cursor + virtual FASTBOOL IsSelOvr( int eFlags = + ( SELOVER_CHECKNODESSECTION | + SELOVER_TOGGLE | SELOVER_CHANGEPOS )); +#endif + + DECL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr ) +}; + + + +class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor +{ + // die Selection hat die gleiche Reihenfolge wie die + // TabellenBoxen. D.h., wird aus dem einen Array an einer Position + // etwas geloescht, dann muss es auch im anderen erfolgen!! + + +public: + SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos ); + SwShellTableCrsr( const SwCrsrShell& rCrsrSh, + const SwPosition &rMkPos, const Point& rMkPt, + const SwPosition &rPtPos, const Point& rPtPt ); + virtual ~SwShellTableCrsr(); + + virtual operator SwShellTableCrsr* (); + + virtual void FillRects(); // fuer Table- und normalen Crsr + + // Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet + FASTBOOL IsInside( const Point& rPt ) const; + + virtual void SetMark(); + virtual SwCursor* Create( SwPaM* pRing = 0 ) const; + virtual operator SwShellCrsr* (); + virtual operator SwTableCursor* (); + virtual FASTBOOL MaxReplaceArived(); + virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); + + // TRUE: an die Position kann der Cursor gesetzt werden + virtual FASTBOOL IsAtValidPos( BOOL bPoint = TRUE ) const; + +#ifndef PRODUCT +// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung +// am sichtbaren Cursor + virtual FASTBOOL IsSelOvr( int eFlags = + ( SELOVER_CHECKNODESSECTION | + SELOVER_TOGGLE | SELOVER_CHANGEPOS )); +#endif +}; + + + +#endif // _VISCRS_HXX diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx new file mode 100644 index 000000000000..5c53b9f7917f --- /dev/null +++ b/sw/inc/wdocsh.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * $RCSfile: wdocsh.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:29 $ + * + * 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 _SWWDOCSH_HXX +#define _SWWDOCSH_HXX + +#include "docsh.hxx" +#ifndef SW_SWDLL_HXX +#include <swdll.hxx> +#endif + +class SwWebDocShell: public SwDocShell +{ + USHORT nSourcePara; // aktive Zeile in der SourceView +public: + + // aber selbst implementieren + SFX_DECL_INTERFACE(SW_WEBDOCSHELL); + SFX_DECL_OBJECTFACTORY_DLL(SwWebDocShell, SW_DLL()); + TYPEINFO(); + + SwWebDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED); + ~SwWebDocShell(); + + // 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; + USHORT GetSourcePara()const + {return nSourcePara;} + void SetSourcePara(USHORT nSet) + {nSourcePara = nSet;} +}; + +#endif + + |