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