1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <swatrset.hxx>
35 // Base class for all Message-Hints:
36 // "Overhead" of SfxPoolItem is handled here
37 class SwMsgPoolItem
: public SfxPoolItem
40 SwMsgPoolItem( sal_uInt16 nWhich
);
42 // "Overhead" of SfxPoolItem
43 virtual int operator==( const SfxPoolItem
& ) const;
44 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= 0 ) const;
48 // ---------------------------------------
49 // SwPtrMsgPoolItem (old SwObjectDying!)
50 // ---------------------------------------
52 class SwPtrMsgPoolItem
: public SwMsgPoolItem
57 SwPtrMsgPoolItem( sal_uInt16 nId
, void * pObj
)
58 : SwMsgPoolItem( nId
), pObject( pObj
)
65 * SwFmtChg is sent when a format has changed to another format. 2 Hints are always sent
66 * the old and the new format
68 class SwFmtChg
: public SwMsgPoolItem
72 SwFmtChg( SwFmt
*pFmt
);
76 class SwInsTxt
: public SwMsgPoolItem
82 SwInsTxt( xub_StrLen nP
, xub_StrLen nL
);
85 class SwDelChr
: public SwMsgPoolItem
90 SwDelChr( xub_StrLen nP
);
93 class SwDelTxt
: public SwMsgPoolItem
99 SwDelTxt( xub_StrLen nS
, xub_StrLen nL
);
102 class SwUpdateAttr
: public SwMsgPoolItem
107 sal_uInt16 nWhichAttr
;
108 SwUpdateAttr( xub_StrLen nS
, xub_StrLen nE
, sal_uInt16 nW
);
112 /** SwRefMarkFldUpdate is sent when the referencemarks should be updated.
113 To determine Page- / chapternumbers the current frame has to be asked.
114 For this we need the current outputdevice */
115 class SwRefMarkFldUpdate
: public SwMsgPoolItem
118 const OutputDevice
* pOut
; ///< pointer to the current output device
119 SwRefMarkFldUpdate( const OutputDevice
* );
122 /** SwDocPosUpdate is sent to signal that only the frames from or to a specified document-global position
123 have to be updated. At the moment this is only needed when updating pagenumber fields. */
124 class SwDocPosUpdate
: public SwMsgPoolItem
128 SwDocPosUpdate( const long nDocPos
);
131 /// SwTableFmlUpdate is sent when the table has to be newly calculated or when a table itself is merged or splitted
132 enum TableFmlUpdtFlags
{ TBL_CALC
= 0,
139 class SwTableFmlUpdate
: public SwMsgPoolItem
142 const SwTable
* pTbl
; ///< Pointer to the current table
144 const SwTable
* pDelTbl
; ///< Merge: Pointer to the table to be removed
145 const String
* pNewTblNm
; ///< Split: the name of the new table
148 sal_uInt16 nSplitLine
; ///< Split: from this BaseLine on will be splitted
149 TableFmlUpdtFlags eFlags
;
150 sal_Bool bModified
: 1;
151 sal_Bool bBehindSplitLine
: 1;
153 SwTableFmlUpdate( const SwTable
* );
157 class SwAutoFmtGetDocNode
: public SwMsgPoolItem
160 const SwCntntNode
* pCntntNode
;
161 const SwNodes
* pNodes
;
163 SwAutoFmtGetDocNode( const SwNodes
* pNds
);
167 * SwAttrSetChg is sent when something has changed in the SwAttrSet rTheChgdSet.
168 * 2 Hints are always sent, the old and the new items in the rTheChgdSet.
170 class SwAttrSetChg
: public SwMsgPoolItem
173 SwAttrSet
* pChgSet
; ///< what has changed
174 const SwAttrSet
* pTheChgdSet
; ///< is only used to compare
176 SwAttrSetChg( const SwAttrSet
& rTheSet
, SwAttrSet
& rSet
);
177 SwAttrSetChg( const SwAttrSetChg
& );
181 const SwAttrSet
* GetChgSet() const { return pChgSet
; }
182 SwAttrSet
* GetChgSet() { return pChgSet
; }
184 /// Where it has changed
185 const SwAttrSet
* GetTheChgdSet() const { return pTheChgdSet
; }
187 sal_uInt16
Count() const { return pChgSet
->Count(); }
188 void ClearItem( sal_uInt16 nWhichL
= 0 )
192 { pChgSet
->ClearItem( nWhichL
); }
196 class SwCondCollCondChg
: public SwMsgPoolItem
200 SwCondCollCondChg( SwFmt
*pFmt
);
203 class SwVirtPageNumInfo
: public SwMsgPoolItem
205 const SwPageFrm
*pPage
;
206 const SwPageFrm
*pOrigPage
;
208 /** Multiple attributes can be attached to a single paragraph / table
209 The frame, in the end, has to decide which attribute takes effect and which physical page it involves */
211 SwVirtPageNumInfo( const SwPageFrm
*pPg
);
213 const SwPageFrm
*GetPage() { return pPage
; }
214 const SwPageFrm
*GetOrigPage() { return pOrigPage
;}
215 const SwFrm
*GetFrm() { return pFrm
; }
216 void SetInfo( const SwPageFrm
*pPg
,
217 const SwFrm
*pF
) { pFrm
= pF
, pPage
= pPg
; }
220 class SwFindNearestNode
: public SwMsgPoolItem
222 const SwNode
*pNd
, *pFnd
;
224 SwFindNearestNode( const SwNode
& rNd
);
225 void CheckNode( const SwNode
& rNd
);
227 const SwNode
* GetFoundNode() const { return pFnd
; }
230 class SwStringMsgPoolItem
: public SwMsgPoolItem
235 const String
& GetString() const { return sStr
; }
237 SwStringMsgPoolItem( sal_uInt16 nId
, const String
& rStr
)
238 : SwMsgPoolItem( nId
), sStr( rStr
)
243 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */