LibreOffice Module sc (master)  1
drawsh.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <svx/svxdlg.hxx>
21 #include <svx/dialogs.hrc>
22 #include <sc.hrc>
23 
24 #include <editeng/eeitem.hxx>
25 #include <svx/fontwork.hxx>
26 #include <svx/svdpage.hxx>
27 #include <sfx2/app.hxx>
28 #include <sfx2/objface.hxx>
29 #include <sfx2/objsh.hxx>
30 #include <sfx2/request.hxx>
31 #include <sfx2/dispatch.hxx>
32 #include <sfx2/viewfrm.hxx>
33 #include <svl/whiter.hxx>
34 
35 #include <drawsh.hxx>
36 #include <drwlayer.hxx>
37 #include <strings.hrc>
38 #include <viewdata.hxx>
39 #include <document.hxx>
40 #include <drawview.hxx>
41 #include <scresid.hxx>
42 #include <svx/svdobj.hxx>
43 #include <tabvwsh.hxx>
44 #include <gridwin.hxx>
45 #include <sfx2/bindings.hxx>
46 
47 #define ShellClass_ScDrawShell
48 #include <scslots.hxx>
49 
50 #include <userdat.hxx>
51 #include <svl/macitem.hxx>
52 #include <sfx2/evntconf.hxx>
53 #include <sfx2/viewsh.hxx>
54 #include <com/sun/star/util/XModifiable.hpp>
55 #include <memory>
56 #include <svx/xlnwtit.hxx>
57 #include <svx/chrtitem.hxx>
58 #include <svx/xlnclit.hxx>
59 #include <svx/xflclit.hxx>
60 #include <svx/xflgrit.hxx>
61 #include <tools/UnitConversion.hxx>
62 #include <comphelper/lok.hxx>
63 #include <vcl/unohelp2.hxx>
64 
65 using namespace css;
66 
68 
69 namespace
70 {
71  void lcl_convertStringArguments(sal_uInt16 nSlot, SfxItemSet& rArgs)
72  {
73  Color aColor;
74 
75  if (const SvxDoubleItem* pWidthItem = rArgs.GetItemIfSet(SID_ATTR_LINE_WIDTH_ARG, false))
76  {
77  double fValue = pWidthItem->GetValue();
78  // FIXME: different units...
79  int nPow = 100;
80  int nValue = fValue * nPow;
81 
82  XLineWidthItem aItem(nValue);
83  rArgs.Put(aItem);
84  }
85  else if (const SfxStringItem* pColorItem = rArgs.GetItemIfSet(SID_ATTR_COLOR_STR, false))
86  {
87  OUString sColor = pColorItem->GetValue();
88 
89  if (sColor == "transparent")
90  aColor = COL_TRANSPARENT;
91  else
92  aColor = Color(ColorTransparency, sColor.toInt32(16));
93 
94  switch (nSlot)
95  {
96  case SID_ATTR_LINE_COLOR:
97  {
98  XLineColorItem aLineColorItem(OUString(), aColor);
99  rArgs.Put(aLineColorItem);
100  break;
101  }
102 
103  case SID_ATTR_FILL_COLOR:
104  {
105  XFillColorItem aFillColorItem(OUString(), aColor);
106  rArgs.Put(aFillColorItem);
107  break;
108  }
109 
110  case SID_ATTR_SHADOW_COLOR:
111  {
112  XColorItem aItem(SDRATTR_SHADOWCOLOR, aColor);
113  rArgs.Put(aItem);
114  break;
115  }
116  }
117  }
118  if (const SfxStringItem* pJSON = rArgs.GetItemIfSet(SID_FILL_GRADIENT_JSON, false))
119  {
120  XGradient aGradient = XGradient::fromJSON(pJSON->GetValue());
121  XFillGradientItem aItem(aGradient);
122  rArgs.Put(aItem);
123  }
124  }
125 }
126 
128 {
129  GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
130  SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
131  ToolbarId::Draw_Objectbar);
132 
133  GetStaticInterface()->RegisterPopupMenu("draw");
134 
135  GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
136 }
137 
138 // disable the unwanted Accelerators
139 
141 {
142  SfxWhichIter aIter(rSet);
143  sal_uInt16 nWhich = aIter.FirstWhich();
144 
145  while (nWhich)
146  {
147  rSet.DisableItem( nWhich );
148  nWhich = aIter.NextWhich();
149  }
150 }
151 
153 {
154  const SfxObjectShell* pShell = GetObjectShell();
155  if ( pShell )
156  {
157  css::uno::Reference< css::util::XModifiable > xModif( pShell->GetModel(), css::uno::UNO_QUERY );
158  if ( xModif.is() )
159  xModif->setModified( true );
160  }
161 }
162 
163 static void lcl_invalidateTransformAttr(const ScTabViewShell* pViewShell)
164 {
165  SfxBindings& rBindings=pViewShell->GetViewFrame()->GetBindings();
166  rBindings.Invalidate(SID_ATTR_TRANSFORM_WIDTH);
167  rBindings.Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
168  rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
169  rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y);
170  rBindings.Invalidate(SID_ATTR_TRANSFORM_ANGLE);
171  rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_X);
172  rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_Y);
173  rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOWIDTH);
174  rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOHEIGHT);
175 }
176 
178 {
179  sal_uInt16 nSlot = rReq.GetSlot();
180  vcl::Window* pWin = rViewData.GetActiveWin();
181  ScDrawView* pView = rViewData.GetScDrawView();
182  SdrModel* pDoc = rViewData.GetDocument().GetDrawLayer();
183 
184  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
185  const size_t nMarkCount = rMarkList.GetMarkCount();
186  SdrObject* pSingleSelectedObj = nullptr;
187  if ( nMarkCount > 0 )
188  pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
189 
190  switch ( nSlot )
191  {
192  case SID_ASSIGNMACRO:
193  {
194  if ( pSingleSelectedObj )
195  ExecuteMacroAssign(pSingleSelectedObj, pWin ? pWin->GetFrameWeld() : nullptr);
196  }
197  break;
198 
199  case SID_TEXT_STANDARD: // delete hard text attributes
200  {
201  SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aEmptyAttr(GetPool());
202  pView->SetAttributes(aEmptyAttr, true);
203  }
204  break;
205  case SID_MOVE_SHAPE_HANDLE:
206  {
207  const SfxItemSet *pArgs = rReq.GetArgs ();
208  if (pArgs && pArgs->Count () >= 3)
209  {
210  const SfxUInt32Item* handleNumItem = rReq.GetArg<SfxUInt32Item>(FN_PARAM_1);
211  const SfxUInt32Item* newPosXTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_2);
212  const SfxUInt32Item* newPosYTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_3);
213  const SfxInt32Item* OrdNum = rReq.GetArg<SfxInt32Item>(FN_PARAM_4);
214 
215  const sal_uLong handleNum = handleNumItem->GetValue();
216  const sal_uLong newPosX = convertTwipToMm100(newPosXTwips->GetValue());
217  const sal_uLong newPosY = convertTwipToMm100(newPosYTwips->GetValue());
218 
219  bool bNegateX = comphelper::LibreOfficeKit::isActive() && rViewData.GetDocument().IsLayoutRTL(rViewData.GetTabNo());
220  pView->MoveShapeHandle(handleNum, Point(bNegateX ? -static_cast<tools::Long>(newPosX) : newPosX, newPosY), OrdNum ? OrdNum->GetValue() : -1);
221  }
222  }
223  break;
224 
225  case SID_ATTR_LINE_STYLE:
226  case SID_ATTR_LINEEND_STYLE:
227  case SID_ATTR_LINE_START:
228  case SID_ATTR_LINE_END:
229  case SID_ATTR_LINE_DASH:
230  case SID_ATTR_LINE_WIDTH:
231  case SID_ATTR_LINE_COLOR:
232  case SID_ATTR_LINE_TRANSPARENCE:
233  case SID_ATTR_LINE_JOINT:
234  case SID_ATTR_LINE_CAP:
235  case SID_ATTR_FILL_STYLE:
236  case SID_ATTR_FILL_COLOR:
237  case SID_ATTR_FILL_GRADIENT:
238  case SID_ATTR_FILL_HATCH:
239  case SID_ATTR_FILL_BITMAP:
240  case SID_ATTR_FILL_TRANSPARENCE:
241  case SID_ATTR_FILL_FLOATTRANSPARENCE:
242 
243  // #i25616#
244  case SID_ATTR_FILL_SHADOW:
245  case SID_ATTR_SHADOW_TRANSPARENCE:
246  case SID_ATTR_SHADOW_COLOR:
247  case SID_ATTR_SHADOW_XDISTANCE:
248  case SID_ATTR_SHADOW_YDISTANCE:
249  {
250  // if toolbar is vertical :
251  if ( !rReq.GetArgs() )
252  {
253  switch ( nSlot )
254  {
255  case SID_ATTR_LINE_STYLE:
256  case SID_ATTR_LINE_DASH:
257  case SID_ATTR_LINE_WIDTH:
258  case SID_ATTR_LINE_COLOR:
259  case SID_ATTR_LINE_TRANSPARENCE:
260  case SID_ATTR_LINE_JOINT:
261  case SID_ATTR_LINE_CAP:
262  ExecuteLineDlg( rReq );
263  break;
264 
265  case SID_ATTR_FILL_STYLE:
266  case SID_ATTR_FILL_COLOR:
267  case SID_ATTR_FILL_GRADIENT:
268  case SID_ATTR_FILL_HATCH:
269  case SID_ATTR_FILL_BITMAP:
270  case SID_ATTR_FILL_TRANSPARENCE:
271  case SID_ATTR_FILL_FLOATTRANSPARENCE:
272 
273  // #i25616#
274  case SID_ATTR_FILL_SHADOW:
275  case SID_ATTR_SHADOW_TRANSPARENCE:
276  case SID_ATTR_SHADOW_COLOR:
277  case SID_ATTR_SHADOW_XDISTANCE:
278  case SID_ATTR_SHADOW_YDISTANCE:
279  ExecuteAreaDlg( rReq );
280  break;
281 
282  default:
283  break;
284  }
285 
286  return;
287 
288  }
289 
290  if( pView->AreObjectsMarked() )
291  {
292  SfxItemSet aNewArgs = rReq.GetArgs()->CloneAsValue();
293  lcl_convertStringArguments( rReq.GetSlot(), aNewArgs );
294  pView->SetAttrToMarked( aNewArgs, false );
295  }
296  else
297  pView->SetDefaultAttr( *rReq.GetArgs(), false);
298  pView->InvalidateAttribs();
299  }
300  break;
301 
302  case SID_ATTRIBUTES_LINE:
303  ExecuteLineDlg( rReq );
304  break;
305 
306  case SID_ATTRIBUTES_AREA:
307  ExecuteAreaDlg( rReq );
308  break;
309 
310  case SID_MEASURE_DLG:
311  ExecuteMeasureDlg( rReq );
312  break;
313 
314  case SID_DRAWTEXT_ATTR_DLG:
315  ExecuteTextAttrDlg( rReq );
316  break;
317 
318  case SID_EDIT_HYPERLINK:
319  if ( pSingleSelectedObj )
320  rViewData.GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
321  break;
322 
323  case SID_REMOVE_HYPERLINK:
324  if ( pSingleSelectedObj )
325  {
326  pSingleSelectedObj->setHyperlink(OUString());
327  setModified();
328  }
329  break;
330 
331  case SID_OPEN_HYPERLINK:
332  case SID_COPY_HYPERLINK_LOCATION:
333  if ( nMarkCount == 1 )
334  {
335  SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
336  if ( pObj->IsGroupObject() )
337  {
338  SdrPageView* pPV = nullptr;
339  SdrObject* pHit = pView->PickObj(pWin->PixelToLogic(rViewData.GetMousePosPixel()), pView->getHitTolLog(), pPV, SdrSearchOptions::DEEP);
340  if (pHit)
341  pObj = pHit;
342  }
343 
344  if (!pObj->getHyperlink().isEmpty())
345  {
346  if (nSlot == SID_OPEN_HYPERLINK)
347  {
348  ScGlobal::OpenURL(pObj->getHyperlink(), OUString(), true);
349  }
350  else if (nSlot == SID_COPY_HYPERLINK_LOCATION)
351  {
352  uno::Reference<datatransfer::clipboard::XClipboard> xClipboard
353  = GetViewShell()->GetWindow()->GetClipboard();
355  }
356  }
357  }
358  break;
359 
360  case SID_ATTR_TRANSFORM:
361  {
362  if ( pView->AreObjectsMarked() )
363  {
364  const SfxItemSet* pArgs = rReq.GetArgs();
365 
366  if( !pArgs )
367  {
368  if( rMarkList.GetMark(0) != nullptr )
369  {
370  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
371  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
372 
373  if( pObj->GetObjIdentifier() == SdrObjKind::Caption )
374  {
375  // Caption Itemset
376  SfxItemSet aNewAttr(pDoc->GetItemPool());
377  pView->GetAttributes(aNewAttr);
378  // Size and Position Itemset
379  SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
380 
382  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog(pWin ? pWin->GetFrameWeld() : nullptr, pView));
383 
384  const WhichRangesContainer& pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
385  SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
386  aCombSet.Put( aNewAttr );
387  aCombSet.Put( aNewGeoAttr );
388  pDlg->SetInputSet( &aCombSet );
389 
390  pDlg->StartExecuteAsync([pDlg, pRequest, pView, this](
391  sal_Int32 nResult){
392  if (nResult == RET_OK)
393  {
394  pRequest->Done(*(pDlg->GetOutputItemSet()));
395  pView->SetAttributes(*pDlg->GetOutputItemSet());
396  pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
397  }
398 
399  lcl_invalidateTransformAttr(rViewData.GetViewShell());
400  pDlg->disposeOnce();
401  });
402  }
403  else
404  {
405  SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
407  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
408 
409  pDlg->StartExecuteAsync([pDlg, pRequest, pView, this](
410  sal_Int32 nResult){
411  if (nResult == RET_OK)
412  {
413  pRequest->Done(*(pDlg->GetOutputItemSet()));
414  pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
415  }
416 
417  lcl_invalidateTransformAttr(rViewData.GetViewShell());
418  pDlg->disposeOnce();
419  });
420  }
421  }
422 
423  }
424  else
425  pView->SetGeoAttrToMarked( *pArgs );
426  }
427 
428  lcl_invalidateTransformAttr(rViewData.GetViewShell());
429  }
430  break;
431 
432  case SID_ATTR_GLOW_COLOR:
433  case SID_ATTR_GLOW_RADIUS:
434  case SID_ATTR_GLOW_TRANSPARENCY:
435  case SID_ATTR_SOFTEDGE_RADIUS:
436  case SID_ATTR_TEXTCOLUMNS_NUMBER:
437  case SID_ATTR_TEXTCOLUMNS_SPACING:
438  if (const SfxItemSet* pNewArgs = rReq.GetArgs())
439  pView->SetAttrToMarked(*pNewArgs, false);
440  rReq.Done();
441  break;
442 
443  default:
444  break;
445  }
446 }
447 
449 {
450  SvxMacroItem aItem ( SfxGetpApp()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
451  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
452  if ( !pInfo->GetMacro().isEmpty() )
453  {
454  SvxMacroTableDtor aTab;
455  const OUString& sMacro = pInfo->GetMacro();
456  aTab.Insert(SvMacroItemId::OnClick, SvxMacro(sMacro, OUString()));
457  aItem.SetMacroTable( aTab );
458  }
459 
460  // create empty itemset for macro-dlg
462  aItemSet.Put ( aItem );
463 
464  SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
465  aNamesItem.AddEvent( ScResId(RID_SCSTR_ONCLICK), OUString(), SvMacroItemId::OnClick );
466  aItemSet.Put( aNamesItem );
467 
468  css::uno::Reference < css::frame::XFrame > xFrame;
469  if (GetViewShell())
470  xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
471 
473  ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, aItemSet, xFrame ));
474  if ( pMacroDlg->Execute() != RET_OK )
475  return;
476 
477  const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
478  const SvxMacroItem* pItem = pOutSet->GetItemIfSet( SID_ATTR_MACROITEM, false );
479  if( !pItem )
480  return;
481 
482  OUString sMacro;
483  const SvxMacro* pMacro = pItem->GetMacroTable().Get( SvMacroItemId::OnClick );
484  if ( pMacro )
485  sMacro = pMacro->GetMacName();
486 
487  if ( pObj->IsGroupObject() )
488  {
489  SdrObjList* pOL = pObj->GetSubList();
490  const size_t nObj = pOL->GetObjCount();
491  for ( size_t index=0; index<nObj; ++index )
492  {
493  pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), true );
494  pInfo->SetMacro( sMacro );
495  }
496  }
497  else
498  pInfo->SetMacro( sMacro );
499  setModified();
500 }
501 
503 {
504  ScDrawView* pView = rViewData.GetScDrawView();
505  bool bHasMarked = pView->AreObjectsMarked();
506  const SdrObject* pObj = nullptr;
507  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
508 
509  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
510 
511  if( rMarkList.GetMarkCount() == 1 )
512  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
513 
514  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
515  if( bHasMarked )
516  pView->MergeAttrFromMarked( aNewAttr, false );
517 
519  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( rViewData.GetDialogParent(),
520  &aNewAttr,
521  rViewData.GetDocument().GetDrawLayer(),
522  pObj,
523  bHasMarked));
524 
525  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
526  if ( nResult == RET_OK )
527  {
528  if( bHasMarked )
529  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
530  else
531  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
532 
533  pView->InvalidateAttribs();
534  pRequest->Done();
535  }
536  pDlg->disposeOnce();
537  });
538 }
539 
541 {
542  ScDrawView* pView = rViewData.GetScDrawView();
543  bool bHasMarked = pView->AreObjectsMarked();
544 
545  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
546 
547  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
548  if( bHasMarked )
549  pView->MergeAttrFromMarked( aNewAttr, false );
550 
552  weld::Window* pWin = rViewData.GetDialogParent();
554  pWin, &aNewAttr,
555  rViewData.GetDocument().GetDrawLayer(), true));
556 
557  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
558  if ( nResult == RET_OK )
559  {
560  if( bHasMarked )
561  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
562  else
563  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
564 
565  pView->InvalidateAttribs();
566  pRequest->Done();
567  }
568  pDlg->disposeOnce();
569  });
570 }
571 
573 {
574  ScDrawView* pView = rViewData.GetScDrawView();
575  bool bHasMarked = pView->AreObjectsMarked();
576  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
577 
578  if( bHasMarked )
579  pView->MergeAttrFromMarked( aNewAttr, false );
580 
582  weld::Window* pWin = rViewData.GetDialogParent();
583  ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView));
584 
585  sal_uInt16 nResult = pDlg->Execute();
586 
587  if ( RET_OK == nResult )
588  {
589  if ( bHasMarked )
590  pView->SetAttributes( *pDlg->GetOutputItemSet() );
591  else
592  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
593 
594  pView->InvalidateAttribs();
595  rReq.Done();
596  }
597 }
598 
600 {
601  ScDrawView* pView = rViewData.GetScDrawView();
602  bool bHasMarked = pView->AreObjectsMarked();
603  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
604 
605  if( bHasMarked )
606  pView->MergeAttrFromMarked( aNewAttr, false );
607 
609  weld::Window* pWin = rViewData.GetDialogParent();
610  ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog(pWin, aNewAttr, pView, RID_SVXPAGE_MEASURE));
611 
612  sal_uInt16 nResult = pDlg->Execute();
613 
614  if ( RET_OK == nResult )
615  {
616  if ( bHasMarked )
617  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
618  else
619  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
620 
621  pView->InvalidateAttribs();
622  rReq.Done();
623  }
624 }
625 
626 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
static void CopyStringTo(const OUString &rContent, const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rxClipboard, const vcl::ILibreOfficeKitNotifier *pNotifier=nullptr)
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
size_t GetMarkCount() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
#define SFX_IMPL_INTERFACE(Class, SuperClass)
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
SfxItemSet CloneAsValue(bool bItems=true, SfxItemPool *pToPool=nullptr) const
const OUString & GetMacro() const
Definition: userdat.hxx:82
virtual const SfxItemSet * GetOutputItemSet() const =0
static XGradient fromJSON(const OUString &rJSON)
void setHyperlink(const OUString &sHyperlink)
bool AreObjectsMarked() const
static SvxAbstractDialogFactory * Create()
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
Definition: drwlayer.cxx:2641
sal_uIntPtr sal_uLong
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
Reference< XFrame > xFrame
css::uno::Reference< css::frame::XModel3 > GetModel() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual VclPtr< SfxAbstractDialog > CreateEventConfigDialog(weld::Widget *pParent, const SfxItemSet &rAttr, const css::uno::Reference< css::frame::XFrame > &rFrame)=0
void InvalidateAttribs()
Definition: drawview.cxx:153
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
Definition: global.cxx:770
sal_uInt16 FirstWhich()
const OUString & getHyperlink() const
void Done(bool bRemove=false)
SdrMark * GetMark(size_t nNum) const
void MergeAttrFromMarked(SfxItemSet &rAttr, bool bOnlyHardAttr) const
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
virtual SdrObjKind GetObjIdentifier() const
virtual SdrObjList * GetSubList() const
sal_uInt16 NextWhich()
SfxApplication * SfxGetpApp()
constexpr auto convertTwipToMm100(N n)
SfxItemSet GetGeoAttrFromMarked() const
virtual void SetInputSet(const SfxItemSet *pInSet)=0
weld::Window * GetFrameWeld() const
void SetAttrToMarked(const SfxItemSet &rAttr, bool bReplaceAll)
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint, const sal_Int32 aObjectOrdNum=-1)
static void lcl_invalidateTransformAttr(const ScTabViewShell *pViewShell)
Definition: drawsh.cxx:163
void SetGeoAttrToMarked(const SfxItemSet &rAttr, bool addPageMargin=false)
constexpr TypedWhichId< XColorItem > SDRATTR_SHADOWCOLOR(SDRATTR_SHADOW_FIRST+1)
virtual VclPtr< SfxAbstractDialog > CreateSfxDialog(weld::Window *pParent, const SfxItemSet &rAttr, const SdrView *pView, sal_uInt32 nResId)=0
const SfxItemSet & GetDefaultAttr() const
const OUStringLiteral sColor
SdrObject * GetMarkedSdrObj() const
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
void AddEvent(const OUString &, const OUString &, SvMacroItemId)
SfxBindings & GetBindings()
const SdrMarkList & GetMarkedObjectList() const
sal_uInt16 Count() const
const T * GetArg(sal_uInt16 nSlotId) const
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
void SetMacro(const OUString &rMacro)
Definition: userdat.hxx:81
bool IsGroupObject() const
void setModified()
Definition: drawsh.cxx:152
ColorTransparency
Point PixelToLogic(const Point &rDevicePt) const
tuple index
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
void ExecuteAreaDlg(const SfxRequest &rReq)
Definition: drawsh.cxx:540
static void InitInterface_Impl()
SfxInterface initializer.
Definition: drawsh.cxx:127
#define SFX_OBJECTBAR_OBJECT
static void StateDisableItems(SfxItemSet &rSet)
Definition: drawsh.cxx:140
virtual VclPtr< SfxAbstractTabDialog > CreateTextTabDialog(weld::Window *pParent, const SfxItemSet *pAttrSet, SdrView *pView)=0
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
const SvxMacroTableDtor & GetMacroTable() const
void ExecuteTextAttrDlg(SfxRequest &rReq)
Definition: drawsh.cxx:572
const SvxMacro * Get(SvMacroItemId nEvent) const
void DisableItem(sal_uInt16 nWhich)
#define GetWhich(nSlot)
virtual VclPtr< AbstractSvxAreaTabDialog > CreateSvxAreaTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, bool bShadow)=0
void SetMacroTable(const SvxMacroTableDtor &rTbl)
void ExecDrawAttr(SfxRequest &rReq)
Definition: drawsh.cxx:177
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
RET_OK
virtual WhichRangesContainer GetInputRanges(const SfxItemPool &)=0
sal_uInt32 GetValue() const
const SfxItemPool & GetItemPool() const
void ExecuteLineDlg(const SfxRequest &rReq)
Definition: drawsh.cxx:502
sal_uInt16 getHitTolLog() const
void ExecuteMacroAssign(SdrObject *pObj, weld::Window *pWin)
Definition: drawsh.cxx:448
const OUString & GetMacName() const
virtual VclPtr< SfxAbstractTabDialog > CreateSvxLineTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, const SdrObject *pObj, bool bHasObj)=0
sal_Int16 nValue
bool m_bDetectedRangeSegmentation false
void ExecuteMeasureDlg(SfxRequest &rReq)
Definition: drawsh.cxx:599