LibreOffice Module sw (master)  1
Classes | Macros | Functions | Variables
edtwin.cxx File Reference
#include <config_features.h>
#include <swtypes.hxx>
#include <hintids.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <comphelper/string.hxx>
#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/XExtendedInputSequenceChecker.hpp>
#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
#include <com/sun/star/ui/ContextMenuExecuteEvent.hpp>
#include <vcl/inputctx.hxx>
#include <vcl/help.hxx>
#include <vcl/graph.hxx>
#include <vcl/weld.hxx>
#include <vcl/ptrstyle.hxx>
#include <sot/storage.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 <sfx2/htmlmode.hxx>
#include <svx/svdview.hxx>
#include <svx/svdhdl.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svxids.hrc>
#include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/scripttypeitem.hxx>
#include <editeng/flditem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/protitem.hxx>
#include <unotools/charclass.hxx>
#include <basegfx/color/bcolortools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
#include <sfx2/lokhelper.hxx>
#include <editeng/acorrcfg.hxx>
#include <SwSmartTagMgr.hxx>
#include <edtdd.hxx>
#include <edtwin.hxx>
#include <view.hxx>
#include <wrtsh.hxx>
#include <IDocumentSettingAccess.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 <fmtfsize.hxx>
#include <fmtclds.hxx>
#include <fmthdft.hxx>
#include <frmfmt.hxx>
#include <modcfg.hxx>
#include <fmtcol.hxx>
#include <wview.hxx>
#include <listsh.hxx>
#include <gloslst.hxx>
#include <inputwin.hxx>
#include <gloshdl.hxx>
#include <swundo.hxx>
#include <drwtxtsh.hxx>
#include <fchrfmt.hxx>
#include <fmturl.hxx>
#include "romenu.hxx"
#include <initui.hxx>
#include <frmatr.hxx>
#include <extinput.hxx>
#include <acmplwrd.hxx>
#include <swcalwrp.hxx>
#include <swdtflvr.hxx>
#include <wdocsh.hxx>
#include <breakit.hxx>
#include <checkit.hxx>
#include <pagefrm.hxx>
#include <HeaderFooterWin.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 <docstat.hxx>
#include <wordcountdialog.hxx>
#include <swwait.hxx>
#include <txtfld.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 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
 
static bool g_bModePushed = false
 
bool g_bDDTimerStarted = false
 
bool g_bFlushCharBuffer = false
 
bool g_bDDINetAttr = false
 
static SdrHdlKind g_eSdrMoveHdl = SdrHdlKind::User
 

Macro Definition Documentation

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

Avoid minimal movement shiver.

Definition at line 317 of file edtwin.cxx.

Referenced by SwEditWin::UpdatePointer().

#define MIN_MOVE   4

Definition at line 318 of file edtwin.cxx.

Referenced by IsMinMove(), and SwEditWin::SetGraphicTwipPosition().

#define MOVE_DOWN_BIG   3

Definition at line 998 of file edtwin.cxx.

Referenced by SwEditWin::ChangeDrawing(), SwEditWin::ChangeFly(), and SwEditWin::KeyInput().

#define MOVE_DOWN_HUGE   11
#define MOVE_DOWN_SMALL   7
#define MOVE_LEFT_BIG   4

Definition at line 999 of file edtwin.cxx.

Referenced by SwEditWin::ChangeDrawing(), SwEditWin::ChangeFly(), and SwEditWin::KeyInput().

#define MOVE_LEFT_HUGE   8
#define MOVE_LEFT_SMALL   0

Definition at line 995 of file edtwin.cxx.

Referenced by SwEditWin::ChangeDrawing(), SwEditWin::ChangeFly(), and SwEditWin::KeyInput().

#define MOVE_RIGHT_BIG   2

Definition at line 997 of file edtwin.cxx.

Referenced by SwEditWin::ChangeDrawing(), SwEditWin::ChangeFly(), and SwEditWin::KeyInput().

#define MOVE_RIGHT_HUGE   10
#define MOVE_RIGHT_SMALL   6
#define MOVE_UP_BIG   5
#define MOVE_UP_HUGE   9
#define MOVE_UP_SMALL   1

Definition at line 996 of file edtwin.cxx.

Referenced by SwEditWin::ChangeDrawing(), SwEditWin::ChangeFly(), and SwEditWin::KeyInput().

Function Documentation

IMPL_LINK_NOARG ( SwEditWin  ,
TimerHandler  ,
Timer ,
void   
)
IMPL_LINK_NOARG ( SwEditWin  ,
KeyInputFlushHandler  ,
Timer ,
void   
)

Definition at line 5813 of file edtwin.cxx.

IMPL_LINK_NOARG ( SwEditWin  ,
TemplateTimerHdl  ,
Timer ,
void   
)

Definition at line 5835 of file edtwin.cxx.

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 332 of file edtwin.cxx.

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

Referenced by SwEditWin::MouseButtonDown().

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

Definition at line 320 of file edtwin.cxx.

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

Referenced by SwEditWin::MouseMove().

static SfxShell * lcl_GetTextShellFromDispatcher ( SwView const &  rView)
static
static bool lcl_goIntoTextBox ( SwEditWin rEditWin,
SwWrtShell rSh 
)
static
static sal_uInt16 lcl_isNonDefaultLanguage ( LanguageType  eBufferLanguage,
SwView const &  rView,
const OUString &  rInBuffer 
)
static
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 2703 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

bool g_bDDINetAttr = false

Definition at line 186 of file edtwin.cxx.

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

bool g_bDDTimerStarted = false
bool g_bFlushCharBuffer = false

Definition at line 185 of file edtwin.cxx.

Referenced by SwView::Deactivate(), SwEditWin::FlushInBuffer(), and SwEditWin::KeyInput().

bool g_bFrameDrag = false
bool g_bHoldSelection = false
static

Definition at line 179 of file edtwin.cxx.

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

bool g_bInputLanguageSwitched = false
static

Globals.

Definition at line 172 of file edtwin.cxx.

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

bool g_bModePushed = false
static

Definition at line 183 of file edtwin.cxx.

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

bool g_bValidCursorPos = false
static
SdrHdlKind g_eSdrMoveHdl = SdrHdlKind::User
static

Definition at line 187 of file edtwin.cxx.

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