20#include <fuconstr.hxx>
22#include <svx/svxids.hrc>
59 :
FuDraw(pViewSh, pWin, pView, pDoc, rReq),
60 bSelectionChanged(false)
184 std::abs(aPnt.
X() -
aMDPos.
X()) < nDrgLog &&
185 std::abs(aPnt.
Y() -
aMDPos.
Y()) < nDrgLog)
251 bool bUseFillStyle, bUseNoFillStyle;
252 bUseFillStyle = bUseNoFillStyle =
false;
257 case SID_DRAW_RECT_ROUND:
258 case SID_DRAW_SQUARE:
259 case SID_DRAW_SQUARE_ROUND:
260 case SID_DRAW_ELLIPSE:
262 case SID_DRAW_ELLIPSECUT:
263 case SID_DRAW_CIRCLE:
264 case SID_DRAW_CIRCLEPIE:
265 case SID_DRAW_CIRCLECUT:
266 case SID_DRAW_POLYGON:
267 case SID_DRAW_XPOLYGON:
268 case SID_DRAW_FREELINE:
269 case SID_DRAW_BEZIER_FILL:
271 bUseFillStyle =
true;
274 case SID_DRAW_RECT_NOFILL:
275 case SID_DRAW_RECT_ROUND_NOFILL:
276 case SID_DRAW_SQUARE_NOFILL:
277 case SID_DRAW_SQUARE_ROUND_NOFILL:
278 case SID_DRAW_ELLIPSE_NOFILL:
279 case SID_DRAW_PIE_NOFILL:
280 case SID_DRAW_ELLIPSECUT_NOFILL:
281 case SID_DRAW_CIRCLE_NOFILL:
282 case SID_DRAW_CIRCLEPIE_NOFILL:
283 case SID_DRAW_CIRCLECUT_NOFILL:
284 case SID_DRAW_POLYGON_NOFILL:
285 case SID_DRAW_XPOLYGON_NOFILL:
286 case SID_DRAW_FREELINE_NOFILL:
289 case SID_CONNECTOR_ARROW_START:
290 case SID_CONNECTOR_ARROW_END:
291 case SID_CONNECTOR_ARROWS:
292 case SID_CONNECTOR_CIRCLE_START:
293 case SID_CONNECTOR_CIRCLE_END:
294 case SID_CONNECTOR_CIRCLES:
295 case SID_CONNECTOR_LINE:
296 case SID_CONNECTOR_LINE_ARROW_START:
297 case SID_CONNECTOR_LINE_ARROW_END:
298 case SID_CONNECTOR_LINE_ARROWS:
299 case SID_CONNECTOR_LINE_CIRCLE_START:
300 case SID_CONNECTOR_LINE_CIRCLE_END:
301 case SID_CONNECTOR_LINE_CIRCLES:
302 case SID_CONNECTOR_CURVE:
303 case SID_CONNECTOR_CURVE_ARROW_START:
304 case SID_CONNECTOR_CURVE_ARROW_END:
305 case SID_CONNECTOR_CURVE_ARROWS:
306 case SID_CONNECTOR_CURVE_CIRCLE_START:
307 case SID_CONNECTOR_CURVE_CIRCLE_END:
308 case SID_CONNECTOR_CURVE_CIRCLES:
309 case SID_CONNECTOR_LINES:
310 case SID_CONNECTOR_LINES_ARROW_START:
311 case SID_CONNECTOR_LINES_ARROW_END:
312 case SID_CONNECTOR_LINES_ARROWS:
313 case SID_CONNECTOR_LINES_CIRCLE_START:
314 case SID_CONNECTOR_LINES_CIRCLE_END:
315 case SID_CONNECTOR_LINES_CIRCLES:
316 case SID_DRAW_BEZIER_NOFILL:
317 case SID_LINE_ARROW_END:
319 bUseNoFillStyle =
true;
323 SetStyleSheet( rAttr, pObj, bUseFillStyle, bUseNoFillStyle );
327 const bool bForceFillStyle,
const bool bForceNoFillStyle )
349 if ( bForceFillStyle )
351 if (rFillStyle.GetValue() == drawing::FillStyle_NONE)
354 else if ( bForceNoFillStyle )
356 if (rFillStyle.GetValue() != drawing::FillStyle_NONE)
366 if ( bForceNoFillStyle )
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr) override
virtual void MovAction(const Point &rPnt) override
sal_uInt16 GetClicks() const
const Point & GetPosPixel() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
SAL_DLLPRIVATE DocumentType GetDocumentType() const
PageKind GetPageKind() const
virtual OUString GetLayoutName() const override
void SetEditMode(SdrViewEditMode eMode)
virtual bool IsAction() const override
bool EndDragObj(bool bCopy=false)
sal_Int32 GetDragThresholdPixels() const
bool IsDragWithCopy() const
void SetDragWithCopy(bool bOn)
bool IsRotateAllowed(bool b90Deg=false) const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
void SetDragMode(SdrDragMode eMode)
SdrHdl * PickHandle(const Point &rPnt) const
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
SdrDragMode GetDragMode() const
bool IsMarkedHit(const Point &rPnt, short nTol=-2) const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
SdrObject * GetMarkedSdrObj() const
SfxStyleSheetBasePool * GetStyleSheetPool() const
void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual SdrInventor GetObjInventor() const
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
SdrPage * GetPage() const
bool IsMasterPage() const
SdrModel & getSdrModelFromSdrPage() const
const SfxItemSet & GetDefaultAttr() const
SdrPageView * GetSdrPageView() const
sal_uInt16 getHitTolLog() const
bool IsExtendedMouseEventDispatcherEnabled() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
SfxDispatcher * GetDispatcher()
virtual void Start(bool bStartTimer=true) override
bool IsClickChangeRotation() const
virtual bool MouseMove(const MouseEvent &rMEvt) override
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual void Deactivate() override
deactivates the function
virtual void Activate() override
activates the function
void SetStyleSheet(SfxItemSet &rAttr, SdrObject *pObj)
set style sheet for the object to be created
bool IsIgnoreUnexpectedMouseButtonUp()
FuConstruct(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Base class for all Draw specific functions.
virtual void Activate() override
activates the function
virtual bool MouseMove(const MouseEvent &rMEvt) override
virtual void DoubleClick(const MouseEvent &rMEvt)
Response of doubleclick.
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
VclPtr< ::sd::Window > mpWindow
Point aMDPos
position of MouseButtonDown
void ForceScroll(const Point &aPixPos)
scroll when approached the border of the window; is called by MouseMove
virtual void Deactivate()
deactivates the function
Timer aDragTimer
for Drag&Drop
Base class of the stacked shell hierarchy.
FrameView * GetFrameView()
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
bool IsPresObjSelected(bool bOnPage=true, bool bOnMasterPage=true, bool bCheckPresObjListOnly=false, bool bCheckLayoutOnly=false) const
Is a presentation object selected?
An SdWindow contains the actual working area of ViewShell.
#define DBG_ASSERT(sCon, aError)
constexpr OUStringLiteral SD_LT_SEPARATOR
OUString SdResId(TranslateId aId)
constexpr OUStringLiteral STR_LAYOUT_BACKGROUNDOBJECTS
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)