11d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 31d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 41d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 51d2dbeb0SAndrew Rist * distributed with this work for additional information 61d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 71d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 81d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 91d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 101d2dbeb0SAndrew Rist * 111d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 121d2dbeb0SAndrew Rist * 131d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 141d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 151d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 161d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 171d2dbeb0SAndrew Rist * specific language governing permissions and limitations 181d2dbeb0SAndrew Rist * under the License. 191d2dbeb0SAndrew Rist * 201d2dbeb0SAndrew Rist *************************************************************/ 211d2dbeb0SAndrew Rist 221d2dbeb0SAndrew 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 SwPtrMsgPoolItem(sal_uInt16 nId,void * pObj)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 110*56b35d86SArmin Le Grand class SwUpdateAttr : public SwMsgPoolItem 111cdf0e10cSrcweir { 112*56b35d86SArmin Le Grand private: 113*56b35d86SArmin Le Grand xub_StrLen nStart; 114*56b35d86SArmin Le Grand xub_StrLen nEnd; 115*56b35d86SArmin Le Grand sal_uInt16 nWhichAttr; 116*56b35d86SArmin Le Grand 117cdf0e10cSrcweir public: 118*56b35d86SArmin Le Grand SwUpdateAttr( 119*56b35d86SArmin Le Grand xub_StrLen nS, 120*56b35d86SArmin Le Grand xub_StrLen nE, 121*56b35d86SArmin Le Grand sal_uInt16 nW); 122*56b35d86SArmin Le Grand getStart() const123*56b35d86SArmin Le Grand xub_StrLen getStart() const 124*56b35d86SArmin Le Grand { 125*56b35d86SArmin Le Grand return nStart; 126*56b35d86SArmin Le Grand } 127*56b35d86SArmin Le Grand getEnd() const128*56b35d86SArmin Le Grand xub_StrLen getEnd() const 129*56b35d86SArmin Le Grand { 130*56b35d86SArmin Le Grand return nEnd; 131*56b35d86SArmin Le Grand } 132*56b35d86SArmin Le Grand getWhichAttr() const133*56b35d86SArmin Le Grand sal_uInt16 getWhichAttr() const 134*56b35d86SArmin Le Grand { 135*56b35d86SArmin Le Grand return nWhichAttr; 136*56b35d86SArmin Le Grand } 137cdf0e10cSrcweir }; 138cdf0e10cSrcweir 139cdf0e10cSrcweir 140cdf0e10cSrcweir // SwRefMarkFldUpdate wird verschickt, wenn sich die ReferenzMarkierungen 141cdf0e10cSrcweir // Updaten sollen. Um Seiten-/KapitelNummer feststellen zu koennen, muss 142cdf0e10cSrcweir // der akt. Frame befragt werden. Dafuer wird das akt. OutputDevice benoetigt. 143cdf0e10cSrcweir class SwRefMarkFldUpdate : public SwMsgPoolItem 144cdf0e10cSrcweir { 145cdf0e10cSrcweir public: 146cdf0e10cSrcweir const OutputDevice* pOut; // Pointer auf das aktuelle Output-Device 147cdf0e10cSrcweir SwRefMarkFldUpdate( const OutputDevice* ); 148cdf0e10cSrcweir }; 149cdf0e10cSrcweir 150cdf0e10cSrcweir // SwDocPosUpdate wird verschickt, um zu signalisieren, dass nur die 151cdf0e10cSrcweir // Frames ab oder bis zu einer bestimmten dokument-globalen Position 152cdf0e10cSrcweir // geupdated werden brauchen. Zur Zeit wird dies nur beim Updaten 153cdf0e10cSrcweir // von Seitennummernfeldern benoetigt. 154cdf0e10cSrcweir 155cdf0e10cSrcweir class SwDocPosUpdate : public SwMsgPoolItem 156cdf0e10cSrcweir { 157cdf0e10cSrcweir public: 158cdf0e10cSrcweir const long nDocPos; 159cdf0e10cSrcweir SwDocPosUpdate( const long nDocPos ); 160cdf0e10cSrcweir }; 161cdf0e10cSrcweir 162cdf0e10cSrcweir // SwTableFmlUpdate wird verschickt, wenn sich die Tabelle neu berechnen soll 163cdf0e10cSrcweir // JP 16.02.99: oder wenn die Tabelle selbst gemergt oder gesplittet wird 164cdf0e10cSrcweir enum TableFmlUpdtFlags { TBL_CALC = 0, 165cdf0e10cSrcweir TBL_BOXNAME, 166cdf0e10cSrcweir TBL_BOXPTR, 167cdf0e10cSrcweir TBL_RELBOXNAME, 168cdf0e10cSrcweir TBL_MERGETBL, 169cdf0e10cSrcweir TBL_SPLITTBL 170cdf0e10cSrcweir }; 171cdf0e10cSrcweir class SwTableFmlUpdate : public SwMsgPoolItem 172cdf0e10cSrcweir { 173cdf0e10cSrcweir public: 174cdf0e10cSrcweir const SwTable* pTbl; // Pointer auf die zu aktuelle Tabelle 175cdf0e10cSrcweir union { 176cdf0e10cSrcweir const SwTable* pDelTbl; // Merge: Ptr auf die zu loeschende Tabelle 177cdf0e10cSrcweir const String* pNewTblNm; // Split: der Name der neuen Tabelle 178cdf0e10cSrcweir } DATA; 179cdf0e10cSrcweir SwHistory* pHistory; 180cdf0e10cSrcweir sal_uInt16 nSplitLine; // Split: ab dieser BaseLine wird gespl. 181cdf0e10cSrcweir TableFmlUpdtFlags eFlags; 182cdf0e10cSrcweir sal_Bool bModified : 1; 183cdf0e10cSrcweir sal_Bool bBehindSplitLine : 1; 184cdf0e10cSrcweir 185cdf0e10cSrcweir SwTableFmlUpdate( const SwTable* ); 186cdf0e10cSrcweir }; 187cdf0e10cSrcweir 188cdf0e10cSrcweir 189cdf0e10cSrcweir class SwAutoFmtGetDocNode: public SwMsgPoolItem 190cdf0e10cSrcweir { 191cdf0e10cSrcweir public: 192cdf0e10cSrcweir const SwCntntNode* pCntntNode; 193cdf0e10cSrcweir const SwNodes* pNodes; 194cdf0e10cSrcweir 195cdf0e10cSrcweir SwAutoFmtGetDocNode( const SwNodes* pNds ); 196cdf0e10cSrcweir }; 197cdf0e10cSrcweir 198cdf0e10cSrcweir /* 199cdf0e10cSrcweir * SwAttrSetChg wird verschicht, wenn sich in dem SwAttrSet rTheChgdSet 200cdf0e10cSrcweir * etwas veraendert hat. Es werden immer 2. Hints 201cdf0e10cSrcweir * verschickt, die alten und neuen Items in dem rTheChgdSet. 202cdf0e10cSrcweir */ 203cdf0e10cSrcweir class SwAttrSetChg: public SwMsgPoolItem 204cdf0e10cSrcweir { 205cdf0e10cSrcweir sal_Bool bDelSet; 206cdf0e10cSrcweir SwAttrSet* pChgSet; // was sich veraendert hat 207cdf0e10cSrcweir const SwAttrSet* pTheChgdSet; // wird nur zum Vergleichen gebraucht !! 208cdf0e10cSrcweir public: 209cdf0e10cSrcweir SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet ); 210cdf0e10cSrcweir SwAttrSetChg( const SwAttrSetChg& ); 211cdf0e10cSrcweir ~SwAttrSetChg(); 212cdf0e10cSrcweir 213cdf0e10cSrcweir // was sich veraendert hat GetChgSet() const214cdf0e10cSrcweir const SwAttrSet* GetChgSet() const { return pChgSet; } GetChgSet()215cdf0e10cSrcweir SwAttrSet* GetChgSet() { return pChgSet; } 216cdf0e10cSrcweir 217cdf0e10cSrcweir // wo es sich geaendert hat GetTheChgdSet() const218cdf0e10cSrcweir const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; } 219cdf0e10cSrcweir Count() const220cdf0e10cSrcweir sal_uInt16 Count() const { return pChgSet->Count(); } ClearItem(sal_uInt16 nWhichL=0)221cdf0e10cSrcweir void ClearItem( sal_uInt16 nWhichL = 0 ) 222cdf0e10cSrcweir #ifndef DBG_UTIL 223cdf0e10cSrcweir { pChgSet->ClearItem( nWhichL ); } 224cdf0e10cSrcweir #else 225cdf0e10cSrcweir ; 226cdf0e10cSrcweir #endif 227cdf0e10cSrcweir }; 228cdf0e10cSrcweir 229cdf0e10cSrcweir class SwCondCollCondChg: public SwMsgPoolItem 230cdf0e10cSrcweir { 231cdf0e10cSrcweir public: 232cdf0e10cSrcweir SwFmt *pChangedFmt; 233cdf0e10cSrcweir SwCondCollCondChg( SwFmt *pFmt ); 234cdf0e10cSrcweir }; 235cdf0e10cSrcweir 236cdf0e10cSrcweir class SwVirtPageNumInfo: public SwMsgPoolItem 237cdf0e10cSrcweir { 238cdf0e10cSrcweir const SwPageFrm *pPage; 239cdf0e10cSrcweir const SwPageFrm *pOrigPage; 240cdf0e10cSrcweir const SwFrm *pFrm; //An einem Absatz/Tabelle koennen mehrere 241cdf0e10cSrcweir //Attribute sitzen. Der Frame muss dann 242cdf0e10cSrcweir //muss dann letztlich bei bestimmen 243cdf0e10cSrcweir //welches Attribut gilt und um welche physikalische 244cdf0e10cSrcweir //Seite es sich handelt. 245cdf0e10cSrcweir public: 246cdf0e10cSrcweir SwVirtPageNumInfo( const SwPageFrm *pPg ); 247cdf0e10cSrcweir GetPage()248cdf0e10cSrcweir const SwPageFrm *GetPage() { return pPage; } GetOrigPage()249cdf0e10cSrcweir const SwPageFrm *GetOrigPage() { return pOrigPage;} GetFrm()250cdf0e10cSrcweir const SwFrm *GetFrm() { return pFrm; } SetInfo(const SwPageFrm * pPg,const SwFrm * pF)251cdf0e10cSrcweir void SetInfo( const SwPageFrm *pPg, 252cdf0e10cSrcweir const SwFrm *pF ) { pFrm = pF, pPage = pPg; } 253cdf0e10cSrcweir }; 254cdf0e10cSrcweir 255cdf0e10cSrcweir 256cdf0e10cSrcweir // --> OD 2008-02-19 #refactorlists# 257cdf0e10cSrcweir //DECLARE_TABLE( SwTxtNodeTable, SwTxtNode* ) 258cdf0e10cSrcweir 259cdf0e10cSrcweir //class SwNumRuleInfo : public SwMsgPoolItem 260cdf0e10cSrcweir //{ 261cdf0e10cSrcweir // SwTxtNodeTable aList; 262cdf0e10cSrcweir // const String& rName; 263cdf0e10cSrcweir //public: 264cdf0e10cSrcweir // SwNumRuleInfo( const String& rRuleName ); 265cdf0e10cSrcweir 266cdf0e10cSrcweir // const String& GetName() const { return rName; } 267cdf0e10cSrcweir // void AddNode( SwTxtNode& rNd ); 268cdf0e10cSrcweir 269cdf0e10cSrcweir // // erzeuge die Liste aller Nodes der NumRule in dem angegebenem Doc 270cdf0e10cSrcweir // // Der Code steht im docnum.cxx 271cdf0e10cSrcweir // // #111955# 272cdf0e10cSrcweir // void MakeList( SwDoc& rDoc, sal_Bool bOutline = sal_False ); 273cdf0e10cSrcweir 274cdf0e10cSrcweir // const SwTxtNodeTable& GetTxtNodeList() const { return aList; } 275cdf0e10cSrcweir //}; 276cdf0e10cSrcweir // <-- 277cdf0e10cSrcweir 278cdf0e10cSrcweir class SwFindNearestNode : public SwMsgPoolItem 279cdf0e10cSrcweir { 280cdf0e10cSrcweir const SwNode *pNd, *pFnd; 281cdf0e10cSrcweir public: 282cdf0e10cSrcweir SwFindNearestNode( const SwNode& rNd ); 283cdf0e10cSrcweir void CheckNode( const SwNode& rNd ); 284cdf0e10cSrcweir GetFoundNode() const285cdf0e10cSrcweir const SwNode* GetFoundNode() const { return pFnd; } 286cdf0e10cSrcweir }; 287cdf0e10cSrcweir 288cdf0e10cSrcweir class SwStringMsgPoolItem : public SwMsgPoolItem 289cdf0e10cSrcweir { 290cdf0e10cSrcweir String sStr; 291cdf0e10cSrcweir public: 292cdf0e10cSrcweir GetString() const293cdf0e10cSrcweir const String& GetString() const { return sStr; } 294cdf0e10cSrcweir SwStringMsgPoolItem(sal_uInt16 nId,const String & rStr)295cdf0e10cSrcweir SwStringMsgPoolItem( sal_uInt16 nId, const String& rStr ) 296cdf0e10cSrcweir : SwMsgPoolItem( nId ), sStr( rStr ) 297cdf0e10cSrcweir {} 298cdf0e10cSrcweir }; 299cdf0e10cSrcweir 300cdf0e10cSrcweir #endif 301