1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _HINTS_HXX 24cdf0e10cSrcweir #define _HINTS_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef _TABLE_HXX //autogen 27cdf0e10cSrcweir #include <tools/table.hxx> 28cdf0e10cSrcweir #endif 29cdf0e10cSrcweir #include <swatrset.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir class SwFmt; 32cdf0e10cSrcweir class OutputDevice; 33cdf0e10cSrcweir class SwTable; 34cdf0e10cSrcweir class SwNode; 35cdf0e10cSrcweir class SwNodes; 36cdf0e10cSrcweir class SwCntntNode; 37cdf0e10cSrcweir class SwPageFrm; 38cdf0e10cSrcweir class SwFrm; 39cdf0e10cSrcweir class SwTxtNode; 40cdf0e10cSrcweir class SwHistory; 41cdf0e10cSrcweir 42cdf0e10cSrcweir // Basis-Klasse fuer alle Message-Hints: 43cdf0e10cSrcweir // "Overhead" vom SfxPoolItem wird hier behandelt 44cdf0e10cSrcweir class SwMsgPoolItem : public SfxPoolItem 45cdf0e10cSrcweir { 46cdf0e10cSrcweir public: 47cdf0e10cSrcweir SwMsgPoolItem( sal_uInt16 nWhich ); 48cdf0e10cSrcweir 49cdf0e10cSrcweir // "Overhead" vom SfxPoolItem 50cdf0e10cSrcweir virtual int operator==( const SfxPoolItem& ) const; 51cdf0e10cSrcweir virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; 52cdf0e10cSrcweir }; 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir // --------------------------------------- 56cdf0e10cSrcweir // SwPtrMsgPoolItem (altes SwObjectDying!) 57cdf0e10cSrcweir // --------------------------------------- 58cdf0e10cSrcweir 59cdf0e10cSrcweir class SwPtrMsgPoolItem : public SwMsgPoolItem 60cdf0e10cSrcweir { 61cdf0e10cSrcweir public: 62cdf0e10cSrcweir void * pObject; 63cdf0e10cSrcweir 64cdf0e10cSrcweir SwPtrMsgPoolItem( sal_uInt16 nId, void * pObj ) 65cdf0e10cSrcweir : SwMsgPoolItem( nId ), pObject( pObj ) 66cdf0e10cSrcweir {} 67cdf0e10cSrcweir }; 68cdf0e10cSrcweir 69cdf0e10cSrcweir 70cdf0e10cSrcweir 71cdf0e10cSrcweir /* 72cdf0e10cSrcweir * SwFmtChg wird verschickt, wenn ein Format gegen ein anderes 73cdf0e10cSrcweir * Format ausgewechselt worden ist. Es werden immer 2. Hints verschickt, 74cdf0e10cSrcweir * das alte und neue Format. 75cdf0e10cSrcweir */ 76cdf0e10cSrcweir class SwFmtChg: public SwMsgPoolItem 77cdf0e10cSrcweir { 78cdf0e10cSrcweir public: 79cdf0e10cSrcweir SwFmt *pChangedFmt; 80cdf0e10cSrcweir SwFmtChg( SwFmt *pFmt ); 81cdf0e10cSrcweir }; 82cdf0e10cSrcweir 83cdf0e10cSrcweir 84cdf0e10cSrcweir class SwInsTxt: public SwMsgPoolItem 85cdf0e10cSrcweir { 86cdf0e10cSrcweir public: 87cdf0e10cSrcweir xub_StrLen nPos; 88cdf0e10cSrcweir xub_StrLen nLen; 89cdf0e10cSrcweir 90cdf0e10cSrcweir SwInsTxt( xub_StrLen nP, xub_StrLen nL ); 91cdf0e10cSrcweir }; 92cdf0e10cSrcweir 93cdf0e10cSrcweir class SwDelChr: public SwMsgPoolItem 94cdf0e10cSrcweir { 95cdf0e10cSrcweir public: 96cdf0e10cSrcweir xub_StrLen nPos; 97cdf0e10cSrcweir 98cdf0e10cSrcweir SwDelChr( xub_StrLen nP ); 99cdf0e10cSrcweir }; 100cdf0e10cSrcweir 101cdf0e10cSrcweir class SwDelTxt: public SwMsgPoolItem 102cdf0e10cSrcweir { 103cdf0e10cSrcweir public: 104cdf0e10cSrcweir xub_StrLen nStart; 105cdf0e10cSrcweir xub_StrLen nLen; 106cdf0e10cSrcweir 107cdf0e10cSrcweir SwDelTxt( xub_StrLen nS, xub_StrLen nL ); 108cdf0e10cSrcweir }; 109cdf0e10cSrcweir 110cdf0e10cSrcweir class SwUpdateAttr: public SwMsgPoolItem 111cdf0e10cSrcweir { 112cdf0e10cSrcweir public: 113cdf0e10cSrcweir xub_StrLen nStart; 114cdf0e10cSrcweir xub_StrLen nEnd; 115cdf0e10cSrcweir sal_uInt16 nWhichAttr; 116cdf0e10cSrcweir SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW ); 117cdf0e10cSrcweir }; 118cdf0e10cSrcweir 119cdf0e10cSrcweir 120cdf0e10cSrcweir // SwRefMarkFldUpdate wird verschickt, wenn sich die ReferenzMarkierungen 121cdf0e10cSrcweir // Updaten sollen. Um Seiten-/KapitelNummer feststellen zu koennen, muss 122cdf0e10cSrcweir // der akt. Frame befragt werden. Dafuer wird das akt. OutputDevice benoetigt. 123cdf0e10cSrcweir class SwRefMarkFldUpdate : public SwMsgPoolItem 124cdf0e10cSrcweir { 125cdf0e10cSrcweir public: 126cdf0e10cSrcweir const OutputDevice* pOut; // Pointer auf das aktuelle Output-Device 127cdf0e10cSrcweir SwRefMarkFldUpdate( const OutputDevice* ); 128cdf0e10cSrcweir }; 129cdf0e10cSrcweir 130cdf0e10cSrcweir // SwDocPosUpdate wird verschickt, um zu signalisieren, dass nur die 131cdf0e10cSrcweir // Frames ab oder bis zu einer bestimmten dokument-globalen Position 132cdf0e10cSrcweir // geupdated werden brauchen. Zur Zeit wird dies nur beim Updaten 133cdf0e10cSrcweir // von Seitennummernfeldern benoetigt. 134cdf0e10cSrcweir 135cdf0e10cSrcweir class SwDocPosUpdate : public SwMsgPoolItem 136cdf0e10cSrcweir { 137cdf0e10cSrcweir public: 138cdf0e10cSrcweir const long nDocPos; 139cdf0e10cSrcweir SwDocPosUpdate( const long nDocPos ); 140cdf0e10cSrcweir }; 141cdf0e10cSrcweir 142cdf0e10cSrcweir // SwTableFmlUpdate wird verschickt, wenn sich die Tabelle neu berechnen soll 143cdf0e10cSrcweir // JP 16.02.99: oder wenn die Tabelle selbst gemergt oder gesplittet wird 144cdf0e10cSrcweir enum TableFmlUpdtFlags { TBL_CALC = 0, 145cdf0e10cSrcweir TBL_BOXNAME, 146cdf0e10cSrcweir TBL_BOXPTR, 147cdf0e10cSrcweir TBL_RELBOXNAME, 148cdf0e10cSrcweir TBL_MERGETBL, 149cdf0e10cSrcweir TBL_SPLITTBL 150cdf0e10cSrcweir }; 151cdf0e10cSrcweir class SwTableFmlUpdate : public SwMsgPoolItem 152cdf0e10cSrcweir { 153cdf0e10cSrcweir public: 154cdf0e10cSrcweir const SwTable* pTbl; // Pointer auf die zu aktuelle Tabelle 155cdf0e10cSrcweir union { 156cdf0e10cSrcweir const SwTable* pDelTbl; // Merge: Ptr auf die zu loeschende Tabelle 157cdf0e10cSrcweir const String* pNewTblNm; // Split: der Name der neuen Tabelle 158cdf0e10cSrcweir } DATA; 159cdf0e10cSrcweir SwHistory* pHistory; 160cdf0e10cSrcweir sal_uInt16 nSplitLine; // Split: ab dieser BaseLine wird gespl. 161cdf0e10cSrcweir TableFmlUpdtFlags eFlags; 162cdf0e10cSrcweir sal_Bool bModified : 1; 163cdf0e10cSrcweir sal_Bool bBehindSplitLine : 1; 164cdf0e10cSrcweir 165cdf0e10cSrcweir SwTableFmlUpdate( const SwTable* ); 166cdf0e10cSrcweir }; 167cdf0e10cSrcweir 168cdf0e10cSrcweir 169cdf0e10cSrcweir class SwAutoFmtGetDocNode: public SwMsgPoolItem 170cdf0e10cSrcweir { 171cdf0e10cSrcweir public: 172cdf0e10cSrcweir const SwCntntNode* pCntntNode; 173cdf0e10cSrcweir const SwNodes* pNodes; 174cdf0e10cSrcweir 175cdf0e10cSrcweir SwAutoFmtGetDocNode( const SwNodes* pNds ); 176cdf0e10cSrcweir }; 177cdf0e10cSrcweir 178cdf0e10cSrcweir /* 179cdf0e10cSrcweir * SwAttrSetChg wird verschicht, wenn sich in dem SwAttrSet rTheChgdSet 180cdf0e10cSrcweir * etwas veraendert hat. Es werden immer 2. Hints 181cdf0e10cSrcweir * verschickt, die alten und neuen Items in dem rTheChgdSet. 182cdf0e10cSrcweir */ 183cdf0e10cSrcweir class SwAttrSetChg: public SwMsgPoolItem 184cdf0e10cSrcweir { 185cdf0e10cSrcweir sal_Bool bDelSet; 186cdf0e10cSrcweir SwAttrSet* pChgSet; // was sich veraendert hat 187cdf0e10cSrcweir const SwAttrSet* pTheChgdSet; // wird nur zum Vergleichen gebraucht !! 188cdf0e10cSrcweir public: 189cdf0e10cSrcweir SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet ); 190cdf0e10cSrcweir SwAttrSetChg( const SwAttrSetChg& ); 191cdf0e10cSrcweir ~SwAttrSetChg(); 192cdf0e10cSrcweir 193cdf0e10cSrcweir // was sich veraendert hat 194cdf0e10cSrcweir const SwAttrSet* GetChgSet() const { return pChgSet; } 195cdf0e10cSrcweir SwAttrSet* GetChgSet() { return pChgSet; } 196cdf0e10cSrcweir 197cdf0e10cSrcweir // wo es sich geaendert hat 198cdf0e10cSrcweir const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; } 199cdf0e10cSrcweir 200cdf0e10cSrcweir sal_uInt16 Count() const { return pChgSet->Count(); } 201cdf0e10cSrcweir void ClearItem( sal_uInt16 nWhichL = 0 ) 202cdf0e10cSrcweir #ifndef DBG_UTIL 203cdf0e10cSrcweir { pChgSet->ClearItem( nWhichL ); } 204cdf0e10cSrcweir #else 205cdf0e10cSrcweir ; 206cdf0e10cSrcweir #endif 207cdf0e10cSrcweir }; 208cdf0e10cSrcweir 209cdf0e10cSrcweir class SwCondCollCondChg: public SwMsgPoolItem 210cdf0e10cSrcweir { 211cdf0e10cSrcweir public: 212cdf0e10cSrcweir SwFmt *pChangedFmt; 213cdf0e10cSrcweir SwCondCollCondChg( SwFmt *pFmt ); 214cdf0e10cSrcweir }; 215cdf0e10cSrcweir 216cdf0e10cSrcweir class SwVirtPageNumInfo: public SwMsgPoolItem 217cdf0e10cSrcweir { 218cdf0e10cSrcweir const SwPageFrm *pPage; 219cdf0e10cSrcweir const SwPageFrm *pOrigPage; 220cdf0e10cSrcweir const SwFrm *pFrm; //An einem Absatz/Tabelle koennen mehrere 221cdf0e10cSrcweir //Attribute sitzen. Der Frame muss dann 222cdf0e10cSrcweir //muss dann letztlich bei bestimmen 223cdf0e10cSrcweir //welches Attribut gilt und um welche physikalische 224cdf0e10cSrcweir //Seite es sich handelt. 225cdf0e10cSrcweir public: 226cdf0e10cSrcweir SwVirtPageNumInfo( const SwPageFrm *pPg ); 227cdf0e10cSrcweir 228cdf0e10cSrcweir const SwPageFrm *GetPage() { return pPage; } 229cdf0e10cSrcweir const SwPageFrm *GetOrigPage() { return pOrigPage;} 230cdf0e10cSrcweir const SwFrm *GetFrm() { return pFrm; } 231cdf0e10cSrcweir void SetInfo( const SwPageFrm *pPg, 232cdf0e10cSrcweir const SwFrm *pF ) { pFrm = pF, pPage = pPg; } 233cdf0e10cSrcweir }; 234cdf0e10cSrcweir 235cdf0e10cSrcweir 236cdf0e10cSrcweir // --> OD 2008-02-19 #refactorlists# 237cdf0e10cSrcweir //DECLARE_TABLE( SwTxtNodeTable, SwTxtNode* ) 238cdf0e10cSrcweir 239cdf0e10cSrcweir //class SwNumRuleInfo : public SwMsgPoolItem 240cdf0e10cSrcweir //{ 241cdf0e10cSrcweir // SwTxtNodeTable aList; 242cdf0e10cSrcweir // const String& rName; 243cdf0e10cSrcweir //public: 244cdf0e10cSrcweir // SwNumRuleInfo( const String& rRuleName ); 245cdf0e10cSrcweir 246cdf0e10cSrcweir // const String& GetName() const { return rName; } 247cdf0e10cSrcweir // void AddNode( SwTxtNode& rNd ); 248cdf0e10cSrcweir 249cdf0e10cSrcweir // // erzeuge die Liste aller Nodes der NumRule in dem angegebenem Doc 250cdf0e10cSrcweir // // Der Code steht im docnum.cxx 251cdf0e10cSrcweir // // #111955# 252cdf0e10cSrcweir // void MakeList( SwDoc& rDoc, sal_Bool bOutline = sal_False ); 253cdf0e10cSrcweir 254cdf0e10cSrcweir // const SwTxtNodeTable& GetTxtNodeList() const { return aList; } 255cdf0e10cSrcweir //}; 256cdf0e10cSrcweir // <-- 257cdf0e10cSrcweir 258cdf0e10cSrcweir class SwFindNearestNode : public SwMsgPoolItem 259cdf0e10cSrcweir { 260cdf0e10cSrcweir const SwNode *pNd, *pFnd; 261cdf0e10cSrcweir public: 262cdf0e10cSrcweir SwFindNearestNode( const SwNode& rNd ); 263cdf0e10cSrcweir void CheckNode( const SwNode& rNd ); 264cdf0e10cSrcweir 265cdf0e10cSrcweir const SwNode* GetFoundNode() const { return pFnd; } 266cdf0e10cSrcweir }; 267cdf0e10cSrcweir 268cdf0e10cSrcweir class SwStringMsgPoolItem : public SwMsgPoolItem 269cdf0e10cSrcweir { 270cdf0e10cSrcweir String sStr; 271cdf0e10cSrcweir public: 272cdf0e10cSrcweir 273cdf0e10cSrcweir const String& GetString() const { return sStr; } 274cdf0e10cSrcweir 275cdf0e10cSrcweir SwStringMsgPoolItem( sal_uInt16 nId, const String& rStr ) 276cdf0e10cSrcweir : SwMsgPoolItem( nId ), sStr( rStr ) 277cdf0e10cSrcweir {} 278cdf0e10cSrcweir }; 279cdf0e10cSrcweir 280cdf0e10cSrcweir #endif 281