1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <com/sun/star/embed/XEmbeddedObject.hpp>
25 #include <sortopt.hxx>
34 class SwFlyFrmAttrMgr
;
39 class SwInputFieldList
;
45 class NaviContentBookmark
;
46 struct SwCallMouseEvent
;
47 class SfxStringListItem
;
49 namespace com
{ namespace sun
{ namespace star
{ namespace util
{
54 typedef sal_Int32 SelectionType
;
55 namespace nsSelectionType
57 const SelectionType SEL_TXT
= CNT_TXT
; // text, never frames too 0x0001
58 const SelectionType SEL_GRF
= CNT_GRF
; // graphic 0x0002
59 const SelectionType SEL_OLE
= CNT_OLE
; // OLE 0x0010
60 const SelectionType SEL_FRM
= 0x000020; // frame, no content type
61 const SelectionType SEL_NUM
= 0x000040; // NumList
62 const SelectionType SEL_TBL
= 0x000080; // cursor is in table
63 const SelectionType SEL_TBL_CELLS
= 0x000100; // table cells are selected
64 const SelectionType SEL_DRW
= 0x000200; // drawing objects (rectangle, circle...)
65 const SelectionType SEL_DRW_TXT
= 0x000400; // draw-textobjects in edit mode
66 const SelectionType SEL_BEZ
= 0x000800; // edit ornament objects
67 const SelectionType SEL_DRW_FORM
= 0x001000; // drawing objects: DB-Forms
68 const SelectionType SEL_FOC_FRM_CTRL
= 0x002000; // a form control is focused. Neither set nor evaluated by the SwWrtShell itself, only by it's clients.
69 const SelectionType SEL_MEDIA
= 0x004000; // Media object
70 const SelectionType SEL_EXTRUDED_CUSTOMSHAPE
= 0x008000; // extruded custom shape
71 const SelectionType SEL_FONTWORK
= 0x010000; // fontwork
72 const SelectionType SEL_POSTIT
= 0x020000; //annotation
76 class SW_DLLPUBLIC SwWrtShell
: public SwFEShell
79 using SwCrsrShell::Left
;
80 using SwCrsrShell::Right
;
81 using SwCrsrShell::Up
;
82 using SwCrsrShell::Down
;
83 using SwCrsrShell::LeftMargin
;
84 using SwCrsrShell::RightMargin
;
85 using SwCrsrShell::SelectTxtAttr
;
86 using SwCrsrShell::GotoPage
;
87 using SwFEShell::InsertObject
;
88 using SwEditShell::AutoCorrect
;
89 using SwCrsrShell::GotoMark
;
91 typedef long (SwWrtShell::*SELECTFUNC
)(const Point
*, sal_Bool bProp
);
100 using SwEditShell::Insert
;
102 long SetCursor (const Point
* pPt
, bool bProp
) { return (this->*fnSetCrsr
)(pPt
, bProp
); }
103 long Drag (const Point
* pPt
, bool bProp
) { return (this->*fnDrag
)(pPt
, bProp
); }
104 long EndDrag (const Point
* pPt
, bool bProp
) { return (this->*fnEndDrag
)(pPt
, bProp
); }
105 long KillSelection(const Point
* pPt
, bool bProp
) { return (this->*fnKillSel
)(pPt
, bProp
); }
107 // reset all selections
108 long ResetSelect( const Point
*, sal_Bool
);
110 // resets the cursorstack after movement with PageUp/-Down if a stack is built up
111 inline void ResetCursorStack();
112 SelectionType
GetSelectionType() const;
114 bool IsModePushed() const { return 0 != pModeStack
; }
120 sal_Bool
IsInSelect() const { return bInSelect
; }
121 void SetInSelect(sal_Bool bSel
= sal_True
) { bInSelect
= bSel
; }
122 // is there a text- or frameselection?
123 sal_Bool
HasSelection() const { return SwCrsrShell::HasSelection() ||
124 IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); }
125 sal_Bool
Pop( sal_Bool bOldCrsr
= sal_True
);
128 bool IsStdMode() const { return !bExtMode
&& !bAddMode
&& !bBlockMode
; }
132 long ToggleExtMode();
133 sal_Bool
IsExtMode() const { return bExtMode
; }
137 long ToggleAddMode();
138 sal_Bool
IsAddMode() const { return bAddMode
; }
140 void EnterBlockMode();
141 void LeaveBlockMode();
142 long ToggleBlockMode();
143 sal_Bool
IsBlockMode() const { return bBlockMode
; }
145 void SetInsMode( sal_Bool bOn
= sal_True
);
146 void ToggleInsMode() { SetInsMode( !bIns
); }
147 sal_Bool
IsInsMode() const { return bIns
; }
148 void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode
);
150 void EnterSelFrmMode(const Point
*pStartDrag
= 0);
151 void LeaveSelFrmMode();
152 sal_Bool
IsSelFrmMode() const { return bLayoutMode
; }
153 // reset selection of frames
158 // select table cells for editing of formulas in the ribbonbar
159 inline void SelTblCells( const Link
&rLink
, sal_Bool bMark
= sal_True
);
160 inline void EndSelTblCells();
162 // leave per word or per line selection mode. Is usually called in MB-Up.
163 bool IsExtSel() const { return bSelWrd
|| bSelLn
; }
165 // query whether the active fnDrag pointer is set to BeginDrag
166 // is needed for MouseMove to work around bugs 55592/55931
167 inline bool Is_FnDragEQBeginDrag() const;
170 sal_Bool
IsInWrd() { return IsInWord(); }
171 sal_Bool
IsSttWrd() { return IsStartWord(); }
173 bool IsSttOfPara() const { return IsSttPara(); }
174 bool IsEndOfPara() const { return IsEndPara(); }
176 // select word / sentense
177 sal_Bool
SelNearestWrd();
178 sal_Bool
SelWrd (const Point
* = 0, sal_Bool bProp
=sal_False
);
179 // #i32329# Enhanced selection
180 void SelSentence (const Point
* = 0, sal_Bool bProp
=sal_False
);
181 void SelPara (const Point
* = 0, sal_Bool bProp
=sal_False
);
184 // basecursortravelling
185 typedef sal_Bool (SwWrtShell:: *FNSimpleMove
)();
186 sal_Bool
SimpleMove( FNSimpleMove
, sal_Bool bSelect
);
188 sal_Bool
Left ( sal_uInt16 nMode
, sal_Bool bSelect
,
189 sal_uInt16 nCount
, sal_Bool bBasicCall
, sal_Bool bVisual
= sal_False
);
190 sal_Bool
Right ( sal_uInt16 nMode
, sal_Bool bSelect
,
191 sal_uInt16 nCount
, sal_Bool bBasicCall
, sal_Bool bVisual
= sal_False
);
192 sal_Bool
Up ( sal_Bool bSelect
= sal_False
, sal_uInt16 nCount
= 1,
193 sal_Bool bBasicCall
= sal_False
);
194 sal_Bool
Down ( sal_Bool bSelect
= sal_False
, sal_uInt16 nCount
= 1,
195 sal_Bool bBasicCall
= sal_False
);
196 sal_Bool
NxtWrd ( sal_Bool bSelect
= sal_False
) { return SimpleMove( &SwWrtShell::_NxtWrd
, bSelect
); }
197 sal_Bool
PrvWrd ( sal_Bool bSelect
= sal_False
) { return SimpleMove( &SwWrtShell::_PrvWrd
, bSelect
); }
199 sal_Bool
LeftMargin ( sal_Bool bSelect
, sal_Bool bBasicCall
);
200 sal_Bool
RightMargin( sal_Bool bSelect
, sal_Bool bBasicCall
);
202 sal_Bool
SttDoc ( sal_Bool bSelect
= sal_False
);
203 sal_Bool
EndDoc ( sal_Bool bSelect
= sal_False
);
205 sal_Bool
SttNxtPg ( sal_Bool bSelect
= sal_False
);
206 sal_Bool
SttPrvPg ( sal_Bool bSelect
= sal_False
);
207 sal_Bool
EndNxtPg ( sal_Bool bSelect
= sal_False
);
208 sal_Bool
EndPrvPg ( sal_Bool bSelect
= sal_False
);
209 sal_Bool
SttPg ( sal_Bool bSelect
= sal_False
);
210 sal_Bool
EndPg ( sal_Bool bSelect
= sal_False
);
211 sal_Bool
SttPara ( sal_Bool bSelect
= sal_False
);
212 sal_Bool
EndPara ( sal_Bool bSelect
= sal_False
);
213 sal_Bool
FwdPara ( sal_Bool bSelect
= sal_False
)
214 { return SimpleMove( &SwWrtShell::_FwdPara
, bSelect
); }
215 sal_Bool
BwdPara ( sal_Bool bSelect
= sal_False
)
216 { return SimpleMove( &SwWrtShell::_BwdPara
, bSelect
); }
217 sal_Bool
FwdSentence( sal_Bool bSelect
= sal_False
)
218 { return SimpleMove( &SwWrtShell::_FwdSentence
, bSelect
); }
219 sal_Bool
BwdSentence( sal_Bool bSelect
= sal_False
)
220 { return SimpleMove( &SwWrtShell::_BwdSentence
, bSelect
); }
222 // #i20126# Enhanced table selection
223 sal_Bool
SelectTableRowCol( const Point
& rPt
, const Point
* pEnd
= 0, bool bRowDrag
= false );
224 sal_Bool
SelectTableRow();
225 sal_Bool
SelectTableCol();
226 sal_Bool
SelectTableCell();
228 sal_Bool
SelectTxtAttr( sal_uInt16 nWhich
, const SwTxtAttr
* pAttr
= 0 );
231 sal_Bool
StartOfColumn ( sal_Bool bSelect
= sal_False
);
232 sal_Bool
EndOfColumn ( sal_Bool bSelect
= sal_False
);
233 sal_Bool
StartOfNextColumn ( sal_Bool bSelect
= sal_False
);
234 sal_Bool
EndOfNextColumn ( sal_Bool bSelect
= sal_False
);
235 sal_Bool
StartOfPrevColumn ( sal_Bool bSelect
= sal_False
);
236 sal_Bool
EndOfPrevColumn ( sal_Bool bSelect
= sal_False
);
238 // set the cursor to page "nPage" at the beginning
239 // additionally to a identically named implementation in crsrsh.hxx
240 // here all existing selections are being reset before setting the
242 sal_Bool
GotoPage( sal_uInt16 nPage
, sal_Bool bRecord
);
244 // setting the cursor; remember the old position for turning back
245 DECL_LINK( ExecFlyMac
, void * );
247 sal_Bool
PageCrsr(SwTwips lOffset
, sal_Bool bSelect
);
250 void UpdateInputFlds( SwInputFieldList
* pLst
= 0, sal_Bool bOnlyInSel
= sal_False
);
252 void NoEdit(bool bHideCrsr
= true);
255 sal_Bool
IsRetainSelection() const { return mbRetainSelection
; }
256 void SetRetainSelection( sal_Bool bRet
) { mbRetainSelection
= bRet
; }
258 // change current data base and notify
259 void ChgDBData(const SwDBData
& SwDBData
);
262 long DelToEndOfLine();
263 long DelToStartOfLine();
267 // also deletes the frame or sets the cursor in the frame when bDelFrm == sal_False
269 long DelToEndOfPara();
270 long DelToStartOfPara();
271 long DelToEndOfSentence();
272 long DelToStartOfSentence();
276 // checks whether a word selection exists.
277 // According to the rules for intelligent Cut / Paste
278 // surrounding spaces are cut out.
279 // returns type of word selection (see enum)
282 WORD_SPACE_BEFORE
= 1,
283 WORD_SPACE_AFTER
= 2,
286 int IntelligentCut(int nSelectionType
, sal_Bool bCut
= sal_True
);
289 void Insert(SwField
&, SwPaM
*pCommentRange
= NULL
);
290 void Insert(const String
&);
292 void Insert( const String
&rPath
, const String
&rFilter
,
293 const Graphic
&, SwFlyFrmAttrMgr
* = 0,
294 sal_Bool bRule
= sal_False
);
296 void InsertByWord( const String
& );
297 void InsertPageBreak(const String
*pPageDesc
= 0, sal_uInt16 nPgNum
= 0 );
298 void InsertLineBreak();
299 void InsertColumnBreak();
300 void InsertFootnote(const String
&, sal_Bool bEndNote
= sal_False
, sal_Bool bEdit
= sal_True
);
301 void SplitNode( sal_Bool bAutoFormat
= sal_False
, sal_Bool bCheckTableStart
= sal_True
);
305 void InsertTableOf(const SwTOXBase
& rTOX
, const SfxItemSet
* pSet
= 0);
306 sal_Bool
UpdateTableOf(const SwTOXBase
& rTOX
, const SfxItemSet
* pSet
= 0);
308 // numbering and bullets
310 Turns on numbering or bullets.
312 @param bNum sal_True: turn on numbering
313 sal_False: turn on bullets
315 void NumOrBulletOn(sal_Bool bNum
); // #i29560#
316 void NumOrBulletOff(); // #i29560#
321 void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 for clipboard
322 const svt::EmbeddedObjectRef
&,
323 SvGlobalName
*pName
= 0, // != 0 create object accordingly
324 sal_Bool bActivate
= sal_True
,
325 sal_uInt16 nSlotId
= 0); // SlotId for dialog
327 sal_Bool
InsertOleObject( const svt::EmbeddedObjectRef
& xObj
, SwFlyFrmFmt
**pFlyFrmFmt
= 0 );
328 void LaunchOLEObj( long nVerb
= 0 ); // start server
329 virtual void MoveObjectIfActive( svt::EmbeddedObjectRef
& xObj
, const Point
& rOffset
);
330 virtual void CalcAndSetScale( svt::EmbeddedObjectRef
& xObj
,
331 const SwRect
*pFlyPrtRect
= 0,
332 const SwRect
*pFlyFrmRect
= 0,
333 const bool bNoTxtFrmPrtAreaChanged
= false );
334 virtual void ConnectObj( svt::EmbeddedObjectRef
& xIPObj
, const SwRect
&rPrt
,
335 const SwRect
&rFrm
);
337 // styles and formats
339 // enum tells when should happen when the style was not found
340 enum GetStyle
{ GETSTYLE_NOCREATE
, // create none
341 GETSTYLE_CREATESOME
, // if on PoolId create mapt
342 GETSTYLE_CREATEANY
}; // return standard if applicable
344 SwTxtFmtColl
* GetParaStyle(const String
&rCollName
,
345 GetStyle eCreate
= GETSTYLE_NOCREATE
);
346 SwCharFmt
* GetCharStyle(const String
&rFmtName
,
347 GetStyle eCreate
= GETSTYLE_NOCREATE
);
348 SwFrmFmt
* GetTblStyle(const String
&rFmtName
);
350 void SetPageStyle(const String
&rCollName
);
352 String
GetCurPageStyle( const sal_Bool bCalcFrm
= sal_True
) const;
354 // change current style using the attributes in effect
355 void QuickUpdateStyle();
357 enum DoType
{ UNDO
, REDO
, REPEAT
};
359 void Do( DoType eDoType
, sal_uInt16 nCnt
= 1 );
360 String
GetDoString( DoType eDoType
) const;
361 String
GetRepeatString() const;
362 sal_uInt16
GetDoStrings( DoType eDoType
, SfxStringListItem
& rStrLstItem
) const;
364 // search and replace
365 sal_uLong
SearchPattern(const com::sun::star::util::SearchOptions
& rSearchOpt
,
366 sal_Bool bSearchInNotes
,
367 SwDocPositions eStart
, SwDocPositions eEnde
,
368 FindRanges eFlags
= FND_IN_BODY
,
369 int bReplace
= sal_False
);
371 sal_uLong
SearchTempl (const String
&rTempl
,
372 SwDocPositions eStart
, SwDocPositions eEnde
,
373 FindRanges eFlags
= FND_IN_BODY
,
374 const String
* pReplTempl
= 0 );
376 sal_uLong
SearchAttr (const SfxItemSet
& rFindSet
,
378 SwDocPositions eStart
,SwDocPositions eEnde
,
379 FindRanges eFlags
= FND_IN_BODY
,
380 const com::sun::star::util::SearchOptions
* pSearchOpt
= 0,
381 const SfxItemSet
* pReplaceSet
= 0);
383 void AutoCorrect( SvxAutoCorrect
& rACorr
, sal_Unicode cChar
= ' ' );
385 // action ahead of cursor movement
386 // resets selection if applicable, triggers timer and GCAttr()
387 void MoveCrsr( sal_Bool bWithSelect
= sal_False
);
389 // update input fields
390 sal_Bool
StartInputFldDlg(SwField
*, sal_Bool bNextButton
, Window
* pParentWin
= 0, OString
* pWindowState
= 0);
391 // update DropDown fields
392 sal_Bool
StartDropDownFldDlg(SwField
*, sal_Bool bNextButton
, OString
* pWindowState
= 0);
394 //"Handler" for changes at DrawView - for controls.
395 virtual void DrawSelChanged( );
397 // jump to bookmark and set the "selctions-flags" correctly again
398 sal_Bool
GotoMark( const ::sw::mark::IMark
* const pMark
);
399 sal_Bool
GotoMark( const ::sw::mark::IMark
* const pMark
, sal_Bool bSelect
, sal_Bool bStart
);
400 sal_Bool
GotoMark( const OUString
& rName
);
401 sal_Bool
GoNextBookmark(); // sal_True when there still was one
402 sal_Bool
GoPrevBookmark();
404 bool GotoFieldmark(::sw::mark::IFieldmark
const * const pMark
);
406 sal_Bool
GotoField( const SwFmtFld
& rFld
);
408 // jump to the next / previous hyperlink - inside text and also
410 bool SelectNextPrevHyperlink( bool bNext
= true );
412 // determine corresponding SwView
413 const SwView
& GetView() const { return rView
; }
414 SwView
& GetView() { return rView
; }
416 // Because nobody else is doing it, here is a ExecMacro()
417 void ExecMacro( const SvxMacro
& rMacro
, String
* pRet
= 0, SbxArray
* pArgs
= 0 );
418 // call into the dark Basic/JavaScript
419 sal_uInt16
CallEvent( sal_uInt16 nEvent
, const SwCallMouseEvent
& rCallEvent
,
420 bool bCheckPtr
= false, SbxArray
* pArgs
= 0,
421 const Link
* pCallBack
= 0 );
423 // a click at the given field. the cursor is on it.
424 // execute the predefined actions.
425 void ClickToField( const SwField
& rFld
);
426 void ClickToINetAttr( const SwFmtINetFmt
& rItem
, sal_uInt16 nFilter
= URLLOAD_NOFILTER
);
427 bool ClickToINetGrf( const Point
& rDocPt
, sal_uInt16 nFilter
= URLLOAD_NOFILTER
);
428 inline bool IsInClickToEdit() const ;
430 // if a URL-Button is selected, return its URL; otherwise an empty string
431 bool GetURLFromButton( String
& rURL
, String
& rDescr
) const;
433 void NavigatorPaste( const NaviContentBookmark
& rBkmk
,
434 const sal_uInt16 nAction
);
436 virtual void ApplyViewOptions( const SwViewOption
&rOpt
);
437 virtual void SetReadonlyOption( sal_Bool bSet
);
439 // automatic update of styles
440 void AutoUpdateFrame(SwFrmFmt
* pFmt
, const SfxItemSet
& rStyleSet
);
441 void AutoUpdatePara(SwTxtFmtColl
* pColl
, const SfxItemSet
& rStyleSet
, SwPaM
* pPaM
= NULL
);
443 // link for inserting ranges via Drag&Drop/Clipboard
444 DECL_STATIC_LINK( SwWrtShell
, InsertRegionDialog
, SwSectionData
* );
447 // ctor, the first one is a kind of a controlled copy ctor for more views of a document
448 SwWrtShell( SwWrtShell
&, Window
*pWin
, SwView
&rShell
);
449 SwWrtShell( SwDoc
& rDoc
, Window
*pWin
, SwView
&rShell
,
450 const SwViewOption
*pViewOpt
= 0);
451 virtual ~SwWrtShell();
453 bool TryRemoveIndent(); // #i23725#
455 String
GetSelDescr() const;
457 SwNavigationMgr
& GetNavigationMgr();
458 void addCurrentPosition();
459 sal_Bool
GotoFly( const String
& rName
, FlyCntType eType
= FLYCNTTYPE_ALL
,
460 sal_Bool bSelFrame
= sal_True
);
461 bool GotoINetAttr( const SwTxtINetFmt
& rAttr
);
462 void GotoOutline( sal_uInt16 nIdx
);
463 bool GotoOutline( const String
& rName
);
464 bool GotoRegion( const String
& rName
);
465 sal_Bool
GotoRefMark( const String
& rRefMark
, sal_uInt16 nSubType
= 0,
466 sal_uInt16 nSeqNo
= 0 );
467 sal_Bool
GotoNextTOXBase( const String
* pName
= 0);
468 bool GotoTable( const String
& rName
);
469 sal_Bool
GotoFld( const SwFmtFld
& rFld
);
470 const SwRedline
* GotoRedline( sal_uInt16 nArrPos
, sal_Bool bSelect
= sal_False
);
472 void ChangeHeaderOrFooter(const String
& rStyleName
, sal_Bool bHeader
, sal_Bool bOn
, sal_Bool bShowWarning
);
473 virtual void SetShowHeaderFooterSeparator( FrameControlType eControl
, bool bShow
);
477 SW_DLLPRIVATE
void OpenMark();
478 SW_DLLPRIVATE
void CloseMark( bool bOkFlag
);
480 SW_DLLPRIVATE String
GetWrdDelim();
481 SW_DLLPRIVATE String
GetSDelim();
482 SW_DLLPRIVATE String
GetBothDelim();
491 ModeStack(ModeStack
*pNextMode
, sal_Bool _bIns
, sal_Bool _bExt
, sal_Bool _bAdd
, sal_Bool _bBlock
):
500 // carry cursor along when PageUp / -Down
512 sal_Bool bValidCurPos
: 1;
513 sal_Bool bIsFrmSel
: 1;
516 CrsrStack( sal_Bool bValid
, sal_Bool bFrmSel
, const Point
&rDocPos
,
517 SwTwips lOff
, CrsrStack
*pN
)
520 bValidCurPos( bValid
),
521 bIsFrmSel( bFrmSel
),
531 SwNavigationMgr aNavigationMgr
;
535 bool HasCrsrStack() const { return 0 != pCrsrStack
; }
536 SW_DLLPRIVATE sal_Bool
PushCrsr(SwTwips lOffset
, sal_Bool bSelect
);
537 SW_DLLPRIVATE sal_Bool
PopCrsr(sal_Bool bUpdate
, sal_Bool bSelect
= sal_False
);
539 // take END cursor along when PageUp / -Down
540 SW_DLLPRIVATE
bool _SttWrd();
541 SW_DLLPRIVATE
bool _EndWrd();
542 SW_DLLPRIVATE sal_Bool
_NxtWrd();
543 SW_DLLPRIVATE sal_Bool
_PrvWrd();
545 SW_DLLPRIVATE sal_Bool
_NxtWrdForDelete();
546 SW_DLLPRIVATE sal_Bool
_PrvWrdForDelete();
547 SW_DLLPRIVATE sal_Bool
_FwdSentence();
548 SW_DLLPRIVATE sal_Bool
_BwdSentence();
550 SW_DLLPRIVATE sal_Bool
_BwdPara();
554 sal_Bool bInSelect
:1;
555 sal_Bool bExtMode
:1;
556 sal_Bool bAddMode
:1;
557 sal_Bool bBlockMode
:1;
558 sal_Bool bLayoutMode
:1;
562 bool bIsInClickToEdit
:1;
563 sal_Bool bClearMark
:1; // don't delete selection for ChartAutoPilot
564 sal_Bool mbRetainSelection
:1; // Do not remove selections
569 // resets the cursor stack after movement by PageUp/-Down
570 SW_DLLPRIVATE
void _ResetCursorStack();
572 SW_DLLPRIVATE
void SttDragDrop(Timer
*);
574 using SwCrsrShell::SetCrsr
;
575 SW_DLLPRIVATE
long SetCrsr(const Point
*, sal_Bool bProp
=sal_False
);
577 SW_DLLPRIVATE
long SetCrsrKillSel(const Point
*, sal_Bool bProp
=sal_False
);
579 SW_DLLPRIVATE
long StdSelect(const Point
*, sal_Bool bProp
=sal_False
);
580 SW_DLLPRIVATE
long BeginDrag(const Point
*, sal_Bool bProp
=sal_False
);
581 SW_DLLPRIVATE
long Drag(const Point
*, sal_Bool bProp
=sal_False
);
582 SW_DLLPRIVATE
long EndDrag(const Point
*, sal_Bool bProp
=sal_False
);
584 SW_DLLPRIVATE
long ExtSelWrd(const Point
*, sal_Bool bProp
=sal_False
);
585 SW_DLLPRIVATE
long ExtSelLn(const Point
*, sal_Bool bProp
=sal_False
);
587 // move text from Drag and Drop; Point is destination for all selections.
588 SW_DLLPRIVATE
long MoveText(const Point
*, sal_Bool bProp
=sal_False
);
590 SW_DLLPRIVATE
long BeginFrmDrag(const Point
*, sal_Bool bProp
=sal_False
);
592 // after SSize/Move of a frame update; Point is destination.
593 SW_DLLPRIVATE
long UpdateLayoutFrm(const Point
*, sal_Bool bProp
=sal_False
);
595 SW_DLLPRIVATE
long SttLeaveSelect(const Point
*, sal_Bool bProp
=sal_False
);
596 SW_DLLPRIVATE
long AddLeaveSelect(const Point
*, sal_Bool bProp
=sal_False
);
597 SW_DLLPRIVATE
long Ignore(const Point
*, sal_Bool bProp
=sal_False
);
599 SW_DLLPRIVATE
void LeaveExtSel() { bSelWrd
= bSelLn
= sal_False
;}
601 SW_DLLPRIVATE sal_Bool
GoStart(sal_Bool KeepArea
= sal_False
, sal_Bool
* = 0,
602 sal_Bool bSelect
= sal_False
, sal_Bool bDontMoveRegion
= sal_False
);
603 SW_DLLPRIVATE sal_Bool
GoEnd(sal_Bool KeepArea
= sal_False
, sal_Bool
* = 0);
610 BOOKMARK_LAST_LAST_ENTRY
613 SW_DLLPRIVATE sal_Bool
MoveBookMark(BookMarkMove eFuncId
, const ::sw::mark::IMark
* const pMark
=NULL
);
616 inline void SwWrtShell::ResetCursorStack()
618 if ( HasCrsrStack() )
622 inline void SwWrtShell::SelTblCells(const Link
&rLink
, sal_Bool bMark
)
624 SetSelTblCells( sal_True
);
628 inline void SwWrtShell::EndSelTblCells()
630 SetSelTblCells( sal_False
);
631 bClearMark
= sal_True
;
634 inline bool SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit
; }
636 inline bool SwWrtShell::Is_FnDragEQBeginDrag() const
639 SELECTFUNC fnTmp
= &SwWrtShell::BeginDrag
;
640 return fnDrag
== fnTmp
;
642 return fnDrag
== &SwWrtShell::BeginDrag
;
648 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */