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