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 hypelink options for a selected group
222  rSet.DisableItem( SID_DRAW_HLINK_EDIT );
223  rSet.DisableItem( SID_DRAW_HLINK_DELETE );
224  rSet.DisableItem( SID_OPEN_HYPERLINK );
225  // Fit to cell only works with a single graphic
226  rSet.DisableItem( SID_FITCELLSIZE );
227  }
228  else if ( nMarkCount == 1 )
229  {
230  SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
231  ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
232  if ( !pInfo || pInfo->GetHlink().isEmpty() )
233  {
234  rSet.DisableItem( SID_DRAW_HLINK_DELETE );
235  rSet.DisableItem( SID_OPEN_HYPERLINK );
236  }
237  SdrLayerID nLayerID = pObj->GetLayer();
238  if ( nLayerID != SC_LAYER_INTERN )
239  bCanRename = true; // #i51351# anything except internal objects can be renamed
240 
241  // #91929#; don't show original size entry if not possible
242  sal_uInt16 nObjType = pObj->GetObjIdentifier();
243  if ( nObjType == OBJ_OLE2 )
244  {
245  SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
246  if (pOleObj->GetObjRef().is() &&
247  (pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) )
248  //TODO/LATER: why different slots in Draw and Calc?
249  rSet.DisableItem(SID_ORIGINALSIZE);
250  }
251  else if ( nObjType == OBJ_CAPTION )
252  {
253  if ( nLayerID == SC_LAYER_INTERN )
254  {
255  // SdrCaptionObj() Notes cannot be cut/copy in isolation from
256  // their cells.
257  rSet.DisableItem( SID_CUT );
258  rSet.DisableItem( SID_COPY );
259  // Notes always default to Page anchor.
260  rSet.DisableItem( SID_ANCHOR_TOGGLE );
261  rSet.DisableItem( SID_ANCHOR_MENU );
262  }
263  }
264 
265  // Fit to cell is only available for cell anchored graphics obviously
266  if (pView->GetAnchorType() != SCA_CELL &&
267  pView->GetAnchorType() != SCA_CELL_RESIZE)
268  rSet.DisableItem( SID_FITCELLSIZE );
269  }
270  if ( !bCanRename )
271  {
272  // #i68101#
273  rSet.DisableItem( SID_RENAME_OBJECT );
274  rSet.DisableItem( SID_TITLE_DESCRIPTION_OBJECT );
275  }
276 
277  if ( !nMarkCount ) // nothing selected
278  {
279  // Arrangement
280  rSet.DisableItem( SID_FRAME_UP );
281  rSet.DisableItem( SID_FRAME_DOWN );
282  rSet.DisableItem( SID_FRAME_TO_TOP );
283  rSet.DisableItem( SID_FRAME_TO_BOTTOM );
284  // Clipboard / delete
285  rSet.DisableItem( SID_DELETE );
286  rSet.DisableItem( SID_DELETE_CONTENTS );
287  rSet.DisableItem( SID_CUT );
288  rSet.DisableItem( SID_COPY );
289  // other
290  rSet.DisableItem( SID_ANCHOR_TOGGLE );
291  rSet.DisableItem( SID_ANCHOR_MENU );
292  rSet.DisableItem( SID_ORIGINALSIZE );
293  rSet.DisableItem( SID_FITCELLSIZE );
294  rSet.DisableItem( SID_ATTR_TRANSFORM );
295  }
296 
297  if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN )
298  {
299  SfxItemSet aAttrs( pView->GetModel()->GetItemPool() );
300  pView->GetAttributes( aAttrs );
301  if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
302  {
303  bool bValue = aAttrs.Get( EE_PARA_HYPHENATE ).GetValue();
304  rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) );
305  }
306  }
307 
308  svx::ExtrusionBar::getState( pView, rSet );
309  svx::FontworkBar::getState( pView, rSet );
310 }
311 
312 static void setupFillColorForChart(SfxViewShell* pShell, SfxItemSet& rSet)
313 {
314  if (!pShell)
315  return;
316 
317  SfxInPlaceClient* pIPClient = pShell->GetIPClient();
318  if (!pIPClient)
319  return;
320 
321  const css::uno::Reference<::css::embed::XEmbeddedObject>& xEmbObj = pIPClient->GetObject();
322  if( !xEmbObj.is() )
323  return;
324 
325  ::css::uno::Reference<::css::chart2::XChartDocument> xChart( xEmbObj->getComponent(), uno::UNO_QUERY );
326  if( !xChart.is() )
327  return;
328 
329  css::uno::Reference<css::beans::XPropertySet> xPropSet = xChart->getPageBackground();
330  if (!xPropSet.is())
331  return;
332 
333  css::uno::Reference<css::beans::XPropertySetInfo> xInfo(xPropSet->getPropertySetInfo());
334  if (!xInfo.is())
335  return;
336 
337  if (xInfo->hasPropertyByName("FillColor"))
338  {
339  sal_uInt32 nFillColor = 0;
340  xPropSet->getPropertyValue("FillColor") >>= nFillColor;
341 
342  XFillColorItem aFillColorItem("", Color(ColorTransparency, nFillColor));
343  rSet.Put(aFillColorItem);
344 
346  pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
347  (".uno:FillColor=" + std::to_string(nFillColor)).c_str());
348  }
349 
350  if (!(comphelper::LibreOfficeKit::isActive() && xInfo->hasPropertyByName("FillGradientName")))
351  return;
352 
353  OUString aGradientName;
354  xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
355 
356  ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController();
357  if( !xChartController.is() )
358  return;
359 
360  css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xChartController->getModel(), css::uno::UNO_QUERY);
361 
362  if (!xFact.is())
363  return;
364 
365  css::uno::Reference<css::container::XNameAccess> xNameAccess(
366  xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY);
367 
368  if (xNameAccess.is() && xNameAccess->hasByName(aGradientName))
369  {
370  css::uno::Any aAny = xNameAccess->getByName(aGradientName);
371 
372  XFillGradientItem aItem;
373  aItem.SetName(aGradientName);
374  aItem.PutValue(aAny, MID_FILLGRADIENT);
375 
376  rSet.Put(aItem);
377  }
378 }
379 
380 // Attributes for Drawing-Objects
381 
383 {
384  Point aMousePos = rViewData.GetMousePosPixel();
385  vcl::Window* pWindow = rViewData.GetActiveWin();
386  ScDrawView* pDrView = rViewData.GetScDrawView();
387  Point aPos = pWindow->PixelToLogic(aMousePos);
388  bool bHasMarked = pDrView->AreObjectsMarked();
389 
390  if( bHasMarked )
391  {
392  SfxAllItemSet aSet(pDrView->GetAttrFromMarked(false));
393  if (const SfxPoolItem * pItem;
394  aSet.GetItemState(SDRATTR_TEXTCOLUMNS_NUMBER, false, &pItem) >= SfxItemState::DEFAULT
395  && pItem)
396  {
397  aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_NUMBER));
398  }
399  if (const SfxPoolItem * pItem;
400  aSet.GetItemState(SDRATTR_TEXTCOLUMNS_SPACING, false, &pItem) >= SfxItemState::DEFAULT
401  && pItem)
402  {
403  aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_SPACING));
404  }
405  rSet.Put(aSet, false);
406  }
407  else
408  {
409  rSet.Put( pDrView->GetDefaultAttr() );
410  }
411 
412  SdrPageView* pPV = pDrView->GetSdrPageView();
413  if ( !pPV )
414  return;
415 
416  // #i52073# when a sheet with an active OLE object is deleted,
417  // the slot state is queried without an active page view
418 
419  // Items for position and size (see ScGridWindow::UpdateStatusPosSize, #108137#)
420 
421  // #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by
422  // SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE.
423 
424  bool bActionItem = false;
425  if ( pDrView->IsAction() ) // action rectangle
426  {
427  tools::Rectangle aRect;
428  pDrView->TakeActionRect( aRect );
429  if ( !aRect.IsEmpty() )
430  {
431  pPV->LogicToPagePos(aRect);
432  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
433  Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
434  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
435  bActionItem = true;
436  }
437 
438  // Set correct colors for charts in sidebar
439  setupFillColorForChart(pDrView->GetSfxViewShell(), rSet);
440  }
441  if ( bActionItem )
442  return;
443 
444  if ( pDrView->AreObjectsMarked() ) // selected objects
445  {
446  tools::Rectangle aRect = pDrView->GetAllMarkedRect();
447  pPV->LogicToPagePos(aRect);
448  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
449  Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
450  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
451  }
452  else // mouse position
453  {
454  // aPos is initialized above
455  pPV->LogicToPagePos(aPos);
456  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aPos ) );
457  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, Size( 0, 0 ) ) );
458  }
459 }
460 
462 {
463  // Disable dialogs for Draw-attributes if necessary
464 
465  ScDrawView* pDrView = rViewData.GetScDrawView();
466  SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false);
467  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
468  const size_t nMarkCount = rMarkList.GetMarkCount();
469  bool bShowArea = true, bShowMeasure = true;
470 
471  for ( size_t i = 0; i < nMarkCount && i < 50; ++i )
472  {
473  SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
474  sal_uInt16 nObjType = pObj->GetObjIdentifier();
475 
476  if ( nObjType != OBJ_MEASURE )
477  bShowMeasure = false;
478 
479  // If marked object is 2D, disable format area command.
480  if ( nObjType == OBJ_PLIN ||
481  nObjType == OBJ_LINE ||
482  nObjType == OBJ_PATHLINE ||
483  nObjType == OBJ_FREELINE ||
484  nObjType == OBJ_EDGE ||
485  nObjType == OBJ_CARC ||
486  bShowMeasure )
487  bShowArea = false;
488 
489  if ( !bShowArea && !bShowMeasure )
490  break;
491  }
492 
493  if ( !bShowArea )
494  rSet.DisableItem( SID_ATTRIBUTES_AREA );
495 
496  if ( !bShowMeasure )
497  rSet.DisableItem( SID_MEASURE_DLG );
498 
499  if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SfxItemState::DEFAULT )
500  {
501  rSet.DisableItem( SID_ATTRIBUTES_LINE );
502  rSet.DisableItem( SID_ATTR_LINEEND_STYLE ); // Tbx-Controller
503  }
504 
505  if ( aViewSet.GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT )
506  rSet.DisableItem( SID_ATTRIBUTES_AREA );
507 }
508 
510 {
511  bool bResult=true;
512  const size_t nCount = rMark.GetMarkCount();
513  for (size_t i=0; i<nCount; ++i)
514  {
515  SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
516  if ( dynamic_cast<const SdrUnoObj*>( pObj) == nullptr )
517  {
518  if(nLayerNo!=pObj->GetLayer())
519  {
520  bResult=false;
521  break;
522  }
523  }
524  }
525  return bResult;
526 }
527 
529 {
531  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
532 
533  if( rMarkList.GetMark(0) != nullptr )
534  {
535  SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
536  rSet.Put(aNewAttr, false);
537  }
538 }
539 
540 void ScDrawShell::Activate (const bool)
541 {
543  GetFrame()->GetFrame().GetController(),
546 }
547 
549 {
552  GetDrawView()->GetMarkedObjectList()));
553 }
554 
555 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define MID_FILLGRADIENT
SfxViewFrame * GetViewFrame() const
void GetAttrFuncState(SfxItemSet &rSet)
Definition: drawsh2.cxx:461
ScViewData & rViewData
Definition: drawsh.hxx:41
size_t GetMarkCount() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
SfxViewFrame * GetFrame() const
bool AreObjectsMarked() const
static Context GetContextEnum(const OUString &rsContextName)
void GetDrawAttrStateForIFBX(SfxItemSet &rSet)
Definition: drawsh2.cxx:528
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
Definition: drwlayer.cxx:2630
OBJ_LINE
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
::rtl::Reference< svx::sidebar::SelectionChangeHandler > mpSelectionChangeHandler
Definition: drawsh.hxx:42
bool HasMarkedInternal() const
Definition: drawview.cxx:253
OBJ_CARC
constexpr SdrLayerID SC_LAYER_BACK(1)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
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:548
void LogicToPagePos(Point &rPnt) const
tools::Long Left() const
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
int nCount
tools::Long Bottom() const
void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
virtual void Activate(bool bMDI) override
Definition: drawsh2.cxx:540
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:3127
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:382
bool IsGroupEnterPossible() const
OBJ_CAPTION
const SdrMarkList & GetMarkedObjectList() const
static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo, const SdrMarkList &rMark)
Definition: drawsh2.cxx:509
SfxViewShell * GetSfxViewShell() const override
See SdrMarkView::GetSfxViewShell().
Definition: drawview.cxx:851
void SetPool(SfxItemPool *pNewPool)
OBJ_PLIN
ScGridWindow * GetActiveWin()
Definition: viewdata.cxx:3115
OBJ_FREELINE
ColorTransparency
void SetName(const OUString &rName)
Point PixelToLogic(const Point &rDevicePt) const
tools::Long Top() const
const tools::Rectangle & GetAllMarkedRect() const
constexpr Point TopLeft() const
virtual SdrLayerID GetLayer() const
Point GetMousePosPixel()
Definition: viewdata.cxx:3949
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:113
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
static void setupFillColorForChart(SfxViewShell *pShell, SfxItemSet &rSet)
Definition: drawsh2.cxx:312
OBJ_PATHLINE
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
Definition: drwlayer.cxx:2618
SfxObjectShell * GetSfxDocShell() const
Definition: viewdata.hxx:357
const OUString & GetHlink() const
Definition: userdat.hxx:85
bool IsUndoEnabled() const
Definition: document.hxx:1534
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
tools::Long Right() const
virtual SfxObjectShell * GetObjectShell()