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