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 
63 
64 namespace
65 {
66  void lcl_convertStringArguments(sal_uInt16 nSlot, const std::unique_ptr<SfxItemSet>& pArgs)
67  {
68  Color aColor;
69  const SfxPoolItem* pItem = nullptr;
70 
71  if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
72  {
73  double fValue = static_cast<const SvxDoubleItem*>(pItem)->GetValue();
74  // FIXME: different units...
75  int nPow = 100;
76  int nValue = fValue * nPow;
77 
78  XLineWidthItem aItem(nValue);
79  pArgs->Put(aItem);
80  }
81  else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
82  {
83  OUString sColor = static_cast<const SfxStringItem*>(pItem)->GetValue();
84 
85  if (sColor == "transparent")
86  aColor = COL_TRANSPARENT;
87  else
88  aColor = Color(ColorTransparency, sColor.toInt32(16));
89 
90  switch (nSlot)
91  {
92  case SID_ATTR_LINE_COLOR:
93  {
94  XLineColorItem aLineColorItem(OUString(), aColor);
95  pArgs->Put(aLineColorItem);
96  break;
97  }
98 
99  case SID_ATTR_FILL_COLOR:
100  {
101  XFillColorItem aFillColorItem(OUString(), aColor);
102  pArgs->Put(aFillColorItem);
103  break;
104  }
105 
106  case SID_ATTR_SHADOW_COLOR:
107  {
108  XColorItem aItem(SDRATTR_SHADOWCOLOR, aColor);
109  pArgs->Put(aItem);
110  break;
111  }
112  }
113  }
114  if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem))
115  {
116  const SfxStringItem* pJSON = static_cast<const SfxStringItem*>(pItem);
117  if (pJSON)
118  {
119  XGradient aGradient = XGradient::fromJSON(pJSON->GetValue());
120  XFillGradientItem aItem(aGradient);
121  pArgs->Put(aItem);
122  }
123  }
124  }
125 }
126 
128 {
130  SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
131  ToolbarId::Draw_Objectbar);
132 
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 
152 static void lcl_setModified( const SfxObjectShell* pShell )
153 {
154  if ( pShell )
155  {
156  css::uno::Reference< css::util::XModifiable > xModif( pShell->GetModel(), css::uno::UNO_QUERY );
157  if ( xModif.is() )
158  xModif->setModified( true );
159  }
160 }
161 
162 static void lcl_invalidateTransformAttr(const ScTabViewShell* pViewShell)
163 {
164  SfxBindings& rBindings=pViewShell->GetViewFrame()->GetBindings();
165  rBindings.Invalidate(SID_ATTR_TRANSFORM_WIDTH);
166  rBindings.Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
167  rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
168  rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y);
169  rBindings.Invalidate(SID_ATTR_TRANSFORM_ANGLE);
170  rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_X);
171  rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_Y);
172  rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOWIDTH);
173  rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOHEIGHT);
174 }
175 
177 {
178  sal_uInt16 nSlot = rReq.GetSlot();
182 
183  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
184  const size_t nMarkCount = rMarkList.GetMarkCount();
185  SdrObject* pSingleSelectedObj = nullptr;
186  if ( nMarkCount > 0 )
187  pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
188 
189  switch ( nSlot )
190  {
191  case SID_ASSIGNMACRO:
192  {
193  if ( pSingleSelectedObj )
194  ExecuteMacroAssign(pSingleSelectedObj, pWin ? pWin->GetFrameWeld() : nullptr);
195  }
196  break;
197 
198  case SID_TEXT_STANDARD: // delete hard text attributes
199  {
201  pView->SetAttributes(aEmptyAttr, true);
202  }
203  break;
204 
205  case SID_ATTR_LINE_STYLE:
206  case SID_ATTR_LINEEND_STYLE:
207  case SID_ATTR_LINE_START:
208  case SID_ATTR_LINE_END:
209  case SID_ATTR_LINE_DASH:
210  case SID_ATTR_LINE_WIDTH:
211  case SID_ATTR_LINE_COLOR:
212  case SID_ATTR_LINE_TRANSPARENCE:
213  case SID_ATTR_LINE_JOINT:
214  case SID_ATTR_LINE_CAP:
215  case SID_ATTR_FILL_STYLE:
216  case SID_ATTR_FILL_COLOR:
217  case SID_ATTR_FILL_GRADIENT:
218  case SID_ATTR_FILL_HATCH:
219  case SID_ATTR_FILL_BITMAP:
220  case SID_ATTR_FILL_TRANSPARENCE:
221  case SID_ATTR_FILL_FLOATTRANSPARENCE:
222 
223  // #i25616#
224  case SID_ATTR_FILL_SHADOW:
225  case SID_ATTR_SHADOW_TRANSPARENCE:
226  case SID_ATTR_SHADOW_COLOR:
227  case SID_ATTR_SHADOW_XDISTANCE:
228  case SID_ATTR_SHADOW_YDISTANCE:
229  {
230  // if toolbar is vertical :
231  if ( !rReq.GetArgs() )
232  {
233  switch ( nSlot )
234  {
235  case SID_ATTR_LINE_STYLE:
236  case SID_ATTR_LINE_DASH:
237  case SID_ATTR_LINE_WIDTH:
238  case SID_ATTR_LINE_COLOR:
239  case SID_ATTR_LINE_TRANSPARENCE:
240  case SID_ATTR_LINE_JOINT:
241  case SID_ATTR_LINE_CAP:
242  ExecuteLineDlg( rReq );
243  break;
244 
245  case SID_ATTR_FILL_STYLE:
246  case SID_ATTR_FILL_COLOR:
247  case SID_ATTR_FILL_GRADIENT:
248  case SID_ATTR_FILL_HATCH:
249  case SID_ATTR_FILL_BITMAP:
250  case SID_ATTR_FILL_TRANSPARENCE:
251  case SID_ATTR_FILL_FLOATTRANSPARENCE:
252 
253  // #i25616#
254  case SID_ATTR_FILL_SHADOW:
255  case SID_ATTR_SHADOW_TRANSPARENCE:
256  case SID_ATTR_SHADOW_COLOR:
257  case SID_ATTR_SHADOW_XDISTANCE:
258  case SID_ATTR_SHADOW_YDISTANCE:
259  ExecuteAreaDlg( rReq );
260  break;
261 
262  default:
263  break;
264  }
265 
266  return;
267 
268  }
269 
270  if( pView->AreObjectsMarked() )
271  {
272  std::unique_ptr<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone();
273  lcl_convertStringArguments( rReq.GetSlot(), pNewArgs );
274  pView->SetAttrToMarked( *pNewArgs, false );
275  }
276  else
277  pView->SetDefaultAttr( *rReq.GetArgs(), false);
278  pView->InvalidateAttribs();
279  }
280  break;
281 
282  case SID_ATTRIBUTES_LINE:
283  ExecuteLineDlg( rReq );
284  break;
285 
286  case SID_ATTRIBUTES_AREA:
287  ExecuteAreaDlg( rReq );
288  break;
289 
290  case SID_MEASURE_DLG:
291  ExecuteMeasureDlg( rReq );
292  break;
293 
294  case SID_DRAWTEXT_ATTR_DLG:
295  ExecuteTextAttrDlg( rReq );
296  break;
297 
298  case SID_DRAW_HLINK_EDIT:
299  if ( pSingleSelectedObj )
300  rViewData.GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
301  break;
302 
303  case SID_DRAW_HLINK_DELETE:
304  if ( pSingleSelectedObj )
305  SetHlinkForObject( pSingleSelectedObj, OUString() );
306  break;
307 
308  case SID_OPEN_HYPERLINK:
309  if ( nMarkCount == 1 )
310  {
311  SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
312  if ( pObj->IsGroupObject() )
313  {
314  SdrPageView* pPV = nullptr;
315  SdrObject* pHit = pView->PickObj(pWin->PixelToLogic(rViewData.GetMousePosPixel()), pView->getHitTolLog(), pPV, SdrSearchOptions::DEEP);
316  if (pHit)
317  pObj = pHit;
318  }
319 
320  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
321  if ( pInfo && !pInfo->GetHlink().isEmpty() )
322  ScGlobal::OpenURL( pInfo->GetHlink(), OUString(), true );
323  }
324  break;
325 
326  case SID_ATTR_TRANSFORM:
327  {
328  if ( pView->AreObjectsMarked() )
329  {
330  const SfxItemSet* pArgs = rReq.GetArgs();
331 
332  if( !pArgs )
333  {
334  if( rMarkList.GetMark(0) != nullptr )
335  {
336  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
337  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
338 
339  if( pObj->GetObjIdentifier() == OBJ_CAPTION )
340  {
341  // Caption Itemset
342  SfxItemSet aNewAttr(pDoc->GetItemPool());
343  pView->GetAttributes(aNewAttr);
344  // Size and Position Itemset
345  SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
346 
348  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog(pWin ? pWin->GetFrameWeld() : nullptr, pView));
349 
350  const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
351  SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
352  aCombSet.Put( aNewAttr );
353  aCombSet.Put( aNewGeoAttr );
354  pDlg->SetInputSet( &aCombSet );
355 
356  pDlg->StartExecuteAsync([pDlg, pRequest, pView, this](
357  sal_Int32 nResult){
358  if (nResult == RET_OK)
359  {
360  pRequest->Done(*(pDlg->GetOutputItemSet()));
361  pView->SetAttributes(*pDlg->GetOutputItemSet());
362  pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
363  }
364 
366  pDlg->disposeOnce();
367  });
368  }
369  else
370  {
371  SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
373  VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
374 
375  pDlg->StartExecuteAsync([pDlg, pRequest, pView, this](
376  sal_Int32 nResult){
377  if (nResult == RET_OK)
378  {
379  pRequest->Done(*(pDlg->GetOutputItemSet()));
380  pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
381  }
382 
384  pDlg->disposeOnce();
385  });
386  }
387  }
388 
389  }
390  else
391  pView->SetGeoAttrToMarked( *pArgs );
392  }
393 
395  }
396  break;
397 
398  case SID_ATTR_GLOW_COLOR:
399  case SID_ATTR_GLOW_RADIUS:
400  case SID_ATTR_GLOW_TRANSPARENCY:
401  case SID_ATTR_SOFTEDGE_RADIUS:
402  if (const SfxItemSet* pNewArgs = rReq.GetArgs())
403  pView->SetAttrToMarked(*pNewArgs, false);
404  rReq.Done();
405  break;
406 
407  default:
408  break;
409  }
410 }
411 
413 {
414  SvxMacroItem aItem ( SfxGetpApp()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
415  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
416  if ( !pInfo->GetMacro().isEmpty() )
417  {
418  SvxMacroTableDtor aTab;
419  const OUString& sMacro = pInfo->GetMacro();
420  aTab.Insert(SvMacroItemId::OnClick, SvxMacro(sMacro, OUString()));
421  aItem.SetMacroTable( aTab );
422  }
423 
424  // create empty itemset for macro-dlg
426  pItemSet->Put ( aItem );
427 
428  SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
429  aNamesItem.AddEvent( ScResId(RID_SCSTR_ONCLICK), OUString(), SvMacroItemId::OnClick );
430  pItemSet->Put( aNamesItem );
431 
432  css::uno::Reference < css::frame::XFrame > xFrame;
433  if (GetViewShell())
435 
437  ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, *pItemSet, xFrame ));
438  if ( pMacroDlg->Execute() != RET_OK )
439  return;
440 
441  const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
442  const SfxPoolItem* pItem;
443  if( SfxItemState::SET != pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem ))
444  return;
445 
446  OUString sMacro;
447  const SvxMacro* pMacro = static_cast<const SvxMacroItem*>(pItem)->GetMacroTable().Get( SvMacroItemId::OnClick );
448  if ( pMacro )
449  sMacro = pMacro->GetMacName();
450 
451  if ( pObj->IsGroupObject() )
452  {
453  SdrObjList* pOL = pObj->GetSubList();
454  const size_t nObj = pOL->GetObjCount();
455  for ( size_t index=0; index<nObj; ++index )
456  {
457  pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), true );
458  pInfo->SetMacro( sMacro );
459  }
460  }
461  else
462  pInfo->SetMacro( sMacro );
464 }
465 
467 {
469  bool bHasMarked = pView->AreObjectsMarked();
470  const SdrObject* pObj = nullptr;
471  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
472 
473  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
474 
475  if( rMarkList.GetMarkCount() == 1 )
476  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
477 
478  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
479  if( bHasMarked )
480  pView->MergeAttrFromMarked( aNewAttr, false );
481 
484  &aNewAttr,
486  pObj,
487  bHasMarked));
488 
489  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
490  if ( nResult == RET_OK )
491  {
492  if( bHasMarked )
493  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
494  else
495  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
496 
497  pView->InvalidateAttribs();
498  pRequest->Done();
499  }
500  pDlg->disposeOnce();
501  });
502 }
503 
505 {
507  bool bHasMarked = pView->AreObjectsMarked();
508 
509  std::shared_ptr<SfxRequest> pRequest = std::make_shared<SfxRequest>(rReq);
510 
511  SfxItemSet aNewAttr( pView->GetDefaultAttr() );
512  if( bHasMarked )
513  pView->MergeAttrFromMarked( aNewAttr, false );
514 
518  pWin, &aNewAttr,
519  rViewData.GetDocument().GetDrawLayer(), true));
520 
521  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
522  if ( nResult == RET_OK )
523  {
524  if( bHasMarked )
525  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
526  else
527  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
528 
529  pView->InvalidateAttribs();
530  pRequest->Done();
531  }
532  pDlg->disposeOnce();
533  });
534 }
535 
537 {
539  bool bHasMarked = pView->AreObjectsMarked();
540  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
541 
542  if( bHasMarked )
543  pView->MergeAttrFromMarked( aNewAttr, false );
544 
547  ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView));
548 
549  sal_uInt16 nResult = pDlg->Execute();
550 
551  if ( RET_OK == nResult )
552  {
553  if ( bHasMarked )
554  pView->SetAttributes( *pDlg->GetOutputItemSet() );
555  else
556  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
557 
558  pView->InvalidateAttribs();
559  rReq.Done();
560  }
561 }
562 
564 {
566  bool bHasMarked = pView->AreObjectsMarked();
567  SfxItemSet aNewAttr ( pView->GetDefaultAttr() );
568 
569  if( bHasMarked )
570  pView->MergeAttrFromMarked( aNewAttr, false );
571 
574  ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog(pWin, aNewAttr, pView, RID_SVXPAGE_MEASURE));
575 
576  sal_uInt16 nResult = pDlg->Execute();
577 
578  if ( RET_OK == nResult )
579  {
580  if ( bHasMarked )
581  pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), false );
582  else
583  pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), false );
584 
585  pView->InvalidateAttribs();
586  rReq.Done();
587  }
588 }
589 
590 void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk )
591 {
592  if ( pObj )
593  {
594  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
595  pInfo->SetHlink( rHlnk );
597  }
598 }
599 
600 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
ScViewData & rViewData
Definition: drawsh.hxx:42
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:83
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:2524
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
Reference< XFrame > xFrame
void SetGeoAttrToMarked(const SfxItemSet &rAttr)
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:151
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:380
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()
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:162
SfxFrame & GetFrame() const
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
void RegisterChildWindow(sal_uInt16, bool bContext=false)
ScDrawView * GetScDrawView()
Definition: viewdata.cxx:3074
SfxItemPool & GetPool() const
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:357
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:1056
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:590
SfxBindings & GetBindings()
void SetHlink(const OUString &rHlink)
Definition: userdat.hxx:85
OBJ_CAPTION
const OUString & GetValue() const
const SdrMarkList & GetMarkedObjectList() const
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
void SetMacro(const OUString &rMacro)
Definition: userdat.hxx:82
static void lcl_setModified(const SfxObjectShell *pShell)
Definition: drawsh.cxx:152
OUString ScResId(const char *pId)
Definition: scdll.cxx:89
ScGridWindow * GetActiveWin()
Definition: viewdata.cxx:3062
bool IsGroupObject() const
ColorTransparency
tuple index
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
weld::Window * GetDialogParent()
Definition: viewdata.cxx:3056
void ExecuteAreaDlg(const SfxRequest &rReq)
Definition: drawsh.cxx:504
SfxViewShell * GetViewShell() const
static void InitInterface_Impl()
SfxInterface initializer.
Definition: drawsh.cxx:127
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
#define SFX_OBJECTBAR_OBJECT
static void StateDisableItems(SfxItemSet &rSet)
Definition: drawsh.cxx:140
Point PixelToLogic(const Point &rDevicePt) const
Point GetMousePosPixel()
Definition: viewdata.cxx:3889
virtual VclPtr< SfxAbstractTabDialog > CreateTextTabDialog(weld::Window *pParent, const SfxItemSet *pAttrSet, SdrView *pView)=0
sal_uInt16 GetSlot() const
void ExecuteTextAttrDlg(SfxRequest &rReq)
Definition: drawsh.cxx:536
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:176
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
SfxDispatcher & GetDispatcher()
Definition: viewdata.cxx:3040
RET_OK
const OUString & GetHlink() const
Definition: userdat.hxx:86
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:466
sal_uInt16 getHitTolLog() const
void ExecuteMacroAssign(SdrObject *pObj, weld::Window *pWin)
Definition: drawsh.cxx:412
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:563