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 SW_CRSRSH_HXX
24cdf0e10cSrcweir #define SW_CRSRSH_HXX
25cdf0e10cSrcweir
26cdf0e10cSrcweir #include <com/sun/star/i18n/WordType.hpp>
27cdf0e10cSrcweir
28cdf0e10cSrcweir #include <tools/string.hxx>
29cdf0e10cSrcweir #include <tools/link.hxx>
30cdf0e10cSrcweir #include <tools/rtti.hxx>
31cdf0e10cSrcweir
32cdf0e10cSrcweir #include <IShellCursorSupplier.hxx>
33cdf0e10cSrcweir #include "swdllapi.h"
34cdf0e10cSrcweir #include <swtypes.hxx> // fuer SWPOSDOC
35cdf0e10cSrcweir #include <viewsh.hxx> // fuer ViewShell
36cdf0e10cSrcweir #include <calbck.hxx> // fuer SwClient
37cdf0e10cSrcweir #include <cshtyp.hxx> // fuer die CursorShell Typen
38cdf0e10cSrcweir #include <crstate.hxx> // fuer die CursorMove-Staties
39cdf0e10cSrcweir #include <toxe.hxx> // SwTOXSearchDir
40cdf0e10cSrcweir #include <tblsel.hxx> //SwTblSearchType
41cdf0e10cSrcweir #include <viscrs.hxx>
42cdf0e10cSrcweir #include <node.hxx>
43cdf0e10cSrcweir #include <tblsel.hxx>
44cdf0e10cSrcweir #include <IDocumentMarkAccess.hxx>
45cdf0e10cSrcweir
46cdf0e10cSrcweir
47cdf0e10cSrcweir // einige Forward Deklarationen
48cdf0e10cSrcweir
49cdf0e10cSrcweir class KeyCode;
50cdf0e10cSrcweir class SfxItemSet;
51cdf0e10cSrcweir class SfxPoolItem;
52cdf0e10cSrcweir class SwCntntFrm;
53cdf0e10cSrcweir class SwCrsrShell;
54cdf0e10cSrcweir class SwCursor;
55cdf0e10cSrcweir class SwField;
56cdf0e10cSrcweir class SwFieldType;
57cdf0e10cSrcweir class SwFmt;
58cdf0e10cSrcweir class SwFmtFld;
59cdf0e10cSrcweir class SwNodeIndex;
60cdf0e10cSrcweir class SwPaM;
61cdf0e10cSrcweir class SwShellCrsr;
62cdf0e10cSrcweir class SwShellTableCrsr;
63cdf0e10cSrcweir class SwTableNode;
64cdf0e10cSrcweir class SwTxtFmtColl;
65cdf0e10cSrcweir class SwVisCrsr;
66cdf0e10cSrcweir class SwTxtINetFmt;
67cdf0e10cSrcweir class SwFmtINetFmt;
68cdf0e10cSrcweir class SwTxtAttr;
69cdf0e10cSrcweir class SwTableBox;
70cdf0e10cSrcweir class SwCellFrms;
71cdf0e10cSrcweir class SwTOXMark;
72cdf0e10cSrcweir class SwRedline;
73cdf0e10cSrcweir class IBlockCursor;
7469a74367SOliver-Rainer Wittmann class SwCntntNode;
75cdf0e10cSrcweir class SwPostItField;
7669a74367SOliver-Rainer Wittmann class SwTxtFld;
77cdf0e10cSrcweir struct SwPosition;
78cdf0e10cSrcweir
79cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace util {
80cdf0e10cSrcweir struct SearchOptions;
81cdf0e10cSrcweir } } } }
82cdf0e10cSrcweir
83cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace text {
84cdf0e10cSrcweir class XTextRange;
85cdf0e10cSrcweir }}}}
86cdf0e10cSrcweir
87cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace container {
88cdf0e10cSrcweir class XStringKeyMap;
89cdf0e10cSrcweir }}}}
90cdf0e10cSrcweir
91cdf0e10cSrcweir // enum und struktur, um ueber die Doc-Position Informationen zu erfragen
92cdf0e10cSrcweir
93cdf0e10cSrcweir struct SwContentAtPos
94cdf0e10cSrcweir {
95cdf0e10cSrcweir enum IsAttrAtPos
96cdf0e10cSrcweir {
97cdf0e10cSrcweir SW_NOTHING = 0x0000,
98cdf0e10cSrcweir SW_FIELD = 0x0001,
99cdf0e10cSrcweir SW_CLICKFIELD = 0x0002,
100cdf0e10cSrcweir SW_FTN = 0x0004,
101cdf0e10cSrcweir SW_INETATTR = 0x0008,
102cdf0e10cSrcweir SW_TABLEBOXFML = 0x0010,
103cdf0e10cSrcweir SW_REDLINE = 0x0020,
104cdf0e10cSrcweir SW_OUTLINE = 0x0040,
105cdf0e10cSrcweir SW_TOXMARK = 0x0080,
106cdf0e10cSrcweir SW_REFMARK = 0x0100,
107cdf0e10cSrcweir SW_NUMLABEL = 0x0200, // #i23726#
108cdf0e10cSrcweir SW_CONTENT_CHECK = 0x0400, // --> FME 2005-05-13 #i43742# <--
109cdf0e10cSrcweir SW_SMARTTAG = 0x0800,
110cdf0e10cSrcweir SW_FORMCTRL = 0x1000
111cdf0e10cSrcweir #ifndef PRODUCT
112cdf0e10cSrcweir ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen
113cdf0e10cSrcweir ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen
114cdf0e10cSrcweir #endif
115cdf0e10cSrcweir } eCntntAtPos;
116cdf0e10cSrcweir
117cdf0e10cSrcweir union {
118cdf0e10cSrcweir const SwField* pFld;
119cdf0e10cSrcweir const SfxPoolItem* pAttr;
120cdf0e10cSrcweir const SwRedline* pRedl;
121cdf0e10cSrcweir SwCntntNode * pNode; // #i23726#
122cdf0e10cSrcweir const sw::mark::IFieldmark* pFldmark;
123cdf0e10cSrcweir } aFnd;
124cdf0e10cSrcweir
125cdf0e10cSrcweir int nDist; // #i23726#
126cdf0e10cSrcweir
127cdf0e10cSrcweir String sStr;
128cdf0e10cSrcweir const SwTxtAttr* pFndTxtAttr;
129cdf0e10cSrcweir
SwContentAtPosSwContentAtPos130cdf0e10cSrcweir SwContentAtPos( int eGetAtPos = 0xffff )
131cdf0e10cSrcweir : eCntntAtPos( (IsAttrAtPos)eGetAtPos )
132cdf0e10cSrcweir {
133cdf0e10cSrcweir aFnd.pFld = 0;
134cdf0e10cSrcweir pFndTxtAttr = 0;
135cdf0e10cSrcweir nDist = 0; // #i23726#
136cdf0e10cSrcweir }
137cdf0e10cSrcweir
138cdf0e10cSrcweir // befindet sich der Node in einem geschuetzten Bereich?
139cdf0e10cSrcweir sal_Bool IsInProtectSect() const;
140cdf0e10cSrcweir bool IsInRTLText()const;
141cdf0e10cSrcweir };
142cdf0e10cSrcweir
143cdf0e10cSrcweir // ReturnWerte von SetCrsr (werden verodert)
144cdf0e10cSrcweir const int CRSR_POSOLD = 0x01, // Cursor bleibt an alter Doc-Position
145cdf0e10cSrcweir CRSR_POSCHG = 0x02; // Position vom Layout veraendert
146cdf0e10cSrcweir
147cdf0e10cSrcweir // Helperfunction to resolve backward references in regular expressions
148cdf0e10cSrcweir
149cdf0e10cSrcweir String *ReplaceBackReferences( const com::sun::star::util::SearchOptions& rSearchOpt, SwPaM* pPam );
150cdf0e10cSrcweir
151cdf0e10cSrcweir // die Cursor - Shell
152cdf0e10cSrcweir class SW_DLLPUBLIC SwCrsrShell
153cdf0e10cSrcweir : public ViewShell
154cdf0e10cSrcweir , public SwModify
155cdf0e10cSrcweir , public ::sw::IShellCursorSupplier
156cdf0e10cSrcweir {
157cdf0e10cSrcweir friend class SwCallLink;
158cdf0e10cSrcweir friend class SwVisCrsr;
159cdf0e10cSrcweir friend class SwSelPaintRects;
160cdf0e10cSrcweir friend class SwChgLinkFlag;
161cdf0e10cSrcweir
162cdf0e10cSrcweir //Braucht den Crsr als IntrnlCrsr.
163cdf0e10cSrcweir friend sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
164cdf0e10cSrcweir
165cdf0e10cSrcweir public: // public, damit defaultet werden kann !!
166cdf0e10cSrcweir
167cdf0e10cSrcweir /* ein enum fuer den Aufruf von UpdateCrsr */
168cdf0e10cSrcweir enum CrsrFlag {
169cdf0e10cSrcweir UPDOWN = (1 << 0), // Up/Down auf Spalte halten
170cdf0e10cSrcweir SCROLLWIN = (1 << 1), // Window Scrollen
171cdf0e10cSrcweir CHKRANGE = (1 << 2), // ueberpruefen von ueberlappenden PaM's
172cdf0e10cSrcweir NOCALRECT = (1 << 3), // CharRect nicht neu berechnen
173cdf0e10cSrcweir READONLY = (1 << 4) // Sichtbar machen trotz Readonly
174cdf0e10cSrcweir };
175cdf0e10cSrcweir
176cdf0e10cSrcweir private:
177cdf0e10cSrcweir
178cdf0e10cSrcweir SwRect aCharRect; // Char-SRectangle auf dem der Cursor steht
179cdf0e10cSrcweir Point aCrsrHeight; // Hohe&Offset von sichtbaren Cursor
180cdf0e10cSrcweir Point aOldRBPos; // Right/Bottom von letzter VisArea
181cdf0e10cSrcweir // (wird im Invalidate vom Cursor benutzt)
182cdf0e10cSrcweir
183cdf0e10cSrcweir
184cdf0e10cSrcweir // um event. Macro was anhaengt auszufuehren.
185cdf0e10cSrcweir Link aFlyMacroLnk; // Link will be called, if the Crsr is set
186cdf0e10cSrcweir // into a fly. A macro can be then becalled
187cdf0e10cSrcweir Link aChgLnk; // link will be called by every attribut/
188cdf0e10cSrcweir // format changes at cursor position.
189cdf0e10cSrcweir Link aGrfArrivedLnk; // Link calls to UI if a grafik is arrived
190cdf0e10cSrcweir
191cdf0e10cSrcweir
192cdf0e10cSrcweir SwShellCrsr* pCurCrsr; // der aktuelle Cursor
193cdf0e10cSrcweir SwShellCrsr* pCrsrStk; // Stack fuer den Cursor
194cdf0e10cSrcweir SwVisCrsr *pVisCrsr; // der Sichtbare-Cursor
195cdf0e10cSrcweir
196cdf0e10cSrcweir IBlockCursor *pBlockCrsr; // interface of cursor for block (=rectangular) selection
197cdf0e10cSrcweir
198cdf0e10cSrcweir SwShellTableCrsr* pTblCrsr; // Tabellen-Crsr; nur in Tabellen, wenn
199cdf0e10cSrcweir // die Selection ueber 2 Spalten liegt
200cdf0e10cSrcweir
201cdf0e10cSrcweir SwNodeIndex* pBoxIdx; // fuers erkennen der veraenderten
202cdf0e10cSrcweir SwTableBox* pBoxPtr; // Tabellen-Zelle
203cdf0e10cSrcweir
204cdf0e10cSrcweir long nUpDownX; // versuche den Cursor bei Up/Down immer in
205cdf0e10cSrcweir // der gleichen Spalte zu bewegen
206cdf0e10cSrcweir long nLeftFrmPos;
207cdf0e10cSrcweir sal_uLong nAktNode; // save CursorPos at Start-Action
208cdf0e10cSrcweir xub_StrLen nAktCntnt;
209cdf0e10cSrcweir sal_uInt16 nAktNdTyp;
210cdf0e10cSrcweir bool bAktSelection;
211cdf0e10cSrcweir
212cdf0e10cSrcweir /*
213cdf0e10cSrcweir * Mit den Methoden SttCrsrMove und EndCrsrMove wird dieser Zaehler
214cdf0e10cSrcweir * Inc-/Decrementiert. Solange der Zaehler ungleich 0 ist, erfolgt
215cdf0e10cSrcweir * auf den akt. Cursor kein Update. Dadurch koennen "komplizierte"
216cdf0e10cSrcweir * Cursorbewegungen (ueber Find()) realisiert werden.
217cdf0e10cSrcweir */
218cdf0e10cSrcweir sal_uInt16 nCrsrMove;
219cdf0e10cSrcweir sal_uInt16 nBasicActionCnt; // Actions, die vom Basic geklammert wurden
220cdf0e10cSrcweir CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
221cdf0e10cSrcweir
222cdf0e10cSrcweir String sMarkedListId;
223cdf0e10cSrcweir int nMarkedListLevel;
224cdf0e10cSrcweir
225cdf0e10cSrcweir sal_Bool bHasFocus : 1; // Shell ist in einem Window "aktiv"
226cdf0e10cSrcweir sal_Bool bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
227cdf0e10cSrcweir sal_Bool bChgCallFlag : 1; // Attributaenderung innerhalb von
228cdf0e10cSrcweir // Start- und EndAction
229cdf0e10cSrcweir sal_Bool bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
230cdf0e10cSrcweir // (wird im Invalidate vom Cursor benutzt)
231cdf0e10cSrcweir
232cdf0e10cSrcweir sal_Bool bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
233cdf0e10cSrcweir // sal_True -> ChgLnk callen
234cdf0e10cSrcweir // Zugriff nur ueber SwChgLinkFlag
235cdf0e10cSrcweir sal_Bool bAllProtect : 1; // Flag fuer Bereiche
236cdf0e10cSrcweir // sal_True -> alles geschuetzt / versteckt
237cdf0e10cSrcweir sal_Bool bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
238cdf0e10cSrcweir // sal_True -> die Sicht wurde verschoben
239cdf0e10cSrcweir sal_Bool bGCAttr : 1; // sal_True -> es existieren nichtaufgespannte Attr.
240cdf0e10cSrcweir sal_Bool bIgnoreReadonly : 1; // sal_True -> Beim naechsten EndAction trotz
241cdf0e10cSrcweir // Readonly den Crsr sichtbar machen.
242cdf0e10cSrcweir sal_Bool bSelTblCells : 1; // sal_True -> Zellen uebers InputWin selektieren
243cdf0e10cSrcweir sal_Bool bAutoUpdateCells : 1; // sal_True -> Zellen werden autoformatiert
244cdf0e10cSrcweir sal_Bool bBasicHideCrsr : 1; // sal_True -> HideCrsr vom Basic
245cdf0e10cSrcweir sal_Bool bSetCrsrInReadOnly : 1;// sal_True -> Cursor darf in ReadOnly-Bereiche
246cdf0e10cSrcweir sal_Bool bOverwriteCrsr : 1; // sal_True -> show Overwrite Crsr
247cdf0e10cSrcweir
248cdf0e10cSrcweir // OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true)
249cdf0e10cSrcweir bool mbMacroExecAllowed : 1;
250cdf0e10cSrcweir
25169a74367SOliver-Rainer Wittmann SW_DLLPRIVATE void UpdateCrsr(
25269a74367SOliver-Rainer Wittmann sal_uInt16 eFlags = SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
25369a74367SOliver-Rainer Wittmann sal_Bool bIdleEnd = sal_False );
254cdf0e10cSrcweir
255cdf0e10cSrcweir SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
256cdf0e10cSrcweir
257cdf0e10cSrcweir // -> #i27615#
258cdf0e10cSrcweir
259cdf0e10cSrcweir /** Mark a certain list level of a certain list
260cdf0e10cSrcweir
261cdf0e10cSrcweir OD 2008-04-02 #refactorlists#
262cdf0e10cSrcweir levels of a certain lists are marked now
263cdf0e10cSrcweir
264cdf0e10cSrcweir @param sListId list Id of the list whose level is marked
265cdf0e10cSrcweir @param nLevel to be marked list level
266cdf0e10cSrcweir
267cdf0e10cSrcweir An empty sListId denotes that no level of a list is marked.
268cdf0e10cSrcweir */
269cdf0e10cSrcweir SW_DLLPRIVATE void MarkListLevel( const String& sListId,
270cdf0e10cSrcweir const int nLevel );
271cdf0e10cSrcweir // <- #i27615#
272cdf0e10cSrcweir
273cdf0e10cSrcweir // private method(s) accessed from public inline method(s) must be exported.
274cdf0e10cSrcweir sal_Bool LeftRight( sal_Bool, sal_uInt16, sal_uInt16, sal_Bool );
275cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool UpDown( sal_Bool, sal_uInt16 );
276cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool LRMargin( sal_Bool, sal_Bool bAPI = sal_False );
277cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool IsAtLRMargin( sal_Bool, sal_Bool bAPI = sal_False ) const;
278cdf0e10cSrcweir
279cdf0e10cSrcweir SW_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const;
280cdf0e10cSrcweir
281cdf0e10cSrcweir typedef sal_Bool (SwCursor:: *FNCrsr)();
282cdf0e10cSrcweir SW_DLLPRIVATE sal_Bool CallCrsrFN( FNCrsr );
283cdf0e10cSrcweir
284cdf0e10cSrcweir SW_DLLPRIVATE const SwRedline* _GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect );
285cdf0e10cSrcweir
286cdf0e10cSrcweir protected:
287cdf0e10cSrcweir
288cdf0e10cSrcweir inline SwMoveFnCollection* MakeFindRange( sal_uInt16, sal_uInt16, SwPaM* ) const;
289cdf0e10cSrcweir
290cdf0e10cSrcweir /*
291cdf0e10cSrcweir * Compare-Methode for the StackCursor and the current Cursor.
292cdf0e10cSrcweir * The Methods return -1, 0, 1 for lower, equal, greater. The enum
293cdf0e10cSrcweir * CrsrCompareType says which position is compared.
294cdf0e10cSrcweir */
295cdf0e10cSrcweir enum CrsrCompareType {
296cdf0e10cSrcweir StackPtStackMk,
297cdf0e10cSrcweir StackPtCurrPt,
298cdf0e10cSrcweir StackPtCurrMk,
299cdf0e10cSrcweir StackMkCurrPt,
300cdf0e10cSrcweir StackMkCurrMk,
301cdf0e10cSrcweir CurrPtCurrMk
302cdf0e10cSrcweir };
303cdf0e10cSrcweir int CompareCursor( CrsrCompareType eType ) const;
304cdf0e10cSrcweir
305cdf0e10cSrcweir // Setzt alle PaMs in OldNode auf NewPos + Offset
306cdf0e10cSrcweir void PaMCorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos,
307cdf0e10cSrcweir const xub_StrLen nOffset = 0 );
308cdf0e10cSrcweir
309cdf0e10cSrcweir // --> FME 2004-07-30 #i32329# Enhanced table selection
310cdf0e10cSrcweir sal_Bool _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
311cdf0e10cSrcweir // <--
312cdf0e10cSrcweir
313cdf0e10cSrcweir // --> FME 2005-01-31 #i41424# Only update the marked number levels if necessary
314cdf0e10cSrcweir bool SetInFrontOfLabel( sal_Bool bNew );
315cdf0e10cSrcweir // <--
316cdf0e10cSrcweir
317cdf0e10cSrcweir void RefreshBlockCursor();
318cdf0e10cSrcweir
319cdf0e10cSrcweir /** Updates the marked list level according to the cursor.
320cdf0e10cSrcweir */
321cdf0e10cSrcweir SW_DLLPRIVATE void UpdateMarkedListLevel();
322cdf0e10cSrcweir
323cdf0e10cSrcweir protected:
324cdf0e10cSrcweir virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
325cdf0e10cSrcweir
326cdf0e10cSrcweir public:
327cdf0e10cSrcweir TYPEINFO();
328cdf0e10cSrcweir SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
329cdf0e10cSrcweir // verkleideter Copy-Constructor
330cdf0e10cSrcweir SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
331cdf0e10cSrcweir virtual ~SwCrsrShell();
332cdf0e10cSrcweir
333cdf0e10cSrcweir // IShellCursorSupplier
334cdf0e10cSrcweir virtual SwPaM & CreateNewShellCursor();
335cdf0e10cSrcweir virtual SwPaM & GetCurrentShellCursor();
336cdf0e10cSrcweir
337cdf0e10cSrcweir // neuen Cusror erzeugen und den alten anhaengen
338cdf0e10cSrcweir SwPaM * CreateCrsr();
339cdf0e10cSrcweir // loesche den aktuellen Cursor und der folgende wird zum Aktuellen
340cdf0e10cSrcweir sal_Bool DestroyCrsr();
341cdf0e10cSrcweir // TableCursor in normale Cursor verwandeln, Tablemode aufheben
342cdf0e10cSrcweir void TblCrsrToCursor();
343cdf0e10cSrcweir // enter block mode, change normal cursor into block cursor
344cdf0e10cSrcweir void CrsrToBlockCrsr();
345cdf0e10cSrcweir // leave block mode, change block cursor into normal cursor
346cdf0e10cSrcweir void BlockCrsrToCrsr();
347cdf0e10cSrcweir
348cdf0e10cSrcweir // SelAll() selects the document body content
349cdf0e10cSrcweir // if ExtendedSelect() is called afterwards, the whole nodes array is selected
350cdf0e10cSrcweir // only for usage in special cases allowed!
351cdf0e10cSrcweir void ExtendedSelectAll();
352cdf0e10cSrcweir
353cdf0e10cSrcweir SwPaM* GetCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
354cdf0e10cSrcweir inline SwCursor* GetSwCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
355cdf0e10cSrcweir // nur den akt. Cursor returnen
_GetCrsr()356cdf0e10cSrcweir SwShellCrsr* _GetCrsr() { return pCurCrsr; }
_GetCrsr() const357cdf0e10cSrcweir const SwShellCrsr* _GetCrsr() const { return pCurCrsr; }
358cdf0e10cSrcweir
359cdf0e10cSrcweir // uebergebenen Cursor anzeigen - fuer UNO
360cdf0e10cSrcweir void SetSelection(const SwPaM& rCrsr);
361cdf0e10cSrcweir
362cdf0e10cSrcweir // alle Cursor aus den ContentNodes entfernen und auf 0 setzen.
363cdf0e10cSrcweir // Wurde aus der FEShell hierher verschoben.
364cdf0e10cSrcweir void ParkCrsr( const SwNodeIndex &rIdx );
365cdf0e10cSrcweir
366cdf0e10cSrcweir // gebe den akt. Cursor-Stack zurueck.
367cdf0e10cSrcweir // ( Wird in der EditShell beim Loeschen von Inhalten benoetigt! )
368cdf0e10cSrcweir inline SwPaM* GetStkCrsr() const;
369cdf0e10cSrcweir
370cdf0e10cSrcweir // Start der Klammerung, SV-Cursor und selektierte Bereiche hiden
371cdf0e10cSrcweir void StartAction();
372cdf0e10cSrcweir // Ende der Klammerung, SV-Cursor und selektierte Bereiche anzeigen
373cdf0e10cSrcweir void EndAction( const sal_Bool bIdleEnd = sal_False );
374cdf0e10cSrcweir
375cdf0e10cSrcweir // Basiscursortravelling
GetUpDownX() const376cdf0e10cSrcweir long GetUpDownX() const { return nUpDownX; }
377cdf0e10cSrcweir
Left(sal_uInt16 nCnt,sal_uInt16 nMode,sal_Bool bAllowVisual=sal_False)378cdf0e10cSrcweir sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
379cdf0e10cSrcweir { return LeftRight( sal_True, nCnt, nMode, bAllowVisual ); }
Right(sal_uInt16 nCnt,sal_uInt16 nMode,sal_Bool bAllowVisual=sal_False)380cdf0e10cSrcweir sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
381cdf0e10cSrcweir { return LeftRight( sal_False, nCnt, nMode, bAllowVisual ); }
Up(sal_uInt16 nCnt=1)382cdf0e10cSrcweir sal_Bool Up( sal_uInt16 nCnt = 1 ) { return UpDown( sal_True, nCnt ); }
Down(sal_uInt16 nCnt=1)383cdf0e10cSrcweir sal_Bool Down( sal_uInt16 nCnt = 1 ) { return UpDown( sal_False, nCnt ); }
LeftMargin()384cdf0e10cSrcweir sal_Bool LeftMargin() { return LRMargin( sal_True ); }
RightMargin(sal_Bool bAPI=sal_False)385cdf0e10cSrcweir sal_Bool RightMargin(sal_Bool bAPI = sal_False) { return LRMargin( sal_False, bAPI ); }
386cdf0e10cSrcweir sal_Bool SttEndDoc( sal_Bool bStt );
387cdf0e10cSrcweir
388cdf0e10cSrcweir sal_Bool MovePage( SwWhichPage, SwPosPage );
389cdf0e10cSrcweir sal_Bool MovePara( SwWhichPara, SwPosPara );
390cdf0e10cSrcweir sal_Bool MoveSection( SwWhichSection, SwPosSection );
391cdf0e10cSrcweir sal_Bool MoveTable( SwWhichTable, SwPosTable );
392cdf0e10cSrcweir sal_Bool MoveColumn( SwWhichColumn, SwPosColumn );
393cdf0e10cSrcweir sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
394cdf0e10cSrcweir
395cdf0e10cSrcweir // die Suchfunktionen
396cdf0e10cSrcweir sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
397cdf0e10cSrcweir sal_Bool bSearchInNotes,
398cdf0e10cSrcweir SwDocPositions eStart, SwDocPositions eEnde,
399cdf0e10cSrcweir sal_Bool& bCancel,
400cdf0e10cSrcweir FindRanges eRng, int bReplace = sal_False );
401cdf0e10cSrcweir
402cdf0e10cSrcweir sal_uLong Find( const SwTxtFmtColl& rFmtColl,
403cdf0e10cSrcweir SwDocPositions eStart, SwDocPositions eEnde,
404cdf0e10cSrcweir sal_Bool& bCancel,
405cdf0e10cSrcweir FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 );
406cdf0e10cSrcweir
407cdf0e10cSrcweir sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
408cdf0e10cSrcweir SwDocPositions eStart, SwDocPositions eEnde,
409cdf0e10cSrcweir sal_Bool& bCancel,
410cdf0e10cSrcweir FindRanges eRng,
411cdf0e10cSrcweir const com::sun::star::util::SearchOptions* pSearchOpt = 0,
412cdf0e10cSrcweir const SfxItemSet* rReplSet = 0 );
413cdf0e10cSrcweir
414cdf0e10cSrcweir // Positionieren des Cursors
415cdf0e10cSrcweir // returnt
416cdf0e10cSrcweir // CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde.
417cdf0e10cSrcweir // CRSR_POSOLD: wenn der Crsr nicht veraendert wurde
418cdf0e10cSrcweir int SetCrsr( const Point &rPt, sal_Bool bOnlyText = sal_False, bool bBlock = true );
419cdf0e10cSrcweir
420cdf0e10cSrcweir
421cdf0e10cSrcweir /*
422cdf0e10cSrcweir * Benachrichtung, dass der sichtbare Bereich sich geaendert
423cdf0e10cSrcweir * hat. aVisArea wird neu gesetzt, anschliessend wird
424cdf0e10cSrcweir * gescrollt. Das uebergebene Rectangle liegt auf
425cdf0e10cSrcweir * Pixelgrenzen, um Pixelfehler beim Scrollen zu vermeiden.
426cdf0e10cSrcweir */
427cdf0e10cSrcweir virtual void VisPortChgd( const SwRect & );
428cdf0e10cSrcweir
429cdf0e10cSrcweir /*
430cdf0e10cSrcweir * Virtuelle PaintMethode, damit die Selection nach dem Paint wieder
431cdf0e10cSrcweir * sichtbar wird.
432cdf0e10cSrcweir */
433cdf0e10cSrcweir void Paint( const Rectangle & rRect );
434cdf0e10cSrcweir
435cdf0e10cSrcweir // Bereiche
436cdf0e10cSrcweir inline void SetMark();
437cdf0e10cSrcweir inline sal_Bool HasMark();
438cdf0e10cSrcweir
439cdf0e10cSrcweir void ClearMark();
440cdf0e10cSrcweir
441cdf0e10cSrcweir /**
442cdf0e10cSrcweir Ensure point and mark of the current PaM are in a specific order.
443cdf0e10cSrcweir
444cdf0e10cSrcweir @param bPointFirst TRUE: If the point is behind the mark then
445cdf0e10cSrcweir swap the PaM. FALSE: If the mark is behind the point then swap
446cdf0e10cSrcweir the PaM.
447cdf0e10cSrcweir */
448cdf0e10cSrcweir void NormalizePam(sal_Bool bPointFirst = sal_True);
449cdf0e10cSrcweir
450cdf0e10cSrcweir void SwapPam();
451cdf0e10cSrcweir sal_Bool ChgCurrPam( const Point & rPt,
452cdf0e10cSrcweir sal_Bool bTstOnly = sal_True, //Nur testen, nicht setzen
453cdf0e10cSrcweir sal_Bool bTstHit = sal_False ); //Nur genaue Treffer
454cdf0e10cSrcweir void KillPams();
455cdf0e10cSrcweir
456cdf0e10cSrcweir // erzeuge eine Kopie vom Cursor und speicher diese im Stack
457cdf0e10cSrcweir void Push();
458cdf0e10cSrcweir /*
459cdf0e10cSrcweir * Loescht einen Cursor (gesteuert durch bOldCrsr)
460cdf0e10cSrcweir * - vom Stack oder ( bOldCrsr = sal_True )
461cdf0e10cSrcweir * - den aktuellen und der auf dem Stack stehende wird zum aktuellen
462cdf0e10cSrcweir *
463cdf0e10cSrcweir * Return: es war auf dem Stack noch einer vorhanden
464cdf0e10cSrcweir */
465cdf0e10cSrcweir sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
466cdf0e10cSrcweir /*
467cdf0e10cSrcweir * Verbinde zwei Cursor miteinander.
468cdf0e10cSrcweir * Loesche vom Stack den obersten und setzen dessen Mark im Aktuellen.
469cdf0e10cSrcweir */
470cdf0e10cSrcweir void Combine();
471cdf0e10cSrcweir
472cdf0e10cSrcweir #if !defined(DBG_UTIL)
SttCrsrMove()473cdf0e10cSrcweir void SttCrsrMove() { ++nCrsrMove; StartAction(); }
EndCrsrMove(const sal_Bool bIdleEnd=sal_False)474cdf0e10cSrcweir void EndCrsrMove( const sal_Bool bIdleEnd = sal_False )
475cdf0e10cSrcweir { EndAction( bIdleEnd ); --nCrsrMove; }
476cdf0e10cSrcweir #else
477cdf0e10cSrcweir void SttCrsrMove();
478cdf0e10cSrcweir void EndCrsrMove( const sal_Bool bIdleEnd = sal_False );
479cdf0e10cSrcweir #endif
480cdf0e10cSrcweir
481cdf0e10cSrcweir /*
482cdf0e10cSrcweir * Beim Abgeben des Focuses werden die selektierten Bereiche nicht mehr
483cdf0e10cSrcweir * angezeigt; andererseits beim Erhalten des Focuses, werden alle selek-
484cdf0e10cSrcweir * tierten Bereiche wieder angezeigt. (Bereiche muessen neu berechnet
485cdf0e10cSrcweir * werden!)
486cdf0e10cSrcweir */
HasShFcs() const487cdf0e10cSrcweir sal_Bool HasShFcs() const { return bHasFocus; }
488cdf0e10cSrcweir void ShLooseFcs();
489cdf0e10cSrcweir void ShGetFcs( sal_Bool bUpdate = sal_True );
490cdf0e10cSrcweir
491cdf0e10cSrcweir // Methoden zum Anzeigen bzw. Verstecken des sichtbaren Text-Cursors
492cdf0e10cSrcweir void ShowCrsr();
493cdf0e10cSrcweir void HideCrsr();
494cdf0e10cSrcweir // Methoden zum Anzeigen bzw. Verstecken der selektierten Bereiche mit
495cdf0e10cSrcweir // dem sichtbaren Cursor
496cdf0e10cSrcweir void ShowCrsrs( sal_Bool bCrsrVis );
497cdf0e10cSrcweir void HideCrsrs();
498cdf0e10cSrcweir
IsOverwriteCrsr() const499cdf0e10cSrcweir sal_Bool IsOverwriteCrsr() const { return bOverwriteCrsr; }
SetOverwriteCrsr(sal_Bool bFlag)500cdf0e10cSrcweir void SetOverwriteCrsr( sal_Bool bFlag ) { bOverwriteCrsr = bFlag; }
501cdf0e10cSrcweir
502cdf0e10cSrcweir // gebe den aktuellen Frame, in dem der Cursor steht, zurueck
503cdf0e10cSrcweir SwCntntFrm *GetCurrFrm( const sal_Bool bCalcFrm = sal_True ) const;
504cdf0e10cSrcweir
505cdf0e10cSrcweir //sal_True wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
506cdf0e10cSrcweir //sal_False wenn der arbeitet (trotz Readonly).
507cdf0e10cSrcweir sal_Bool IsCrsrReadonly() const;
508cdf0e10cSrcweir // Cursor steht in etwas geschuetztem oder in die Selektion umspannt
509cdf0e10cSrcweir // etwas geschuetztes.
510cdf0e10cSrcweir sal_Bool HasReadonlySel() const;
511cdf0e10cSrcweir // darf der Cursor in ReadOnlyBereiche?
IsReadOnlyAvailable() const512cdf0e10cSrcweir sal_Bool IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
513cdf0e10cSrcweir void SetReadOnlyAvailable( sal_Bool bFlag );
514cdf0e10cSrcweir sal_Bool IsOverReadOnlyPos( const Point& rPt ) const;
515cdf0e10cSrcweir
516cdf0e10cSrcweir // Methoden fuer aFlyMacroLnk
SetFlyMacroLnk(const Link & rLnk)517cdf0e10cSrcweir void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; }
GetFlyMacroLnk() const518cdf0e10cSrcweir const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; }
519cdf0e10cSrcweir
520cdf0e10cSrcweir // Methoden geben/aendern den Link fuer die Attribut/Format-Aenderungen
SetChgLnk(const Link & rLnk)521cdf0e10cSrcweir void SetChgLnk( const Link &rLnk ) { aChgLnk = rLnk; }
GetChgLnk() const522cdf0e10cSrcweir const Link& GetChgLnk() const { return aChgLnk; }
523cdf0e10cSrcweir
524cdf0e10cSrcweir // Methoden geben/aendern den Link fuers "Grafik vollstaendig geladen"
SetGrfArrivedLnk(const Link & rLnk)525cdf0e10cSrcweir void SetGrfArrivedLnk( const Link &rLnk ) { aGrfArrivedLnk = rLnk; }
GetGrfArrivedLnk() const526cdf0e10cSrcweir const Link& GetGrfArrivedLnk() const { return aGrfArrivedLnk; }
527cdf0e10cSrcweir
528cdf0e10cSrcweir //ChgLink callen, innerhalb einer Action wird der Ruf verzoegert.
529cdf0e10cSrcweir void CallChgLnk();
530cdf0e10cSrcweir
531cdf0e10cSrcweir // Abfrage, ob der aktuelle Cursor eine Selektion aufspannt,
532cdf0e10cSrcweir // also, ob Mark gesetzt und SPoint und Mark unterschiedlich sind.
533cdf0e10cSrcweir sal_Bool HasSelection() const;
534cdf0e10cSrcweir
535cdf0e10cSrcweir // Abfrage, ob ueberhaupt eine Selektion existiert, sprich der akt. Cursor
536cdf0e10cSrcweir // aufgespannt oder nicht der einzigste ist.
537cdf0e10cSrcweir inline sal_Bool IsSelection() const;
538cdf0e10cSrcweir // returns if multiple cursors are available
539cdf0e10cSrcweir inline sal_Bool IsMultiSelection() const;
540cdf0e10cSrcweir
541cdf0e10cSrcweir // Abfrage, ob ein kompletter Absatz selektiert wurde
542cdf0e10cSrcweir sal_Bool IsSelFullPara() const;
543cdf0e10cSrcweir // Abfrage, ob die Selektion in einem Absatz ist
544cdf0e10cSrcweir inline sal_Bool IsSelOnePara() const;
545cdf0e10cSrcweir
546cdf0e10cSrcweir //Sollte fuer das Clipboard der WaitPtr geschaltet werden.
547cdf0e10cSrcweir sal_Bool ShouldWait() const;
548cdf0e10cSrcweir
549cdf0e10cSrcweir /*
550cdf0e10cSrcweir * liefert das SRectangle, auf dem der Cursor steht.
551cdf0e10cSrcweir */
GetCharRect() const552cdf0e10cSrcweir const SwRect &GetCharRect() const { return aCharRect; }
553*af7a586eSTsutomu Uchino
554*af7a586eSTsutomu Uchino // Obtains character rectangle at the position.
555*af7a586eSTsutomu Uchino sal_Bool GetCharRectAt( SwRect& rOrig, const SwPosition& rPos,
556*af7a586eSTsutomu Uchino SwCrsrMoveState *pCMS = 0 ) const;
557*af7a586eSTsutomu Uchino
558cdf0e10cSrcweir /*
559cdf0e10cSrcweir * liefert zurueck, ob der Cursor sich ganz oder teilweise im
560cdf0e10cSrcweir * sichtbaren Bereich befindet.
561cdf0e10cSrcweir */
IsCrsrVisible() const562cdf0e10cSrcweir sal_Bool IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
563cdf0e10cSrcweir
564cdf0e10cSrcweir // gebe die aktuelle Seitennummer zurueck:
565cdf0e10cSrcweir // sal_True: in der der Cursor steht
566cdf0e10cSrcweir // sal_False: die am oberen Rand sichtbar ist
567cdf0e10cSrcweir void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
568cdf0e10cSrcweir sal_Bool bAtCrsrPos = sal_True, const sal_Bool bCalcFrm = sal_True );
569cdf0e10cSrcweir // bestimme in welche Richtung "leere Seiten" behandelt werden!
570cdf0e10cSrcweir // (wird benutzt im PhyPage.. )
571cdf0e10cSrcweir sal_uInt16 GetNextPrevPageNum( sal_Bool bNext = sal_True );
572cdf0e10cSrcweir
573cdf0e10cSrcweir // setze den Cursor auf die Seite "nPage" an den Anfang
574cdf0e10cSrcweir sal_Bool GotoPage( sal_uInt16 nPage );
575cdf0e10cSrcweir
576cdf0e10cSrcweir // gebe alle Dokumentseiten zurueck
577cdf0e10cSrcweir sal_uInt16 GetPageCnt();
578cdf0e10cSrcweir
579cdf0e10cSrcweir // Gehe zur naechsten Selection
580cdf0e10cSrcweir sal_Bool GoNextCrsr();
581cdf0e10cSrcweir // gehe zur vorherigen Selection
582cdf0e10cSrcweir sal_Bool GoPrevCrsr();
583cdf0e10cSrcweir
584cdf0e10cSrcweir // at CurCrsr.SPoint
585cdf0e10cSrcweir ::sw::mark::IMark* SetBookmark(
586cdf0e10cSrcweir const KeyCode&,
587cdf0e10cSrcweir const ::rtl::OUString& rName,
588cdf0e10cSrcweir const ::rtl::OUString& rShortName,
589cdf0e10cSrcweir IDocumentMarkAccess::MarkType eMark = IDocumentMarkAccess::BOOKMARK);
590cdf0e10cSrcweir bool GotoMark( const ::sw::mark::IMark* const pMark ); // sets CurCrsr.SPoint
591cdf0e10cSrcweir bool GotoMark( const ::sw::mark::IMark* const pMark, bool bAtStart );
592cdf0e10cSrcweir bool GoNextBookmark(); // true, if there was one
593cdf0e10cSrcweir bool GoPrevBookmark();
594cdf0e10cSrcweir
595cdf0e10cSrcweir bool IsFormProtected();
596cdf0e10cSrcweir ::sw::mark::IFieldmark* GetCurrentFieldmark();
597cdf0e10cSrcweir ::sw::mark::IFieldmark* GetFieldmarkAfter();
598cdf0e10cSrcweir ::sw::mark::IFieldmark* GetFieldmarkBefore();
599cdf0e10cSrcweir bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark );
600cdf0e10cSrcweir
601cdf0e10cSrcweir // aktualisiere den Crsrs, d.H. setze ihn wieder in den Content.
602cdf0e10cSrcweir // Das sollte nur aufgerufen werden, wenn der Cursor z.B. beim
603cdf0e10cSrcweir // Loeschen von Rahmen irgendwohin gesetzt wurde. Die Position
604cdf0e10cSrcweir // ergibt sich aus seiner aktuellen Position im Layout !!
605cdf0e10cSrcweir void UpdateCrsrPos();
606cdf0e10cSrcweir
607cdf0e10cSrcweir // returne den am akt. Cursor selektierten Text. Dieser wird mit
608cdf0e10cSrcweir // Felder etc. aufgefuellt!!
609cdf0e10cSrcweir String GetSelTxt() const;
610cdf0e10cSrcweir // gebe nur den Text ab der akt. Cursor Position zurueck (bis zum NodeEnde)
611cdf0e10cSrcweir String GetText() const;
612cdf0e10cSrcweir
613cdf0e10cSrcweir // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
614cdf0e10cSrcweir inline const SwTableNode* IsCrsrInTbl( sal_Bool bIsPtInTbl = sal_True ) const;
615cdf0e10cSrcweir // erfrage die Document - Layout - Position vom akt. Crsr
616cdf0e10cSrcweir inline Point& GetCrsrDocPos( sal_Bool bPoint = sal_True ) const;
617cdf0e10cSrcweir inline sal_Bool IsCrsrPtAtEnd() const;
618cdf0e10cSrcweir
619cdf0e10cSrcweir inline const SwPaM* GetTblCrs() const;
620cdf0e10cSrcweir inline SwPaM* GetTblCrs();
621cdf0e10cSrcweir
622cdf0e10cSrcweir sal_Bool IsTblComplex() const;
623cdf0e10cSrcweir sal_Bool IsTblComplexForChart();
624cdf0e10cSrcweir // erfrage die akt. TabellenSelektion als Text
625cdf0e10cSrcweir String GetBoxNms() const;
626cdf0e10cSrcweir
627cdf0e10cSrcweir // setze Crsr in die naechsten/vorherigen Celle
628cdf0e10cSrcweir sal_Bool GoNextCell( sal_Bool bAppendLine = sal_True );
629cdf0e10cSrcweir sal_Bool GoPrevCell();
630cdf0e10cSrcweir // gehe zu dieser Box (wenn vorhanden und in Tabelle!)
631cdf0e10cSrcweir sal_Bool GotoTable( const String& rName );
632cdf0e10cSrcweir
633cdf0e10cSrcweir // select a table row, column or box (based on the current cursor)
SelTblRow()634cdf0e10cSrcweir sal_Bool SelTblRow() { return _SelTblRowOrCol( true ); }
SelTblCol()635cdf0e10cSrcweir sal_Bool SelTblCol() { return _SelTblRowOrCol( false ); }
636cdf0e10cSrcweir sal_Bool SelTblBox();
637cdf0e10cSrcweir // --> FME 2004-07-30 #i32329# Enhanced table selection
638cdf0e10cSrcweir sal_Bool SelTbl();
639cdf0e10cSrcweir // <--
640cdf0e10cSrcweir
641cdf0e10cSrcweir // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
642cdf0e10cSrcweir sal_Bool GotoNextNum();
643cdf0e10cSrcweir sal_Bool GotoPrevNum();
644cdf0e10cSrcweir
645cdf0e10cSrcweir // zu diesem Gliederungspunkt
646cdf0e10cSrcweir sal_Bool GotoOutline( const String& rName );
647cdf0e10cSrcweir // zum naechsten/vorhergehenden oder angegebenen OultineNode
648cdf0e10cSrcweir void GotoOutline( sal_uInt16 nIdx );
649cdf0e10cSrcweir // suche die "Outline-Position" im Nodes-Array vom akt. Kaiptel
650cdf0e10cSrcweir sal_uInt16 GetOutlinePos( sal_uInt8 nLevel = UCHAR_MAX );
651cdf0e10cSrcweir // selektiere den angeben Bereich von OutlineNodes. Optional
652cdf0e10cSrcweir // inclusive der Childs. Die sal_uInt16 sind die Positionen im
653cdf0e10cSrcweir // OutlineNds-Array!! (EditShell)
654cdf0e10cSrcweir sal_Bool MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
655cdf0e10cSrcweir sal_Bool bWithChilds = sal_False );
656cdf0e10cSrcweir
657cdf0e10cSrcweir sal_Bool GotoNextOutline(); // naechster Node mit Outline-Num.
658cdf0e10cSrcweir sal_Bool GotoPrevOutline(); // vorheriger Node mit Outline-Num.
659cdf0e10cSrcweir
660cdf0e10cSrcweir /** Delivers the current shell cursor
661cdf0e10cSrcweir
662cdf0e10cSrcweir Some operations have to run on the current cursor ring,
663cdf0e10cSrcweir some on the pTblCrsr (if exist) or the current cursor ring and
664cdf0e10cSrcweir some on the pTblCrsr or pBlockCrsr or the current cursor ring.
665cdf0e10cSrcweir This small function checks the existence and delivers the wished cursor.
666cdf0e10cSrcweir
667cdf0e10cSrcweir @param bBlock [bool]
668cdf0e10cSrcweir if the block cursor is of interest or not
669cdf0e10cSrcweir
670cdf0e10cSrcweir @return pTblCrsr if exist,
671cdf0e10cSrcweir pBlockCrsr if exist and of interest (param bBlock)
672cdf0e10cSrcweir otherwise pCurCrsr
673cdf0e10cSrcweir */
674cdf0e10cSrcweir SwShellCrsr* getShellCrsr( bool bBlock );
getShellCrsr(bool bBlock) const675cdf0e10cSrcweir const SwShellCrsr* getShellCrsr( bool bBlock ) const
676cdf0e10cSrcweir { return (const_cast<SwCrsrShell*>(this))->getShellCrsr( bBlock ); }
677cdf0e10cSrcweir
IsBlockMode() const678cdf0e10cSrcweir FASTBOOL IsBlockMode() const { return 0 != pBlockCrsr; }
GetBlockCrsr() const679cdf0e10cSrcweir const IBlockCursor* GetBlockCrsr() const { return pBlockCrsr; }
GetBlockCrsr()680cdf0e10cSrcweir IBlockCursor* GetBlockCrsr() { return pBlockCrsr; }
681cdf0e10cSrcweir
682cdf0e10cSrcweir // ist der Crsr in einer Tabelle und ist die Selection ueber
683cdf0e10cSrcweir // zwei Spalten
IsTableMode() const684cdf0e10cSrcweir sal_Bool IsTableMode() const { return 0 != pTblCrsr; }
685cdf0e10cSrcweir
686cdf0e10cSrcweir // erfrage den Tabellen Crsr; ausserhalb von Tabellen immer 0
GetTableCrsr() const687cdf0e10cSrcweir const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; }
GetTableCrsr()688cdf0e10cSrcweir SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; }
689cdf0e10cSrcweir sal_uInt16 UpdateTblSelBoxes();
690cdf0e10cSrcweir
691cdf0e10cSrcweir sal_Bool GotoFtnTxt(); // springe aus dem Content zur Fussnote
692cdf0e10cSrcweir sal_Bool GotoFtnAnchor(); // springe aus der Fussnote zum Anker
693cdf0e10cSrcweir sal_Bool GotoPrevFtnAnchor();
694cdf0e10cSrcweir sal_Bool GotoNextFtnAnchor();
695cdf0e10cSrcweir
696cdf0e10cSrcweir sal_Bool GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
697cdf0e10cSrcweir sal_Bool GotoHeaderTxt(); // springe aus dem Content zum Header
698cdf0e10cSrcweir sal_Bool GotoFooterTxt(); // springe aus dem Content zum Footer
699cdf0e10cSrcweir // springe in den Header/Footer des angegebenen oder akt. PageDesc
700cdf0e10cSrcweir sal_Bool SetCrsrInHdFt( sal_uInt16 nDescNo = USHRT_MAX,
701cdf0e10cSrcweir sal_Bool bInHeader = sal_True );
702cdf0e10cSrcweir // is point of cursor in header/footer. pbInHeader return sal_True if it is
703cdf0e10cSrcweir // in a headerframe otherwise in a footerframe
704cdf0e10cSrcweir sal_Bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const;
705cdf0e10cSrcweir
706cdf0e10cSrcweir // springe zum naechsten Verzeichnis [mit dem Namen]
707cdf0e10cSrcweir sal_Bool GotoNextTOXBase( const String* = 0 );
708cdf0e10cSrcweir // springe zum vorherigen Verzeichnis [mit dem Namen]
709cdf0e10cSrcweir sal_Bool GotoPrevTOXBase( const String* = 0 );
710cdf0e10cSrcweir sal_Bool GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
711cdf0e10cSrcweir // springe zum naechsten (vorherigen) Verzeichniseintrag
712cdf0e10cSrcweir sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_True );
713cdf0e10cSrcweir // Zur naechsten/ vorherigen Verzeichnismarke dieses Typs traveln
714cdf0e10cSrcweir const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir );
715cdf0e10cSrcweir
716cdf0e10cSrcweir // springe zum naechsten (vorherigen) Tabellenformel
717cdf0e10cSrcweir // optional auch nur zu kaputten Formeln springen
718cdf0e10cSrcweir sal_Bool GotoNxtPrvTblFormula( sal_Bool bNext = sal_True,
719cdf0e10cSrcweir sal_Bool bOnlyErrors = sal_False );
720cdf0e10cSrcweir // jump to the next / previous hyperlink - inside text and also
721cdf0e10cSrcweir // on graphics
722cdf0e10cSrcweir sal_Bool SelectNxtPrvHyperlink( sal_Bool bNext = sal_True );
723cdf0e10cSrcweir
724cdf0e10cSrcweir // springe zu dieser Refmark
725cdf0e10cSrcweir sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
726cdf0e10cSrcweir sal_uInt16 nSeqNo = 0 );
727cdf0e10cSrcweir
728cdf0e10cSrcweir // hole vom Start/Ende der akt. Selection das nte Zeichen
729cdf0e10cSrcweir sal_Unicode GetChar( sal_Bool bEnd = sal_True, long nOffset = 0 );
730cdf0e10cSrcweir // erweiter die akt. Selection am Anfang/Ende um n Zeichen
731cdf0e10cSrcweir sal_Bool ExtendSelection( sal_Bool bEnd = sal_True, xub_StrLen nCount = 1 );
732cdf0e10cSrcweir // setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
733cdf0e10cSrcweir // returnt sal_False: wenn der ob der SPoint vom Layout korrigiert wurde.
734cdf0e10cSrcweir // (wird zum Anzeigen von Drag&Drop/Copy-Cursor benoetigt)
735cdf0e10cSrcweir sal_Bool SetVisCrsr( const Point &rPt );
736cdf0e10cSrcweir inline void UnSetVisCrsr();
737cdf0e10cSrcweir
738cdf0e10cSrcweir // springe zum nachsten/vorherigen Feld des entsprechenden Types
73969a74367SOliver-Rainer Wittmann sal_Bool MoveFldType(
74069a74367SOliver-Rainer Wittmann const SwFieldType* pFldType,
74169a74367SOliver-Rainer Wittmann const bool bNext,
74269a74367SOliver-Rainer Wittmann const sal_uInt16 nResType = USHRT_MAX,
74369a74367SOliver-Rainer Wittmann const bool bAddSetExpressionFldsToInputFlds = true );
744cdf0e10cSrcweir // springe genau zu diesem Feld
745cdf0e10cSrcweir sal_Bool GotoFld( const SwFmtFld& rFld );
746cdf0e10cSrcweir
74769a74367SOliver-Rainer Wittmann SwTxtFld* GetTxtFldAtPos(
74869a74367SOliver-Rainer Wittmann const SwPosition* pPos,
74969a74367SOliver-Rainer Wittmann const bool bIncludeInputFldAtStart ) const;
75069a74367SOliver-Rainer Wittmann SwField* GetFieldAtCrsr(
75169a74367SOliver-Rainer Wittmann const SwPaM* pCrsr,
75269a74367SOliver-Rainer Wittmann const bool bIncludeInputFldAtStart ) const;
75369a74367SOliver-Rainer Wittmann SwField* GetCurFld( const bool bIncludeInputFldAtStart = false ) const;
75469a74367SOliver-Rainer Wittmann bool CrsrInsideInputFld() const;
75569a74367SOliver-Rainer Wittmann bool PosInsideInputFld( const SwPosition& rPos ) const;
75669a74367SOliver-Rainer Wittmann bool DocPtInsideInputFld( const Point& rDocPt ) const;
75769a74367SOliver-Rainer Wittmann xub_StrLen StartOfInputFldAtPos( const SwPosition& rPos ) const;
75869a74367SOliver-Rainer Wittmann xub_StrLen EndOfInputFldAtPos( const SwPosition& rPos ) const;
75969a74367SOliver-Rainer Wittmann
760cdf0e10cSrcweir // returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
761cdf0e10cSrcweir // aufgepspannte haben will - sprich etwas selektiert ist (Basic))
762cdf0e10cSrcweir sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const;
763cdf0e10cSrcweir
764cdf0e10cSrcweir // Char Travelling - Methoden (in crstrvl1.cxx)
765cdf0e10cSrcweir sal_Bool GoStartWord();
766cdf0e10cSrcweir sal_Bool GoEndWord();
767cdf0e10cSrcweir sal_Bool GoNextWord();
768cdf0e10cSrcweir sal_Bool GoPrevWord();
769cdf0e10cSrcweir sal_Bool GoNextSentence();
770cdf0e10cSrcweir sal_Bool GoPrevSentence();
771cdf0e10cSrcweir sal_Bool GoStartSentence();
772cdf0e10cSrcweir sal_Bool GoEndSentence();
773cdf0e10cSrcweir sal_Bool SelectWord( const Point* pPt = 0 );
774cdf0e10cSrcweir sal_Bool ExpandToSentenceBorders();
775cdf0e10cSrcweir
776cdf0e10cSrcweir // Position vom akt. Cursor erfragen
777cdf0e10cSrcweir sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
778cdf0e10cSrcweir sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
779cdf0e10cSrcweir sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
780cdf0e10cSrcweir sal_Bool IsStartSentence() const;
781cdf0e10cSrcweir sal_Bool IsEndSentence() const;
782cdf0e10cSrcweir sal_Bool IsSttPara() const;
783cdf0e10cSrcweir sal_Bool IsEndPara() const;
784cdf0e10cSrcweir sal_Bool IsStartOfDoc() const;
785cdf0e10cSrcweir sal_Bool IsEndOfDoc() const;
786cdf0e10cSrcweir sal_Bool IsInFrontOfLabel() const;
IsAtLeftMargin() const787cdf0e10cSrcweir sal_Bool IsAtLeftMargin() const { return IsAtLRMargin( sal_True ); }
IsAtRightMargin(sal_Bool bAPI=sal_False) const788cdf0e10cSrcweir sal_Bool IsAtRightMargin(sal_Bool bAPI = sal_False) const { return IsAtLRMargin( sal_False, bAPI ); }
789cdf0e10cSrcweir
790cdf0e10cSrcweir // loesche alle erzeugten Crsr, setze den Tabellen-Crsr und den letzten
791cdf0e10cSrcweir // Cursor auf seinen TextNode (oder StartNode?).
792cdf0e10cSrcweir // Beim naechsten ::GetCrsr werden sie wieder alle erzeugt.
793cdf0e10cSrcweir // Wird fuers Drag&Drop/ClipBorad-Paste in Tabellen benoetigt.
794cdf0e10cSrcweir sal_Bool ParkTblCrsr();
795cdf0e10cSrcweir
796cdf0e10cSrcweir // gibt es nicht aufgespannte Attribute?
IsGCAttr() const797cdf0e10cSrcweir sal_Bool IsGCAttr() const { return bGCAttr; }
ClearGCAttr()798cdf0e10cSrcweir void ClearGCAttr() { bGCAttr = sal_False; }
UpdateAttr()799cdf0e10cSrcweir void UpdateAttr() { bGCAttr = sal_True; }
800cdf0e10cSrcweir
801cdf0e10cSrcweir // ist das gesamte Dokument geschuetzt/versteckt?? (fuer UI,..)
IsAllProtect() const802cdf0e10cSrcweir sal_Bool IsAllProtect() const { return bAllProtect; }
803cdf0e10cSrcweir
804cdf0e10cSrcweir #ifdef SW_CRSR_TIMER
805cdf0e10cSrcweir // setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (sal_True)
806cdf0e10cSrcweir // oder direkt (sal_False) angezeigt wird. (default ist Timer getriggert)
807cdf0e10cSrcweir sal_Bool ChgCrsrTimerFlag( sal_Bool bTimerOn = sal_True );
808cdf0e10cSrcweir #endif
809cdf0e10cSrcweir
BasicActionPend() const810cdf0e10cSrcweir sal_Bool BasicActionPend() const { return nBasicActionCnt != nStartAction; }
811cdf0e10cSrcweir
812cdf0e10cSrcweir // springe zum benannten Bereich
813cdf0e10cSrcweir sal_Bool GotoRegion( const String& rName );
814cdf0e10cSrcweir
815cdf0e10cSrcweir // zeige die aktuelle Selektion an
816cdf0e10cSrcweir virtual void MakeSelVisible();
817cdf0e10cSrcweir
818cdf0e10cSrcweir // setzte den Cursor auf einen NICHT geschuetzten/versteckten Node
819cdf0e10cSrcweir sal_Bool FindValidCntntNode( sal_Bool bOnlyText = sal_False );
820cdf0e10cSrcweir
821cdf0e10cSrcweir sal_Bool GetContentAtPos( const Point& rPt,
822cdf0e10cSrcweir SwContentAtPos& rCntntAtPos,
823cdf0e10cSrcweir sal_Bool bSetCrsr = sal_False,
824cdf0e10cSrcweir SwRect* pFldRect = 0 );
825cdf0e10cSrcweir
826cdf0e10cSrcweir // --> OD 2008-06-19 #i90516#
827cdf0e10cSrcweir const SwPostItField* GetPostItFieldAtCursor() const;
828cdf0e10cSrcweir // <--
829cdf0e10cSrcweir
830cdf0e10cSrcweir // get smart tags at point position
831cdf0e10cSrcweir void GetSmartTagTerm( const Point& rPt,
832cdf0e10cSrcweir SwRect& rSelectRect,
833cdf0e10cSrcweir ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes,
834cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
835cdf0e10cSrcweir ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange );
836cdf0e10cSrcweir
837cdf0e10cSrcweir // get smart tags at current cursor position
838cdf0e10cSrcweir void GetSmartTagTerm( ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes,
839cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
840cdf0e10cSrcweir ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange ) const;
841cdf0e10cSrcweir
842cdf0e10cSrcweir sal_Bool IsPageAtPos( const Point &rPt ) const;
843cdf0e10cSrcweir
844cdf0e10cSrcweir // Attribut selelktieren
845cdf0e10cSrcweir sal_Bool SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const SwTxtAttr* pAttr = 0 );
846cdf0e10cSrcweir sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
847cdf0e10cSrcweir const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
848cdf0e10cSrcweir
84969a74367SOliver-Rainer Wittmann sal_Bool SelectTxt( const xub_StrLen nStart,
85069a74367SOliver-Rainer Wittmann const xub_StrLen nEnd );
85169a74367SOliver-Rainer Wittmann
852cdf0e10cSrcweir sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 );
853cdf0e10cSrcweir void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
854cdf0e10cSrcweir void ClearTblBoxCntnt();
855cdf0e10cSrcweir sal_Bool EndAllTblBoxEdit();
856cdf0e10cSrcweir
SetSelTblCells(sal_Bool bFlag)857cdf0e10cSrcweir void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; }
IsSelTblCells() const858cdf0e10cSrcweir sal_Bool IsSelTblCells() const { return bSelTblCells; }
859cdf0e10cSrcweir
IsAutoUpdateCells() const860cdf0e10cSrcweir sal_Bool IsAutoUpdateCells() const { return bAutoUpdateCells; }
SetAutoUpdateCells(sal_Bool bFlag)861cdf0e10cSrcweir void SetAutoUpdateCells( sal_Bool bFlag ) { bAutoUpdateCells = bFlag; }
862cdf0e10cSrcweir
863cdf0e10cSrcweir sal_Bool GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
864cdf0e10cSrcweir SwRect& rRect, short& rOrient );
865cdf0e10cSrcweir sal_Bool SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
866cdf0e10cSrcweir
867cdf0e10cSrcweir const SwRedline* SelNextRedline();
868cdf0e10cSrcweir const SwRedline* SelPrevRedline();
869cdf0e10cSrcweir const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False );
870cdf0e10cSrcweir
871cdf0e10cSrcweir // is cursor or the point in/over a vertical formatted text?
872cdf0e10cSrcweir sal_Bool IsInVerticalText( const Point* pPt = 0 ) const;
873cdf0e10cSrcweir // is cursor or the point in/over a right to left formatted text?
874cdf0e10cSrcweir sal_Bool IsInRightToLeftText( const Point* pPt = 0 ) const;
875cdf0e10cSrcweir
876ca62e2c2SSteve Yin void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
877ca62e2c2SSteve Yin SwFrm* oldColFrm;
878ca62e2c2SSteve Yin bool bColumnChange();
879ca62e2c2SSteve Yin void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection);
880ca62e2c2SSteve Yin void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn);
881cdf0e10cSrcweir // If the current cursor position is inside a hidden range, the hidden range
882cdf0e10cSrcweir // is selected and true is returned:
883cdf0e10cSrcweir bool SelectHiddenRange();
884cdf0e10cSrcweir
885cdf0e10cSrcweir // remove all invalid cursors
886cdf0e10cSrcweir void ClearUpCrsrs();
887cdf0e10cSrcweir
888cdf0e10cSrcweir // OD 11.02.2003 #100556# - set/get flag to allow/avoid execution of macros
SetMacroExecAllowed(const bool _bMacroExecAllowed)889cdf0e10cSrcweir inline void SetMacroExecAllowed( const bool _bMacroExecAllowed )
890cdf0e10cSrcweir {
891cdf0e10cSrcweir mbMacroExecAllowed = _bMacroExecAllowed;
892cdf0e10cSrcweir }
IsMacroExecAllowed()893cdf0e10cSrcweir inline bool IsMacroExecAllowed()
894cdf0e10cSrcweir {
895cdf0e10cSrcweir return mbMacroExecAllowed;
896cdf0e10cSrcweir }
897cdf0e10cSrcweir
898cdf0e10cSrcweir // #111827#
899cdf0e10cSrcweir /**
900cdf0e10cSrcweir Returns textual description of the current selection.
901cdf0e10cSrcweir
902cdf0e10cSrcweir - If the current selection is a multi-selection the result is
903cdf0e10cSrcweir STR_MULTISEL.
904cdf0e10cSrcweir - Else the result is the text of the selection.
905cdf0e10cSrcweir
906cdf0e10cSrcweir @return the textual description of the current selection
907cdf0e10cSrcweir */
908cdf0e10cSrcweir String GetCrsrDescr() const;
909cdf0e10cSrcweir };
910cdf0e10cSrcweir
911cdf0e10cSrcweir
912cdf0e10cSrcweir // Cursor Inlines:
MakeFindRange(sal_uInt16 nStt,sal_uInt16 nEnd,SwPaM * pPam) const913cdf0e10cSrcweir inline SwMoveFnCollection* SwCrsrShell::MakeFindRange(
914cdf0e10cSrcweir sal_uInt16 nStt, sal_uInt16 nEnd, SwPaM* pPam ) const
915cdf0e10cSrcweir {
916cdf0e10cSrcweir return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam );
917cdf0e10cSrcweir }
918cdf0e10cSrcweir
GetSwCrsr(sal_Bool bMakeTblCrsr) const919cdf0e10cSrcweir inline SwCursor* SwCrsrShell::GetSwCrsr( sal_Bool bMakeTblCrsr ) const
920cdf0e10cSrcweir {
921cdf0e10cSrcweir return (SwCursor*)GetCrsr( bMakeTblCrsr );
922cdf0e10cSrcweir }
923cdf0e10cSrcweir
GetStkCrsr() const924cdf0e10cSrcweir inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; }
925cdf0e10cSrcweir
SetMark()926cdf0e10cSrcweir inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); }
927cdf0e10cSrcweir
HasMark()928cdf0e10cSrcweir inline sal_Bool SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
929cdf0e10cSrcweir
IsSelection() const930cdf0e10cSrcweir inline sal_Bool SwCrsrShell::IsSelection() const
931cdf0e10cSrcweir {
932cdf0e10cSrcweir return IsTableMode() || pCurCrsr->HasMark() ||
933cdf0e10cSrcweir pCurCrsr->GetNext() != pCurCrsr;
934cdf0e10cSrcweir }
IsMultiSelection() const935cdf0e10cSrcweir inline sal_Bool SwCrsrShell::IsMultiSelection() const
936cdf0e10cSrcweir {
937cdf0e10cSrcweir return pCurCrsr->GetNext() != pCurCrsr;
938cdf0e10cSrcweir }
939cdf0e10cSrcweir
IsSelOnePara() const940cdf0e10cSrcweir inline sal_Bool SwCrsrShell::IsSelOnePara() const
941cdf0e10cSrcweir {
942cdf0e10cSrcweir return pCurCrsr == pCurCrsr->GetNext() &&
943cdf0e10cSrcweir pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode;
944cdf0e10cSrcweir }
945cdf0e10cSrcweir
IsCrsrInTbl(sal_Bool bIsPtInTbl) const946cdf0e10cSrcweir inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( sal_Bool bIsPtInTbl ) const
947cdf0e10cSrcweir {
948cdf0e10cSrcweir return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
949cdf0e10cSrcweir }
950cdf0e10cSrcweir
IsCrsrPtAtEnd() const951cdf0e10cSrcweir inline sal_Bool SwCrsrShell::IsCrsrPtAtEnd() const
952cdf0e10cSrcweir {
953cdf0e10cSrcweir return pCurCrsr->End() == pCurCrsr->GetPoint();
954cdf0e10cSrcweir }
955cdf0e10cSrcweir
GetCrsrDocPos(sal_Bool bPoint) const956cdf0e10cSrcweir inline Point& SwCrsrShell::GetCrsrDocPos( sal_Bool bPoint ) const
957cdf0e10cSrcweir {
958cdf0e10cSrcweir return bPoint ? pCurCrsr->GetPtPos() : pCurCrsr->GetMkPos();
959cdf0e10cSrcweir }
960cdf0e10cSrcweir
GetTblCrs() const961cdf0e10cSrcweir inline const SwPaM* SwCrsrShell::GetTblCrs() const
962cdf0e10cSrcweir {
963cdf0e10cSrcweir return pTblCrsr;
964cdf0e10cSrcweir }
965cdf0e10cSrcweir
GetTblCrs()966cdf0e10cSrcweir inline SwPaM* SwCrsrShell::GetTblCrs()
967cdf0e10cSrcweir {
968cdf0e10cSrcweir return pTblCrsr;
969cdf0e10cSrcweir }
970cdf0e10cSrcweir
UnSetVisCrsr()971cdf0e10cSrcweir inline void SwCrsrShell::UnSetVisCrsr()
972cdf0e10cSrcweir {
973cdf0e10cSrcweir pVisCrsr->Hide();
974cdf0e10cSrcweir pVisCrsr->SetDragCrsr( sal_False );
975cdf0e10cSrcweir }
976cdf0e10cSrcweir
977cdf0e10cSrcweir #endif // _CRSRSH_HXX
978