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 
64 
65 namespace
66 {
67  void lcl_convertStringArguments(sal_uInt16 nSlot, const std::unique_ptr<SfxItemSet>& pArgs)
68  {
69  Color aColor;
70  const SfxPoolItem* pItem = nullptr;
71 
72  if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
73  {
74  double fValue = static_cast<const SvxDoubleItem*>(pItem)->GetValue();
75  // FIXME: different units...
76  int nPow = 100;
77  int nValue = fValue * nPow;
78 
79  XLineWidthItem aItem(nValue);
80  pArgs->Put(aItem);
81  }
82  else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
83  {
84  OUString sColor = static_cast<const SfxStringItem*>(pItem)->GetValue();
85 
86  if (sColor == "transparent")
87  aColor = COL_TRANSPARENT;
88  else
89  aColor = Color(ColorTransparency, sColor.toInt32(16));
90 
91  switch (nSlot)
92  {
93  case SID_ATTR_LINE_COLOR:
94  {
95  XLineColorItem aLineColorItem(OUString(), aColor);
96  pArgs->Put(aLineColorItem);
97  break;
98  }
99 
100  case SID_ATTR_FILL_COLOR:
101  {
102  XFillColorItem aFillColorItem(OUString(), aColor);
103  pArgs->Put(aFillColorItem);
104  break;
105  }
106 
107  case SID_ATTR_SHADOW_COLOR:
108  {
109  XColorItem aItem(SDRATTR_SHADOWCOLOR, aColor);
110  pArgs->Put(aItem);
111  break;
112  }
113  }
114  }
115  if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem))
116  {
117  const SfxStringItem* pJSON = static_cast<const SfxStringItem*>(pItem);
118  if (pJSON)
119  {
120  XGradient aGradient = XGradient::fromJSON(pJSON->GetValue());
121  XFillGradientItem aItem(aGradient);
122  pArgs->Put(aItem);
123  }
124  }
125  }
126 }
127 
129 {
131  SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
132  ToolbarId::Draw_Objectbar);
133 
135 
136  GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
137 }
138 
139 // disable the unwanted Accelerators
140 
142 {
143  SfxWhichIter aIter(rSet);
144  sal_uInt16 nWhich = aIter.FirstWhich();
145 
146  while (nWhich)
147  {
148  rSet.DisableItem( nWhich );
149  nWhich = aIter.NextWhich();
150  }
151 }
152 
153 static void lcl_setModified( const SfxObjectShell* pShell )
154 {
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();
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  {
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 
214  const sal_uLong handleNum = handleNumItem->GetValue();
215  const sal_uLong newPosX = convertTwipToMm100(newPosXTwips->GetValue());
216  const sal_uLong newPosY = convertTwipToMm100(newPosYTwips->GetValue());
217  pView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
218  }
219  }
220  break;
221 
222  case SID_ATTR_LINE_STYLE:
223  case SID_ATTR_LINEEND_STYLE:
224  case SID_ATTR_LINE_START:
225  case SID_ATTR_LINE_END:
226  case SID_ATTR_LINE_DASH:
227  case SID_ATTR_LINE_WIDTH:
228  case SID_ATTR_LINE_COLOR:
229  case SID_ATTR_LINE_TRANSPARENCE:
230  case SID_ATTR_LINE_JOINT:
231  case SID_ATTR_LINE_CAP:
232  case SID_ATTR_FILL_STYLE:
233  case SID_ATTR_FILL_COLOR:
234  case SID_ATTR_FILL_GRADIENT:
235  case SID_ATTR_FILL_HATCH:
236  case SID_ATTR_FILL_BITMAP:
237  case SID_ATTR_FILL_TRANSPARENCE:
238  case SID_ATTR_FILL_FLOATTRANSPARENCE:
239 
240  // #i25616#
241  case SID_ATTR_FILL_SHADOW:
242  case SID_ATTR_SHADOW_TRANSPARENCE:
243  case SID_ATTR_SHADOW_COLOR:
244  case SID_ATTR_SHADOW_XDISTANCE:
245  case SID_ATTR_SHADOW_YDISTANCE:
246  {
247  // if toolbar is vertical :
248  if ( !rReq.GetArgs() )
249  {
250  switch ( nSlot )
251  {
252  case SID_ATTR_LINE_STYLE:
253  case SID_ATTR_LINE_DASH:
254  case SID_ATTR_LINE_WIDTH:
255  case SID_ATTR_LINE_COLOR:
256  case SID_ATTR_LINE_TRANSPARENCE:
257  case SID_ATTR_LINE_JOINT:
258  case SID_ATTR_LINE_CAP:
259  ExecuteLineDlg( rReq );
260  break;
261 
262  case SID_ATTR_FILL_STYLE:
263  case SID_ATTR_FILL_COLOR:
264  case SID_ATTR_FILL_GRADIENT:
265  case SID_ATTR_FILL_HATCH:
266  case SID_ATTR_FILL_BITMAP:
267  case SID_ATTR_FILL_TRANSPARENCE:
268  case SID_ATTR_FILL_FLOATTRANSPARENCE:
269 
270  // #i25616#
271  case SID_ATTR_FILL_SHADOW:
272  case SID_ATTR_SHADOW_TRANSPARENCE:
273  case SID_ATTR_SHADOW_COLOR:
274  case SID_ATTR_SHADOW_XDISTANCE:
275  case SID_ATTR_SHADOW_YDISTANCE:
276  ExecuteAreaDlg( rReq );
277  break;
278 
279  default:
280  break;
281  }
282 
283  return;
284 
285  }
286 
287  if( pView->AreObjectsMarked() )
288  {
289  std::unique_ptr<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone();
290  lcl_convertStringArguments( rReq.GetSlot(), pNewArgs );
291  pView->SetAttrToMarked( *pNewArgs, false );
292  }
293  else
294  pView->SetDefaultAttr( *rReq.GetArgs(), false);
295  pView->InvalidateAttribs();
296  }
297  break;
298 
299  case SID_ATTRIBUTES_LINE:
300  ExecuteLineDlg( rReq );
301  break;
302 
303  case SID_ATTRIBUTES_AREA:
304  ExecuteAreaDlg( rReq );
305  break;
306 
307  case SID_MEASURE_DLG:
308  ExecuteMeasureDlg( rReq );
309  break;
310 
311  case SID_DRAWTEXT_ATTR_DLG:
312  ExecuteTextAttrDlg( rReq );
313  break;
314 
315  case SID_DRAW_HLINK_EDIT:
316  if ( pSingleSelectedObj )
317  rViewData.GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
318  break;
319 
320  case SID_DRAW_HLINK_DELETE:
321  if ( pSingleSelectedObj )
322  SetHlinkForObject( pSingleSelectedObj, OUString() );
323  break;
324 
325  case SID_OPEN_HYPERLINK:
326  if ( nMarkCount == 1 )
327  {
328  SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
329  if ( pObj->IsGroupObject() )
330  {
331  SdrPageView* pPV = nullptr;
332  SdrObject* pHit = pView->PickObj(pWin->PixelToLogic(rViewData.GetMousePosPixel()), pView->getHitTolLog(), pPV, SdrSearchOptions::DEEP);
333  if (pHit)
334  pObj = pHit;
335  }
336 
337  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
338  if ( pInfo && !pInfo->GetHlink().isEmpty() )
339  ScGlobal::OpenURL( pInfo->GetHlink(), OUString(), true );
340  }
341  break;
342 
343  case SID_ATTR_TRANSFORM:
344  {
345  if ( pView->AreObjectsMarked() )
346  {
347  const SfxItemSet* pArgs = rReq.GetArgs();
348 
349  if( !pArgs )
350  {
351  if( rMarkList.GetMark(0) != nullptr )
352  {
353  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
354  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
355 
356  if( pObj->GetObjIdentifier() == OBJ_CAPTION )
357  {
358  // Caption Itemset
359  SfxItemSet aNewAttr(pDoc->GetItemPool());
360  pView->GetAttributes(aNewAttr);
361  // Size and Position Itemset
362  SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
363 
365  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog(pWin ? pWin->GetFrameWeld() : nullptr, pView));
366 
367  const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
368  SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
369  aCombSet.Put( aNewAttr );
370  aCombSet.Put( aNewGeoAttr );
371  pDlg->SetInputSet( &aCombSet );
372 
373  pDlg->StartExecuteAsync([pDlg, pRequest, pView, this](
374  sal_Int32 nResult){
375  if (nResult == RET_OK)
376  {
377  pRequest->Done(*(pDlg->GetOutputItemSet()));
378  pView->SetAttributes(*pDlg->GetOutputItemSet());
379  pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
380  }
381 
383  pDlg->disposeOnce();
384  });
385  }
386  else
387  {
388  SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
390  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
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->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
398  }
399 
401  pDlg->disposeOnce();
402  });
403  }
404  }
405 
406  }
407  else
408  pView->SetGeoAttrToMarked( *pArgs );
409  }
410 
412  }
413  break;
414 
415  case SID_ATTR_GLOW_COLOR:
416  case SID_ATTR_GLOW_RADIUS:
417  case SID_ATTR_GLOW_TRANSPARENCY:
418  case SID_ATTR_SOFTEDGE_RADIUS:
419  if (const SfxItemSet* pNewArgs = rReq.GetArgs())
420  pView->SetAttrToMarked(*pNewArgs, false);
421  rReq.Done();
422  break;
423 
424  default:
425  break;
426  }
427 }
428 
430 {
431  SvxMacroItem aItem ( SfxGetpApp()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
432  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
433  if ( !pInfo->GetMacro().isEmpty() )
434  {
435  SvxMacroTableDtor aTab;
436  const OUString& sMacro = pInfo->GetMacro();
437  aTab.Insert(SvMacroItemId::OnClick, SvxMacro(sMacro, OUString()));
438  aItem.SetMacroTable( aTab );
439  }
440 
441  // create empty itemset for macro-dlg
443  pItemSet->Put ( aItem );
444 
445  SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
446  aNamesItem.AddEvent( ScResId(RID_SCSTR_ONCLICK), OUString(), SvMacroItemId::OnClick );
447  pItemSet->Put( aNamesItem );
448 
449  css::uno::Reference < css::frame::XFrame > xFrame;
450  if (GetViewShell())
452 
454  ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, *pItemSet, xFrame ));
455  if ( pMacroDlg->Execute() != RET_OK )
456  return;
457 
458  const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
459  const SfxPoolItem* pItem;
460  if( SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem ))
461  return;
462 
463  OUString sMacro;
464  const SvxMacro* pMacro = static_cast<const SvxMacroItem*>(pItem)->GetMacroTable().Get( SvMacroItemId::OnClick );
465  if ( pMacro )
466  sMacro = pMacro->GetMacName();
467 
468  if ( pObj->IsGroupObject() )
469  {
470  SdrObjList* pOL = pObj->GetSubList();
471  const size_t nObj = pOL->GetObjCount();
472  for ( size_t index=0; index<nObj; ++index )
473  {
474  pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), true );
475  pInfo->SetMacro( sMacro );
476  }
477  }
478  else
479  pInfo->SetMacro( sMacro );
481 }
482 
484 {
486  bool bHasMarked = pView->AreObjectsMarked();
487  const SdrObject* pObj = nullptr;
488  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
489 
490  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
491 
492  if( rMarkList.GetMarkCount() == 1 )
493  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
494 
495  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
496  if( bHasMarked )
497  pView->MergeAttrFromMarked( aNewAttr, false );
498 
501  &aNewAttr,
503  pObj,
504  bHasMarked));
505 
506  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
507  if ( nResult == RET_OK )
508  {
509  if( bHasMarked )
510  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
511  else
512  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
513 
514  pView->InvalidateAttribs();
515  pRequest->Done();
516  }
517  pDlg->disposeOnce();
518  });
519 }
520 
522 {
524  bool bHasMarked = pView->AreObjectsMarked();
525 
526  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
527 
528  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
529  if( bHasMarked )
530  pView->MergeAttrFromMarked( aNewAttr, false );
531 
535  pWin, &aNewAttr,
536  rViewData.GetDocument().GetDrawLayer(), true));
537 
538  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
539  if ( nResult == RET_OK )
540  {
541  if( bHasMarked )
542  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
543  else
544  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
545 
546  pView->InvalidateAttribs();
547  pRequest->Done();
548  }
549  pDlg->disposeOnce();
550  });
551 }
552 
554 {
556  bool bHasMarked = pView->AreObjectsMarked();
557  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
558 
559  if( bHasMarked )
560  pView->MergeAttrFromMarked( aNewAttr, false );
561 
564  ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView));
565 
566  sal_uInt16 nResult = pDlg->Execute();
567 
568  if ( RET_OK == nResult )
569  {
570  if ( bHasMarked )
571  pView->SetAttributes( *pDlg->GetOutputItemSet() );
572  else
573  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
574 
575  pView->InvalidateAttribs();
576  rReq.Done();
577  }
578 }
579 
581 {
583  bool bHasMarked = pView->AreObjectsMarked();
584  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
585 
586  if( bHasMarked )
587  pView->MergeAttrFromMarked( aNewAttr, false );
588 
591  ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog(pWin, aNewAttr, pView, RID_SVXPAGE_MEASURE));
592 
593  sal_uInt16 nResult = pDlg->Execute();
594 
595  if ( RET_OK == nResult )
596  {
597  if ( bHasMarked )
598  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
599  else
600  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
601 
602  pView->InvalidateAttribs();
603  rReq.Done();
604  }
605 }
606 
607 void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk )
608 {
609  if ( pObj )
610  {
611  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
612  pInfo->SetHlink( rHlnk );
614  }
615 }
616 
617 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
ScViewData & rViewData
Definition: drawsh.hxx:41
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
size_t GetMarkCount() const
#define SFX_IMPL_INTERFACE(Class, SuperClass)
static SfxInterface * GetStaticInterface()
const OUString & GetMacro() const
Definition: userdat.hxx:82
virtual const SfxItemSet * GetOutputItemSet() const =0
std::string GetValue
static XGradient fromJSON(const OUString &rJSON)
bool AreObjectsMarked() const
static SvxAbstractDialogFactory * Create()
void RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, ToolbarId eId)
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
Definition: drwlayer.cxx:2630
sal_uIntPtr sal_uLong
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
Reference< XFrame > xFrame
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()
void Done(bool bRemove=false)
SdrMark * GetMark(size_t nNum) const
ScDocument & GetDocument() const
Definition: viewdata.hxx:379
css::uno::Reference< css::frame::XModel > GetModel() const
void MergeAttrFromMarked(SfxItemSet &rAttr, bool bOnlyHardAttr) const
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void RegisterPopupMenu(const OUString &)
virtual SdrObjKind GetObjIdentifier() const
virtual SdrObjList * GetSubList() const
sal_uInt16 NextWhich()
virtual const sal_uInt16 * GetInputRanges(const SfxItemPool &)=0
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)
static void lcl_invalidateTransformAttr(const ScTabViewShell *pViewShell)
Definition: drawsh.cxx:163
void SetGeoAttrToMarked(const SfxItemSet &rAttr, bool addPageMargin=false)
SfxFrame & GetFrame() const
constexpr TypedWhichId< XColorItem > SDRATTR_SHADOWCOLOR(SDRATTR_SHADOW_FIRST+1)
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint)
virtual VclPtr< SfxAbstractDialog > CreateSfxDialog(weld::Window *pParent, const SfxItemSet &rAttr, const SdrView *pView, sal_uInt32 nResId)=0
const SfxItemSet & GetDefaultAttr() const
void RegisterChildWindow(sal_uInt16, bool bContext=false)
ScDrawView * GetScDrawView()
Definition: viewdata.cxx:3075
SfxItemPool & GetPool() const
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:356
SdrObject * GetMarkedSdrObj() const
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1057
void AddEvent(const OUString &, const OUString &, SvMacroItemId)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetHlinkForObject(SdrObject *pObj, const OUString &rHlnk)
Definition: drawsh.cxx:607
SfxBindings & GetBindings()
void SetHlink(const OUString &rHlink)
Definition: userdat.hxx:84
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
static void lcl_setModified(const SfxObjectShell *pShell)
Definition: drawsh.cxx:153
OUString ScResId(const char *pId)
Definition: scdll.cxx:89
ScGridWindow * GetActiveWin()
Definition: viewdata.cxx:3063
bool IsGroupObject() const
ColorTransparency
tuple index
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
weld::Window * GetDialogParent()
Definition: viewdata.cxx:3057
void ExecuteAreaDlg(const SfxRequest &rReq)
Definition: drawsh.cxx:521
SfxViewShell * GetViewShell() const
static void InitInterface_Impl()
SfxInterface initializer.
Definition: drawsh.cxx:128
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
#define SFX_OBJECTBAR_OBJECT
static void StateDisableItems(SfxItemSet &rSet)
Definition: drawsh.cxx:141
Point PixelToLogic(const Point &rDevicePt) const
Point GetMousePosPixel()
Definition: viewdata.cxx:3890
virtual VclPtr< SfxAbstractTabDialog > CreateTextTabDialog(weld::Window *pParent, const SfxItemSet *pAttrSet, SdrView *pView)=0
sal_uInt16 GetSlot() const
void ExecuteTextAttrDlg(SfxRequest &rReq)
Definition: drawsh.cxx:553
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:177
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
SfxDispatcher & GetDispatcher()
Definition: viewdata.cxx:3041
RET_OK
sal_uInt32 GetValue() const
const OUString & GetHlink() const
Definition: userdat.hxx:85
const SfxItemPool & GetItemPool() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
void ExecuteLineDlg(const SfxRequest &rReq)
Definition: drawsh.cxx:483
sal_uInt16 getHitTolLog() const
void ExecuteMacroAssign(SdrObject *pObj, weld::Window *pWin)
Definition: drawsh.cxx:429
const OUString & GetMacName() const
virtual SfxObjectShell * GetObjectShell()
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:580