LibreOffice Module sw (master)  1
drwbassh.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 <hintids.hxx>
21 #include <swtypes.hxx>
22 #include <sfx2/objface.hxx>
23 #include <sfx2/request.hxx>
24 #include <sfx2/bindings.hxx>
25 #include <sfx2/viewfrm.hxx>
26 #include <svl/aeitem.hxx>
27 #include <svx/svdview.hxx>
28 #include <svl/srchitem.hxx>
29 #include <svl/whiter.hxx>
31 #include <svx/anchorid.hxx>
32 #include <sfx2/htmlmode.hxx>
33 #include <drawdoc.hxx>
34 #include <uitool.hxx>
35 #include <fmtornt.hxx>
36 #include <cmdid.h>
37 #include <swmodule.hxx>
38 #include <wrtsh.hxx>
39 #include <wview.hxx>
40 #include <edtwin.hxx>
41 #include <viewopt.hxx>
42 #include <dcontact.hxx>
43 #include <frmfmt.hxx>
44 #include <wrap.hxx>
45 #include <drawbase.hxx>
46 #include <drwbassh.hxx>
47 #include <swdtflvr.hxx>
48 #include <svx/svdogrp.hxx>
49 #include <svx/svdpage.hxx>
50 #include <svx/svditer.hxx>
51 #define ShellClass_SwDrawBaseShell
52 #include <sfx2/msg.hxx>
53 #include <svx/svxids.hrc>
54 #include <swslots.hxx>
55 #include <svx/svxdlg.hxx>
56 #include <svx/dialogs.hrc>
57 #include <swabstdlg.hxx>
58 #include <swundo.hxx>
59 #include <com/sun/star/text/HoriOrientation.hpp>
60 #include <com/sun/star/text/VertOrientation.hpp>
61 #include <com/sun/star/text/RelOrientation.hpp>
63 #include <memory>
64 #include <fmtfollowtextflow.hxx>
65 
66 using namespace ::com::sun::star;
67 
69 
70 void SwDrawBaseShell::InitInterface_Impl()
71 {
72 }
73 
74 
76  : SwBaseShell(_rView)
77 {
78  GetShell().NoEdit();
79 
80  SwEditWin& rWin = GetView().GetEditWin();
81 
82  rWin.SetBezierMode(SID_BEZIER_MOVE);
83 
84  if ( !_rView.GetDrawFuncPtr() )
85  _rView.GetEditWin().StdDrawMode( OBJ_NONE, true );
86 
88 }
89 
91 {
92  GetView().ExitDraw();
93  GetShell().Edit();
95 }
96 
98 {
99  SwWrtShell *pSh = &GetShell();
100  SdrView* pSdrView = pSh->GetDrawView();
101  const SfxItemSet *pArgs = rReq.GetArgs();
102  sal_uInt16 nSlotId = rReq.GetSlot();
103  bool bChanged = pSdrView->GetModel()->IsChanged();
104  pSdrView->GetModel()->SetChanged(false);
105  const SfxPoolItem* pItem = nullptr;
106  if(pArgs)
107  pArgs->GetItemState(nSlotId, false, &pItem);
108 
109  bool bAlignPossible = pSh->IsAlignPossible();
110 
111  bool bTopParam = true, bBottomParam = true;
112  bool bDone = false;
114 
115  switch (nSlotId)
116  {
117  case FN_DRAW_WRAP_DLG:
118  {
119  if(pSdrView->AreObjectsMarked())
120  {
121  if(!pArgs)
122  {
123  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
124  if( rMarkList.GetMark(0) != nullptr )
125  {
126  SfxItemSet aSet(
127  GetPool(),
128  svl::Items<
132  SID_HTML_MODE, SID_HTML_MODE,
134 
135  aSet.Put(SfxBoolItem(SID_HTML_MODE,
136  0 != ::GetHtmlMode(pSh->GetView().GetDocShell())));
137 
139 
140  pSh->GetObjAttr(aSet);
143 
144  if (pDlg->Execute() == RET_OK)
145  {
146  const SfxPoolItem* pWrapItem;
147  const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
148  if(SfxItemState::SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, false, &pWrapItem))
149  {
150  short nLayer = static_cast<const SfxInt16Item*>(pWrapItem)->GetValue();
151  if (nLayer == 1)
152  pSh->SelectionToHeaven();
153  else
154  pSh->SelectionToHell();
155  }
156 
157  pSh->SetObjAttr(*pOutSet);
158  }
159  }
160  }
161  }
162  }
163  break;
164 
165  case SID_ATTR_TRANSFORM:
166  {
167  if(pSdrView->AreObjectsMarked())
168  {
169  if(!pArgs)
170  {
171  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
172  if( rMarkList.GetMark(0) != nullptr )
173  {
174  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
176  bool bCaption = false;
177 
178  // Allowed anchorages:
179  RndStdIds nAnchor = pSh->GetAnchorId();
180  SvxAnchorIds nAllowedAnchors = SvxAnchorIds::Paragraph | SvxAnchorIds::Character | SvxAnchorIds::Page;
181  sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
182 
183  if ( pSh->IsFlyInFly() )
184  nAllowedAnchors |= SvxAnchorIds::Fly;
185 
186  if (pObj->GetObjIdentifier() == OBJ_CAPTION )
187  bCaption = true;
188 
189  if (bCaption)
190  {
193  pFact->CreateCaptionDialog( nullptr, pSdrView, nAllowedAnchors );
194  pDlg.disposeAndReset(pCaptionDlg);
195  pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
196  }
197  else
198  {
201  pFact->CreateSvxTransformTabDialog(rReq.GetFrameWeld(), nullptr, pSdrView, nAllowedAnchors);
202  pDlg.disposeAndReset(pTransform);
203  pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
204  }
205  SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
206 
207  const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
208  SfxItemSet aSet( *aNewAttr.GetPool(), pRange );
209  FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>(&GetView()) != nullptr );
210  SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
211 
212  aSet.Put( aNewAttr, false );
213 
214  if (bCaption)
215  pSdrView->GetAttributes( aSet );
216 
217  aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, static_cast<sal_Int16>(nAnchor)));
218  bool bRTL;
219  bool bVertL2R;
220  aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrameVertical(true, bRTL, bVertL2R)));
221  aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL));
222 
223  SwFrameFormat* pFrameFormat = FindFrameFormat( pObj );
224 
225  aSet.Put( pFrameFormat->GetFormatAttr(RES_FOLLOW_TEXT_FLOW) );
226 
227  SwFormatVertOrient aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
228  aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_ORIENT, aVOrient.GetVertOrient()));
229  aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_RELATION, aVOrient.GetRelationOrient() ));
230  aSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_VERT_POSITION, aVOrient.GetPos()));
231 
232  SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
233  aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_ORIENT, aHOrient.GetHoriOrient()));
234  aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_RELATION, aHOrient.GetRelationOrient() ));
235  aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_HORI_MIRROR, aHOrient.IsPosToggle()));
236  aSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_HORI_POSITION, aHOrient.GetPos()));
237 
238  aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
239 
240  pDlg->SetInputSet( &aSet );
241 
242  if (pDlg->Execute() == RET_OK)
243  {
244  const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
245  pSh->StartAllAction();
246 
247  // #i30451#
249 
250  pSdrView->SetGeoAttrToMarked(*pOutSet);
251 
252  if (bCaption)
253  pSdrView->SetAttributes(*pOutSet);
254 
255  bool bPosCorr =
256  SfxItemState::SET != pOutSet->GetItemState(
257  SID_ATTR_TRANSFORM_POS_X, false ) &&
258  SfxItemState::SET != pOutSet->GetItemState(
259  SID_ATTR_TRANSFORM_POS_Y, false );
260 
262 
263  bool bSingleSelection = rMarkList.GetMarkCount() == 1;
264 
265  const SfxPoolItem* pAnchorItem;
266  if(SfxItemState::SET == pOutSet->GetItemState(
267  SID_ATTR_TRANSFORM_ANCHOR, false, &pAnchorItem))
268  {
269  if(!bSingleSelection)
270  pSh->ChgAnchor(static_cast<RndStdIds>(static_cast<const SfxInt16Item*>(pAnchorItem)
271  ->GetValue()), false, bPosCorr );
272  else
273  {
274  SwFormatAnchor aAnchor(pFrameFormat->GetAnchor());
275  aAnchor.SetType(static_cast<RndStdIds>(static_cast<const SfxInt16Item*>(pAnchorItem)->GetValue()));
276  aFrameAttrSet.Put( aAnchor );
277  }
278  }
279  const SfxPoolItem* pHoriOrient = nullptr;
280  const SfxPoolItem* pHoriRelation = nullptr;
281  const SfxPoolItem* pHoriPosition = nullptr;
282  const SfxPoolItem* pHoriMirror = nullptr;
283  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, false, &pHoriOrient);
284  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, false, &pHoriRelation);
285  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, false, &pHoriPosition);
286  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, false, &pHoriMirror);
287  if(pHoriOrient || pHoriRelation || pHoriPosition || pHoriMirror)
288  {
289  if(pHoriOrient)
290  aHOrient.SetHoriOrient(
291  static_cast<const SfxInt16Item*>(pHoriOrient)->GetValue());
292  if(pHoriRelation)
293  aHOrient.SetRelationOrient(
294  static_cast<const SfxInt16Item*>(pHoriRelation)->GetValue());
295  if(pHoriPosition)
296  aHOrient.SetPos( static_cast<const SfxInt32Item*>(pHoriPosition)->GetValue());
297  if(pHoriMirror)
298  aHOrient.SetPosToggle( static_cast<const SfxBoolItem*>(pHoriMirror)->GetValue());
299  aFrameAttrSet.Put(aHOrient);
300  }
301 
302  const SfxPoolItem* pVertOrient = nullptr;
303  const SfxPoolItem* pVertRelation = nullptr;
304  const SfxPoolItem* pVertPosition = nullptr;
305  pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, false, &pVertOrient);
306  pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, false, &pVertRelation);
307  pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, false, &pVertPosition);
308  if(pVertOrient || pVertRelation || pVertPosition )
309  {
310  if(pVertOrient)
311  aVOrient.SetVertOrient(
312  static_cast<const SfxInt16Item*>(pVertOrient)->GetValue());
313  if(pVertRelation)
314  aVOrient.SetRelationOrient(
315  static_cast<const SfxInt16Item*>(pVertRelation)->GetValue());
316  if(pVertPosition)
317  aVOrient.SetPos( static_cast<const SfxInt32Item*>(pVertPosition)->GetValue());
318  aFrameAttrSet.Put( aVOrient );
319  }
320  const SfxPoolItem* pFollowItem = nullptr;
321  pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, false, &pFollowItem);
322  if(pFollowItem)
323  aFrameAttrSet.Put(*pFollowItem);
324 
325  if(aFrameAttrSet.Count())
326  pSh->SetDrawingAttr(aFrameAttrSet);
327 
328  rBind.InvalidateAll(false);
329 
330  // #i30451#
332 
333  pSh->EndAllAction();
334  }
335  }
336  }
337  else
338  {
339  pSdrView->SetGeoAttrToMarked( *pArgs );
340  }
341  }
342  }
343  break;
344 
345  case SID_DELETE:
346  case FN_BACKSPACE:
347  if (pSh->IsObjSelected() && !pSdrView->IsTextEdit())
348  {
349  bDone = true;
350 
351  if( GetView().IsDrawRotate() )
352  {
353  pSh->SetDragMode( SdrDragMode::Move );
355  }
356 
357  pSh->SetModified();
358  pSh->DelSelectedObj();
359 
360  if (rReq.IsAPI() ||
362  {
363  // If basic call, then back to the text shell, because the
364  // Basic otherwise has no possibility to return.
365  if (GetView().GetDrawFuncPtr())
366  {
368  GetView().SetDrawFuncPtr(nullptr);
369  }
370  GetView().LeaveDrawCreate(); // Switch to selection mode
371  }
372 
373  if (pSh->IsSelFrameMode())
374  {
375  pSh->LeaveSelFrameMode();
376  // #105852# FME
377  }
378  }
379  break;
380 
381  case SID_GROUP:
382  if (pSh->IsObjSelected() > 1 && pSh->IsGroupAllowed())
383  {
384  pSh->GroupSelection();
385  rBind.Invalidate(SID_UNGROUP);
386  }
387  break;
388 
389  case SID_UNGROUP:
390  if (pSh->IsGroupSelected() && pSh->IsUnGroupAllowed())
391  {
392  pSh->UnGroupSelection();
393  rBind.Invalidate(SID_GROUP);
394  }
395  break;
396 
397  case SID_ENTER_GROUP:
398  if (pSh->IsGroupSelected())
399  {
400  pSdrView->EnterMarkedGroup();
401  rBind.InvalidateAll(false);
402  }
403  break;
404 
405  case SID_LEAVE_GROUP:
406  if (pSdrView->IsGroupEntered())
407  {
408  pSdrView->LeaveOneGroup();
409  rBind.Invalidate(SID_ENTER_GROUP);
410  rBind.Invalidate(SID_UNGROUP);
411  }
412  break;
413 
414  case SID_OBJECT_ALIGN_LEFT:
415  case SID_OBJECT_ALIGN_CENTER:
416  case SID_OBJECT_ALIGN_RIGHT:
417  case SID_OBJECT_ALIGN_UP:
418  case SID_OBJECT_ALIGN_MIDDLE:
419  case SID_OBJECT_ALIGN_DOWN:
420  {
421  if ( bAlignPossible )
422  {
423  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
424  if ( rMarkList.GetMarkCount() == 1 )
425  {
426  sal_Int16 nHorizOrient = -1, nVertOrient = -1;
427 
428  switch (nSlotId)
429  {
430  case SID_OBJECT_ALIGN_LEFT:
431  nHorizOrient = text::HoriOrientation::LEFT;
432  break;
433  case SID_OBJECT_ALIGN_CENTER:
434  nHorizOrient = text::HoriOrientation::CENTER;
435  break;
436  case SID_OBJECT_ALIGN_RIGHT:
437  nHorizOrient = text::HoriOrientation::RIGHT;
438  break;
439  case SID_OBJECT_ALIGN_UP:
440  nVertOrient = text::VertOrientation::TOP;
441  break;
442  case SID_OBJECT_ALIGN_MIDDLE:
443  nVertOrient = text::VertOrientation::CENTER;
444  break;
445  case SID_OBJECT_ALIGN_DOWN:
446  nVertOrient = text::VertOrientation::BOTTOM;
447  break;
448  default:
449  break;
450  }
451 
452  if (nHorizOrient != -1)
453  {
454  pSh->StartAction();
455  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
456  SwFrameFormat* pFrameFormat = FindFrameFormat( pObj );
457  SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
458  aHOrient.SetHoriOrient( nHorizOrient );
459  pFrameFormat->SetFormatAttr(aHOrient);
460  pSh->EndAction();
461  }
462 
463  if (nVertOrient != -1)
464  {
465  pSh->StartAction();
466  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
467  SwFrameFormat* pFrameFormat = FindFrameFormat( pObj );
468  SwFormatVertOrient aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
469  aVOrient.SetVertOrient( nVertOrient );
470  pFrameFormat->SetFormatAttr(aVOrient);
471  pSh->EndAction();
472  }
473 
474  break;
475  }
476 
477  pSh->StartAction();
478  switch (nSlotId)
479  {
480  case SID_OBJECT_ALIGN_LEFT:
481  pSdrView->AlignMarkedObjects(SdrHorAlign::Left, SdrVertAlign::NONE);
482  break;
483  case SID_OBJECT_ALIGN_CENTER:
484  pSdrView->AlignMarkedObjects(SdrHorAlign::Center, SdrVertAlign::NONE);
485  break;
486  case SID_OBJECT_ALIGN_RIGHT:
487  pSdrView->AlignMarkedObjects(SdrHorAlign::Right, SdrVertAlign::NONE);
488  break;
489  case SID_OBJECT_ALIGN_UP:
490  pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Top);
491  break;
492  case SID_OBJECT_ALIGN_MIDDLE:
493  pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Center);
494  break;
495  case SID_OBJECT_ALIGN_DOWN:
496  pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Bottom);
497  break;
498  }
499  pSh->EndAction();
500  }
501  }
502  break;
503 
504  case FN_FRAME_UP:
505  bTopParam = false;
506  [[fallthrough]];
507  case SID_FRAME_TO_TOP:
508  pSh->SelectionToTop( bTopParam );
509  break;
510 
511  case FN_FRAME_DOWN:
512  bBottomParam = false;
513  [[fallthrough]];
514  case SID_FRAME_TO_BOTTOM:
515  pSh->SelectionToBottom( bBottomParam );
516  break;
517 
518  case FN_NAME_SHAPE:
519  {
520  bDone = true;
521 
522  if(1 == pSdrView->GetMarkedObjectCount())
523  {
524  // #i68101#
525  SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0);
526  OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)");
527  OUString aName(pSelected->GetName());
528 
530  ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(GetView().GetFrameWeld(), aName));
531 
532  pDlg->SetCheckNameHdl(LINK(this, SwDrawBaseShell, CheckGroupShapeNameHdl));
533 
534  if(RET_OK == pDlg->Execute())
535  {
536  pDlg->GetName(aName);
537  pSelected->SetName(aName);
538  pSh->SetModified();
539  }
540  }
541 
542  break;
543  }
544 
545  // #i68101#
547  {
548  bDone = true;
549 
550  if(1 == pSdrView->GetMarkedObjectCount())
551  {
552  SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0);
553  OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)");
554  OUString aTitle(pSelected->GetTitle());
555  OUString aDescription(pSelected->GetDescription());
556 
558  ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(GetView().GetFrameWeld(),
559  aTitle, aDescription));
560 
561  if(RET_OK == pDlg->Execute())
562  {
563  pDlg->GetTitle(aTitle);
564  pDlg->GetDescription(aDescription);
565 
566  pSelected->SetTitle(aTitle);
567  pSelected->SetDescription(aDescription);
568 
569  pSh->SetModified();
570  }
571  }
572 
573  break;
574  }
575 
576  default:
577  OSL_ENSURE(false, "wrong Dispatcher");
578  return;
579  }
580  if(!bDone)
581  {
582  if(nSlotId >= SID_OBJECT_ALIGN_LEFT && nSlotId <= SID_OBJECT_ALIGN_DOWN)
583  rBind.Invalidate(SID_ATTR_LONG_LRSPACE);
584  if (pSdrView->GetModel()->IsChanged())
585  pSh->SetModified();
586  else if (bChanged)
587  pSdrView->GetModel()->SetChanged();
588  }
589 }
590 
591 // Checks whether a given name is allowed for a group shape
592 
593 IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxObjectNameDialog&, rNameDialog, bool )
594 {
595  SwWrtShell &rSh = GetShell();
596  SdrView *pSdrView = rSh.GetDrawView();
597  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
598  OSL_ENSURE(rMarkList.GetMarkCount() == 1, "wrong draw selection");
599  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
600  const OUString sCurrentName = pObj->GetName();
601  OUString sNewName;
602  rNameDialog.GetName(sNewName);
603  bool bRet = false;
604  if (sNewName.isEmpty() || sCurrentName == sNewName)
605  bRet = true;
606  else
607  {
608  bRet = true;
610  SdrObjListIter aIter( pModel->GetPage(0), SdrIterMode::DeepWithGroups );
611  while( aIter.IsMore() )
612  {
613  SdrObject* pTempObj = aIter.Next();
614  if ( pObj != pTempObj && pTempObj->GetName() == sNewName )
615  {
616  bRet = false;
617  break;
618  }
619  }
620  }
621  return bRet;
622 }
623 
625 {
626  SwWrtShell &rSh = GetShell();
627  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
628  SfxWhichIter aIter( rSet );
629  sal_uInt16 nWhich = aIter.FirstWhich();
631 
632  if (!bProtected) // Look in the parent
634 
635  while( nWhich )
636  {
637  switch( nWhich )
638  {
639  case FN_DRAW_WRAP_DLG:
640  case SID_ATTR_TRANSFORM:
641  case SID_FRAME_TO_TOP:
642  case SID_FRAME_TO_BOTTOM:
643  case FN_FRAME_UP:
644  case FN_FRAME_DOWN:
645  case SID_DELETE:
646  case FN_BACKSPACE:
647  if( bProtected || !rSh.IsObjSelected() )
648  rSet.DisableItem( nWhich );
649  break;
650  case SID_GROUP:
651  if ( rSh.IsObjSelected() < 2 || bProtected || !rSh.IsGroupAllowed() )
652  rSet.DisableItem( nWhich );
653  break;
654  case SID_UNGROUP:
655  if ( !rSh.IsGroupSelected() || bProtected || !rSh.IsUnGroupAllowed() )
656  rSet.DisableItem( nWhich );
657  break;
658  case SID_ENTER_GROUP:
659  if ( !rSh.IsGroupSelected() )
660  rSet.DisableItem( nWhich );
661  break;
662  case SID_LEAVE_GROUP:
663  if ( !pSdrView->IsGroupEntered() )
664  rSet.DisableItem( nWhich );
665  break;
666  case SID_OBJECT_ALIGN_LEFT:
667  case SID_OBJECT_ALIGN_CENTER:
668  case SID_OBJECT_ALIGN_RIGHT:
669  case SID_OBJECT_ALIGN_UP:
670  case SID_OBJECT_ALIGN_MIDDLE:
671  case SID_OBJECT_ALIGN_DOWN:
672  case SID_OBJECT_ALIGN:
673  if ( !rSh.IsAlignPossible() || bProtected )
674  rSet.DisableItem( nWhich );
675  else if ( rSh.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
676  {
677  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
678  //if only one object is selected it can only be vertically
679  // aligned because it is character bound
680  if( rMarkList.GetMarkCount() == 1 )
681  {
682  rSet.DisableItem(SID_OBJECT_ALIGN_LEFT);
683  rSet.DisableItem(SID_OBJECT_ALIGN_CENTER);
684  rSet.DisableItem(SID_OBJECT_ALIGN_RIGHT);
685  }
686  }
687  break;
688 
689  case FN_NAME_SHAPE :
690  {
691  if(1 != pSdrView->GetMarkedObjectCount())
692  {
693  rSet.DisableItem( nWhich );
694  }
695  }
696  break;
697 
698  // #i68101#
700  {
701  const bool bIsWebView(nullptr != dynamic_cast<SwWebView*>(&GetView()));
702 
703  if(!bIsWebView && 1 != pSdrView->GetMarkedObjectCount())
704  {
705  rSet.DisableItem( nWhich );
706  }
707  }
708  break;
709  }
710  nWhich = aIter.NextWhich();
711  }
712 }
713 
715 {
716  SwWrtShell *pSh = &GetShell();
717  SdrView* pSdrView = pSh->GetDrawView();
718  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
719  if( rMarkList.GetMark(0) != nullptr )
720  {
721  SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
722  rSet.Put(aNewAttr,false);
723  }
724 }
725 
726 bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
727 {
729 
730  if (bDisable)
731  {
732  if (nWhich)
733  rSet.DisableItem( nWhich );
734  else
735  {
736  SfxWhichIter aIter( rSet );
737  nWhich = aIter.FirstWhich();
738  while (nWhich)
739  {
740  rSet.DisableItem( nWhich );
741  nWhich = aIter.NextWhich();
742  }
743  }
744  }
745 
746  return bDisable;
747 }
748 
750 {
751  SwWrtShell *pSh = &GetShell();
752  SdrView* pSdrView = pSh->GetDrawView();
753  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
754  const size_t nMarkCount = rMarkList.GetMarkCount();
755  bool bShowArea = true, bShowMeasure = true;
756 
757  for (size_t i = 0; i < nMarkCount && i < 50; ++i)
758  {
759  SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
760  sal_uInt16 nObjType = pObj->GetObjIdentifier();
761 
762  if ( nObjType != OBJ_MEASURE )
763  bShowMeasure = false;
764 
765  // If marked object is 2D, disable format area command.
766  if ( nObjType == OBJ_PLIN ||
767  nObjType == OBJ_LINE ||
768  nObjType == OBJ_PATHLINE ||
769  nObjType == OBJ_FREELINE ||
770  nObjType == OBJ_EDGE ||
771  nObjType == OBJ_CARC ||
772  bShowMeasure )
773  bShowArea = false;
774 
775  if (!bShowArea && !bShowMeasure)
776  break;
777  }
778 
779  if (!bShowArea)
780  rSet.DisableItem(SID_ATTRIBUTES_AREA);
781 
782  if (!bShowMeasure)
783  rSet.DisableItem(SID_MEASURE_DLG);
784 
785  Disable(rSet);
786 
787 }
788 
789 // Validate of drawing positions
790 
791 IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValidation, void )
792 {
793  SwWrtShell *pSh = &GetShell();
794  rValidation.nMinHeight = MINFLY;
795  rValidation.nMinWidth = MINFLY;
796 
797  SwRect aBoundRect;
798 
799  // OD 18.09.2003 #i18732# - adjustment for allowing vertical position
800  // aligned to page for fly frame anchored to paragraph or to character.
801  const RndStdIds eAnchorType = rValidation.nAnchorType;
802  const SwPosition* pContentPos = nullptr;
803  SdrView* pSdrView = pSh->GetDrawView();
804  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
805  if( rMarkList.GetMarkCount() == 1 )
806  {
807  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
808  SwFrameFormat* pFrameFormat = FindFrameFormat( pObj );
809  pContentPos = pFrameFormat->GetAnchor().GetContentAnchor();
810  }
811 
812  pSh->CalcBoundRect( aBoundRect, eAnchorType,
813  rValidation.nHRelOrient,
814  rValidation.nVRelOrient,
815  pContentPos,
816  rValidation.bFollowTextFlow,
817  rValidation.bMirror, nullptr, &rValidation.aPercentSize);
818 
819  bool bIsInVertical( false );
820  {
821  bool bRTL;
822  bool bVertL2R;
823  bIsInVertical = pSh->IsFrameVertical(true, bRTL, bVertL2R);
824  }
825  if(bIsInVertical)
826  {
827  Point aPos(aBoundRect.Pos());
828  long nTmp = aPos.X();
829  aPos.setX( aPos.Y() );
830  aPos.setY( nTmp );
831  Size aSize(aBoundRect.SSize());
832  nTmp = aSize.Width();
833  aSize.setWidth( aSize.Height() );
834  aSize.setHeight( nTmp );
835  aBoundRect.Chg( aPos, aSize );
836  //exchange width/height to enable correct values
837  nTmp = rValidation.nWidth;
838  rValidation.nWidth = rValidation.nHeight;
839  rValidation.nHeight = nTmp;
840  }
841  if ((eAnchorType == RndStdIds::FLY_AT_PAGE) || (eAnchorType == RndStdIds::FLY_AT_FLY))
842  {
843  // MinimalPosition
844  rValidation.nMinHPos = aBoundRect.Left();
845  rValidation.nMinVPos = aBoundRect.Top();
846  SwTwips nH = rValidation.nHPos;
847  SwTwips nV = rValidation.nVPos;
848 
849  if (rValidation.nHPos + rValidation.nWidth > aBoundRect.Right())
850  {
851  if (rValidation.nHoriOrient == text::HoriOrientation::NONE)
852  {
853  rValidation.nHPos -= ((rValidation.nHPos + rValidation.nWidth) - aBoundRect.Right());
854  nH = rValidation.nHPos;
855  }
856  else
857  rValidation.nWidth = aBoundRect.Right() - rValidation.nHPos;
858  }
859 
860  if (rValidation.nHPos + rValidation.nWidth > aBoundRect.Right())
861  rValidation.nWidth = aBoundRect.Right() - rValidation.nHPos;
862 
863  if (rValidation.nVPos + rValidation.nHeight > aBoundRect.Bottom())
864  {
865  if (rValidation.nVertOrient == text::VertOrientation::NONE)
866  {
867  rValidation.nVPos -= ((rValidation.nVPos + rValidation.nHeight) - aBoundRect.Bottom());
868  nV = rValidation.nVPos;
869  }
870  else
871  rValidation.nHeight = aBoundRect.Bottom() - rValidation.nVPos;
872  }
873 
874  if (rValidation.nVPos + rValidation.nHeight > aBoundRect.Bottom())
875  rValidation.nHeight = aBoundRect.Bottom() - rValidation.nVPos;
876 
877  if ( rValidation.nVertOrient != text::VertOrientation::NONE )
878  nV = aBoundRect.Top();
879 
880  if ( rValidation.nHoriOrient != text::HoriOrientation::NONE )
881  nH = aBoundRect.Left();
882 
883  rValidation.nMaxHPos = aBoundRect.Right() - rValidation.nWidth;
884  rValidation.nMaxHeight = aBoundRect.Bottom() - nV;
885 
886  rValidation.nMaxVPos = aBoundRect.Bottom() - rValidation.nHeight;
887  rValidation.nMaxWidth = aBoundRect.Right() - nH;
888  }
889  else if ((eAnchorType == RndStdIds::FLY_AT_PARA) || (eAnchorType == RndStdIds::FLY_AT_CHAR))
890  {
891  if (rValidation.nHPos + rValidation.nWidth > aBoundRect.Right())
892  {
893  if (rValidation.nHoriOrient == text::HoriOrientation::NONE)
894  {
895  rValidation.nHPos -= ((rValidation.nHPos + rValidation.nWidth) - aBoundRect.Right());
896  }
897  else
898  rValidation.nWidth = aBoundRect.Right() - rValidation.nHPos;
899  }
900 
901  // OD 29.09.2003 #i17567#, #i18732# - consider following the text flow
902  // and alignment at page areas.
903  const bool bMaxVPosAtBottom = !rValidation.bFollowTextFlow ||
904  rValidation.nVRelOrient == text::RelOrientation::PAGE_FRAME ||
905  rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
906  {
907  SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
908  ? aBoundRect.Bottom()
909  : aBoundRect.Height() ) -
910  rValidation.nHeight;
911  if ( rValidation.nVPos > nTmpMaxVPos )
912  {
913  if (rValidation.nVertOrient == text::VertOrientation::NONE)
914  {
915  rValidation.nVPos = nTmpMaxVPos;
916  }
917  else
918  {
919  rValidation.nHeight = ( bMaxVPosAtBottom
920  ? aBoundRect.Bottom()
921  : aBoundRect.Height() ) - rValidation.nVPos;
922  }
923  }
924  }
925 
926  rValidation.nMinHPos = aBoundRect.Left();
927  rValidation.nMaxHPos = aBoundRect.Right() - rValidation.nWidth;
928 
929  rValidation.nMinVPos = aBoundRect.Top();
930  // OD 26.09.2003 #i17567#, #i18732# - determine maximum vertical position
931  if ( bMaxVPosAtBottom )
932  {
933  rValidation.nMaxVPos = aBoundRect.Bottom() - rValidation.nHeight;
934  }
935  else
936  {
937  rValidation.nMaxVPos = aBoundRect.Height() - rValidation.nHeight;
938  }
939 
940  // Maximum width height
941  const SwTwips nH = ( rValidation.nHoriOrient != text::HoriOrientation::NONE )
942  ? aBoundRect.Left()
943  : rValidation.nHPos;
944  const SwTwips nV = ( rValidation.nVertOrient != text::VertOrientation::NONE )
945  ? aBoundRect.Top()
946  : rValidation.nVPos;
947  rValidation.nMaxHeight = rValidation.nMaxVPos + rValidation.nHeight - nV;
948  rValidation.nMaxWidth = rValidation.nMaxHPos + rValidation.nWidth - nH;
949  }
950  else if (eAnchorType == RndStdIds::FLY_AS_CHAR)
951  {
952  rValidation.nMinHPos = 0;
953  rValidation.nMaxHPos = 0;
954 
955  rValidation.nMaxHeight = aBoundRect.Height();
956  rValidation.nMaxWidth = aBoundRect.Width();
957 
958  rValidation.nMaxVPos = aBoundRect.Height();
959  rValidation.nMinVPos = -aBoundRect.Height() + rValidation.nHeight;
960  if (rValidation.nMaxVPos < rValidation.nMinVPos)
961  {
962  rValidation.nMinVPos = rValidation.nMaxVPos;
963  rValidation.nMaxVPos = -aBoundRect.Height();
964  }
965  }
966  if(bIsInVertical)
967  {
968  //restore width/height exchange
969  long nTmp = rValidation.nWidth;
970  rValidation.nWidth = rValidation.nHeight;
971  rValidation.nHeight = nTmp;
972  }
973 
974  if (rValidation.nMaxWidth < rValidation.nWidth)
975  rValidation.nWidth = rValidation.nMaxWidth;
976  if (rValidation.nMaxHeight < rValidation.nHeight)
977  rValidation.nHeight = rValidation.nMaxHeight;
978 }
979 
980 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
SFX_IMPL_SUPERCLASS_INTERFACE(DrawDocShell, SfxObjectShell)
long Width() const
void ExitDraw()
Definition: viewdraw.cxx:390
void UnGroupSelection()
The individual objects are selected, but it is possible that there are groups included.
Definition: feshview.cxx:2496
FieldUnit
void GetDrawAttrStateForIFBX(SfxItemSet &rSet)
Definition: drwbassh.cxx:714
size_t GetMarkCount() const
Marks a position in the document model.
Definition: pam.hxx:35
bool IsAlignPossible() const
Definition: feshview.cxx:2725
void ChgAnchor(RndStdIds eAnchorId, bool bSameOnly=false, bool bPosCorr=true)
frmatr.hxx.
Definition: feshview.cxx:2279
bool IsUnGroupAllowed() const
Definition: feshview.cxx:2464
SwView & GetView()
Definition: basesh.hxx:59
SdrView * GetDrawView()
Definition: vnew.cxx:376
void AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
#define RES_HORI_ORIENT
Definition: hintids.hxx:208
virtual const SfxItemSet * GetOutputItemSet() const =0
std::string GetValue
void GroupSelection()
Afterwards the group is selected.
Definition: feshview.cxx:2481
bool AreObjectsMarked() const
SwWrtShell & GetShell()
Definition: basesh.cxx:2580
void FlipDrawRotate()
Definition: view.hxx:517
void SelectionToHeaven()
Above document.
Definition: feshview.cxx:1157
static SvxAbstractDialogFactory * Create()
#define MINFLY
Definition: swtypes.hxx:65
void SetGeoAttrToMarked(const SfxItemSet &rAttr)
OUString GetDescription() const
#define RES_SURROUND
Definition: hintids.hxx:206
Check only parents.
void Height(long nNew)
Definition: swrect.hxx:189
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
long SwTwips
Definition: swtypes.hxx:49
SwEditWin & GetEditWin()
Definition: view.hxx:403
SdrMark * GetMark(size_t nNum) const
OBJ_EDGE
void Pos(const Point &rNew)
Definition: swrect.hxx:167
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
void SetModified()
Definition: edws.cxx:69
bool IsGroupSelected()
Create and destroy group, don't when frame is selected.
Definition: feshview.cxx:2358
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void EndAllAction()
Definition: edws.cxx:96
OBJ_PLIN
OBJ_MEASURE
virtual VclPtr< AbstractSvxCaptionDialog > CreateCaptionDialog(weld::Window *pParent, const SdrView *pView, SvxAnchorIds nAnchorTypes=SvxAnchorIds::NONE)=0
void NoEdit(bool bHideCursor=true)
Definition: wrtsh1.cxx:137
sal_uInt16 NextWhich()
virtual const sal_uInt16 * GetInputRanges(const SfxItemPool &)=0
SfxItemSet GetGeoAttrFromMarked() const
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Definition: viewdraw.cxx:642
void EnterMarkedGroup()
virtual void SetInputSet(const SfxItemSet *pInSet)=0
Used by the UI to modify the document model.
Definition: wrtsh.hxx:86
void disposeAndReset(reference_type *pBody)
const SwView & GetView() const
Definition: wrtsh.hxx:424
void Top(const long nTop)
Definition: swrect.hxx:202
OBJ_CAPTION
const SwFrameFormat * IsFlyInFly()
Is selected frame within another frame?
Definition: fefly1.cxx:316
void SetHoriOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:89
static void CreateSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:3796
virtual VclPtr< AbstractSvxTransformTabDialog > CreateSvxTransformTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, const SdrView *pView, SvxAnchorIds nAnchorTypes=SvxAnchorIds::NONE)=0
void Edit()
Definition: wrtsh1.cxx:143
#define RES_UL_SPACE
Definition: hintids.hxx:197
OBJ_PATHLINE
virtual VclPtr< SfxAbstractDialog > CreateSwWrapDlg(weld::Window *pParent, SfxItemSet &rSet, SwWrtShell *pSh)=0
SwFrameFormat * FindFrameFormat(SdrObject *pObj)
The Get reverse way: seeks the format to the specified object.
Definition: dcontact.cxx:125
void Right(const long nRight)
Definition: swrect.hxx:198
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
Definition: viewsh.cxx:2594
virtual void Deactivate()
Definition: drawbase.cxx:441
virtual void SetChanged(bool bFlg=true)
bool IsDrawRotate()
Definition: view.hxx:516
if(nullptr==pCandidateA||nullptr==pCandidateB)
void GetState(SfxItemSet &)
Definition: drwbassh.cxx:624
#define RES_FOLLOW_TEXT_FLOW
Definition: hintids.hxx:228
SfxItemPool & GetPool() const
void SelectionToHell()
Below document.
Definition: feshview.cxx:1162
void SelectionToBottom(bool bBottom=true)
Definition: feshview.cxx:1072
SdrObject * GetMarkedSdrObj() const
virtual ~SwDrawBaseShell() override
Definition: drwbassh.cxx:90
OBJ_LINE
Style of a layout element.
Definition: frmfmt.hxx:57
#define SW_MOD()
Definition: swmodule.hxx:255
#define RES_ANCHOR
Definition: hintids.hxx:209
Shell * GetShell()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:691
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
bool GetObjAttr(SfxItemSet &rSet) const
Attention: Ambiguities if multiple selections.
Definition: feshview.cxx:2676
void SetVertOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:56
void EndAction(const bool bIdleEnd=false, const bool DoSetPosX=false)
Definition: crsrsh.cxx:229
virtual sal_uInt16 GetObjIdentifier() const
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:59
size_t GetMarkedObjectCount() const
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:67
#define RES_VERT_ORIENT
Definition: hintids.hxx:207
void Execute(SfxRequest const &)
Definition: drwbassh.cxx:97
OBJ_NONE
SfxBindings & GetBindings()
int i
const SdrMarkList & GetMarkedObjectList() const
FlyAnchors.
Definition: fmtanchr.hxx:34
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:339
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:222
OUString GetTitle() const
weld::Window * GetFrameWeld(SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
#define FN_FRAME_DOWN
Definition: cmdid.h:349
bool IsGroupAllowed() const
Definition: feshview.cxx:2404
void LeaveOneGroup()
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
void SSize(const Size &rNew)
Definition: swrect.hxx:176
void SelectionToTop(bool bTop=true)
Move selection upwards or downwards (Z-Order).
Definition: feshview.cxx:1052
void LeaveDrawCreate()
Definition: view.hxx:525
SwDrawBase * GetDrawFuncPtr() const
Definition: view.hxx:513
RndStdIds GetAnchorId() const
Anchor type of selected object, RndStdIds::UNKNOWN if ambiguous or in case of frame selection...
Definition: feshview.cxx:2249
long X() const
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2613
OUString GetName() const
bool Disable(SfxItemSet &rSet, sal_uInt16 nWhich=0)
Definition: drwbassh.cxx:726
SwDocShell * GetDocShell()
Definition: view.cxx:1115
bool IsChanged() const
void DisableState(SfxItemSet &rSet)
Definition: drwbassh.cxx:749
void CalcBoundRect(SwRect &_orRect, const RndStdIds _nAnchorId, const sal_Int16 _eHoriRelOrient=css::text::RelOrientation::FRAME, const sal_Int16 _eVertRelOrient=css::text::RelOrientation::FRAME, const SwPosition *_pToCharContentPos=nullptr, const bool _bFollowTextFlow=false, bool _bMirror=false, Point *_opRef=nullptr, Size *_opPercent=nullptr, const SwFormatFrameSize *pFormatFrameSize=nullptr) const
i#17567 - adjustments to allow negative vertical positions for fly frames anchored to paragraph or to...
Definition: fews.cxx:730
#define RES_LR_SPACE
Definition: hintids.hxx:196
void StartAction()
Definition: crsrsh.cxx:212
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:460
weld::Window * GetFrameWeld() const
virtual void SetValidateFramePosLink(const Link< SvxSwFrameValidation &, void > &rLink)=0
SdrLayerID GetLayerId() const
1 Heaven, 0 Hell, SDRLAYER_NOTFOUND Ambiguous.
Definition: feshview.cxx:1094
OBJ_FREELINE
void Left(const long nLeft)
Definition: swrect.hxx:193
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
OBJ_CARC
void Bottom(const long nBottom)
Definition: swrect.hxx:207
sal_uInt16 GetSlot() const
void DisableItem(sal_uInt16 nWhich)
virtual bool IsTextEdit() const final override
bool IsFrameVertical(const bool bEnvironment, bool &bRightToLeft, bool &bVertL2R) const
Determines whether a frame or its environment is vertically formatted and right-to-left.
Definition: fews.cxx:1296
#define FN_FRAME_UP
Definition: cmdid.h:348
bool IsObjectSelect() const
Definition: edtwin.hxx:208
unsigned char sal_uInt8
void Width(long nNew)
Definition: swrect.hxx:185
static void ClearSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:3808
SdrView * GetDrawViewWithValidMarkList()
Definition: vnew.cxx:381
virtual void SetValidateFramePosLink(const Link< SvxSwFrameValidation &, void > &rLink)=0
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
RET_OK
SvxAnchorIds
#define FN_BACKSPACE
Definition: cmdid.h:637
void SetDescription(const OUString &rStr)
size_t IsObjSelected() const
Definition: feshview.cxx:1167
void DelSelectedObj()
Definition: feshview.cxx:2297
const SfxPoolItem & GetFormatAttr(sal_uInt16 nWhich, bool bInParents=true) const
If bInParents is FALSE, search only in this format for attribute.
Definition: format.cxx:379
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
void SetObjAttr(const SfxItemSet &rSet)
Definition: feshview.cxx:2699
void SetDragMode(SdrDragMode eSdrDragMode)
Set DragMode (e.g. Rotate), but do nothing when frame is selected.
Definition: feshview.cxx:670
void LeaveSelFrameMode()
Definition: select.cxx:721
void SetType(RndStdIds nRndId)
Definition: fmtanchr.hxx:71
OString const aName
void SetBezierMode(sal_uInt16 eBezMode)
Definition: edtwin.hxx:216
void InvalidateAll(bool bWithMsg)
RndStdIds
bool IsAPI() const
void StdDrawMode(SdrObjKind eSdrObjectKind, bool bObjSelect)
Definition: edtwin.cxx:711
void StartAllAction()
For all views of this document.
Definition: edws.cxx:85
#define FN_TITLE_DESCRIPTION_SHAPE
Definition: cmdid.h:422
void SetName(const OUString &rStr)
void Chg(const Point &rNP, const Size &rNS)
Definition: swrect.hxx:162
SdrModel * GetModel() const
IMPL_LINK(SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxObjectNameDialog &, rNameDialog, bool)
Definition: drwbassh.cxx:593
SwDrawBaseShell(SwView &rShell)
Definition: drwbassh.cxx:75
bool IsGroupEntered() const
void SetTitle(const OUString &rStr)
#define FN_DRAW_WRAP_DLG
Definition: cmdid.h:149
#define FN_NAME_SHAPE
Definition: cmdid.h:420
Definition: view.hxx:146
bool SetDrawingAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1110
bool IsSelFrameMode() const
Definition: wrtsh.hxx:166