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 #include <osl/diagnose.h>
46 
47 #include <swundo.hxx>
48 #include <wrtsh.hxx>
49 #include <cmdid.h>
50 #include <strings.hrc>
51 #include <drwbassh.hxx>
52 #include <drawsh.hxx>
53 
54 #define ShellClass_SwDrawShell
55 #include <sfx2/msg.hxx>
56 #include <swslots.hxx>
57 
58 using namespace ::com::sun::star;
59 using namespace ::com::sun::star::uno;
60 
62 
63 void SwDrawShell::InitInterface_Impl()
64 {
65  GetStaticInterface()->RegisterPopupMenu("draw");
66 
67  GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Draw_Toolbox_Sw);
68 
69  GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
70 }
71 
72 
73 // #i123922# check as the name implies
75 {
76  SwWrtShell &rSh = GetShell();
77  SdrView* pSdrView = rSh.GetDrawView();
78 
79  if(!pSdrView)
80  {
81  return nullptr;
82  }
83 
84  if(1 != pSdrView->GetMarkedObjectCount())
85  {
86  return nullptr;
87  }
88 
89  SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0);
90 
91  if(!pPickObj)
92  {
93  return nullptr;
94  }
95 
96  if(!pPickObj->IsClosedObj())
97  {
98  return nullptr;
99  }
100 
101  if(dynamic_cast< SdrOle2Obj* >(pPickObj))
102  {
103  return nullptr;
104  }
105 
106  return pPickObj;
107 }
108 
109 // #i123922# insert given graphic data dependent of the object type in focus
111 {
112  SwWrtShell &rSh = GetShell();
113  SdrView* pSdrView = rSh.GetDrawView();
114 
115  if(!pSdrView)
116  return;
117 
118  SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), GetView().GetFrameWeld());
119 
120  if (ERRCODE_NONE != aDlg.Execute())
121  return;
122 
123  Graphic aGraphic;
124  ErrCode nError = aDlg.GetGraphic(aGraphic);
125 
126  if(ERRCODE_NONE != nError)
127  return;
128 
129  const bool bAsLink(aDlg.IsAsLink());
130  SdrObject* pResult = &rObject;
131 
133 
134  if (SdrGrafObj* pSdrGrafObj = dynamic_cast<SdrGrafObj*>(&rObject))
135  {
136  SdrGrafObj* pNewGrafObj(pSdrGrafObj->CloneSdrObject(pSdrGrafObj->getSdrModelFromSdrObject()));
137 
138  pNewGrafObj->SetGraphic(aGraphic);
139 
140  // #i123922# for handling MasterObject and virtual ones correctly, SW
141  // wants us to call ReplaceObject at the page, but that also
142  // triggers the same assertion (I tried it), so stay at the view method
143  pSdrView->ReplaceObjectAtView(&rObject, *pSdrView->GetSdrPageView(), pNewGrafObj);
144 
145  // set in all cases - the Clone() will have copied an existing link (!)
146  pNewGrafObj->SetGraphicLink(
147  bAsLink ? aDlg.GetPath() : OUString());
148 
149  pResult = pNewGrafObj;
150  }
151  else // if(rObject.IsClosedObj() && !dynamic_cast< SdrOle2Obj* >(&rObject))
152  {
153  pSdrView->AddUndo(std::make_unique<SdrUndoAttrObj>(rObject));
154 
155  SfxItemSet aSet(pSdrView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>);
156 
157  aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
158  aSet.Put(XFillBitmapItem(OUString(), aGraphic));
159  rObject.SetMergedItemSetAndBroadcast(aSet);
160  }
161 
162  rSh.EndUndo( SwUndoId::END );
163 
164  if(pResult)
165  {
166  // we are done; mark the modified/new object
167  pSdrView->MarkObj(pResult, pSdrView->GetSdrPageView());
168  }
169 }
170 
172 {
173  SwWrtShell &rSh = GetShell();
174  SdrView *pSdrView = rSh.GetDrawView();
175  const SfxItemSet *pArgs = rReq.GetArgs();
177  sal_uInt16 nSlotId = rReq.GetSlot();
178  bool bChanged = pSdrView->GetModel()->IsChanged();
179 
180  pSdrView->GetModel()->SetChanged(false);
181 
182  const SfxPoolItem* pItem;
183  if(pArgs)
184  pArgs->GetItemState(nSlotId, false, &pItem);
185 
186  bool bMirror = true;
187 
188  switch (nSlotId)
189  {
190  case SID_OBJECT_ROTATE:
191  if (rSh.IsObjSelected() && pSdrView->IsRotateAllowed())
192  {
193  if (GetView().IsDrawRotate())
194  rSh.SetDragMode(SdrDragMode::Move);
195  else
196  rSh.SetDragMode(SdrDragMode::Rotate);
197 
199  }
200  break;
201  case SID_MOVE_SHAPE_HANDLE:
202  {
203  if (pArgs && pArgs->Count() >= 3)
204  {
205  const SfxUInt32Item* handleNumItem = rReq.GetArg<SfxUInt32Item>(FN_PARAM_1);
206  const SfxUInt32Item* newPosXTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_2);
207  const SfxUInt32Item* newPosYTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_3);
208  const SfxInt32Item* OrdNum = rReq.GetArg<SfxInt32Item>(FN_PARAM_4);
209 
210  const sal_uLong handleNum = handleNumItem->GetValue();
211  const sal_uLong newPosX = newPosXTwips->GetValue();
212  const sal_uLong newPosY = newPosYTwips->GetValue();
213  const Point mPoint(newPosX, newPosY);
214  const SdrHdl* handle = pSdrView->GetHdlList().GetHdl(handleNum);
215  if (handle->GetKind() == SdrHdlKind::Anchor || handle->GetKind() == SdrHdlKind::Anchor_TR)
216  {
217  rSh.FindAnchorPos(mPoint, /*bMoveIt=*/true);
218  pSdrView->ModelHasChanged();
219  }
220  else
221  pSdrView->MoveShapeHandle(handleNum, mPoint, OrdNum ? OrdNum->GetValue() : -1);
222  }
223  }
224  break;
225  case SID_BEZIER_EDIT:
226  if (GetView().IsDrawRotate())
227  {
228  rSh.SetDragMode(SdrDragMode::Move);
230  }
232  pSdrView->SetFrameDragSingles(GetView().IsDrawSelMode());
233  GetView().AttrChangedNotify(nullptr); // Shell switch
234  break;
235 
236  case SID_OBJECT_HELL:
237  if (rSh.IsObjSelected())
238  {
239  rSh.StartUndo( SwUndoId::START );
241  rSh.SelectionToHell();
242  rSh.EndUndo( SwUndoId::END );
243  rBnd.Invalidate(SID_OBJECT_HEAVEN);
244  }
245  break;
246 
247  case SID_OBJECT_HEAVEN:
248  if (rSh.IsObjSelected())
249  {
250  rSh.StartUndo( SwUndoId::START );
252  rSh.SelectionToHeaven();
253  rSh.EndUndo( SwUndoId::END );
254  rBnd.Invalidate(SID_OBJECT_HELL);
255  }
256  break;
257 
258  case FN_TOOL_HIERARCHIE:
259  if (rSh.IsObjSelected())
260  {
261  rSh.StartUndo( SwUndoId::START );
262  if (rSh.GetLayerId() == SdrLayerID(0))
263  {
265  rSh.SelectionToHeaven();
266  }
267  else
268  {
270  rSh.SelectionToHell();
271  }
272  rSh.EndUndo( SwUndoId::END );
273  rBnd.Invalidate( SID_OBJECT_HELL );
274  rBnd.Invalidate( SID_OBJECT_HEAVEN );
275  }
276  break;
277 
278  case SID_FLIP_VERTICAL:
279  bMirror = false;
280  [[fallthrough]];
281  case SID_FLIP_HORIZONTAL:
282  rSh.MirrorSelection( bMirror );
283  break;
284 
285  case SID_FONTWORK:
286  {
287  FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr );
288  SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
289  SfxViewFrame* pVFrame = GetView().GetViewFrame();
290  if (pArgs)
291  {
292  pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
293  static_cast<const SfxBoolItem&>((pArgs->Get(SID_FONTWORK))).GetValue());
294  }
295  else
296  pVFrame->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() );
297  pVFrame->GetBindings().Invalidate(SID_FONTWORK);
298  }
299  break;
301  {
303  break;
304  }
306  {
308  rReq.Done();
309  }
310  break;
311  case SID_OPEN_XML_FILTERSETTINGS:
312  {
314  }
315  break;
316  case FN_WORDCOUNT_DIALOG:
317  {
318  GetView().UpdateWordCount(this, nSlotId);
319  }
320  break;
321  case SID_EXTRUSION_TOGGLE:
322  case SID_EXTRUSION_TILT_DOWN:
323  case SID_EXTRUSION_TILT_UP:
324  case SID_EXTRUSION_TILT_LEFT:
325  case SID_EXTRUSION_TILT_RIGHT:
326  case SID_EXTRUSION_3D_COLOR:
327  case SID_EXTRUSION_DEPTH:
328  case SID_EXTRUSION_DIRECTION:
329  case SID_EXTRUSION_PROJECTION:
330  case SID_EXTRUSION_LIGHTING_DIRECTION:
331  case SID_EXTRUSION_LIGHTING_INTENSITY:
332  case SID_EXTRUSION_SURFACE:
333  case SID_EXTRUSION_DEPTH_FLOATER:
334  case SID_EXTRUSION_DIRECTION_FLOATER:
335  case SID_EXTRUSION_LIGHTING_FLOATER:
336  case SID_EXTRUSION_SURFACE_FLOATER:
337  case SID_EXTRUSION_DEPTH_DIALOG:
338  svx::ExtrusionBar::execute( pSdrView, rReq, rBnd );
339  rReq.Ignore ();
340  break;
341 
342  case SID_FONTWORK_SHAPE:
343  case SID_FONTWORK_SHAPE_TYPE:
344  case SID_FONTWORK_ALIGNMENT:
345  case SID_FONTWORK_SAME_LETTER_HEIGHTS:
346  case SID_FONTWORK_CHARACTER_SPACING:
347  case SID_FONTWORK_KERN_CHARACTER_PAIRS:
348  case SID_FONTWORK_CHARACTER_SPACING_FLOATER:
349  case SID_FONTWORK_ALIGNMENT_FLOATER:
350  case SID_FONTWORK_CHARACTER_SPACING_DIALOG:
351  svx::FontworkBar::execute(*pSdrView, rReq, rBnd);
352  rReq.Ignore ();
353  break;
354 
355  case SID_INSERT_GRAPHIC:
356  {
357  // #i123922# check if we can do something
359 
360  if(pObj)
361  {
362  // ...and if yes, do something
363  InsertPictureFromFile(*pObj);
364  }
365 
366  break;
367  }
368 
369  case FN_ADD_TEXT_BOX:
370  {
372  {
373  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
374  if (pFrameFormat)
375  SwTextBoxHelper::create(pFrameFormat, pObj, pObj->HasText());
376  }
377  break;
378  }
379  case FN_REMOVE_TEXT_BOX:
380  {
382  {
383  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
384  if (pFrameFormat)
385  SwTextBoxHelper::destroy(pFrameFormat, pObj);
386  }
387  break;
388  }
389  default:
390  OSL_ENSURE(false, "wrong dispatcher");
391  return;
392  }
393  if (pSdrView->GetModel()->IsChanged())
394  rSh.SetModified();
395  else if (bChanged)
396  pSdrView->GetModel()->SetChanged();
397 }
398 
400 {
401  SwWrtShell &rSh = GetShell();
402  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
403  SfxWhichIter aIter( rSet );
404  sal_uInt16 nWhich = aIter.FirstWhich();
406 
407  if (!bProtected) // Check the parent
409 
410  while( nWhich )
411  {
412  switch( nWhich )
413  {
414  case SID_OBJECT_HELL:
415  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(0) || bProtected )
416  rSet.DisableItem( nWhich );
417  break;
418 
419  case SID_OBJECT_HEAVEN:
420  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(1) || bProtected )
421  rSet.DisableItem( nWhich );
422  break;
423 
424  case FN_TOOL_HIERARCHIE:
425  if ( !rSh.IsObjSelected() || bProtected )
426  rSet.DisableItem( nWhich );
427  break;
428 
429  case SID_OBJECT_ROTATE:
430  {
431  const bool bIsRotate = GetView().IsDrawRotate();
432  if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
433  rSet.DisableItem( nWhich );
434  else
435  rSet.Put( SfxBoolItem( nWhich, bIsRotate ) );
436  }
437  break;
438 
439  case SID_BEZIER_EDIT:
440  if (!Disable(rSet, nWhich))
441  rSet.Put( SfxBoolItem( nWhich, !GetView().IsDrawSelMode()));
442  break;
443 
444  case SID_FLIP_VERTICAL:
445  if ( !pSdrView->IsMirrorAllowed() || bProtected )
446  {
447  rSet.DisableItem( nWhich );
448  }
449  else
450  {
451  // TTTT - needs to be adapted in aw080:
452  // state is not kept for drawing objects --> provide not flipped state
453  rSet.Put( SfxBoolItem( nWhich, false ) );
454  }
455  break;
456 
457  case SID_FLIP_HORIZONTAL:
458  if ( !pSdrView->IsMirrorAllowed() || bProtected )
459  {
460  rSet.DisableItem( nWhich );
461  }
462  else
463  {
464  // TTTT - needs to be adapted in aw080:
465  // state is not kept for drawing objects --> provide not flipped state
466  rSet.Put( SfxBoolItem( nWhich, false ) );
467  }
468  break;
469 
470  case SID_FONTWORK:
471  {
472  if (bProtected)
473  rSet.DisableItem( nWhich );
474  else
475  {
476  const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
477  rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
478  }
479  }
480  break;
481 
482  case SID_INSERT_GRAPHIC:
483  {
484  // #i123922# check if we can do something
486 
487  if(!pObj)
488  {
489  rSet.DisableItem(nWhich);
490  }
491 
492  break;
493  }
494  case FN_ADD_TEXT_BOX:
495  {
496  bool bDisable = true;
498  {
499  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
500  // Allow creating a TextBox only in case this is a draw format without a TextBox so far.
501  if (pFrameFormat && pFrameFormat->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT, pObj))
502  {
503  if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pObj) )
504  {
505  const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
506  if (const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type"))
507  // But still disallow fontwork shapes.
508  bDisable = pAny->get<OUString>().startsWith("fontwork-");
509  }
510  }
511  }
512 
513  if (bDisable)
514  rSet.DisableItem(nWhich);
515  break;
516  }
517  case FN_REMOVE_TEXT_BOX:
518  {
519  bool bDisable = true;
521  {
522  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
523  // Allow removing a TextBox only in case it has one.
524  if (pFrameFormat && SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT, pObj))
525  bDisable = false;
526  }
527 
528  if (bDisable)
529  rSet.DisableItem(nWhich);
530  break;
531  }
532  }
533  nWhich = aIter.NextWhich();
534  }
535  svx::ExtrusionBar::getState( pSdrView, rSet );
536  svx::FontworkBar::getState( pSdrView, rSet );
537 }
538 
540  SwDrawBaseShell(_rView)
541 {
542  SetName("Draw");
543 
545 
546  SwWrtShell &rSh = GetShell();
547  SdrView* pDrView = rSh.GetDrawView();
548 
549  if (pDrView && svx::checkForSelectedFontWork(pDrView))
551 
553 }
554 
555 // Edit SfxRequests for FontWork
556 
558 {
559  SwWrtShell &rSh = GetShell();
560  SdrView* pDrView = rSh.GetDrawView();
561  bool bChanged = pDrView->GetModel()->IsChanged();
562  pDrView->GetModel()->SetChanged(false);
563 
564  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
565 
566  if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() )
567  {
568  const SfxItemSet& rSet = *rReq.GetArgs();
569 
570  if ( pDrView->IsTextEdit() )
571  {
572  pDrView->SdrEndTextEdit( true );
573  GetView().AttrChangedNotify(nullptr);
574  }
575 
576  pDrView->SetAttributes(rSet);
577  }
578  if (pDrView->GetModel()->IsChanged())
579  rSh.SetModified();
580  else
581  if (bChanged)
582  pDrView->GetModel()->SetChanged();
583 }
584 
585 //Return status values for FontWork
586 
588 {
589  SwWrtShell &rSh = GetShell();
590  SdrView* pDrView = rSh.GetDrawView();
591  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
592  const SdrObject* pObj = nullptr;
593 
594  if ( rMarkList.GetMarkCount() == 1 )
595  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
596 
597  const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj);
598  const bool bDeactivate(
599  !pObj ||
600  !pTextObj ||
601  !pTextObj->HasText() ||
602  dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes
603 
604  if(bDeactivate)
605  {
617  }
618  else
619  {
620  pDrView->GetAttributes( rSet );
621  }
622 }
623 
624 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
constexpr TypedWhichId< XFormTextHideFormItem > XATTR_FORMTXTHIDEFORM(XATTR_TEXT_FIRST+10)
virtual void ModelHasChanged() override
SwDrawShell(SwView &rView)
Definition: drawsh.cxx:539
FieldUnit
ErrCode GetGraphic(Graphic &) const
size_t GetMarkCount() const
bool IsClosedObj() const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
SwView & GetView()
Definition: basesh.hxx:59
#define SFX_IMPL_INTERFACE(Class, SuperClass)
SdrView * GetDrawView()
Definition: vnew.cxx:373
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
static void HandleOpenXmlFilterSettings(SfxRequest &)
void MirrorSelection(bool bHorizontal)
Vertical if FALSE.
Definition: feshview.cxx:2580
constexpr TypedWhichId< XFormTextOutlineItem > XATTR_FORMTXTOUTLINE(XATTR_TEXT_FIRST+5)
SwWrtShell & GetShell()
Definition: basesh.cxx:2774
void FlipDrawRotate()
Definition: view.hxx:530
void SelectionToHeaven()
Above document.
Definition: feshview.cxx:1230
void SetWrapMode(sal_uInt16 nSlot)
Definition: basesh.cxx:1991
sal_uIntPtr sal_uLong
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:171
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:93
void ToggleChildWindow(sal_uInt16)
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
void InsertPictureFromFile(SdrObject &rObject)
Definition: drawsh.cxx:110
void UpdateWordCount(SfxShell *, sal_uInt16)
Definition: view1.cxx:203
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint, const sal_Int32 aObjectOrdNum=-1)
#define FN_REMOVE_TEXT_BOX
Definition: cmdid.h:497
const SwView & GetView() const
Definition: wrtsh.hxx:431
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
void SetGraphic(const Graphic &rGrf)
bool checkForSelectedFontWork(SdrView const *pSdrView)
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:587
void SelectionToHell()
Below document.
Definition: feshview.cxx:1235
void ExecFormText(SfxRequest const &rReq)
Definition: drawsh.cxx:557
SdrObject * GetMarkedSdrObj() const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
Style of a layout element.
Definition: frmfmt.hxx:59
#define FN_NUMBERING_OUTLINE_DLG
Definition: cmdid.h:489
#define SW_MOD()
Definition: swmodule.hxx:256
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:766
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
void GetState(SfxItemSet &)
Definition: drawsh.cxx:399
#define FN_ADD_TEXT_BOX
Definition: cmdid.h:496
size_t GetMarkedObjectCount() const
static void execute(SdrView &rSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
static void destroy(SwFrameFormat *pShape, SdrObject *pObject)
Destroy a TextBox for a shape.
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, SdrObject *pObject=nullptr)
Is the frame format a text box?
SfxBindings & GetBindings()
const SdrMarkList & GetMarkedObjectList() const
sal_uInt16 Count() const
const T * GetArg(sal_uInt16 nSlotId) 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:677
bool IsDrawRotate() const
Definition: view.hxx:529
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:593
constexpr TypedWhichId< XFormTextShadowXValItem > XATTR_FORMTXTSHDWXVAL(XATTR_TEXT_FIRST+8)
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:74
#define FN_TOOL_HIERARCHIE
Definition: cmdid.h:226
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2683
bool Disable(SfxItemSet &rSet, sal_uInt16 nWhich=0)
Definition: drwbassh.cxx:924
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:82
SdrLayerID GetLayerId() const
1 Heaven, 0 Hell, SDRLAYER_NOTFOUND Ambiguous.
Definition: feshview.cxx:1164
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SdrHdl * GetHdl(size_t nNum) const
#define FN_FRAME_WRAPTHRU
Definition: cmdid.h:330
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:684
constexpr TypedWhichId< XFormTextShadowYValItem > XATTR_FORMTXTSHDWYVAL(XATTR_TEXT_FIRST+9)
SdrView * GetDrawViewWithValidMarkList()
Definition: vnew.cxx:378
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:1240
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:661
SdrPageView * GetSdrPageView() const
#define FN_FORMAT_FOOTNOTE_DLG
Definition: cmdid.h:325
sal_uInt32 GetValue() const
const SfxItemPool & GetItemPool() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
const SdrHdlList & GetHdlList() const
constexpr TypedWhichId< XFormTextMirrorItem > XATTR_FORMTXTMIRROR(XATTR_TEXT_FIRST+4)
static void create(SwFrameFormat *pShape, SdrObject *pObject, bool bCopyText=false)
Create a TextBox for a shape.
void Ignore()
SdrModel * GetModel() const
void SetContextName(const OUString &rsContextName)
void FlipDrawSelMode()
Definition: view.hxx:533
Definition: view.hxx:144
SdrHdlKind GetKind() const
constexpr TypedWhichId< XFormTextShadowColorItem > XATTR_FORMTXTSHDWCOLOR(XATTR_TEXT_FIRST+7)
Point FindAnchorPos(const Point &rAbsPos, bool bMoveIt=false)
Definition: fefly1.cxx:421