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 
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)
216  {
217  break;
218  }
219 
220  if (handle->GetKind() == SdrHdlKind::Anchor || handle->GetKind() == SdrHdlKind::Anchor_TR)
221  {
222  rSh.FindAnchorPos(mPoint, /*bMoveIt=*/true);
223  pSdrView->ModelHasChanged();
224  }
225  else
226  pSdrView->MoveShapeHandle(handleNum, mPoint, OrdNum ? OrdNum->GetValue() : -1);
227  }
228  }
229  break;
230  case SID_BEZIER_EDIT:
231  if (GetView().IsDrawRotate())
232  {
233  rSh.SetDragMode(SdrDragMode::Move);
235  }
237  pSdrView->SetFrameDragSingles(GetView().IsDrawSelMode());
238  GetView().AttrChangedNotify(nullptr); // Shell switch
239  break;
240 
241  case SID_OBJECT_HELL:
242  if (rSh.IsObjSelected())
243  {
244  rSh.StartUndo( SwUndoId::START );
246  rSh.SelectionToHell();
247  rSh.EndUndo( SwUndoId::END );
248  rBnd.Invalidate(SID_OBJECT_HEAVEN);
249  }
250  break;
251 
252  case SID_OBJECT_HEAVEN:
253  if (rSh.IsObjSelected())
254  {
255  rSh.StartUndo( SwUndoId::START );
257  rSh.SelectionToHeaven();
258  rSh.EndUndo( SwUndoId::END );
259  rBnd.Invalidate(SID_OBJECT_HELL);
260  }
261  break;
262 
263  case FN_TOOL_HIERARCHIE:
264  if (rSh.IsObjSelected())
265  {
266  rSh.StartUndo( SwUndoId::START );
267  if (rSh.GetLayerId() == SdrLayerID(0))
268  {
270  rSh.SelectionToHeaven();
271  }
272  else
273  {
275  rSh.SelectionToHell();
276  }
277  rSh.EndUndo( SwUndoId::END );
278  rBnd.Invalidate( SID_OBJECT_HELL );
279  rBnd.Invalidate( SID_OBJECT_HEAVEN );
280  }
281  break;
282 
283  case SID_FLIP_VERTICAL:
284  bMirror = false;
285  [[fallthrough]];
286  case SID_FLIP_HORIZONTAL:
287  rSh.MirrorSelection( bMirror );
288  break;
289 
290  case SID_FONTWORK:
291  {
292  FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr );
293  SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
294  SfxViewFrame* pVFrame = GetView().GetViewFrame();
295  if (pArgs)
296  {
297  pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
298  static_cast<const SfxBoolItem&>((pArgs->Get(SID_FONTWORK))).GetValue());
299  }
300  else
301  pVFrame->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() );
302  pVFrame->GetBindings().Invalidate(SID_FONTWORK);
303  }
304  break;
306  {
308  break;
309  }
311  {
313  rReq.Done();
314  }
315  break;
316  case SID_OPEN_XML_FILTERSETTINGS:
317  {
319  }
320  break;
321  case FN_WORDCOUNT_DIALOG:
322  {
323  GetView().UpdateWordCount(this, nSlotId);
324  }
325  break;
326  case SID_EXTRUSION_TOGGLE:
327  case SID_EXTRUSION_TILT_DOWN:
328  case SID_EXTRUSION_TILT_UP:
329  case SID_EXTRUSION_TILT_LEFT:
330  case SID_EXTRUSION_TILT_RIGHT:
331  case SID_EXTRUSION_3D_COLOR:
332  case SID_EXTRUSION_DEPTH:
333  case SID_EXTRUSION_DIRECTION:
334  case SID_EXTRUSION_PROJECTION:
335  case SID_EXTRUSION_LIGHTING_DIRECTION:
336  case SID_EXTRUSION_LIGHTING_INTENSITY:
337  case SID_EXTRUSION_SURFACE:
338  case SID_EXTRUSION_DEPTH_FLOATER:
339  case SID_EXTRUSION_DIRECTION_FLOATER:
340  case SID_EXTRUSION_LIGHTING_FLOATER:
341  case SID_EXTRUSION_SURFACE_FLOATER:
342  case SID_EXTRUSION_DEPTH_DIALOG:
343  svx::ExtrusionBar::execute( pSdrView, rReq, rBnd );
344  rReq.Ignore ();
345  break;
346 
347  case SID_FONTWORK_SHAPE:
348  case SID_FONTWORK_SHAPE_TYPE:
349  case SID_FONTWORK_ALIGNMENT:
350  case SID_FONTWORK_SAME_LETTER_HEIGHTS:
351  case SID_FONTWORK_CHARACTER_SPACING:
352  case SID_FONTWORK_KERN_CHARACTER_PAIRS:
353  case SID_FONTWORK_CHARACTER_SPACING_FLOATER:
354  case SID_FONTWORK_ALIGNMENT_FLOATER:
355  case SID_FONTWORK_CHARACTER_SPACING_DIALOG:
356  svx::FontworkBar::execute(*pSdrView, rReq, rBnd);
357  rReq.Ignore ();
358  break;
359 
360  case SID_INSERT_GRAPHIC:
361  {
362  // #i123922# check if we can do something
364 
365  if(pObj)
366  {
367  // ...and if yes, do something
368  InsertPictureFromFile(*pObj);
369  }
370 
371  break;
372  }
373 
374  case FN_ADD_TEXT_BOX:
375  {
377  {
378  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
379  if (pFrameFormat)
380  SwTextBoxHelper::create(pFrameFormat, pObj, pObj->HasText());
381  }
382  break;
383  }
384  case FN_REMOVE_TEXT_BOX:
385  {
387  {
388  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
389  if (pFrameFormat)
390  SwTextBoxHelper::destroy(pFrameFormat, pObj);
391  }
392  break;
393  }
394  default:
395  OSL_ENSURE(false, "wrong dispatcher");
396  return;
397  }
398  if (pSdrView->GetModel()->IsChanged())
399  rSh.SetModified();
400  else if (bChanged)
401  pSdrView->GetModel()->SetChanged();
402 }
403 
405 {
406  SwWrtShell &rSh = GetShell();
407  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
408  SfxWhichIter aIter( rSet );
409  sal_uInt16 nWhich = aIter.FirstWhich();
411 
412  if (!bProtected) // Check the parent
414 
415  while( nWhich )
416  {
417  switch( nWhich )
418  {
419  case SID_OBJECT_HELL:
420  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(0) || bProtected )
421  rSet.DisableItem( nWhich );
422  break;
423 
424  case SID_OBJECT_HEAVEN:
425  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(1) || bProtected )
426  rSet.DisableItem( nWhich );
427  break;
428 
429  case FN_TOOL_HIERARCHIE:
430  if ( !rSh.IsObjSelected() || bProtected )
431  rSet.DisableItem( nWhich );
432  break;
433 
434  case SID_OBJECT_ROTATE:
435  {
436  const bool bIsRotate = GetView().IsDrawRotate();
437  if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
438  rSet.DisableItem( nWhich );
439  else
440  rSet.Put( SfxBoolItem( nWhich, bIsRotate ) );
441  }
442  break;
443 
444  case SID_BEZIER_EDIT:
445  if (!Disable(rSet, nWhich))
446  rSet.Put( SfxBoolItem( nWhich, !GetView().IsDrawSelMode()));
447  break;
448 
449  case SID_FLIP_VERTICAL:
450  if ( !pSdrView->IsMirrorAllowed() || bProtected )
451  {
452  rSet.DisableItem( nWhich );
453  }
454  else
455  {
456  // TTTT - needs to be adapted in aw080:
457  // state is not kept for drawing objects --> provide not flipped state
458  rSet.Put( SfxBoolItem( nWhich, false ) );
459  }
460  break;
461 
462  case SID_FLIP_HORIZONTAL:
463  if ( !pSdrView->IsMirrorAllowed() || bProtected )
464  {
465  rSet.DisableItem( nWhich );
466  }
467  else
468  {
469  // TTTT - needs to be adapted in aw080:
470  // state is not kept for drawing objects --> provide not flipped state
471  rSet.Put( SfxBoolItem( nWhich, false ) );
472  }
473  break;
474 
475  case SID_FONTWORK:
476  {
477  if (bProtected)
478  rSet.DisableItem( nWhich );
479  else
480  {
481  const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
482  rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
483  }
484  }
485  break;
486 
487  case SID_INSERT_GRAPHIC:
488  {
489  // #i123922# check if we can do something
491 
492  if(!pObj)
493  {
494  rSet.DisableItem(nWhich);
495  }
496 
497  break;
498  }
499  case FN_ADD_TEXT_BOX:
500  {
501  bool bDisable = true;
503  {
504  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
505  // Allow creating a TextBox only in case this is a draw format without a TextBox so far.
506  if (pFrameFormat && pFrameFormat->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT, pObj))
507  {
508  if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pObj) )
509  {
510  const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
511  if (const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type"))
512  // But still disallow fontwork shapes.
513  bDisable = pAny->get<OUString>().startsWith("fontwork-");
514  }
515  }
516  }
517 
518  if (bDisable)
519  rSet.DisableItem(nWhich);
520  break;
521  }
522  case FN_REMOVE_TEXT_BOX:
523  {
524  bool bDisable = true;
526  {
527  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
528  // Allow removing a TextBox only in case it has one.
529  if (pFrameFormat && SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT, pObj))
530  bDisable = false;
531  }
532 
533  if (bDisable)
534  rSet.DisableItem(nWhich);
535  break;
536  }
537  }
538  nWhich = aIter.NextWhich();
539  }
540  svx::ExtrusionBar::getState( pSdrView, rSet );
541  svx::FontworkBar::getState( pSdrView, rSet );
542 }
543 
545  SwDrawBaseShell(_rView)
546 {
547  SetName("Draw");
548 
550 
551  SwWrtShell &rSh = GetShell();
552  SdrView* pDrView = rSh.GetDrawView();
553 
554  if (pDrView && svx::checkForSelectedFontWork(pDrView))
556 
558 }
559 
560 // Edit SfxRequests for FontWork
561 
563 {
564  SwWrtShell &rSh = GetShell();
565  SdrView* pDrView = rSh.GetDrawView();
566  bool bChanged = pDrView->GetModel()->IsChanged();
567  pDrView->GetModel()->SetChanged(false);
568 
569  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
570 
571  if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() )
572  {
573  const SfxItemSet& rSet = *rReq.GetArgs();
574 
575  if ( pDrView->IsTextEdit() )
576  {
577  pDrView->SdrEndTextEdit( true );
578  GetView().AttrChangedNotify(nullptr);
579  }
580 
581  pDrView->SetAttributes(rSet);
582  }
583  if (pDrView->GetModel()->IsChanged())
584  rSh.SetModified();
585  else
586  if (bChanged)
587  pDrView->GetModel()->SetChanged();
588 }
589 
590 //Return status values for FontWork
591 
593 {
594  SwWrtShell &rSh = GetShell();
595  SdrView* pDrView = rSh.GetDrawView();
596  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
597  const SdrObject* pObj = nullptr;
598 
599  if ( rMarkList.GetMarkCount() == 1 )
600  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
601 
602  const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj);
603  const bool bDeactivate(
604  !pObj ||
605  !pTextObj ||
606  !pTextObj->HasText() ||
607  dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes
608 
609  if(bDeactivate)
610  {
622  }
623  else
624  {
625  pDrView->GetAttributes( rSet );
626  }
627 }
628 
629 /* 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:544
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:2602
constexpr TypedWhichId< XFormTextOutlineItem > XATTR_FORMTXTOUTLINE(XATTR_TEXT_FIRST+5)
SwWrtShell & GetShell()
Definition: basesh.cxx:2820
void FlipDrawRotate()
Definition: view.hxx:530
void SelectionToHeaven()
Above document.
Definition: feshview.cxx:1236
void SetWrapMode(sal_uInt16 nSlot)
Definition: basesh.cxx:2021
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:96
void ToggleChildWindow(sal_uInt16)
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:164
void InsertPictureFromFile(SdrObject &rObject)
Definition: drawsh.cxx:110
void UpdateWordCount(SfxShell *, sal_uInt16)
Definition: view1.cxx:202
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint, const sal_Int32 aObjectOrdNum=-1)
#define FN_REMOVE_TEXT_BOX
Definition: cmdid.h:509
const SwView & GetView() const
Definition: wrtsh.hxx:437
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
void SetGraphic(const Graphic &rGrf)
bool checkForSelectedFontWork(SdrView const *pSdrView)
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
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:121
virtual void SetChanged(bool bFlg=true)
constexpr TypedWhichId< XFormTextStyleItem > XATTR_FORMTXTSTYLE(XATTR_TEXT_FIRST)
SfxItemPool & GetPool() const
void GetFormTextState(SfxItemSet &rSet)
Definition: drawsh.cxx:592
void SelectionToHell()
Below document.
Definition: feshview.cxx:1241
void ExecFormText(SfxRequest const &rReq)
Definition: drawsh.cxx:562
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:501
#define SW_MOD()
Definition: swmodule.hxx:255
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:755
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
void GetState(SfxItemSet &)
Definition: drawsh.cxx:404
#define FN_ADD_TEXT_BOX
Definition: cmdid.h:508
size_t GetMarkedObjectCount() const
static void execute(SdrView &rSdrView, SfxRequest const &rReq, SfxBindings &rBindings)
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:679
bool IsDrawRotate() const
Definition: view.hxx:529
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:605
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:238
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2705
bool Disable(SfxItemSet &rSet, sal_uInt16 nWhich=0)
Definition: drwbassh.cxx:975
void SetGraphicLink(const OUString &rFileName)
#define SFX_OBJECTBAR_OBJECT
bool IsChanged() const
#define FN_FRAME_WRAPTHRU_TRANSP
Definition: cmdid.h:414
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:1170
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SdrHdl * GetHdl(size_t nNum) const
#define FN_FRAME_WRAPTHRU
Definition: cmdid.h:342
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:686
constexpr TypedWhichId< XFormTextShadowYValItem > XATTR_FORMTXTSHDWYVAL(XATTR_TEXT_FIRST+9)
SdrView * GetDrawViewWithValidMarkList()
Definition: vnew.cxx:378
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
static void destroy(const SwFrameFormat *pShape, const SdrObject *pObject)
Destroy a TextBox for a shape.
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
size_t IsObjSelected() const
Definition: feshview.cxx:1246
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:667
SdrPageView * GetSdrPageView() const
#define FN_FORMAT_FOOTNOTE_DLG
Definition: cmdid.h:337
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