xref: /aoo41x/main/sw/inc/editsh.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _EDITSH_HXX
28 #define _EDITSH_HXX
29 
30 #include <com/sun/star/text/HoriOrientation.hpp>
31 #include <com/sun/star/embed/XEmbeddedObject.hpp>
32 #include <tools/string.hxx>
33 #include <svl/svarray.hxx>
34 #include <vcl/font.hxx>
35 #include <editeng/swafopt.hxx>
36 #include "swdllapi.h"
37 #include <crsrsh.hxx>	// fuer Basisklasse
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 <swundo.hxx>
48 #include <svtools/embedhlp.hxx>
49 
50 class PolyPolygon;
51 class SwDoc;
52 class DateTime;
53 class CommandExtTextInputData;
54 
55 class SvUShortsSort;
56 class SvNumberFormatter;
57 class SfxPoolItem;
58 class SfxItemSet;
59 class SvxAutoCorrect;
60 
61 class SwField;			// fuer Felder
62 class SwFieldType;
63 class SwDDEFieldType;
64 class SwNewDBMgr;
65 
66 struct SwDocStat;
67 class SvStringsDtor;
68 class SvStringsSort;
69 class SwAutoCompleteWord;
70 
71 class SwFmtRefMark;
72 
73 class SwNumRule;        // Numerierung
74 //class SwNodeNum;		// Numerierung
75 
76 class SwTxtFmtColl;
77 class SwGrfNode;
78 class SwFlyFrmFmt;
79 
80 class SwFrmFmt;			// fuer GetTxtNodeFmts()
81 class SwCharFmt;
82 class SwExtTextInput;
83 class SwRootFrm;        // fuer CTOR
84 class Graphic;			// fuer GetGraphic
85 class GraphicObject;	// fuer GetGraphicObj
86 class SwFmtINetFmt; 	// InsertURL
87 class SwTable;
88 class SwTextBlocks; 	// fuer GlossaryRW
89 class SwFmtFtn;
90 class SwSection;
91 class SwSectionData;
92 class SwSectionFmt;
93 class SwTOXMarks;
94 class SwTOXBase;
95 class SwTOXType;
96 class SwTableAutoFmt;
97 class SwPageDesc;
98 class SwTxtINetFmt;
99 class SwSeqFldList;
100 class SwGlblDocContent;
101 class SwGlblDocContents;
102 class SwRedline;
103 class SwRedlineData;
104 class SwFtnInfo;
105 class SwEndNoteInfo;
106 class SwLineNumberInfo;
107 class SwAuthEntry;
108 class SwRewriter;
109 struct SwConversionArgs;
110 
111 
112 namespace com { namespace sun { namespace star { namespace uno {
113 	template < class > class Sequence;
114 }}}}
115 
116 namespace svx{
117 struct SpellPortion;
118 typedef std::vector<SpellPortion> SpellPortions;
119 }
120 
121 namespace sfx2{
122 class LinkManager;
123 }
124 
125 namespace sw {
126     class UndoRedoContext;
127 }
128 
129 #define GETSELTXT_PARABRK_TO_BLANK      0
130 #define GETSELTXT_PARABRK_KEEP			1
131 #define GETSELTXT_PARABRK_TO_ONLYCR 	2
132 
133 /****************************************************************
134  *	zum Abfragen der INet-Attribute fuer den Navigator
135  ****************************************************************/
136 struct SwGetINetAttr
137 {
138 	String sText;
139 	const SwTxtINetFmt& rINetAttr;
140 
141 	SwGetINetAttr( const String& rTxt, const SwTxtINetFmt& rAttr )
142 		: sText( rTxt ), rINetAttr( rAttr )
143 	{}
144 };
145 SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0, 5 )
146 
147 /****************************************************************
148  *	Typen der Inhaltsformen
149  ****************************************************************/
150 #define CNT_TXT	0x0001
151 #define CNT_GRF	0x0002
152 #define CNT_OLE	0x0010
153 /* Teste einen sal_uInt16 auf eine bestimmte Inhaltsform */
154 #define CNT_HasTxt(USH)	((USH)&CNT_TXT)
155 #define CNT_HasGrf(USH)	((USH)&CNT_GRF)
156 #define CNT_HasOLE(USH)	((USH)&CNT_OLE)
157 
158 class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
159 {
160 	static SvxSwAutoFmtFlags* pAutoFmtFlags;
161 
162 	// fuer die privaten Methoden DelRange und die vom AutoCorrect
163 	friend class SwAutoFormat;
164 	friend void _InitCore();
165 	friend void _FinitCore();
166 	// fuer die PamCorrAbs/-Rel Methoden
167 	friend class SwUndo;
168 
169 	SW_DLLPRIVATE SfxPoolItem& _GetChrFmt( SfxPoolItem& ) const;
170 
171 	/*
172 	 * liefert einen Pointer auf einen SwGrfNode; dieser wird von
173 	 * GetGraphic() und GetGraphicSize() verwendet.
174 	 */
175 	SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
176 
177 	SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, sal_Bool* pUndo = 0 );
178 
179 	SW_DLLPRIVATE void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet );
180 
181     using ViewShell::UpdateFlds;
182     using SwModify::GetInfo;
183 
184 public:
185 	// Editieren (immer auf allen selektierten Bereichen)
186 	void Insert( sal_Unicode, sal_Bool bOnlyCurrCrsr = sal_False );
187     void Insert2( const String &, const bool bForceExpandHints = false );
188 	void Overwrite( const String & );
189 
190 	// Ersetz einen selektierten Bereich in einem TextNode mit dem
191 	// String. Ist fuers Suchen&Ersetzen gedacht.
192 	// bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
193 	//				 ein ( nicht \& )
194 	// 				z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
195 	//						--> "xx\t<Tab>..zzz..&"
196 	sal_Bool Replace( const String& rNewStr, sal_Bool bRegExpRplc = sal_False );
197 
198 	// loescht den Inhalt aller Bereiche;
199 	// werden ganze Nodes selektiert, werden die Nodes geloescht
200 	long Delete();
201 
202 	// remove a complete paragraph
203 	sal_Bool DelFullPara();
204 
205 	// change text to Upper/Lower/Hiragana/Katagana/...
206 	void TransliterateText( sal_uInt32 nType );
207 
208     // count words in current selection
209     void CountWords( SwDocStat& rStat ) const;
210 
211 	// loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
212 	// versteckte Bereiche, versteckte Absaetze
213 	sal_Bool RemoveInvisibleContent();
214 
215     // replace fields by text - mailmerge support
216     sal_Bool ConvertFieldsToText();
217     // set all numbering start points to a fixed value - mailmerge support
218     void SetNumberingRestart();
219 
220 	// embedded alle lokalen Links (Bereiche/Grafiken)
221 	sal_uInt16 GetLinkUpdMode(sal_Bool bDocSettings = sal_False) const;
222 	void SetLinkUpdMode( sal_uInt16 nMode );
223 
224 	// kopiere den Inhalt aller Bereiche an die akt. Cursor-Position
225 	// in die angegebene Shell
226 	long Copy( SwEditShell* pDestShell = 0 );
227 
228 	// fuers Kopieren uebers ClipBoard:
229 	// 	wird Tabelle in Tabelle kopiert, verschiebe aus dieser dann
230 	//	alle Cursor. Copy und Paste muss aufgrund der FlyFrames in
231 	// 	der FEShell stehen!
232 	// kopiere alle Selectionen und das Doc
233 	//JP 21.10.96: und fuer die SVX-Autokorrektur
234 	sal_Bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
235 
236 	long SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
237     sal_Bool AppendTxtNode();
238     void AutoFmtBySplitNode();
239 
240 	// ist der Cursor in einem INetAttribut, dann wird das komplett
241 	// geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
242 	sal_Bool DelINetAttrWithText();
243 
244 	// ist der Cursor am Ende einer Zeichenvorlage, an der das DontExpand-Flag
245 	// noch nicht gesetzt ist, wird dies gesetzt ( => return sal_True; )
246 	sal_Bool DontExpandFmt();
247 
248 	// Anwenden / Entfernen von Attributen
249 	// liefert Attribute im angeforderten AttributSet. Wenn nicht eindeutig
250 	// steht im Set ein DONT_CARE !!
251     // --> OD 2008-01-16 #newlistlevelattrs#
252     // Renaming method to <GetCurAttr(..)> indicating that the attributes at
253     // the current cursors are retrieved.
254     // Introduce 2nd optional parameter <bMergeIndentValuesOfNumRule>.
255     // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
256     // the corresponding list level of an applied list style is merged into
257     // the requested item set as a LR-SPACE item, if corresponding node has not
258     // its own indent attributes and the position-and-space mode of the list
259     // level is SvxNumberFormat::LABEL_ALIGNMENT.
260     sal_Bool GetCurAttr( SfxItemSet& ,
261                      const bool bMergeIndentValuesOfNumRule = false ) const;
262     // <--
263 	void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
264 	void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 );
265 
266 	// Setze das Attribut als neues default Attribut im Dokument.
267 	void SetDefault( const SfxPoolItem& );
268 
269 	// Erfrage das Default Attribut vom Dokument.
270 	const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
271 
272     void ResetAttr( const SvUShortsSort* pAttrs = 0 );
273 	void GCAttr();
274 
275 	// returns the scripttpye of the selection
276     sal_uInt16 GetScriptType() const;
277 
278 	// returns the language at current cursor position
279 	sal_uInt16 GetCurLang() const;
280 
281 	// TABLE
282 	sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed = sal_False ) const;
283 	SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed = sal_False ) const;
284 	String GetUniqueTblName() const;
285 
286 	// CHAR
287 	sal_uInt16 GetCharFmtCount() const;
288 	SwCharFmt& GetCharFmt(sal_uInt16 nFmt) const;
289 	SwCharFmt* GetCurCharFmt() const;
290 	void FillByEx(SwCharFmt*, sal_Bool bReset = sal_False);
291 	SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 );
292 	SwCharFmt* FindCharFmtByName( const String& rName ) const;
293 
294 
295 	/* Formatcollections, neu */
296 	/* GetXXXCount() liefert die Anzahl der im Dokument vorhandenen XXX
297 	 * GetXXX(i)	 liefert das i-te XXX (ERR_RAISE bei Ueberindizierung!)
298 	 * DelXXX(i)	 loescht das i-te XXX (ERR_RAISE bei Ueberindizierung!)
299 	 * GetCurXXX()	 liefert das am Cursor oder in den Bereichen
300 	 *				 geltende XXX (0, wenn nicht eindeutig!)
301 	 * SetXXX() 	 setzt am Cursor oder in den Bereichen das XXX
302 	 * MakeXXX()	 macht ein XXX, abgeleitet vom pDerivedFrom
303 	 */
304 
305 	// TXT
306 	SwTxtFmtColl& GetDfltTxtFmtColl() const;
307 	sal_uInt16 GetTxtFmtCollCount() const;
308 	SwTxtFmtColl& GetTxtFmtColl( sal_uInt16 nTxtFmtColl) const;
309 	SwTxtFmtColl* GetCurTxtFmtColl() const;
310     // --> OD 2007-11-06 #i62675#
311     // Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTxtFmtColl(..)>
312     void SetTxtFmtColl( SwTxtFmtColl*,
313                         bool bResetListAttrs = false );
314     // <--
315 	SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
316 		SwTxtFmtColl *pDerivedFrom = 0);
317 	void FillByEx(SwTxtFmtColl*, sal_Bool bReset = sal_False);
318 	SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
319 
320 		// Gebe die "Auto-Collection" mit der Id zurueck. Existiert
321 		// sie noch nicht, dann erzuege sie
322 	SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId );
323 		// return das geforderte automatische  Format - Basis-Klasse !
324 	SwFmt* GetFmtFromPool( sal_uInt16 nId );
325 		// returne die geforderte automatische Seiten-Vorlage
326 	SwPageDesc* GetPageDescFromPool( sal_uInt16 nId );
327 
328 	// erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
329 	sal_Bool IsUsed( const SwModify& ) const;
330 
331 		// returne das geforderte automatische Format
332 	SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId )
333 		{ return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
334 	SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId )
335 		{ return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
336 
337 	// Felder
338     void Insert2(SwField&, const bool bForceExpandHints = false);
339 	SwField* GetCurFld() const;
340 
341 	void UpdateFlds( SwField & );		// ein einzelnes Feld
342 
343 	sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
344 	SwFieldType* GetFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
345 	SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
346 
347 	void RemoveFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX);
348 	void RemoveFldType(sal_uInt16 nResId, const String& rName);
349 
350 	void FieldToText( SwFieldType* pType );
351 
352 	void ChangeAuthorityData(const SwAuthEntry* pNewData);
353 
354 	// Datenbankinfo
355 	SwDBData GetDBData() const;
356 	const SwDBData& GetDBDesc() const;
357 	void ChgDBData(const SwDBData& SwDBData);
358 	void ChangeDBFields( const SvStringsDtor& rOldNames,
359 						 const String& rNewName );
360 	void GetAllUsedDB( SvStringsDtor& rDBNameList,
361 						SvStringsDtor* pAllDBNames = 0 );
362 
363     sal_Bool IsAnyDatabaseFieldInDoc()const;
364     //check whether DB fields point to an available data source and returns it
365     sal_Bool IsFieldDataSourceAvailable(String& rUsedDataSource) const;
366 	void UpdateExpFlds(sal_Bool bCloseDB = sal_False);// nur alle ExpressionFelder updaten
367 	void SetFixFields( sal_Bool bOnlyTimeDate = sal_False,
368 						const DateTime* pNewDateTime = 0 );
369 	void LockExpFlds();
370 	void UnlockExpFlds();
371 
372     SwFldUpdateFlags GetFldUpdateFlags(sal_Bool bDocSettings = sal_False) const;
373     void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
374 
375 	// fuer die Evaluierung der DBFelder (neuer DB-Manager)
376 	SwNewDBMgr* GetNewDBMgr() const;
377 
378 	SwFieldType* InsertFldType(const SwFieldType &);
379 
380 	// Aenderungen am Dokument?
381 	sal_Bool IsModified() const;
382 	void SetModified();
383 	void ResetModified();
384 	void SetUndoNoResetModified();
385 
386 	// Dokument - Statistics
387 	void UpdateDocStat( SwDocStat& rStat );
388 
389 	// Verzeichnismarke einfuegen loeschen
390 	void 	Insert(const SwTOXMark& rMark);
391 	void	DeleteTOXMark(SwTOXMark* pMark);
392 
393 	// Alle Markierungen am aktuellen SPoint ermitteln
394 	sal_uInt16	GetCurTOXMarks(SwTOXMarks& rMarks) const ;
395 
396 	// Verzeichnis einfuegen, und bei Bedarf erneuern
397 	void				InsertTableOf(const SwTOXBase& rTOX,
398 										const SfxItemSet* pSet = 0);
399 	sal_Bool				UpdateTableOf(const SwTOXBase& rTOX,
400 										const SfxItemSet* pSet = 0);
401 	const SwTOXBase* 	GetCurTOX() const;
402 	const SwTOXBase* 	GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
403 	void				SetDefaultTOXBase(const SwTOXBase& rBase);
404 
405 	sal_Bool 				IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
406 	void 				SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly);
407 
408 	sal_uInt16				GetTOXCount() const;
409 	const SwTOXBase*	GetTOX(	sal_uInt16 nPos ) const;
410 	sal_Bool 				DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
411 
412 	// nach einlesen einer Datei alle Verzeichnisse updaten
413 	void SetUpdateTOX( sal_Bool bFlag = sal_True );
414 	sal_Bool IsUpdateTOX() const;
415 
416 	// Verzeichnis-Typen verwalten
417 	sal_uInt16				GetTOXTypeCount(TOXTypes eTyp) const;
418 	const SwTOXType* 	GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
419 	void			 	InsertTOXType(const SwTOXType& rTyp);
420 
421 	//AutoMark file
422 	const String&	GetTOIAutoMarkURL() const;
423 	void			SetTOIAutoMarkURL(const String& rSet);
424 	void 			ApplyAutoMark();
425 
426 	// Schluessel fuer die Indexverwaltung
427 	sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
428 
429 	void SetOutlineNumRule(const SwNumRule&);
430 	const SwNumRule* GetOutlineNumRule() const;
431 	// Gliederung - hoch-/runterstufen
432 	sal_Bool OutlineUpDown( short nOffset = 1 );
433 	// Gliederung - hoch-/runtermoven
434 	sal_Bool MoveOutlinePara( short nOffset = 1);
435 	// Outlines and SubOutline are protected ?
436 	sal_Bool IsProtectedOutlinePara() const;
437 
438 	// Numerierung Aufzaehlunglisten
439 	// liefert Regelwerk der aktuellen Aufzaehlung (sal_False sonst)
440 	const SwNumRule* GetCurNumRule() const;
441 
442 	// setzt, wenn noch keine Numerierung, sonst wird geaendert
443 	// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
444     // --> OD 2008-02-08 #newlistlevelattrs#
445     // Add optional parameter <bResetIndentAttrs> (default value sal_False).
446     // If <bResetIndentAttrs> equals true, the indent attributes "before text"
447     // and "first line indent" are additionally reset at the current selection,
448     // if the list style makes use of the new list level attributes.
449     // --> OD 2008-03-17 #refactorlists#
450     // introduce parameters <bCreateNewList> and <sContinuedListId>
451     // <bCreateNewList> indicates, if a new list is created by applying the
452     // given list style.
453     // If <bCreateNewList> equals sal_False, <sContinuedListId> may contain the
454     // list Id of a list, which has to be continued by applying the given list style
455     void SetCurNumRule( const SwNumRule&,
456                         const bool bCreateNewList /*= false*/,
457                         const String sContinuedListId = String(),
458                         const bool bResetIndentAttrs = false );
459     // <--
460 	// Absaetze ohne Numerierung, aber mit Einzuegen
461 	sal_Bool NoNum();
462 	// Loeschen, Splitten der Aufzaehlungsliste
463     void DelNumRules();
464 	// Hoch-/Runterstufen
465 	sal_Bool NumUpDown( sal_Bool bDown = sal_True );
466 	// Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
467 	sal_Bool MoveParagraph( long nOffset = 1);
468 	sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
469 	// No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
470 	sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True);
471     // -> #i23726#
472     // --> OD 2008-06-09 #i90078#
473     // Remove unused default parameter <nLevel> and <bRelative>.
474     // Adjust method name and parameter name
475     void ChangeIndentOfAllListLevels( short nDiff );
476     // Adjust method name
477     void SetIndent(short nIndent, const SwPosition & rPos);
478     // <--
479     sal_Bool IsFirstOfNumRule() const;
480     sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const;
481     // <- #i23726#
482 
483     sal_Bool IsNoNum( sal_Bool bChkStart = sal_True ) const;
484 	// returne den Num-Level des Nodes, in dem sich der Point vom
485 	// Cursor befindet. Return kann sein :
486 	// - NO_NUMBERING, 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
487     // --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
488 //    sal_uInt8 GetNumLevel( sal_Bool* pHasChilds = 0 ) const;
489     sal_uInt8 GetNumLevel() const;
490     // <--
491     // detect highest and lowest level to check moving of outline levels
492     void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
493 
494 
495 	// get Outline level of current paragraph
496 	int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
497 
498     // -> i29560
499     sal_Bool HasNumber() const;
500     sal_Bool HasBullet() const;
501     // <- i29560
502 
503 	String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
504 	void ChgNumRuleFmts( const SwNumRule& rRule );
505 	// setze und erfrage, ob an aktueller PointPos eine Numerierung mit
506 	// dem StartFlag startet
507 	void SetNumRuleStart( sal_Bool bFlag = sal_True );
508 	sal_Bool IsNumRuleStart() const;
509     void SetNodeNumStart( sal_uInt16 nStt );
510     // --> OD 2008-02-29 #refactorlists#
511     sal_uInt16 GetNodeNumStart() const;
512     // <--
513 	sal_Bool ReplaceNumRule( const String& rOldRule, const String& rNewRule );
514     // Searches for a text node with a numbering rule.
515     // --> OD 2008-03-18 #refactorlists# - add output parameter <sListId>
516     // in case a list style is found, <sListId> holds the list id, to which the
517     // text node belongs, which applies the found list style.
518     const SwNumRule * SearchNumRule(const bool bForward,
519                                     const bool bNum,
520                                     const bool bOutline,
521                                     int nNonEmptyAllowed,
522                                     String& sListId );
523     // <--
524 
525 	// Undo
526 	// UndoHistory am Dokument pflegen
527 	// bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
528 	void DoUndo( sal_Bool bOn = sal_True );
529 	sal_Bool DoesUndo() const;
530 	void DoGroupUndo( sal_Bool bUn = sal_True );
531 	sal_Bool DoesGroupUndo() const;
532 	void DelAllUndoObj();
533 
534 	// macht rueckgaengig:
535 	// setzt Undoklammerung auf, liefert nUndoId der Klammerung
536     SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
537 	// schliesst Klammerung der nUndoId, nicht vom UI benutzt
538     SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
539 
540     bool     GetLastUndoInfo(::rtl::OUString *const o_pStr,
541                              SwUndoId *const o_pId) const;
542     bool     GetFirstRedoInfo(::rtl::OUString *const o_pStr) const;
543     SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const;
544 
545     /// is it forbidden to modify cursors via API calls?
546     bool CursorsLocked() const;
547     /// set selections to those contained in the UndoRedoContext
548     /// should only be called by sw::UndoManager!
549     void HandleUndoRedoContext(::sw::UndoRedoContext & rContext);
550 
551     bool Undo(sal_uInt16 const nCount = 1);
552     bool Redo(sal_uInt16 const nCount = 1);
553     bool Repeat(sal_uInt16 const nCount);
554 
555 	// fuer alle Sichten auf dieses Dokument
556 	void StartAllAction();
557 	void EndAllAction();
558 
559 	//Damit Start-/EndActions aufgesetzt werden koennen.
560 	void CalcLayout();
561 
562 	// Inhaltsform bestimmen, holen, liefert Type am CurCrsr->SPoint
563 	sal_uInt16 GetCntType() const;
564 	sal_Bool HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
565 
566 	/* Anwenden der ViewOptions mit Start-/EndAction */
567 	virtual void ApplyViewOptions( const SwViewOption &rOpt );
568 
569 	// Text innerhalb der Selektion erfragen
570 	// Returnwert liefert sal_False, wenn der selektierte Bereich
571 	// zu gross ist, um in den Stringpuffer kopiert zu werden
572 	// oder andere Fehler auftreten
573 	sal_Bool GetSelectedText( String &rBuf,
574 						int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
575 
576 	/*
577 	 * liefert eine Graphic, wenn CurCrsr->Point() auf einen
578 	 * SwGrfNode zeigt (und Mark nicht gesetzt ist oder auf die
579 	 * gleiche Graphic zeigt), sonst gibt's was auf die Finger
580 	 */
581     // --> OD 2005-02-09 #119353# - robust
582     const Graphic* GetGraphic( sal_Bool bWait = sal_True ) const;
583     const GraphicObject* GetGraphicObj() const;
584     // <--
585 	sal_Bool IsGrfSwapOut( sal_Bool bOnlyLinked = sal_False ) const;
586 	sal_uInt16 GetGraphicType() const;
587 
588 	const PolyPolygon *GetGraphicPolygon() const;
589 	void SetGraphicPolygon( const PolyPolygon *pPoly );
590 
591     // If there's an automatic, not manipulated polygon at the selected
592     // notxtnode, it has to be deleted, e.g. cause the object has changed.
593     void ClearAutomaticContour();
594 
595 	/*
596 	 * liefert die Groesse einer Graphic in Twips, wenn der Cursor
597 	 * auf einer Graphic steht; sal_Bool liefert sal_False, wenn s.o.
598 	 */
599 	sal_Bool GetGrfSize(Size&) const;
600 	/*
601 	 * liefert den Namen und den Filter einer Graphic, wenn der Cursor
602 	 * auf einer Graphic steht, sonst gibt's was auf die Finger!
603 	 * Ist ein String-Ptr != 0 dann returne den entsp. Namen
604 	 */
605 	void GetGrfNms( String* pGrfName, String* pFltName,
606 					const SwFlyFrmFmt* = 0 ) const;
607 	/*
608 	 * erneutes Einlesen, falls Graphic nicht Ok ist. Die
609 	 * aktuelle wird durch die neue ersetzt.
610 	 */
611 	void ReRead( const String& rGrfName, const String& rFltName,
612 				  const Graphic* pGraphic = 0,
613 				  const GraphicObject* pGrafObj = 0 );
614 
615 //    // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
616 //    const String& GetAlternateText() const;
617 //    void SetAlternateText( const String& rTxt );
618 
619 	//eindeutige Identifikation des Objektes (fuer ImageMapDlg)
620 	void    *GetIMapInventor() const;
621     // --> OD 2007-03-01 #i73788#
622     // remove default parameter, because method always called this default value
623     Graphic GetIMapGraphic() const; //liefert eine Graphic fuer alle Flys!
624     // <--
625 	const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_uInt8 nNdTyp = 0 ) const;
626 
627 	//liefert ein ClientObject, wenn CurCrsr->Point() auf einen
628 	//SwOLENode zeigt (und Mark nicht gesetzt ist oder auf das
629 	//gleiche ClientObject zeigt), sonst gibt's was auf die
630 	//Finger.
631     svt::EmbeddedObjectRef&  GetOLEObject() const;
632 	//Gibt es ein OleObject mit diesem Namen (SwFmt)?
633 	sal_Bool HasOLEObj( const String &rName ) const;
634 
635 	//Liefert den Pointer auf die Daten des Chart, indem sich der Crsr
636 	//befindet.
637 	void SetChartName( const String &rName );
638 
639 	//Updaten der Inhalte aller Charts zu der Tabelle mit dem angegeben Namen
640 	void UpdateCharts( const String &rName );
641 
642 	//	aktuelles Wort erfragen
643 	String GetCurWord();
644 
645 	// Textbaustein aus dem Textbausteindokument in
646 	// das aktuelle Dokument, Vorlagen nur wenn es nicht schon gibt
647 	void InsertGlossary( SwTextBlocks& rGlossary, const String& );
648 	// aktuelle Selektion zum Textbaustein machen und ins
649 	// Textbausteindokument einfuegen, einschliesslich Vorlagen
650 	sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const String& rName,
651 						 const String& rShortName, sal_Bool bSaveRelFile = sal_False,
652                          const String* pOnlyTxt=0 );
653 	// speicher den gesamten Inhalt des Docs als Textbaustein
654 	sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
655 							const String& rShortName,
656 							sal_Bool bSaveRelFile = sal_False,
657                             sal_Bool bOnlyTxt = sal_False );
658 
659 	// Linguistik
660 	// Selektionen sichern
661 	void HyphStart( SwDocPositions eStart, SwDocPositions eEnde );
662 	// Selektionen wiederherstellen
663 	void HyphEnd();
664     com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
665 				HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
666 	// zu trennendes Wort ignorieren
667 	void HyphIgnore();
668 
669 	// zum Einfuegen des SoftHyphens, Position ist der Offset
670 	// innerhalb des getrennten Wortes.
671 	void InsertSoftHyph( const xub_StrLen nHyphPos );
672 
673 	//Tabelle
674     const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts,  // ALL_TBL_INS_ATTR
675                                 sal_uInt16 nRows, sal_uInt16 nCols,
676                                 sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
677                                 const SwTableAutoFmt* pTAFmt = 0 );
678 
679     void InsertDDETable( const SwInsertTableOptions& rInsTblOpts,  // HEADLINE_NO_BORDER
680                          SwDDEFieldType* pDDEType,
681                          sal_uInt16 nRows, sal_uInt16 nCols,
682                          sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL );
683 
684     void UpdateTable();
685 	void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
686 
687 	SwFrmFmt *GetTableFmt();
688     sal_Bool TextToTable( const SwInsertTableOptions& rInsTblOpts,  //ALL_TBL_INS_ATTR
689                       sal_Unicode cCh,
690                       sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
691                       const SwTableAutoFmt* pTAFmt = 0 );
692 	sal_Bool TableToText( sal_Unicode cCh );
693 	sal_Bool IsTextToTableAvailable() const;
694 
695 	sal_Bool GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
696 	void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
697 
698 	sal_Bool IsTableBoxTextFormat() const;
699 	String GetTableBoxText() const;
700 
701 	// Change Modus erfragen/setzen
702     TblChgMode GetTblChgMode() const;
703     void SetTblChgMode( TblChgMode eMode );
704 
705 	// Tabelle an der Cursor Position aufsplitten
706 	sal_Bool SplitTable( sal_uInt16 eMode );
707 	// Tabellen verbinden
708 	// CanMerge kann feststellen, ob Prev oder Next moeglich ist. Wird
709 	// der Pointer pChkNxtPrv uebergeben, wird festgestellt in welche
710 	// Richtung es moeglich ist.
711 	sal_Bool CanMergeTable( sal_Bool bWithPrev = sal_True, sal_Bool* pChkNxtPrv = 0 ) const;
712 	sal_Bool MergeTable( sal_Bool bWithPrev = sal_True, sal_uInt16 nMode = 0 );
713 		// setze das InsertDB als Tabelle Undo auf:
714 	void AppendUndoForInsertFromDB( sal_Bool bIsTable );
715 
716     /*
717         functions used for spell checking and text conversion
718     */
719 
720 	// Selektionen sichern
721 	void SpellStart( SwDocPositions eStart, SwDocPositions eEnde,
722                      SwDocPositions eCurr, SwConversionArgs *pConvArgs = 0 );
723     // Selektionen wiederherstellen
724     void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
725     ::com::sun::star::uno::Any SpellContinue(
726                     sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
727                     SwConversionArgs *pConvArgs = 0 );
728 
729     // spells on a sentence basis - the SpellPortions are needed
730     // returns false if no error could be found
731     bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck );
732     // make SpellIter start with the current sentence when called next time
733     void PutSpellingToSentenceStart();
734     // moves the continuation position to the end of the currently checked sentence
735     void MoveContinuationPosToEndOfCheckedSentence();
736     //applies a changed sentence
737     void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck);
738 
739 
740     // check SwSpellIter data to see if the last sentence got grammar checked
741     bool HasLastSentenceGotGrammarChecked() const;
742     // Is text conversion active somewhere else?
743     sal_Bool HasConvIter() const;
744 	// Is hyphenation active somewhere else?
745 	sal_Bool HasHyphIter() const;
746 
747 	::com::sun::star::uno::Reference<
748 		::com::sun::star::linguistic2::XSpellAlternatives >
749             GetCorrection( const Point* pPt, SwRect& rSelectRect );
750 
751 
752     bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult,
753             sal_Int32 /*out*/ &rErrorPosInText,
754             sal_Int32 /*out*/ &rErrorIndexInResult,
755             ::com::sun::star::uno::Sequence< rtl::OUString > /*out*/ &rSuggestions,
756             const Point* pPt, SwRect& rSelectRect );
757 
758     void IgnoreGrammarErrorAt( SwPaM& rErrorPosition );
759     void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde );
760 
761 	// returne zum Namen die im Doc gesetzte Referenz
762 	const SwFmtRefMark* GetRefMark( const String& rName ) const;
763 	// returne die Namen aller im Doc gesetzten Referenzen
764 	// 	Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
765 	//	gesetzt ist
766 	sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
767 
768 	// rufe die Autokorrektur auf
769 	void AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsertMode = sal_True,
770 						sal_Unicode cChar = ' ' );
771 	sal_Bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
772 
773 	// dann setze nach entsprechenden Regeln unsere Vorlagen
774 	void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
775 
776 	static SvxSwAutoFmtFlags* GetAutoFmtFlags();
777 	static void SetAutoFmtFlags(SvxSwAutoFmtFlags *);
778 
779 	// errechnet die Selektion
780 	String Calculate();
781 
782 	sal_Bool InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
783 					sal_Bool bKeepSelection = sal_False );
784 	sal_uInt16 GetINetAttrs( SwGetINetAttrs& rArr );
785 
786 	//SS Fuer holen/ersetzen DropCap-Inhalt
787 	String GetDropTxt( const sal_uInt16 nChars ) const;
788 	void   ReplaceDropTxt( const String &rStr );
789 
790     // may an outline be moved or copied?
791     // Check whether it's in text body, not in table, and not read-only (move)
792 	sal_Bool IsOutlineMovable( sal_uInt16 nIdx ) const;
793 	sal_Bool IsOutlineCopyable( sal_uInt16 nIdx ) const;
794 
795 	sal_uInt16 GetLineCount( sal_Bool bActPos = sal_True );
796 
797 	// erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
798 	sal_Bool GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
799     bool SetCurFtn( const SwFmtFtn& rFillFtn );
800     bool HasFtns( bool bEndNotes = false ) const;
801 //z.Zt nicht benoetigt	sal_uInt16 GetFtnCnt( sal_Bool bEndNotes = sal_False ) const;
802 		// gebe Liste aller Fussnoten und deren Anfangstexte
803     sal_uInt16 GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
804 
805     SwSection const* InsertSection(
806             SwSectionData & rNewData, SfxItemSet const*const = 0 );
807 	sal_Bool IsInsRegionAvailable() const;
808 	const SwSection* GetCurrSection() const;
809 	// liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion
810 	// ueber die Frames und erwischt dabei auch den Bereich, wenn der Cursor in einer
811 	// Fussnote steht, deren Referenz in einem spaltigen Bereich steckt.
812 	// Wenn man bOutOfTab setzt, wird der Bereich gesucht,
813 	// der die Tabelle umfasst, nicht etwa ein innerer.
814     const SwSection* GetAnySection( sal_Bool bOutOfTab = sal_False, const Point* pPt = 0 ) const;
815 
816 	sal_uInt16 GetSectionFmtCount() const;
817 	sal_uInt16 GetSectionFmtPos( const SwSectionFmt& ) const;
818 	const SwSectionFmt& GetSectionFmt(sal_uInt16 nFmt) const;
819 	void DelSectionFmt( sal_uInt16 nFmt );
820     void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
821             SfxItemSet const*const  = 0);
822 	sal_Bool IsAnySectionInDoc( sal_Bool bChkReadOnly = sal_False,
823 							sal_Bool bChkHidden = sal_False,
824 							sal_Bool BChkTOX = sal_False ) const;
825 
826 	String GetUniqueSectionName( const String* pChkStr = 0 ) const;
827 
828 	//Attribute setzen
829 	void SetSectionAttr(const SfxItemSet& rSet, SwSectionFmt* pSectFmt = 0);
830 
831 	// search inside the cursor selection for full selected sections.
832 	// if any part of section in the selection return 0.
833 	// if more than one in the selection return the count
834 	sal_uInt16 GetFullSelectedSectionCount() const;
835 
836     // special insert: Insert a new text node just before or after a section or
837     // table, if the cursor is positioned at the start/end of said
838     // section/table. The purpose of the method is to allow users to inert text
839     // at certain 'impossible' position, e.g. before a table at the document
840     // start or between to sections.
841 	bool DoSpecialInsert();
842 	bool CanSpecialInsert() const;
843 
844 	// Optimierung UI
845 	void SetNewDoc(sal_Bool bNew = sal_True);
846 
847     sfx2::LinkManager& GetLinkManager();
848 	inline const sfx2::LinkManager& GetLinkManager() const;
849 
850 	// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
851 	// Numerierungen), optional kann man "um" den Offset stufen oder "auf"
852 	// die Position gestuft werden (bModulus = sal_True)
853 	sal_Bool IsMoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ) const;
854 	void MoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True );
855 
856 	// Numberformatter vom Doc erfragen
857 		  SvNumberFormatter* GetNumberFormatter();
858 	const SvNumberFormatter* GetNumberFormatter() const
859 	{	return ((SwEditShell*)this)->GetNumberFormatter(); 	}
860 
861 	// Schnitstellen fuers GlobalDokument
862 	sal_Bool IsGlobalDoc() const;
863 	void SetGlblDocSaveLinks( sal_Bool bFlag = sal_True );
864 	sal_Bool IsGlblDocSaveLinks() const;
865 	sal_uInt16 GetGlobalDocContent( SwGlblDocContents& rArr ) const;
866 	sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
867                                  SwSectionData & rNew );
868 	sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
869 								 const SwTOXBase& rTOX );
870 	sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos );
871 	sal_Bool DeleteGlobalDocContent( const SwGlblDocContents& rArr,
872 								sal_uInt16 nPos );
873 	sal_Bool MoveGlobalDocContent( const SwGlblDocContents& rArr ,
874 								sal_uInt16 nFromPos, sal_uInt16 nToPos,
875 								sal_uInt16 nNewPos );
876 	sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos );
877 
878 	// alles fuers Redlining
879 	sal_uInt16 GetRedlineMode() const;
880 	void SetRedlineMode( sal_uInt16 eMode );
881 	sal_Bool IsRedlineOn() const;
882 	sal_uInt16 GetRedlineCount() const;
883 	const SwRedline& GetRedline( sal_uInt16 nPos ) const;
884 	sal_Bool AcceptRedline( sal_uInt16 nPos );
885 	sal_Bool RejectRedline( sal_uInt16 nPos );
886 	// suche das Redline zu diesem Data und returne die Pos im Array
887 	// USHRT_MAX wird returnt, falls nicht vorhanden
888 	sal_uInt16 FindRedlineOfData( const SwRedlineData& ) const;
889 
890 	// Kommentar am Redline an der Position setzen
891 	sal_Bool SetRedlineComment( const String& rS );
892 	const SwRedline* GetCurrRedline() const;
893 
894 	// Redline Anzeigeattribute wurden geaendert, Views updaten
895 	void UpdateRedlineAttr();
896 
897 	//  vergleiche zwei Dokument mit einander
898 	long CompareDoc( const SwDoc& rDoc );
899 	// merge zweier Dokumente
900 	long MergeDoc( const SwDoc& rDoc );
901 
902 	// Dokumentglobale Fussnoteneigenschaften
903 	const SwFtnInfo& GetFtnInfo() const;
904 	void  SetFtnInfo(const SwFtnInfo& rInfo);
905 	const SwEndNoteInfo& GetEndNoteInfo() const;
906 	void  SetEndNoteInfo(const SwEndNoteInfo& rInfo);
907 
908 	//Einstellungen fuer Zeilennummierung
909 	const SwLineNumberInfo &GetLineNumberInfo() const;
910 	void  SetLineNumberInfo( const SwLineNumberInfo& rInfo);
911 
912 	// Etiketten: Bereiche synchronisieren
913 	void SetLabelDoc( sal_Bool bFlag = sal_True );
914 	sal_Bool IsLabelDoc() const;
915 
916 	// Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
917 	// von japanischen/chinesischen Zeichen)
918     SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
919     String DeleteExtTextInput( SwExtTextInput* pDel = 0, sal_Bool bInsText = sal_True);
920 //	SwExtTextInput* GetExtTextInput() const;
921 	void SetExtTextInputData( const CommandExtTextInputData& );
922 
923 	// Schnistelle fuer den Zugriff auf die AutoComplete-Liste
924 	static SwAutoCompleteWord& GetAutoCompleteWords();
925 
926 	// returns a scaling factor of selected text. Used for the rotated
927 	// character attribut dialog.
928 	sal_uInt16 GetScalingOfSelectedText() const;
929 
930 	// ctor/dtor
931     SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 );
932 	// verkleideter Copy-Constructor
933 	SwEditShell( SwEditShell&, Window* );
934 	virtual ~SwEditShell();
935 
936 private:
937 	// fuer METWARE:
938 	// es wird nicht kopiert und nicht zugewiesen
939 	SwEditShell(const SwEditShell &);
940 	const SwEditShell &operator=(const SwEditShell &);
941 };
942 
943 inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
944 {	return ((SwEditShell*)this)->GetLinkManager();	}
945 
946 /*
947  * Klasse fuer den automatisierten Aufruf von Start- und
948  * EndAction();
949  */
950 class SwActKontext {
951 	SwEditShell *pSh;
952 public:
953 	SwActKontext(SwEditShell *pShell);
954 	~SwActKontext();
955 };
956 
957 #define ACT_KONTEXT(x)	SwActKontext _aActKontext_(x)
958 
959 /*
960  * Klasse fuer den automatisierten Aufruf von Start- und
961  * EndCrsrMove();
962  */
963 class SwMvKontext {
964 	SwEditShell *pSh;
965 public:
966 	SwMvKontext(SwEditShell *pShell );
967 	~SwMvKontext();
968 };
969 
970 #define MV_KONTEXT(x)	SwMvKontext _aMvKontext_(x)
971 
972 
973 
974 #endif
975