LibreOffice Module sw (master)  1
frmmgr.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 <cmdid.h>
21 #include <hintids.hxx>
22 
23 #include <svl/stritem.hxx>
24 #include <editeng/boxitem.hxx>
25 #include <editeng/lrspitem.hxx>
26 #include <editeng/ulspitem.hxx>
27 #include <editeng/shaditem.hxx>
29 #include <svx/xdef.hxx>
30 #include <fmtclds.hxx>
31 #include <wrtsh.hxx>
32 #include <view.hxx>
33 #include <viewopt.hxx>
34 #include <uitool.hxx>
35 #include <frmmgr.hxx>
36 #include <format.hxx>
37 #include <mdiexp.hxx>
38 #include <poolfmt.hxx>
39 #include <com/sun/star/text/HoriOrientation.hpp>
40 #include <com/sun/star/text/VertOrientation.hpp>
41 #include <com/sun/star/text/RelOrientation.hpp>
42 #include <grfatr.hxx>
43 
44 using namespace ::com::sun::star;
45 
46 static sal_uInt16 aFrameMgrRange[] = {
47  RES_FRMATR_BEGIN, RES_FRMATR_END-1, // 87-129
48 
49  // RotGrfFlyFrame: Support here, but seems not to be
50  // added in range of m_pOwnSh->GetFlyFrameAttr result
51  // (see below). Tried to find, but could not identify
53 
54  // FillAttribute support
55  XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1014-1033
56 
57  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
59  0};
60 
61 // determine frame attributes via Shell
63  m_aSet( static_cast<SwAttrPool&>(pSh->GetAttrPool()), aFrameMgrRange ),
64  m_pOwnSh( pSh ),
65  m_bAbsPos( false ),
66  m_bNewFrame( bNew ),
67  m_bIsInVertical( false ),
68  m_bIsInVerticalL2R( false )
69 {
70  if ( m_bNewFrame )
71  {
72  sal_uInt16 nId;
73  switch ( nType )
74  {
75  case Frmmgr_Type::TEXT: nId = RES_POOLFRM_FRAME; break;
76  case Frmmgr_Type::OLE: nId = RES_POOLFRM_OLE; break;
77  case Frmmgr_Type::GRF: nId = RES_POOLFRM_GRAPHIC; break;
78  // set defaults:
79  default: nId=0; break;
80  }
83  if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) )
84  m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::PRINT_AREA ) );
85 
86  if (nType == Frmmgr_Type::GRF || nType == Frmmgr_Type::OLE)
87  {
88  m_aSet.Put(SwFormatAnchor(RndStdIds::FLY_AT_CHAR));
89  }
90  }
91  else if ( nType == Frmmgr_Type::NONE )
92  {
94  bool bRightToLeft;
96  }
98 }
99 
101  m_aSet( rSet ),
102  m_pOwnSh( pSh ),
103  m_bAbsPos( false ),
104  m_bNewFrame( bNew ),
105  m_bIsInVertical(false),
106  m_bIsInVerticalL2R(false)
107 {
108  if(!bNew)
109  {
110  bool bRightToLeft;
111  m_bIsInVertical = pSh->IsFrameVertical(true, bRightToLeft, m_bIsInVerticalL2R);
112  }
113 }
114 
115 // Initialise
117 {
118  if ( !m_bNewFrame && m_pOwnSh->IsFrameSelected() )
121 }
122 
124 {
125  const SfxPoolItem* pItem = nullptr;
126 
127  if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SfxItemState::SET)
128  m_pOwnSh->SetFlyName(static_cast<const SfxStringItem *>(pItem)->GetValue());
129 
131 
132  if ( m_bAbsPos )
133  {
135  m_bAbsPos = false;
136  }
137 }
138 
139 // change existing Fly-Frame
141 {
142  OSL_ENSURE( m_pOwnSh->IsFrameSelected(),
143  "no frame selected or no shell, update not possible");
144 
145  if( m_pOwnSh->IsFrameSelected() )
146  {
147  //JP 6.8.2001: set never an invalid anchor into the core.
148  const SfxPoolItem *pGItem, *pItem;
149  if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem ))
150  {
152  if( m_pOwnSh->GetFlyFrameAttr( aGetSet ) && 1 == aGetSet.Count() &&
153  SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem )
154  && static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() ==
155  static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId() )
157  }
158 
159  // return wg. BASIC
160  if( m_aSet.Count() )
161  {
164  UpdateFlyFrame_();
166  }
167  }
168 }
169 
170 // insert frame
172 {
174 
175  bool bRet = nullptr != m_pOwnSh->NewFlyFrame( m_aSet );
176 
177  // turn on the right mode at the shell, frame got selected automatically.
178  if ( bRet )
179  {
180  UpdateFlyFrame_();
183  }
185 }
186 
187 // Insert frames of type eAnchorType. Position and size are being set explicitly.
188 // Not-allowed values of the enumeration type get corrected.
190  const Point &rPos,
191  const Size &rSize )
192 {
193  OSL_ENSURE( eAnchorType == RndStdIds::FLY_AT_PAGE ||
194  eAnchorType == RndStdIds::FLY_AT_PARA ||
195  eAnchorType == RndStdIds::FLY_AT_CHAR ||
196  eAnchorType == RndStdIds::FLY_AT_FLY ||
197  eAnchorType == RndStdIds::FLY_AS_CHAR, "invalid frame type" );
198 
199  SetPos( rPos );
200 
201  SetSize( rSize );
202  SetAnchor( eAnchorType );
203  InsertFlyFrame();
204 }
205 
206 // set anchor
208 {
209  sal_uInt16 nPhyPageNum, nVirtPageNum;
210  m_pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
211 
212  m_aSet.Put( SwFormatAnchor( eId, nPhyPageNum ) );
213  if ((RndStdIds::FLY_AT_PAGE == eId) || (RndStdIds::FLY_AT_PARA == eId) || (RndStdIds::FLY_AT_CHAR == eId)
214  || (RndStdIds::FLY_AT_FLY == eId))
215  {
216  SwFormatVertOrient aVertOrient( GetVertOrient() );
217  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
218  aHoriOrient.SetRelationOrient( text::RelOrientation::FRAME );
219  aVertOrient.SetRelationOrient( text::RelOrientation::FRAME );
220  m_aSet.Put( aVertOrient );
221  m_aSet.Put( aHoriOrient );
222  }
223 }
224 
225 // set the attribute for columns
227 {
228  m_aSet.Put( rCol );
229 }
230 
231 // set absolute position
232 void SwFlyFrameAttrMgr::SetAbsPos( const Point& rPoint )
233 {
234  m_bAbsPos = true;
235  m_aAbsPos = rPoint;
236  SwFormatVertOrient aVertOrient( GetVertOrient() );
237  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
240  m_aSet.Put( aVertOrient );
241  m_aSet.Put( aHoriOrient );
242 }
243 
244 // check metrics for correctness
246  const SwPosition* pToCharContentPos,
247  bool bOnlyPercentRefValue )
248 {
249  if (!bOnlyPercentRefValue)
250  {
253  }
254 
255  SwRect aBoundRect;
256 
257  // OD 18.09.2003 #i18732# - adjustment for allowing vertical position
258  // aligned to page for fly frame anchored to paragraph or to character.
259  const RndStdIds eAnchorType = rVal.nAnchorType;
260  const SwFormatFrameSize& rSize = m_aSet.Get(RES_FRM_SIZE);
261  m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType,
262  rVal.nHRelOrient,
263  rVal.nVRelOrient,
264  pToCharContentPos,
265  rVal.bFollowTextFlow,
266  rVal.bMirror, nullptr, &rVal.aPercentSize,
267  &rSize);
268 
269  if (bOnlyPercentRefValue)
270  return;
271 
272  // #mongolianlayout#
274  {
275  Point aPos(aBoundRect.Pos());
276  long nTmp = aPos.X();
277  aPos.setX( aPos.Y() );
278  aPos.setY( nTmp );
279  Size aSize(aBoundRect.SSize());
280  nTmp = aSize.Width();
281  aSize.setWidth( aSize.Height() );
282  aSize.setHeight( nTmp );
283  aBoundRect.Chg( aPos, aSize );
284  //exchange width/height to enable correct values
285  nTmp = rVal.nWidth;
286  rVal.nWidth = rVal.nHeight;
287  rVal.nHeight = nTmp;
288  }
289  if ((eAnchorType == RndStdIds::FLY_AT_PAGE) || (eAnchorType == RndStdIds::FLY_AT_FLY))
290  {
291  // MinimalPosition
292  rVal.nMinHPos = aBoundRect.Left();
293  rVal.nMinVPos = aBoundRect.Top();
294  SwTwips nH = rVal.nHPos;
295  SwTwips nV = rVal.nVPos;
296 
297  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
298  {
300  {
301  rVal.nHPos -= ((rVal.nHPos + rVal.nWidth) - aBoundRect.Right());
302  nH = rVal.nHPos;
303  }
304  else
305  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
306  }
307 
308  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
309  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
310 
311  if (rVal.nVPos + rVal.nHeight > aBoundRect.Bottom())
312  {
314  {
315  rVal.nVPos -= ((rVal.nVPos + rVal.nHeight) - aBoundRect.Bottom());
316  nV = rVal.nVPos;
317  }
318  else
319  rVal.nHeight = aBoundRect.Bottom() - rVal.nVPos;
320  }
321 
322  if (rVal.nVPos + rVal.nHeight > aBoundRect.Bottom())
323  rVal.nHeight = aBoundRect.Bottom() - rVal.nVPos;
324 
326  nV = aBoundRect.Top();
327 
329  nH = aBoundRect.Left();
330 
331  rVal.nMaxHPos = aBoundRect.Right() - rVal.nWidth;
332  rVal.nMaxHeight = aBoundRect.Bottom() - nV;
333 
334  rVal.nMaxVPos = aBoundRect.Bottom() - rVal.nHeight;
335  rVal.nMaxWidth = aBoundRect.Right() - nH;
336  }
337  // OD 12.11.2003 #i22341# - handle to character anchored objects vertical
338  // aligned at character or top of line in a special case
339  else if ((eAnchorType == RndStdIds::FLY_AT_PARA) ||
340  ((eAnchorType == RndStdIds::FLY_AT_CHAR) &&
341  (rVal.nVRelOrient != text::RelOrientation::CHAR) &&
342  (rVal.nVRelOrient != text::RelOrientation::TEXT_LINE) ) )
343  {
344  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
345  {
347  {
348  rVal.nHPos -= ((rVal.nHPos + rVal.nWidth) - aBoundRect.Right());
349  }
350  else
351  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
352  }
353 
354  // OD 29.09.2003 #i17567#, #i18732# - consider following the text flow
355  // and alignment at page areas.
356  const bool bMaxVPosAtBottom = !rVal.bFollowTextFlow ||
357  rVal.nVRelOrient == text::RelOrientation::PAGE_FRAME ||
358  rVal.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
359  {
360  SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
361  ? aBoundRect.Bottom()
362  : aBoundRect.Height() ) -
363  rVal.nHeight;
364  if ( rVal.nVPos > nTmpMaxVPos )
365  {
367  {
368  rVal.nVPos = nTmpMaxVPos;
369  }
370  else
371  {
372  rVal.nHeight = ( bMaxVPosAtBottom
373  ? aBoundRect.Bottom()
374  : aBoundRect.Height() ) - rVal.nVPos;
375  }
376  }
377  }
378 
379  rVal.nMinHPos = aBoundRect.Left();
380  rVal.nMaxHPos = aBoundRect.Right() - rVal.nWidth;
381 
382  rVal.nMinVPos = aBoundRect.Top();
383  // OD 26.09.2003 #i17567#, #i18732# - determine maximum vertical position
384  if ( bMaxVPosAtBottom )
385  {
386  rVal.nMaxVPos = aBoundRect.Bottom() - rVal.nHeight;
387  }
388  else
389  {
390  rVal.nMaxVPos = aBoundRect.Height() - rVal.nHeight;
391  }
392 
393  // maximum width height
394  const SwTwips nH = ( rVal.nHoriOrient != text::HoriOrientation::NONE )
395  ? aBoundRect.Left()
396  : rVal.nHPos;
397  const SwTwips nV = ( rVal.nVertOrient != text::VertOrientation::NONE )
398  ? aBoundRect.Top()
399  : rVal.nVPos;
400  rVal.nMaxHeight = rVal.nMaxVPos + rVal.nHeight - nV;
401  rVal.nMaxWidth = rVal.nMaxHPos + rVal.nWidth - nH;
402  }
403  // OD 12.11.2003 #i22341# - special case for to character anchored objects
404  // vertical aligned at character or top of line.
405  // Note: (1) positive vertical values are positions above the top of line
406  // (2) negative vertical values are positions below the top of line
407  else if ( (eAnchorType == RndStdIds::FLY_AT_CHAR) &&
408  ( rVal.nVRelOrient == text::RelOrientation::CHAR ||
409  rVal.nVRelOrient == text::RelOrientation::TEXT_LINE ) )
410  {
411  // determine horizontal values
412  rVal.nMinHPos = aBoundRect.Left();
413 
414  rVal.nMaxHPos = aBoundRect.Right() - rVal.nWidth;
415  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
416  {
418  {
419  rVal.nHPos -= ((rVal.nHPos + rVal.nWidth) - aBoundRect.Right());
420  }
421  else
422  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
423  }
424 
425  const SwTwips nH = ( rVal.nHoriOrient != text::HoriOrientation::NONE )
426  ? aBoundRect.Left()
427  : rVal.nHPos;
428  rVal.nMaxWidth = rVal.nMaxHPos + rVal.nWidth - nH;
429 
430  // determine vertical values
431  rVal.nMinVPos = -( aBoundRect.Bottom() - rVal.nHeight );
432  if ( rVal.nVPos < rVal.nMinVPos &&
434  {
435  rVal.nVPos = rVal.nMinVPos;
436  }
437 
438  rVal.nMaxVPos = -aBoundRect.Top();
439  if ( rVal.nVPos > rVal.nMaxVPos &&
441  {
442  rVal.nVPos = rVal.nMaxVPos;
443  }
444 
446  {
447  rVal.nMaxHeight = aBoundRect.Bottom() + rVal.nVPos;
448  }
449  else
450  {
451  rVal.nMaxHeight = aBoundRect.Height();
452  }
453  }
454  else if ( eAnchorType == RndStdIds::FLY_AS_CHAR )
455  {
456  rVal.nMinHPos = 0;
457  rVal.nMaxHPos = 0;
458 
459  rVal.nMaxHeight = aBoundRect.Height();
460  rVal.nMaxWidth = aBoundRect.Width();
461 
462  rVal.nMaxVPos = aBoundRect.Height();
463  rVal.nMinVPos = -aBoundRect.Height() + rVal.nHeight;
464  if (rVal.nMaxVPos < rVal.nMinVPos)
465  {
466  rVal.nMinVPos = rVal.nMaxVPos;
467  rVal.nMaxVPos = -aBoundRect.Height();
468  }
469  }
470  // #mongolianlayout#
472  {
473  //restore width/height exchange
474  long nTmp = rVal.nWidth;
475  rVal.nWidth = rVal.nHeight;
476  rVal.nHeight = nTmp;
477  }
478 
479  if (rVal.nMaxWidth < rVal.nWidth)
480  rVal.nWidth = rVal.nMaxWidth;
481  if (rVal.nMaxHeight < rVal.nHeight)
482  rVal.nHeight = rVal.nMaxHeight;
483 }
484 
485 // correction for border
487 {
488  const SvxShadowItem& rShadow = GetShadow();
489  const SvxBoxItem& rBox = GetBox();
490  return rShadow.CalcShadowSpace(SvxShadowItemSide::TOP ) + rBox.CalcLineSpace(SvxBoxItemLine::TOP);
491 }
492 
494 {
495  const SvxShadowItem& rShadow = GetShadow();
496  const SvxBoxItem& rBox = GetBox();
497  return rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM);
498 }
499 
501 {
502  const SvxShadowItem& rShadow = GetShadow();
503  const SvxBoxItem& rBox = GetBox();
504  return rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT) + rBox.CalcLineSpace(SvxBoxItemLine::LEFT);
505 }
506 
508 {
509  const SvxShadowItem& rShadow = GetShadow();
510  const SvxBoxItem& rBox = GetBox();
511  return rShadow.CalcShadowSpace(SvxShadowItemSide::RIGHT) + rBox.CalcLineSpace(SvxBoxItemLine::RIGHT);
512 }
513 
514 // erase attribute from the set
515 void SwFlyFrameAttrMgr::DelAttr( sal_uInt16 nId )
516 {
517  m_aSet.ClearItem( nId );
518 }
519 
520 void SwFlyFrameAttrMgr::SetLRSpace( long nLeft, long nRight )
521 {
522  OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Which border to set?" );
523 
525  if( LONG_MAX != nLeft )
526  aTmp.SetLeft( sal_uInt16(nLeft) );
527  if( LONG_MAX != nRight )
528  aTmp.SetRight( sal_uInt16(nRight) );
529  m_aSet.Put( aTmp );
530 }
531 
532 void SwFlyFrameAttrMgr::SetULSpace( long nTop, long nBottom )
533 {
534  OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Which border to set?" );
535 
537  if( LONG_MAX != nTop )
538  aTmp.SetUpper( sal_uInt16(nTop) );
539  if( LONG_MAX != nBottom )
540  aTmp.SetLower( sal_uInt16(nBottom) );
541  m_aSet.Put( aTmp );
542 }
543 
544 void SwFlyFrameAttrMgr::SetPos( const Point& rPoint )
545 {
546  SwFormatVertOrient aVertOrient( GetVertOrient() );
547  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
548 
549  aHoriOrient.SetPos ( rPoint.X() );
551 
552  aVertOrient.SetPos ( rPoint.Y() );
554 
555  m_aSet.Put( aVertOrient );
556  m_aSet.Put( aHoriOrient );
557 }
558 
559 void SwFlyFrameAttrMgr::SetHorzOrientation( sal_Int16 eOrient )
560 {
561  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
562  aHoriOrient.SetHoriOrient( eOrient );
563  m_aSet.Put( aHoriOrient );
564 }
565 
566 void SwFlyFrameAttrMgr::SetVertOrientation( sal_Int16 eOrient )
567 {
568  SwFormatVertOrient aVertOrient( GetVertOrient() );
569  aVertOrient.SetVertOrient( eOrient );
570  m_aSet.Put( aVertOrient );
571 }
572 
574 {
575  SwFormatFrameSize aSize( GetFrameSize() );
576  aSize.SetHeightSizeType( eType );
577  m_aSet.Put( aSize );
578 }
579 
580 void SwFlyFrameAttrMgr::SetRotation(sal_uInt16 nOld, sal_uInt16 nNew, const Size& rUnrotatedSize)
581 {
582  // RotGrfFlyFrame: Central handling of real change of rotation here, all adaptations use this.
583  // Adaptation of pos/size may be wanted in the future. Already tried to keep last Size in
584  // UnrotatedSize in the SwRotationGrf Item, but this will lead to various problems. Also tried
585  // to use m_aSet.Put(...) as in other methods (also tried read methods for Rotation/UnrotatedSize) but
586  // somehow the needed ID (RES_GRFATR_ROTATION) is *not* in the SfxItemSet of the Frame, so for
587  // now set directly. Undo/Redo is preserved by AttributeChange
588  if(nOld != nNew)
589  {
590  m_pOwnSh->SetAttrItem(SwRotationGrf(nNew, rUnrotatedSize));
591  }
592 }
593 
594 void SwFlyFrameAttrMgr::SetSize( const Size& rSize )
595 {
596  SwFormatFrameSize aSize( GetFrameSize() );
597  aSize.SetSize(Size(std::max(rSize.Width(), long(MINFLY)), std::max(rSize.Height(), long(MINFLY))));
598  m_aSet.Put( aSize );
599 }
600 
602 {
603  m_aSet.ClearItem();
604  m_aSet.Put( rSet );
605 }
606 
607 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Width() const
void SetFlyName(const OUString &rName)
Set name at selected FlyFrame.
Definition: fefly1.cxx:1426
void FrameNotify(SwViewShell *pVwSh, FlyMode eMode)
Definition: edtwin3.cxx:79
const SwFormatFrameSize & GetFrameSize() const
Definition: frmmgr.hxx:150
#define RES_FRM_SIZE
Definition: hintids.hxx:289
SAL_DLLPRIVATE SwTwips CalcTopSpace()
Definition: frmmgr.cxx:486
Marks a position in the document model.
Definition: pam.hxx:35
void SetPos(const Point &rLPoint)
Definition: frmmgr.cxx:544
void UpdateAttrMgr()
Definition: frmmgr.cxx:116
long Height() const
bool m_bIsInVerticalL2R
Definition: frmmgr.hxx:59
#define MINFLY
Definition: swtypes.hxx:65
#define RES_FRMATR_END
Definition: hintids.hxx:331
void Height(long nNew)
Definition: swrect.hxx:189
sal_Int16 nId
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
Definition: crsrsh.cxx:1200
void SetCol(const SwFormatCol &rCol)
Definition: frmmgr.cxx:226
long SwTwips
Definition: swtypes.hxx:49
void Pos(const Point &rNew)
Definition: swrect.hxx:167
void SetULSpace(long nTop, long nBottom)
Definition: frmmgr.cxx:532
SwWrtShell * m_pOwnSh
Definition: frmmgr.hxx:53
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
void SetModified()
Definition: edws.cxx:69
void DelAttr(sal_uInt16 nId)
Definition: frmmgr.cxx:515
void EndAllAction()
Definition: edws.cxx:96
Value in Var-direction gives minimum (can be exceeded but not be less).
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
const SwTwips DFLT_HEIGHT
Definition: frmmgr.hxx:38
void SetLeft(const long nL, const sal_uInt16 nProp=100)
const SwView & GetView() const
Definition: wrtsh.hxx:428
void Top(const long nTop)
Definition: swrect.hxx:202
void SetHoriOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:89
#define XATTR_FILL_LAST
#define XATTR_FILL_FIRST
#define RES_UL_SPACE
Definition: hintids.hxx:292
void SetVertOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:566
SwFlyFrameAttrMgr(bool bNew, SwWrtShell *pSh, Frmmgr_Type nType)
Definition: frmmgr.cxx:62
void Right(const long nRight)
Definition: swrect.hxx:198
void SetFlyPos(const Point &rAbsPos)
Definition: fefly1.cxx:369
if(nullptr==pCandidateA||nullptr==pCandidateB)
void InsertFlyFrame()
Definition: frmmgr.cxx:171
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Definition: fefly1.cxx:1015
void SetHeightSizeType(SwFrameSize eType)
Definition: frmmgr.cxx:573
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
#define RES_ANCHOR
Definition: hintids.hxx:304
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetAbsPos(const Point &rLPoint)
Definition: frmmgr.cxx:232
SfxItemSet m_aSet
Definition: frmmgr.hxx:51
void SetVertOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:56
#define RES_GRFATR_ROTATION
Definition: hintids.hxx:337
sal_uInt16 CalcShadowSpace(SvxShadowItemSide nShadow) const
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
Definition: edatmisc.cxx:112
void SetPos(SwTwips nNew)
Definition: fmtornt.hxx:60
sal_uInt16 Count() const
FlyAnchors.
Definition: fmtanchr.hxx:34
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1058
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:337
void SetAttrSet(const SfxItemSet &rSet)
Definition: frmmgr.cxx:601
void SetRelationOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:90
SAL_DLLPRIVATE SwTwips CalcBottomSpace()
Definition: frmmgr.cxx:493
void SetAnchor(RndStdIds eId)
Definition: frmmgr.cxx:207
SwFrameSize
Definition: fmtfsize.hxx:35
Frmmgr_Type
Definition: frmmgr.hxx:40
void SSize(const Size &rNew)
Definition: swrect.hxx:176
SfxItemPool * GetPool() const
long X() const
const long LONG_MAX
SwDocShell * GetDocShell()
Definition: view.cxx:1107
void CalcBoundRect(SwRect &_orRect, const RndStdIds _nAnchorId, const sal_Int16 _eHoriRelOrient=css::text::RelOrientation::FRAME, const sal_Int16 _eVertRelOrient=css::text::RelOrientation::FRAME, const SwPosition *_pToCharContentPos=nullptr, const bool _bFollowTextFlow=false, bool _bMirror=false, Point *_opRef=nullptr, Size *_opPercent=nullptr, const SwFormatFrameSize *pFormatFrameSize=nullptr) const
i#17567 - adjustments to allow negative vertical positions for fly frames anchored to paragraph or to...
Definition: fews.cxx:732
#define RES_LR_SPACE
Definition: hintids.hxx:291
void SetParent(const SfxItemSet *pNew)
void Left(const long nLeft)
Definition: swrect.hxx:193
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void Bottom(const long nBottom)
Definition: swrect.hxx:207
const SwFrameFormat * NewFlyFrame(const SfxItemSet &rSet, bool bAnchValid=false, SwFrameFormat *pParent=nullptr)
Definition: fefly1.cxx:624
SAL_DLLPRIVATE SwTwips CalcRightSpace()
Definition: frmmgr.cxx:507
bool IsFrameVertical(const bool bEnvironment, bool &bRightToLeft, bool &bVertL2R) const
Determines whether a frame or its environment is vertically formatted and right-to-left.
Definition: fews.cxx:1298
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void SetHorzOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:559
void Width(long nNew)
Definition: swrect.hxx:185
#define FN_SET_FRM_NAME
Definition: cmdid.h:839
SwFormat * GetFormatFromPool(sal_uInt16 nId)
return the requested automatic format - base-class !
Definition: edfmt.cxx:129
void SetSize(const Size &rSize)
void SetSize(const Size &rLSize)
Definition: frmmgr.cxx:594
void SetRelationOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:57
const SwFormatVertOrient & GetVertOrient() const
Definition: frmmgr.hxx:142
sal_uInt16 CalcLineSpace(SvxBoxItemLine nLine, bool bEvenIfNoLine=false) const
void SetPos(SwTwips nNew)
Definition: fmtornt.hxx:93
SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition: uitool.cxx:91
bool m_bIsInVertical
Definition: frmmgr.hxx:57
void SetRotation(sal_uInt16 nOld, sal_uInt16 nNew, const Size &rUnrotatedSize)
Definition: frmmgr.cxx:580
RndStdIds
void SetLRSpace(long nLeft, long nRight)
Definition: frmmgr.cxx:520
const SvxShadowItem & GetShadow() const
Definition: frmmgr.hxx:154
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:701
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
std::vector< bool, std::allocator< bool > > m_aSet
const SwTwips DFLT_WIDTH
Definition: frmmgr.hxx:37
void StartAllAction()
For all views of this document.
Definition: edws.cxx:85
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
void Chg(const Point &rNP, const Size &rNS)
Definition: swrect.hxx:162
void SetHeightSizeType(SwFrameSize eSize)
Definition: fmtfsize.hxx:81
#define RES_FRMATR_BEGIN
Definition: hintids.hxx:287
bool IsFrameSelected() const
Definition: feshview.cxx:1166
void ValidateMetrics(SvxSwFrameValidation &rVal, const SwPosition *pToCharContentPos, bool bOnlyPercentRefValue=false)
Definition: frmmgr.cxx:245
SAL_DLLPRIVATE void UpdateFlyFrame_()
Definition: frmmgr.cxx:123
SAL_DLLPRIVATE SwTwips CalcLeftSpace()
Definition: frmmgr.cxx:500
const SwFormatHoriOrient & GetHoriOrient() const
Definition: frmmgr.hxx:146
long Y() const
const SvxBoxItem & GetBox() const
Definition: frmmgr.hxx:158
void UpdateFlyFrame()
Definition: frmmgr.cxx:140
static sal_uInt16 aFrameMgrRange[]
Definition: frmmgr.cxx:46