20#include <fuconrec.hxx>
22#include <drawview.hxx>
29#include <svx/svxids.hrc>
30#include <svx/strings.hrc>
38#include <osl/diagnose.h>
68 Size aCaptionSize ( 2268, 1134 );
110 pSdrTextObj->ForceOutlinerParaObject();
130 case SID_LINE_ARROW_END:
131 case SID_LINE_ARROW_CIRCLE:
132 case SID_LINE_ARROW_SQUARE:
133 case SID_LINE_ARROW_START:
134 case SID_LINE_CIRCLE_ARROW:
135 case SID_LINE_SQUARE_ARROW:
136 case SID_LINE_ARROWS:
138 aObjKind = SdrObjKind::Line;
141 case SID_DRAW_MEASURELINE:
143 aObjKind = SdrObjKind::Measure;
148 aObjKind = SdrObjKind::Rectangle;
151 case SID_DRAW_ELLIPSE:
153 aObjKind = SdrObjKind::CircleOrEllipse;
156 case SID_DRAW_CAPTION:
157 case SID_DRAW_CAPTION_VERTICAL:
159 aObjKind = SdrObjKind::Caption;
164 aObjKind = SdrObjKind::Rectangle;
205 case SID_LINE_ARROW_END:
206 case SID_LINE_ARROW_CIRCLE:
207 case SID_LINE_ARROW_SQUARE:
208 case SID_LINE_ARROW_START:
209 case SID_LINE_CIRCLE_ARROW:
210 case SID_LINE_SQUARE_ARROW:
211 case SID_LINE_ARROWS:
213 if(
auto pPathObj =
dynamic_cast<SdrPathObj*
>( pObj.get() ))
215 sal_Int32 nYMiddle((aRect.
Top() + aRect.
Bottom()) / 2);
223 OSL_FAIL(
"Object is NO line object");
229 case SID_DRAW_MEASURELINE:
231 if(
auto pMeasureObj =
dynamic_cast<SdrMeasureObj*
>( pObj.get() ))
233 sal_Int32 nYMiddle((aRect.
Top() + aRect.
Bottom()) / 2);
234 pMeasureObj->SetPoint(
Point(aStart.
X(), nYMiddle), 0);
235 pMeasureObj->SetPoint(
Point(aEnd.
X(), nYMiddle), 1);
241 case SID_DRAW_CAPTION:
242 case SID_DRAW_CAPTION_VERTICAL:
244 if(
auto pCaptionObj =
dynamic_cast<SdrCaptionObj*
>( pObj.get() ))
246 bool bIsVertical(SID_DRAW_CAPTION_VERTICAL == nID);
248 pCaptionObj->SetVerticalWriting(bIsVertical);
255 pObj->SetMergedItemSet(aSet);
262 pCaptionObj->SetLogicRect(aRect);
263 pCaptionObj->SetTailPos(
268 OSL_FAIL(
"Object is NO caption object");
276 pObj->SetLogicRect(aRect);
284 pObj->SetMergedItemSet(aAttr);
static void SetLineEnds(SfxItemSet &rAttr, const SdrObject &rObj, sal_uInt16 nSlotId, tools::Long nWidth)
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual ~FuConstRectangle() override
virtual void Activate() override
virtual rtl::Reference< SdrObject > CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle &rRectangle) override
FuConstRectangle(ScTabViewShell &rViewSh, vcl::Window *pWin, ScDrawView *pView, SdrModel *pDoc, const SfxRequest &rReq)
static void SetLineEnds(SfxItemSet &rAttr, const SdrObject &rObj, sal_uInt16 nSlotId)
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual void Deactivate() override
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
void SetMouseButtonCode(sal_uInt16 nNew)
virtual void Deactivate()
ScTabViewShell & rViewShell
VclPtr< vcl::Window > pWindow
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
void SetVertical(bool bNew)
bool IsEffectivelyVertical() const
constexpr tools::Long X() const
void SetActivePointer(PointerStyle nPointer)
bool BegCreateObj(const Point &rPnt, OutputDevice *pOut=nullptr, short nMinMov=-3)
bool EndCreateObj(SdrCreateCmd eCmd)
SdrInventor GetCurrentObjInventor() const
SdrObjKind GetCurrentObjIdentifier() const
virtual bool IsAction() const override
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
SdrObject * GetCreateObj() const
bool BegCreateCaptionObj(const Point &rPnt, const Size &rObjSiz, OutputDevice *pOut=nullptr, short nMinMov=-3)
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
const SfxItemPool & GetItemPool() const
static rtl::Reference< SdrObject > MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
virtual OutlinerParaObject * GetOutlinerParaObject() const
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
SdrModel & getSdrModelFromSdrObject() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)