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 <osl/diagnose.h>
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  if (nType == Frmmgr_Type::GRF || nType == Frmmgr_Type::OLE)
90  {
91  if (!pName || *pName != SvGlobalName( SO3_SM_CLASSID ))
92  {
93  // Default anchor for new graphics and objects is at-char, except for Math objects.
94  SwViewOption aViewOpt(*pSh->GetViewOptions());
95  m_aSet.Put(SwFormatAnchor(aViewOpt.GetDefaultAnchorType()));//RndStdIds::FLY_AT_CHAR
96  }
97  }
98  }
99  else if ( nType == Frmmgr_Type::NONE )
100  {
102  bool bRightToLeft;
104  }
106 }
107 
109  m_aSet( rSet ),
110  m_pOwnSh( pSh ),
111  m_bAbsPos( false ),
112  m_bNewFrame( bNew ),
113  m_bIsInVertical(false),
114  m_bIsInVerticalL2R(false)
115 {
116  if(!bNew)
117  {
118  bool bRightToLeft;
119  m_bIsInVertical = pSh->IsFrameVertical(true, bRightToLeft, m_bIsInVerticalL2R);
120  }
121 }
122 
123 // Initialise
125 {
126  if ( !m_bNewFrame && m_pOwnSh->IsFrameSelected() )
129 }
130 
132 {
133  const SfxPoolItem* pItem = nullptr;
134 
135  if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SfxItemState::SET)
136  m_pOwnSh->SetFlyName(static_cast<const SfxStringItem *>(pItem)->GetValue());
137 
139 
140  if ( m_bAbsPos )
141  {
143  m_bAbsPos = false;
144  }
145 }
146 
147 // change existing Fly-Frame
149 {
150  OSL_ENSURE( m_pOwnSh->IsFrameSelected(),
151  "no frame selected or no shell, update not possible");
152 
153  if( !m_pOwnSh->IsFrameSelected() )
154  return;
155 
156  //JP 6.8.2001: set never an invalid anchor into the core.
157  const SfxPoolItem *pGItem, *pItem;
158  if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem ))
159  {
161  if( m_pOwnSh->GetFlyFrameAttr( aGetSet ) && 1 == aGetSet.Count() &&
162  SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem )
163  && static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() ==
164  static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId() )
166  }
167 
168  // return wg. BASIC
169  if( m_aSet.Count() )
170  {
173  UpdateFlyFrame_();
175  }
176 }
177 
178 // insert frame
180 {
182 
183  bool bRet = nullptr != m_pOwnSh->NewFlyFrame( m_aSet );
184 
185  // turn on the right mode at the shell, frame got selected automatically.
186  if ( bRet )
187  {
188  UpdateFlyFrame_();
191  }
193 }
194 
195 // Insert frames of type eAnchorType. Position and size are being set explicitly.
196 // Not-allowed values of the enumeration type get corrected.
198  const Point &rPos,
199  const Size &rSize )
200 {
201  OSL_ENSURE( eAnchorType == RndStdIds::FLY_AT_PAGE ||
202  eAnchorType == RndStdIds::FLY_AT_PARA ||
203  eAnchorType == RndStdIds::FLY_AT_CHAR ||
204  eAnchorType == RndStdIds::FLY_AT_FLY ||
205  eAnchorType == RndStdIds::FLY_AS_CHAR, "invalid frame type" );
206 
207  SetPos( rPos );
208 
209  SetSize( rSize );
210  SetAnchor( eAnchorType );
211  InsertFlyFrame();
212 }
213 
214 // set anchor
216 {
217  sal_uInt16 nPhyPageNum, nVirtPageNum;
218  m_pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
219 
220  m_aSet.Put( SwFormatAnchor( eId, nPhyPageNum ) );
221  if ((RndStdIds::FLY_AT_PAGE == eId) || (RndStdIds::FLY_AT_PARA == eId) || (RndStdIds::FLY_AT_CHAR == eId)
222  || (RndStdIds::FLY_AT_FLY == eId))
223  {
224  SwFormatVertOrient aVertOrient( GetVertOrient() );
225  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
226  aHoriOrient.SetRelationOrient( text::RelOrientation::FRAME );
227  aVertOrient.SetRelationOrient( text::RelOrientation::FRAME );
228  m_aSet.Put( aVertOrient );
229  m_aSet.Put( aHoriOrient );
230  }
231 }
232 
233 // set the attribute for columns
235 {
236  m_aSet.Put( rCol );
237 }
238 
239 // set absolute position
240 void SwFlyFrameAttrMgr::SetAbsPos( const Point& rPoint )
241 {
242  m_bAbsPos = true;
243  m_aAbsPos = rPoint;
244  SwFormatVertOrient aVertOrient( GetVertOrient() );
245  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
248  m_aSet.Put( aVertOrient );
249  m_aSet.Put( aHoriOrient );
250 }
251 
252 // check metrics for correctness
254  const SwPosition* pToCharContentPos,
255  bool bOnlyPercentRefValue )
256 {
257  if (!bOnlyPercentRefValue)
258  {
261  }
262 
263  SwRect aBoundRect;
264 
265  // OD 18.09.2003 #i18732# - adjustment for allowing vertical position
266  // aligned to page for fly frame anchored to paragraph or to character.
267  const RndStdIds eAnchorType = rVal.nAnchorType;
268  const SwFormatFrameSize& rSize = m_aSet.Get(RES_FRM_SIZE);
269  m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType,
270  rVal.nHRelOrient,
271  rVal.nVRelOrient,
272  pToCharContentPos,
273  rVal.bFollowTextFlow,
274  rVal.bMirror, nullptr, &rVal.aPercentSize,
275  &rSize);
276 
277  if (bOnlyPercentRefValue)
278  return;
279 
280  // #mongolianlayout#
282  {
283  Point aPos(aBoundRect.Pos());
284  tools::Long nTmp = aPos.X();
285  aPos.setX( aPos.Y() );
286  aPos.setY( nTmp );
287  Size aSize(aBoundRect.SSize());
288  nTmp = aSize.Width();
289  aSize.setWidth( aSize.Height() );
290  aSize.setHeight( nTmp );
291  aBoundRect.Chg( aPos, aSize );
292  //exchange width/height to enable correct values
293  nTmp = rVal.nWidth;
294  rVal.nWidth = rVal.nHeight;
295  rVal.nHeight = nTmp;
296  }
297  if ((eAnchorType == RndStdIds::FLY_AT_PAGE) || (eAnchorType == RndStdIds::FLY_AT_FLY))
298  {
299  // MinimalPosition
300  rVal.nMinHPos = aBoundRect.Left();
301  rVal.nMinVPos = aBoundRect.Top();
302  SwTwips nH = rVal.nHPos;
303  SwTwips nV = rVal.nVPos;
304 
305  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
306  {
308  {
309  rVal.nHPos -= ((rVal.nHPos + rVal.nWidth) - aBoundRect.Right());
310  nH = rVal.nHPos;
311  }
312  else
313  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
314  }
315 
316  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
317  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
318 
319  if (rVal.nVPos + rVal.nHeight > aBoundRect.Bottom())
320  {
322  {
323  rVal.nVPos -= ((rVal.nVPos + rVal.nHeight) - aBoundRect.Bottom());
324  nV = rVal.nVPos;
325  }
326  else
327  rVal.nHeight = aBoundRect.Bottom() - rVal.nVPos;
328  }
329 
330  if (rVal.nVPos + rVal.nHeight > aBoundRect.Bottom())
331  rVal.nHeight = aBoundRect.Bottom() - rVal.nVPos;
332 
334  nV = aBoundRect.Top();
335 
337  nH = aBoundRect.Left();
338 
339  rVal.nMaxHPos = aBoundRect.Right() - rVal.nWidth;
340  rVal.nMaxHeight = aBoundRect.Bottom() - nV;
341 
342  rVal.nMaxVPos = aBoundRect.Bottom() - rVal.nHeight;
343  rVal.nMaxWidth = aBoundRect.Right() - nH;
344  }
345  // OD 12.11.2003 #i22341# - handle to character anchored objects vertical
346  // aligned at character or top of line in a special case
347  else if ((eAnchorType == RndStdIds::FLY_AT_PARA) ||
348  ((eAnchorType == RndStdIds::FLY_AT_CHAR) &&
349  (rVal.nVRelOrient != text::RelOrientation::CHAR) &&
350  (rVal.nVRelOrient != text::RelOrientation::TEXT_LINE) ) )
351  {
352  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
353  {
355  {
356  rVal.nHPos -= ((rVal.nHPos + rVal.nWidth) - aBoundRect.Right());
357  }
358  else
359  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
360  }
361 
362  // OD 29.09.2003 #i17567#, #i18732# - consider following the text flow
363  // and alignment at page areas.
364  const bool bMaxVPosAtBottom = !rVal.bFollowTextFlow ||
365  rVal.nVRelOrient == text::RelOrientation::PAGE_FRAME ||
366  rVal.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
367  {
368  SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
369  ? aBoundRect.Bottom()
370  : aBoundRect.Height() ) -
371  rVal.nHeight;
372  if ( rVal.nVPos > nTmpMaxVPos )
373  {
375  {
376  rVal.nVPos = nTmpMaxVPos;
377  }
378  else
379  {
380  rVal.nHeight = ( bMaxVPosAtBottom
381  ? aBoundRect.Bottom()
382  : aBoundRect.Height() ) - rVal.nVPos;
383  }
384  }
385  }
386 
387  rVal.nMinHPos = aBoundRect.Left();
388  rVal.nMaxHPos = aBoundRect.Right() - rVal.nWidth;
389 
390  rVal.nMinVPos = aBoundRect.Top();
391  // OD 26.09.2003 #i17567#, #i18732# - determine maximum vertical position
392  if ( bMaxVPosAtBottom )
393  {
394  rVal.nMaxVPos = aBoundRect.Bottom() - rVal.nHeight;
395  }
396  else
397  {
398  rVal.nMaxVPos = aBoundRect.Height() - rVal.nHeight;
399  }
400 
401  // maximum width height
402  const SwTwips nH = ( rVal.nHoriOrient != text::HoriOrientation::NONE )
403  ? aBoundRect.Left()
404  : rVal.nHPos;
405  const SwTwips nV = ( rVal.nVertOrient != text::VertOrientation::NONE )
406  ? aBoundRect.Top()
407  : rVal.nVPos;
408  rVal.nMaxHeight = rVal.nMaxVPos + rVal.nHeight - nV;
409  rVal.nMaxWidth = rVal.nMaxHPos + rVal.nWidth - nH;
410  }
411  // OD 12.11.2003 #i22341# - special case for to character anchored objects
412  // vertical aligned at character or top of line.
413  // Note: (1) positive vertical values are positions above the top of line
414  // (2) negative vertical values are positions below the top of line
415  else if ( (eAnchorType == RndStdIds::FLY_AT_CHAR) &&
416  ( rVal.nVRelOrient == text::RelOrientation::CHAR ||
417  rVal.nVRelOrient == text::RelOrientation::TEXT_LINE ) )
418  {
419  // determine horizontal values
420  rVal.nMinHPos = aBoundRect.Left();
421 
422  rVal.nMaxHPos = aBoundRect.Right() - rVal.nWidth;
423  if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
424  {
426  {
427  rVal.nHPos -= ((rVal.nHPos + rVal.nWidth) - aBoundRect.Right());
428  }
429  else
430  rVal.nWidth = aBoundRect.Right() - rVal.nHPos;
431  }
432 
433  const SwTwips nH = ( rVal.nHoriOrient != text::HoriOrientation::NONE )
434  ? aBoundRect.Left()
435  : rVal.nHPos;
436  rVal.nMaxWidth = rVal.nMaxHPos + rVal.nWidth - nH;
437 
438  // determine vertical values
439  rVal.nMinVPos = -( aBoundRect.Bottom() - rVal.nHeight );
440  if ( rVal.nVPos < rVal.nMinVPos &&
442  {
443  rVal.nVPos = rVal.nMinVPos;
444  }
445 
446  rVal.nMaxVPos = -aBoundRect.Top();
447  if ( rVal.nVPos > rVal.nMaxVPos &&
449  {
450  rVal.nVPos = rVal.nMaxVPos;
451  }
452 
454  {
455  rVal.nMaxHeight = aBoundRect.Bottom() + rVal.nVPos;
456  }
457  else
458  {
459  rVal.nMaxHeight = aBoundRect.Height();
460  }
461  }
462  else if ( eAnchorType == RndStdIds::FLY_AS_CHAR )
463  {
464  rVal.nMinHPos = 0;
465  rVal.nMaxHPos = 0;
466 
467  rVal.nMaxHeight = aBoundRect.Height();
468  rVal.nMaxWidth = aBoundRect.Width();
469 
470  rVal.nMaxVPos = aBoundRect.Height();
471  rVal.nMinVPos = -aBoundRect.Height() + rVal.nHeight;
472  if (rVal.nMaxVPos < rVal.nMinVPos)
473  {
474  rVal.nMinVPos = rVal.nMaxVPos;
475  rVal.nMaxVPos = -aBoundRect.Height();
476  }
477  }
478  // #mongolianlayout#
480  {
481  //restore width/height exchange
482  tools::Long nTmp = rVal.nWidth;
483  rVal.nWidth = rVal.nHeight;
484  rVal.nHeight = nTmp;
485  }
486 
487  if (rVal.nMaxWidth < rVal.nWidth)
488  rVal.nWidth = rVal.nMaxWidth;
489  if (rVal.nMaxHeight < rVal.nHeight)
490  rVal.nHeight = rVal.nMaxHeight;
491 }
492 
493 // correction for border
495 {
496  const SvxShadowItem& rShadow = GetShadow();
497  const SvxBoxItem& rBox = GetBox();
498  return rShadow.CalcShadowSpace(SvxShadowItemSide::TOP ) + rBox.CalcLineSpace(SvxBoxItemLine::TOP);
499 }
500 
502 {
503  const SvxShadowItem& rShadow = GetShadow();
504  const SvxBoxItem& rBox = GetBox();
505  return rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM) + rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM);
506 }
507 
509 {
510  const SvxShadowItem& rShadow = GetShadow();
511  const SvxBoxItem& rBox = GetBox();
512  return rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT) + rBox.CalcLineSpace(SvxBoxItemLine::LEFT);
513 }
514 
516 {
517  const SvxShadowItem& rShadow = GetShadow();
518  const SvxBoxItem& rBox = GetBox();
519  return rShadow.CalcShadowSpace(SvxShadowItemSide::RIGHT) + rBox.CalcLineSpace(SvxBoxItemLine::RIGHT);
520 }
521 
522 // erase attribute from the set
523 void SwFlyFrameAttrMgr::DelAttr( sal_uInt16 nId )
524 {
525  m_aSet.ClearItem( nId );
526 }
527 
529 {
530  OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Which border to set?" );
531 
533  if( LONG_MAX != nLeft )
534  aTmp.SetLeft( sal_uInt16(nLeft) );
535  if( LONG_MAX != nRight )
536  aTmp.SetRight( sal_uInt16(nRight) );
537  m_aSet.Put( aTmp );
538 }
539 
541 {
542  OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Which border to set?" );
543 
545  if( LONG_MAX != nTop )
546  aTmp.SetUpper( sal_uInt16(nTop) );
547  if( LONG_MAX != nBottom )
548  aTmp.SetLower( sal_uInt16(nBottom) );
549  m_aSet.Put( aTmp );
550 }
551 
552 void SwFlyFrameAttrMgr::SetPos( const Point& rPoint )
553 {
554  SwFormatVertOrient aVertOrient( GetVertOrient() );
555  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
556 
557  aHoriOrient.SetPos ( rPoint.X() );
559 
560  aVertOrient.SetPos ( rPoint.Y() );
562 
563  m_aSet.Put( aVertOrient );
564  m_aSet.Put( aHoriOrient );
565 }
566 
567 void SwFlyFrameAttrMgr::SetHorzOrientation( sal_Int16 eOrient )
568 {
569  SwFormatHoriOrient aHoriOrient( GetHoriOrient() );
570  aHoriOrient.SetHoriOrient( eOrient );
571  m_aSet.Put( aHoriOrient );
572 }
573 
574 void SwFlyFrameAttrMgr::SetVertOrientation( sal_Int16 eOrient )
575 {
576  SwFormatVertOrient aVertOrient( GetVertOrient() );
577  aVertOrient.SetVertOrient( eOrient );
578  m_aSet.Put( aVertOrient );
579 }
580 
582 {
583  SwFormatFrameSize aSize( GetFrameSize() );
584  aSize.SetHeightSizeType( eType );
585  m_aSet.Put( aSize );
586 }
587 
588 void SwFlyFrameAttrMgr::SetRotation(Degree10 nOld, Degree10 nNew, const Size& rUnrotatedSize)
589 {
590  // RotGrfFlyFrame: Central handling of real change of rotation here, all adaptations use this.
591  // Adaptation of pos/size may be wanted in the future. Already tried to keep last Size in
592  // UnrotatedSize in the SwRotationGrf Item, but this will lead to various problems. Also tried
593  // to use m_aSet.Put(...) as in other methods (also tried read methods for Rotation/UnrotatedSize) but
594  // somehow the needed ID (RES_GRFATR_ROTATION) is *not* in the SfxItemSet of the Frame, so for
595  // now set directly. Undo/Redo is preserved by AttributeChange
596  if(nOld != nNew)
597  {
598  m_pOwnSh->SetAttrItem(SwRotationGrf(nNew, rUnrotatedSize));
599  }
600 }
601 
602 void SwFlyFrameAttrMgr::SetSize( const Size& rSize )
603 {
604  SwFormatFrameSize aSize( GetFrameSize() );
605  aSize.SetSize(Size(std::max(rSize.Width(), tools::Long(MINFLY)), std::max(rSize.Height(), tools::Long(MINFLY))));
606  m_aSet.Put( aSize );
607 }
608 
610 {
611  m_aSet.ClearItem();
612  m_aSet.Put( rSet );
613 }
614 
615 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetFlyName(const OUString &rName)
Set name at selected FlyFrame.
Definition: fefly1.cxx:1449
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:494
Marks a position in the document model.
Definition: pam.hxx:35
void SetPos(const Point &rLPoint)
Definition: frmmgr.cxx:552
void UpdateAttrMgr()
Definition: frmmgr.cxx:124
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 sal_uInt16 RES_FRMATR_END(133)
sal_Int16 nId
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
Definition: crsrsh.cxx:1208
void SetCol(const SwFormatCol &rCol)
Definition: frmmgr.cxx:234
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:523
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
constexpr tools::Long Width() const
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:574
void SetFlyPos(const Point &rAbsPos)
Definition: fefly1.cxx:371
void InsertFlyFrame()
Definition: frmmgr.cxx:179
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Definition: fefly1.cxx:1038
void SetHeightSizeType(SwFrameSize eType)
Definition: frmmgr.cxx:581
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(135)
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:240
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:1081
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:354
void SetAttrSet(const SfxItemSet &rSet)
Definition: frmmgr.cxx:609
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
void SetRelationOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:90
SAL_DLLPRIVATE SwTwips CalcBottomSpace()
Definition: frmmgr.cxx:501
void SetAnchor(RndStdIds eId)
Definition: frmmgr.cxx:215
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:65
SfxItemPool * GetPool() const
tools::Long SwTwips
Definition: swtypes.hxx:49
const long LONG_MAX
SwDocShell * GetDocShell()
Definition: view.cxx:1126
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:691
void SetParent(const SfxItemSet *pNew)
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:646
SAL_DLLPRIVATE SwTwips CalcRightSpace()
Definition: frmmgr.cxx:515
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:1271
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:423
void SetHorzOrientation(sal_Int16 eOrient)
Definition: frmmgr.cxx:567
#define FN_SET_FRM_NAME
Definition: cmdid.h:853
void SetULSpace(tools::Long nTop, tools::Long nBottom)
Definition: frmmgr.cxx:540
if(aStr!=aBuf) UpdateName_Impl(m_xFollowLb.get()
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
void SetSize(const Size &rSize)
void SetSize(const Size &rLSize)
Definition: frmmgr.cxx:602
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:702
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:1166
void ValidateMetrics(SvxSwFrameValidation &rVal, const SwPosition *pToCharContentPos, bool bOnlyPercentRefValue=false)
Definition: frmmgr.cxx:253
SAL_DLLPRIVATE void UpdateFlyFrame_()
Definition: frmmgr.cxx:131
void SetRotation(Degree10 nOld, Degree10 nNew, const Size &rUnrotatedSize)
Definition: frmmgr.cxx:588
SAL_DLLPRIVATE SwTwips CalcLeftSpace()
Definition: frmmgr.cxx:508
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:148
static sal_uInt16 aFrameMgrRange[]
Definition: frmmgr.cxx:49
void SetLRSpace(tools::Long nLeft, tools::Long nRight)
Definition: frmmgr.cxx:528