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_TEXT_STANDARD:
170 case SID_MOVE_SHAPE_HANDLE:
173 if (pArgs && pArgs->
Count () >= 3)
190 case SID_ATTR_LINE_STYLE:
191 case SID_ATTR_LINEEND_STYLE:
192 case SID_ATTR_LINE_START:
193 case SID_ATTR_LINE_END:
194 case SID_ATTR_LINE_DASH:
195 case SID_ATTR_LINE_WIDTH:
196 case SID_ATTR_LINE_COLOR:
197 case SID_ATTR_LINE_TRANSPARENCE:
198 case SID_ATTR_LINE_JOINT:
199 case SID_ATTR_LINE_CAP:
200 case SID_ATTR_FILL_STYLE:
201 case SID_ATTR_FILL_COLOR:
202 case SID_ATTR_FILL_GRADIENT:
203 case SID_ATTR_FILL_HATCH:
204 case SID_ATTR_FILL_BITMAP:
205 case SID_ATTR_FILL_TRANSPARENCE:
206 case SID_ATTR_FILL_FLOATTRANSPARENCE:
209 case SID_ATTR_FILL_SHADOW:
210 case SID_ATTR_SHADOW_TRANSPARENCE:
211 case SID_ATTR_SHADOW_COLOR:
212 case SID_ATTR_SHADOW_XDISTANCE:
213 case SID_ATTR_SHADOW_YDISTANCE:
220 case SID_ATTR_LINE_STYLE:
221 case SID_ATTR_LINE_DASH:
222 case SID_ATTR_LINE_WIDTH:
223 case SID_ATTR_LINE_COLOR:
224 case SID_ATTR_LINE_TRANSPARENCE:
225 case SID_ATTR_LINE_JOINT:
226 case SID_ATTR_LINE_CAP:
230 case SID_ATTR_FILL_STYLE:
231 case SID_ATTR_FILL_COLOR:
232 case SID_ATTR_FILL_GRADIENT:
233 case SID_ATTR_FILL_HATCH:
234 case SID_ATTR_FILL_BITMAP:
235 case SID_ATTR_FILL_TRANSPARENCE:
236 case SID_ATTR_FILL_FLOATTRANSPARENCE:
239 case SID_ATTR_FILL_SHADOW:
240 case SID_ATTR_SHADOW_TRANSPARENCE:
241 case SID_ATTR_SHADOW_COLOR:
242 case SID_ATTR_SHADOW_XDISTANCE:
243 case SID_ATTR_SHADOW_YDISTANCE:
258 lcl_convertStringArguments(aNewArgs);
267 case SID_ATTRIBUTES_LINE:
271 case SID_ATTRIBUTES_AREA:
275 case SID_MEASURE_DLG:
279 case SID_DRAWTEXT_ATTR_DLG:
283 case SID_EDIT_HYPERLINK:
284 if ( pSingleSelectedObj )
288 case SID_REMOVE_HYPERLINK:
289 if ( pSingleSelectedObj )
296 case SID_OPEN_HYPERLINK:
297 case SID_COPY_HYPERLINK_LOCATION:
298 if ( nMarkCount == 1 )
311 if (nSlot == SID_OPEN_HYPERLINK)
315 else if (nSlot == SID_COPY_HYPERLINK_LOCATION)
317 uno::Reference<datatransfer::clipboard::XClipboard> xClipboard
325 case SID_ATTR_TRANSFORM:
333 if( rMarkList.
GetMark(0) !=
nullptr )
336 std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
351 aCombSet.
Put( aNewAttr );
352 aCombSet.
Put( aNewGeoAttr );
353 pDlg->SetInputSet( &aCombSet );
355 pDlg->StartExecuteAsync([pDlg, pRequest, pView,
this](
359 pRequest->Done(*(pDlg->GetOutputItemSet()));
374 pDlg->StartExecuteAsync([pDlg, pRequest, pView,
this](
378 pRequest->Done(*(pDlg->GetOutputItemSet()));
397 case SID_ATTR_GLOW_COLOR:
398 case SID_ATTR_GLOW_RADIUS:
399 case SID_ATTR_GLOW_TRANSPARENCY:
400 case SID_ATTR_SOFTEDGE_RADIUS:
401 case SID_ATTR_TEXTCOLUMNS_NUMBER:
402 case SID_ATTR_TEXTCOLUMNS_SPACING:
420 const OUString& sMacro = pInfo->
GetMacro();
421 aTab.
Insert(SvMacroItemId::OnClick,
SvxMacro(sMacro, OUString()));
427 aItemSet.
Put ( aItem );
430 aNamesItem.
AddEvent(
ScResId(RID_SCSTR_ONCLICK), OUString(), SvMacroItemId::OnClick );
431 aItemSet.
Put( aNamesItem );
433 css::uno::Reference < css::frame::XFrame >
xFrame;
439 if ( pMacroDlg->Execute() !=
RET_OK )
442 const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
474 std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
490 pDlg->StartExecuteAsync([=](sal_Int32 nResult){
510 std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
522 pDlg->StartExecuteAsync([=](sal_Int32 nResult){
550 sal_uInt16 nResult = pDlg->Execute();
577 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 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()
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
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemSet CloneAsValue(bool bItems=true, SfxItemPool *pToPool=nullptr) 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 XGradient 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