fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / sw / inc / hints.hxx
blob18a4ecdef5fa7962563ec7902a504594644e3545
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _HINTS_HXX
20 #define _HINTS_HXX
22 #include <swatrset.hxx>
24 class SwFmt;
25 class OutputDevice;
26 class SwTable;
27 class SwNode;
28 class SwNodes;
29 class SwCntntNode;
30 class SwPageFrm;
31 class SwFrm;
32 class SwTxtNode;
33 class SwHistory;
35 // Base class for all Message-Hints:
36 // "Overhead" of SfxPoolItem is handled here
37 class SwMsgPoolItem : public SfxPoolItem
39 public:
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
54 public:
55 void * pObject;
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
70 public:
71 SwFmt *pChangedFmt;
72 SwFmtChg( SwFmt *pFmt );
76 class SwInsTxt: public SwMsgPoolItem
78 public:
79 xub_StrLen nPos;
80 xub_StrLen nLen;
82 SwInsTxt( xub_StrLen nP, xub_StrLen nL );
85 class SwDelChr: public SwMsgPoolItem
87 public:
88 xub_StrLen nPos;
90 SwDelChr( xub_StrLen nP );
93 class SwDelTxt: public SwMsgPoolItem
95 public:
96 xub_StrLen nStart;
97 xub_StrLen nLen;
99 SwDelTxt( xub_StrLen nS, xub_StrLen nL );
102 class SwUpdateAttr: public SwMsgPoolItem
104 public:
105 xub_StrLen nStart;
106 xub_StrLen nEnd;
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
117 public:
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
126 public:
127 const long nDocPos;
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,
133 TBL_BOXNAME,
134 TBL_BOXPTR,
135 TBL_RELBOXNAME,
136 TBL_MERGETBL,
137 TBL_SPLITTBL
139 class SwTableFmlUpdate : public SwMsgPoolItem
141 public:
142 const SwTable* pTbl; ///< Pointer to the current table
143 union {
144 const SwTable* pDelTbl; ///< Merge: Pointer to the table to be removed
145 const String* pNewTblNm; ///< Split: the name of the new table
146 } DATA;
147 SwHistory* pHistory;
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
159 public:
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
172 sal_Bool bDelSet;
173 SwAttrSet* pChgSet; ///< what has changed
174 const SwAttrSet* pTheChgdSet; ///< is only used to compare
175 public:
176 SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet );
177 SwAttrSetChg( const SwAttrSetChg& );
178 ~SwAttrSetChg();
180 /// What has changed
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 )
189 #ifdef DBG_UTIL
191 #else
192 { pChgSet->ClearItem( nWhichL ); }
193 #endif
196 class SwCondCollCondChg: public SwMsgPoolItem
198 public:
199 SwFmt *pChangedFmt;
200 SwCondCollCondChg( SwFmt *pFmt );
203 class SwVirtPageNumInfo: public SwMsgPoolItem
205 const SwPageFrm *pPage;
206 const SwPageFrm *pOrigPage;
207 const SwFrm *pFrm;
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 */
210 public:
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;
223 public:
224 SwFindNearestNode( const SwNode& rNd );
225 void CheckNode( const SwNode& rNd );
227 const SwNode* GetFoundNode() const { return pFnd; }
230 class SwStringMsgPoolItem : public SwMsgPoolItem
232 String sStr;
233 public:
235 const String& GetString() const { return sStr; }
237 SwStringMsgPoolItem( sal_uInt16 nId, const String& rStr )
238 : SwMsgPoolItem( nId ), sStr( rStr )
241 #endif
243 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */