LibreOffice Module sw (master)  1
drawsh.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 <svx/svdview.hxx>
21 #include <svx/svdotext.hxx>
22 #include <svl/whiter.hxx>
23 #include <svx/fontwork.hxx>
24 #include <sfx2/request.hxx>
25 #include <sfx2/bindings.hxx>
26 #include <sfx2/objface.hxx>
27 #include <sfx2/viewfrm.hxx>
28 #include <svx/extrusionbar.hxx>
29 #include <svx/fontworkbar.hxx>
30 #include <uitool.hxx>
31 #include <dcontact.hxx>
32 #include <textboxhelper.hxx>
33 #include <wview.hxx>
34 #include <swmodule.hxx>
35 
36 #include <svx/svdoashp.hxx>
37 #include <svx/xfillit0.hxx>
38 #include <vcl/EnumContext.hxx>
39 #include <svx/svdoole2.hxx>
40 #include <sfx2/opengrf.hxx>
41 #include <svx/svdograf.hxx>
42 #include <svx/svdundo.hxx>
43 #include <svx/xbtmpit.hxx>
44 #include <svx/sdasitm.hxx>
45 
46 #include <swundo.hxx>
47 #include <wrtsh.hxx>
48 #include <cmdid.h>
49 #include <strings.hrc>
50 #include <drwbassh.hxx>
51 #include <drawsh.hxx>
52 
53 #define ShellClass_SwDrawShell
54 #include <sfx2/msg.hxx>
55 #include <swslots.hxx>
56 
57 using namespace ::com::sun::star;
58 using namespace ::com::sun::star::uno;
59 
61 
62 void SwDrawShell::InitInterface_Impl()
63 {
64  GetStaticInterface()->RegisterPopupMenu("draw");
65 
66  GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Draw_Toolbox_Sw);
67 
68  GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
69 }
70 
71 
72 // #i123922# check as the name implies
74 {
75  SwWrtShell &rSh = GetShell();
76  SdrView* pSdrView = rSh.GetDrawView();
77 
78  if(!pSdrView)
79  {
80  return nullptr;
81  }
82 
83  if(1 != pSdrView->GetMarkedObjectCount())
84  {
85  return nullptr;
86  }
87 
88  SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0);
89 
90  if(!pPickObj)
91  {
92  return nullptr;
93  }
94 
95  if(!pPickObj->IsClosedObj())
96  {
97  return nullptr;
98  }
99 
100  if(dynamic_cast< SdrOle2Obj* >(pPickObj))
101  {
102  return nullptr;
103  }
104 
105  return pPickObj;
106 }
107 
108 // #i123922# insert given graphic data dependent of the object type in focus
110 {
111  SwWrtShell &rSh = GetShell();
112  SdrView* pSdrView = rSh.GetDrawView();
113 
114  if(!pSdrView)
115  return;
116 
117  SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), GetView().GetFrameWeld());
118 
119  if (ERRCODE_NONE != aDlg.Execute())
120  return;
121 
122  Graphic aGraphic;
123  ErrCode nError = aDlg.GetGraphic(aGraphic);
124 
125  if(ERRCODE_NONE != nError)
126  return;
127 
128  const bool bAsLink(aDlg.IsAsLink());
129  SdrObject* pResult = &rObject;
130 
132 
133  if (SdrGrafObj* pSdrGrafObj = dynamic_cast<SdrGrafObj*>(&rObject))
134  {
135  SdrGrafObj* pNewGrafObj(pSdrGrafObj->CloneSdrObject(pSdrGrafObj->getSdrModelFromSdrObject()));
136 
137  pNewGrafObj->SetGraphic(aGraphic);
138 
139  // #i123922# for handling MasterObject and virtual ones correctly, SW
140  // wants us to call ReplaceObject at the page, but that also
141  // triggers the same assertion (I tried it), so stay at the view method
142  pSdrView->ReplaceObjectAtView(&rObject, *pSdrView->GetSdrPageView(), pNewGrafObj);
143 
144  // set in all cases - the Clone() will have copied an existing link (!)
145  pNewGrafObj->SetGraphicLink(
146  bAsLink ? aDlg.GetPath() : OUString());
147 
148  pResult = pNewGrafObj;
149  }
150  else // if(rObject.IsClosedObj() && !dynamic_cast< SdrOle2Obj* >(&rObject))
151  {
152  pSdrView->AddUndo(std::make_unique<SdrUndoAttrObj>(rObject));
153 
155 
156  aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
157  aSet.Put(XFillBitmapItem(OUString(), aGraphic));
158  rObject.SetMergedItemSetAndBroadcast(aSet);
159  }
160 
161  rSh.EndUndo( SwUndoId::END );
162 
163  if(pResult)
164  {
165  // we are done; mark the modified/new object
166  pSdrView->MarkObj(pResult, pSdrView->GetSdrPageView());
167  }
168 }
169 
171 {
172  SwWrtShell &rSh = GetShell();
173  SdrView *pSdrView = rSh.GetDrawView();
174  const SfxItemSet *pArgs = rReq.GetArgs();
176  sal_uInt16 nSlotId = rReq.GetSlot();
177  bool bChanged = pSdrView->GetModel()->IsChanged();
178 
179  pSdrView->GetModel()->SetChanged(false);
180 
181  const SfxPoolItem* pItem;
182  if(pArgs)
183  pArgs->GetItemState(nSlotId, false, &pItem);
184 
185  bool bMirror = true;
186 
187  switch (nSlotId)
188  {
189  case SID_OBJECT_ROTATE:
190  if (rSh.IsObjSelected() && pSdrView->IsRotateAllowed())
191  {
192  if (GetView().IsDrawRotate())
193  rSh.SetDragMode(SdrDragMode::Move);
194  else
195  rSh.SetDragMode(SdrDragMode::Rotate);
196 
198  }
199  break;
200 
201  case SID_BEZIER_EDIT:
202  if (GetView().IsDrawRotate())
203  {
204  rSh.SetDragMode(SdrDragMode::Move);
206  }
208  pSdrView->SetFrameDragSingles(GetView().IsDrawSelMode());
209  GetView().AttrChangedNotify(nullptr); // Shell switch
210  break;
211 
212  case SID_OBJECT_HELL:
213  if (rSh.IsObjSelected())
214  {
215  rSh.StartUndo( SwUndoId::START );
217  rSh.SelectionToHell();
218  rSh.EndUndo( SwUndoId::END );
219  rBnd.Invalidate(SID_OBJECT_HEAVEN);
220  }
221  break;
222 
223  case SID_OBJECT_HEAVEN:
224  if (rSh.IsObjSelected())
225  {
226  rSh.StartUndo( SwUndoId::START );
228  rSh.SelectionToHeaven();
229  rSh.EndUndo( SwUndoId::END );
230  rBnd.Invalidate(SID_OBJECT_HELL);
231  }
232  break;
233 
234  case FN_TOOL_HIERARCHIE:
235  if (rSh.IsObjSelected())
236  {
237  rSh.StartUndo( SwUndoId::START );
238  if (rSh.GetLayerId() == SdrLayerID(0))
239  {
241  rSh.SelectionToHeaven();
242  }
243  else
244  {
246  rSh.SelectionToHell();
247  }
248  rSh.EndUndo( SwUndoId::END );
249  rBnd.Invalidate( SID_OBJECT_HELL );
250  rBnd.Invalidate( SID_OBJECT_HEAVEN );
251  }
252  break;
253 
254  case SID_FLIP_VERTICAL:
255  bMirror = false;
256  [[fallthrough]];
257  case SID_FLIP_HORIZONTAL:
258  rSh.MirrorSelection( bMirror );
259  break;
260 
261  case SID_FONTWORK:
262  {
263  FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr );
264  SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
265  SfxViewFrame* pVFrame = GetView().GetViewFrame();
266  if (pArgs)
267  {
268  pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
269  static_cast<const SfxBoolItem&>((pArgs->Get(SID_FONTWORK))).GetValue());
270  }
271  else
272  pVFrame->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() );
273  pVFrame->GetBindings().Invalidate(SID_FONTWORK);
274  }
275  break;
277  {
279  break;
280  }
282  {
284  rReq.Done();
285  }
286  break;
287  case SID_OPEN_XML_FILTERSETTINGS:
288  {
290  }
291  break;
292  case FN_WORDCOUNT_DIALOG:
293  {
294  GetView().UpdateWordCount(this, nSlotId);
295  }
296  break;
297  case SID_EXTRUSION_TOGGLE:
298  case SID_EXTRUSION_TILT_DOWN:
299  case SID_EXTRUSION_TILT_UP:
300  case SID_EXTRUSION_TILT_LEFT:
301  case SID_EXTRUSION_TILT_RIGHT:
302  case SID_EXTRUSION_3D_COLOR:
303  case SID_EXTRUSION_DEPTH:
304  case SID_EXTRUSION_DIRECTION:
305  case SID_EXTRUSION_PROJECTION:
306  case SID_EXTRUSION_LIGHTING_DIRECTION:
307  case SID_EXTRUSION_LIGHTING_INTENSITY:
308  case SID_EXTRUSION_SURFACE:
309  case SID_EXTRUSION_DEPTH_FLOATER:
310  case SID_EXTRUSION_DIRECTION_FLOATER:
311  case SID_EXTRUSION_LIGHTING_FLOATER:
312  case SID_EXTRUSION_SURFACE_FLOATER:
313  case SID_EXTRUSION_DEPTH_DIALOG:
314  svx::ExtrusionBar::execute( pSdrView, rReq, rBnd );
315  rReq.Ignore ();
316  break;
317 
318  case SID_FONTWORK_SHAPE:
319  case SID_FONTWORK_SHAPE_TYPE:
320  case SID_FONTWORK_ALIGNMENT:
321  case SID_FONTWORK_SAME_LETTER_HEIGHTS:
322  case SID_FONTWORK_CHARACTER_SPACING:
323  case SID_FONTWORK_KERN_CHARACTER_PAIRS:
324  case SID_FONTWORK_CHARACTER_SPACING_FLOATER:
325  case SID_FONTWORK_ALIGNMENT_FLOATER:
326  case SID_FONTWORK_CHARACTER_SPACING_DIALOG:
327  svx::FontworkBar::execute(*pSdrView, rReq, rBnd);
328  rReq.Ignore ();
329  break;
330 
331  case SID_INSERT_GRAPHIC:
332  {
333  // #i123922# check if we can do something
335 
336  if(pObj)
337  {
338  // ...and if yes, do something
339  InsertPictureFromFile(*pObj);
340  }
341 
342  break;
343  }
344 
345  case FN_ADD_TEXT_BOX:
346  {
348  {
349  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
350  if (pFrameFormat)
351  SwTextBoxHelper::create(pFrameFormat, pObj->HasText());
352  }
353  break;
354  }
355  case FN_REMOVE_TEXT_BOX:
356  {
358  {
359  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
360  if (pFrameFormat)
361  SwTextBoxHelper::destroy(pFrameFormat);
362  }
363  break;
364  }
365  default:
366  OSL_ENSURE(false, "wrong dispatcher");
367  return;
368  }
369  if (pSdrView->GetModel()->IsChanged())
370  rSh.SetModified();
371  else if (bChanged)
372  pSdrView->GetModel()->SetChanged();
373 }
374 
376 {
377  SwWrtShell &rSh = GetShell();
378  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
379  SfxWhichIter aIter( rSet );
380  sal_uInt16 nWhich = aIter.FirstWhich();
382 
383  if (!bProtected) // Check the parent
385 
386  while( nWhich )
387  {
388  switch( nWhich )
389  {
390  case SID_OBJECT_HELL:
391  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(0) || bProtected )
392  rSet.DisableItem( nWhich );
393  break;
394 
395  case SID_OBJECT_HEAVEN:
396  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(1) || bProtected )
397  rSet.DisableItem( nWhich );
398  break;
399 
400  case FN_TOOL_HIERARCHIE:
401  if ( !rSh.IsObjSelected() || bProtected )
402  rSet.DisableItem( nWhich );
403  break;
404 
405  case SID_OBJECT_ROTATE:
406  {
407  const bool bIsRotate = GetView().IsDrawRotate();
408  if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
409  rSet.DisableItem( nWhich );
410  else
411  rSet.Put( SfxBoolItem( nWhich, bIsRotate ) );
412  }
413  break;
414 
415  case SID_BEZIER_EDIT:
416  if (!Disable(rSet, nWhich))
417  rSet.Put( SfxBoolItem( nWhich, !GetView().IsDrawSelMode()));
418  break;
419 
420  case SID_FLIP_VERTICAL:
421  if ( !pSdrView->IsMirrorAllowed() || bProtected )
422  {
423  rSet.DisableItem( nWhich );
424  }
425  else
426  {
427  // TTTT - needs to be adapted in aw080:
428  // state is not kept for drawing objects --> provide not flipped state
429  rSet.Put( SfxBoolItem( nWhich, false ) );
430  }
431  break;
432 
433  case SID_FLIP_HORIZONTAL:
434  if ( !pSdrView->IsMirrorAllowed() || bProtected )
435  {
436  rSet.DisableItem( nWhich );
437  }
438  else
439  {
440  // TTTT - needs to be adapted in aw080:
441  // state is not kept for drawing objects --> provide not flipped state
442  rSet.Put( SfxBoolItem( nWhich, false ) );
443  }
444  break;
445 
446  case SID_FONTWORK:
447  {
448  if (bProtected)
449  rSet.DisableItem( nWhich );
450  else
451  {
452  const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
453  rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
454  }
455  }
456  break;
457 
458  case SID_INSERT_GRAPHIC:
459  {
460  // #i123922# check if we can do something
462 
463  if(!pObj)
464  {
465  rSet.DisableItem(nWhich);
466  }
467 
468  break;
469  }
470  case FN_ADD_TEXT_BOX:
471  {
472  bool bDisable = true;
474  {
475  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
476  // Allow creating a TextBox only in case this is a draw format without a TextBox so far.
477  if (pFrameFormat && pFrameFormat->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT))
478  {
479  if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pObj) )
480  {
481  const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
482  if (const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type"))
483  // But still disallow fontwork shapes.
484  bDisable = pAny->get<OUString>().startsWith("fontwork-");
485  }
486  }
487  }
488 
489  if (bDisable)
490  rSet.DisableItem(nWhich);
491  break;
492  }
493  case FN_REMOVE_TEXT_BOX:
494  {
495  bool bDisable = true;
497  {
498  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
499  // Allow removing a TextBox only in case it has one.
500  if (pFrameFormat && SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT))
501  bDisable = false;
502  }
503 
504  if (bDisable)
505  rSet.DisableItem(nWhich);
506  break;
507  }
508  }
509  nWhich = aIter.NextWhich();
510  }
511  svx::ExtrusionBar::getState( pSdrView, rSet );
512  svx::FontworkBar::getState( pSdrView, rSet );
513 }
514 
516  SwDrawBaseShell(_rView)
517 {
518  SetName("Draw");
519 
521 }
522 
523 // Edit SfxRequests for FontWork
524 
526 {
527  SwWrtShell &rSh = GetShell();
528  SdrView* pDrView = rSh.GetDrawView();
529  bool bChanged = pDrView->GetModel()->IsChanged();
530  pDrView->GetModel()->SetChanged(false);
531 
532  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
533 
534  if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() )
535  {
536  const SfxItemSet& rSet = *rReq.GetArgs();
537 
538  if ( pDrView->IsTextEdit() )
539  {
540  pDrView->SdrEndTextEdit( true );
541  GetView().AttrChangedNotify(nullptr);
542  }
543 
544  pDrView->SetAttributes(rSet);
545  }
546  if (pDrView->GetModel()->IsChanged())
547  rSh.SetModified();
548  else
549  if (bChanged)
550  pDrView->GetModel()->SetChanged();
551 }
552 
553 //Return status values for FontWork
554 
556 {
557  SwWrtShell &rSh = GetShell();
558  SdrView* pDrView = rSh.GetDrawView();
559  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
560  const SdrObject* pObj = nullptr;
561 
562  if ( rMarkList.GetMarkCount() == 1 )
563  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
564 
565  const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj);
566  const bool bDeactivate(
567  !pObj ||
568  !pTextObj ||
569  !pTextObj->HasText() ||
570  dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes
571 
572  if(bDeactivate)
573  {
585  }
586  else
587  {
588  pDrView->GetAttributes( rSet );
589  }
590 }
591 
592 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
constexpr TypedWhichId< XFormTextHideFormItem > XATTR_FORMTXTHIDEFORM(XATTR_TEXT_FIRST+10)
static void execute(SdrView &rSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
SwDrawShell(SwView &rView)
Definition: drawsh.cxx:515
FieldUnit
ErrCode GetGraphic(Graphic &) const
size_t GetMarkCount() const
bool IsClosedObj() const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
SwView & GetView()
Definition: basesh.hxx:57
#define SFX_IMPL_INTERFACE(Class, SuperClass)
SdrView * GetDrawView()
Definition: vnew.cxx:375
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
static void HandleOpenXmlFilterSettings(SfxRequest &)
static void destroy(SwFrameFormat *pShape)
Destroy a TextBox for a shape.
void MirrorSelection(bool bHorizontal)
Vertical if FALSE.
Definition: feshview.cxx:2493
constexpr TypedWhichId< XFormTextOutlineItem > XATTR_FORMTXTOUTLINE(XATTR_TEXT_FIRST+5)
SwWrtShell & GetShell()
Definition: basesh.cxx:2687
void FlipDrawRotate()
Definition: view.hxx:516
void SelectionToHeaven()
Above document.
Definition: feshview.cxx:1139
void SetWrapMode(sal_uInt16 nSlot)
Definition: basesh.cxx:1904
Check only parents.
sal_Int16 nId
sal_uInt16 FirstWhich()
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:234
void Done(bool bRemove=false)
SdrMark * GetMark(size_t nNum) const
void Execute(SfxRequest &)
Definition: drawsh.cxx:170
void SetModified()
Definition: edws.cxx:70
void SetFrameDragSingles(bool bOn=true)
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
OUString GetPath() const
static void execute(SdrView *pSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
virtual bool HasText() const override
constexpr TypedWhichId< XFormTextDistanceItem > XATTR_FORMTXTDISTANCE(XATTR_TEXT_FIRST+2)
sal_uInt16 NextWhich()
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
void ToggleChildWindow(sal_uInt16)
void InsertPictureFromFile(SdrObject &rObject)
Definition: drawsh.cxx:109
void UpdateWordCount(SfxShell *, sal_uInt16)
Definition: view1.cxx:203
#define FN_REMOVE_TEXT_BOX
Definition: cmdid.h:497
const SwView & GetView() const
Definition: wrtsh.hxx:428
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
void SetGraphic(const Graphic &rGrf)
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType)
Is the frame format a text box?
bool IsRotateAllowed(bool b90Deg=false) const
SwFrameFormat * FindFrameFormat(SdrObject *pObj)
The Get reverse way: seeks the format to the specified object.
Definition: dcontact.cxx:120
virtual void SetChanged(bool bFlg=true)
constexpr TypedWhichId< XFormTextStyleItem > XATTR_FORMTXTSTYLE(XATTR_TEXT_FIRST)
SfxItemPool & GetPool() const
void GetFormTextState(SfxItemSet &rSet)
Definition: drawsh.cxx:555
void SelectionToHell()
Below document.
Definition: feshview.cxx:1144
void ExecFormText(SfxRequest const &rReq)
Definition: drawsh.cxx:525
SdrObject * GetMarkedSdrObj() const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
static void create(SwFrameFormat *pShape, bool bCopyText=false)
Create a TextBox for a shape.
Style of a layout element.
Definition: frmfmt.hxx:58
#define FN_NUMBERING_OUTLINE_DLG
Definition: cmdid.h:489
#define SW_MOD()
Definition: swmodule.hxx:255
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:693
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
void GetState(SfxItemSet &)
Definition: drawsh.cxx:375
#define FN_ADD_TEXT_BOX
Definition: cmdid.h:496
size_t GetMarkedObjectCount() const
SfxBindings & GetBindings()
const SdrMarkList & GetMarkedObjectList() const
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
bool IsAsLink() const
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:223
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
void ExecFormatFootnote()
Definition: view0.cxx:660
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
bool IsDrawRotate() const
Definition: view.hxx:515
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:591
constexpr TypedWhichId< XFormTextShadowXValItem > XATTR_FORMTXTSHDWXVAL(XATTR_TEXT_FIRST+8)
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
constexpr TypedWhichId< XFormTextShadowItem > XATTR_FORMTXTSHADOW(XATTR_TEXT_FIRST+6)
void SetName(const OUString &rName)
constexpr TypedWhichId< XFormTextAdjustItem > XATTR_FORMTXTADJUST(XATTR_TEXT_FIRST+1)
SdrObject * IsSingleFillableNonOLESelected()
Definition: drawsh.cxx:73
#define FN_TOOL_HIERARCHIE
Definition: cmdid.h:224
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2596
bool Disable(SfxItemSet &rSet, sal_uInt16 nWhich=0)
Definition: drwbassh.cxx:810
void SetGraphicLink(const OUString &rFileName)
#define SFX_OBJECTBAR_OBJECT
bool IsChanged() const
#define FN_FRAME_WRAPTHRU_TRANSP
Definition: cmdid.h:402
sal_uInt16 Which() const
for Querying of Writer-functions.
Definition: format.hxx:78
SdrLayerID GetLayerId() const
1 Heaven, 0 Hell, SDRLAYER_NOTFOUND Ambiguous.
Definition: feshview.cxx:1076
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define FN_FRAME_WRAPTHRU
Definition: cmdid.h:328
sal_uInt16 GetSlot() const
static const OUString & GetContextName(const Context eContext)
constexpr TypedWhichId< XFormTextStartItem > XATTR_FORMTXTSTART(XATTR_TEXT_FIRST+3)
bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const
virtual bool IsTextEdit() const final override
void DisableItem(sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define ERRCODE_NONE
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:667
constexpr TypedWhichId< XFormTextShadowYValItem > XATTR_FORMTXTSHDWYVAL(XATTR_TEXT_FIRST+9)
SdrView * GetDrawViewWithValidMarkList()
Definition: vnew.cxx:380
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
size_t IsObjSelected() const
Definition: feshview.cxx:1149
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(157)
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
css::uno::Any * GetPropertyValueByName(const OUString &rPropName)
void SetDragMode(SdrDragMode eSdrDragMode)
Set DragMode (e.g. Rotate), but do nothing when frame is selected.
Definition: feshview.cxx:660
SdrPageView * GetSdrPageView() const
#define FN_FORMAT_FOOTNOTE_DLG
Definition: cmdid.h:323
const SfxItemPool & GetItemPool() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
constexpr TypedWhichId< XFormTextMirrorItem > XATTR_FORMTXTMIRROR(XATTR_TEXT_FIRST+4)
void Ignore()
SdrModel * GetModel() const
void SetContextName(const OUString &rsContextName)
void FlipDrawSelMode()
Definition: view.hxx:519
Definition: view.hxx:144
constexpr TypedWhichId< XFormTextShadowColorItem > XATTR_FORMTXTSHDWCOLOR(XATTR_TEXT_FIRST+7)