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/svdogrp.hxx>
32#include <svx/svdouno.hxx>
33#include <svx/extrusionbar.hxx>
34#include <svx/fontworkbar.hxx>
38#include <svx/unomid.hxx>
39
40#include <drawsh.hxx>
41#include <drawview.hxx>
42#include <viewdata.hxx>
43#include <sc.hrc>
44#include <tabvwsh.hxx>
45#include <document.hxx>
46#include <drwlayer.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
58using namespace com::sun::star::drawing;
59using 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
87void 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
146void 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 {
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 SdrObjKind nObjType = pObj->GetObjIdentifier();
245 if ( nObjType == SdrObjKind::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 == SdrObjKind::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 // Support advanced DiagramHelper
273 if (!pObj->isDiagram())
274 {
275 rSet.DisableItem( SID_REGENERATE_DIAGRAM );
276 rSet.DisableItem( SID_EDIT_DIAGRAM );
277 }
278 }
279 if ( !bCanRename )
280 {
281 // #i68101#
282 rSet.DisableItem( SID_RENAME_OBJECT );
283 rSet.DisableItem( SID_TITLE_DESCRIPTION_OBJECT );
284 }
285
286 if ( !nMarkCount ) // nothing selected
287 {
288 // Arrangement
289 rSet.DisableItem( SID_FRAME_UP );
290 rSet.DisableItem( SID_FRAME_DOWN );
291 rSet.DisableItem( SID_FRAME_TO_TOP );
292 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
293 // Clipboard / delete
294 rSet.DisableItem( SID_DELETE );
295 rSet.DisableItem( SID_DELETE_CONTENTS );
296 rSet.DisableItem( SID_CUT );
297 rSet.DisableItem( SID_COPY );
298 // other
299 rSet.DisableItem( SID_ANCHOR_TOGGLE );
300 rSet.DisableItem( SID_ANCHOR_MENU );
301 rSet.DisableItem( SID_ORIGINALSIZE );
302 rSet.DisableItem( SID_FITCELLSIZE );
303 rSet.DisableItem( SID_ATTR_TRANSFORM );
304 }
305
306 if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN )
307 {
308 SfxItemSet aAttrs( pView->GetModel()->GetItemPool() );
309 pView->GetAttributes( aAttrs );
310 if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
311 {
312 bool bValue = aAttrs.Get( EE_PARA_HYPHENATE ).GetValue();
313 rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) );
314 }
315 }
316
319}
320
321static void setupFillColorForChart(const SfxViewShell* pShell, SfxItemSet& rSet)
322{
323 if (!pShell)
324 return;
325
326 SfxInPlaceClient* pIPClient = pShell->GetIPClient();
327 if (!pIPClient)
328 return;
329
330 const css::uno::Reference<::css::embed::XEmbeddedObject>& xEmbObj = pIPClient->GetObject();
331 if( !xEmbObj.is() )
332 return;
333
334 ::css::uno::Reference<::css::chart2::XChartDocument> xChart( xEmbObj->getComponent(), uno::UNO_QUERY );
335 if( !xChart.is() )
336 return;
337
338 css::uno::Reference<css::beans::XPropertySet> xPropSet = xChart->getPageBackground();
339 if (!xPropSet.is())
340 return;
341
342 css::uno::Reference<css::beans::XPropertySetInfo> xInfo(xPropSet->getPropertySetInfo());
343 if (!xInfo.is())
344 return;
345
346 if (xInfo->hasPropertyByName("FillColor"))
347 {
348 sal_uInt32 nFillColor = 0;
349 xPropSet->getPropertyValue("FillColor") >>= nFillColor;
350
351 XFillColorItem aFillColorItem("", Color(ColorTransparency, nFillColor));
352 rSet.Put(aFillColorItem);
353
355 pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
356 (".uno:FillColor=" + std::to_string(nFillColor)).c_str());
357 }
358
359 if (!(comphelper::LibreOfficeKit::isActive() && xInfo->hasPropertyByName("FillGradientName")))
360 return;
361
362 OUString aGradientName;
363 xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
364
365 ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController();
366 if( !xChartController.is() )
367 return;
368
369 css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xChartController->getModel(), css::uno::UNO_QUERY);
370
371 if (!xFact.is())
372 return;
373
374 css::uno::Reference<css::container::XNameAccess> xNameAccess(
375 xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY);
376
377 if (xNameAccess.is() && xNameAccess->hasByName(aGradientName))
378 {
379 css::uno::Any aAny = xNameAccess->getByName(aGradientName);
380
381 XFillGradientItem aItem;
382 aItem.SetName(aGradientName);
383 aItem.PutValue(aAny, MID_FILLGRADIENT);
384
385 rSet.Put(aItem);
386 }
387}
388
389// Attributes for Drawing-Objects
390
392{
393 Point aMousePos = rViewData.GetMousePosPixel();
396 Point aPos = pWindow->PixelToLogic(aMousePos);
397 bool bHasMarked = pDrView->AreObjectsMarked();
398
399 if( bHasMarked )
400 {
401 SfxAllItemSet aSet(pDrView->GetAttrFromMarked(false));
402 if (const SfxPoolItem* pItem = nullptr;
403 aSet.GetItemState(SDRATTR_TEXTCOLUMNS_NUMBER, false, &pItem) >= SfxItemState::DEFAULT
404 && pItem)
405 {
406 aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_NUMBER));
407 }
408 if (const SfxPoolItem* pItem = nullptr;
409 aSet.GetItemState(SDRATTR_TEXTCOLUMNS_SPACING, false, &pItem) >= SfxItemState::DEFAULT
410 && pItem)
411 {
412 aSet.Put(pItem->CloneSetWhich(SID_ATTR_TEXTCOLUMNS_SPACING));
413 }
414 rSet.Put(aSet, false);
415 }
416 else
417 {
418 rSet.Put( pDrView->GetDefaultAttr() );
419 }
420
421 SdrPageView* pPV = pDrView->GetSdrPageView();
422 if ( !pPV )
423 return;
424
425 // #i52073# when a sheet with an active OLE object is deleted,
426 // the slot state is queried without an active page view
427
428 // Items for position and size (see ScGridWindow::UpdateStatusPosSize, #108137#)
429
430 // #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by
431 // SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE.
432
433 bool bActionItem = false;
434 if ( pDrView->IsAction() ) // action rectangle
435 {
436 tools::Rectangle aRect;
437 pDrView->TakeActionRect( aRect );
438 if ( !aRect.IsEmpty() )
439 {
440 pPV->LogicToPagePos(aRect);
441 rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
442 Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
443 rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
444 bActionItem = true;
445 }
446
447 // Set correct colors for charts in sidebar
449 }
450 if ( bActionItem )
451 return;
452
453 if ( pDrView->AreObjectsMarked() ) // selected objects
454 {
455 tools::Rectangle aRect = pDrView->GetAllMarkedRect();
456 pPV->LogicToPagePos(aRect);
457 rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) );
458 Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() );
459 rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) );
460 }
461 else // mouse position
462 {
463 // aPos is initialized above
464 pPV->LogicToPagePos(aPos);
465 rSet.Put( SfxPointItem( SID_ATTR_POSITION, aPos ) );
466 rSet.Put( SvxSizeItem( SID_ATTR_SIZE, Size( 0, 0 ) ) );
467 }
468}
469
471{
472 // Disable dialogs for Draw-attributes if necessary
473
475 SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false);
476 const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
477 const size_t nMarkCount = rMarkList.GetMarkCount();
478 bool bShowArea = true, bShowMeasure = true;
479
480 for ( size_t i = 0; i < nMarkCount && i < 50; ++i )
481 {
482 SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
483 SdrObjKind nObjType = pObj->GetObjIdentifier();
484
485 if ( nObjType != SdrObjKind::Measure )
486 bShowMeasure = false;
487
488 // If marked object is 2D, disable format area command.
489 if ( nObjType == SdrObjKind::PolyLine ||
490 nObjType == SdrObjKind::Line ||
491 nObjType == SdrObjKind::PathLine ||
492 nObjType == SdrObjKind::FreehandLine ||
493 nObjType == SdrObjKind::Edge ||
494 nObjType == SdrObjKind::CircleArc ||
495 bShowMeasure )
496 bShowArea = false;
497
498 if ( !bShowArea && !bShowMeasure )
499 break;
500 }
501
502 if ( !bShowArea )
503 rSet.DisableItem( SID_ATTRIBUTES_AREA );
504
505 if ( !bShowMeasure )
506 rSet.DisableItem( SID_MEASURE_DLG );
507
508 if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SfxItemState::DEFAULT )
509 {
510 rSet.DisableItem( SID_ATTRIBUTES_LINE );
511 rSet.DisableItem( SID_ATTR_LINEEND_STYLE ); // Tbx-Controller
512 }
513
514 if ( aViewSet.GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT )
515 rSet.DisableItem( SID_ATTRIBUTES_AREA );
516}
517
519{
520 bool bResult=true;
521 const size_t nCount = rMark.GetMarkCount();
522 for (size_t i=0; i<nCount; ++i)
523 {
524 SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
525 if ( dynamic_cast<const SdrUnoObj*>( pObj) == nullptr )
526 {
527 if(nLayerNo!=pObj->GetLayer())
528 {
529 bResult=false;
530 break;
531 }
532 }
533 }
534 return bResult;
535}
536
538{
540 const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
541
542 if( rMarkList.GetMark(0) != nullptr )
543 {
544 SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
545 rSet.Put(aNewAttr, false);
546 }
547}
548
549void ScDrawShell::Activate (const bool)
550{
555}
556
558{
561 GetDrawView()->GetMarkedObjectList()));
562}
563
564/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static void NotifyContextChange(const css::uno::Reference< css::frame::XController > &rxController, const vcl::EnumContext::Context eContext)
void SetName(const OUString &rName)
bool IsUndoEnabled() const
Definition: document.hxx:1593
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
Definition: drwlayer.cxx:2630
OUString const & GetSidebarContextName()
Definition: drawsh2.cxx:557
void GetAttrFuncState(SfxItemSet &rSet)
Definition: drawsh2.cxx:470
virtual void Activate(bool bMDI) override
Definition: drawsh2.cxx:549
ScDrawShell(ScViewData &rData)
Definition: drawsh2.cxx:62
void GetDrawAttrStateForIFBX(SfxItemSet &rSet)
Definition: drawsh2.cxx:537
ScDrawView * GetDrawView()
Definition: drawsh5.cxx:716
void GetState(SfxItemSet &rSet)
Definition: drawsh2.cxx:87
static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo, const SdrMarkList &rMark)
Definition: drawsh2.cxx:518
ScViewData & rViewData
Definition: drawsh.hxx:41
void GetDrawAttrState(SfxItemSet &rSet)
Definition: drawsh2.cxx:391
::rtl::Reference< svx::sidebar::SelectionChangeHandler > mpSelectionChangeHandler
Definition: drawsh.hxx:42
void GetDrawFuncState(SfxItemSet &rSet)
Definition: drawsh2.cxx:146
virtual ~ScDrawShell() override
Definition: drawsh2.cxx:82
SfxViewShell * GetSfxViewShell() const override
See SdrMarkView::GetSfxViewShell().
Definition: drawview.cxx:853
bool HasMarkedInternal() const
Definition: drawview.cxx:253
bool HasMarkedControl() const
Definition: drawview.cxx:244
ScAnchorType GetAnchorType() const
Definition: drawvie3.cxx:116
Point GetMousePosPixel()
Definition: viewdata.cxx:4009
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
ScGridWindow * GetActiveWin()
Definition: viewdata.cxx:3157
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:357
SfxObjectShell * GetSfxDocShell() const
Definition: viewdata.hxx:358
ScDrawView * GetScDrawView()
Definition: viewdata.cxx:3169
virtual bool IsAction() const override
virtual void TakeActionRect(tools::Rectangle &rRect) const override
SfxItemSet GetAttrFromMarked(bool bOnlyHardAttr) const
bool IsUnGroupPossible() const
bool IsGroupEnterPossible() const
SfxItemSet GetGeoAttrFromMarked() const
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
bool IsFrameDragSingles() const
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
SdrDragMode GetDragMode() const
const tools::Rectangle & GetAllMarkedRect() const
SdrObject * GetMarkedSdrObj() const
const SfxItemPool & GetItemPool() const
const OUString & getHyperlink() const
bool isDiagram() const
virtual SdrObjKind GetObjIdentifier() const
virtual SdrLayerID GetLayer() const
sal_Int64 GetAspect() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
void LogicToPagePos(Point &rPnt) const
bool IsGroupEntered() const
const SfxItemSet & GetDefaultAttr() const
SdrModel * GetModel() const
SdrPageView * GetSdrPageView() const
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void SetUndoManager(SfxUndoManager *pNewUndoMgr)
SfxViewFrame * GetFrame() const
virtual SfxObjectShell * GetObjectShell()
virtual SfxUndoManager * GetUndoManager()
void SetPool(SfxItemPool *pNewPool)
void SetName(const OUString &rName)
void SetMaxUndoActionCount(size_t nMaxUndoActionCount)
bool HasChildWindow(sal_uInt16)
SfxViewFrame * GetViewFrame() const
SfxInPlaceClient * GetIPClient() const
virtual void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
static vcl::EnumContext::Context GetContextForSelection_SC(const SdrMarkList &rMarkList)
constexpr tools::Long Top() const
constexpr Point TopLeft() const
constexpr tools::Long Right() const
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
constexpr bool IsEmpty() const
static const OUString & GetContextName(const Context eContext)
static Context GetContextEnum(const OUString &rsContextName)
Point PixelToLogic(const Point &rDevicePt) const
ColorTransparency
int nCount
virtual std::shared_ptr< SfxDialogController > GetController() override
static void setupFillColorForChart(const SfxViewShell *pShell, SfxItemSet &rSet)
Definition: drawsh2.cxx:321
sal_uInt16 ScGetFontWorkId()
Definition: drtxtob2.cxx:37
constexpr TypedWhichId< SfxBoolItem > EE_PARA_HYPHENATE(EE_PARA_START+6)
@ SCA_CELL_RESIZE
Definition: global.hxx:375
@ SCA_CELL
Definition: global.hxx:374
@ SCA_PAGE
Definition: global.hxx:376
constexpr SdrLayerID SC_LAYER_FRONT(0)
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr SdrLayerID SC_LAYER_BACK(1)
Mode eMode
int i
static SfxItemSet & rSet
constexpr TypedWhichId< SfxInt16Item > SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1)
SdrObjKind
SdrDragMode
#define MID_FILLGRADIENT
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)