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