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