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 ||
133 eNewFormObjKind ==
eFormObjKind || eNewFormObjKind == SdrObjKind::NONE ) && !bSwitchCustom )
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:
237 case SID_DRAW_CAPTION:
238 case SID_DRAW_CAPTION_VERTICAL:
244 case SID_DRAW_XPOLYGON:
245 case SID_DRAW_XPOLYGON_NOFILL:
246 case SID_DRAW_POLYGON:
247 case SID_DRAW_POLYGON_NOFILL:
248 case SID_DRAW_BEZIER_NOFILL:
249 case SID_DRAW_BEZIER_FILL:
250 case SID_DRAW_FREELINE:
251 case SID_DRAW_FREELINE_NOFILL:
257 case SID_DRAW_CIRCLECUT:
262 case SID_DRAW_TEXT_VERTICAL:
263 case SID_DRAW_TEXT_MARQUEE:
264 case SID_DRAW_NOTEEDIT:
269 case SID_FM_CREATE_CONTROL:
275 case SID_DRAWTBX_CS_BASIC :
276 case SID_DRAWTBX_CS_SYMBOL :
277 case SID_DRAWTBX_CS_ARROW :
278 case SID_DRAWTBX_CS_FLOWCHART :
279 case SID_DRAWTBX_CS_CALLOUT :
280 case SID_DRAWTBX_CS_STAR :
281 case SID_DRAW_CS_ID :
287 if ( nNewId != SID_DRAW_CS_ID )
331 aInsertPos = aVisArea.
Center();
332 aInsertPos.
AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
333 aInsertPos.
AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
341 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
347 aInsertPos.
AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
348 aInsertPos.
AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
351 tools::Rectangle aNewObjectRectangle(aInsertPos,
Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
374 case SID_DRAW_CAPTION:
375 case SID_DRAW_CAPTION_VERTICAL:
377 case SID_DRAW_TEXT_VERTICAL:
408 case SID_LINE_ARROW_END:
409 case SID_LINE_ARROW_CIRCLE:
410 case SID_LINE_ARROW_SQUARE:
411 case SID_LINE_ARROW_START:
412 case SID_LINE_CIRCLE_ARROW:
413 case SID_LINE_SQUARE_ARROW:
414 case SID_LINE_ARROWS:
415 case SID_DRAW_MEASURELINE:
417 case SID_DRAW_ELLIPSE:
418 case SID_DRAW_POLYGON:
419 case SID_DRAW_POLYGON_NOFILL:
420 case SID_DRAW_XPOLYGON:
421 case SID_DRAW_XPOLYGON_NOFILL:
422 case SID_DRAW_BEZIER_FILL:
423 case SID_DRAW_BEZIER_NOFILL:
424 case SID_DRAW_FREELINE:
425 case SID_DRAW_FREELINE_NOFILL:
428 case SID_DRAW_CIRCLECUT:
430 case SID_DRAW_TEXT_MARQUEE:
431 case SID_DRAW_CAPTION:
435 case SID_DRAW_TEXT_VERTICAL:
436 case SID_DRAW_CAPTION_VERTICAL:
443 case SID_OBJECT_SELECT:
447 case SID_DRAWTBX_CS_BASIC:
448 case SID_DRAWTBX_CS_SYMBOL:
449 case SID_DRAWTBX_CS_ARROW:
450 case SID_DRAWTBX_CS_FLOWCHART:
451 case SID_DRAWTBX_CS_CALLOUT:
452 case SID_DRAWTBX_CS_STAR:
constexpr auto convertTwipToMm100(N n)
sal_uInt16 GetValue() const
const OUString & GetValue() const
Base class for all functions.
Base class for all functions.
virtual bool KeyInput(const KeyEvent &rKEvt)
virtual rtl::Reference< SdrObject > CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle &rRectangle)
void SetWindow(vcl::Window *pWin)
virtual void Deactivate()
Base class for all functions.
Base class for Text functions.
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
sal_Int32 GetDefaultObjectSizeWidth() const
sal_Int32 GetDefaultObjectSizeHeight() const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
virtual void MakeVisible(const tools::Rectangle &rRect, vcl::Window &rWin) override
bool SelectObject(std::u16string_view rName)
void LockBackgroundLayer(bool bLock)
Locks/unlocks the background layer that contains background objects.
void SetDrawTextShell(bool bActive)
virtual SdrView * GetDrawView() const override
void ExecDraw(SfxRequest &)
void SetDrawFormShell(bool bActive)
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
bool SelectObject(std::u16string_view rName)
void GetDrawState(SfxItemSet &rSet)
void SetDrawShell(bool bActive)
FuPoor * GetDrawFuncPtr()
void SetDrawFuncOldPtr(FuPoor *pFuncPtr)
void SetDrawFuncPtr(FuPoor *pFuncPtr)
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
void SetDrawSelMode(bool bNew)
ScDrawView * GetScDrawView()
bool IsDrawSelMode() const
FuPoor * GetDrawFuncOldPtr()
void UpdateInputContext()
SfxDispatcher & GetDispatcher()
ScDocument & GetDocument() const
ScDBFunc * GetView() const
Point GetPrintTwipsPosFromTileTwips(const Point &rTileTwipsPos) const
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
ScDrawView * GetScDrawView()
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
size_t GetMarkCount() const
void SetFrameDragSingles(bool bOn=true)
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
const tools::Rectangle & GetAllMarkedRect() const
bool MarkNextObj(bool bPrev=false)
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
void SetActualWin(const OutputDevice *pWin)
void Update(sal_uInt16 nId)
void Invalidate(sal_uInt16 nId)
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)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void DisableItem(sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
void SetSlot(sal_uInt16 nNewSlot)
const T * GetArg(sal_uInt16 nSlotId) const
sal_uInt16 GetModifier() const
void Done(bool bRemove=false)
virtual void Invalidate(sal_uInt16 nId=0)
SfxBindings & GetBindings()
SfxFrame & GetFrame() const
SfxViewFrame & GetViewFrame() const
::OutputDevice const * GetOutDev() const
Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
constexpr sal_uInt16 KEY_F2
constexpr sal_uInt16 KEY_MOD1
#define LINK(Instance, Class, Member)
bool IsVerticalTextEnabled()
bool isCompatFlagSet(Compat flag)