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