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