Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _EDITSH_HXX
29 : : #define _EDITSH_HXX
30 : :
31 : : #include <com/sun/star/text/HoriOrientation.hpp>
32 : : #include <com/sun/star/embed/XEmbeddedObject.hpp>
33 : : #include <tools/string.hxx>
34 : : #include <vcl/font.hxx>
35 : : #include <editeng/swafopt.hxx>
36 : : #include "swdllapi.h"
37 : : #include <crsrsh.hxx> // For base class.
38 : : #include <itabenum.hxx>
39 : : #include <swdbdata.hxx>
40 : : #include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
41 : : #include <com/sun/star/linguistic2/ProofreadingResult.hpp>
42 : : #include <fldupde.hxx>
43 : : #include <tblenum.hxx>
44 : : #include <IMark.hxx>
45 : :
46 : : #include <vector>
47 : : #include <set>
48 : : #include <swundo.hxx>
49 : : #include <svtools/embedhlp.hxx>
50 : : #include <boost/ptr_container/ptr_vector.hpp>
51 : :
52 : : class PolyPolygon;
53 : : class SwDoc;
54 : : class DateTime;
55 : : class CommandExtTextInputData;
56 : :
57 : : class SvNumberFormatter;
58 : : class SfxPoolItem;
59 : : class SfxItemSet;
60 : : class SvxAutoCorrect;
61 : :
62 : : class SwField;
63 : : class SwFieldType;
64 : : class SwDDEFieldType;
65 : : class SwNewDBMgr;
66 : :
67 : : struct SwDocStat;
68 : : class SwAutoCompleteWord;
69 : :
70 : : class SwFmtRefMark;
71 : :
72 : : class SwNumRule;
73 : :
74 : : class SwTxtFmtColl;
75 : : class SwGrfNode;
76 : : class SwFlyFrmFmt;
77 : :
78 : : class SwFrmFmt; // For GetTxtNodeFmts().
79 : : class SwCharFmt;
80 : : class SwExtTextInput;
81 : : class SwRootFrm; // For CTOR.
82 : : class Graphic;
83 : : class GraphicObject;
84 : : class SwFmtINetFmt; // InsertURL.
85 : : class SwTable;
86 : : class SwTextBlocks; // For GlossaryRW.
87 : : class SwFmtFtn;
88 : : class SwSection;
89 : : class SwSectionData;
90 : : class SwSectionFmt;
91 : : class SwTOXMarks;
92 : : class SwTOXBase;
93 : : class SwTOXType;
94 : : class SwTableAutoFmt;
95 : : class SwPageDesc;
96 : : class SwTxtINetFmt;
97 : : class SwSeqFldList;
98 : : class SwGlblDocContent;
99 : : class SwGlblDocContents;
100 : : class SwRedline;
101 : : class SwRedlineData;
102 : : class SwFtnInfo;
103 : : class SwEndNoteInfo;
104 : : class SwLineNumberInfo;
105 : : class SwAuthEntry;
106 : : class SwRewriter;
107 : : struct SwConversionArgs;
108 : :
109 : :
110 : : namespace com { namespace sun { namespace star { namespace uno {
111 : : template < class > class Sequence;
112 : : }}}}
113 : :
114 : : namespace svx{
115 : : struct SpellPortion;
116 : : typedef std::vector<SpellPortion> SpellPortions;
117 : : }
118 : :
119 : : namespace sfx2{
120 : : class LinkManager;
121 : : }
122 : :
123 : : namespace sw {
124 : : class UndoRedoContext;
125 : : }
126 : :
127 : : #define GETSELTXT_PARABRK_TO_BLANK 0
128 : : #define GETSELTXT_PARABRK_KEEP 1
129 : : #define GETSELTXT_PARABRK_TO_ONLYCR 2
130 : :
131 : :
132 : : // For querying the INet-attributes for Navigator.
133 : 0 : struct SwGetINetAttr
134 : : {
135 : : String sText;
136 : : const SwTxtINetFmt& rINetAttr;
137 : :
138 : 0 : SwGetINetAttr( const String& rTxt, const SwTxtINetFmt& rAttr )
139 : 0 : : sText( rTxt ), rINetAttr( rAttr )
140 : 0 : {}
141 : : };
142 : : typedef boost::ptr_vector<SwGetINetAttr> SwGetINetAttrs;
143 : :
144 : : // Types of forms of content.
145 : : #define CNT_TXT 0x0001
146 : : #define CNT_GRF 0x0002
147 : : #define CNT_OLE 0x0010
148 : :
149 : : // Test USHORT for a defined form of content.
150 : : #define CNT_HasTxt(USH) ((USH)&CNT_TXT)
151 : : #define CNT_HasGrf(USH) ((USH)&CNT_GRF)
152 : : #define CNT_HasOLE(USH) ((USH)&CNT_OLE)
153 : :
154 : : class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
155 : : {
156 : : static SvxSwAutoFmtFlags* pAutoFmtFlags;
157 : :
158 : : // For the private methods DelRange and those of AutoCorrect.
159 : : friend class SwAutoFormat;
160 : : friend void _InitCore();
161 : : friend void _FinitCore();
162 : : // For the PamCorrAbs/-Rel methods.
163 : : friend class SwUndo;
164 : :
165 : : SW_DLLPRIVATE SfxPoolItem& _GetChrFmt( SfxPoolItem& ) const;
166 : :
167 : : // Returns pointer to a SwGrfNode
168 : : // that will be used by GetGraphic() and GetGraphicSize().
169 : : SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
170 : :
171 : : SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, sal_Bool* pUndo = 0 );
172 : :
173 : : SW_DLLPRIVATE void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet );
174 : :
175 : : using ViewShell::UpdateFlds;
176 : : using SwModify::GetInfo;
177 : :
178 : : public:
179 : : // Edit (all selected ranges).
180 : : void Insert( sal_Unicode, sal_Bool bOnlyCurrCrsr = sal_False );
181 : : void Insert2( const String &, const bool bForceExpandHints = false );
182 : : void Overwrite( const String & );
183 : :
184 : : // Replace a selected range in a TextNode by given string.
185 : : // Meant for Search & Replace.
186 : : // bRegExpRplc - replace tabs (\\t) and insert found string (not \&).
187 : : // E.g.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
188 : : // --> "xx\t<Tab>..zzz..&"
189 : : sal_Bool Replace( const String& rNewStr, sal_Bool bRegExpRplc = sal_False );
190 : :
191 : : // Delete content of all ranges.
192 : : // If whole nodes are selected, these nodes get deleted.
193 : : long Delete();
194 : :
195 : : // Remove a complete paragraph.
196 : : sal_Bool DelFullPara();
197 : :
198 : : // Change text to Upper/Lower/Hiragana/Katagana/...
199 : : void TransliterateText( sal_uInt32 nType );
200 : :
201 : : // Count words in current selection.
202 : : void CountWords( SwDocStat& rStat ) const;
203 : :
204 : : // Delete non-visible content in the document.
205 : : // E.g. hidden ranges, hidden paragraphs.
206 : : sal_Bool RemoveInvisibleContent();
207 : :
208 : : // Replace fields by text - mailmerge support.
209 : : sal_Bool ConvertFieldsToText();
210 : :
211 : : // Set all numbering start points to a fixed value - mailmerge support.
212 : : void SetNumberingRestart();
213 : :
214 : : // Embedds all local links (ranges/graphics).
215 : : sal_uInt16 GetLinkUpdMode(sal_Bool bDocSettings = sal_False) const;
216 : : void SetLinkUpdMode( sal_uInt16 nMode );
217 : :
218 : : // Copy content of all ranges at current position of cursor to given Shell.
219 : : long Copy( SwEditShell* pDestShell = 0 );
220 : :
221 : : // For copying via ClipBoard:
222 : : // If table is copied into table, move all cursors away from it.
223 : : // Copy and Paste must be in FEShell because of FlyFrames!
224 : : // Copy all selections and the document.
225 : : sal_Bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
226 : :
227 : : long SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
228 : : sal_Bool AppendTxtNode();
229 : : void AutoFmtBySplitNode();
230 : :
231 : : // If cursor is in a INetAttribute it will be deleted completely
232 : : // including the descriptive text (needed at drag & drop).
233 : : sal_Bool DelINetAttrWithText();
234 : :
235 : : // If Cursor is at the end of a character style in which the DontExpand-flag
236 : : // is not yet set, the latter will be set (==> return TRUE).
237 : : sal_Bool DontExpandFmt();
238 : :
239 : : // Apply / remove attributes.
240 : : // Returns attributs in required AttributeSet.
241 : : // When not unambiguous the set has a DONT_CARE !!
242 : : // 2nd optional parameter <bMergeIndentValuesOfNumRule>.
243 : : // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
244 : : // the corresponding list level of an applied list style is merged into
245 : : // the requested item set as a LR-SPACE item, if corresponding node has not
246 : : // its own indent attributes and the position-and-space mode of the list
247 : : // level is SvxNumberFormat::LABEL_ALIGNMENT.
248 : : sal_Bool GetPaMAttr( SwPaM* pPaM, SfxItemSet& ,
249 : : const bool bMergeIndentValuesOfNumRule = false ) const;
250 : : sal_Bool GetCurAttr( SfxItemSet& ,
251 : : const bool bMergeIndentValuesOfNumRule = false ) const;
252 : : void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
253 : : void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0, SwPaM* pCrsr = NULL );
254 : :
255 : : /**
256 : : * Get the paragraph format attribute(s) of the current selection.
257 : : *
258 : : * @see GetPaMParAttr()
259 : : *
260 : : * @param rSet
261 : : * output parameter - the SfxItemSet where the automatic paragraph format attribut(s) will be store.
262 : : * The attributes aren't invalidated or cleared if the function reach the getMaxLookup limite.
263 : : *
264 : : * @return true if the function inspect all the nodes point by the pPaM parameter,
265 : : * false if the function reach the limit of getMaxLookup number of nodes inspected.
266 : : */
267 : : sal_Bool GetCurParAttr( SfxItemSet& rSet ) const;
268 : : /**
269 : : * Get the paragraph format attribute(s) of the selection(s) described by a SwPaM.
270 : : *
271 : : * @param pPaM
272 : : * input parameter - the selection where to look for the paragraph format.
273 : : *
274 : : * @param rSet
275 : : * output parameter - the SfxItemSet where the automatic paragraph format attribute(s) will be store.
276 : : * The attributes aren't invalidated or cleared if the function reaches the getMaxLookup limit.
277 : : *
278 : : * @return true if the function inspects all the nodes point by the pPaM parameter,
279 : : * false if the function reaches the limit of getMaxLookup number of nodes inspected.
280 : : */
281 : : sal_Bool GetPaMParAttr( SwPaM* pPaM, SfxItemSet& rSet ) const;
282 : :
283 : : // Set attribute as new default attribute in document.
284 : : void SetDefault( const SfxPoolItem& );
285 : :
286 : : // Query default attribute of document.
287 : : const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
288 : :
289 : : void ResetAttr( const std::set<sal_uInt16> &attrs = std::set<sal_uInt16>(), SwPaM* pCrsr = NULL );
290 : : void GCAttr();
291 : :
292 : : // Returns the scripttpye of the selection.
293 : : sal_uInt16 GetScriptType() const;
294 : :
295 : : // Returns the language at current cursor position.
296 : : sal_uInt16 GetCurLang() const;
297 : :
298 : : // TABLE
299 : : sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed = sal_False ) const;
300 : : SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed = sal_False ) const;
301 : : String GetUniqueTblName() const;
302 : :
303 : : // CHAR
304 : : sal_uInt16 GetCharFmtCount() const;
305 : : SwCharFmt& GetCharFmt(sal_uInt16 nFmt) const;
306 : : SwCharFmt* GetCurCharFmt() const;
307 : : void FillByEx(SwCharFmt*, sal_Bool bReset = sal_False);
308 : : SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 );
309 : : SwCharFmt* FindCharFmtByName( const String& rName ) const;
310 : :
311 : :
312 : : /* FormatCollections (new) - Explaining the general naming pattern:
313 : : * GetXXXCount() returns the count of xxx in the document.
314 : : * GetXXX(i) returns i-th xxx (ERR_RAISE if beyond range!).
315 : : * DelXXX(i) deletes i-th xxx (ERR_RAISE if beyond range!).
316 : : * GetCurXXX() returns xxx that is valid at cursor or in ranges.
317 : : * returns 0, if not unanimuous.
318 : : * SetXXX() sets xxx at cursor or in ranges.
319 : : * MakeXXX() makes a xxx, derived from pDerivedFrom.
320 : : */
321 : :
322 : : // TXT
323 : : SwTxtFmtColl& GetDfltTxtFmtColl() const;
324 : : sal_uInt16 GetTxtFmtCollCount() const;
325 : : SwTxtFmtColl& GetTxtFmtColl( sal_uInt16 nTxtFmtColl) const;
326 : : /**
327 : : * Get the named paragraph format of the current selection.
328 : : *
329 : : * @see GetPaMTxtFmtColl()
330 : : *
331 : : * @return the named paragraph format of the first node that contains one.
332 : : * Nodes are sort by order of appearance in the selections ;
333 : : * selections are sort by their order of creation
334 : : * (last created selection first, oldest selection at last).
335 : : */
336 : : SwTxtFmtColl* GetCurTxtFmtColl() const;
337 : : /**
338 : : * Get the named paragraph format of the selection(s) described by a SwPaM.
339 : : *
340 : : * @param pPaM
341 : : * input parameter - the selection where to look for the paragraph format.
342 : : *
343 : : * @return the named paragraph format of the first node that contains one.
344 : : */
345 : : SwTxtFmtColl* GetPaMTxtFmtColl( SwPaM* pPaM ) const;
346 : :
347 : : // #i62675#
348 : : // Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTxtFmtColl(..)>
349 : : void SetTxtFmtColl( SwTxtFmtColl*,
350 : : bool bResetListAttrs = false );
351 : : SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
352 : : SwTxtFmtColl *pDerivedFrom = 0);
353 : : void FillByEx(SwTxtFmtColl*, sal_Bool bReset = sal_False);
354 : : SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
355 : :
356 : : // Return "Auto-Collection" with given Id. If it does not exist create it.
357 : : SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId );
358 : :
359 : : // Return required automatic format base class.
360 : : SwFmt* GetFmtFromPool( sal_uInt16 nId );
361 : :
362 : : // Return required automatic page style.
363 : : SwPageDesc* GetPageDescFromPool( sal_uInt16 nId );
364 : :
365 : : // Query if the paragraph-/character-/frame-/page-style is used.
366 : : sal_Bool IsUsed( const SwModify& ) const;
367 : :
368 : : // Return required automatic format.
369 : 0 : SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId )
370 : 0 : { return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
371 : 0 : SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId )
372 : 0 : { return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
373 : :
374 : : void Insert2(SwField&, const bool bForceExpandHints = false);
375 : : SwField* GetCurFld() const;
376 : :
377 : : void UpdateFlds( SwField & ); // One single field.
378 : :
379 : : sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
380 : : SwFieldType* GetFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
381 : : SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
382 : :
383 : : void RemoveFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX);
384 : : void RemoveFldType(sal_uInt16 nResId, const String& rName);
385 : :
386 : : void FieldToText( SwFieldType* pType );
387 : :
388 : : void ChangeAuthorityData(const SwAuthEntry* pNewData);
389 : :
390 : : // Database information.
391 : : SwDBData GetDBData() const;
392 : : const SwDBData& GetDBDesc() const;
393 : : void ChgDBData(const SwDBData& SwDBData);
394 : : void ChangeDBFields( const std::vector<String>& rOldNames,
395 : : const String& rNewName );
396 : : void GetAllUsedDB( std::vector<String>& rDBNameList,
397 : : std::vector<String>* pAllDBNames = 0 );
398 : :
399 : : sal_Bool IsAnyDatabaseFieldInDoc()const;
400 : :
401 : : // Check whether DB fields point to an available data source and returns it.
402 : : sal_Bool IsFieldDataSourceAvailable(String& rUsedDataSource) const;
403 : : void UpdateExpFlds(sal_Bool bCloseDB = sal_False);// nur alle ExpressionFelder updaten
404 : : void LockExpFlds();
405 : : void UnlockExpFlds();
406 : :
407 : : SwFldUpdateFlags GetFldUpdateFlags(sal_Bool bDocSettings = sal_False) const;
408 : : void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
409 : :
410 : : // For evaluation of DB fields (new DB-manager).
411 : : SwNewDBMgr* GetNewDBMgr() const;
412 : :
413 : : SwFieldType* InsertFldType(const SwFieldType &);
414 : :
415 : : // Changes in document?
416 : : sal_Bool IsModified() const;
417 : : void SetModified();
418 : : void ResetModified();
419 : : void SetUndoNoResetModified();
420 : :
421 : : // Document - Statistics
422 : : void UpdateDocStat();
423 : : const SwDocStat &GetUpdatedDocStat();
424 : :
425 : : void Insert(const SwTOXMark& rMark);
426 : :
427 : : void DeleteTOXMark(SwTOXMark* pMark);
428 : :
429 : : // Get all marks at current SPoint.
430 : : sal_uInt16 GetCurTOXMarks(SwTOXMarks& rMarks) const ;
431 : :
432 : : // Insert content table. Renew if required.
433 : : void InsertTableOf(const SwTOXBase& rTOX,
434 : : const SfxItemSet* pSet = 0);
435 : : sal_Bool UpdateTableOf(const SwTOXBase& rTOX,
436 : : const SfxItemSet* pSet = 0);
437 : : const SwTOXBase* GetCurTOX() const;
438 : : const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
439 : : void SetDefaultTOXBase(const SwTOXBase& rBase);
440 : :
441 : : sal_Bool IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
442 : : void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly);
443 : :
444 : : sal_uInt16 GetTOXCount() const;
445 : : const SwTOXBase* GetTOX( sal_uInt16 nPos ) const;
446 : : sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
447 : :
448 : : // After reading file update all content tables.
449 : : void SetUpdateTOX( sal_Bool bFlag = sal_True );
450 : : sal_Bool IsUpdateTOX() const;
451 : :
452 : : // Manage types of content tables.
453 : : sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const;
454 : : const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
455 : : void InsertTOXType(const SwTOXType& rTyp);
456 : :
457 : : // AutoMark file
458 : : const String& GetTOIAutoMarkURL() const;
459 : : void SetTOIAutoMarkURL(const String& rSet);
460 : : void ApplyAutoMark();
461 : :
462 : : // Key for managing index.
463 : : sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, std::vector<String>& rArr ) const;
464 : :
465 : : void SetOutlineNumRule(const SwNumRule&);
466 : : const SwNumRule* GetOutlineNumRule() const;
467 : :
468 : : sal_Bool OutlineUpDown( short nOffset = 1 );
469 : :
470 : : sal_Bool MoveOutlinePara( short nOffset = 1);
471 : :
472 : : sal_Bool IsProtectedOutlinePara() const;
473 : :
474 : : // Returns numbering rulse pf current enumeration list (else FALSE).
475 : : const SwNumRule* GetCurNumRule() const;
476 : :
477 : : // If there is not already a numbering, set one, else change.
478 : : // Works with old and new rules. Update only differences.
479 : : // Add optional parameter <bResetIndentAttrs> (default value sal_False).
480 : : // If <bResetIndentAttrs> equals true, the indent attributes "before text"
481 : : // and "first line indent" are additionally reset at the current selection,
482 : : // if the list style makes use of the new list level attributes.
483 : : // introduce parameters <bCreateNewList> and <sContinuedListId>
484 : : // <bCreateNewList> indicates, if a new list is created by applying the
485 : : // given list style.
486 : : // If <bCreateNewList> equals sal_False, <sContinuedListId> may contain the
487 : : // list Id of a list, which has to be continued by applying the given list style.
488 : : void SetCurNumRule( const SwNumRule&,
489 : : const bool bCreateNewList /*= false*/,
490 : : const String sContinuedListId = String(),
491 : : const bool bResetIndentAttrs = false );
492 : :
493 : : // Paragraphs without enumeration but with indents.
494 : : sal_Bool NoNum();
495 : :
496 : : // Delete, split enumeration list.
497 : : void DelNumRules();
498 : :
499 : : sal_Bool NumUpDown( sal_Bool bDown = sal_True );
500 : :
501 : : sal_Bool MoveParagraph( long nOffset = 1);
502 : : sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
503 : :
504 : : // Switch on/off of numbering via Delete/Backspace.
505 : : sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True);
506 : :
507 : : // #i23726#
508 : : // #i90078#
509 : : // Remove unused default parameter <nLevel> and <bRelative>.
510 : : // Adjust method name and parameter name
511 : : void ChangeIndentOfAllListLevels( short nDiff );
512 : : // Adjust method name
513 : : void SetIndent(short nIndent, const SwPosition & rPos);
514 : : sal_Bool IsFirstOfNumRule() const;
515 : : sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const;
516 : :
517 : : sal_Bool IsNoNum( sal_Bool bChkStart = sal_True ) const;
518 : :
519 : : // Return Num-Level of the node in which point of cursor is.
520 : : // Return values can be: NO_NUMBERING,
521 : : // 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
522 : : sal_uInt8 GetNumLevel() const;
523 : :
524 : : // Detect highest and lowest level to check moving of outline levels.
525 : : void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
526 : :
527 : :
528 : : // Get Outline level of current paragraph.
529 : : int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
530 : :
531 : : // i29560
532 : : sal_Bool HasNumber() const;
533 : : sal_Bool HasBullet() const;
534 : :
535 : : String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
536 : : void ChgNumRuleFmts( const SwNumRule& rRule );
537 : :
538 : : // Set (and query if) a numbering with StartFlag starts at current PointPos.
539 : : void SetNumRuleStart( sal_Bool bFlag = sal_True, SwPaM* pCrsr = NULL );
540 : : sal_Bool IsNumRuleStart( SwPaM* pPaM = NULL ) const;
541 : : void SetNodeNumStart( sal_uInt16 nStt, SwPaM* = NULL );
542 : :
543 : : sal_uInt16 GetNodeNumStart( SwPaM* pPaM = NULL ) const;
544 : :
545 : : sal_Bool ReplaceNumRule( const String& rOldRule, const String& rNewRule );
546 : :
547 : : // Searches for a text node with a numbering rule.
548 : : // in case a list style is found, <sListId> holds the list id, to which the
549 : : // text node belongs, which applies the found list style.
550 : : const SwNumRule * SearchNumRule(const bool bForward,
551 : : const bool bNum,
552 : : const bool bOutline,
553 : : int nNonEmptyAllowed,
554 : : String& sListId );
555 : :
556 : : // Undo.
557 : : // Maintain UndoHistory in Document.
558 : : // Reset UndoHistory at Save, SaveAs, Create ???
559 : : void DoUndo( sal_Bool bOn = sal_True );
560 : : sal_Bool DoesUndo() const;
561 : : void DoGroupUndo( sal_Bool bUn = sal_True );
562 : : sal_Bool DoesGroupUndo() const;
563 : : void DelAllUndoObj();
564 : :
565 : : // Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
566 : : SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
567 : :
568 : : // Closes parenthesis of nUndoId, not used by UI.
569 : : SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
570 : :
571 : : bool GetLastUndoInfo(::rtl::OUString *const o_pStr,
572 : : SwUndoId *const o_pId) const;
573 : : bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const;
574 : : SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const;
575 : :
576 : : /// is it forbidden to modify cursors via API calls?
577 : : bool CursorsLocked() const;
578 : : /// set selections to those contained in the UndoRedoContext
579 : : /// should only be called by sw::UndoManager!
580 : : void HandleUndoRedoContext(::sw::UndoRedoContext & rContext);
581 : :
582 : : bool Undo(sal_uInt16 const nCount = 1);
583 : : bool Redo(sal_uInt16 const nCount = 1);
584 : : bool Repeat(sal_uInt16 const nCount);
585 : :
586 : :
587 : : // For all views of this document.
588 : : void StartAllAction();
589 : : void EndAllAction();
590 : :
591 : : // To enable set up of StartActions and EndActions.
592 : : void CalcLayout();
593 : :
594 : : // Determine form of content. Return Type at CurCrsr->SPoint.
595 : : sal_uInt16 GetCntType() const;
596 : :
597 : : // Are there frames, footnotes, etc.
598 : : sal_Bool HasOtherCnt() const;
599 : :
600 : : // Apply ViewOptions with Start-/EndAction.
601 : : virtual void ApplyViewOptions( const SwViewOption &rOpt );
602 : :
603 : : // Query text within selection.
604 : : // Returns FALSE, if selected range is too large to be copied
605 : : // into string buffer or if other errors occur.
606 : : sal_Bool GetSelectedText( String &rBuf,
607 : : int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
608 : :
609 : : // Returns graphic, if CurCrsr->Point() points to a SwGrfNode
610 : : // (and mark is not set or points to the same graphic).
611 : :
612 : : const Graphic* GetGraphic( sal_Bool bWait = sal_True ) const;
613 : : const GraphicObject* GetGraphicObj() const;
614 : :
615 : : sal_Bool IsGrfSwapOut( sal_Bool bOnlyLinked = sal_False ) const;
616 : : sal_uInt16 GetGraphicType() const;
617 : :
618 : : const PolyPolygon *GetGraphicPolygon() const;
619 : : void SetGraphicPolygon( const PolyPolygon *pPoly );
620 : :
621 : : // If there's an automatic, not manipulated polygon at the selected
622 : : // notxtnode, it has to be deleted, e.g. cause the object has changed.
623 : : void ClearAutomaticContour();
624 : :
625 : : // Returns the size of a graphic in Twips if cursor is in a graphic.
626 : : sal_Bool GetGrfSize(Size&) const;
627 : :
628 : : // Returns name and filter of a graphic if the cursor is in a graphic,
629 : : // else give a rap on the knuckles!
630 : : // If a string-ptr != 0 return the respective name.
631 : : void GetGrfNms( String* pGrfName, String* pFltName,
632 : : const SwFlyFrmFmt* = 0 ) const;
633 : :
634 : : // Re-read if graphic is not ok. Current graphic is replaced by the new one.
635 : : void ReRead( const String& rGrfName, const String& rFltName,
636 : : const Graphic* pGraphic = 0,
637 : : const GraphicObject* pGrafObj = 0 );
638 : :
639 : : // Unique identification of object (for ImageMapDlg).
640 : : void *GetIMapInventor() const;
641 : :
642 : : // #i73788#
643 : : // Remove default parameter, because method always called this default value.
644 : : Graphic GetIMapGraphic() const; // Returns a graphic for all Flys!
645 : : const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_uInt8 nNdTyp = 0 ) const;
646 : :
647 : : // Returns a ClientObject, if CurCrsr->Point() points to a SwOLENode
648 : : // (and mark is neither set not pointint to same ClientObject)
649 : : // else give rap on the knuckles.
650 : : svt::EmbeddedObjectRef& GetOLEObject() const;
651 : :
652 : : // Is there an OLEObject with this name (SwFmt)?
653 : : sal_Bool HasOLEObj( const String &rName ) const;
654 : :
655 : : // Returns pointer to the data of the chart in which Cursr is.
656 : : void SetChartName( const String &rName );
657 : :
658 : : // Update content of all charts for table with given name.
659 : : void UpdateCharts( const String &rName );
660 : :
661 : : String GetCurWord();
662 : :
663 : : // Glossary from glossary document in current document.
664 : : // Styles only if not already existent.
665 : : void InsertGlossary( SwTextBlocks& rGlossary, const String& );
666 : :
667 : : // Make current selection glossary and insert into glossary document
668 : : // including styles.
669 : : sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const String& rName,
670 : : const String& rShortName, sal_Bool bSaveRelFile = sal_False,
671 : : const String* pOnlyTxt=0 );
672 : :
673 : : // Save complete content of doc as glossary.
674 : : sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
675 : : const String& rShortName,
676 : : sal_Bool bSaveRelFile = sal_False,
677 : : sal_Bool bOnlyTxt = sal_False );
678 : :
679 : : // Linguistics...
680 : : // Save selections.
681 : : void HyphStart( SwDocPositions eStart, SwDocPositions eEnde );
682 : :
683 : : // restore selections.
684 : : void HyphEnd();
685 : : com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
686 : : HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
687 : :
688 : : void HyphIgnore();
689 : :
690 : : // For Inserting SoftHyphen. Position is offset within the syllabificated word.
691 : : void InsertSoftHyph( const xub_StrLen nHyphPos );
692 : :
693 : : const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, // ALL_TBL_INS_ATTR
694 : : sal_uInt16 nRows, sal_uInt16 nCols,
695 : : sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
696 : : const SwTableAutoFmt* pTAFmt = 0 );
697 : :
698 : : void InsertDDETable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
699 : : SwDDEFieldType* pDDEType,
700 : : sal_uInt16 nRows, sal_uInt16 nCols,
701 : : sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL );
702 : :
703 : : void UpdateTable();
704 : : void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
705 : :
706 : : SwFrmFmt *GetTableFmt();
707 : : sal_Bool TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR
708 : : sal_Unicode cCh,
709 : : sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
710 : : const SwTableAutoFmt* pTAFmt = 0 );
711 : : sal_Bool TableToText( sal_Unicode cCh );
712 : : sal_Bool IsTextToTableAvailable() const;
713 : :
714 : : sal_Bool GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
715 : : void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
716 : :
717 : : sal_Bool IsTableBoxTextFormat() const;
718 : : String GetTableBoxText() const;
719 : :
720 : : TblChgMode GetTblChgMode() const;
721 : : void SetTblChgMode( TblChgMode eMode );
722 : :
723 : : // Split table at cursor position.
724 : : sal_Bool SplitTable( sal_uInt16 eMode );
725 : :
726 : : // Merge tables.
727 : :
728 : : // Can Merge checks if Prev or Next are possible.
729 : : // If pointer pChkNxtPrv is passed possible direction is given.
730 : : sal_Bool CanMergeTable( sal_Bool bWithPrev = sal_True, sal_Bool* pChkNxtPrv = 0 ) const;
731 : : sal_Bool MergeTable( sal_Bool bWithPrev = sal_True, sal_uInt16 nMode = 0 );
732 : :
733 : : // Set up InsertDB as table Undo.
734 : : void AppendUndoForInsertFromDB( sal_Bool bIsTable );
735 : :
736 : : // Functions used for spell checking and text conversion.
737 : :
738 : : // Save selections.
739 : : void SpellStart( SwDocPositions eStart, SwDocPositions eEnde,
740 : : SwDocPositions eCurr, SwConversionArgs *pConvArgs = 0 );
741 : :
742 : : // Restore selections.
743 : : void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
744 : : ::com::sun::star::uno::Any SpellContinue(
745 : : sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
746 : : SwConversionArgs *pConvArgs = 0 );
747 : :
748 : : // Spells on a sentence basis - the SpellPortions are needed
749 : : // returns false if no error could be found.
750 : : bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck );
751 : :
752 : : // Make SpellIter start with the current sentence when called next time.
753 : : void PutSpellingToSentenceStart();
754 : :
755 : : // Moves the continuation position to the end of the currently checked sentence.
756 : : void MoveContinuationPosToEndOfCheckedSentence();
757 : :
758 : : // Applies a changed sentence.
759 : : void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck);
760 : :
761 : : // Check SwSpellIter data to see if the last sentence got grammar checked.
762 : : bool HasLastSentenceGotGrammarChecked() const;
763 : :
764 : : // Is text conversion active somewhere else?
765 : : sal_Bool HasConvIter() const;
766 : :
767 : : // Is hyphenation active somewhere else?
768 : : sal_Bool HasHyphIter() const;
769 : :
770 : : ::com::sun::star::uno::Reference<
771 : : ::com::sun::star::linguistic2::XSpellAlternatives >
772 : : GetCorrection( const Point* pPt, SwRect& rSelectRect );
773 : :
774 : :
775 : : bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult,
776 : : sal_Int32 /*out*/ &rErrorPosInText,
777 : : sal_Int32 /*out*/ &rErrorIndexInResult,
778 : : ::com::sun::star::uno::Sequence< rtl::OUString > /*out*/ &rSuggestions,
779 : : const Point* pPt, SwRect& rSelectRect );
780 : :
781 : : void IgnoreGrammarErrorAt( SwPaM& rErrorPosition );
782 : : void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde );
783 : :
784 : : // Return reference set in document according to given name.
785 : : const SwFmtRefMark* GetRefMark( const String& rName ) const;
786 : :
787 : : // Return names of all references set in document.
788 : : // If ArrayPointer == 0 then return only whether a RefMark is set in document.
789 : : sal_uInt16 GetRefMarks( std::vector<rtl::OUString>* = 0 ) const;
790 : :
791 : : // Call AutoCorrect
792 : : void AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsertMode = sal_True,
793 : : sal_Unicode cChar = ' ' );
794 : : sal_Bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
795 : :
796 : : // Set our styles according to the respective rules.
797 : : void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
798 : :
799 : : static SvxSwAutoFmtFlags* GetAutoFmtFlags();
800 : : static void SetAutoFmtFlags(SvxSwAutoFmtFlags *);
801 : :
802 : : // Calculates selection.
803 : : String Calculate();
804 : :
805 : : sal_Bool InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
806 : : sal_Bool bKeepSelection = sal_False );
807 : : sal_uInt16 GetINetAttrs( SwGetINetAttrs& rArr );
808 : :
809 : : String GetDropTxt( const sal_uInt16 nChars ) const;
810 : : void ReplaceDropTxt( const String &rStr, SwPaM* pPaM = NULL );
811 : :
812 : : // May an outline be moved or copied?
813 : : // Check whether it's in text body, not in table, and not read-only (move).
814 : : sal_Bool IsOutlineMovable( sal_uInt16 nIdx ) const;
815 : : sal_Bool IsOutlineCopyable( sal_uInt16 nIdx ) const;
816 : :
817 : : sal_uInt16 GetLineCount( sal_Bool bActPos = sal_True );
818 : :
819 : : // Query and set footnote-text/number. Set.. to current SSelection!
820 : : sal_Bool GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
821 : : bool SetCurFtn( const SwFmtFtn& rFillFtn );
822 : : bool HasFtns( bool bEndNotes = false ) const;
823 : :
824 : : sal_uInt16 GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
825 : : // Return list of all footnotes and their first portions of text.
826 : :
827 : : SwSection const* InsertSection(
828 : : SwSectionData & rNewData, SfxItemSet const*const = 0 );
829 : : sal_Bool IsInsRegionAvailable() const;
830 : : const SwSection* GetCurrSection() const;
831 : :
832 : : // Returns current range like Cet CurrSection(). But this function iterates
833 : : // also over frames and catches the range even if the cursor is positioned in
834 : : // a footnote the reference of which is in a columned range.
835 : : // If bOutOfTab is set, the range comprising the table is searched
836 : : // and not an inner one.
837 : : const SwSection* GetAnySection( sal_Bool bOutOfTab = sal_False, const Point* pPt = 0 ) const;
838 : :
839 : : sal_uInt16 GetSectionFmtCount() const;
840 : : sal_uInt16 GetSectionFmtPos( const SwSectionFmt& ) const;
841 : : const SwSectionFmt& GetSectionFmt(sal_uInt16 nFmt) const;
842 : : void DelSectionFmt( sal_uInt16 nFmt );
843 : : void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
844 : : SfxItemSet const*const = 0);
845 : : sal_Bool IsAnySectionInDoc( sal_Bool bChkReadOnly = sal_False,
846 : : sal_Bool bChkHidden = sal_False,
847 : : sal_Bool BChkTOX = sal_False ) const;
848 : :
849 : : String GetUniqueSectionName( const String* pChkStr = 0 ) const;
850 : :
851 : : // Set attributes.
852 : : void SetSectionAttr(const SfxItemSet& rSet, SwSectionFmt* pSectFmt = 0);
853 : :
854 : : // Search inside the cursor selection for full selected sections.
855 : : // if any part of section in the selection return 0.
856 : : // if more than one in the selection return the count.
857 : : sal_uInt16 GetFullSelectedSectionCount() const;
858 : :
859 : : // Special insert: Insert a new text node just before or after a section or
860 : : // table, if the cursor is positioned at the start/end of said
861 : : // section/table. The purpose of the method is to allow users to inert text
862 : : // at certain 'impossible' position, e.g. before a table at the document
863 : : // start or between to sections.
864 : : bool DoSpecialInsert();
865 : : bool CanSpecialInsert() const;
866 : :
867 : : // Optimizing UI.
868 : : void SetNewDoc(sal_Bool bNew = sal_True);
869 : :
870 : : sfx2::LinkManager& GetLinkManager();
871 : : inline const sfx2::LinkManager& GetLinkManager() const;
872 : :
873 : : // Adjust left margin via object bar (similar to adjustment of numerations).
874 : : // One can either change the margin "by" adding or substracting a given
875 : : // offset or set it "to" this position (bModulus = sal_True).
876 : : sal_Bool IsMoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ) const;
877 : : void MoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True );
878 : :
879 : : // Query NumberFormater from document.
880 : : SvNumberFormatter* GetNumberFormatter();
881 : : const SvNumberFormatter* GetNumberFormatter() const
882 : : { return ((SwEditShell*)this)->GetNumberFormatter(); }
883 : :
884 : : // Interfaces for GlobalDocument.
885 : : sal_Bool IsGlobalDoc() const;
886 : : void SetGlblDocSaveLinks( sal_Bool bFlag = sal_True );
887 : : sal_Bool IsGlblDocSaveLinks() const;
888 : : sal_uInt16 GetGlobalDocContent( SwGlblDocContents& rArr ) const;
889 : : sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
890 : : SwSectionData & rNew );
891 : : sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
892 : : const SwTOXBase& rTOX );
893 : : sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos );
894 : : sal_Bool DeleteGlobalDocContent( const SwGlblDocContents& rArr,
895 : : sal_uInt16 nPos );
896 : : sal_Bool MoveGlobalDocContent( const SwGlblDocContents& rArr ,
897 : : sal_uInt16 nFromPos, sal_uInt16 nToPos,
898 : : sal_uInt16 nNewPos );
899 : : sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos );
900 : :
901 : : // For Redlining.
902 : : sal_uInt16 GetRedlineMode() const;
903 : : void SetRedlineMode( sal_uInt16 eMode );
904 : : sal_Bool IsRedlineOn() const;
905 : : sal_uInt16 GetRedlineCount() const;
906 : : const SwRedline& GetRedline( sal_uInt16 nPos ) const;
907 : : sal_Bool AcceptRedline( sal_uInt16 nPos );
908 : : sal_Bool RejectRedline( sal_uInt16 nPos );
909 : :
910 : :
911 : : // Search Redline for this Data and return position in array.
912 : : // If not found, return USHRT_MAX.
913 : : sal_uInt16 FindRedlineOfData( const SwRedlineData& ) const;
914 : :
915 : :
916 : : // Set comment to Redline at position.
917 : : sal_Bool SetRedlineComment( const String& rS );
918 : : const SwRedline* GetCurrRedline() const;
919 : :
920 : : // Redline attributes have been changed. Updated views.
921 : : void UpdateRedlineAttr();
922 : :
923 : : // Compare two documents.
924 : : long CompareDoc( const SwDoc& rDoc );
925 : :
926 : : // Merge two documents.
927 : : long MergeDoc( const SwDoc& rDoc );
928 : :
929 : : // Footnote attributes global to document.
930 : : const SwFtnInfo& GetFtnInfo() const;
931 : : void SetFtnInfo(const SwFtnInfo& rInfo);
932 : : const SwEndNoteInfo& GetEndNoteInfo() const;
933 : : void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
934 : :
935 : : const SwLineNumberInfo &GetLineNumberInfo() const;
936 : : void SetLineNumberInfo( const SwLineNumberInfo& rInfo);
937 : :
938 : : // Labels: Synchronize ranges.
939 : : void SetLabelDoc( sal_Bool bFlag = sal_True );
940 : : sal_Bool IsLabelDoc() const;
941 : :
942 : : // Interface for TextInputData - (for input of Japanese/Chinese chars.)
943 : : SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
944 : : String DeleteExtTextInput( SwExtTextInput* pDel = 0, sal_Bool bInsText = sal_True);
945 : : void SetExtTextInputData( const CommandExtTextInputData& );
946 : :
947 : : // Interface for access to AutoComplete-list.
948 : : static SwAutoCompleteWord& GetAutoCompleteWords();
949 : :
950 : : // Returns a scaling factor of selected text. Used for the rotated
951 : : // character attribut dialog.
952 : : sal_uInt16 GetScalingOfSelectedText() const;
953 : :
954 : : // Ctor/Dtor.
955 : : SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 );
956 : :
957 : : // Copy-Constructor in disguise.
958 : : SwEditShell( SwEditShell&, Window* );
959 : : virtual ~SwEditShell();
960 : :
961 : : private:
962 : : // For METWARE: no copying and no assignment.
963 : : SwEditShell(const SwEditShell &);
964 : : const SwEditShell &operator=(const SwEditShell &);
965 : : };
966 : :
967 : : inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
968 : : { return ((SwEditShell*)this)->GetLinkManager(); }
969 : :
970 : : // Class for automated call of Start- and EndAction().
971 : : class SwActKontext {
972 : : SwEditShell *pSh;
973 : : public:
974 : : SwActKontext(SwEditShell *pShell);
975 : : ~SwActKontext();
976 : : };
977 : :
978 : : #define ACT_KONTEXT(x) SwActKontext _aActKontext_(x)
979 : :
980 : : // Class for automated call of Start- and EndCrsrMove().
981 : : class SwMvKontext {
982 : : SwEditShell *pSh;
983 : : public:
984 : : SwMvKontext(SwEditShell *pShell );
985 : : ~SwMvKontext();
986 : : };
987 : :
988 : : #define MV_KONTEXT(x) SwMvKontext _aMvKontext_(x)
989 : :
990 : :
991 : :
992 : : #endif
993 : :
994 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|