101 m_pWin->SetDrawAction(
true);
108 sal_uInt16 nEditMode =
m_pWin->GetBezierMode();
110 if (eHit == SdrHitKind::Handle && aVEvt.
mpHdl->
GetKind() == SdrHdlKind::BezierWeight)
115 m_pWin->SetDrawAction(
true);
117 else if (eHit == SdrHitKind::MarkedObject && nEditMode == SID_BEZIER_INSERT)
122 m_pWin->SetDrawAction(
true);
124 else if (eHit == SdrHitKind::MarkedObject && rMEvt.
IsMod1())
131 m_pWin->SetDrawAction(
true);
133 else if (eHit == SdrHitKind::MarkedObject && !rMEvt.
IsShift() && !rMEvt.
IsMod2())
138 else if (eHit == SdrHitKind::Handle)
206 m_pWin->SetDrawAction(
true);
241 bool bReturn =
false;
242 bool bCheckShell =
false;
243 bool bAutoCap =
false;
251 bool bMultiPoint = SdrObjKind::PolyLine == nDrawMode ||
252 SdrObjKind::Polygon == nDrawMode ||
253 SdrObjKind::PathLine == nDrawMode ||
254 SdrObjKind::PathFill == nDrawMode ||
255 SdrObjKind::FreehandLine == nDrawMode ||
256 SdrObjKind::FreehandFill == nDrawMode;
264 if (SdrObjKind::NewFrame == nDrawMode)
273 if(!didCreate && !bMultiPoint)
278 if (SdrObjKind::NewFrame == nDrawMode)
280 uno::Reference< frame::XDispatchRecorder > xRecorder =
282 if ( xRecorder.is() )
286 static_cast<sal_uInt16
>(RndStdIds::FLY_AT_PARA) ));
292 if(
m_pWin->GetFrameColCount() > 1)
306 if (
m_pWin->GetSdrDrawMode() == SdrObjKind::NewFrame)
328 m_pWin->SetDrawAction(
false);
379 m_pWin->SetDrawAction(
false);
423 m_pView->AttrChangedNotify(
nullptr);
453 m_pWin->SetDrawAction(
false);
455 if (
m_pWin->IsMouseCaptured())
459 if (
m_pWin->GetApplyTemplate())
472 m_pWin->SetDrawAction(
false);
482 aPnt =
m_pWin->PixelToLogic(
m_pWin->ScreenToOutputPixel(aPnt));
484 m_pWin->SetPointer(aPointTyp);
491 m_pWin->SetDrawAction(
false);
522 Point aEndPos(aStartPos);
523 aStartPos.
AdjustX(-constTwips_3cm);
524 aStartPos.
AdjustY(-constTwips_3cm);
525 aEndPos.
AdjustX(constTwips_3cm);
526 aEndPos.
AdjustY(constTwips_3cm);
sal_uInt16 GetModifier() const
const Point & GetPosPixel() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
void SetCreate1stPointAsCenter(bool bOn)
void SetEditMode(SdrViewEditMode eMode)
virtual bool IsAction() const override
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
virtual void EndAction() override
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr)
bool IsInsObjPoint() const
void SetResizeAtCenter(bool bOn)
bool BegInsObjPoint(const Point &rPnt, bool bNewObj)
bool EndInsObjPoint(SdrCreateCmd eCmd)
SdrHdlKind GetKind() const
SdrHdl * PickHandle(const Point &rPnt) const
bool IsMarkPoints() const
bool BegMarkPoints(const Point &rPnt, bool bUnmark=false)
virtual bool MarkPoint(SdrHdl &rHdl, bool bUnmark=false)
virtual bool HasMarkablePoints() const
bool UnmarkPoint(SdrHdl &rHdl)
bool IsPointMarked(const SdrHdl &rHdl) const
SdrPageView * GetSdrPageView() const
void SetAngleSnapEnabled(bool bOn)
bool IsSnapEnabled() const
Point GetSnapPos(const Point &rPnt, const SdrPageView *pPV) const
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
PointerStyle GetPreferredPointer(const Point &rMousePos, const OutputDevice *pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const
void Invalidate(sal_uInt16 nId)
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void AppendItem(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
SfxBindings & GetBindings()
SfxViewFrame & GetViewFrame() const
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
constexpr tools::Long Width() const
SwDrawBase(SwWrtShell *pSh, SwEditWin *pWin, SwView *pView)
virtual void Activate(const sal_uInt16 nSlotId)
VclPtr< SwEditWin > m_pWin
void SetSlotId(sal_uInt16 nSlot)
virtual void CreateDefaultObjectAtPosWithSize(Point aPos, Size aSize)
virtual void Deactivate()
virtual bool MouseButtonDown(const MouseEvent &rMEvt)
virtual bool doConstructOrthogonal() const
virtual bool MouseButtonUp(const MouseEvent &rMEvt)
Point GetDefaultCenterPos() const
bool MouseMove(const MouseEvent &rMEvt)
virtual void CreateDefaultObject()
void EnterSelectMode(const MouseEvent &rMEvt)
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
bool SetFlyFrameAttr(SfxItemSet &rSet)
Point GetAnchorObjDiff() const
Methods for status line.
bool BeginMark(const Point &rPos)
Functions for Rubberbox, it selects Draw-Objects.
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
bool IsObjSelectable(const Point &rPt)
The following two methods return enum SdrHdlKind.
bool BeginCreate(SdrObjKind eSdrObjectKind, const Point &rPos)
Process of creating draw objects.
bool EndCreate(SdrCreateCmd eSdrCreateCmd)
void CreateDefaultShape(SdrObjKind eSdrObjectKind, const tools::Rectangle &rRect, sal_uInt16 nSlotId)
bool IsDrawCreate() const
size_t IsObjSelected() const
bool SelectObj(const Point &rSelPt, sal_uInt8 nFlag=0, SdrObject *pObj=nullptr)
If an object has been given, exactly this object is selected (instead of searching over position).
void MoveCreate(const Point &rPos)
void MoveMark(const Point &rPos)
Of course Writer needs its own rectangles.
SwRect & Intersection(const SwRect &rRect)
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
void AddRule(SwUndoArg eWhat, const OUString &rWith)
sal_uInt16 GetViewLayoutColumns() const
bool IsViewLocked() const
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
const SwRect & VisArea() const
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId=nullptr)
virtual SdrView * GetDrawView() const override
SwWrtShell * GetWrtShellPtr() const
Used by the UI to modify the document model.
bool IsSelFrameMode() const
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
void NoEdit(bool bHideCursor=true)
const SwView & GetView() const
constexpr TypedWhichId< SwFormatCol > RES_COL(115)
constexpr sal_uInt16 KEY_SHIFT
constexpr auto toTwips(N number, Length from)
OUString SwResId(TranslateId aId)