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