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 
209  const sal_uLong handleNum = handleNumItem->GetValue();
210  const sal_uLong newPosX = newPosXTwips->GetValue();
211  const sal_uLong newPosY = newPosYTwips->GetValue();
212  pSdrView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
213  }
214  }
215  break;
216  case SID_BEZIER_EDIT:
217  if (GetView().IsDrawRotate())
218  {
219  rSh.SetDragMode(SdrDragMode::Move);
221  }
223  pSdrView->SetFrameDragSingles(GetView().IsDrawSelMode());
224  GetView().AttrChangedNotify(nullptr); // Shell switch
225  break;
226 
227  case SID_OBJECT_HELL:
228  if (rSh.IsObjSelected())
229  {
230  rSh.StartUndo( SwUndoId::START );
232  rSh.SelectionToHell();
233  rSh.EndUndo( SwUndoId::END );
234  rBnd.Invalidate(SID_OBJECT_HEAVEN);
235  }
236  break;
237 
238  case SID_OBJECT_HEAVEN:
239  if (rSh.IsObjSelected())
240  {
241  rSh.StartUndo( SwUndoId::START );
243  rSh.SelectionToHeaven();
244  rSh.EndUndo( SwUndoId::END );
245  rBnd.Invalidate(SID_OBJECT_HELL);
246  }
247  break;
248 
249  case FN_TOOL_HIERARCHIE:
250  if (rSh.IsObjSelected())
251  {
252  rSh.StartUndo( SwUndoId::START );
253  if (rSh.GetLayerId() == SdrLayerID(0))
254  {
256  rSh.SelectionToHeaven();
257  }
258  else
259  {
261  rSh.SelectionToHell();
262  }
263  rSh.EndUndo( SwUndoId::END );
264  rBnd.Invalidate( SID_OBJECT_HELL );
265  rBnd.Invalidate( SID_OBJECT_HEAVEN );
266  }
267  break;
268 
269  case SID_FLIP_VERTICAL:
270  bMirror = false;
271  [[fallthrough]];
272  case SID_FLIP_HORIZONTAL:
273  rSh.MirrorSelection( bMirror );
274  break;
275 
276  case SID_FONTWORK:
277  {
278  FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>( &rSh.GetView()) != nullptr );
279  SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
280  SfxViewFrame* pVFrame = GetView().GetViewFrame();
281  if (pArgs)
282  {
283  pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
284  static_cast<const SfxBoolItem&>((pArgs->Get(SID_FONTWORK))).GetValue());
285  }
286  else
287  pVFrame->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() );
288  pVFrame->GetBindings().Invalidate(SID_FONTWORK);
289  }
290  break;
292  {
294  break;
295  }
297  {
299  rReq.Done();
300  }
301  break;
302  case SID_OPEN_XML_FILTERSETTINGS:
303  {
305  }
306  break;
307  case FN_WORDCOUNT_DIALOG:
308  {
309  GetView().UpdateWordCount(this, nSlotId);
310  }
311  break;
312  case SID_EXTRUSION_TOGGLE:
313  case SID_EXTRUSION_TILT_DOWN:
314  case SID_EXTRUSION_TILT_UP:
315  case SID_EXTRUSION_TILT_LEFT:
316  case SID_EXTRUSION_TILT_RIGHT:
317  case SID_EXTRUSION_3D_COLOR:
318  case SID_EXTRUSION_DEPTH:
319  case SID_EXTRUSION_DIRECTION:
320  case SID_EXTRUSION_PROJECTION:
321  case SID_EXTRUSION_LIGHTING_DIRECTION:
322  case SID_EXTRUSION_LIGHTING_INTENSITY:
323  case SID_EXTRUSION_SURFACE:
324  case SID_EXTRUSION_DEPTH_FLOATER:
325  case SID_EXTRUSION_DIRECTION_FLOATER:
326  case SID_EXTRUSION_LIGHTING_FLOATER:
327  case SID_EXTRUSION_SURFACE_FLOATER:
328  case SID_EXTRUSION_DEPTH_DIALOG:
329  svx::ExtrusionBar::execute( pSdrView, rReq, rBnd );
330  rReq.Ignore ();
331  break;
332 
333  case SID_FONTWORK_SHAPE:
334  case SID_FONTWORK_SHAPE_TYPE:
335  case SID_FONTWORK_ALIGNMENT:
336  case SID_FONTWORK_SAME_LETTER_HEIGHTS:
337  case SID_FONTWORK_CHARACTER_SPACING:
338  case SID_FONTWORK_KERN_CHARACTER_PAIRS:
339  case SID_FONTWORK_CHARACTER_SPACING_FLOATER:
340  case SID_FONTWORK_ALIGNMENT_FLOATER:
341  case SID_FONTWORK_CHARACTER_SPACING_DIALOG:
342  svx::FontworkBar::execute(*pSdrView, rReq, rBnd);
343  rReq.Ignore ();
344  break;
345 
346  case SID_INSERT_GRAPHIC:
347  {
348  // #i123922# check if we can do something
350 
351  if(pObj)
352  {
353  // ...and if yes, do something
354  InsertPictureFromFile(*pObj);
355  }
356 
357  break;
358  }
359 
360  case FN_ADD_TEXT_BOX:
361  {
363  {
364  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
365  if (pFrameFormat)
366  SwTextBoxHelper::create(pFrameFormat, pObj->HasText());
367  }
368  break;
369  }
370  case FN_REMOVE_TEXT_BOX:
371  {
373  {
374  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
375  if (pFrameFormat)
376  SwTextBoxHelper::destroy(pFrameFormat);
377  }
378  break;
379  }
380  default:
381  OSL_ENSURE(false, "wrong dispatcher");
382  return;
383  }
384  if (pSdrView->GetModel()->IsChanged())
385  rSh.SetModified();
386  else if (bChanged)
387  pSdrView->GetModel()->SetChanged();
388 }
389 
391 {
392  SwWrtShell &rSh = GetShell();
393  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
394  SfxWhichIter aIter( rSet );
395  sal_uInt16 nWhich = aIter.FirstWhich();
397 
398  if (!bProtected) // Check the parent
400 
401  while( nWhich )
402  {
403  switch( nWhich )
404  {
405  case SID_OBJECT_HELL:
406  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(0) || bProtected )
407  rSet.DisableItem( nWhich );
408  break;
409 
410  case SID_OBJECT_HEAVEN:
411  if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(1) || bProtected )
412  rSet.DisableItem( nWhich );
413  break;
414 
415  case FN_TOOL_HIERARCHIE:
416  if ( !rSh.IsObjSelected() || bProtected )
417  rSet.DisableItem( nWhich );
418  break;
419 
420  case SID_OBJECT_ROTATE:
421  {
422  const bool bIsRotate = GetView().IsDrawRotate();
423  if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
424  rSet.DisableItem( nWhich );
425  else
426  rSet.Put( SfxBoolItem( nWhich, bIsRotate ) );
427  }
428  break;
429 
430  case SID_BEZIER_EDIT:
431  if (!Disable(rSet, nWhich))
432  rSet.Put( SfxBoolItem( nWhich, !GetView().IsDrawSelMode()));
433  break;
434 
435  case SID_FLIP_VERTICAL:
436  if ( !pSdrView->IsMirrorAllowed() || bProtected )
437  {
438  rSet.DisableItem( nWhich );
439  }
440  else
441  {
442  // TTTT - needs to be adapted in aw080:
443  // state is not kept for drawing objects --> provide not flipped state
444  rSet.Put( SfxBoolItem( nWhich, false ) );
445  }
446  break;
447 
448  case SID_FLIP_HORIZONTAL:
449  if ( !pSdrView->IsMirrorAllowed() || bProtected )
450  {
451  rSet.DisableItem( nWhich );
452  }
453  else
454  {
455  // TTTT - needs to be adapted in aw080:
456  // state is not kept for drawing objects --> provide not flipped state
457  rSet.Put( SfxBoolItem( nWhich, false ) );
458  }
459  break;
460 
461  case SID_FONTWORK:
462  {
463  if (bProtected)
464  rSet.DisableItem( nWhich );
465  else
466  {
467  const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
468  rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
469  }
470  }
471  break;
472 
473  case SID_INSERT_GRAPHIC:
474  {
475  // #i123922# check if we can do something
477 
478  if(!pObj)
479  {
480  rSet.DisableItem(nWhich);
481  }
482 
483  break;
484  }
485  case FN_ADD_TEXT_BOX:
486  {
487  bool bDisable = true;
489  {
490  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
491  // Allow creating a TextBox only in case this is a draw format without a TextBox so far.
492  if (pFrameFormat && pFrameFormat->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT))
493  {
494  if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pObj) )
495  {
496  const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
497  if (const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type"))
498  // But still disallow fontwork shapes.
499  bDisable = pAny->get<OUString>().startsWith("fontwork-");
500  }
501  }
502  }
503 
504  if (bDisable)
505  rSet.DisableItem(nWhich);
506  break;
507  }
508  case FN_REMOVE_TEXT_BOX:
509  {
510  bool bDisable = true;
512  {
513  SwFrameFormat* pFrameFormat = ::FindFrameFormat(pObj);
514  // Allow removing a TextBox only in case it has one.
515  if (pFrameFormat && SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT))
516  bDisable = false;
517  }
518 
519  if (bDisable)
520  rSet.DisableItem(nWhich);
521  break;
522  }
523  }
524  nWhich = aIter.NextWhich();
525  }
526  svx::ExtrusionBar::getState( pSdrView, rSet );
527  svx::FontworkBar::getState( pSdrView, rSet );
528 }
529 
531  SwDrawBaseShell(_rView)
532 {
533  SetName("Draw");
534 
536 
537  SwWrtShell &rSh = GetShell();
538  SdrView* pDrView = rSh.GetDrawView();
539  sal_uInt32 nCheckStatus = 0;
540  if (pDrView && svx::checkForSelectedFontWork(pDrView, nCheckStatus))
542 
544 }
545 
546 // Edit SfxRequests for FontWork
547 
549 {
550  SwWrtShell &rSh = GetShell();
551  SdrView* pDrView = rSh.GetDrawView();
552  bool bChanged = pDrView->GetModel()->IsChanged();
553  pDrView->GetModel()->SetChanged(false);
554 
555  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
556 
557  if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() )
558  {
559  const SfxItemSet& rSet = *rReq.GetArgs();
560 
561  if ( pDrView->IsTextEdit() )
562  {
563  pDrView->SdrEndTextEdit( true );
564  GetView().AttrChangedNotify(nullptr);
565  }
566 
567  pDrView->SetAttributes(rSet);
568  }
569  if (pDrView->GetModel()->IsChanged())
570  rSh.SetModified();
571  else
572  if (bChanged)
573  pDrView->GetModel()->SetChanged();
574 }
575 
576 //Return status values for FontWork
577 
579 {
580  SwWrtShell &rSh = GetShell();
581  SdrView* pDrView = rSh.GetDrawView();
582  const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
583  const SdrObject* pObj = nullptr;
584 
585  if ( rMarkList.GetMarkCount() == 1 )
586  pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
587 
588  const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj);
589  const bool bDeactivate(
590  !pObj ||
591  !pTextObj ||
592  !pTextObj->HasText() ||
593  dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes
594 
595  if(bDeactivate)
596  {
608  }
609  else
610  {
611  pDrView->GetAttributes( rSet );
612  }
613 }
614 
615 /* 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:530
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:376
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:2495
constexpr TypedWhichId< XFormTextOutlineItem > XATTR_FORMTXTOUTLINE(XATTR_TEXT_FIRST+5)
SwWrtShell & GetShell()
Definition: basesh.cxx:2707
void FlipDrawRotate()
Definition: view.hxx:530
void SelectionToHeaven()
Above document.
Definition: feshview.cxx:1140
void SetWrapMode(sal_uInt16 nSlot)
Definition: basesh.cxx:1924
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
bool checkForSelectedFontWork(SdrView const *pSdrView, sal_uInt32 &nCheckStatus)
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:91
void ToggleChildWindow(sal_uInt16)
void InsertPictureFromFile(SdrObject &rObject)
Definition: drawsh.cxx:110
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:429
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
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 MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint)
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:578
void SelectionToHell()
Below document.
Definition: feshview.cxx:1145
void ExecFormText(SfxRequest const &rReq)
Definition: drawsh.cxx:548
SdrObject * GetMarkedSdrObj() const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
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:726
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
void GetState(SfxItemSet &)
Definition: drawsh.cxx:390
#define FN_ADD_TEXT_BOX
Definition: cmdid.h:496
size_t GetMarkedObjectCount() const
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:690
static void getState(SdrView const *pSdrView, SfxItemSet &rSet)
bool IsDrawRotate() const
Definition: view.hxx:529
#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:166
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:2598
bool Disable(SfxItemSet &rSet, sal_uInt16 nWhich=0)
Definition: drwbassh.cxx:811
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:1077
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#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:697
constexpr TypedWhichId< XFormTextShadowYValItem > XATTR_FORMTXTSHDWYVAL(XATTR_TEXT_FIRST+9)
SdrView * GetDrawViewWithValidMarkList()
Definition: vnew.cxx:381
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:1150
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)
constexpr TypedWhichId< XFormTextMirrorItem > XATTR_FORMTXTMIRROR(XATTR_TEXT_FIRST+4)
void Ignore()
SdrModel * GetModel() const
void SetContextName(const OUString &rsContextName)
void FlipDrawSelMode()
Definition: view.hxx:533
Definition: view.hxx:144
constexpr TypedWhichId< XFormTextShadowColorItem > XATTR_FORMTXTSHDWCOLOR(XATTR_TEXT_FIRST+7)