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