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