LibreOffice Module sw (master)  1
frmsh.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 <config_features.h>
21 
22 #include <hintids.hxx>
23 #include <svl/whiter.hxx>
24 #include <sfx2/viewfrm.hxx>
25 #include <basic/sbstar.hxx>
26 #include <svl/ptitem.hxx>
27 #include <svl/stritem.hxx>
28 #include <svl/intitem.hxx>
29 #include <svl/eitem.hxx>
30 #include <editeng/colritem.hxx>
31 #include <editeng/lineitem.hxx>
32 #include <editeng/boxitem.hxx>
33 #include <sfx2/dispatch.hxx>
34 #include <sfx2/request.hxx>
35 #include <sfx2/objface.hxx>
36 #include <vcl/EnumContext.hxx>
37 #include <svx/hlnkitem.hxx>
38 #include <svx/svdview.hxx>
39 #include <svx/sdangitm.hxx>
41 #include <sal/log.hxx>
42 
43 #include <doc.hxx>
44 #include <drawdoc.hxx>
47 #include <fmturl.hxx>
48 #include <fmtclds.hxx>
49 #include <fmtcnct.hxx>
50 #include <swmodule.hxx>
51 #include <wrtsh.hxx>
52 #include <wview.hxx>
53 #include <uitool.hxx>
54 #include <frmfmt.hxx>
55 #include <frmsh.hxx>
56 #include <frmmgr.hxx>
57 #include <edtwin.hxx>
58 #include <swdtflvr.hxx>
59 #include <viewopt.hxx>
60 
61 #include <cmdid.h>
62 #include <strings.hrc>
63 #include <swabstdlg.hxx>
64 
65 #include <svx/svxdlg.hxx>
66 
67 #include <docsh.hxx>
68 #include <svx/drawitem.hxx>
69 #include <memory>
70 
71 #define ShellClass_SwFrameShell
72 #include <sfx2/msg.hxx>
73 #include <swslots.hxx>
74 #include <grfatr.hxx>
75 #include <fldmgr.hxx>
76 #include <flyfrm.hxx>
77 
78 using ::editeng::SvxBorderLine;
79 using namespace ::com::sun::star;
80 using namespace ::com::sun::star::uno;
81 
82 // Prototypes
83 static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine);
84 static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell const & rSh, std::u16string_view rName)
85 {
86  const size_t nCount = rSh.GetFlyCount(FLYCNTTYPE_FRM);
87  for( size_t i = 0; i < nCount; ++i )
88  {
89  const SwFrameFormat* pFormat = rSh.GetFlyNum(i, FLYCNTTYPE_FRM);
90  if(pFormat->GetName() == rName)
91  return pFormat;
92  }
93  return nullptr;
94 }
95 
97 
98 void SwFrameShell::InitInterface_Impl()
99 {
100  GetStaticInterface()->RegisterPopupMenu("frame");
101 
102  GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Frame_Toolbox);
103 }
104 
106 {
107  SwWrtShell& rSh = GetShell();
108  sal_uInt16 nSlot = rReq.GetSlot();
109  switch (nSlot)
110  {
111  case SID_SELECTALL:
112  rSh.SelAll();
113  rReq.Done();
114  break;
115  }
116 }
117 
119 {
120  SwWrtShell& rSh = GetShell();
121  sal_uInt16 nSlot = rReq.GetSlot();
122  switch (nSlot)
123  {
124  case FN_POSTIT:
125  SwFieldMgr aFieldMgr(&rSh);
126  rSh.InsertPostIt(aFieldMgr, rReq);
127  break;
128  }
129 }
130 
132 {
133  //First those who do not need FrameMgr.
134  SwWrtShell &rSh = GetShell();
135  bool bMore = false;
136  const SfxItemSet* pArgs = rReq.GetArgs();
137  const SfxPoolItem* pItem;
138  sal_uInt16 nSlot = rReq.GetSlot();
139 
140  switch ( nSlot )
141  {
142  case FN_FRAME_TO_ANCHOR:
143  if ( rSh.IsFrameSelected() )
144  {
145  rSh.GotoFlyAnchor();
146  rSh.EnterStdMode();
147  rSh.CallChgLnk();
148  }
149  break;
150  case SID_FRAME_TO_TOP:
151  rSh.SelectionToTop();
152  break;
153 
154  case SID_FRAME_TO_BOTTOM:
155  rSh.SelectionToBottom();
156  break;
157 
158  case FN_FRAME_UP:
159  rSh.SelectionToTop( false );
160  break;
161 
162  case FN_FRAME_DOWN:
163  rSh.SelectionToBottom( false );
164  break;
165  case FN_INSERT_FRAME:
166  if (!pArgs)
167  {
168  // Frame already exists, open frame dialog for editing.
169  SfxStringItem aDefPage(FN_FORMAT_FRAME_DLG, "columns");
172  SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
173  { &aDefPage });
174 
175  }
176  else
177  {
178  // Frame already exists, only the number of columns will be changed.
179  sal_uInt16 nCols = 1;
180  if(const SfxUInt16Item* pColsItem = pArgs->GetItemIfSet(SID_ATTR_COLUMNS, false))
181  nCols = pColsItem->GetValue();
182 
184  rSh.GetFlyFrameAttr( aSet );
185  SwFormatCol aCol(aSet.Get(RES_COL));
186  // GutterWidth will not always passed, hence get firstly
187  // (see view2: Execute on this slot)
188  sal_uInt16 nGutterWidth = aCol.GetGutterWidth();
189  if(!nCols )
190  nCols++;
191  aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth());
192  aSet.Put(aCol);
193  // Template AutoUpdate
194  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
195  if(pFormat && pFormat->IsAutoUpdateFormat())
196  {
197  rSh.AutoUpdateFrame(pFormat, aSet);
198  }
199  else
200  {
201  rSh.StartAllAction();
202  rSh.SetFlyFrameAttr( aSet );
203  rSh.SetModified();
204  rSh.EndAllAction();
205  }
206 
207  }
208  return;
209 
210  case SID_HYPERLINK_SETLINK:
211  {
212  if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, false, &pItem))
213  {
214  const SvxHyperlinkItem& rHLinkItem = *static_cast<const SvxHyperlinkItem *>(pItem);
215  const OUString& rURL = rHLinkItem.GetURL();
216  const OUString& rTarget = rHLinkItem.GetTargetFrame();
217 
219  rSh.GetFlyFrameAttr( aSet );
220  SwFormatURL aURL( aSet.Get( RES_URL ) );
221 
222  OUString sOldName(rHLinkItem.GetName().toAsciiUpperCase());
223  OUString sFlyName(rSh.GetFlyName().toAsciiUpperCase());
224  if (sOldName != sFlyName)
225  {
226  OUString sName(sOldName);
227  sal_uInt16 i = 1;
228  while (rSh.FindFlyByName(sName))
229  {
230  sName = sOldName + "_" + OUString::number(i++);
231  }
232  rSh.SetFlyName(sName);
233  }
234  aURL.SetURL( rURL, false );
235  aURL.SetTargetFrameName(rTarget);
236 
237  aSet.Put( aURL );
238  rSh.SetFlyFrameAttr( aSet );
239  }
240  }
241  break;
242 
243  case FN_FRAME_CHAIN:
245  break;
246 
247  case FN_FRAME_UNCHAIN:
248  rSh.Unchain( *rSh.GetFlyFrameFormat() );
250  break;
252  {
254  break;
255  }
257  {
259  rReq.Done();
260  break;
261  }
262  case SID_OPEN_XML_FILTERSETTINGS:
263  {
265  }
266  break;
267  case FN_WORDCOUNT_DIALOG:
268  {
269  GetView().UpdateWordCount(this, nSlot);
270  break;
271  }
272  default: bMore = true;
273  }
274 
275  if ( !bMore )
276  {
277  return;
278  }
279 
280  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE, nullptr );
281  bool bUpdateMgr = true;
282  bool bCopyToFormat = false;
283  switch ( nSlot )
284  {
285  case SID_OBJECT_ALIGN_MIDDLE:
287  aMgr.SetVertOrientation( text::VertOrientation::CENTER );
288  break;
289  case SID_OBJECT_ALIGN_DOWN :
291  aMgr.SetVertOrientation( text::VertOrientation::BOTTOM );
292  break;
293  case SID_OBJECT_ALIGN_UP :
295  aMgr.SetVertOrientation( text::VertOrientation::TOP );
296  break;
297 
299  aMgr.SetVertOrientation( text::VertOrientation::CHAR_CENTER );
300  break;
301 
303  aMgr.SetVertOrientation( text::VertOrientation::CHAR_BOTTOM );
304  break;
305 
307  aMgr.SetVertOrientation( text::VertOrientation::CHAR_TOP );
308  break;
309 
311  aMgr.SetVertOrientation( text::VertOrientation::LINE_CENTER );
312  break;
313 
315  aMgr.SetVertOrientation( text::VertOrientation::LINE_BOTTOM );
316  break;
317 
319  aMgr.SetVertOrientation( text::VertOrientation::LINE_TOP );
320  break;
321  case SID_OBJECT_ALIGN_CENTER :
323  aMgr.SetHorzOrientation( text::HoriOrientation::CENTER );
324  break;
325  case SID_OBJECT_ALIGN_RIGHT:
327  aMgr.SetHorzOrientation( text::HoriOrientation::RIGHT );
328  break;
329  case SID_OBJECT_ALIGN_LEFT:
331  aMgr.SetHorzOrientation( text::HoriOrientation::LEFT );
332  break;
333 
334  case FN_SET_FRM_POSITION:
335  {
336  aMgr.SetAbsPos(static_cast<const SfxPointItem &>(pArgs->Get
338  }
339  break;
340  case SID_ATTR_BRUSH:
341  {
342  if(pArgs)
343  {
344  aMgr.SetAttrSet( *pArgs );
345  bCopyToFormat = true;
346  }
347  }
348  break;
349  case SID_ATTR_ULSPACE:
350  case SID_ATTR_LRSPACE:
351  {
352  if(pArgs && SfxItemState::SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem))
353  {
354  aMgr.SetAttrSet( *pArgs );
355  bCopyToFormat = true;
356  }
357  }
358  break;
359 
360  case SID_ATTR_TRANSFORM:
361  {
362  bool bApplyNewPos = false;
363  bool bApplyNewSize = false;
364 
365  Point aNewPos = aMgr.GetPos();
366  if (pArgs)
367  {
368  if (const SfxInt32Item* pXItem = pArgs->GetItemIfSet(SID_ATTR_TRANSFORM_POS_X, false))
369  {
370  aNewPos.setX( pXItem->GetValue() );
371  bApplyNewPos = true;
372  }
373  if (const SfxInt32Item* pYItem = pArgs->GetItemIfSet(SID_ATTR_TRANSFORM_POS_Y, false))
374  {
375  aNewPos.setY( pYItem->GetValue() );
376  bApplyNewPos = true;
377  }
378  }
379 
380  Size aNewSize = aMgr.GetSize();
381  if (pArgs)
382  {
383  if (const SfxUInt32Item* pWidthItem = pArgs->GetItemIfSet(SID_ATTR_TRANSFORM_WIDTH, false))
384  {
385  aNewSize.setWidth( pWidthItem->GetValue() );
386  bApplyNewSize = true;
387  }
388  if (const SfxUInt32Item* pHeightItem = pArgs->GetItemIfSet(SID_ATTR_TRANSFORM_HEIGHT, false))
389  {
390  aNewSize.setHeight( pHeightItem->GetValue() );
391  bApplyNewSize = true;
392  }
393  }
394 
395  if (pArgs && (pArgs->HasItem(SID_ATTR_TRANSFORM_ANGLE) || pArgs->HasItem(SID_ATTR_TRANSFORM_DELTA_ANGLE)))
396  {
398  rSh.GetCurAttr(aSet);
399  const SwRotationGrf& rRotation = aSet.Get(RES_GRFATR_ROTATION);
400  const Degree10 nOldRot(rRotation.GetValue());
401 
402  if (const SdrAngleItem* pAngleItem = pArgs->GetItemIfSet(SID_ATTR_TRANSFORM_DELTA_ANGLE, false))
403  {
404  const Degree10 nDeltaRot = to<Degree10>(pAngleItem->GetValue());
405  aMgr.SetRotation(nOldRot, nOldRot + nDeltaRot, rRotation.GetUnrotatedSize());
406  }
407 
408  // RotGrfFlyFrame: Get Value and disable is in SwGrfShell::GetAttrStateForRotation, but the
409  // value setter uses SID_ATTR_TRANSFORM and a group of three values. Rotation is
410  // added now, so use it in this central place. Do no forget to convert angle from
411  // 100th degrees in SID_ATTR_TRANSFORM_ANGLE to 10th degrees in RES_GRFATR_ROTATION
412  if (const SdrAngleItem* pTransformItem = pArgs->GetItemIfSet(SID_ATTR_TRANSFORM_ANGLE, false))
413  {
414  const Degree10 nNewRot = to<Degree10>(pTransformItem->GetValue());
415 
416  // RotGrfFlyFrame: Rotation change here, SwFlyFrameAttrMgr aMgr is available
417  aMgr.SetRotation(nOldRot, nNewRot, rRotation.GetUnrotatedSize());
418  }
419  }
420 
421  if (bApplyNewPos)
422  {
423  aMgr.SetAbsPos(aNewPos);
424  }
425  if ( bApplyNewSize )
426  {
427  aMgr.SetSize( aNewSize );
428  }
429  if (!bApplyNewPos && !bApplyNewSize)
430  {
431  bUpdateMgr = false;
432  }
433 
434  }
435  break;
436 
437  case FN_FORMAT_FRAME_DLG:
438  case FN_DRAW_WRAP_DLG:
439  {
440  const SelectionType nSel = rSh.GetSelectionType();
441  if (nSel & SelectionType::Graphic)
442  {
444  bUpdateMgr = false;
445  }
446  else
447  {
450  // FillAttribute support:
452  SID_DOCFRAME, SID_DOCFRAME,
453  SID_ATTR_BRUSH, SID_ATTR_BRUSH,
454  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
455  SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
456  SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
457  // Items to hand over XPropertyList things like
458  // XColorList, XHatchList, XGradientList, and
459  // XBitmapList to the Area TabPage
460  SID_COLOR_TABLE, SID_PATTERN_LIST,
461  SID_HTML_MODE, SID_HTML_MODE,
468 
469  // create needed items for XPropertyList entries from the DrawModel so that
470  // the Area TabPage can access them
472  pDrawModel->PutAreaListItems(aSet);
473 
474  const SwViewOption* pVOpt = rSh.GetViewOptions();
475  if(nSel & SelectionType::Ole)
476  aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
477  aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
478  aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
479  aSet.Put(SfxStringItem(FN_UNO_DESCRIPTION, rSh.GetObjDescription()));
480  if( nSel & SelectionType::Ole )
481  {
482  // #i73249#
483  aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
484  }
485 
486  const SwRect &rPg = rSh.GetAnyCurRect(CurRectType::Page);
487  SwFormatFrameSize aFrameSize(SwFrameSize::Variable, rPg.Width(), rPg.Height());
488  aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
489  aSet.Put(aFrameSize);
490 
491  const SwRect &rPr = rSh.GetAnyCurRect(CurRectType::PagePrt);
492  SwFormatFrameSize aPrtSize(SwFrameSize::Variable, rPr.Width(), rPr.Height());
493  aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA));
494  aSet.Put(aPrtSize);
495 
496  aSet.Put(aMgr.GetAttrSet());
497  aSet.SetParent( aMgr.GetAttrSet().GetParent() );
498 
499  // On % values initialize size
500  SwFormatFrameSize& rSize = const_cast<SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE));
505 
506  // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated
507  aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT,
509  const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
510  aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) );
511 
512  OString sDefPage;
513  const SfxStringItem* pDlgItem;
514  if(pArgs && (pDlgItem = pArgs->GetItemIfSet(FN_FORMAT_FRAME_DLG, false)))
515  sDefPage = OUStringToOString(pDlgItem->GetValue(), RTL_TEXTENCODING_UTF8);
516 
517  aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetFrame()));
518  FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &GetView()) != nullptr );
519  SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) ));
522  nSel & SelectionType::Graphic ? OUString("PictureDialog") :
523  nSel & SelectionType::Ole ? OUString("ObjectDialog"):
524  OUString("FrameDialog"),
525  GetView().GetViewFrame(),
526  GetView().GetFrameWeld(),
527  aSet,
528  false,
529  sDefPage));
530 
531  if ( nSlot == FN_DRAW_WRAP_DLG )
532  {
533  pDlg->SetCurPageId("wrap");
534  }
535 
536  if ( pDlg->Execute() )
537  {
538  const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
539  if(pOutSet)
540  {
541  rReq.Done(*pOutSet);
542  const SfxBoolItem* pRatioItem = nullptr;
543  if(nSel & SelectionType::Ole &&
544  (pRatioItem = pOutSet->GetItemIfSet(FN_KEEP_ASPECT_RATIO)))
545  {
546  SwViewOption aUsrPref( *pVOpt );
547  aUsrPref.SetKeepRatio(pRatioItem->GetValue());
548  SW_MOD()->ApplyUsrPref(aUsrPref, &GetView());
549  }
550  if (const SfxStringItem* pAltNameItem = pOutSet->GetItemIfSet(FN_SET_FRM_ALT_NAME))
551  {
552  // #i73249#
553  rSh.SetObjTitle(pAltNameItem->GetValue());
554  }
555  if (const SfxStringItem* pDescripItem = pOutSet->GetItemIfSet(FN_UNO_DESCRIPTION))
556  rSh.SetObjDescription(pDescripItem->GetValue());
557 
558  // Template AutoUpdate
559  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
560  if(pFormat && pFormat->IsAutoUpdateFormat())
561  {
562  rSh.AutoUpdateFrame(pFormat, *pOutSet);
563  // Anything which is not supported by the format must be set hard.
564  if(const SfxStringItem* pFrameName = pOutSet->GetItemIfSet(FN_SET_FRM_NAME, false))
565  rSh.SetFlyName(pFrameName->GetValue());
568  RES_SURROUND, RES_ANCHOR> aShellSet( GetPool() );
569  aShellSet.Put(*pOutSet);
570  aMgr.SetAttrSet(aShellSet);
571  if(const SfxStringItem* pFrameName = pOutSet->GetItemIfSet(FN_SET_FRM_NAME, false))
572  rSh.SetFlyName(pFrameName->GetValue());
573  }
574  else
575  aMgr.SetAttrSet( *pOutSet );
576 
577  const SwFrameFormat* pCurrFlyFormat = rSh.GetFlyFrameFormat();
578  if(const SfxStringItem* pPreviousItem =
579  pOutSet->GetItemIfSet(FN_PARAM_CHAIN_PREVIOUS, false))
580  {
581  rSh.HideChainMarker();
582 
583  OUString sPrevName = pPreviousItem->GetValue();
584  const SwFormatChain &rChain = pCurrFlyFormat->GetChain();
585  //needs cast - no non-const method available
586  SwFlyFrameFormat* pFlyFormat =
587  rChain.GetPrev();
588  if(pFlyFormat)
589  {
590  if (pFlyFormat->GetName() != sPrevName)
591  {
592  rSh.Unchain(*pFlyFormat);
593  }
594  else
595  sPrevName.clear();
596  }
597 
598  if (!sPrevName.isEmpty())
599  {
600  //needs cast - no non-const method available
601  SwFrameFormat* pPrevFormat = const_cast<SwFrameFormat*>(
602  lcl_GetFrameFormatByName(rSh, sPrevName));
603  SAL_WARN_IF(!pPrevFormat, "sw.ui", "No frame found!");
604  if(pPrevFormat)
605  {
606  rSh.Chain(*pPrevFormat, *pCurrFlyFormat);
607  }
608  }
609  rSh.SetChainMarker();
610  }
611  if(const SfxStringItem* pChainNextItem =
612  pOutSet->GetItemIfSet(FN_PARAM_CHAIN_NEXT, false))
613  {
614  rSh.HideChainMarker();
615  OUString sNextName = pChainNextItem->GetValue();
616  const SwFormatChain &rChain = pCurrFlyFormat->GetChain();
617  //needs cast - no non-const method available
618  SwFlyFrameFormat* pFlyFormat =
619  rChain.GetNext();
620  if(pFlyFormat)
621  {
622  if (pFlyFormat->GetName() != sNextName)
623  {
624  rSh.Unchain(*const_cast<SwFlyFrameFormat*>(static_cast<const SwFlyFrameFormat*>( pCurrFlyFormat)));
625  }
626  else
627  sNextName.clear();
628  }
629 
630  if (!sNextName.isEmpty())
631  {
632  //needs cast - no non-const method available
633  SwFrameFormat* pNextFormat = const_cast<SwFrameFormat*>(
634  lcl_GetFrameFormatByName(rSh, sNextName));
635  SAL_WARN_IF(!pNextFormat, "sw.ui", "No frame found!");
636  if(pNextFormat)
637  {
638  rSh.Chain(*const_cast<SwFrameFormat*>(
639  pCurrFlyFormat), *pNextFormat);
640  }
641  }
642  rSh.SetChainMarker();
643  }
644  }
645  }
646  else
647  bUpdateMgr = false;
648  }
649  }
650  break;
652  {
653  SwFormatHoriOrient aHori(aMgr.GetHoriOrient());
654  bool bMirror = !aHori.IsPosToggle();
655  aHori.SetPosToggle(bMirror);
657  aSet.Put(aHori);
658  aMgr.SetAttrSet(aSet);
659  bCopyToFormat = true;
660  rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
661  }
662  break;
663  case FN_NAME_SHAPE:
664  {
665  bUpdateMgr = false;
666  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
667  if ( pSdrView &&
668  pSdrView->GetMarkedObjectCount() == 1 )
669  {
670  OUString aName(rSh.GetFlyName());
673  pFact->CreateSvxObjectNameDialog(GetView().GetFrameWeld(), aName));
674 
675  if ( pDlg->Execute() == RET_OK )
676  {
677  pDlg->GetName(aName);
678  rSh.SetFlyName(aName);
679  }
680  }
681  }
682  break;
683  // #i73249#
685  {
686  bUpdateMgr = false;
687  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
688  if ( pSdrView &&
689  pSdrView->GetMarkedObjectCount() == 1 )
690  {
691  OUString aDescription(rSh.GetObjDescription());
692  OUString aTitle(rSh.GetObjTitle());
693 
696  pFact->CreateSvxObjectTitleDescDialog(GetView().GetFrameWeld(),
697  aTitle, aDescription ));
698 
699  if ( pDlg->Execute() == RET_OK )
700  {
701  pDlg->GetDescription(aDescription);
702  pDlg->GetTitle(aTitle);
703 
704  rSh.SetObjDescription(aDescription);
705  rSh.SetObjTitle(aTitle);
706  }
707  }
708  }
709  break;
710  default:
711  assert(!"wrong dispatcher");
712  return;
713  }
714  if ( bUpdateMgr )
715  {
716  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
717  if ( bCopyToFormat && pFormat && pFormat->IsAutoUpdateFormat() )
718  {
719  rSh.AutoUpdateFrame(pFormat, aMgr.GetAttrSet());
720  }
721  else
722  {
723  aMgr.UpdateFlyFrame();
724  }
725  }
726 
727 }
728 
730 {
731  SwWrtShell &rSh = GetShell();
732  bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
733  if (!rSh.IsFrameSelected())
734  return;
735 
738  RES_PRINT, RES_HORI_ORIENT> aSet(rSh.GetAttrPool() );
739  rSh.GetFlyFrameAttr( aSet );
740 
743 
744  bProtect |= bParentCntProt;
745 
746  const FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true);
747  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE, nullptr );
748 
749  SfxWhichIter aIter( rSet );
750  sal_uInt16 nWhich = aIter.FirstWhich();
751  while ( nWhich )
752  {
753  switch ( nWhich )
754  {
755  case RES_FRM_SIZE:
756  {
757  const SwFormatFrameSize& aSz(aMgr.GetFrameSize());
758  rSet.Put(aSz);
759  }
760  break;
761  case RES_VERT_ORIENT:
762  case RES_HORI_ORIENT:
763  case SID_ATTR_ULSPACE:
764  case SID_ATTR_LRSPACE:
765  case RES_LR_SPACE:
766  case RES_UL_SPACE:
767  case RES_PROTECT:
768  case RES_OPAQUE:
769  case RES_PRINT:
770  case RES_SURROUND:
771  {
772  rSet.Put(aSet.Get(GetPool().GetWhich(nWhich)));
773  }
774  break;
775  case SID_OBJECT_ALIGN:
776  {
777  if ( bProtect )
778  rSet.DisableItem( nWhich );
779  }
780  break;
781  case SID_OBJECT_ALIGN_LEFT :
782  case SID_OBJECT_ALIGN_CENTER :
783  case SID_OBJECT_ALIGN_RIGHT :
787  if ( (eFrameType & FrameTypeFlags::FLY_INCNT) ||
788  bProtect ||
789  ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) &&
790  bHtmlMode ))
791  {
792  rSet.DisableItem( nWhich );
793  }
794  else
795  {
796  sal_Int16 nHoriOrient = -1;
797  switch(nWhich)
798  {
799  case SID_OBJECT_ALIGN_LEFT:
800  nHoriOrient = text::HoriOrientation::LEFT;
801  break;
802  case SID_OBJECT_ALIGN_CENTER:
803  nHoriOrient = text::HoriOrientation::CENTER;
804  break;
805  case SID_OBJECT_ALIGN_RIGHT:
806  nHoriOrient = text::HoriOrientation::RIGHT;
807  break;
808  default:
809  break;
810  }
811  SwFormatHoriOrient aHOrient(aMgr.GetHoriOrient());
812  if (nHoriOrient != -1)
813  rSet.Put(SfxBoolItem(nWhich, nHoriOrient == aHOrient.GetHoriOrient()));
814  }
815  break;
822  if ( !(eFrameType & FrameTypeFlags::FLY_INCNT) || bProtect
823  || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) )
824  rSet.DisableItem( nWhich );
825  break;
826 
827  case SID_OBJECT_ALIGN_UP :
828  case SID_OBJECT_ALIGN_MIDDLE :
829  case SID_OBJECT_ALIGN_DOWN :
830 
834  if ( bProtect || (bHtmlMode && eFrameType & FrameTypeFlags::FLY_ATCNT))
835  rSet.DisableItem( nWhich );
836  else
837  {
838  // These slots need different labels depending on whether they are anchored in a character
839  // or on a paragraph/page etc.
840  OUString sNewLabel;
841  if (eFrameType & FrameTypeFlags::FLY_INCNT)
842  {
843  switch (nWhich)
844  {
845  case SID_OBJECT_ALIGN_UP :
847  sNewLabel = SwResId(STR_FRMUI_TOP_BASE);
848  break;
849  case SID_OBJECT_ALIGN_MIDDLE :
851  sNewLabel = SwResId(STR_FRMUI_CENTER_BASE);
852  break;
853  case SID_OBJECT_ALIGN_DOWN :
855  if(!bHtmlMode)
856  sNewLabel = SwResId(STR_FRMUI_BOTTOM_BASE);
857  else
858  rSet.DisableItem( nWhich );
859  break;
860  }
861  }
862  else
863  {
864  if (nWhich != FN_FRAME_ALIGN_VERT_TOP &&
865  nWhich != SID_OBJECT_ALIGN_UP )
866  {
867  if (aMgr.GetAnchor() == RndStdIds::FLY_AT_FLY)
868  {
869  const SwFrameFormat* pFormat = rSh.IsFlyInFly();
870  if (pFormat)
871  {
872  const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize();
873  if (rFrameSz.GetHeightSizeType() != SwFrameSize::Fixed)
874  {
875  rSet.DisableItem( nWhich );
876  break;
877  }
878  }
879  }
880  }
881  OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame()->GetFrame().GetFrameInterface()));
882  switch (nWhich)
883  {
884  case SID_OBJECT_ALIGN_UP :
886  {
887  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignTop", aModuleName);
889  break;
890  }
891  case SID_OBJECT_ALIGN_MIDDLE:
893  {
894  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignVerticalCenter", aModuleName);
896  break;
897  }
898  case SID_OBJECT_ALIGN_DOWN:
900  {
901  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignBottom", aModuleName);
903  break;
904  }
905  }
906  }
907  if ( !sNewLabel.isEmpty() )
908  rSet.Put( SfxStringItem( nWhich, sNewLabel ));
909  }
910  break;
911  case SID_HYPERLINK_GETLINK:
912  {
913  SvxHyperlinkItem aHLinkItem;
914 
916  rSh.GetFlyFrameAttr( aURLSet );
917 
918  if(const SwFormatURL* pFormatURL = aURLSet.GetItemIfSet(RES_URL))
919  {
920  aHLinkItem.SetURL(pFormatURL->GetURL());
921  aHLinkItem.SetTargetFrame(pFormatURL->GetTargetFrameName());
922  aHLinkItem.SetName(rSh.GetFlyName());
923  }
924 
925  aHLinkItem.SetInsertMode(static_cast<SvxLinkInsertMode>(aHLinkItem.GetInsertMode() |
926  (bHtmlMode ? HLINK_HTMLMODE : 0)));
927 
928  rSet.Put(aHLinkItem);
929  }
930  break;
931 
932  case FN_FRAME_CHAIN:
933  {
934  const SelectionType nSel = rSh.GetSelectionType();
935  if (nSel & SelectionType::Graphic || nSel & SelectionType::Ole)
936  rSet.DisableItem( FN_FRAME_CHAIN );
937  else
938  {
939  const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat();
940  if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() ||
941  !pFormat || pFormat->GetChain().GetNext() )
942  {
943  rSet.DisableItem( FN_FRAME_CHAIN );
944  }
945  else
946  {
947  bool bChainMode = rSh.GetView().GetEditWin().IsChainMode();
948  rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) );
949  }
950  }
951  }
952  break;
953  case FN_FRAME_UNCHAIN:
954  {
955  const SelectionType nSel = rSh.GetSelectionType();
956  if (nSel & SelectionType::Graphic || nSel & SelectionType::Ole)
958  else
959  {
960  const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat();
961  if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() ||
962  !pFormat || !pFormat->GetChain().GetNext() )
963  {
965  }
966  }
967  }
968  break;
969  case SID_FRAME_TO_TOP:
970  case SID_FRAME_TO_BOTTOM:
971  case FN_FRAME_UP:
972  case FN_FRAME_DOWN:
973  if ( bParentCntProt )
974  rSet.DisableItem( nWhich );
975  break;
976 
977  case SID_ATTR_TRANSFORM:
978  {
979  rSet.DisableItem( nWhich );
980  }
981  break;
982 
983  case SID_ATTR_TRANSFORM_PROTECT_SIZE:
984  {
985  const FlyProtectFlags eProtection = rSh.IsSelObjProtected( FlyProtectFlags::Size );
986  if ( ( eProtection & FlyProtectFlags::Content ) ||
987  ( eProtection & FlyProtectFlags::Size ) )
988  {
989  rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, true ) );
990  }
991  else
992  {
993  rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, false ) );
994  }
995  }
996  break;
997 
998  case SID_ATTR_TRANSFORM_WIDTH:
999  {
1000  rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_WIDTH, aMgr.GetSize().getWidth() ) );
1001  }
1002  break;
1003 
1004  case SID_ATTR_TRANSFORM_HEIGHT:
1005  {
1006  rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_HEIGHT, aMgr.GetSize().getHeight() ) );
1007  }
1008  break;
1009 
1010  case FN_FORMAT_FRAME_DLG:
1011  {
1012  const SelectionType nSel = rSh.GetSelectionType();
1013  if ( bParentCntProt || nSel & SelectionType::Graphic)
1014  rSet.DisableItem( nWhich );
1015  }
1016  break;
1017  // #i73249#
1019  case FN_NAME_SHAPE:
1020  {
1021  SwWrtShell &rWrtSh = GetShell();
1022  SdrView* pSdrView = rWrtSh.GetDrawViewWithValidMarkList();
1023  if ( !pSdrView ||
1024  pSdrView->GetMarkedObjectCount() != 1 )
1025  {
1026  rSet.DisableItem( nWhich );
1027  }
1028  }
1029  break;
1030 
1031  case FN_POSTIT:
1032  {
1033  SwFlyFrame* pFly = rSh.GetSelectedFlyFrame();
1034  if (pFly)
1035  {
1036  SwFrameFormat* pFormat = pFly->GetFormat();
1037  if (pFormat)
1038  {
1039  RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
1040  // SwWrtShell::InsertPostIt() only works on as-char and at-char anchored
1041  // images.
1042  if (eAnchorId != RndStdIds::FLY_AS_CHAR && eAnchorId != RndStdIds::FLY_AT_CHAR)
1043  {
1044  rSet.DisableItem(nWhich);
1045  }
1046  }
1047  }
1048  }
1049  break;
1050 
1051  default:
1052  /* do nothing */;
1053  break;
1054  }
1055  nWhich = aIter.NextWhich();
1056  }
1057 }
1058 
1060  SwBaseShell( _rView )
1061 {
1062  SetName("Frame");
1063 
1064  // #96392# Use this to announce it is the frame shell who creates the selection.
1065  SwTransferable::CreateSelection( _rView.GetWrtShell(), this );
1066 
1068 }
1069 
1071 {
1072  // #96392# Only clear the selection if it was this frame shell who created it.
1074 }
1075 
1077 {
1078  SwWrtShell &rSh = GetShell();
1079  bool bDefault = false;
1080  if (!rSh.IsFrameSelected())
1081  return;
1082  // At first pick the default BoxItem out of the pool.
1083  // If unequal to regular box item, then it has already
1084  // been changed (New one is no default).
1085  const SvxBoxItem* pPoolBoxItem = ::GetDfltAttr(RES_BOX);
1086 
1087  const SfxItemSet *pArgs = rReq.GetArgs();
1089 
1090  rSh.GetFlyFrameAttr( aFrameSet );
1091  const SvxBoxItem& rBoxItem = aFrameSet.Get(RES_BOX);
1092 
1093  if (pPoolBoxItem == &rBoxItem)
1094  bDefault = true;
1095 
1096  std::unique_ptr<SvxBoxItem> aBoxItem(rBoxItem.Clone());
1097 
1098  SvxBorderLine aBorderLine;
1099 
1100  if(pArgs) // Any controller can sometimes deliver nothing #48169#
1101  {
1102  switch (rReq.GetSlot())
1103  {
1104  case SID_ATTR_BORDER:
1105  {
1106  if (const SvxBoxItem* pBoxItem = pArgs->GetItemIfSet(RES_BOX))
1107  {
1108  std::unique_ptr<SvxBoxItem> aNewBox(pBoxItem->Clone());
1109  const SvxBorderLine* pBorderLine;
1110 
1111  pBorderLine = aBoxItem->GetTop();
1112  if (pBorderLine != nullptr)
1113  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1114  pBorderLine = aBoxItem->GetBottom();
1115  if (pBorderLine != nullptr)
1116  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1117  pBorderLine = aBoxItem->GetLeft();
1118  if (pBorderLine != nullptr)
1119  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1120  pBorderLine = aBoxItem->GetRight();
1121  if (pBorderLine != nullptr)
1122  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1123 
1124  if(aBorderLine.GetOutWidth() == 0)
1125  {
1126  aBorderLine.SetBorderLineStyle(
1127  SvxBorderLineStyle::SOLID);
1128  aBorderLine.SetWidth( SvxBorderLineWidth::Hairline );
1129  }
1130  //Set distance only if the request is received from the controller.
1131 
1132 #if HAVE_FEATURE_SCRIPTING
1133  if(!StarBASIC::IsRunning())
1134 #endif
1135  {
1136  // TODO: should this copy 4 individual Dist instead?
1137  aNewBox->SetAllDistances(rBoxItem.GetSmallestDistance());
1138  }
1139 
1140  aBoxItem = std::move(aNewBox);
1141 
1142  if( aBoxItem->GetTop() != nullptr )
1143  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1144  if( aBoxItem->GetBottom() != nullptr )
1145  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1146  if( aBoxItem->GetLeft() != nullptr )
1147  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1148  if( aBoxItem->GetRight() != nullptr )
1149  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1150  }
1151  }
1152  break;
1153 
1154  case SID_FRAME_LINESTYLE:
1155  {
1156  if ( const SvxLineItem* pLineItem = pArgs->GetItemIfSet(SID_FRAME_LINESTYLE, false))
1157  {
1158  if ( pLineItem->GetLine() )
1159  {
1160  aBorderLine = *(pLineItem->GetLine());
1161 
1162  if (!aBoxItem->GetTop() && !aBoxItem->GetBottom() &&
1163  !aBoxItem->GetLeft() && !aBoxItem->GetRight())
1164  {
1165  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1166  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1167  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1168  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1169  }
1170  else
1171  {
1172  if( aBoxItem->GetTop() )
1173  {
1174  aBorderLine.SetColor( aBoxItem->GetTop()->GetColor() );
1175  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1176  }
1177  if( aBoxItem->GetBottom() )
1178  {
1179  aBorderLine.SetColor( aBoxItem->GetBottom()->GetColor());
1180  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1181  }
1182  if( aBoxItem->GetLeft() )
1183  {
1184  aBorderLine.SetColor( aBoxItem->GetLeft()->GetColor());
1185  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1186  }
1187  if( aBoxItem->GetRight() )
1188  {
1189  aBorderLine.SetColor(aBoxItem->GetRight()->GetColor());
1190  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1191  }
1192  }
1193  }
1194  else
1195  {
1196  aBoxItem->SetLine(nullptr, SvxBoxItemLine::TOP);
1197  aBoxItem->SetLine(nullptr, SvxBoxItemLine::BOTTOM);
1198  aBoxItem->SetLine(nullptr, SvxBoxItemLine::LEFT);
1199  aBoxItem->SetLine(nullptr, SvxBoxItemLine::RIGHT);
1200  }
1201  }
1202  }
1203  break;
1204 
1205  case SID_FRAME_LINECOLOR:
1206  {
1207  if (const SvxColorItem* pColorItem = pArgs->GetItemIfSet(SID_FRAME_LINECOLOR, false))
1208  {
1209  const Color& rNewColor = pColorItem->GetValue();
1210 
1211  if (!aBoxItem->GetTop() && !aBoxItem->GetBottom() &&
1212  !aBoxItem->GetLeft() && !aBoxItem->GetRight())
1213  {
1214  aBorderLine.SetColor( rNewColor );
1215  aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
1216  aBorderLine.SetWidth(SvxBorderLineWidth::Hairline);
1217 
1218  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1219  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1220  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1221  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1222  }
1223  else
1224  {
1225  if ( aBoxItem->GetTop() )
1226  const_cast<SvxBorderLine*>(aBoxItem->GetTop())->SetColor( rNewColor );
1227  if ( aBoxItem->GetBottom() )
1228  const_cast<SvxBorderLine*>(aBoxItem->GetBottom())->SetColor( rNewColor );
1229  if ( aBoxItem->GetLeft() )
1230  const_cast<SvxBorderLine*>(aBoxItem->GetLeft())->SetColor( rNewColor );
1231  if ( aBoxItem->GetRight() )
1232  const_cast<SvxBorderLine*>(aBoxItem->GetRight())->SetColor( rNewColor );
1233  }
1234  }
1235  }
1236  break;
1237  }
1238  }
1239  if (bDefault && (aBoxItem->GetTop() || aBoxItem->GetBottom() ||
1240  aBoxItem->GetLeft() || aBoxItem->GetRight()))
1241  {
1242  aBoxItem->SetAllDistances(MIN_BORDER_DIST);
1243  }
1244  aFrameSet.Put( *aBoxItem );
1245  // Template AutoUpdate
1246  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
1247  if(pFormat && pFormat->IsAutoUpdateFormat())
1248  {
1249  rSh.AutoUpdateFrame(pFormat, aFrameSet);
1250  }
1251  else
1252  rSh.SetFlyFrameAttr( aFrameSet );
1253 
1254 }
1255 
1256 static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine)
1257 {
1258  if(pBorderLine->GetWidth() > rBorderLine.GetWidth())
1259  rBorderLine.SetWidth(pBorderLine->GetWidth());
1260 
1261  rBorderLine.SetBorderLineStyle(pBorderLine->GetBorderLineStyle());
1262  rBorderLine.SetColor(pBorderLine->GetColor());
1263 }
1264 
1266 {
1267  SwWrtShell &rSh = GetShell();
1269 
1270  if (bParentCntProt)
1271  {
1272  if (rSh.IsFrameSelected())
1273  rSet.DisableItem( SID_FRAME_LINECOLOR );
1274 
1275  rSet.DisableItem( SID_ATTR_BORDER );
1276  rSet.DisableItem( SID_FRAME_LINESTYLE );
1277  }
1278  else
1279  {
1280  if (rSh.IsFrameSelected())
1281  {
1283 
1284  rSh.GetFlyFrameAttr(aFrameSet);
1285 
1286  const SvxBorderLine* pLine = aFrameSet.Get(RES_BOX).GetTop();
1287  rSet.Put(SvxColorItem(pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR));
1288  }
1289  }
1290 }
1291 
1293 {
1294  const SelectionType nSel = GetShell().GetSelectionType();
1295  if ( (nSel & SelectionType::Graphic)
1296  || (nSel & SelectionType::Ole) )
1297  {
1299  }
1300  else if ( GetShell().CursorInsideInputField() )
1301  {
1303  }
1304 }
1305 
1307 {
1308  SwWrtShell &rSh = GetShell();
1309 
1310  if(rSh.IsFrameSelected())
1311  {
1312  rSh.GetFlyFrameAttr(rSet);
1313  }
1314  else
1315  {
1316  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
1317 
1318  if(pSdrView)
1319  {
1320  rSet.Put(pSdrView->GetDefaultAttr());
1321  }
1322  }
1323 }
1324 
1326 {
1327  const SfxItemSet* pArgs = rReq.GetArgs();
1328  SwWrtShell& rSh = GetShell();
1329 
1330  if(pArgs)
1331  {
1332  if(rSh.IsFrameSelected())
1333  {
1334  rSh.SetFlyFrameAttr(const_cast< SfxItemSet& >(*pArgs));
1335  }
1336  else
1337  {
1338  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
1339 
1340  if(pSdrView)
1341  {
1342  pSdrView->SetDefaultAttr(*pArgs, false);
1343  }
1344  }
1345  }
1346  else
1347  {
1348  SfxDispatcher* pDis = rSh.GetView().GetViewFrame()->GetDispatcher();
1349 
1350  switch(rReq.GetSlot())
1351  {
1352  case SID_ATTR_FILL_STYLE:
1353  case SID_ATTR_FILL_COLOR:
1354  case SID_ATTR_FILL_GRADIENT:
1355  case SID_ATTR_FILL_HATCH:
1356  case SID_ATTR_FILL_BITMAP:
1357  case SID_ATTR_FILL_TRANSPARENCE:
1358  case SID_ATTR_FILL_FLOATTRANSPARENCE:
1359  {
1360  pDis->Execute(SID_ATTRIBUTES_AREA);
1361  break;
1362  }
1363  }
1364  }
1365 }
1366 
1368 {
1369  switch(rReq.GetSlot())
1370  {
1371  case SID_ATTRIBUTES_AREA:
1372  {
1373  SwWrtShell& rSh = GetShell();
1374 
1375  if(rSh.IsFrameSelected())
1376  {
1377  SdrModel* pDoc = rSh.GetDrawView()->GetModel();
1378  SfxItemSet aNewAttr(pDoc->GetItemPool());
1379 
1380  // get attributes from FlyFrame
1381  rSh.GetFlyFrameAttr(aNewAttr);
1382 
1385  GetView().GetFrameWeld(),
1386  &aNewAttr,
1387  pDoc,
1388  false));
1389 
1390  pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){
1391  if(nResult == RET_OK)
1392  {
1393  // set attributes at FlyFrame
1394  GetShell().SetFlyFrameAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet()));
1395 
1396  static sal_uInt16 aInval[] =
1397  {
1398  SID_ATTR_FILL_STYLE,
1399  SID_ATTR_FILL_COLOR,
1400  SID_ATTR_FILL_TRANSPARENCE,
1401  SID_ATTR_FILL_FLOATTRANSPARENCE,
1402  0
1403  };
1404 
1406 
1407  rBnd.Invalidate(aInval);
1408  rBnd.Update(SID_ATTR_FILL_STYLE);
1409  rBnd.Update(SID_ATTR_FILL_COLOR);
1410  rBnd.Update(SID_ATTR_FILL_TRANSPARENCE);
1411  rBnd.Update(SID_ATTR_FILL_FLOATTRANSPARENCE);
1412  }
1413  pDlg->disposeOnce();
1414  });
1415  }
1416 
1417  break;
1418  }
1419  }
1420 }
1421 
1423 {
1424  SfxWhichIter aIter(rSet);
1425  sal_uInt16 nWhich(aIter.FirstWhich());
1426 
1427  while(nWhich)
1428  {
1429  switch(nWhich)
1430  {
1431  case SID_ATTRIBUTES_AREA:
1432  {
1433  SwWrtShell& rSh = GetShell();
1434 
1435  if(!rSh.IsFrameSelected())
1436  {
1437  rSet.DisableItem(nWhich);
1438  }
1439 
1440  break;
1441  }
1442  default:
1443  {
1444  rSet.DisableItem(nWhich);
1445  break;
1446  }
1447  }
1448 
1449  nWhich = aIter.NextWhich();
1450  }
1451 }
1452 
1453 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetURL(const OUString &rURL)
SfxViewFrame * GetViewFrame() const
bool GetValue() const
constexpr TypedWhichId< SvxProtectItem > RES_PROTECT(100)
void SetFlyName(const OUString &rName)
Set name at selected FlyFrame.
Definition: fefly1.cxx:1471
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(101)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
static const SwFrameFormat * lcl_GetFrameFormatByName(SwWrtShell const &rSh, std::u16string_view rName)
Definition: frmsh.cxx:84
URL aURL
const SwFormatFrameSize & GetFrameSize() const
Definition: frmmgr.hxx:151
FieldUnit
constexpr SwTwips MIN_BORDER_DIST
Definition: swtypes.hxx:70
virtual const SwFlyFrameFormat * GetFormat() const override
Definition: fly.cxx:2895
void DisableStateTextFrame(SfxItemSet &rSet)
Definition: frmsh.cxx:1422
Rect of current FlyFrame.
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SwView & GetView()
Definition: basesh.hxx:59
#define SFX_IMPL_INTERFACE(Class, SuperClass)
SdrView * GetDrawView()
Definition: vnew.cxx:373
constexpr TypedWhichId< SvxPrintItem > RES_PRINT(98)
void SetHeight(tools::Long n)
#define FN_FRAME_TO_ANCHOR
Definition: cmdid.h:712
SfxViewFrame * GetFrame() const
void setWidth(tools::Long nWidth)
void ExecFrameStyle(SfxRequest const &rReq)
Definition: frmsh.cxx:1076
#define FN_PARAM_CHAIN_PREVIOUS
Definition: cmdid.h:829
std::string GetValue
constexpr TypedWhichId< SwFormatCol > RES_COL(109)
static void ClearSelection(const SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:4325
#define FN_FRAME_UNCHAIN
Definition: cmdid.h:466
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
const OUString & GetTargetFrame() const
static void HandleOpenXmlFilterSettings(SfxRequest &)
const SwRect & GetAnyCurRect(CurRectType eType, const Point *pPt=nullptr, const css::uno::Reference< css::embed::XEmbeddedObject > &=css::uno::Reference< css::embed::XEmbeddedObject >()) const
Definition: fews.cxx:90
SfxDispatcher * GetDispatcher()
SwWrtShell & GetShell()
Definition: basesh.cxx:2820
static SvxAbstractDialogFactory * Create()
OUString GetLabelForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
FilterGroup & rTarget
#define FN_OLE_IS_MATH
Definition: cmdid.h:631
#define FN_SET_FRM_ALT_NAME
Definition: cmdid.h:868
Check only parents.
constexpr sal_uInt16 RES_FRMATR_END(133)
sal_uInt16 FirstWhich()
void EnterStdMode()
Definition: select.cxx:551
SwEditWin & GetEditWin()
Definition: view.hxx:416
void Done(bool bRemove=false)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(99)
const Size & GetUnrotatedSize() const
Definition: grfatr.hxx:108
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
void SetModified()
Definition: edws.cxx:70
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
SwFlyFrame * GetSelectedFlyFrame() const
Definition: fefly1.cxx:277
#define FN_FORMAT_GRAFIC_DLG
Definition: cmdid.h:333
RndStdIds GetAnchor() const
Definition: frmmgr.hxx:167
void EndAllAction()
Definition: edws.cxx:97
#define FN_FRAME_ALIGN_VERT_TOP
Definition: cmdid.h:347
void InsertPostIt(SwFieldMgr &rFieldMgr, const SfxRequest &rReq)
Inserts a new annotation/comment at the current cursor position / selection.
Definition: wrtsh1.cxx:2176
Point GetPos() const
Definition: frmmgr.hxx:163
sal_uInt16 NextWhich()
SwWrtShell & GetWrtShell() const
Definition: view.hxx:413
const SwFrameFormat * GetFlyNum(size_t nIdx, FlyCntType eType, bool bIgnoreTextBoxes=false) const
Definition: feshview.cxx:2680
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
Definition: doc.cxx:155
void SetKeepRatio(bool b)
Definition: viewopt.hxx:554
Used by the UI to modify the document model.
Definition: wrtsh.hxx:96
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:164
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(102)
void UpdateWordCount(SfxShell *, sal_uInt16)
Definition: view1.cxx:202
void SetTargetFrame(const OUString &rTarget)
const SwView & GetView() const
Definition: wrtsh.hxx:437
void GetDrawAttrStateTextFrame(SfxItemSet &rSet)
Definition: frmsh.cxx:1306
const SwFrameFormat * IsFlyInFly()
Is selected frame within another frame?
Definition: fefly1.cxx:312
PropertiesInfo aProperties
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(103)
static void CreateSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:4313
const OUString & GetName() const
Definition: format.hxx:131
int nCount
void StateInsert(SfxItemSet &rSet)
Definition: frmsh.cxx:1292
HLINK_HTMLMODE
void Width(tools::Long nNew)
Definition: swrect.hxx:189
const SfxItemSet & GetAttrSet() const
Definition: frmmgr.hxx:124
void SetVertOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:583
const SfxItemSet & GetDefaultAttr() const
const SfxPoolItem * GetDfltAttr(sal_uInt16 nWhich)
Get the default attribute from corresponding default attribute table.
Definition: hints.cxx:156
SwDoc * GetDoc() const
Definition: viewsh.hxx:282
constexpr tools::Long getHeight() const
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
const SwFlyFrameFormat * FindFlyByName(const OUString &rName) const
Definition: edfmt.cxx:142
SwFrameShell(SwView &rView)
Definition: frmsh.cxx:1059
static sal_uInt16 IsMath(const SvGlobalName &rName)
const char * sName
css::uno::Reference< css::embed::XEmbeddedObject > GetOleRef() const
get reference to OLE object (if there is one) for selected FlyFrame
Definition: fefly1.cxx:1491
virtual VclPtr< SfxAbstractTabDialog > CreateFrameTabDialog(const OUString &rDialogType, SfxViewFrame *pFrame, weld::Window *pParent, const SfxItemSet &rCoreSet, bool bNewFrame=true, const OString &sDefPage=OString())=0
SfxItemPool & GetPool() const
#define FN_FRAME_ALIGN_VERT_CENTER
Definition: cmdid.h:349
void ExecDrawAttrArgsTextFrame(SfxRequest const &rReq)
Definition: frmsh.cxx:1325
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Definition: fefly1.cxx:1061
void SelectionToBottom(bool bBottom=true)
Definition: feshview.cxx:1118
size_t GetFlyCount(FlyCntType eType, bool bIgnoreTextBoxes=false) const
Iterate over flys - for Basic-collections.
Definition: feshview.cxx:2675
OUString GetObjTitle() const
Definition: fefly1.cxx:1964
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:204
void SetObjDescription(const OUString &rDescription)
Definition: fefly1.cxx:2026
#define FN_UNO_DESCRIPTION
Definition: cmdid.h:870
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(135)
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:617
virtual ~SwFrameShell() override
Definition: frmsh.cxx:1070
const editeng::SvxBorderLine * GetTop() const
Style of a layout element.
Definition: frmfmt.hxx:59
#define FN_NUMBERING_OUTLINE_DLG
Definition: cmdid.h:501
const OUString & GetURL() const
SwApplyTemplate * GetApplyTemplate() const
Definition: edtwin.hxx:234
Rect of current PrtArea of page.
#define SW_MOD()
Definition: swmodule.hxx:255
const SfxItemSet * GetParent() const
OUString GetModuleIdentifier(const Reference< frame::XFrame > &rxFrame)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:755
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
int i
#define FN_KEEP_ASPECT_RATIO
Definition: cmdid.h:866
void SetAbsPos(const Point &rLPoint)
Definition: frmmgr.cxx:249
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
size_t GetMarkedObjectCount() const
SelectionType
#define FN_FRAME_ALIGN_HORZ_LEFT
Definition: cmdid.h:344
constexpr TypedWhichId< SwFormatURL > RES_URL(111)
#define FN_FRAME_ALIGN_VERT_CHAR_CENTER
Definition: cmdid.h:422
sal_uInt16 GetGutterWidth(bool bMin=false) const
Definition: atrfrm.cxx:919
SfxBindings & GetBindings()
const OUString & GetValue() const
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1103
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:63
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:354
sal_uInt8 GetHeightPercent() const
Definition: fmtfsize.hxx:88
void SetAttrSet(const SfxItemSet &rSet)
Definition: frmmgr.cxx:618
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
#define FN_FRAME_ALIGN_VERT_CHAR_TOP
Definition: cmdid.h:420
void ExecFormatFootnote()
Definition: view0.cxx:679
FlyProtectFlags
values can be combined via logical or
Definition: fesh.hxx:105
#define FN_FRAME_ALIGN_HORZ_CENTER
Definition: cmdid.h:346
#define FN_SURROUND
Definition: cmdid.h:862
#define FN_FRAME_DOWN
Definition: cmdid.h:381
#define FN_SET_FRM_POSITION
Definition: cmdid.h:351
void ExecMove(SfxRequest &rReq)
Definition: frmsh.cxx:105
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
Connection (text flow) between two FlyFrames.
Definition: fmtcnct.hxx:31
static void lcl_FrameGetMaxLineWidth(const SvxBorderLine *pBorderLine, SvxBorderLine &rBorderLine)
Definition: frmsh.cxx:1256
virtual SvxBoxItem * Clone(SfxItemPool *pPool=nullptr) const override
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:605
#define FN_MATH_BASELINE_ALIGNMENT
Definition: cmdid.h:632
void SetName(const OUString &rName)
bool IsAutoUpdateFormat() const
Query / set bAutoUpdateFormat-flag.
Definition: format.hxx:188
void GetState(SfxItemSet &)
Definition: frmsh.cxx:729
sal_uInt8 GetWidthPercent() const
Definition: fmtfsize.hxx:91
void SelAll()
Definition: select.cxx:123
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
void SelectionToTop(bool bTop=true)
Move selection upwards or downwards (Z-Order).
Definition: feshview.cxx:1049
#define FN_FRAME_ALIGN_VERT_BOTTOM
Definition: cmdid.h:348
void SetName(const OUString &rName)
void PutAreaListItems(SfxItemSet &rSet) const
Put needed items for XPropertyList entries from the DrawModel.
Definition: drawdoc.cxx:128
#define FN_FRAME_ALIGN_VERT_ROW_TOP
Definition: cmdid.h:416
Frame cannot be moved in Var-direction.
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2705
SwDocShell * GetDocShell()
Definition: view.cxx:1132
SwFlyFrameFormat * GetNext() const
Definition: fmtcnct.hxx:54
#define FN_GET_PRINT_AREA
Definition: cmdid.h:751
#define SFX_OBJECTBAR_OBJECT
void HideChainMarker()
Definition: feshview.cxx:2957
void SetWidth(tools::Long n)
#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM
Definition: cmdid.h:417
Degree10 GetValue() const
Definition: grfatr.hxx:109
void Execute(SfxRequest &)
Definition: frmsh.cxx:131
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
Definition: fefly1.cxx:1213
Rect of current page.
#define FN_FRAME_CHAIN
Definition: cmdid.h:465
void SetReturnValue(const SfxPoolItem &)
#define FN_PARAM_CHAIN_NEXT
Definition: cmdid.h:830
void Update(sal_uInt16 nId)
static bool IsRunning()
Sequence< beans::PropertyValue > GetCommandProperties(const OUString &rsCommandName, const OUString &rsModuleName)
void CallChgLnk()
Definition: crsrsh.cxx:2537
#define FN_FORMAT_FRAME_DLG
Definition: cmdid.h:332
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define FN_INSERT_FRAME
Definition: cmdid.h:231
sal_uInt16 GetSlot() const
static const OUString & GetContextName(const Context eContext)
bool IsPosToggle() const
Definition: fmtornt.hxx:95
bool IsKeepRatio() const
Definition: viewopt.hxx:535
static const sal_Int16 Hairline
void DisableItem(sal_uInt16 nWhich)
const SwFormatChain & GetChain(bool=true) const
Definition: fmtcnct.hxx:70
#define FN_FRAME_UP
Definition: cmdid.h:380
general base class for all free-flowing frames
Definition: flyfrm.hxx:78
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define SAL_WARN_IF(condition, area, stream)
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:686
#define GetWhich(nSlot)
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:428
void SetHorzOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:576
virtual VclPtr< AbstractSvxAreaTabDialog > CreateSvxAreaTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, bool bShadow)=0
SdrView * GetDrawViewWithValidMarkList()
Definition: vnew.cxx:378
#define FN_SET_FRM_NAME
Definition: cmdid.h:865
OUString aName
RET_OK
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:176
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
void SetSize(const Size &rLSize)
Definition: frmmgr.cxx:611
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
Definition: wrtsh1.cxx:1897
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
SvxBoxItem & rBoxItem
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Definition: edattr.cxx:171
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
void ExecDrawDlgTextFrame(SfxRequest const &rReq)
Definition: frmsh.cxx:1367
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
void SetInsertMode(SvxLinkInsertMode eNew)
#define FN_FORMAT_FOOTNOTE_DLG
Definition: cmdid.h:337
void SetChainMarker()
Definition: feshview.cxx:2963
void setHeight(tools::Long nHeight)
void GetLineStyleState(SfxItemSet &rSet)
Definition: frmsh.cxx:1265
void ExecField(const SfxRequest &rReq)
Definition: frmsh.cxx:118
const OUString & GetName() const
SvxLinkInsertMode GetInsertMode() const
const SwFrameFormat * GetFlyFrameFormat() const
Get FlyFrameFormat; for UI macro linkage at Flys.
Definition: fefly1.cxx:1270
void Unchain(SwFrameFormat &rFormat)
Definition: feshview.cxx:2950
RndStdIds
const SfxItemPool & GetItemPool() const
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
constexpr tools::Long getWidth() const
void SetObjTitle(const OUString &rTitle)
Definition: fefly1.cxx:1984
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
void GotoFlyAnchor()
jump from the frame to the anchor
Definition: trvlfnfl.cxx:354
const Size & GetSize() const
Definition: frmmgr.hxx:138
#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM
Definition: cmdid.h:421
#define FN_FRAME_ALIGN_VERT_ROW_CENTER
Definition: cmdid.h:418
Frame is variable in Var-direction.
OUString GetObjDescription() const
Definition: fefly1.cxx:2006
SwChainRet Chain(SwFrameFormat &rSource, const Point &rPt)
Definition: feshview.cxx:2927
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1675
sal_uInt16 GetSmallestDistance() const
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
SwFlyFrameFormat * GetPrev() const
Definition: fmtcnct.hxx:53
#define FN_TITLE_DESCRIPTION_SHAPE
Definition: cmdid.h:454
void Height(tools::Long nNew)
Definition: swrect.hxx:193
SdrModel * GetModel() const
#define FN_FRAME_ALIGN_HORZ_RIGHT
Definition: cmdid.h:345
void SetContextName(const OUString &rsContextName)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
OUString GetFlyName() const
Definition: fefly1.cxx:1481
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
Definition: fews.cxx:237
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
bool IsFrameSelected() const
Definition: feshview.cxx:1254
void SetChainMode(bool bOn)
Definition: edtwin.cxx:6061
#define FN_DRAW_WRAP_DLG
Definition: cmdid.h:156
#define FN_NAME_SHAPE
Definition: cmdid.h:452
#define FN_POSTIT
Definition: cmdid.h:227
void SetRotation(Degree10 nOld, Degree10 nNew, const Size &rUnrotatedSize)
Definition: frmmgr.cxx:597
const SwFormatHoriOrient & GetHoriOrient() const
Definition: frmmgr.hxx:147
Definition: view.hxx:144
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
void UpdateFlyFrame()
Definition: frmmgr.cxx:158
SwFrameSize GetHeightSizeType() const
Definition: fmtfsize.hxx:80
#define FN_FRAME_MIRROR_ON_EVEN_PAGES
Definition: cmdid.h:471
bool IsChainMode() const
Definition: edtwin.hxx:228