LibreOffice Module sw (master) 1
Classes | Macros | Functions | Variables
edtwin.cxx File Reference
#include <config_wasm_strip.h>
#include <swtypes.hxx>
#include <hintids.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/awt/PopupMenuDirection.hpp>
#include <com/sun/star/awt/XPopupMenu.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
#include <com/sun/star/ui/ContextMenuExecuteEvent.hpp>
#include <comphelper/scopeguard.hxx>
#include <comphelper/string.hxx>
#include <vcl/dialoghelper.hxx>
#include <vcl/inputctx.hxx>
#include <vcl/help.hxx>
#include <vcl/weld.hxx>
#include <vcl/ptrstyle.hxx>
#include <svl/macitem.hxx>
#include <unotools/securityoptions.hxx>
#include <basic/sbxvar.hxx>
#include <svl/ctloptions.hxx>
#include <basic/sbx.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <sfx2/ipclient.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <svl/ptitem.hxx>
#include <editeng/sizeitem.hxx>
#include <editeng/langitem.hxx>
#include <svx/statusitem.hxx>
#include <svx/svdview.hxx>
#include <svx/svdhdl.hxx>
#include <svx/svdoutl.hxx>
#include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/flditem.hxx>
#include <editeng/colritem.hxx>
#include <unotools/charclass.hxx>
#include <unotools/datetime.hxx>
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>
#include <editeng/acorrcfg.hxx>
#include <bookmark.hxx>
#include <SwSmartTagMgr.hxx>
#include <edtdd.hxx>
#include <edtwin.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentUndoRedo.hxx>
#include <textboxhelper.hxx>
#include <dcontact.hxx>
#include <fldbas.hxx>
#include <swmodule.hxx>
#include <docsh.hxx>
#include <viewopt.hxx>
#include <drawbase.hxx>
#include <dselect.hxx>
#include <textsh.hxx>
#include <shdwcrsr.hxx>
#include <txatbase.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmthdft.hxx>
#include <frmfmt.hxx>
#include <modcfg.hxx>
#include <fmtcol.hxx>
#include <wview.hxx>
#include <gloslst.hxx>
#include <inputwin.hxx>
#include <gloshdl.hxx>
#include <swundo.hxx>
#include <drwtxtsh.hxx>
#include <fchrfmt.hxx>
#include "romenu.hxx"
#include <initui.hxx>
#include <frmatr.hxx>
#include <extinput.hxx>
#include <acmplwrd.hxx>
#include <swcalwrp.hxx>
#include <swdtflvr.hxx>
#include <breakit.hxx>
#include <checkit.hxx>
#include <pagefrm.hxx>
#include <helpids.h>
#include <cmdid.h>
#include <uitool.hxx>
#include <fmtfollowtextflow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <charfmt.hxx>
#include <numrule.hxx>
#include <pagedesc.hxx>
#include <svtools/ruler.hxx>
#include <formatclipboard.hxx>
#include <vcl/svapp.hxx>
#include <wordcountdialog.hxx>
#include <fmtfld.hxx>
#include <IMark.hxx>
#include <doc.hxx>
#include <xmloff/odffields.hxx>
#include <PostItMgr.hxx>
#include <FrameControlsManager.hxx>
#include <AnnotationWin.hxx>
#include <algorithm>
#include <vector>
#include <rootfrm.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <salhelper/singletonref.hxx>
#include <sfx2/event.hxx>
#include <memory>
#include "../../core/crsr/callnk.hxx"
#include <IDocumentOutlineNodes.hxx>
#include <ndtxt.hxx>
#include <cntfrm.hxx>
#include <txtfrm.hxx>
#include <strings.hrc>
#include <textcontentcontrol.hxx>
#include <contentcontrolbutton.hxx>
Include dependency graph for edtwin.cxx:

Go to the source code of this file.

Classes

class  SwAnchorMarker
 
struct  QuickHelpData
 Assists with auto-completion of AutoComplete words and AutoText names. More...
 

Macros

#define HIT_PIX   2 /* hit tolerance in pixel */
 Avoid minimal movement shiver. More...
 
#define MIN_MOVE   4
 
#define MOVE_LEFT_SMALL   0
 
#define MOVE_UP_SMALL   1
 
#define MOVE_RIGHT_BIG   2
 
#define MOVE_DOWN_BIG   3
 
#define MOVE_LEFT_BIG   4
 
#define MOVE_UP_BIG   5
 
#define MOVE_RIGHT_SMALL   6
 
#define MOVE_DOWN_SMALL   7
 
#define MOVE_LEFT_HUGE   8
 
#define MOVE_UP_HUGE   9
 
#define MOVE_RIGHT_HUGE   10
 
#define MOVE_DOWN_HUGE   11
 

Functions

static SfxShelllcl_GetTextShellFromDispatcher (SwView const &rView)
 
static bool lcl_goIntoTextBox (SwEditWin &rEditWin, SwWrtShell &rSh)
 Check if the selected shape has a TextBox: if so, go into that instead. More...
 
static bool IsMinMove (const Point &rStartPos, const Point &rLPt)
 
static bool IsDrawObjSelectable (const SwWrtShell &rSh, const Point &rPt)
 For MouseButtonDown - determine whether a DrawObject a NO SwgFrame was hit! Shift/Ctrl should only result in selecting, with DrawObjects; at SwgFlys to trigger hyperlinks if applicable (Download/NewWindow!) More...
 
 IMPL_LINK_NOARG (SwEditWin, TimerHandler, Timer *, void)
 Increase timer for selection. More...
 
static sal_uInt16 lcl_isNonDefaultLanguage (LanguageType eBufferLanguage, SwView const &rView, const OUString &rInBuffer)
 
static bool lcl_urlOverBackground (SwWrtShell &rSh, const Point &rDocPos)
 Determines if the current position has a clickable url over a background frame. More...
 
 IMPL_LINK_NOARG (SwEditWin, KeyInputFlushHandler, Timer *, void)
 
 IMPL_LINK_NOARG (SwEditWin, TemplateTimerHdl, Timer *, void)
 

Variables

static bool g_bInputLanguageSwitched = false
 Globals. More...
 
static bool g_bHoldSelection = false
 
bool g_bFrameDrag = false
 
static bool g_bValidCursorPos = false
 
bool g_bModePushed = false
 
bool g_bDDTimerStarted = false
 
bool g_bDDINetAttr = false
 
static SdrHdlKind g_eSdrMoveHdl = SdrHdlKind::User
 

Macro Definition Documentation

◆ HIT_PIX

#define HIT_PIX   2 /* hit tolerance in pixel */

Avoid minimal movement shiver.

Definition at line 309 of file edtwin.cxx.

◆ MIN_MOVE

#define MIN_MOVE   4

Definition at line 310 of file edtwin.cxx.

◆ MOVE_DOWN_BIG

#define MOVE_DOWN_BIG   3

Definition at line 1026 of file edtwin.cxx.

◆ MOVE_DOWN_HUGE

#define MOVE_DOWN_HUGE   11

Definition at line 1036 of file edtwin.cxx.

◆ MOVE_DOWN_SMALL

#define MOVE_DOWN_SMALL   7

Definition at line 1030 of file edtwin.cxx.

◆ MOVE_LEFT_BIG

#define MOVE_LEFT_BIG   4

Definition at line 1027 of file edtwin.cxx.

◆ MOVE_LEFT_HUGE

#define MOVE_LEFT_HUGE   8

Definition at line 1033 of file edtwin.cxx.

◆ MOVE_LEFT_SMALL

#define MOVE_LEFT_SMALL   0

Definition at line 1023 of file edtwin.cxx.

◆ MOVE_RIGHT_BIG

#define MOVE_RIGHT_BIG   2

Definition at line 1025 of file edtwin.cxx.

◆ MOVE_RIGHT_HUGE

#define MOVE_RIGHT_HUGE   10

Definition at line 1035 of file edtwin.cxx.

◆ MOVE_RIGHT_SMALL

#define MOVE_RIGHT_SMALL   6

Definition at line 1029 of file edtwin.cxx.

◆ MOVE_UP_BIG

#define MOVE_UP_BIG   5

Definition at line 1028 of file edtwin.cxx.

◆ MOVE_UP_HUGE

#define MOVE_UP_HUGE   9

Definition at line 1034 of file edtwin.cxx.

◆ MOVE_UP_SMALL

#define MOVE_UP_SMALL   1

Definition at line 1024 of file edtwin.cxx.

Function Documentation

◆ IMPL_LINK_NOARG() [1/3]

IMPL_LINK_NOARG ( SwEditWin  ,
KeyInputFlushHandler  ,
Timer ,
void   
)

Definition at line 6176 of file edtwin.cxx.

◆ IMPL_LINK_NOARG() [2/3]

IMPL_LINK_NOARG ( SwEditWin  ,
TemplateTimerHdl  ,
Timer ,
void   
)

Definition at line 6198 of file edtwin.cxx.

◆ IMPL_LINK_NOARG() [3/3]

IMPL_LINK_NOARG ( SwEditWin  ,
TimerHandler  ,
Timer ,
void   
)

◆ IsDrawObjSelectable()

static bool IsDrawObjSelectable ( const SwWrtShell rSh,
const Point rPt 
)
static

For MouseButtonDown - determine whether a DrawObject a NO SwgFrame was hit! Shift/Ctrl should only result in selecting, with DrawObjects; at SwgFlys to trigger hyperlinks if applicable (Download/NewWindow!)

Definition at line 324 of file edtwin.cxx.

References SwFEShell::GetObjCntType(), OBJCNT_FLY, OBJCNT_GRF, OBJCNT_NONE, and OBJCNT_OLE.

Referenced by SwEditWin::MouseButtonDown().

◆ IsMinMove()

static bool IsMinMove ( const Point rStartPos,
const Point rLPt 
)
static

Definition at line 312 of file edtwin.cxx.

References abs(), MIN_MOVE, Point::X(), and Point::Y().

Referenced by SwEditWin::MouseMove().

◆ lcl_GetTextShellFromDispatcher()

static SfxShell * lcl_GetTextShellFromDispatcher ( SwView const &  rView)
static

◆ lcl_goIntoTextBox()

static bool lcl_goIntoTextBox ( SwEditWin rEditWin,
SwWrtShell rSh 
)
static

◆ lcl_isNonDefaultLanguage()

static sal_uInt16 lcl_isNonDefaultLanguage ( LanguageType  eBufferLanguage,
SwView const &  rView,
const OUString &  rInBuffer 
)
static

◆ lcl_urlOverBackground()

static bool lcl_urlOverBackground ( SwWrtShell rSh,
const Point rDocPos 
)
static

Determines if the current position has a clickable url over a background frame.

In that case, ctrl-click should select the url, not the frame.

Definition at line 2850 of file edtwin.cxx.

References SwCursorShell::GetContentAtPos(), SwViewShell::GetDoc(), IDocumentDrawModelAccess::GetHellId(), SwDoc::getIDocumentDrawModelAccess(), SdrObject::GetLayer(), SwFEShell::GetObjAt(), and InetAttr.

Referenced by SwEditWin::MouseButtonDown().

Variable Documentation

◆ g_bDDINetAttr

bool g_bDDINetAttr = false

Definition at line 178 of file edtwin.cxx.

Referenced by SwEditWin::MouseMove(), and SwTransferable::PrivateDrop().

◆ g_bDDTimerStarted

bool g_bDDTimerStarted = false

◆ g_bFrameDrag

bool g_bFrameDrag = false

◆ g_bHoldSelection

bool g_bHoldSelection = false
static

Definition at line 172 of file edtwin.cxx.

Referenced by SwEditWin::MouseButtonDown(), and SwEditWin::MouseButtonUp().

◆ g_bInputLanguageSwitched

bool g_bInputLanguageSwitched = false
static

Globals.

Definition at line 165 of file edtwin.cxx.

Referenced by SwEditWin::Command(), and lcl_isNonDefaultLanguage().

◆ g_bModePushed

bool g_bModePushed = false

◆ g_bValidCursorPos

bool g_bValidCursorPos = false
static

◆ g_eSdrMoveHdl

SdrHdlKind g_eSdrMoveHdl = SdrHdlKind::User
static

Definition at line 179 of file edtwin.cxx.

Referenced by SwEditWin::MouseButtonUp(), and SwEditWin::MouseMove().