LibreOffice Module sc (master)  1
drawsh2.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 <com/sun/star/embed/EmbedMisc.hpp>
21 #include <com/sun/star/embed/XEmbeddedObject.hpp>
22 
23 #include <editeng/eeitem.hxx>
24 #include <editeng/sizeitem.hxx>
25 #include <svx/svdpagv.hxx>
26 #include <svx/xdef.hxx>
27 #include <sfx2/objsh.hxx>
28 #include <sfx2/viewfrm.hxx>
29 #include <svl/ptitem.hxx>
30 #include <svx/svdobj.hxx>
31 #include <svx/svdouno.hxx>
32 #include <svx/extrusionbar.hxx>
33 #include <svx/fontworkbar.hxx>
37 #include <svx/unomid.hxx>
38 
39 #include <drawsh.hxx>
40 #include <drawview.hxx>
41 #include <viewdata.hxx>
42 #include <sc.hrc>
43 #include <tabvwsh.hxx>
44 #include <document.hxx>
45 #include <drwlayer.hxx>
46 #include <userdat.hxx>
47 #include <drtxtob.hxx>
48 #include <gridwin.hxx>
49 #include <svx/svdoole2.hxx>
50 #include <svx/xflgrit.hxx>
51 #include <comphelper/lok.hxx>
52 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
53 
54 #include <svx/xflclit.hxx>
55 #include <com/sun/star/chart2/XChartDocument.hpp>
56 #include <sfx2/ipclient.hxx>
57 
58 using namespace com::sun::star::drawing;
59 using namespace com::sun::star;
60 
61 
63  SfxShell(rData.GetViewShell()),
64  rViewData( rData ),
65  mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
66  [this] () { return this->GetSidebarContextName(); },
67  GetFrame()->GetFrame().GetController(),
69 {
72  SetUndoManager( pMgr );
74  {
75  pMgr->SetMaxUndoActionCount( 0 );
76  }
77  SetName("Drawing");
78 
79  mpSelectionChangeHandler->Connect();
80 }
81 
83 {
84  mpSelectionChangeHandler->Disconnect();
85 }
86 
87 void ScDrawShell::GetState( SfxItemSet& rSet ) // Conditions / Toggles
88 {
90  SdrDragMode eMode = pView->GetDragMode();
91 
92  rSet.Put( SfxBoolItem( SID_OBJECT_ROTATE, eMode == SdrDragMode::Rotate ) );
93  rSet.Put( SfxBoolItem( SID_OBJECT_MIRROR, eMode == SdrDragMode::Mirror ) );
94  rSet.Put( SfxBoolItem( SID_BEZIER_EDIT, !pView->IsFrameDragSingles() ) );
95 
96  sal_uInt16 nFWId = ScGetFontWorkId();
98  rSet.Put(SfxBoolItem(SID_FONTWORK, pViewFrm->HasChildWindow(nFWId)));
99 
100  // Notes always default to Page anchor.
101  bool bDisableAnchor = false;
102  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
103  if ( rMarkList.GetMarkCount() == 1 )
104  {
105  SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
106  if( ScDrawLayer::IsNoteCaption( pObj ) )
107  {
108  bDisableAnchor = true;
109  rSet.DisableItem( SID_ANCHOR_PAGE );
110  rSet.DisableItem( SID_ANCHOR_CELL );
111  rSet.DisableItem( SID_ANCHOR_CELL_RESIZE );
112  }
113  }
114 
115  if ( bDisableAnchor )
116  return;
117 
118  switch( pView->GetAnchorType() )
119  {
120  case SCA_PAGE:
121  rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, true ) );
122  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, false ) );
123  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL_RESIZE, false ) );
124  break;
125 
126  case SCA_CELL:
127  rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, false ) );
128  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, true ) );
129  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL_RESIZE, false ) );
130  break;
131 
132  case SCA_CELL_RESIZE:
133  rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, false ) );
134  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, false ) );
135  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL_RESIZE, true ) );
136  break;
137 
138  default:
139  rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, false ) );
140  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, false ) );
141  rSet.Put( SfxBoolItem( SID_ANCHOR_CELL_RESIZE, false ) );
142  break;
143  }
144 }
145 
146 void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
147 {
149 
150  // call IsMirrorAllowed first to make sure ForcePossibilities (and thus CheckMarked)
151  // is called before GetMarkCount, so the nMarkCount value is valid for the rest of this method.
152  if (!pView->IsMirrorAllowed(true,true))
153  {
154  rSet.DisableItem( SID_MIRROR_HORIZONTAL );
155  rSet.DisableItem( SID_MIRROR_VERTICAL );
156  rSet.DisableItem( SID_FLIP_HORIZONTAL );
157  rSet.DisableItem( SID_FLIP_VERTICAL );
158  }
159 
160 
161  if (GetObjectShell()->isContentExtractionLocked())
162  {
163  rSet.DisableItem(SID_COPY);
164  rSet.DisableItem(SID_CUT);
165  }
166 
167  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
168  const size_t nMarkCount = rMarkList.GetMarkCount();
169 
170  if ( nMarkCount <= 1 || !pView->IsGroupPossible() )
171  rSet.DisableItem( SID_GROUP );
172  if ( nMarkCount == 0 || !pView->IsUnGroupPossible() )
173  rSet.DisableItem( SID_UNGROUP );
174  if ( nMarkCount != 1 || !pView->IsGroupEnterPossible() )
175  rSet.DisableItem( SID_ENTER_GROUP );
176  if ( !pView->IsGroupEntered() )
177  rSet.DisableItem( SID_LEAVE_GROUP );
178 
179  if ( nMarkCount <= 1 ) // Nothing or only one object selected
180  {
181  // alignment
182  rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); // no alignment on the side
183  rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
184  rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
185  rSet.DisableItem( SID_OBJECT_ALIGN_UP );
186  rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
187  rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
188  rSet.DisableItem( SID_OBJECT_ALIGN );
189 
190  // pseudo slots for Format menu
191  rSet.DisableItem( SID_ALIGN_ANY_LEFT );
192  rSet.DisableItem( SID_ALIGN_ANY_HCENTER );
193  rSet.DisableItem( SID_ALIGN_ANY_RIGHT );
194  rSet.DisableItem( SID_ALIGN_ANY_TOP );
195  rSet.DisableItem( SID_ALIGN_ANY_VCENTER );
196  rSet.DisableItem( SID_ALIGN_ANY_BOTTOM );
197  }
198 
199  // do not change layer of form controls
200  // #i83729# do not change layer of cell notes (on internal layer)
201  if ( !nMarkCount || pView->HasMarkedControl() || pView->HasMarkedInternal() )
202  {
203  rSet.DisableItem( SID_OBJECT_HEAVEN );
204  rSet.DisableItem( SID_OBJECT_HELL );
205  }
206  else
207  {
208  if(AreAllObjectsOnLayer(SC_LAYER_FRONT,rMarkList))
209  {
210  rSet.DisableItem( SID_OBJECT_HEAVEN );
211  }
212  else if(AreAllObjectsOnLayer(SC_LAYER_BACK,rMarkList))
213  {
214  rSet.DisableItem( SID_OBJECT_HELL );
215  }
216  }
217 
218  bool bCanRename = false;
219  if ( nMarkCount > 1 )
220  {
221  // no hyperlink options for a selected group
222  rSet.DisableItem( SID_EDIT_HYPERLINK );
223  rSet.DisableItem( SID_REMOVE_HYPERLINK );
224  rSet.DisableItem( SID_OPEN_HYPERLINK );
225  rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION );
226  // Fit to cell only works with a single graphic
227  rSet.DisableItem( SID_FITCELLSIZE );
228  }
229  else if ( nMarkCount == 1 )
230  {
231  SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
232  if (pObj->getHyperlink().isEmpty())
233  {
234  rSet.DisableItem( SID_EDIT_HYPERLINK );
235  rSet.DisableItem( SID_OPEN_HYPERLINK );
236  rSet.DisableItem( SID_REMOVE_HYPERLINK );
237  rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION );
238  }
239  SdrLayerID nLayerID = pObj->GetLayer();
240  if ( nLayerID != SC_LAYER_INTERN )
241  bCanRename = true; // #i51351# anything except internal objects can be renamed
242 
243  // #91929#; don't show original size entry if not possible
244  sal_uInt16 nObjType = pObj->GetObjIdentifier();
245  if ( nObjType == OBJ_OLE2 )
246  {
247  SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
248  if (pOleObj->GetObjRef().is() &&
249  (pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
250  //TODO/LATER: why different slots in Draw and Calc?
251  rSet.DisableItem(SID_ORIGINALSIZE);
252  }
253  else if ( nObjType == OBJ_CAPTION )
254  {
255  if ( nLayerID == SC_LAYER_INTERN )
256  {
257  // SdrCaptionObj() Notes cannot be cut/copy in isolation from
258  // their cells.
259  rSet.DisableItem( SID_CUT );
260  rSet.DisableItem( SID_COPY );
261  // Notes always default to Page anchor.
262  rSet.DisableItem( SID_ANCHOR_TOGGLE );
263  rSet.DisableItem( SID_ANCHOR_MENU );
264  }
265  }
266 
267  // Fit to cell is only available for cell anchored graphics obviously
268  if (pView->GetAnchorType() != SCA_CELL &&
269  pView->GetAnchorType() != SCA_CELL_RESIZE)
270  rSet.DisableItem( SID_FITCELLSIZE );
271  }
272  if ( !bCanRename )
273  {
274  // #i68101#
275  rSet.DisableItem( SID_RENAME_OBJECT );
276  rSet.DisableItem( SID_TITLE_DESCRIPTION_OBJECT );
277  }
278 
279  if ( !nMarkCount ) // nothing selected
280  {
281  // Arrangement
282  rSet.DisableItem( SID_FRAME_UP );
283  rSet.DisableItem( SID_FRAME_DOWN );
284  rSet.DisableItem( SID_FRAME_TO_TOP );
285  rSet.DisableItem( SID_FRAME_TO_BOTTOM );
286  // Clipboard / delete
287  rSet.DisableItem( SID_DELETE );
288  rSet.DisableItem( SID_DELETE_CONTENTS );
289  rSet.DisableItem( SID_CUT );
290  rSet.DisableItem( SID_COPY );
291  // other
292  rSet.DisableItem( SID_ANCHOR_TOGGLE );
293  rSet.DisableItem( SID_ANCHOR_MENU );
294  rSet.DisableItem( SID_ORIGINALSIZE );
295  rSet.DisableItem( SID_FITCELLSIZE );
296  rSet.DisableItem( SID_ATTR_TRANSFORM );
297  }
298 
299  if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN )
300  {
301  SfxItemSet aAttrs( pView->GetModel()->GetItemPool() );
302  pView->GetAttributes( aAttrs );
303  if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
304  {
305  bool bValue = aAttrs.Get( EE_PARA_HYPHENATE ).GetValue();
306  rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) );
307  }
308  }
309 
310  svx::ExtrusionBar::getState( pView, rSet );
311  svx::FontworkBar::getState( pView, rSet );
312 }
313 
314 static void setupFillColorForChart(const SfxViewShell* pShell, SfxItemSet& rSet)
315 {
316  if (!pShell)
317  return;
318 
319  SfxInPlaceClient* pIPClient = pShell->GetIPClient();
320  if (!pIPClient)
321  return;
322 
323  const css::uno::Reference<::css::embed::XEmbeddedObject>& xEmbObj = pIPClient->GetObject();
324  if( !xEmbObj.is() )
325  return;
326 
327  ::css::uno::Reference<::css::chart2::XChartDocument> xChart( xEmbObj->getComponent(), uno::UNO_QUERY );
328  if( !xChart.is() )
329  return;
330 
331  css::uno::Reference<css::beans::XPropertySet> xPropSet = xChart->getPageBackground();
332  if (!xPropSet.is())
333  return;
334 
335  css::uno::Reference<css::beans::XPropertySetInfo> xInfo(xPropSet->getPropertySetInfo());
336  if (!xInfo.is())
337  return;
338 
339  if (xInfo->hasPropertyByName("FillColor"))
340  {
341  sal_uInt32 nFillColor = 0;
342  xPropSet->getPropertyValue("FillColor") >>= nFillColor;
343 
344  XFillColorItem aFillColorItem("", Color(ColorTransparency, nFillColor));
345  rSet.Put(aFillColorItem);
346 
348  pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
349  (".uno:FillColor=" + std::to_string(nFillColor)).c_str());
350  }
351 
352  if (!(comphelper::LibreOfficeKit::isActive() && xInfo->hasPropertyByName("FillGradientName")))
353  return;
354 
355  OUString aGradientName;
356  xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
357 
358  ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController();
359  if( !xChartController.is() )
360  return;
361 
362  css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xChartController->getModel(), css::uno::UNO_QUERY);
363 
364  if (!xFact.is())
365  return;
366 
367  css::uno::Reference<css::container::XNameAccess> xNameAccess(
368  xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY);
369 
370  if (xNameAccess.is() && xNameAccess->hasByName(aGradientName))
371  {
372  css::uno::Any aAny = xNameAccess->getByName(aGradientName);
373 
374  XFillGradientItem aItem;
375  aItem.SetName(aGradientName);
376  aItem.PutValue(aAny, MID_FILLGRADIENT);
377 
378  rSet.Put(aItem);
379  }
380 }
381 
382 // Attributes for Drawing-Objects
383 
385 {
386  Point aMousePos = rViewData.GetMousePosPixel();
387  vcl::Window* pWindow = rViewData.GetActiveWin();
388  ScDrawView* pDrView = rViewData.GetScDrawView();
389  Point aPos = pWindow->PixelToLogic(aMousePos);
390  bool bHasMarked = pDrView->AreObjectsMarked();
391 
392  if( bHasMarked )
393  {
394  SfxAllItemSet aSet(pDrView->GetAttrFromMarked(false));
395  if (const SfxPoolItem* pItem = nullptr;
396  aSet.GetItemState(SDRATTR_TEXTCOLUMNS_NUMBER, false, &pItem) >= SfxItemState::DEFAULT
397  && pItem)
398  {
399  aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_NUMBER));
400  }
401  if (const SfxPoolItem* pItem = nullptr;
402  aSet.GetItemState(SDRATTR_TEXTCOLUMNS_SPACING, false, &pItem) >= SfxItemState::DEFAULT
403  && pItem)
404  {
405  aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_SPACING));
406  }
407  rSet.Put(aSet, false);
408  }
409  else
410  {
411  rSet.Put( pDrView->GetDefaultAttr() );
412  }
413 
414  SdrPageView* pPV = pDrView->GetSdrPageView();
415  if ( !pPV )
416  return;
417 
418  // #i52073# when a sheet with an active OLE object is deleted,
419  // the slot state is queried without an active page view
420 
421  // Items for position and size (see ScGridWindow::UpdateStatusPosSize, #108137#)
422 
423  // #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by
424  // SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE.
425 
426  bool bActionItem = false;
427  if ( pDrView->IsAction() ) // action rectangle
428  {
429  tools::Rectangle aRect;
430  pDrView->TakeActionRect( aRect );
431  if ( !aRect.IsEmpty() )
432  {
433  pPV->LogicToPagePos(aRect);
434  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
435  Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
436  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
437  bActionItem = true;
438  }
439 
440  // Set correct colors for charts in sidebar
441  setupFillColorForChart(pDrView->GetSfxViewShell(), rSet);
442  }
443  if ( bActionItem )
444  return;
445 
446  if ( pDrView->AreObjectsMarked() ) // selected objects
447  {
448  tools::Rectangle aRect = pDrView->GetAllMarkedRect();
449  pPV->LogicToPagePos(aRect);
450  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
451  Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
452  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
453  }
454  else // mouse position
455  {
456  // aPos is initialized above
457  pPV->LogicToPagePos(aPos);
458  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aPos ) );
459  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, Size( 0, 0 ) ) );
460  }
461 }
462 
464 {
465  // Disable dialogs for Draw-attributes if necessary
466 
467  ScDrawView* pDrView = rViewData.GetScDrawView();
468  SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false);
469  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
470  const size_t nMarkCount = rMarkList.GetMarkCount();
471  bool bShowArea = true, bShowMeasure = true;
472 
473  for ( size_t i = 0; i < nMarkCount && i < 50; ++i )
474  {
475  SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
476  sal_uInt16 nObjType = pObj->GetObjIdentifier();
477 
478  if ( nObjType != OBJ_MEASURE )
479  bShowMeasure = false;
480 
481  // If marked object is 2D, disable format area command.
482  if ( nObjType == OBJ_PLIN ||
483  nObjType == OBJ_LINE ||
484  nObjType == OBJ_PATHLINE ||
485  nObjType == OBJ_FREELINE ||
486  nObjType == OBJ_EDGE ||
487  nObjType == OBJ_CARC ||
488  bShowMeasure )
489  bShowArea = false;
490 
491  if ( !bShowArea && !bShowMeasure )
492  break;
493  }
494 
495  if ( !bShowArea )
496  rSet.DisableItem( SID_ATTRIBUTES_AREA );
497 
498  if ( !bShowMeasure )
499  rSet.DisableItem( SID_MEASURE_DLG );
500 
501  if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SfxItemState::DEFAULT )
502  {
503  rSet.DisableItem( SID_ATTRIBUTES_LINE );
504  rSet.DisableItem( SID_ATTR_LINEEND_STYLE ); // Tbx-Controller
505  }
506 
507  if ( aViewSet.GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT )
508  rSet.DisableItem( SID_ATTRIBUTES_AREA );
509 }
510 
512 {
513  bool bResult=true;
514  const size_t nCount = rMark.GetMarkCount();
515  for (size_t i=0; i<nCount; ++i)
516  {
517  SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
518  if ( dynamic_cast<const SdrUnoObj*>( pObj) == nullptr )
519  {
520  if(nLayerNo!=pObj->GetLayer())
521  {
522  bResult=false;
523  break;
524  }
525  }
526  }
527  return bResult;
528 }
529 
531 {
533  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
534 
535  if( rMarkList.GetMark(0) != nullptr )
536  {
537  SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
538  rSet.Put(aNewAttr, false);
539  }
540 }
541 
542 void ScDrawShell::Activate (const bool)
543 {
545  GetFrame()->GetFrame().GetController(),
548 }
549 
551 {
554  GetDrawView()->GetMarkedObjectList()));
555 }
556 
557 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define MID_FILLGRADIENT
SfxViewFrame * GetViewFrame() const
void GetAttrFuncState(SfxItemSet &rSet)
Definition: drawsh2.cxx:463
ScViewData & rViewData
Definition: drawsh.hxx:41
size_t GetMarkCount() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
SfxViewFrame * GetFrame() const
constexpr tools::Long Left() const
bool AreObjectsMarked() const
static Context GetContextEnum(const OUString &rsContextName)
void GetDrawAttrStateForIFBX(SfxItemSet &rSet)
Definition: drawsh2.cxx:530
OBJ_LINE
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
::rtl::Reference< svx::sidebar::SelectionChangeHandler > mpSelectionChangeHandler
Definition: drawsh.hxx:42
static void setupFillColorForChart(const SfxViewShell *pShell, SfxItemSet &rSet)
Definition: drawsh2.cxx:314
bool HasMarkedInternal() const
Definition: drawview.cxx:253
OBJ_CARC
constexpr SdrLayerID SC_LAYER_BACK(1)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
const OUString & getHyperlink() const
SdrMark * GetMark(size_t nNum) const
ScDocument & GetDocument() const
Definition: viewdata.hxx:379
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1)
virtual SfxUndoManager * GetUndoManager()
virtual SdrObjKind GetObjIdentifier() const
bool HasMarkedControl() const
Definition: drawview.cxx:244
SdrDragMode GetDragMode() const
virtual ~ScDrawShell() override
Definition: drawsh2.cxx:82
SfxItemSet GetGeoAttrFromMarked() const
ScDrawShell(ScViewData &rData)
Definition: drawsh2.cxx:62
ScDrawView * GetDrawView()
Definition: drawsh5.cxx:681
void GetDrawFuncState(SfxItemSet &rSet)
Definition: drawsh2.cxx:146
OUString const & GetSidebarContextName()
Definition: drawsh2.cxx:550
void LogicToPagePos(Point &rPnt) const
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
int nCount
void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
virtual void Activate(bool bMDI) override
Definition: drawsh2.cxx:542
Mode eMode
const SfxItemSet & GetDefaultAttr() const
static void NotifyContextChange(const css::uno::Reference< css::frame::XController > &rxController, const vcl::EnumContext::Context eContext)
void SetUndoManager(SfxUndoManager *pNewUndoMgr)
ScDrawView * GetScDrawView()
Definition: viewdata.cxx:3136
constexpr bool IsEmpty() const
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:356
SdrObject * GetMarkedSdrObj() const
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
void GetDrawAttrState(SfxItemSet &rSet)
Definition: drawsh2.cxx:384
bool IsGroupEnterPossible() const
OBJ_CAPTION
const SdrMarkList & GetMarkedObjectList() const
static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo, const SdrMarkList &rMark)
Definition: drawsh2.cxx:511
SfxViewShell * GetSfxViewShell() const override
See SdrMarkView::GetSfxViewShell().
Definition: drawview.cxx:853
constexpr tools::Long Right() const
void SetPool(SfxItemPool *pNewPool)
OBJ_PLIN
ScGridWindow * GetActiveWin()
Definition: viewdata.cxx:3124
OBJ_FREELINE
constexpr tools::Long Top() const
ColorTransparency
void SetName(const OUString &rName)
Point PixelToLogic(const Point &rDevicePt) const
const tools::Rectangle & GetAllMarkedRect() const
constexpr Point TopLeft() const
virtual SdrLayerID GetLayer() const
constexpr tools::Long Bottom() const
Point GetMousePosPixel()
Definition: viewdata.cxx:3958
virtual bool IsAction() const override
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static const OUString & GetContextName(const Context eContext)
bool HasChildWindow(sal_uInt16)
void SetName(const OUString &rName)
SfxInPlaceClient * GetIPClient() const
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
ScAnchorType GetAnchorType() const
Definition: drawvie3.cxx:114
void DisableItem(sal_uInt16 nWhich)
sal_Int64 GetAspect() const
SdrDragMode
OBJ_MEASURE
static vcl::EnumContext::Context GetContextForSelection_SC(const SdrMarkList &rMarkList)
constexpr SdrLayerID SC_LAYER_FRONT(0)
void GetState(SfxItemSet &rSet)
Definition: drawsh2.cxx:87
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_HYPHENATE(EE_PARA_START+6)
SfxItemSet GetAttrFromMarked(bool bOnlyHardAttr) const
bool IsUnGroupPossible() const
bool IsFrameDragSingles() const
constexpr TypedWhichId< SfxInt16Item > SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0)
SdrPageView * GetSdrPageView() const
virtual void TakeActionRect(tools::Rectangle &rRect) const override
OBJ_PATHLINE
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
Definition: drwlayer.cxx:2622
SfxObjectShell * GetSfxDocShell() const
Definition: viewdata.hxx:357
bool IsUndoEnabled() const
Definition: document.hxx:1535
const SfxItemPool & GetItemPool() const
OBJ_EDGE
sal_uInt16 ScGetFontWorkId()
Definition: drtxtob2.cxx:37
OBJ_OLE2
SdrModel * GetModel() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
bool IsGroupEntered() const
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
virtual SfxObjectShell * GetObjectShell()