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( rReq.GetFrameWeld(), pSdrView, nAllowedAnchors );
194  pDlg.reset(pCaptionDlg);
195  pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
196  }
197  else
198  {
201  pFact->CreateSvxTransformTabDialog(rReq.GetFrameWeld(), nullptr, pSdrView, nAllowedAnchors);
202  pDlg.reset(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  pDlg->StartExecuteAsync([=](sal_Int32 nResult){
243  if (nResult == RET_OK)
244  {
245  SwFormatVertOrient aVOrientFinal(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
246  SwFormatHoriOrient aHOrientFinal(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
247 
248  const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
249  pSh->StartAllAction();
250 
251  // #i30451#
253 
254  pSdrView->SetGeoAttrToMarked(*pOutSet);
255 
256  if (bCaption)
257  pSdrView->SetAttributes(*pOutSet);
258 
259  bool bPosCorr =
260  SfxItemState::SET != pOutSet->GetItemState(
261  SID_ATTR_TRANSFORM_POS_X, false ) &&
262  SfxItemState::SET != pOutSet->GetItemState(
263  SID_ATTR_TRANSFORM_POS_Y, false );
264 
266 
267  bool bSingleSelection = rMarkList.GetMarkCount() == 1;
268 
269  const SfxPoolItem* pAnchorItem;
270  if(SfxItemState::SET == pOutSet->GetItemState(
271  SID_ATTR_TRANSFORM_ANCHOR, false, &pAnchorItem))
272  {
273  if(!bSingleSelection)
274  pSh->ChgAnchor(static_cast<RndStdIds>(static_cast<const SfxInt16Item*>(pAnchorItem)
275  ->GetValue()), false, bPosCorr );
276  else
277  {
278  SwFormatAnchor aAnchor(pFrameFormat->GetAnchor());
279  aAnchor.SetType(static_cast<RndStdIds>(static_cast<const SfxInt16Item*>(pAnchorItem)->GetValue()));
280  aFrameAttrSet.Put( aAnchor );
281  }
282  }
283  const SfxPoolItem* pHoriOrient = nullptr;
284  const SfxPoolItem* pHoriRelation = nullptr;
285  const SfxPoolItem* pHoriPosition = nullptr;
286  const SfxPoolItem* pHoriMirror = nullptr;
287  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, false, &pHoriOrient);
288  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, false, &pHoriRelation);
289  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, false, &pHoriPosition);
290  pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, false, &pHoriMirror);
291  if(pHoriOrient || pHoriRelation || pHoriPosition || pHoriMirror)
292  {
293  if(pHoriOrient)
294  aHOrientFinal.SetHoriOrient(
295  static_cast<const SfxInt16Item*>(pHoriOrient)->GetValue());
296  if(pHoriRelation)
297  aHOrientFinal.SetRelationOrient(
298  static_cast<const SfxInt16Item*>(pHoriRelation)->GetValue());
299  if(pHoriPosition)
300  aHOrientFinal.SetPos( static_cast<const SfxInt32Item*>(pHoriPosition)->GetValue());
301  if(pHoriMirror)
302  aHOrientFinal.SetPosToggle( static_cast<const SfxBoolItem*>(pHoriMirror)->GetValue());
303  aFrameAttrSet.Put(aHOrientFinal);
304  }
305 
306  const SfxPoolItem* pVertOrient = nullptr;
307  const SfxPoolItem* pVertRelation = nullptr;
308  const SfxPoolItem* pVertPosition = nullptr;
309  pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, false, &pVertOrient);
310  pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, false, &pVertRelation);
311  pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, false, &pVertPosition);
312  if(pVertOrient || pVertRelation || pVertPosition )
313  {
314  if(pVertOrient)
315  aVOrientFinal.SetVertOrient(
316  static_cast<const SfxInt16Item*>(pVertOrient)->GetValue());
317  if(pVertRelation)
318  aVOrientFinal.SetRelationOrient(
319  static_cast<const SfxInt16Item*>(pVertRelation)->GetValue());
320  if(pVertPosition)
321  aVOrientFinal.SetPos( static_cast<const SfxInt32Item*>(pVertPosition)->GetValue());
322  aFrameAttrSet.Put( aVOrientFinal );
323  }
324  const SfxPoolItem* pFollowItem = nullptr;
325  pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, false, &pFollowItem);
326  if(pFollowItem)
327  aFrameAttrSet.Put(*pFollowItem);
328 
329  if(aFrameAttrSet.Count())
330  pSh->SetDrawingAttr(aFrameAttrSet);
331 
333 
334  // #i30451#
336 
337  pSh->EndAllAction();
338  }
339 
340  if (pSdrView->GetModel()->IsChanged())
341  pSh->SetModified();
342  else if (bChanged)
343  pSdrView->GetModel()->SetChanged();
344 
345  pDlg->disposeOnce();
346  });
347  }
348  }
349  else
350  {
351  pSh->StartAllAction();
352  pSdrView->SetGeoAttrToMarked( *pArgs );
353  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
354  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
355  if (pObj)
356  {
357  SwFrameFormat* pFrameFormat = FindFrameFormat(pObj);
358  if (pFrameFormat)
359  {
360  const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
361  // Don't change shape position / size, just update the anchor doc model
362  // position.
363  pSh->ChgAnchor(rAnchor.GetAnchorId(), /*bSameOnly=*/true);
364  }
365  }
366  pSh->EndAllAction();
367  }
368  }
369  }
370  break;
371 
372  case SID_DELETE:
373  case FN_BACKSPACE:
374  if (pSh->IsObjSelected() && !pSdrView->IsTextEdit())
375  {
376  bDone = true;
377 
378  if( GetView().IsDrawRotate() )
379  {
380  pSh->SetDragMode( SdrDragMode::Move );
382  }
383 
384  pSh->SetModified();
385  pSh->DelSelectedObj();
386 
387  if (rReq.IsAPI() ||
389  {
390  // If basic call, then back to the text shell, because the
391  // Basic otherwise has no possibility to return.
392  if (GetView().GetDrawFuncPtr())
393  {
395  GetView().SetDrawFuncPtr(nullptr);
396  }
397  GetView().LeaveDrawCreate(); // Switch to selection mode
398  }
399 
400  if (pSh->IsSelFrameMode())
401  {
402  pSh->LeaveSelFrameMode();
403  // #105852# FME
404  }
405  }
406  break;
407 
408  case SID_GROUP:
409  if (pSh->IsObjSelected() > 1 && pSh->IsGroupAllowed())
410  {
411  pSh->GroupSelection();
412  rBind.Invalidate(SID_UNGROUP);
413  }
414  break;
415 
416  case SID_UNGROUP:
417  if (pSh->IsGroupSelected() && pSh->IsUnGroupAllowed())
418  {
419  pSh->UnGroupSelection();
420  rBind.Invalidate(SID_GROUP);
421  }
422  break;
423 
424  case SID_ENTER_GROUP:
425  if (pSh->IsGroupSelected())
426  {
427  pSdrView->EnterMarkedGroup();
428  rBind.InvalidateAll(false);
429  }
430  break;
431 
432  case SID_LEAVE_GROUP:
433  if (pSdrView->IsGroupEntered())
434  {
435  pSdrView->LeaveOneGroup();
436  rBind.Invalidate(SID_ENTER_GROUP);
437  rBind.Invalidate(SID_UNGROUP);
438  }
439  break;
440 
441  case SID_OBJECT_ALIGN_LEFT:
442  case SID_OBJECT_ALIGN_CENTER:
443  case SID_OBJECT_ALIGN_RIGHT:
444  case SID_OBJECT_ALIGN_UP:
445  case SID_OBJECT_ALIGN_MIDDLE:
446  case SID_OBJECT_ALIGN_DOWN:
447  {
448  if ( bAlignPossible )
449  {
450  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
451  if ( rMarkList.GetMarkCount() == 1 )
452  {
453  sal_Int16 nHorizOrient = -1, nVertOrient = -1;
454 
455  switch (nSlotId)
456  {
457  case SID_OBJECT_ALIGN_LEFT:
458  nHorizOrient = text::HoriOrientation::LEFT;
459  break;
460  case SID_OBJECT_ALIGN_CENTER:
461  nHorizOrient = text::HoriOrientation::CENTER;
462  break;
463  case SID_OBJECT_ALIGN_RIGHT:
464  nHorizOrient = text::HoriOrientation::RIGHT;
465  break;
466  case SID_OBJECT_ALIGN_UP:
467  nVertOrient = text::VertOrientation::TOP;
468  break;
469  case SID_OBJECT_ALIGN_MIDDLE:
470  nVertOrient = text::VertOrientation::CENTER;
471  break;
472  case SID_OBJECT_ALIGN_DOWN:
473  nVertOrient = text::VertOrientation::BOTTOM;
474  break;
475  default:
476  break;
477  }
478 
479  if (nHorizOrient != -1)
480  {
481  pSh->StartAction();
482  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
483  SwFrameFormat* pFrameFormat = FindFrameFormat( pObj );
484  SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
485  aHOrient.SetHoriOrient( nHorizOrient );
486  pFrameFormat->SetFormatAttr(aHOrient);
487  pSh->EndAction();
488  }
489 
490  if (nVertOrient != -1)
491  {
492  pSh->StartAction();
493  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
494  SwFrameFormat* pFrameFormat = FindFrameFormat( pObj );
495  SwFormatVertOrient aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
496  aVOrient.SetVertOrient( nVertOrient );
497  pFrameFormat->SetFormatAttr(aVOrient);
498  pSh->EndAction();
499  }
500 
501  break;
502  }
503 
504  pSh->StartAction();
505  switch (nSlotId)
506  {
507  case SID_OBJECT_ALIGN_LEFT:
508  pSdrView->AlignMarkedObjects(SdrHorAlign::Left, SdrVertAlign::NONE);
509  break;
510  case SID_OBJECT_ALIGN_CENTER:
511  pSdrView->AlignMarkedObjects(SdrHorAlign::Center, SdrVertAlign::NONE);
512  break;
513  case SID_OBJECT_ALIGN_RIGHT:
514  pSdrView->AlignMarkedObjects(SdrHorAlign::Right, SdrVertAlign::NONE);
515  break;
516  case SID_OBJECT_ALIGN_UP:
517  pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Top);
518  break;
519  case SID_OBJECT_ALIGN_MIDDLE:
520  pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Center);
521  break;
522  case SID_OBJECT_ALIGN_DOWN:
523  pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Bottom);
524  break;
525  }
526  pSh->EndAction();
527  }
528  }
529  break;
530 
531  case FN_FRAME_UP:
532  bTopParam = false;
533  [[fallthrough]];
534  case SID_FRAME_TO_TOP:
535  pSh->SelectionToTop( bTopParam );
536  break;
537 
538  case FN_FRAME_DOWN:
539  bBottomParam = false;
540  [[fallthrough]];
541  case SID_FRAME_TO_BOTTOM:
542  pSh->SelectionToBottom( bBottomParam );
543  break;
544 
545  case FN_NAME_SHAPE:
546  {
547  bDone = true;
548 
549  if(1 == pSdrView->GetMarkedObjectCount())
550  {
551  // #i68101#
552  SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0);
553  OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)");
554  OUString aName(pSelected->GetName());
555 
557  ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(GetView().GetFrameWeld(), aName));
558 
559  pDlg->SetCheckNameHdl(LINK(this, SwDrawBaseShell, CheckGroupShapeNameHdl));
560 
561  if(RET_OK == pDlg->Execute())
562  {
563  pDlg->GetName(aName);
564  pSelected->SetName(aName);
565  pSh->SetModified();
566  }
567  }
568 
569  break;
570  }
571 
572  // #i68101#
574  {
575  bDone = true;
576 
577  if(1 == pSdrView->GetMarkedObjectCount())
578  {
579  SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0);
580  OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)");
581  OUString aTitle(pSelected->GetTitle());
582  OUString aDescription(pSelected->GetDescription());
583 
585  ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(GetView().GetFrameWeld(),
586  aTitle, aDescription));
587 
588  if(RET_OK == pDlg->Execute())
589  {
590  pDlg->GetTitle(aTitle);
591  pDlg->GetDescription(aDescription);
592 
593  pSelected->SetTitle(aTitle);
594  pSelected->SetDescription(aDescription);
595 
596  pSh->SetModified();
597  }
598  }
599 
600  break;
601  }
602 
603  default:
604  OSL_ENSURE(false, "wrong Dispatcher");
605  return;
606  }
607  if(!bDone)
608  {
609  if(nSlotId >= SID_OBJECT_ALIGN_LEFT && nSlotId <= SID_OBJECT_ALIGN_DOWN)
610  rBind.Invalidate(SID_ATTR_LONG_LRSPACE);
611  if (pSdrView->GetModel()->IsChanged())
612  pSh->SetModified();
613  else if (bChanged)
614  pSdrView->GetModel()->SetChanged();
615  }
616 }
617 
618 // Checks whether a given name is allowed for a group shape
619 
620 IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxObjectNameDialog&, rNameDialog, bool )
621 {
622  SwWrtShell &rSh = GetShell();
623  SdrView *pSdrView = rSh.GetDrawView();
624  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
625  OSL_ENSURE(rMarkList.GetMarkCount() == 1, "wrong draw selection");
626  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
627  const OUString sCurrentName = pObj->GetName();
628  OUString sNewName;
629  rNameDialog.GetName(sNewName);
630  bool bRet = false;
631  if (sNewName.isEmpty() || sCurrentName == sNewName)
632  bRet = true;
633  else
634  {
635  bRet = true;
637  SdrObjListIter aIter( pModel->GetPage(0), SdrIterMode::DeepWithGroups );
638  while( aIter.IsMore() )
639  {
640  SdrObject* pTempObj = aIter.Next();
641  if ( pObj != pTempObj && pTempObj->GetName() == sNewName )
642  {
643  bRet = false;
644  break;
645  }
646  }
647  }
648  return bRet;
649 }
650 
652 {
653  SwWrtShell &rSh = GetShell();
654  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
655  SfxWhichIter aIter( rSet );
656  sal_uInt16 nWhich = aIter.FirstWhich();
658 
659  if (!bProtected) // Look in the parent
661 
662  while( nWhich )
663  {
664  switch( nWhich )
665  {
666  case FN_DRAW_WRAP_DLG:
667  case SID_ATTR_TRANSFORM:
668  case SID_FRAME_TO_TOP:
669  case SID_FRAME_TO_BOTTOM:
670  case FN_FRAME_UP:
671  case FN_FRAME_DOWN:
672  case SID_DELETE:
673  case FN_BACKSPACE:
674  if( bProtected || !rSh.IsObjSelected() )
675  rSet.DisableItem( nWhich );
676  break;
677  case SID_GROUP:
678  if ( rSh.IsObjSelected() < 2 || bProtected || !rSh.IsGroupAllowed() )
679  rSet.DisableItem( nWhich );
680  break;
681  case SID_UNGROUP:
682  if ( !rSh.IsGroupSelected() || bProtected || !rSh.IsUnGroupAllowed() )
683  rSet.DisableItem( nWhich );
684  break;
685  case SID_ENTER_GROUP:
686  if ( !rSh.IsGroupSelected() )
687  rSet.DisableItem( nWhich );
688  break;
689  case SID_LEAVE_GROUP:
690  if ( !pSdrView->IsGroupEntered() )
691  rSet.DisableItem( nWhich );
692  break;
693  case SID_OBJECT_ALIGN_LEFT:
694  case SID_OBJECT_ALIGN_CENTER:
695  case SID_OBJECT_ALIGN_RIGHT:
696  case SID_OBJECT_ALIGN_UP:
697  case SID_OBJECT_ALIGN_MIDDLE:
698  case SID_OBJECT_ALIGN_DOWN:
699  case SID_OBJECT_ALIGN:
700  if ( !rSh.IsAlignPossible() || bProtected )
701  rSet.DisableItem( nWhich );
702  else if ( rSh.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
703  {
704  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
705  //if only one object is selected it can only be vertically
706  // aligned because it is character bound
707  if( rMarkList.GetMarkCount() == 1 )
708  {
709  rSet.DisableItem(SID_OBJECT_ALIGN_LEFT);
710  rSet.DisableItem(SID_OBJECT_ALIGN_CENTER);
711  rSet.DisableItem(SID_OBJECT_ALIGN_RIGHT);
712  }
713  }
714  break;
715 
716  case FN_NAME_SHAPE :
717  {
718  if(1 != pSdrView->GetMarkedObjectCount())
719  {
720  rSet.DisableItem( nWhich );
721  }
722  }
723  break;
724 
725  // #i68101#
727  {
728  const bool bIsWebView(nullptr != dynamic_cast<SwWebView*>(&GetView()));
729 
730  if(!bIsWebView && 1 != pSdrView->GetMarkedObjectCount())
731  {
732  rSet.DisableItem( nWhich );
733  }
734  }
735  break;
736  }
737  nWhich = aIter.NextWhich();
738  }
739 }
740 
742 {
743  SwWrtShell *pSh = &GetShell();
744  SdrView* pSdrView = pSh->GetDrawView();
745  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
746  if( rMarkList.GetMark(0) != nullptr )
747  {
748  SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
749  rSet.Put(aNewAttr,false);
750  }
751 }
752 
753 bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
754 {
756 
757  if (bDisable)
758  {
759  if (nWhich)
760  rSet.DisableItem( nWhich );
761  else
762  {
763  SfxWhichIter aIter( rSet );
764  nWhich = aIter.FirstWhich();
765  while (nWhich)
766  {
767  rSet.DisableItem( nWhich );
768  nWhich = aIter.NextWhich();
769  }
770  }
771  }
772 
773  return bDisable;
774 }
775 
777 {
778  SwWrtShell *pSh = &GetShell();
779  SdrView* pSdrView = pSh->GetDrawView();
780  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
781  const size_t nMarkCount = rMarkList.GetMarkCount();
782  bool bShowArea = true, bShowMeasure = true;
783 
784  for (size_t i = 0; i < nMarkCount && i < 50; ++i)
785  {
786  SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
787  sal_uInt16 nObjType = pObj->GetObjIdentifier();
788 
789  if ( nObjType != OBJ_MEASURE )
790  bShowMeasure = false;
791 
792  // If marked object is 2D, disable format area command.
793  if ( nObjType == OBJ_PLIN ||
794  nObjType == OBJ_LINE ||
795  nObjType == OBJ_PATHLINE ||
796  nObjType == OBJ_FREELINE ||
797  nObjType == OBJ_EDGE ||
798  nObjType == OBJ_CARC ||
799  bShowMeasure )
800  bShowArea = false;
801 
802  if (!bShowArea && !bShowMeasure)
803  break;
804  }
805 
806  if (!bShowArea)
807  rSet.DisableItem(SID_ATTRIBUTES_AREA);
808 
809  if (!bShowMeasure)
810  rSet.DisableItem(SID_MEASURE_DLG);
811 
812  Disable(rSet);
813 
814 }
815 
816 // Validate of drawing positions
817 
818 IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValidation, void )
819 {
820  SwWrtShell *pSh = &GetShell();
821  rValidation.nMinHeight = MINFLY;
822  rValidation.nMinWidth = MINFLY;
823 
824  SwRect aBoundRect;
825 
826  // OD 18.09.2003 #i18732# - adjustment for allowing vertical position
827  // aligned to page for fly frame anchored to paragraph or to character.
828  const RndStdIds eAnchorType = rValidation.nAnchorType;
829  const SwPosition* pContentPos = nullptr;
830  SdrView* pSdrView = pSh->GetDrawView();
831  const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
832  if( rMarkList.GetMarkCount() == 1 )
833  {
834  SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
835  SwFrameFormat* pFrameFormat = FindFrameFormat( pObj );
836  pContentPos = pFrameFormat->GetAnchor().GetContentAnchor();
837  }
838 
839  pSh->CalcBoundRect( aBoundRect, eAnchorType,
840  rValidation.nHRelOrient,
841  rValidation.nVRelOrient,
842  pContentPos,
843  rValidation.bFollowTextFlow,
844  rValidation.bMirror, nullptr, &rValidation.aPercentSize);
845 
846  bool bIsInVertical( false );
847  {
848  bool bRTL;
849  bool bVertL2R;
850  bIsInVertical = pSh->IsFrameVertical(true, bRTL, bVertL2R);
851  }
852  if(bIsInVertical)
853  {
854  Point aPos(aBoundRect.Pos());
855  long nTmp = aPos.X();
856  aPos.setX( aPos.Y() );
857  aPos.setY( nTmp );
858  Size aSize(aBoundRect.SSize());
859  nTmp = aSize.Width();
860  aSize.setWidth( aSize.Height() );
861  aSize.setHeight( nTmp );
862  aBoundRect.Chg( aPos, aSize );
863  //exchange width/height to enable correct values
864  nTmp = rValidation.nWidth;
865  rValidation.nWidth = rValidation.nHeight;
866  rValidation.nHeight = nTmp;
867  }
868  if ((eAnchorType == RndStdIds::FLY_AT_PAGE) || (eAnchorType == RndStdIds::FLY_AT_FLY))
869  {
870  // MinimalPosition
871  rValidation.nMinHPos = aBoundRect.Left();
872  rValidation.nMinVPos = aBoundRect.Top();
873  SwTwips nH = rValidation.nHPos;
874  SwTwips nV = rValidation.nVPos;
875 
876  if (rValidation.nHPos + rValidation.nWidth > aBoundRect.Right())
877  {
878  if (rValidation.nHoriOrient == text::HoriOrientation::NONE)
879  {
880  rValidation.nHPos -= ((rValidation.nHPos + rValidation.nWidth) - aBoundRect.Right());
881  nH = rValidation.nHPos;
882  }
883  else
884  rValidation.nWidth = aBoundRect.Right() - rValidation.nHPos;
885  }
886 
887  if (rValidation.nHPos + rValidation.nWidth > aBoundRect.Right())
888  rValidation.nWidth = aBoundRect.Right() - rValidation.nHPos;
889 
890  if (rValidation.nVPos + rValidation.nHeight > aBoundRect.Bottom())
891  {
892  if (rValidation.nVertOrient == text::VertOrientation::NONE)
893  {
894  rValidation.nVPos -= ((rValidation.nVPos + rValidation.nHeight) - aBoundRect.Bottom());
895  nV = rValidation.nVPos;
896  }
897  else
898  rValidation.nHeight = aBoundRect.Bottom() - rValidation.nVPos;
899  }
900 
901  if (rValidation.nVPos + rValidation.nHeight > aBoundRect.Bottom())
902  rValidation.nHeight = aBoundRect.Bottom() - rValidation.nVPos;
903 
904  if ( rValidation.nVertOrient != text::VertOrientation::NONE )
905  nV = aBoundRect.Top();
906 
907  if ( rValidation.nHoriOrient != text::HoriOrientation::NONE )
908  nH = aBoundRect.Left();
909 
910  rValidation.nMaxHPos = aBoundRect.Right() - rValidation.nWidth;
911  rValidation.nMaxHeight = aBoundRect.Bottom() - nV;
912 
913  rValidation.nMaxVPos = aBoundRect.Bottom() - rValidation.nHeight;
914  rValidation.nMaxWidth = aBoundRect.Right() - nH;
915  }
916  else if ((eAnchorType == RndStdIds::FLY_AT_PARA) || (eAnchorType == RndStdIds::FLY_AT_CHAR))
917  {
918  if (rValidation.nHPos + rValidation.nWidth > aBoundRect.Right())
919  {
920  if (rValidation.nHoriOrient == text::HoriOrientation::NONE)
921  {
922  rValidation.nHPos -= ((rValidation.nHPos + rValidation.nWidth) - aBoundRect.Right());
923  }
924  else
925  rValidation.nWidth = aBoundRect.Right() - rValidation.nHPos;
926  }
927 
928  // OD 29.09.2003 #i17567#, #i18732# - consider following the text flow
929  // and alignment at page areas.
930  const bool bMaxVPosAtBottom = !rValidation.bFollowTextFlow ||
931  rValidation.nVRelOrient == text::RelOrientation::PAGE_FRAME ||
932  rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
933  {
934  SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
935  ? aBoundRect.Bottom()
936  : aBoundRect.Height() ) -
937  rValidation.nHeight;
938  if ( rValidation.nVPos > nTmpMaxVPos )
939  {
940  if (rValidation.nVertOrient == text::VertOrientation::NONE)
941  {
942  rValidation.nVPos = nTmpMaxVPos;
943  }
944  else
945  {
946  rValidation.nHeight = ( bMaxVPosAtBottom
947  ? aBoundRect.Bottom()
948  : aBoundRect.Height() ) - rValidation.nVPos;
949  }
950  }
951  }
952 
953  rValidation.nMinHPos = aBoundRect.Left();
954  rValidation.nMaxHPos = aBoundRect.Right() - rValidation.nWidth;
955 
956  rValidation.nMinVPos = aBoundRect.Top();
957  // OD 26.09.2003 #i17567#, #i18732# - determine maximum vertical position
958  if ( bMaxVPosAtBottom )
959  {
960  rValidation.nMaxVPos = aBoundRect.Bottom() - rValidation.nHeight;
961  }
962  else
963  {
964  rValidation.nMaxVPos = aBoundRect.Height() - rValidation.nHeight;
965  }
966 
967  // Maximum width height
968  const SwTwips nH = ( rValidation.nHoriOrient != text::HoriOrientation::NONE )
969  ? aBoundRect.Left()
970  : rValidation.nHPos;
971  const SwTwips nV = ( rValidation.nVertOrient != text::VertOrientation::NONE )
972  ? aBoundRect.Top()
973  : rValidation.nVPos;
974  rValidation.nMaxHeight = rValidation.nMaxVPos + rValidation.nHeight - nV;
975  rValidation.nMaxWidth = rValidation.nMaxHPos + rValidation.nWidth - nH;
976  }
977  else if (eAnchorType == RndStdIds::FLY_AS_CHAR)
978  {
979  rValidation.nMinHPos = 0;
980  rValidation.nMaxHPos = 0;
981 
982  rValidation.nMaxHeight = aBoundRect.Height();
983  rValidation.nMaxWidth = aBoundRect.Width();
984 
985  rValidation.nMaxVPos = aBoundRect.Height();
986  rValidation.nMinVPos = -aBoundRect.Height() + rValidation.nHeight;
987  if (rValidation.nMaxVPos < rValidation.nMinVPos)
988  {
989  rValidation.nMinVPos = rValidation.nMaxVPos;
990  rValidation.nMaxVPos = -aBoundRect.Height();
991  }
992  }
993  if(bIsInVertical)
994  {
995  //restore width/height exchange
996  long nTmp = rValidation.nWidth;
997  rValidation.nWidth = rValidation.nHeight;
998  rValidation.nHeight = nTmp;
999  }
1000 
1001  if (rValidation.nMaxWidth < rValidation.nWidth)
1002  rValidation.nWidth = rValidation.nMaxWidth;
1003  if (rValidation.nMaxHeight < rValidation.nHeight)
1004  rValidation.nHeight = rValidation.nMaxHeight;
1005 }
1006 
1007 /* 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:741
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:57
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:2623
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:144
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:88
const SwView & GetView() const
Definition: wrtsh.hxx:426
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:3801
virtual VclPtr< AbstractSvxTransformTabDialog > CreateSvxTransformTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, const SdrView *pView, SvxAnchorIds nAnchorTypes=SvxAnchorIds::NONE)=0
void Edit()
Definition: wrtsh1.cxx:150
#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:651
#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:58
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
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:351
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:753
SwDocShell * GetDocShell()
Definition: view.cxx:1115
bool IsChanged() const
void DisableState(SfxItemSet &rSet)
Definition: drwbassh.cxx:776
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 reset(reference_type *pBody)
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:350
bool IsObjectSelect() const
Definition: edtwin.hxx:207
unsigned char sal_uInt8
void Width(long nNew)
Definition: swrect.hxx:185
static void ClearSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:3813
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:640
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:215
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:424
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:620
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:422
Definition: view.hxx:146
bool SetDrawingAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1110
bool IsSelFrameMode() const
Definition: wrtsh.hxx:168