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(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET)
181  nCols = static_cast<const SfxUInt16Item *>(pItem)->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  SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_POS_X, false, &pItem))
368  {
369  aNewPos.setX( static_cast<const SfxInt32Item*>(pItem)->GetValue() );
370  bApplyNewPos = true;
371  }
372  if (pArgs &&
373  SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_POS_Y, false, &pItem))
374  {
375  aNewPos.setY( static_cast<const SfxInt32Item*>(pItem)->GetValue() );
376  bApplyNewPos = true;
377  }
378 
379  Size aNewSize = aMgr.GetSize();
380  if (pArgs &&
381  SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_WIDTH, false, &pItem))
382  {
383  aNewSize.setWidth( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
384  bApplyNewSize = true;
385  }
386 
387  if (pArgs &&
388  SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_HEIGHT, false, &pItem))
389  {
390  aNewSize.setHeight( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
391  bApplyNewSize = true;
392  }
393 
394  if (pArgs && (pArgs->HasItem(SID_ATTR_TRANSFORM_ANGLE) || pArgs->HasItem(SID_ATTR_TRANSFORM_DELTA_ANGLE)))
395  {
397  rSh.GetCurAttr(aSet);
398  const SwRotationGrf& rRotation = aSet.Get(RES_GRFATR_ROTATION);
399  const Degree10 nOldRot(rRotation.GetValue());
400 
401  if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_DELTA_ANGLE, false, &pItem))
402  {
403  const Degree10 nDeltaRot = toDegree10(static_cast<const SdrAngleItem*>(pItem)->GetValue());
404  aMgr.SetRotation(nOldRot, nOldRot + nDeltaRot, rRotation.GetUnrotatedSize());
405  }
406 
407  // RotGrfFlyFrame: Get Value and disable is in SwGrfShell::GetAttrStateForRotation, but the
408  // value setter uses SID_ATTR_TRANSFORM and a group of three values. Rotation is
409  // added now, so use it in this central place. Do no forget to convert angle from
410  // 100th degrees in SID_ATTR_TRANSFORM_ANGLE to 10th degrees in RES_GRFATR_ROTATION
411  if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_ANGLE, false, &pItem))
412  {
413  const Degree10 nNewRot = toDegree10(static_cast<const SdrAngleItem*>(pItem)->GetValue());
414 
415  // RotGrfFlyFrame: Rotation change here, SwFlyFrameAttrMgr aMgr is available
416  aMgr.SetRotation(nOldRot, nNewRot, rRotation.GetUnrotatedSize());
417  }
418  }
419 
420  if (bApplyNewPos)
421  {
422  aMgr.SetAbsPos(aNewPos);
423  }
424  if ( bApplyNewSize )
425  {
426  aMgr.SetSize( aNewSize );
427  }
428  if (!bApplyNewPos && !bApplyNewSize)
429  {
430  bUpdateMgr = false;
431  }
432 
433  }
434  break;
435 
436  case FN_FORMAT_FRAME_DLG:
437  case FN_DRAW_WRAP_DLG:
438  {
439  const SelectionType nSel = rSh.GetSelectionType();
440  if (nSel & SelectionType::Graphic)
441  {
443  bUpdateMgr = false;
444  }
445  else
446  {
449  // FillAttribute support:
451  SID_DOCFRAME, SID_DOCFRAME,
452  SID_ATTR_BRUSH, SID_ATTR_BRUSH,
453  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
454  SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
455  SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
456  // Items to hand over XPropertyList things like
457  // XColorList, XHatchList, XGradientList, and
458  // XBitmapList to the Area TabPage
459  SID_COLOR_TABLE, SID_PATTERN_LIST,
460  SID_HTML_MODE, SID_HTML_MODE,
467 
468  // create needed items for XPropertyList entries from the DrawModel so that
469  // the Area TabPage can access them
471  pDrawModel->PutAreaListItems(aSet);
472 
473  const SwViewOption* pVOpt = rSh.GetViewOptions();
474  if(nSel & SelectionType::Ole)
475  aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
476  aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
477  aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
478  aSet.Put(SfxStringItem(FN_UNO_DESCRIPTION, rSh.GetObjDescription()));
479  if( nSel & SelectionType::Ole )
480  {
481  // #i73249#
482  aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
483  }
484 
485  const SwRect &rPg = rSh.GetAnyCurRect(CurRectType::Page);
486  SwFormatFrameSize aFrameSize(SwFrameSize::Variable, rPg.Width(), rPg.Height());
487  aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
488  aSet.Put(aFrameSize);
489 
490  const SwRect &rPr = rSh.GetAnyCurRect(CurRectType::PagePrt);
491  SwFormatFrameSize aPrtSize(SwFrameSize::Variable, rPr.Width(), rPr.Height());
492  aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA));
493  aSet.Put(aPrtSize);
494 
495  aSet.Put(aMgr.GetAttrSet());
496  aSet.SetParent( aMgr.GetAttrSet().GetParent() );
497 
498  // On % values initialize size
499  SwFormatFrameSize& rSize = const_cast<SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE));
504 
505  // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated
506  aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT,
508  const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
509  aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) );
510 
511  OString sDefPage;
512  if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, false, &pItem) == SfxItemState::SET)
513  sDefPage = OUStringToOString(static_cast<const SfxStringItem *>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8);
514 
515  aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetFrame()));
516  FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &GetView()) != nullptr );
517  SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) ));
520  nSel & SelectionType::Graphic ? OUString("PictureDialog") :
521  nSel & SelectionType::Ole ? OUString("ObjectDialog"):
522  OUString("FrameDialog"),
523  GetView().GetViewFrame(),
524  GetView().GetFrameWeld(),
525  aSet,
526  false,
527  sDefPage));
528 
529  if ( nSlot == FN_DRAW_WRAP_DLG )
530  {
531  pDlg->SetCurPageId("wrap");
532  }
533 
534  if ( pDlg->Execute() )
535  {
536  const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
537  if(pOutSet)
538  {
539  rReq.Done(*pOutSet);
540  if(nSel & SelectionType::Ole &&
541  SfxItemState::SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, true, &pItem))
542  {
543  SwViewOption aUsrPref( *pVOpt );
544  aUsrPref.SetKeepRatio(static_cast<const SfxBoolItem*>(pItem)->GetValue());
545  SW_MOD()->ApplyUsrPref(aUsrPref, &GetView());
546  }
547  if (SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, true, &pItem))
548  {
549  // #i73249#
550  rSh.SetObjTitle(static_cast<const SfxStringItem*>(pItem)->GetValue());
551  }
552  if (SfxItemState::SET == pOutSet->GetItemState(FN_UNO_DESCRIPTION, true, &pItem))
553  rSh.SetObjDescription(static_cast<const SfxStringItem*>(pItem)->GetValue());
554 
555  // Template AutoUpdate
556  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
557  if(pFormat && pFormat->IsAutoUpdateFormat())
558  {
559  rSh.AutoUpdateFrame(pFormat, *pOutSet);
560  // Anything which is not supported by the format must be set hard.
561  if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem))
562  rSh.SetFlyName(static_cast<const SfxStringItem*>(pItem)->GetValue());
565  RES_SURROUND, RES_ANCHOR> aShellSet( GetPool() );
566  aShellSet.Put(*pOutSet);
567  aMgr.SetAttrSet(aShellSet);
568  if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem))
569  rSh.SetFlyName(static_cast<const SfxStringItem*>(pItem)->GetValue());
570  }
571  else
572  aMgr.SetAttrSet( *pOutSet );
573 
574  const SwFrameFormat* pCurrFlyFormat = rSh.GetFlyFrameFormat();
575  if(SfxItemState::SET ==
576  pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS,
577  false, &pItem))
578  {
579  rSh.HideChainMarker();
580 
581  OUString sPrevName =
582  static_cast<const SfxStringItem*>(pItem)->GetValue();
583  const SwFormatChain &rChain = pCurrFlyFormat->GetChain();
584  //needs cast - no non-const method available
585  SwFlyFrameFormat* pFlyFormat =
586  rChain.GetPrev();
587  if(pFlyFormat)
588  {
589  if (pFlyFormat->GetName() != sPrevName)
590  {
591  rSh.Unchain(*pFlyFormat);
592  }
593  else
594  sPrevName.clear();
595  }
596 
597  if (!sPrevName.isEmpty())
598  {
599  //needs cast - no non-const method available
600  SwFrameFormat* pPrevFormat = const_cast<SwFrameFormat*>(
601  lcl_GetFrameFormatByName(rSh, sPrevName));
602  SAL_WARN_IF(!pPrevFormat, "sw.ui", "No frame found!");
603  if(pPrevFormat)
604  {
605  rSh.Chain(*pPrevFormat, *pCurrFlyFormat);
606  }
607  }
608  rSh.SetChainMarker();
609  }
610  if(SfxItemState::SET ==
611  pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, false,
612  &pItem))
613  {
614  rSh.HideChainMarker();
615  OUString sNextName =
616  static_cast<const SfxStringItem*>(pItem)->GetValue();
617  const SwFormatChain &rChain = pCurrFlyFormat->GetChain();
618  //needs cast - no non-const method available
619  SwFlyFrameFormat* pFlyFormat =
620  rChain.GetNext();
621  if(pFlyFormat)
622  {
623  if (pFlyFormat->GetName() != sNextName)
624  {
625  rSh.Unchain(*const_cast<SwFlyFrameFormat*>(static_cast<const SwFlyFrameFormat*>( pCurrFlyFormat)));
626  }
627  else
628  sNextName.clear();
629  }
630 
631  if (!sNextName.isEmpty())
632  {
633  //needs cast - no non-const method available
634  SwFrameFormat* pNextFormat = const_cast<SwFrameFormat*>(
635  lcl_GetFrameFormatByName(rSh, sNextName));
636  SAL_WARN_IF(!pNextFormat, "sw.ui", "No frame found!");
637  if(pNextFormat)
638  {
639  rSh.Chain(*const_cast<SwFrameFormat*>(
640  pCurrFlyFormat), *pNextFormat);
641  }
642  }
643  rSh.SetChainMarker();
644  }
645  }
646  }
647  else
648  bUpdateMgr = false;
649  }
650  }
651  break;
653  {
654  SwFormatHoriOrient aHori(aMgr.GetHoriOrient());
655  bool bMirror = !aHori.IsPosToggle();
656  aHori.SetPosToggle(bMirror);
658  aSet.Put(aHori);
659  aMgr.SetAttrSet(aSet);
660  bCopyToFormat = true;
661  rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
662  }
663  break;
664  case FN_NAME_SHAPE:
665  {
666  bUpdateMgr = false;
667  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
668  if ( pSdrView &&
669  pSdrView->GetMarkedObjectCount() == 1 )
670  {
671  OUString aName(rSh.GetFlyName());
674  pFact->CreateSvxObjectNameDialog(GetView().GetFrameWeld(), aName));
675 
676  if ( pDlg->Execute() == RET_OK )
677  {
678  pDlg->GetName(aName);
679  rSh.SetFlyName(aName);
680  }
681  }
682  }
683  break;
684  // #i73249#
686  {
687  bUpdateMgr = false;
688  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
689  if ( pSdrView &&
690  pSdrView->GetMarkedObjectCount() == 1 )
691  {
692  OUString aDescription(rSh.GetObjDescription());
693  OUString aTitle(rSh.GetObjTitle());
694 
697  pFact->CreateSvxObjectTitleDescDialog(GetView().GetFrameWeld(),
698  aTitle, aDescription ));
699 
700  if ( pDlg->Execute() == RET_OK )
701  {
702  pDlg->GetDescription(aDescription);
703  pDlg->GetTitle(aTitle);
704 
705  rSh.SetObjDescription(aDescription);
706  rSh.SetObjTitle(aTitle);
707  }
708  }
709  }
710  break;
711  default:
712  assert(!"wrong dispatcher");
713  return;
714  }
715  if ( bUpdateMgr )
716  {
717  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
718  if ( bCopyToFormat && pFormat && pFormat->IsAutoUpdateFormat() )
719  {
720  rSh.AutoUpdateFrame(pFormat, aMgr.GetAttrSet());
721  }
722  else
723  {
724  aMgr.UpdateFlyFrame();
725  }
726  }
727 
728 }
729 
731 {
732  SwWrtShell &rSh = GetShell();
733  bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
734  if (!rSh.IsFrameSelected())
735  return;
736 
739  RES_PRINT, RES_HORI_ORIENT> aSet(rSh.GetAttrPool() );
740  rSh.GetFlyFrameAttr( aSet );
741 
744 
745  bProtect |= bParentCntProt;
746 
747  const FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true);
748  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE, nullptr );
749 
750  SfxWhichIter aIter( rSet );
751  sal_uInt16 nWhich = aIter.FirstWhich();
752  while ( nWhich )
753  {
754  switch ( nWhich )
755  {
756  case RES_FRM_SIZE:
757  {
758  const SwFormatFrameSize& aSz(aMgr.GetFrameSize());
759  rSet.Put(aSz);
760  }
761  break;
762  case RES_VERT_ORIENT:
763  case RES_HORI_ORIENT:
764  case SID_ATTR_ULSPACE:
765  case SID_ATTR_LRSPACE:
766  case RES_LR_SPACE:
767  case RES_UL_SPACE:
768  case RES_PROTECT:
769  case RES_OPAQUE:
770  case RES_PRINT:
771  case RES_SURROUND:
772  {
773  rSet.Put(aSet.Get(GetPool().GetWhich(nWhich)));
774  }
775  break;
776  case SID_OBJECT_ALIGN:
777  {
778  if ( bProtect )
779  rSet.DisableItem( nWhich );
780  }
781  break;
782  case SID_OBJECT_ALIGN_LEFT :
783  case SID_OBJECT_ALIGN_CENTER :
784  case SID_OBJECT_ALIGN_RIGHT :
788  if ( (eFrameType & FrameTypeFlags::FLY_INCNT) ||
789  bProtect ||
790  ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) &&
791  bHtmlMode ))
792  {
793  rSet.DisableItem( nWhich );
794  }
795  else
796  {
797  sal_Int16 nHoriOrient = -1;
798  switch(nWhich)
799  {
800  case SID_OBJECT_ALIGN_LEFT:
801  nHoriOrient = text::HoriOrientation::LEFT;
802  break;
803  case SID_OBJECT_ALIGN_CENTER:
804  nHoriOrient = text::HoriOrientation::CENTER;
805  break;
806  case SID_OBJECT_ALIGN_RIGHT:
807  nHoriOrient = text::HoriOrientation::RIGHT;
808  break;
809  default:
810  break;
811  }
812  SwFormatHoriOrient aHOrient(aMgr.GetHoriOrient());
813  if (nHoriOrient != -1)
814  rSet.Put(SfxBoolItem(nWhich, nHoriOrient == aHOrient.GetHoriOrient()));
815  }
816  break;
823  if ( !(eFrameType & FrameTypeFlags::FLY_INCNT) || bProtect
824  || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) )
825  rSet.DisableItem( nWhich );
826  break;
827 
828  case SID_OBJECT_ALIGN_UP :
829  case SID_OBJECT_ALIGN_MIDDLE :
830  case SID_OBJECT_ALIGN_DOWN :
831 
835  if ( bProtect || (bHtmlMode && eFrameType & FrameTypeFlags::FLY_ATCNT))
836  rSet.DisableItem( nWhich );
837  else
838  {
839  // These slots need different labels depending on whether they are anchored in a character
840  // or on a paragraph/page etc.
841  OUString sNewLabel;
842  if (eFrameType & FrameTypeFlags::FLY_INCNT)
843  {
844  switch (nWhich)
845  {
846  case SID_OBJECT_ALIGN_UP :
848  sNewLabel = SwResId(STR_FRMUI_TOP_BASE);
849  break;
850  case SID_OBJECT_ALIGN_MIDDLE :
852  sNewLabel = SwResId(STR_FRMUI_CENTER_BASE);
853  break;
854  case SID_OBJECT_ALIGN_DOWN :
856  if(!bHtmlMode)
857  sNewLabel = SwResId(STR_FRMUI_BOTTOM_BASE);
858  else
859  rSet.DisableItem( nWhich );
860  break;
861  }
862  }
863  else
864  {
865  if (nWhich != FN_FRAME_ALIGN_VERT_TOP &&
866  nWhich != SID_OBJECT_ALIGN_UP )
867  {
868  if (aMgr.GetAnchor() == RndStdIds::FLY_AT_FLY)
869  {
870  const SwFrameFormat* pFormat = rSh.IsFlyInFly();
871  if (pFormat)
872  {
873  const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize();
874  if (rFrameSz.GetHeightSizeType() != SwFrameSize::Fixed)
875  {
876  rSet.DisableItem( nWhich );
877  break;
878  }
879  }
880  }
881  }
882  OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame()->GetFrame().GetFrameInterface()));
883  switch (nWhich)
884  {
885  case SID_OBJECT_ALIGN_UP :
887  {
888  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignTop", aModuleName);
890  break;
891  }
892  case SID_OBJECT_ALIGN_MIDDLE:
894  {
895  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignVerticalCenter", aModuleName);
897  break;
898  }
899  case SID_OBJECT_ALIGN_DOWN:
901  {
902  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignBottom", aModuleName);
904  break;
905  }
906  }
907  }
908  if ( !sNewLabel.isEmpty() )
909  rSet.Put( SfxStringItem( nWhich, sNewLabel ));
910  }
911  break;
912  case SID_HYPERLINK_GETLINK:
913  {
914  SvxHyperlinkItem aHLinkItem;
915  const SfxPoolItem* pItem;
916 
918  rSh.GetFlyFrameAttr( aURLSet );
919 
920  if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem))
921  {
922  const SwFormatURL* pFormatURL = static_cast<const SwFormatURL*>(pItem);
923  aHLinkItem.SetURL(pFormatURL->GetURL());
924  aHLinkItem.SetTargetFrame(pFormatURL->GetTargetFrameName());
925  aHLinkItem.SetName(rSh.GetFlyName());
926  }
927 
928  aHLinkItem.SetInsertMode(static_cast<SvxLinkInsertMode>(aHLinkItem.GetInsertMode() |
929  (bHtmlMode ? HLINK_HTMLMODE : 0)));
930 
931  rSet.Put(aHLinkItem);
932  }
933  break;
934 
935  case FN_FRAME_CHAIN:
936  {
937  const SelectionType nSel = rSh.GetSelectionType();
938  if (nSel & SelectionType::Graphic || nSel & SelectionType::Ole)
939  rSet.DisableItem( FN_FRAME_CHAIN );
940  else
941  {
942  const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat();
943  if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() ||
944  !pFormat || pFormat->GetChain().GetNext() )
945  {
946  rSet.DisableItem( FN_FRAME_CHAIN );
947  }
948  else
949  {
950  bool bChainMode = rSh.GetView().GetEditWin().IsChainMode();
951  rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) );
952  }
953  }
954  }
955  break;
956  case FN_FRAME_UNCHAIN:
957  {
958  const SelectionType nSel = rSh.GetSelectionType();
959  if (nSel & SelectionType::Graphic || nSel & SelectionType::Ole)
961  else
962  {
963  const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat();
964  if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() ||
965  !pFormat || !pFormat->GetChain().GetNext() )
966  {
968  }
969  }
970  }
971  break;
972  case SID_FRAME_TO_TOP:
973  case SID_FRAME_TO_BOTTOM:
974  case FN_FRAME_UP:
975  case FN_FRAME_DOWN:
976  if ( bParentCntProt )
977  rSet.DisableItem( nWhich );
978  break;
979 
980  case SID_ATTR_TRANSFORM:
981  {
982  rSet.DisableItem( nWhich );
983  }
984  break;
985 
986  case SID_ATTR_TRANSFORM_PROTECT_SIZE:
987  {
988  const FlyProtectFlags eProtection = rSh.IsSelObjProtected( FlyProtectFlags::Size );
989  if ( ( eProtection & FlyProtectFlags::Content ) ||
990  ( eProtection & FlyProtectFlags::Size ) )
991  {
992  rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, true ) );
993  }
994  else
995  {
996  rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, false ) );
997  }
998  }
999  break;
1000 
1001  case SID_ATTR_TRANSFORM_WIDTH:
1002  {
1003  rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_WIDTH, aMgr.GetSize().getWidth() ) );
1004  }
1005  break;
1006 
1007  case SID_ATTR_TRANSFORM_HEIGHT:
1008  {
1009  rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_HEIGHT, aMgr.GetSize().getHeight() ) );
1010  }
1011  break;
1012 
1013  case FN_FORMAT_FRAME_DLG:
1014  {
1015  const SelectionType nSel = rSh.GetSelectionType();
1016  if ( bParentCntProt || nSel & SelectionType::Graphic)
1017  rSet.DisableItem( nWhich );
1018  }
1019  break;
1020  // #i73249#
1022  case FN_NAME_SHAPE:
1023  {
1024  SwWrtShell &rWrtSh = GetShell();
1025  SdrView* pSdrView = rWrtSh.GetDrawViewWithValidMarkList();
1026  if ( !pSdrView ||
1027  pSdrView->GetMarkedObjectCount() != 1 )
1028  {
1029  rSet.DisableItem( nWhich );
1030  }
1031  }
1032  break;
1033 
1034  case FN_POSTIT:
1035  {
1036  SwFlyFrame* pFly = rSh.GetSelectedFlyFrame();
1037  if (pFly)
1038  {
1039  SwFrameFormat* pFormat = pFly->GetFormat();
1040  if (pFormat)
1041  {
1042  RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
1043  // SwWrtShell::InsertPostIt() only works on as-char and at-char anchored
1044  // images.
1045  if (eAnchorId != RndStdIds::FLY_AS_CHAR && eAnchorId != RndStdIds::FLY_AT_CHAR)
1046  {
1047  rSet.DisableItem(nWhich);
1048  }
1049  }
1050  }
1051  }
1052  break;
1053 
1054  default:
1055  /* do nothing */;
1056  break;
1057  }
1058  nWhich = aIter.NextWhich();
1059  }
1060 }
1061 
1063  SwBaseShell( _rView )
1064 {
1065  SetName("Frame");
1066 
1067  // #96392# Use this to announce it is the frame shell who creates the selection.
1068  SwTransferable::CreateSelection( _rView.GetWrtShell(), this );
1069 
1071 }
1072 
1074 {
1075  // #96392# Only clear the selection if it was this frame shell who created it.
1077 }
1078 
1080 {
1081  SwWrtShell &rSh = GetShell();
1082  bool bDefault = false;
1083  if (!rSh.IsFrameSelected())
1084  return;
1085  // At first pick the default BoxItem out of the pool.
1086  // If unequal to regular box item, then it has already
1087  // been changed (New one is no default).
1088  const SvxBoxItem* pPoolBoxItem = ::GetDfltAttr(RES_BOX);
1089 
1090  const SfxItemSet *pArgs = rReq.GetArgs();
1092 
1093  rSh.GetFlyFrameAttr( aFrameSet );
1094  const SvxBoxItem& rBoxItem = aFrameSet.Get(RES_BOX);
1095 
1096  if (pPoolBoxItem == &rBoxItem)
1097  bDefault = true;
1098 
1099  std::unique_ptr<SvxBoxItem> aBoxItem(rBoxItem.Clone());
1100 
1101  SvxBorderLine aBorderLine;
1102  const SfxPoolItem *pItem = nullptr;
1103 
1104  if(pArgs) // Any controller can sometimes deliver nothing #48169#
1105  {
1106  switch (rReq.GetSlot())
1107  {
1108  case SID_ATTR_BORDER:
1109  {
1110  if (pArgs->GetItemState(RES_BOX, true, &pItem) == SfxItemState::SET)
1111  {
1112  std::unique_ptr<SvxBoxItem> aNewBox(static_cast<SvxBoxItem*>(pItem->Clone()));
1113  const SvxBorderLine* pBorderLine;
1114 
1115  pBorderLine = aBoxItem->GetTop();
1116  if (pBorderLine != nullptr)
1117  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1118  pBorderLine = aBoxItem->GetBottom();
1119  if (pBorderLine != nullptr)
1120  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1121  pBorderLine = aBoxItem->GetLeft();
1122  if (pBorderLine != nullptr)
1123  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1124  pBorderLine = aBoxItem->GetRight();
1125  if (pBorderLine != nullptr)
1126  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1127 
1128  if(aBorderLine.GetOutWidth() == 0)
1129  {
1130  aBorderLine.SetBorderLineStyle(
1131  SvxBorderLineStyle::SOLID);
1132  aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
1133  }
1134  //Set distance only if the request is received from the controller.
1135 
1136 #if HAVE_FEATURE_SCRIPTING
1137  if(!StarBASIC::IsRunning())
1138 #endif
1139  {
1140  // TODO: should this copy 4 individual Dist instead?
1141  aNewBox->SetAllDistances(rBoxItem.GetSmallestDistance());
1142  }
1143 
1144  aBoxItem = std::move(aNewBox);
1145 
1146  if( aBoxItem->GetTop() != nullptr )
1147  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1148  if( aBoxItem->GetBottom() != nullptr )
1149  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1150  if( aBoxItem->GetLeft() != nullptr )
1151  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1152  if( aBoxItem->GetRight() != nullptr )
1153  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1154  }
1155  }
1156  break;
1157 
1158  case SID_FRAME_LINESTYLE:
1159  {
1160  if (pArgs->GetItemState(SID_FRAME_LINESTYLE, false, &pItem) == SfxItemState::SET)
1161  {
1162  const SvxLineItem* pLineItem =
1163  static_cast<const SvxLineItem*>(pItem);
1164 
1165  if ( pLineItem->GetLine() )
1166  {
1167  aBorderLine = *(pLineItem->GetLine());
1168 
1169  if (!aBoxItem->GetTop() && !aBoxItem->GetBottom() &&
1170  !aBoxItem->GetLeft() && !aBoxItem->GetRight())
1171  {
1172  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1173  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1174  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1175  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1176  }
1177  else
1178  {
1179  if( aBoxItem->GetTop() )
1180  {
1181  aBorderLine.SetColor( aBoxItem->GetTop()->GetColor() );
1182  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1183  }
1184  if( aBoxItem->GetBottom() )
1185  {
1186  aBorderLine.SetColor( aBoxItem->GetBottom()->GetColor());
1187  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1188  }
1189  if( aBoxItem->GetLeft() )
1190  {
1191  aBorderLine.SetColor( aBoxItem->GetLeft()->GetColor());
1192  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1193  }
1194  if( aBoxItem->GetRight() )
1195  {
1196  aBorderLine.SetColor(aBoxItem->GetRight()->GetColor());
1197  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1198  }
1199  }
1200  }
1201  else
1202  {
1203  aBoxItem->SetLine(nullptr, SvxBoxItemLine::TOP);
1204  aBoxItem->SetLine(nullptr, SvxBoxItemLine::BOTTOM);
1205  aBoxItem->SetLine(nullptr, SvxBoxItemLine::LEFT);
1206  aBoxItem->SetLine(nullptr, SvxBoxItemLine::RIGHT);
1207  }
1208  }
1209  }
1210  break;
1211 
1212  case SID_FRAME_LINECOLOR:
1213  {
1214  if (pArgs->GetItemState(SID_FRAME_LINECOLOR, false, &pItem) == SfxItemState::SET)
1215  {
1216  const Color& rNewColor = static_cast<const SvxColorItem*>(pItem)->GetValue();
1217 
1218  if (!aBoxItem->GetTop() && !aBoxItem->GetBottom() &&
1219  !aBoxItem->GetLeft() && !aBoxItem->GetRight())
1220  {
1221  aBorderLine.SetColor( rNewColor );
1222  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1223  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1224  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1225  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1226  }
1227  else
1228  {
1229  if ( aBoxItem->GetTop() )
1230  const_cast<SvxBorderLine*>(aBoxItem->GetTop())->SetColor( rNewColor );
1231  if ( aBoxItem->GetBottom() )
1232  const_cast<SvxBorderLine*>(aBoxItem->GetBottom())->SetColor( rNewColor );
1233  if ( aBoxItem->GetLeft() )
1234  const_cast<SvxBorderLine*>(aBoxItem->GetLeft())->SetColor( rNewColor );
1235  if ( aBoxItem->GetRight() )
1236  const_cast<SvxBorderLine*>(aBoxItem->GetRight())->SetColor( rNewColor );
1237  }
1238  }
1239  }
1240  break;
1241  }
1242  }
1243  if (bDefault && (aBoxItem->GetTop() || aBoxItem->GetBottom() ||
1244  aBoxItem->GetLeft() || aBoxItem->GetRight()))
1245  {
1246  aBoxItem->SetAllDistances(MIN_BORDER_DIST);
1247  }
1248  aFrameSet.Put( *aBoxItem );
1249  // Template AutoUpdate
1250  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
1251  if(pFormat && pFormat->IsAutoUpdateFormat())
1252  {
1253  rSh.AutoUpdateFrame(pFormat, aFrameSet);
1254  }
1255  else
1256  rSh.SetFlyFrameAttr( aFrameSet );
1257 
1258 }
1259 
1260 static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine)
1261 {
1262  if(pBorderLine->GetWidth() > rBorderLine.GetWidth())
1263  rBorderLine.SetWidth(pBorderLine->GetWidth());
1264 
1265  rBorderLine.SetBorderLineStyle(pBorderLine->GetBorderLineStyle());
1266  rBorderLine.SetColor(pBorderLine->GetColor());
1267 }
1268 
1270 {
1271  SwWrtShell &rSh = GetShell();
1273 
1274  if (bParentCntProt)
1275  {
1276  if (rSh.IsFrameSelected())
1277  rSet.DisableItem( SID_FRAME_LINECOLOR );
1278 
1279  rSet.DisableItem( SID_ATTR_BORDER );
1280  rSet.DisableItem( SID_FRAME_LINESTYLE );
1281  }
1282  else
1283  {
1284  if (rSh.IsFrameSelected())
1285  {
1287 
1288  rSh.GetFlyFrameAttr(aFrameSet);
1289 
1290  const SvxBorderLine* pLine = aFrameSet.Get(RES_BOX).GetTop();
1291  rSet.Put(SvxColorItem(pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR));
1292  }
1293  }
1294 }
1295 
1297 {
1298  const SelectionType nSel = GetShell().GetSelectionType();
1299  if ( (nSel & SelectionType::Graphic)
1300  || (nSel & SelectionType::Ole) )
1301  {
1303  }
1304  else if ( GetShell().CursorInsideInputField() )
1305  {
1307  }
1308 }
1309 
1311 {
1312  SwWrtShell &rSh = GetShell();
1313 
1314  if(rSh.IsFrameSelected())
1315  {
1316  rSh.GetFlyFrameAttr(rSet);
1317  }
1318  else
1319  {
1320  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
1321 
1322  if(pSdrView)
1323  {
1324  rSet.Put(pSdrView->GetDefaultAttr());
1325  }
1326  }
1327 }
1328 
1330 {
1331  const SfxItemSet* pArgs = rReq.GetArgs();
1332  SwWrtShell& rSh = GetShell();
1333 
1334  if(pArgs)
1335  {
1336  if(rSh.IsFrameSelected())
1337  {
1338  rSh.SetFlyFrameAttr(const_cast< SfxItemSet& >(*pArgs));
1339  }
1340  else
1341  {
1342  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
1343 
1344  if(pSdrView)
1345  {
1346  pSdrView->SetDefaultAttr(*pArgs, false);
1347  }
1348  }
1349  }
1350  else
1351  {
1352  SfxDispatcher* pDis = rSh.GetView().GetViewFrame()->GetDispatcher();
1353 
1354  switch(rReq.GetSlot())
1355  {
1356  case SID_ATTR_FILL_STYLE:
1357  case SID_ATTR_FILL_COLOR:
1358  case SID_ATTR_FILL_GRADIENT:
1359  case SID_ATTR_FILL_HATCH:
1360  case SID_ATTR_FILL_BITMAP:
1361  case SID_ATTR_FILL_TRANSPARENCE:
1362  case SID_ATTR_FILL_FLOATTRANSPARENCE:
1363  {
1364  pDis->Execute(SID_ATTRIBUTES_AREA);
1365  break;
1366  }
1367  }
1368  }
1369 }
1370 
1372 {
1373  switch(rReq.GetSlot())
1374  {
1375  case SID_ATTRIBUTES_AREA:
1376  {
1377  SwWrtShell& rSh = GetShell();
1378 
1379  if(rSh.IsFrameSelected())
1380  {
1381  SdrModel* pDoc = rSh.GetDrawView()->GetModel();
1382  SfxItemSet aNewAttr(pDoc->GetItemPool());
1383 
1384  // get attributes from FlyFrame
1385  rSh.GetFlyFrameAttr(aNewAttr);
1386 
1389  GetView().GetFrameWeld(),
1390  &aNewAttr,
1391  pDoc,
1392  false));
1393 
1394  pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){
1395  if(nResult == RET_OK)
1396  {
1397  // set attributes at FlyFrame
1398  GetShell().SetFlyFrameAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet()));
1399 
1400  static sal_uInt16 aInval[] =
1401  {
1402  SID_ATTR_FILL_STYLE,
1403  SID_ATTR_FILL_COLOR,
1404  SID_ATTR_FILL_TRANSPARENCE,
1405  SID_ATTR_FILL_FLOATTRANSPARENCE,
1406  0
1407  };
1408 
1410 
1411  rBnd.Invalidate(aInval);
1412  rBnd.Update(SID_ATTR_FILL_STYLE);
1413  rBnd.Update(SID_ATTR_FILL_COLOR);
1414  rBnd.Update(SID_ATTR_FILL_TRANSPARENCE);
1415  rBnd.Update(SID_ATTR_FILL_FLOATTRANSPARENCE);
1416  }
1417  pDlg->disposeOnce();
1418  });
1419  }
1420 
1421  break;
1422  }
1423  }
1424 }
1425 
1427 {
1428  SfxWhichIter aIter(rSet);
1429  sal_uInt16 nWhich(aIter.FirstWhich());
1430 
1431  while(nWhich)
1432  {
1433  switch(nWhich)
1434  {
1435  case SID_ATTRIBUTES_AREA:
1436  {
1437  SwWrtShell& rSh = GetShell();
1438 
1439  if(!rSh.IsFrameSelected())
1440  {
1441  rSet.DisableItem(nWhich);
1442  }
1443 
1444  break;
1445  }
1446  default:
1447  {
1448  rSet.DisableItem(nWhich);
1449  break;
1450  }
1451  }
1452 
1453  nWhich = aIter.NextWhich();
1454  }
1455 }
1456 
1457 /* 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:1473
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:71
virtual const SwFlyFrameFormat * GetFormat() const override
Definition: fly.cxx:2876
void DisableStateTextFrame(SfxItemSet &rSet)
Definition: frmsh.cxx:1426
Rect of current FlyFrame.
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:697
SfxViewFrame * GetFrame() const
void setWidth(tools::Long nWidth)
void ExecFrameStyle(SfxRequest const &rReq)
Definition: frmsh.cxx:1079
#define FN_PARAM_CHAIN_PREVIOUS
Definition: cmdid.h:819
std::string GetValue
constexpr TypedWhichId< SwFormatCol > RES_COL(109)
static void ClearSelection(const SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:4185
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:90
SfxDispatcher * GetDispatcher()
SwWrtShell & GetShell()
Definition: basesh.cxx:2773
static SvxAbstractDialogFactory * Create()
OUString GetLabelForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
FilterGroup & rTarget
#define FN_OLE_IS_MATH
Definition: cmdid.h:619
#define FN_SET_FRM_ALT_NAME
Definition: cmdid.h:858
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
void SetLine(const editeng::SvxBorderLine *pNew)
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:321
RndStdIds GetAnchor() const
Definition: frmmgr.hxx:167
void EndAllAction()
Definition: edws.cxx:97
#define FN_FRAME_ALIGN_VERT_TOP
Definition: cmdid.h:335
void InsertPostIt(SwFieldMgr &rFieldMgr, const SfxRequest &rReq)
Inserts a new annotation/comment at the current cursor position / selection.
Definition: wrtsh1.cxx:1912
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:2658
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:93
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
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:431
void GetDrawAttrStateTextFrame(SfxItemSet &rSet)
Definition: frmsh.cxx:1310
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:4173
const OUString & GetName() const
Definition: format.hxx:115
Degree10 toDegree10(Degree100 x)
int nCount
void StateInsert(SfxItemSet &rSet)
Definition: frmsh.cxx:1296
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:586
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: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:143
SwFrameShell(SwView &rView)
Definition: frmsh.cxx:1062
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:1493
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:337
void ExecDrawAttrArgsTextFrame(SfxRequest const &rReq)
Definition: frmsh.cxx:1329
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Definition: fefly1.cxx:1062
void SelectionToBottom(bool bBottom=true)
Definition: feshview.cxx:1112
size_t GetFlyCount(FlyCntType eType, bool bIgnoreTextBoxes=false) const
Iterate over flys - for Basic-collections.
Definition: feshview.cxx:2653
OUString GetObjTitle() const
Definition: fefly1.cxx:1966
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
void SetObjDescription(const OUString &rDescription)
Definition: fefly1.cxx:2028
#define FN_UNO_DESCRIPTION
Definition: cmdid.h:860
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(135)
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:613
virtual ~SwFrameShell() override
Definition: frmsh.cxx:1073
Style of a layout element.
Definition: frmfmt.hxx:59
#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:256
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:763
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
int i
#define FN_KEEP_ASPECT_RATIO
Definition: cmdid.h:856
void SetAbsPos(const Point &rLPoint)
Definition: frmmgr.cxx:252
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
size_t GetMarkedObjectCount() const
SelectionType
#define FN_FRAME_ALIGN_HORZ_LEFT
Definition: cmdid.h:332
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:918
SfxBindings & GetBindings()
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1105
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:62
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:621
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:677
FlyProtectFlags
values can be combined via logical or
Definition: fesh.hxx:104
#define FN_FRAME_ALIGN_HORZ_CENTER
Definition: cmdid.h:334
#define FN_SURROUND
Definition: cmdid.h:852
#define FN_FRAME_DOWN
Definition: cmdid.h:369
#define FN_SET_FRM_POSITION
Definition: cmdid.h:339
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:1260
virtual SvxBoxItem * Clone(SfxItemPool *pPool=nullptr) const override
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:593
#define FN_MATH_BASELINE_ALIGNMENT
Definition: cmdid.h:620
void SetName(const OUString &rName)
bool IsAutoUpdateFormat() const
Query / set bAutoUpdateFormat-flag.
Definition: format.hxx:172
void GetState(SfxItemSet &)
Definition: frmsh.cxx:730
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:1043
#define FN_FRAME_ALIGN_VERT_BOTTOM
Definition: cmdid.h:336
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:404
Frame cannot be moved in Var-direction.
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2683
SwDocShell * GetDocShell()
Definition: view.cxx:1127
SwFlyFrameFormat * GetNext() const
Definition: fmtcnct.hxx:54
#define FN_GET_PRINT_AREA
Definition: cmdid.h:736
#define SFX_OBJECTBAR_OBJECT
void HideChainMarker()
Definition: feshview.cxx:2935
void SetWidth(tools::Long n)
#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM
Definition: cmdid.h:405
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:1215
Rect of current page.
#define FN_FRAME_CHAIN
Definition: cmdid.h:453
void SetReturnValue(const SfxPoolItem &)
#define FN_PARAM_CHAIN_NEXT
Definition: cmdid.h:820
void Update(sal_uInt16 nId)
static bool IsRunning()
Sequence< beans::PropertyValue > GetCommandProperties(const OUString &rsCommandName, const OUString &rsModuleName)
void CallChgLnk()
Definition: crsrsh.cxx:2527
#define FN_FORMAT_FRAME_DLG
Definition: cmdid.h:320
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define FN_INSERT_FRAME
Definition: cmdid.h:219
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
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:368
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:684
#define GetWhich(nSlot)
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:424
void SetHorzOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:579
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:378
#define FN_SET_FRM_NAME
Definition: cmdid.h:855
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:614
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
Definition: wrtsh1.cxx:1633
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:177
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
void ExecDrawDlgTextFrame(SfxRequest const &rReq)
Definition: frmsh.cxx:1371
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
void SetInsertMode(SvxLinkInsertMode eNew)
#define FN_FORMAT_FOOTNOTE_DLG
Definition: cmdid.h:325
void SetChainMarker()
Definition: feshview.cxx:2941
void setHeight(tools::Long nHeight)
void GetLineStyleState(SfxItemSet &rSet)
Definition: frmsh.cxx:1269
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:1272
void Unchain(SwFrameFormat &rFormat)
Definition: feshview.cxx:2928
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:1986
#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:2008
SwChainRet Chain(SwFrameFormat &rSource, const Point &rPt)
Definition: feshview.cxx:2905
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1411
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:193
SdrModel * GetModel() const
#define FN_FRAME_ALIGN_HORZ_RIGHT
Definition: cmdid.h:333
void SetContextName(const OUString &rsContextName)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
OUString GetFlyName() const
Definition: fefly1.cxx:1483
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:1248
void SetChainMode(bool bOn)
Definition: edtwin.cxx:5970
#define FN_DRAW_WRAP_DLG
Definition: cmdid.h:149
#define FN_NAME_SHAPE
Definition: cmdid.h:440
#define FN_POSTIT
Definition: cmdid.h:215
void SetRotation(Degree10 nOld, Degree10 nNew, const Size &rUnrotatedSize)
Definition: frmmgr.cxx:600
const SwFormatHoriOrient & GetHoriOrient() const
Definition: frmmgr.hxx:147
Definition: view.hxx:144
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
void UpdateFlyFrame()
Definition: frmmgr.cxx:160
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