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 );
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  {
739  SfxItemSet aSet(
740  rSh.GetAttrPool(),
741  svl::Items<
744  rSh.GetFlyFrameAttr( aSet );
745 
748 
749  bProtect |= bParentCntProt;
750 
751  const FrameTypeFlags eFrameType = rSh.GetFrameType(nullptr,true);
752  SwFlyFrameAttrMgr aMgr( false, &rSh, Frmmgr_Type::NONE );
753 
754  SfxWhichIter aIter( rSet );
755  sal_uInt16 nWhich = aIter.FirstWhich();
756  while ( nWhich )
757  {
758  switch ( nWhich )
759  {
760  case RES_FRM_SIZE:
761  {
762  const SwFormatFrameSize& aSz(aMgr.GetFrameSize());
763  rSet.Put(aSz);
764  }
765  break;
766  case RES_VERT_ORIENT:
767  case RES_HORI_ORIENT:
768  case SID_ATTR_ULSPACE:
769  case SID_ATTR_LRSPACE:
770  case RES_LR_SPACE:
771  case RES_UL_SPACE:
772  case RES_PROTECT:
773  case RES_OPAQUE:
774  case RES_PRINT:
775  case RES_SURROUND:
776  {
777  rSet.Put(aSet.Get(GetPool().GetWhich(nWhich)));
778  }
779  break;
780  case SID_OBJECT_ALIGN:
781  {
782  if ( bProtect )
783  rSet.DisableItem( nWhich );
784  }
785  break;
786  case SID_OBJECT_ALIGN_LEFT :
787  case SID_OBJECT_ALIGN_CENTER :
788  case SID_OBJECT_ALIGN_RIGHT :
792  if ( (eFrameType & FrameTypeFlags::FLY_INCNT) ||
793  bProtect ||
794  ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) &&
795  bHtmlMode ))
796  {
797  rSet.DisableItem( nWhich );
798  }
799  else
800  {
801  sal_Int16 nHoriOrient = -1;
802  switch(nWhich)
803  {
804  case SID_OBJECT_ALIGN_LEFT:
805  nHoriOrient = text::HoriOrientation::LEFT;
806  break;
807  case SID_OBJECT_ALIGN_CENTER:
808  nHoriOrient = text::HoriOrientation::CENTER;
809  break;
810  case SID_OBJECT_ALIGN_RIGHT:
811  nHoriOrient = text::HoriOrientation::RIGHT;
812  break;
813  default:
814  break;
815  }
816  SwFormatHoriOrient aHOrient(aMgr.GetHoriOrient());
817  if (nHoriOrient != -1)
818  rSet.Put(SfxBoolItem(nWhich, nHoriOrient == aHOrient.GetHoriOrient()));
819  }
820  break;
827  if ( !(eFrameType & FrameTypeFlags::FLY_INCNT) || bProtect
828  || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) )
829  rSet.DisableItem( nWhich );
830  break;
831 
832  case SID_OBJECT_ALIGN_UP :
833  case SID_OBJECT_ALIGN_MIDDLE :
834  case SID_OBJECT_ALIGN_DOWN :
835 
839  if ( bProtect || (bHtmlMode && eFrameType & FrameTypeFlags::FLY_ATCNT))
840  rSet.DisableItem( nWhich );
841  else
842  {
843  // These slots need different labels depending on whether they are anchored in a character
844  // or on a paragraph/page etc.
845  OUString sNewLabel;
846  if (eFrameType & FrameTypeFlags::FLY_INCNT)
847  {
848  switch (nWhich)
849  {
850  case SID_OBJECT_ALIGN_UP :
852  sNewLabel = SwResId(STR_FRMUI_TOP_BASE);
853  break;
854  case SID_OBJECT_ALIGN_MIDDLE :
856  sNewLabel = SwResId(STR_FRMUI_CENTER_BASE);
857  break;
858  case SID_OBJECT_ALIGN_DOWN :
860  if(!bHtmlMode)
861  sNewLabel = SwResId(STR_FRMUI_BOTTOM_BASE);
862  else
863  rSet.DisableItem( nWhich );
864  break;
865  }
866  }
867  else
868  {
869  if (nWhich != FN_FRAME_ALIGN_VERT_TOP &&
870  nWhich != SID_OBJECT_ALIGN_UP )
871  {
872  if (aMgr.GetAnchor() == RndStdIds::FLY_AT_FLY)
873  {
874  const SwFrameFormat* pFormat = rSh.IsFlyInFly();
875  if (pFormat)
876  {
877  const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize();
878  if (rFrameSz.GetHeightSizeType() != SwFrameSize::Fixed)
879  {
880  rSet.DisableItem( nWhich );
881  break;
882  }
883  }
884  }
885  }
886  OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame()->GetFrame().GetFrameInterface()));
887  switch (nWhich)
888  {
889  case SID_OBJECT_ALIGN_UP :
891  {
892  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignTop", aModuleName);
894  break;
895  }
896  case SID_OBJECT_ALIGN_MIDDLE:
898  {
899  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignVerticalCenter", aModuleName);
901  break;
902  }
903  case SID_OBJECT_ALIGN_DOWN:
905  {
906  auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignBottom", aModuleName);
908  break;
909  }
910  }
911  }
912  if ( !sNewLabel.isEmpty() )
913  rSet.Put( SfxStringItem( nWhich, sNewLabel ));
914  }
915  break;
916  case SID_HYPERLINK_GETLINK:
917  {
918  SvxHyperlinkItem aHLinkItem;
919  const SfxPoolItem* pItem;
920 
922  rSh.GetFlyFrameAttr( aURLSet );
923 
924  if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem))
925  {
926  const SwFormatURL* pFormatURL = static_cast<const SwFormatURL*>(pItem);
927  aHLinkItem.SetURL(pFormatURL->GetURL());
928  aHLinkItem.SetTargetFrame(pFormatURL->GetTargetFrameName());
929  aHLinkItem.SetName(rSh.GetFlyName());
930  }
931 
932  aHLinkItem.SetInsertMode(static_cast<SvxLinkInsertMode>(aHLinkItem.GetInsertMode() |
933  (bHtmlMode ? HLINK_HTMLMODE : 0)));
934 
935  rSet.Put(aHLinkItem);
936  }
937  break;
938 
939  case FN_FRAME_CHAIN:
940  {
941  const SelectionType nSel = rSh.GetSelectionType();
942  if (nSel & SelectionType::Graphic || nSel & SelectionType::Ole)
943  rSet.DisableItem( FN_FRAME_CHAIN );
944  else
945  {
946  const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat();
947  if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() ||
948  !pFormat || pFormat->GetChain().GetNext() )
949  {
950  rSet.DisableItem( FN_FRAME_CHAIN );
951  }
952  else
953  {
954  bool bChainMode = rSh.GetView().GetEditWin().IsChainMode();
955  rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) );
956  }
957  }
958  }
959  break;
960  case FN_FRAME_UNCHAIN:
961  {
962  const SelectionType nSel = rSh.GetSelectionType();
963  if (nSel & SelectionType::Graphic || nSel & SelectionType::Ole)
965  else
966  {
967  const SwFrameFormat *pFormat = rSh.GetFlyFrameFormat();
968  if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() ||
969  !pFormat || !pFormat->GetChain().GetNext() )
970  {
972  }
973  }
974  }
975  break;
976  case SID_FRAME_TO_TOP:
977  case SID_FRAME_TO_BOTTOM:
978  case FN_FRAME_UP:
979  case FN_FRAME_DOWN:
980  if ( bParentCntProt )
981  rSet.DisableItem( nWhich );
982  break;
983 
984  case SID_ATTR_TRANSFORM:
985  {
986  rSet.DisableItem( nWhich );
987  }
988  break;
989 
990  case SID_ATTR_TRANSFORM_PROTECT_SIZE:
991  {
992  const FlyProtectFlags eProtection = rSh.IsSelObjProtected( FlyProtectFlags::Size );
993  if ( ( eProtection & FlyProtectFlags::Content ) ||
994  ( eProtection & FlyProtectFlags::Size ) )
995  {
996  rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, true ) );
997  }
998  else
999  {
1000  rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, false ) );
1001  }
1002  }
1003  break;
1004 
1005  case SID_ATTR_TRANSFORM_WIDTH:
1006  {
1007  rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_WIDTH, aMgr.GetSize().getWidth() ) );
1008  }
1009  break;
1010 
1011  case SID_ATTR_TRANSFORM_HEIGHT:
1012  {
1013  rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_HEIGHT, aMgr.GetSize().getHeight() ) );
1014  }
1015  break;
1016 
1017  case FN_FORMAT_FRAME_DLG:
1018  {
1019  const SelectionType nSel = rSh.GetSelectionType();
1020  if ( bParentCntProt || nSel & SelectionType::Graphic)
1021  rSet.DisableItem( nWhich );
1022  }
1023  break;
1024  // #i73249#
1026  case FN_NAME_SHAPE:
1027  {
1028  SwWrtShell &rWrtSh = GetShell();
1029  SdrView* pSdrView = rWrtSh.GetDrawViewWithValidMarkList();
1030  if ( !pSdrView ||
1031  pSdrView->GetMarkedObjectCount() != 1 )
1032  {
1033  rSet.DisableItem( nWhich );
1034  }
1035  }
1036  break;
1037 
1038  case FN_POSTIT:
1039  {
1040  SwFlyFrame* pFly = rSh.GetSelectedFlyFrame();
1041  if (pFly)
1042  {
1043  SwFrameFormat* pFormat = pFly->GetFormat();
1044  if (pFormat)
1045  {
1046  RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
1047  // SwWrtShell::InsertPostIt() only works on as-char and at-char anchored
1048  // images.
1049  if (eAnchorId != RndStdIds::FLY_AS_CHAR && eAnchorId != RndStdIds::FLY_AT_CHAR)
1050  {
1051  rSet.DisableItem(nWhich);
1052  }
1053  }
1054  }
1055  }
1056  break;
1057 
1058  default:
1059  /* do nothing */;
1060  break;
1061  }
1062  nWhich = aIter.NextWhich();
1063  }
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  if ((pBorderLine = aBoxItem->GetTop()) != nullptr)
1121  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1122  if ((pBorderLine = aBoxItem->GetBottom()) != nullptr)
1123  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1124  if ((pBorderLine = aBoxItem->GetLeft()) != nullptr)
1125  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1126  if ((pBorderLine = aBoxItem->GetRight()) != nullptr)
1127  lcl_FrameGetMaxLineWidth(pBorderLine, aBorderLine);
1128 
1129  if(aBorderLine.GetOutWidth() == 0)
1130  {
1131  aBorderLine.SetBorderLineStyle(
1132  SvxBorderLineStyle::SOLID);
1133  aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
1134  }
1135  //Set distance only if the request is received from the controller.
1136 
1137 #if HAVE_FEATURE_SCRIPTING
1138  if(!StarBASIC::IsRunning())
1139 #endif
1140  {
1141  // TODO: should this copy 4 individual Dist instead?
1142  aNewBox->SetAllDistances(rBoxItem.GetSmallestDistance());
1143  }
1144 
1145  aBoxItem = std::move(aNewBox);
1146 
1147  if( aBoxItem->GetTop() != nullptr )
1148  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1149  if( aBoxItem->GetBottom() != nullptr )
1150  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1151  if( aBoxItem->GetLeft() != nullptr )
1152  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1153  if( aBoxItem->GetRight() != nullptr )
1154  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1155  }
1156  }
1157  break;
1158 
1159  case SID_FRAME_LINESTYLE:
1160  {
1161  if (pArgs->GetItemState(SID_FRAME_LINESTYLE, false, &pItem) == SfxItemState::SET)
1162  {
1163  const SvxLineItem* pLineItem =
1164  static_cast<const SvxLineItem*>(pItem);
1165 
1166  if ( pLineItem->GetLine() )
1167  {
1168  aBorderLine = *(pLineItem->GetLine());
1169 
1170  if (!aBoxItem->GetTop() && !aBoxItem->GetBottom() &&
1171  !aBoxItem->GetLeft() && !aBoxItem->GetRight())
1172  {
1173  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1174  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1175  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1176  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1177  }
1178  else
1179  {
1180  if( aBoxItem->GetTop() )
1181  {
1182  aBorderLine.SetColor( aBoxItem->GetTop()->GetColor() );
1183  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1184  }
1185  if( aBoxItem->GetBottom() )
1186  {
1187  aBorderLine.SetColor( aBoxItem->GetBottom()->GetColor());
1188  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1189  }
1190  if( aBoxItem->GetLeft() )
1191  {
1192  aBorderLine.SetColor( aBoxItem->GetLeft()->GetColor());
1193  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1194  }
1195  if( aBoxItem->GetRight() )
1196  {
1197  aBorderLine.SetColor(aBoxItem->GetRight()->GetColor());
1198  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1199  }
1200  }
1201  }
1202  else
1203  {
1204  aBoxItem->SetLine(nullptr, SvxBoxItemLine::TOP);
1205  aBoxItem->SetLine(nullptr, SvxBoxItemLine::BOTTOM);
1206  aBoxItem->SetLine(nullptr, SvxBoxItemLine::LEFT);
1207  aBoxItem->SetLine(nullptr, SvxBoxItemLine::RIGHT);
1208  }
1209  }
1210  }
1211  break;
1212 
1213  case SID_FRAME_LINECOLOR:
1214  {
1215  if (pArgs->GetItemState(SID_FRAME_LINECOLOR, false, &pItem) == SfxItemState::SET)
1216  {
1217  const Color& rNewColor = static_cast<const SvxColorItem*>(pItem)->GetValue();
1218 
1219  if (!aBoxItem->GetTop() && !aBoxItem->GetBottom() &&
1220  !aBoxItem->GetLeft() && !aBoxItem->GetRight())
1221  {
1222  aBorderLine.SetColor( rNewColor );
1223  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
1224  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
1225  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
1226  aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
1227  }
1228  else
1229  {
1230  if ( aBoxItem->GetTop() )
1231  const_cast<SvxBorderLine*>(aBoxItem->GetTop())->SetColor( rNewColor );
1232  if ( aBoxItem->GetBottom() )
1233  const_cast<SvxBorderLine*>(aBoxItem->GetBottom())->SetColor( rNewColor );
1234  if ( aBoxItem->GetLeft() )
1235  const_cast<SvxBorderLine*>(aBoxItem->GetLeft())->SetColor( rNewColor );
1236  if ( aBoxItem->GetRight() )
1237  const_cast<SvxBorderLine*>(aBoxItem->GetRight())->SetColor( rNewColor );
1238  }
1239  }
1240  }
1241  break;
1242  }
1243  }
1244  if (bDefault && (aBoxItem->GetTop() || aBoxItem->GetBottom() ||
1245  aBoxItem->GetLeft() || aBoxItem->GetRight()))
1246  {
1247  aBoxItem->SetAllDistances(MIN_BORDER_DIST);
1248  }
1249  aFrameSet.Put( *aBoxItem );
1250  // Template AutoUpdate
1251  SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
1252  if(pFormat && pFormat->IsAutoUpdateFormat())
1253  {
1254  rSh.AutoUpdateFrame(pFormat, aFrameSet);
1255  }
1256  else
1257  rSh.SetFlyFrameAttr( aFrameSet );
1258 
1259 }
1260 
1261 static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine)
1262 {
1263  if(pBorderLine->GetWidth() > rBorderLine.GetWidth())
1264  rBorderLine.SetWidth(pBorderLine->GetWidth());
1265 
1266  rBorderLine.SetBorderLineStyle(pBorderLine->GetBorderLineStyle());
1267  rBorderLine.SetColor(pBorderLine->GetColor());
1268 }
1269 
1271 {
1272  SwWrtShell &rSh = GetShell();
1274 
1275  if (bParentCntProt)
1276  {
1277  if (rSh.IsFrameSelected())
1278  rSet.DisableItem( SID_FRAME_LINECOLOR );
1279 
1280  rSet.DisableItem( SID_ATTR_BORDER );
1281  rSet.DisableItem( SID_FRAME_LINESTYLE );
1282  }
1283  else
1284  {
1285  if (rSh.IsFrameSelected())
1286  {
1287  SfxItemSet aFrameSet( rSh.GetAttrPool(), svl::Items<RES_BOX, RES_BOX>{} );
1288 
1289  rSh.GetFlyFrameAttr(aFrameSet);
1290 
1291  const SvxBorderLine* pLine = aFrameSet.Get(RES_BOX).GetTop();
1292  rSet.Put(SvxColorItem(pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR));
1293  }
1294  }
1295 }
1296 
1298 {
1299  const SelectionType nSel = GetShell().GetSelectionType();
1300  if ( (nSel & SelectionType::Graphic)
1301  || (nSel & SelectionType::Ole) )
1302  {
1304  }
1305  else if ( GetShell().CursorInsideInputField() )
1306  {
1308  }
1309 }
1310 
1312 {
1313  SwWrtShell &rSh = GetShell();
1314 
1315  if(rSh.IsFrameSelected())
1316  {
1317  rSh.GetFlyFrameAttr(rSet);
1318  }
1319  else
1320  {
1321  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
1322 
1323  if(pSdrView)
1324  {
1325  rSet.Put(pSdrView->GetDefaultAttr());
1326  }
1327  }
1328 }
1329 
1331 {
1332  const SfxItemSet* pArgs = rReq.GetArgs();
1333  SwWrtShell& rSh = GetShell();
1334 
1335  if(pArgs)
1336  {
1337  if(rSh.IsFrameSelected())
1338  {
1339  rSh.SetFlyFrameAttr(const_cast< SfxItemSet& >(*pArgs));
1340  }
1341  else
1342  {
1343  SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
1344 
1345  if(pSdrView)
1346  {
1347  pSdrView->SetDefaultAttr(*pArgs, false);
1348  }
1349  }
1350  }
1351  else
1352  {
1353  SfxDispatcher* pDis = rSh.GetView().GetViewFrame()->GetDispatcher();
1354 
1355  switch(rReq.GetSlot())
1356  {
1357  case SID_ATTR_FILL_STYLE:
1358  case SID_ATTR_FILL_COLOR:
1359  case SID_ATTR_FILL_GRADIENT:
1360  case SID_ATTR_FILL_HATCH:
1361  case SID_ATTR_FILL_BITMAP:
1362  case SID_ATTR_FILL_TRANSPARENCE:
1363  case SID_ATTR_FILL_FLOATTRANSPARENCE:
1364  {
1365  pDis->Execute(SID_ATTRIBUTES_AREA);
1366  break;
1367  }
1368  }
1369  }
1370 }
1371 
1373 {
1374  switch(rReq.GetSlot())
1375  {
1376  case SID_ATTRIBUTES_AREA:
1377  {
1378  SwWrtShell& rSh = GetShell();
1379 
1380  if(rSh.IsFrameSelected())
1381  {
1382  SdrModel* pDoc = rSh.GetDrawView()->GetModel();
1383  SfxItemSet aNewAttr(pDoc->GetItemPool());
1384 
1385  // get attributes from FlyFrame
1386  rSh.GetFlyFrameAttr(aNewAttr);
1387 
1390  GetView().GetFrameWeld(),
1391  &aNewAttr,
1392  pDoc,
1393  false));
1394 
1395  pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){
1396  if(nResult == RET_OK)
1397  {
1398  // set attributes at FlyFrame
1399  GetShell().SetFlyFrameAttr(const_cast< SfxItemSet& >(*pDlg->GetOutputItemSet()));
1400 
1401  static sal_uInt16 aInval[] =
1402  {
1403  SID_ATTR_FILL_STYLE,
1404  SID_ATTR_FILL_COLOR,
1405  SID_ATTR_FILL_TRANSPARENCE,
1406  SID_ATTR_FILL_FLOATTRANSPARENCE,
1407  0
1408  };
1409 
1411 
1412  rBnd.Invalidate(aInval);
1413  rBnd.Update(SID_ATTR_FILL_STYLE);
1414  rBnd.Update(SID_ATTR_FILL_COLOR);
1415  rBnd.Update(SID_ATTR_FILL_TRANSPARENCE);
1416  rBnd.Update(SID_ATTR_FILL_FLOATTRANSPARENCE);
1417  }
1418  pDlg->disposeOnce();
1419  });
1420  }
1421 
1422  break;
1423  }
1424  }
1425 }
1426 
1428 {
1429  SfxWhichIter aIter(rSet);
1430  sal_uInt16 nWhich(aIter.FirstWhich());
1431 
1432  while(nWhich)
1433  {
1434  switch(nWhich)
1435  {
1436  case SID_ATTRIBUTES_AREA:
1437  {
1438  SwWrtShell& rSh = GetShell();
1439 
1440  if(!rSh.IsFrameSelected())
1441  {
1442  rSet.DisableItem(nWhich);
1443  }
1444 
1445  break;
1446  }
1447  default:
1448  {
1449  rSet.DisableItem(nWhich);
1450  break;
1451  }
1452  }
1453 
1454  nWhich = aIter.NextWhich();
1455  }
1456 }
1457 
1458 /* 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:1445
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:150
FieldUnit
virtual const SwFlyFrameFormat * GetFormat() const override
Definition: fly.cxx:2800
void DisableStateTextFrame(SfxItemSet &rSet)
Definition: frmsh.cxx:1427
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)
#define FN_FRAME_TO_ANCHOR
Definition: cmdid.h:692
SfxViewFrame * GetFrame() const
void ExecFrameStyle(SfxRequest const &rReq)
Definition: frmsh.cxx:1084
#define FN_PARAM_CHAIN_PREVIOUS
Definition: cmdid.h:808
std::string GetValue
constexpr TypedWhichId< SwFormatCol > RES_COL(109)
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
#define FN_FRAME_UNCHAIN
Definition: cmdid.h:451
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
SfxDispatcher * GetDispatcher()
SwWrtShell & GetShell()
Definition: basesh.cxx:2673
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:614
#define FN_SET_FRM_ALT_NAME
Definition: cmdid.h:847
Check only parents.
sal_uInt16 GetValue() const
void Height(long nNew)
Definition: swrect.hxx:191
sal_uInt16 FirstWhich()
void EnterStdMode()
Definition: select.cxx:550
SwEditWin & GetEditWin()
Definition: view.hxx:403
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:316
RndStdIds GetAnchor() const
Definition: frmmgr.hxx:166
#define MIN_BORDER_DIST
Definition: swtypes.hxx:74
void EndAllAction()
Definition: edws.cxx:97
#define FN_FRAME_ALIGN_VERT_TOP
Definition: cmdid.h:330
void InsertPostIt(SwFieldMgr &rFieldMgr, const SfxRequest &rReq)
Inserts a new annotation/comment at the current cursor position / selection.
Definition: wrtsh1.cxx:1885
Point GetPos() const
Definition: frmmgr.hxx:162
sal_uInt16 NextWhich()
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
const SwFrameFormat * GetFlyNum(size_t nIdx, FlyCntType eType, bool bIgnoreTextBoxes=false) const
Definition: feshview.cxx:2572
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
Definition: doc.cxx:154
void SetKeepRatio(bool b)
Definition: viewopt.hxx:527
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:1311
const SwFrameFormat * IsFlyInFly()
Is selected frame within another frame?
Definition: fefly1.cxx:310
PropertiesInfo aProperties
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(103)
static void CreateSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:4085
const OUString & GetName() const
Definition: format.hxx:111
int nCount
void StateInsert(SfxItemSet &rSet)
Definition: frmsh.cxx:1297
HLINK_HTMLMODE
const SfxItemSet & GetAttrSet() const
Definition: frmmgr.hxx:123
void SetVertOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:566
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:284
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:1465
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
void SetWidth(long n)
#define FN_FRAME_ALIGN_VERT_CENTER
Definition: cmdid.h:332
void ExecDrawAttrArgsTextFrame(SfxRequest const &rReq)
Definition: frmsh.cxx:1330
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Definition: fefly1.cxx:1034
void SelectionToBottom(bool bBottom=true)
Definition: feshview.cxx:1055
size_t GetFlyCount(FlyCntType eType, bool bIgnoreTextBoxes=false) const
Iterate over flys - for Basic-collections.
Definition: feshview.cxx:2567
OUString GetObjTitle() const
Definition: fefly1.cxx:1938
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
void SetObjDescription(const OUString &rDescription)
Definition: fefly1.cxx:2000
#define FN_UNO_DESCRIPTION
Definition: cmdid.h:849
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:614
virtual ~SwFrameShell() override
Definition: frmsh.cxx:1078
Style of a layout element.
Definition: frmfmt.hxx:57
#define FN_NUMBERING_OUTLINE_DLG
Definition: cmdid.h:486
const OUString & GetURL() const
SwApplyTemplate * GetApplyTemplate() const
Definition: edtwin.hxx:230
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:687
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
int i
#define FN_KEEP_ASPECT_RATIO
Definition: cmdid.h:845
void SetAbsPos(const Point &rLPoint)
Definition: frmmgr.cxx:232
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
size_t GetMarkedObjectCount() const
#define FN_FRAME_ALIGN_HORZ_LEFT
Definition: cmdid.h:327
constexpr TypedWhichId< SwFormatURL > RES_URL(111)
#define FN_FRAME_ALIGN_VERT_CHAR_CENTER
Definition: cmdid.h:407
sal_uInt16 GetGutterWidth(bool bMin=false) const
Definition: atrfrm.cxx:895
SfxBindings & GetBindings()
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1077
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:62
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:337
sal_uInt8 GetHeightPercent() const
Definition: fmtfsize.hxx:88
void SetAttrSet(const SfxItemSet &rSet)
Definition: frmmgr.cxx:601
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:405
void ExecFormatFootnote()
Definition: view0.cxx:633
FlyProtectFlags
values can be combined via logical or
Definition: fesh.hxx:104
#define FN_FRAME_ALIGN_HORZ_CENTER
Definition: cmdid.h:329
#define FN_SURROUND
Definition: cmdid.h:841
#define FN_FRAME_DOWN
Definition: cmdid.h:364
#define FN_SET_FRM_POSITION
Definition: cmdid.h:334
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:1261
virtual SvxBoxItem * Clone(SfxItemPool *pPool=nullptr) const override
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:588
OUString SwResId(const char *pId)
Definition: swmodule.cxx:178
#define FN_MATH_BASELINE_ALIGNMENT
Definition: cmdid.h:615
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:1035
#define FN_FRAME_ALIGN_VERT_BOTTOM
Definition: cmdid.h:331
void SetName(const OUString &rName)
void PutAreaListItems(SfxItemSet &rSet) const
Put needed items for XPropertyList entries from the DrawModel.
Definition: drawdoc.cxx:129
#define FN_FRAME_ALIGN_VERT_ROW_TOP
Definition: cmdid.h:401
Frame cannot be moved in Var-direction.
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
Definition: feshview.cxx:2597
SwDocShell * GetDocShell()
Definition: view.cxx:1107
SwFlyFrameFormat * GetNext() const
Definition: fmtcnct.hxx:54
#define FN_GET_PRINT_AREA
Definition: cmdid.h:727
#define SFX_OBJECTBAR_OBJECT
void HideChainMarker()
Definition: feshview.cxx:2859
#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM
Definition: cmdid.h:402
void Execute(SfxRequest &)
Definition: frmsh.cxx:130
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
Definition: fefly1.cxx:1187
Rect of current page.
#define FN_FRAME_CHAIN
Definition: cmdid.h:450
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:809
void Update(sal_uInt16 nId)
static bool IsRunning()
Sequence< beans::PropertyValue > GetCommandProperties(const OUString &rsCommandName, const OUString &rsModuleName)
void CallChgLnk()
Definition: crsrsh.cxx:2506
constexpr sal_uInt16 RES_FRMATR_END(131)
#define FN_FORMAT_FRAME_DLG
Definition: cmdid.h:315
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define FN_INSERT_FRAME
Definition: cmdid.h:214
sal_uInt16 GetSlot() const
static const OUString & GetContextName(const Context eContext)
bool IsPosToggle() const
Definition: fmtornt.hxx:95
bool IsKeepRatio() const
Definition: viewopt.hxx:508
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:363
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:640
#define GetWhich(nSlot)
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:426
void SetHorzOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:559
void Width(long nNew)
Definition: swrect.hxx:187
static void ClearSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
Definition: swdtflvr.cxx:4097
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:844
OUString aName
RET_OK
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:175
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
void SetHeight(long n)
void SetSize(const Size &rLSize)
Definition: frmmgr.cxx:594
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
Definition: wrtsh1.cxx:1612
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:1372
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
void SetInsertMode(SvxLinkInsertMode eNew)
#define FN_FORMAT_FOOTNOTE_DLG
Definition: cmdid.h:320
void SetChainMarker()
Definition: feshview.cxx:2865
static const SwFrameFormat * lcl_GetFrameFormatByName(SwWrtShell const &rSh, const OUString &rName)
Definition: frmsh.cxx:83
void GetLineStyleState(SfxItemSet &rSet)
Definition: frmsh.cxx:1270
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:1244
void Unchain(SwFrameFormat &rFormat)
Definition: feshview.cxx:2852
void SetRotation(sal_uInt16 nOld, sal_uInt16 nNew, const Size &rUnrotatedSize)
Definition: frmmgr.cxx:580
RndStdIds
const SfxItemPool & GetItemPool() const
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
void SetObjTitle(const OUString &rTitle)
Definition: fefly1.cxx:1958
#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
long getHeight() const
const Size & GetSize() const
Definition: frmmgr.hxx:137
#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM
Definition: cmdid.h:406
#define FN_FRAME_ALIGN_VERT_ROW_CENTER
Definition: cmdid.h:403
Frame is variable in Var-direction.
OUString GetObjDescription() const
Definition: fefly1.cxx:1980
SwChainRet Chain(SwFrameFormat &rSource, const Point &rPt)
Definition: feshview.cxx:2829
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1388
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:439
long getWidth() const
void setWidth(long nWidth)
SdrModel * GetModel() const
#define FN_FRAME_ALIGN_HORZ_RIGHT
Definition: cmdid.h:328
void SetContextName(const OUString &rsContextName)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
OUString GetFlyName() const
Definition: fefly1.cxx:1455
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
Definition: fews.cxx:235
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
bool IsFrameSelected() const
Definition: feshview.cxx:1158
void SetChainMode(bool bOn)
Definition: edtwin.cxx:5822
#define FN_DRAW_WRAP_DLG
Definition: cmdid.h:151
#define FN_NAME_SHAPE
Definition: cmdid.h:437
#define FN_POSTIT
Definition: cmdid.h:210
const SwFormatHoriOrient & GetHoriOrient() const
Definition: frmmgr.hxx:146
Definition: view.hxx:146
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
void UpdateFlyFrame()
Definition: frmmgr.cxx:140
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:456
bool IsChainMode() const
Definition: edtwin.hxx:224
void setHeight(long nHeight)