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  rSet.Put( pDrView->GetAttrFromMarked(false), false );
393  }
394  else
395  {
396  rSet.Put( pDrView->GetDefaultAttr() );
397  }
398 
399  SdrPageView* pPV = pDrView->GetSdrPageView();
400  if ( !pPV )
401  return;
402 
403  // #i52073# when a sheet with an active OLE object is deleted,
404  // the slot state is queried without an active page view
405 
406  // Items for position and size (see ScGridWindow::UpdateStatusPosSize, #108137#)
407 
408  // #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by
409  // SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE.
410 
411  bool bActionItem = false;
412  if ( pDrView->IsAction() ) // action rectangle
413  {
414  tools::Rectangle aRect;
415  pDrView->TakeActionRect( aRect );
416  if ( !aRect.IsEmpty() )
417  {
418  pPV->LogicToPagePos(aRect);
419  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
420  Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
421  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
422  bActionItem = true;
423  }
424 
425  // Set correct colors for charts in sidebar
426  setupFillColorForChart(pDrView->GetSfxViewShell(), rSet);
427  }
428  if ( bActionItem )
429  return;
430 
431  if ( pDrView->AreObjectsMarked() ) // selected objects
432  {
433  tools::Rectangle aRect = pDrView->GetAllMarkedRect();
434  pPV->LogicToPagePos(aRect);
435  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
436  Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
437  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
438  }
439  else // mouse position
440  {
441  // aPos is initialized above
442  pPV->LogicToPagePos(aPos);
443  rSet.Put( SfxPointItem( SID_ATTR_POSITION, aPos ) );
444  rSet.Put( SvxSizeItem( SID_ATTR_SIZE, Size( 0, 0 ) ) );
445  }
446 }
447 
449 {
450  // Disable dialogs for Draw-attributes if necessary
451 
452  ScDrawView* pDrView = rViewData.GetScDrawView();
453  SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false);
454  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
455  const size_t nMarkCount = rMarkList.GetMarkCount();
456  bool bShowArea = true, bShowMeasure = true;
457 
458  for ( size_t i = 0; i < nMarkCount && i < 50; ++i )
459  {
460  SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
461  sal_uInt16 nObjType = pObj->GetObjIdentifier();
462 
463  if ( nObjType != OBJ_MEASURE )
464  bShowMeasure = false;
465 
466  // If marked object is 2D, disable format area command.
467  if ( nObjType == OBJ_PLIN ||
468  nObjType == OBJ_LINE ||
469  nObjType == OBJ_PATHLINE ||
470  nObjType == OBJ_FREELINE ||
471  nObjType == OBJ_EDGE ||
472  nObjType == OBJ_CARC ||
473  bShowMeasure )
474  bShowArea = false;
475 
476  if ( !bShowArea && !bShowMeasure )
477  break;
478  }
479 
480  if ( !bShowArea )
481  rSet.DisableItem( SID_ATTRIBUTES_AREA );
482 
483  if ( !bShowMeasure )
484  rSet.DisableItem( SID_MEASURE_DLG );
485 
486  if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SfxItemState::DEFAULT )
487  {
488  rSet.DisableItem( SID_ATTRIBUTES_LINE );
489  rSet.DisableItem( SID_ATTR_LINEEND_STYLE ); // Tbx-Controller
490  }
491 
492  if ( aViewSet.GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT )
493  rSet.DisableItem( SID_ATTRIBUTES_AREA );
494 }
495 
497 {
498  bool bResult=true;
499  const size_t nCount = rMark.GetMarkCount();
500  for (size_t i=0; i<nCount; ++i)
501  {
502  SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
503  if ( dynamic_cast<const SdrUnoObj*>( pObj) == nullptr )
504  {
505  if(nLayerNo!=pObj->GetLayer())
506  {
507  bResult=false;
508  break;
509  }
510  }
511  }
512  return bResult;
513 }
514 
516 {
518  const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
519 
520  if( rMarkList.GetMark(0) != nullptr )
521  {
522  SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
523  rSet.Put(aNewAttr, false);
524  }
525 }
526 
527 void ScDrawShell::Activate (const bool)
528 {
530  GetFrame()->GetFrame().GetController(),
533 }
534 
536 {
539  GetDrawView()->GetMarkedObjectList()));
540 }
541 
542 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define MID_FILLGRADIENT
Point TopLeft() const
SfxViewFrame * GetViewFrame() const
void GetAttrFuncState(SfxItemSet &rSet)
Definition: drawsh2.cxx:448
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:515
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
Definition: drwlayer.cxx:2629
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:252
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
virtual SfxUndoManager * GetUndoManager()
virtual SdrObjKind GetObjIdentifier() const
bool HasMarkedControl() const
Definition: drawview.cxx:243
SdrDragMode GetDragMode() const
virtual ~ScDrawShell() override
Definition: drawsh2.cxx:82
SfxItemSet GetGeoAttrFromMarked() const
bool IsEmpty() const
ScDrawShell(ScViewData &rData)
Definition: drawsh2.cxx:62
ScDrawView * GetDrawView()
Definition: drawsh5.cxx:680
void GetDrawFuncState(SfxItemSet &rSet)
Definition: drawsh2.cxx:146
OUString const & GetSidebarContextName()
Definition: drawsh2.cxx:535
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:527
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:3075
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:356
SdrObject * GetMarkedSdrObj() const
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:496
SfxViewShell * GetSfxViewShell() const override
See SdrMarkView::GetSfxViewShell().
Definition: drawview.cxx:850
void SetPool(SfxItemPool *pNewPool)
OBJ_PLIN
ScGridWindow * GetActiveWin()
Definition: viewdata.cxx:3063
OBJ_FREELINE
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
ColorTransparency
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:3890
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
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:2617
SfxObjectShell * GetSfxDocShell() const
Definition: viewdata.hxx:357
const OUString & GetHlink() const
Definition: userdat.hxx:85
bool IsUndoEnabled() const
Definition: document.hxx:1530
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()