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