30 #include <drawview.hxx>
32 #include <fuconrec.hxx>
34 #include <fuconarc.hxx>
35 #include <fuconuno.hxx>
38 #include <fuinsert.hxx>
73 SC_MOD()->InputEnterHandler();
86 sal_uInt16 nNewId = rReq.
GetSlot();
88 if ( nNewId == SID_DRAW_CHART )
95 if ( nNewId == SID_DRAW_SELECT )
96 nNewId = SID_OBJECT_SELECT;
99 if (nNewId == SID_FM_CREATE_CONTROL)
106 OUString sStringItemValue;
110 if ( pArgs->
GetItemState( nNewId,
true, &pItem ) == SfxItemState::SET )
111 if (
auto pStringItem = dynamic_cast<const SfxStringItem*>(pItem) )
112 sStringItemValue = pStringItem->GetValue();
114 bool bSwitchCustom = ( !sStringItemValue.isEmpty() && !
sDrawCustom.isEmpty() && sStringItemValue !=
sDrawCustom );
116 if (nNewId == SID_INSERT_FRAME)
117 nNewId = SID_DRAW_TEXT;
132 else if ( nNewId ==
nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL ||
141 if ( nNewId == SID_FM_CREATE_CONTROL )
149 nNewId = SID_OBJECT_SELECT;
184 if (nNewId == SID_DRAW_TEXT || nNewId == SID_DRAW_TEXT_VERTICAL
185 || nNewId == SID_DRAW_TEXT_MARQUEE || nNewId == SID_DRAW_NOTEEDIT)
208 assert(nNewId != SID_DRAW_CHART);
211 bool bCreateDirectly =
false;
215 case SID_OBJECT_SELECT:
223 case SID_LINE_ARROW_END:
224 case SID_LINE_ARROW_CIRCLE:
225 case SID_LINE_ARROW_SQUARE:
226 case SID_LINE_ARROW_START:
227 case SID_LINE_CIRCLE_ARROW:
228 case SID_LINE_SQUARE_ARROW:
229 case SID_LINE_ARROWS:
231 case SID_DRAW_ELLIPSE:
232 case SID_DRAW_MEASURELINE:
236 case SID_DRAW_CAPTION:
237 case SID_DRAW_CAPTION_VERTICAL:
243 case SID_DRAW_XPOLYGON:
244 case SID_DRAW_XPOLYGON_NOFILL:
245 case SID_DRAW_POLYGON:
246 case SID_DRAW_POLYGON_NOFILL:
247 case SID_DRAW_BEZIER_NOFILL:
248 case SID_DRAW_BEZIER_FILL:
249 case SID_DRAW_FREELINE:
250 case SID_DRAW_FREELINE_NOFILL:
256 case SID_DRAW_CIRCLECUT:
261 case SID_DRAW_TEXT_VERTICAL:
262 case SID_DRAW_TEXT_MARQUEE:
263 case SID_DRAW_NOTEEDIT:
267 case SID_FM_CREATE_CONTROL:
273 case SID_DRAWTBX_CS_BASIC :
274 case SID_DRAWTBX_CS_SYMBOL :
275 case SID_DRAWTBX_CS_ARROW :
276 case SID_DRAWTBX_CS_FLOWCHART :
277 case SID_DRAWTBX_CS_CALLOUT :
278 case SID_DRAWTBX_CS_STAR :
279 case SID_DRAW_CS_ID :
285 if ( nNewId != SID_DRAW_CS_ID )
329 aInsertPos = aVisArea.
Center();
330 aInsertPos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
331 aInsertPos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
338 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
344 aInsertPos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
345 aInsertPos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
348 tools::Rectangle aNewObjectRectangle(aInsertPos,
Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
369 if ( nNewId == SID_DRAW_CAPTION || nNewId == SID_DRAW_CAPTION_VERTICAL )
398 case SID_LINE_ARROW_END:
399 case SID_LINE_ARROW_CIRCLE:
400 case SID_LINE_ARROW_SQUARE:
401 case SID_LINE_ARROW_START:
402 case SID_LINE_CIRCLE_ARROW:
403 case SID_LINE_SQUARE_ARROW:
404 case SID_LINE_ARROWS:
405 case SID_DRAW_MEASURELINE:
407 case SID_DRAW_ELLIPSE:
408 case SID_DRAW_POLYGON:
409 case SID_DRAW_POLYGON_NOFILL:
410 case SID_DRAW_XPOLYGON:
411 case SID_DRAW_XPOLYGON_NOFILL:
412 case SID_DRAW_BEZIER_FILL:
413 case SID_DRAW_BEZIER_NOFILL:
414 case SID_DRAW_FREELINE:
415 case SID_DRAW_FREELINE_NOFILL:
418 case SID_DRAW_CIRCLECUT:
420 case SID_DRAW_TEXT_MARQUEE:
421 case SID_DRAW_CAPTION:
425 case SID_DRAW_TEXT_VERTICAL:
426 case SID_DRAW_CAPTION_VERTICAL:
433 case SID_OBJECT_SELECT:
437 case SID_DRAWTBX_CS_BASIC:
438 case SID_DRAWTBX_CS_SYMBOL:
439 case SID_DRAWTBX_CS_ARROW:
440 case SID_DRAWTBX_CS_FLOWCHART:
441 case SID_DRAWTBX_CS_CALLOUT:
442 case SID_DRAWTBX_CS_STAR:
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
bool IsDrawSelMode() const
size_t GetMarkCount() const
constexpr sal_uInt16 KEY_MOD1
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
void UpdateInputContext()
bool SelectObject(std::u16string_view rName)
bool AreObjectsMarked() const
sal_uInt16 GetValue() const
void ExecDraw(SfxRequest &)
void Done(bool bRemove=false)
Base class for all functions.
void SetFrameDragSingles(bool bOn=true)
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
void LockBackgroundLayer(bool bLock)
Locks/unlocks the background layer that contains background objects.
constexpr auto convertTwipToMm100(N n)
void SetSlot(sal_uInt16 nNewSlot)
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void SetWindow(vcl::Window *pWin)
void SetDrawFuncPtr(FuPoor *pFuncPtr)
SfxFrame & GetFrame() const
bool isCompatFlagSet(Compat flag)
constexpr sal_uInt16 KEY_F2
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
virtual bool KeyInput(const KeyEvent &rKEvt)
ScDrawView * GetScDrawView()
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
Base class for Text functions.
Base class for all functions.
void SetDrawTextShell(bool bActive)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
bool SelectObject(std::u16string_view rName)
sal_uInt16 GetModifier() const
virtual SdrView * GetDrawView() const override
SfxBindings & GetBindings()
const OUString & GetValue() const
const SdrMarkList & GetMarkedObjectList() const
const T * GetArg(sal_uInt16 nSlotId) const
void SetDrawShell(bool bActive)
Point GetPrintTwipsPosFromTileTwips(const Point &rTileTwipsPos) const
virtual SdrObjectUniquePtr CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle &rRectangle)
Size GetOutputSizePixel() const
void SetActualWin(const OutputDevice *pWin)
Base class for all functions.
bool MarkNextObj(bool bPrev=false)
const tools::Rectangle & GetAllMarkedRect() const
ScDBFunc * GetView() const
Point PixelToLogic(const Point &rDevicePt) const
void Update(sal_uInt16 nId)
void SetDrawFormShell(bool bActive)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
void DisableItem(sal_uInt16 nWhich)
ScDrawView * GetScDrawView()
void SetDrawFuncOldPtr(FuPoor *pFuncPtr)
virtual void Invalidate(sal_uInt16 nId=0)
SfxDispatcher & GetDispatcher()
FuPoor * GetDrawFuncPtr()
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
SdrPageView * GetSdrPageView() const
void InvalidateAll(bool bWithMsg)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
FuPoor * GetDrawFuncOldPtr()
virtual void MakeVisible(const tools::Rectangle &rRect, vcl::Window &rWin) override
SdrModel * GetModel() const
sal_Int32 GetDefaultObjectSizeWidth() const
sal_Int32 GetDefaultObjectSizeHeight() const
void GetDrawState(SfxItemSet &rSet)
void SetDrawSelMode(bool bNew)
virtual void Deactivate()