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