21#include <svx/dialogs.hrc>
39#include <document.hxx>
40#include <drawview.hxx>
47#define ShellClass_ScDrawShell
54#include <com/sun/star/util/XModifiable.hpp>
71 void lcl_convertStringArguments(
SfxItemSet& rArgs)
75 double fValue = pWidthItem->GetValue();
78 int nValue = fValue * nPow;
95 SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
96 ToolbarId::Draw_Objectbar);
122 css::uno::Reference< css::util::XModifiable > xModif( pShell->
GetModel(), css::uno::UNO_QUERY );
124 xModif->setModified(
true );
131 rBindings.
Invalidate(SID_ATTR_TRANSFORM_WIDTH);
132 rBindings.
Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
133 rBindings.
Invalidate(SID_ATTR_TRANSFORM_POS_X);
134 rBindings.
Invalidate(SID_ATTR_TRANSFORM_POS_Y);
135 rBindings.
Invalidate(SID_ATTR_TRANSFORM_ANGLE);
136 rBindings.
Invalidate(SID_ATTR_TRANSFORM_ROT_X);
137 rBindings.
Invalidate(SID_ATTR_TRANSFORM_ROT_Y);
138 rBindings.
Invalidate(SID_ATTR_TRANSFORM_AUTOWIDTH);
139 rBindings.
Invalidate(SID_ATTR_TRANSFORM_AUTOHEIGHT);
144 sal_uInt16 nSlot = rReq.
GetSlot();
152 if ( nMarkCount > 0 )
157 case SID_ASSIGNMACRO:
159 if ( pSingleSelectedObj )
164 case SID_CELL_FORMAT_RESET:
165 case SID_TEXT_STANDARD:
176 case SID_MOVE_SHAPE_HANDLE:
179 if (pArgs && pArgs->
Count () >= 3)
196 case SID_ATTR_LINE_STYLE:
197 case SID_ATTR_LINEEND_STYLE:
198 case SID_ATTR_LINE_START:
199 case SID_ATTR_LINE_END:
200 case SID_ATTR_LINE_DASH:
201 case SID_ATTR_LINE_WIDTH:
202 case SID_ATTR_LINE_COLOR:
203 case SID_ATTR_LINE_TRANSPARENCE:
204 case SID_ATTR_LINE_JOINT:
205 case SID_ATTR_LINE_CAP:
206 case SID_ATTR_FILL_STYLE:
207 case SID_ATTR_FILL_COLOR:
208 case SID_ATTR_FILL_GRADIENT:
209 case SID_ATTR_FILL_HATCH:
210 case SID_ATTR_FILL_BITMAP:
211 case SID_ATTR_FILL_TRANSPARENCE:
212 case SID_ATTR_FILL_FLOATTRANSPARENCE:
215 case SID_ATTR_FILL_SHADOW:
216 case SID_ATTR_SHADOW_TRANSPARENCE:
217 case SID_ATTR_SHADOW_COLOR:
218 case SID_ATTR_SHADOW_XDISTANCE:
219 case SID_ATTR_SHADOW_YDISTANCE:
226 case SID_ATTR_LINE_STYLE:
227 case SID_ATTR_LINE_DASH:
228 case SID_ATTR_LINE_WIDTH:
229 case SID_ATTR_LINE_COLOR:
230 case SID_ATTR_LINE_TRANSPARENCE:
231 case SID_ATTR_LINE_JOINT:
232 case SID_ATTR_LINE_CAP:
236 case SID_ATTR_FILL_STYLE:
237 case SID_ATTR_FILL_COLOR:
238 case SID_ATTR_FILL_GRADIENT:
239 case SID_ATTR_FILL_HATCH:
240 case SID_ATTR_FILL_BITMAP:
241 case SID_ATTR_FILL_TRANSPARENCE:
242 case SID_ATTR_FILL_FLOATTRANSPARENCE:
245 case SID_ATTR_FILL_SHADOW:
246 case SID_ATTR_SHADOW_TRANSPARENCE:
247 case SID_ATTR_SHADOW_COLOR:
248 case SID_ATTR_SHADOW_XDISTANCE:
249 case SID_ATTR_SHADOW_YDISTANCE:
263 std::unique_ptr<SfxItemSet> aNewArgs = rReq.
GetArgs()->
Clone();
264 lcl_convertStringArguments(*aNewArgs);
273 case SID_ATTRIBUTES_LINE:
277 case SID_ATTRIBUTES_AREA:
281 case SID_MEASURE_DLG:
285 case SID_DRAWTEXT_ATTR_DLG:
289 case SID_EDIT_HYPERLINK:
290 if ( pSingleSelectedObj )
294 case SID_REMOVE_HYPERLINK:
295 if ( pSingleSelectedObj )
302 case SID_OPEN_HYPERLINK:
303 case SID_COPY_HYPERLINK_LOCATION:
304 if ( nMarkCount == 1 )
317 if (nSlot == SID_OPEN_HYPERLINK)
321 else if (nSlot == SID_COPY_HYPERLINK_LOCATION)
323 uno::Reference<datatransfer::clipboard::XClipboard> xClipboard
331 case SID_ATTR_TRANSFORM:
339 if( rMarkList.
GetMark(0) !=
nullptr )
342 std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
357 aCombSet.
Put( aNewAttr );
358 aCombSet.
Put( aNewGeoAttr );
359 pDlg->SetInputSet( &aCombSet );
361 pDlg->StartExecuteAsync([pDlg, pRequest, pView,
this](
365 pRequest->Done(*(pDlg->GetOutputItemSet()));
380 pDlg->StartExecuteAsync([pDlg, pRequest, pView,
this](
384 pRequest->Done(*(pDlg->GetOutputItemSet()));
403 case SID_ATTR_GLOW_COLOR:
404 case SID_ATTR_GLOW_RADIUS:
405 case SID_ATTR_GLOW_TRANSPARENCY:
406 case SID_ATTR_SOFTEDGE_RADIUS:
407 case SID_ATTR_TEXTCOLUMNS_NUMBER:
408 case SID_ATTR_TEXTCOLUMNS_SPACING:
426 const OUString& sMacro = pInfo->
GetMacro();
427 aTab.
Insert(SvMacroItemId::OnClick,
SvxMacro(sMacro, OUString()));
433 aItemSet.
Put ( aItem );
436 aNamesItem.
AddEvent(
ScResId(RID_SCSTR_ONCLICK), OUString(), SvMacroItemId::OnClick );
437 aItemSet.
Put( aNamesItem );
439 css::uno::Reference < css::frame::XFrame >
xFrame;
445 if ( pMacroDlg->Execute() !=
RET_OK )
448 const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
480 std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
496 pDlg->StartExecuteAsync([=](sal_Int32 nResult){
516 std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
528 pDlg->StartExecuteAsync([=](sal_Int32 nResult){
556 sal_uInt16 nResult = pDlg->Execute();
583 sal_uInt16 nResult = pDlg->Execute();
constexpr auto convertTwipToMm100(N n)
SfxApplication * SfxGetpApp()
sal_uInt32 GetValue() const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
void ExecuteLineDlg(const SfxRequest &rReq)
void ExecDrawAttr(SfxRequest &rReq)
void ExecuteAreaDlg(const SfxRequest &rReq)
void ExecuteTextAttrDlg(SfxRequest &rReq)
void ExecuteMacroAssign(SdrObject *pObj, weld::Window *pWin)
static void InitInterface_Impl()
SfxInterface initializer.
void ExecuteMeasureDlg(SfxRequest &rReq)
static void StateDisableItems(SfxItemSet &rSet)
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
const OUString & GetMacro() const
void SetMacro(const OUString &rMacro)
SfxDispatcher & GetDispatcher()
ScDocument & GetDocument() const
ScGridWindow * GetActiveWin()
ScTabViewShell * GetViewShell() const
weld::Window * GetDialogParent()
ScDrawView * GetScDrawView()
SfxItemSet GetAttrFromMarked(bool bOnlyHardAttr) const
void SetAttrToMarked(const SfxItemSet &rAttr, bool bReplaceAll)
void SetGeoAttrToMarked(const SfxItemSet &rAttr, bool addPageMargin=false)
void MergeAttrFromMarked(SfxItemSet &rAttr, bool bOnlyHardAttr) const
SfxItemSet GetGeoAttrFromMarked() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) 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
SdrObject * GetMarkedSdrObj() const
const SfxItemPool & GetItemPool() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
const OUString & getHyperlink() const
virtual SdrObjList * GetSubList() const
bool IsGroupObject() const
virtual SdrObjKind GetObjIdentifier() const
void setHyperlink(const OUString &sHyperlink)
const SfxItemSet & GetDefaultAttr() const
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
sal_uInt16 getHitTolLog() const
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint, const sal_Int32 aObjectOrdNum=-1)
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
void Invalidate(sal_uInt16 nId)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
void AddEvent(const OUString &, const OUString &, SvMacroItemId)
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
void RegisterPopupMenu(const OUString &)
void RegisterChildWindow(sal_uInt16, bool bContext=false)
void RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, ToolbarId eId)
SfxItemPool * GetPool() const
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void DisableItem(sal_uInt16 nWhich)
css::uno::Reference< css::frame::XModel3 > GetModel() const
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
virtual SfxObjectShell * GetObjectShell()
static SfxInterface * GetStaticInterface()
SfxViewShell * GetViewShell() const
SfxBindings & GetBindings()
SfxFrame & GetFrame() const
SfxViewFrame & GetViewFrame() const
vcl::Window * GetWindow() const
virtual VclPtr< AbstractSvxAreaTabDialog > CreateSvxAreaTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, bool bShadow, bool bSlideBackground)=0
virtual VclPtr< SfxAbstractTabDialog > CreateTextTabDialog(weld::Window *pParent, const SfxItemSet *pAttrSet, SdrView *pView)=0
virtual VclPtr< SfxAbstractDialog > CreateEventConfigDialog(weld::Widget *pParent, const SfxItemSet &rAttr, const css::uno::Reference< css::frame::XFrame > &rFrame)=0
virtual VclPtr< AbstractSvxTransformTabDialog > CreateSvxTransformTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, const SdrView *pView, SvxAnchorIds nAnchorTypes=SvxAnchorIds::NONE)=0
virtual VclPtr< SfxAbstractDialog > CreateSfxDialog(weld::Window *pParent, const SfxItemSet &rAttr, const SdrView *pView, sal_uInt32 nResId)=0
virtual VclPtr< AbstractSvxCaptionDialog > CreateCaptionDialog(weld::Window *pParent, const SdrView *pView, SvxAnchorIds nAnchorTypes=SvxAnchorIds::NONE)=0
virtual VclPtr< SfxAbstractTabDialog > CreateSvxLineTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, const SdrObject *pObj, bool bHasObj)=0
static SvxAbstractDialogFactory * Create()
const SvxMacroTableDtor & GetMacroTable() const
void SetMacroTable(const SvxMacroTableDtor &rTbl)
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
const SvxMacro * Get(SvMacroItemId nEvent) const
const OUString & GetMacName() const
static BGradient fromJSON(std::u16string_view rJSON)
Point PixelToLogic(const Point &rDevicePt) const
weld::Window * GetFrameWeld() const
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard()
static void CopyStringTo(const OUString &rContent, const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rxClipboard, const vcl::ILibreOfficeKitNotifier *pNotifier=nullptr)
static void lcl_invalidateTransformAttr(const ScTabViewShell *pViewShell)
#define SFX_OBJECTBAR_OBJECT
OUString ScResId(TranslateId aId)
#define SFX_IMPL_INTERFACE(Class, SuperClass)
Reference< XFrame > xFrame
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MAXFRAMEHEIGHT(SDRATTR_MISC_FIRST+9)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MINFRAMEHEIGHT(SDRATTR_MISC_FIRST+1)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MAXFRAMEWIDTH(SDRATTR_MISC_FIRST+11)