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 <vcl/unohelp2.hxx>
63 
64 using namespace css;
65 
67 
68 namespace
69 {
70  void lcl_convertStringArguments(sal_uInt16 nSlot, const std::unique_ptr<SfxItemSet>& pArgs)
71  {
72  Color aColor;
73  const SfxPoolItem* pItem = nullptr;
74 
75  if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
76  {
77  double fValue = static_cast<const SvxDoubleItem*>(pItem)->GetValue();
78  // FIXME: different units...
79  int nPow = 100;
80  int nValue = fValue * nPow;
81 
82  XLineWidthItem aItem(nValue);
83  pArgs->Put(aItem);
84  }
85  else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
86  {
87  OUString sColor = static_cast<const SfxStringItem*>(pItem)->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  pArgs->Put(aLineColorItem);
100  break;
101  }
102 
103  case SID_ATTR_FILL_COLOR:
104  {
105  XFillColorItem aFillColorItem(OUString(), aColor);
106  pArgs->Put(aFillColorItem);
107  break;
108  }
109 
110  case SID_ATTR_SHADOW_COLOR:
111  {
112  XColorItem aItem(SDRATTR_SHADOWCOLOR, aColor);
113  pArgs->Put(aItem);
114  break;
115  }
116  }
117  }
118  if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem))
119  {
120  const SfxStringItem* pJSON = static_cast<const SfxStringItem*>(pItem);
121  if (pJSON)
122  {
123  XGradient aGradient = XGradient::fromJSON(pJSON->GetValue());
124  XFillGradientItem aItem(aGradient);
125  pArgs->Put(aItem);
126  }
127  }
128  }
129 }
130 
132 {
133  GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
134  SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
135  ToolbarId::Draw_Objectbar);
136 
137  GetStaticInterface()->RegisterPopupMenu("draw");
138 
139  GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
140 }
141 
142 // disable the unwanted Accelerators
143 
145 {
146  SfxWhichIter aIter(rSet);
147  sal_uInt16 nWhich = aIter.FirstWhich();
148 
149  while (nWhich)
150  {
151  rSet.DisableItem( nWhich );
152  nWhich = aIter.NextWhich();
153  }
154 }
155 
157 {
158  const SfxObjectShell* pShell = GetObjectShell();
159  if ( pShell )
160  {
161  css::uno::Reference< css::util::XModifiable > xModif( pShell->GetModel(), css::uno::UNO_QUERY );
162  if ( xModif.is() )
163  xModif->setModified( true );
164  }
165 }
166 
167 static void lcl_invalidateTransformAttr(const ScTabViewShell* pViewShell)
168 {
169  SfxBindings& rBindings=pViewShell->GetViewFrame()->GetBindings();
170  rBindings.Invalidate(SID_ATTR_TRANSFORM_WIDTH);
171  rBindings.Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
172  rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
173  rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y);
174  rBindings.Invalidate(SID_ATTR_TRANSFORM_ANGLE);
175  rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_X);
176  rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_Y);
177  rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOWIDTH);
178  rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOHEIGHT);
179 }
180 
182 {
183  sal_uInt16 nSlot = rReq.GetSlot();
184  vcl::Window* pWin = rViewData.GetActiveWin();
185  ScDrawView* pView = rViewData.GetScDrawView();
186  SdrModel* pDoc = rViewData.GetDocument().GetDrawLayer();
187 
188  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
189  const size_t nMarkCount = rMarkList.GetMarkCount();
190  SdrObject* pSingleSelectedObj = nullptr;
191  if ( nMarkCount > 0 )
192  pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
193 
194  switch ( nSlot )
195  {
196  case SID_ASSIGNMACRO:
197  {
198  if ( pSingleSelectedObj )
199  ExecuteMacroAssign(pSingleSelectedObj, pWin ? pWin->GetFrameWeld() : nullptr);
200  }
201  break;
202 
203  case SID_TEXT_STANDARD: // delete hard text attributes
204  {
205  SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aEmptyAttr(GetPool());
206  pView->SetAttributes(aEmptyAttr, true);
207  }
208  break;
209  case SID_MOVE_SHAPE_HANDLE:
210  {
211  const SfxItemSet *pArgs = rReq.GetArgs ();
212  if (pArgs && pArgs->Count () >= 3)
213  {
214  const SfxUInt32Item* handleNumItem = rReq.GetArg<SfxUInt32Item>(FN_PARAM_1);
215  const SfxUInt32Item* newPosXTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_2);
216  const SfxUInt32Item* newPosYTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_3);
217  const SfxInt32Item* OrdNum = rReq.GetArg<SfxInt32Item>(FN_PARAM_4);
218 
219  const sal_uLong handleNum = handleNumItem->GetValue();
220  const sal_uLong newPosX = convertTwipToMm100(newPosXTwips->GetValue());
221  const sal_uLong newPosY = convertTwipToMm100(newPosYTwips->GetValue());
222  pView->MoveShapeHandle(handleNum, Point(newPosX, newPosY), OrdNum ? OrdNum->GetValue() : -1);
223  }
224  }
225  break;
226 
227  case SID_ATTR_LINE_STYLE:
228  case SID_ATTR_LINEEND_STYLE:
229  case SID_ATTR_LINE_START:
230  case SID_ATTR_LINE_END:
231  case SID_ATTR_LINE_DASH:
232  case SID_ATTR_LINE_WIDTH:
233  case SID_ATTR_LINE_COLOR:
234  case SID_ATTR_LINE_TRANSPARENCE:
235  case SID_ATTR_LINE_JOINT:
236  case SID_ATTR_LINE_CAP:
237  case SID_ATTR_FILL_STYLE:
238  case SID_ATTR_FILL_COLOR:
239  case SID_ATTR_FILL_GRADIENT:
240  case SID_ATTR_FILL_HATCH:
241  case SID_ATTR_FILL_BITMAP:
242  case SID_ATTR_FILL_TRANSPARENCE:
243  case SID_ATTR_FILL_FLOATTRANSPARENCE:
244 
245  // #i25616#
246  case SID_ATTR_FILL_SHADOW:
247  case SID_ATTR_SHADOW_TRANSPARENCE:
248  case SID_ATTR_SHADOW_COLOR:
249  case SID_ATTR_SHADOW_XDISTANCE:
250  case SID_ATTR_SHADOW_YDISTANCE:
251  {
252  // if toolbar is vertical :
253  if ( !rReq.GetArgs() )
254  {
255  switch ( nSlot )
256  {
257  case SID_ATTR_LINE_STYLE:
258  case SID_ATTR_LINE_DASH:
259  case SID_ATTR_LINE_WIDTH:
260  case SID_ATTR_LINE_COLOR:
261  case SID_ATTR_LINE_TRANSPARENCE:
262  case SID_ATTR_LINE_JOINT:
263  case SID_ATTR_LINE_CAP:
264  ExecuteLineDlg( rReq );
265  break;
266 
267  case SID_ATTR_FILL_STYLE:
268  case SID_ATTR_FILL_COLOR:
269  case SID_ATTR_FILL_GRADIENT:
270  case SID_ATTR_FILL_HATCH:
271  case SID_ATTR_FILL_BITMAP:
272  case SID_ATTR_FILL_TRANSPARENCE:
273  case SID_ATTR_FILL_FLOATTRANSPARENCE:
274 
275  // #i25616#
276  case SID_ATTR_FILL_SHADOW:
277  case SID_ATTR_SHADOW_TRANSPARENCE:
278  case SID_ATTR_SHADOW_COLOR:
279  case SID_ATTR_SHADOW_XDISTANCE:
280  case SID_ATTR_SHADOW_YDISTANCE:
281  ExecuteAreaDlg( rReq );
282  break;
283 
284  default:
285  break;
286  }
287 
288  return;
289 
290  }
291 
292  if( pView->AreObjectsMarked() )
293  {
294  std::unique_ptr<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone();
295  lcl_convertStringArguments( rReq.GetSlot(), pNewArgs );
296  pView->SetAttrToMarked( *pNewArgs, false );
297  }
298  else
299  pView->SetDefaultAttr( *rReq.GetArgs(), false);
300  pView->InvalidateAttribs();
301  }
302  break;
303 
304  case SID_ATTRIBUTES_LINE:
305  ExecuteLineDlg( rReq );
306  break;
307 
308  case SID_ATTRIBUTES_AREA:
309  ExecuteAreaDlg( rReq );
310  break;
311 
312  case SID_MEASURE_DLG:
313  ExecuteMeasureDlg( rReq );
314  break;
315 
316  case SID_DRAWTEXT_ATTR_DLG:
317  ExecuteTextAttrDlg( rReq );
318  break;
319 
320  case SID_EDIT_HYPERLINK:
321  if ( pSingleSelectedObj )
322  rViewData.GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
323  break;
324 
325  case SID_REMOVE_HYPERLINK:
326  if ( pSingleSelectedObj )
327  {
328  pSingleSelectedObj->setHyperlink(OUString());
329  setModified();
330  }
331  break;
332 
333  case SID_OPEN_HYPERLINK:
334  case SID_COPY_HYPERLINK_LOCATION:
335  if ( nMarkCount == 1 )
336  {
337  SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
338  if ( pObj->IsGroupObject() )
339  {
340  SdrPageView* pPV = nullptr;
341  SdrObject* pHit = pView->PickObj(pWin->PixelToLogic(rViewData.GetMousePosPixel()), pView->getHitTolLog(), pPV, SdrSearchOptions::DEEP);
342  if (pHit)
343  pObj = pHit;
344  }
345 
346  if (!pObj->getHyperlink().isEmpty())
347  {
348  if (nSlot == SID_OPEN_HYPERLINK)
349  {
350  ScGlobal::OpenURL(pObj->getHyperlink(), OUString(), true);
351  }
352  else if (nSlot == SID_COPY_HYPERLINK_LOCATION)
353  {
354  uno::Reference<datatransfer::clipboard::XClipboard> xClipboard
355  = GetViewShell()->GetWindow()->GetClipboard();
357  }
358  }
359  }
360  break;
361 
362  case SID_ATTR_TRANSFORM:
363  {
364  if ( pView->AreObjectsMarked() )
365  {
366  const SfxItemSet* pArgs = rReq.GetArgs();
367 
368  if( !pArgs )
369  {
370  if( rMarkList.GetMark(0) != nullptr )
371  {
372  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
373  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
374 
375  if( pObj->GetObjIdentifier() == OBJ_CAPTION )
376  {
377  // Caption Itemset
378  SfxItemSet aNewAttr(pDoc->GetItemPool());
379  pView->GetAttributes(aNewAttr);
380  // Size and Position Itemset
381  SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
382 
384  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog(pWin ? pWin->GetFrameWeld() : nullptr, pView));
385 
386  const WhichRangesContainer& pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
387  SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
388  aCombSet.Put( aNewAttr );
389  aCombSet.Put( aNewGeoAttr );
390  pDlg->SetInputSet( &aCombSet );
391 
392  pDlg->StartExecuteAsync([pDlg, pRequest, pView, this](
393  sal_Int32 nResult){
394  if (nResult == RET_OK)
395  {
396  pRequest->Done(*(pDlg->GetOutputItemSet()));
397  pView->SetAttributes(*pDlg->GetOutputItemSet());
398  pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
399  }
400 
401  lcl_invalidateTransformAttr(rViewData.GetViewShell());
402  pDlg->disposeOnce();
403  });
404  }
405  else
406  {
407  SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
409  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
410 
411  pDlg->StartExecuteAsync([pDlg, pRequest, pView, this](
412  sal_Int32 nResult){
413  if (nResult == RET_OK)
414  {
415  pRequest->Done(*(pDlg->GetOutputItemSet()));
416  pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
417  }
418 
419  lcl_invalidateTransformAttr(rViewData.GetViewShell());
420  pDlg->disposeOnce();
421  });
422  }
423  }
424 
425  }
426  else
427  pView->SetGeoAttrToMarked( *pArgs );
428  }
429 
430  lcl_invalidateTransformAttr(rViewData.GetViewShell());
431  }
432  break;
433 
434  case SID_ATTR_GLOW_COLOR:
435  case SID_ATTR_GLOW_RADIUS:
436  case SID_ATTR_GLOW_TRANSPARENCY:
437  case SID_ATTR_SOFTEDGE_RADIUS:
438  case SID_ATTR_TEXTCOLUMNS_NUMBER:
439  case SID_ATTR_TEXTCOLUMNS_SPACING:
440  if (const SfxItemSet* pNewArgs = rReq.GetArgs())
441  pView->SetAttrToMarked(*pNewArgs, false);
442  rReq.Done();
443  break;
444 
445  default:
446  break;
447  }
448 }
449 
451 {
452  SvxMacroItem aItem ( SfxGetpApp()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
453  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
454  if ( !pInfo->GetMacro().isEmpty() )
455  {
456  SvxMacroTableDtor aTab;
457  const OUString& sMacro = pInfo->GetMacro();
458  aTab.Insert(SvMacroItemId::OnClick, SvxMacro(sMacro, OUString()));
459  aItem.SetMacroTable( aTab );
460  }
461 
462  // create empty itemset for macro-dlg
464  aItemSet.Put ( aItem );
465 
466  SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
467  aNamesItem.AddEvent( ScResId(RID_SCSTR_ONCLICK), OUString(), SvMacroItemId::OnClick );
468  aItemSet.Put( aNamesItem );
469 
470  css::uno::Reference < css::frame::XFrame > xFrame;
471  if (GetViewShell())
472  xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
473 
475  ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, aItemSet, xFrame ));
476  if ( pMacroDlg->Execute() != RET_OK )
477  return;
478 
479  const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
480  const SfxPoolItem* pItem;
481  if( SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem ))
482  return;
483 
484  OUString sMacro;
485  const SvxMacro* pMacro = static_cast<const SvxMacroItem*>(pItem)->GetMacroTable().Get( SvMacroItemId::OnClick );
486  if ( pMacro )
487  sMacro = pMacro->GetMacName();
488 
489  if ( pObj->IsGroupObject() )
490  {
491  SdrObjList* pOL = pObj->GetSubList();
492  const size_t nObj = pOL->GetObjCount();
493  for ( size_t index=0; index<nObj; ++index )
494  {
495  pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), true );
496  pInfo->SetMacro( sMacro );
497  }
498  }
499  else
500  pInfo->SetMacro( sMacro );
501  setModified();
502 }
503 
505 {
506  ScDrawView* pView = rViewData.GetScDrawView();
507  bool bHasMarked = pView->AreObjectsMarked();
508  const SdrObject* pObj = nullptr;
509  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
510 
511  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
512 
513  if( rMarkList.GetMarkCount() == 1 )
514  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
515 
516  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
517  if( bHasMarked )
518  pView->MergeAttrFromMarked( aNewAttr, false );
519 
521  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( rViewData.GetDialogParent(),
522  &aNewAttr,
523  rViewData.GetDocument().GetDrawLayer(),
524  pObj,
525  bHasMarked));
526 
527  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
528  if ( nResult == RET_OK )
529  {
530  if( bHasMarked )
531  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
532  else
533  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
534 
535  pView->InvalidateAttribs();
536  pRequest->Done();
537  }
538  pDlg->disposeOnce();
539  });
540 }
541 
543 {
544  ScDrawView* pView = rViewData.GetScDrawView();
545  bool bHasMarked = pView->AreObjectsMarked();
546 
547  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
548 
549  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
550  if( bHasMarked )
551  pView->MergeAttrFromMarked( aNewAttr, false );
552 
554  weld::Window* pWin = rViewData.GetDialogParent();
556  pWin, &aNewAttr,
557  rViewData.GetDocument().GetDrawLayer(), true));
558 
559  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
560  if ( nResult == RET_OK )
561  {
562  if( bHasMarked )
563  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
564  else
565  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
566 
567  pView->InvalidateAttribs();
568  pRequest->Done();
569  }
570  pDlg->disposeOnce();
571  });
572 }
573 
575 {
576  ScDrawView* pView = rViewData.GetScDrawView();
577  bool bHasMarked = pView->AreObjectsMarked();
578  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
579 
580  if( bHasMarked )
581  pView->MergeAttrFromMarked( aNewAttr, false );
582 
584  weld::Window* pWin = rViewData.GetDialogParent();
585  ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView));
586 
587  sal_uInt16 nResult = pDlg->Execute();
588 
589  if ( RET_OK == nResult )
590  {
591  if ( bHasMarked )
592  pView->SetAttributes( *pDlg->GetOutputItemSet() );
593  else
594  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
595 
596  pView->InvalidateAttribs();
597  rReq.Done();
598  }
599 }
600 
602 {
603  ScDrawView* pView = rViewData.GetScDrawView();
604  bool bHasMarked = pView->AreObjectsMarked();
605  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
606 
607  if( bHasMarked )
608  pView->MergeAttrFromMarked( aNewAttr, false );
609 
611  weld::Window* pWin = rViewData.GetDialogParent();
612  ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog(pWin, aNewAttr, pView, RID_SVXPAGE_MEASURE));
613 
614  sal_uInt16 nResult = pDlg->Execute();
615 
616  if ( RET_OK == nResult )
617  {
618  if ( bHasMarked )
619  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
620  else
621  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
622 
623  pView->InvalidateAttribs();
624  rReq.Done();
625  }
626 }
627 
628 /* 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
#define SFX_IMPL_INTERFACE(Class, SuperClass)
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:89
const OUString & GetMacro() const
Definition: userdat.hxx:82
virtual const SfxItemSet * GetOutputItemSet() const =0
std::string GetValue
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:2640
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:759
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:167
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)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SfxBindings & GetBindings()
OBJ_CAPTION
const OUString & GetValue() const
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:156
ColorTransparency
Point PixelToLogic(const Point &rDevicePt) const
tuple index
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
void ExecuteAreaDlg(const SfxRequest &rReq)
Definition: drawsh.cxx:542
static void InitInterface_Impl()
SfxInterface initializer.
Definition: drawsh.cxx:131
#define SFX_OBJECTBAR_OBJECT
static void StateDisableItems(SfxItemSet &rSet)
Definition: drawsh.cxx:144
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
void ExecuteTextAttrDlg(SfxRequest &rReq)
Definition: drawsh.cxx:574
void DisableItem(sal_uInt16 nWhich)
#define GetWhich(nSlot)
virtual std::unique_ptr< SfxItemSet > Clone(bool bItems=true, SfxItemPool *pToPool=nullptr) const
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:181
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:504
sal_uInt16 getHitTolLog() const
void ExecuteMacroAssign(SdrObject *pObj, weld::Window *pWin)
Definition: drawsh.cxx:450
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
void ExecuteMeasureDlg(SfxRequest &rReq)
Definition: drawsh.cxx:601