32#include <osl/diagnose.h>
43#include <com/sun/star/text/HoriOrientation.hpp>
44#include <com/sun/star/text/VertOrientation.hpp>
45#include <com/sun/star/text/RelOrientation.hpp>
59 XATTR_FILL_FIRST, XATTR_FILL_LAST,
61 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
71 m_bIsInVertical( false ),
72 m_bIsInVerticalL2R( false )
83 default:
nId=0;
break;
101 if (rStyleAnchor.
GetAnchorId() != RndStdIds::FLY_AT_PARA)
126 m_bIsInVertical(false),
127 m_bIsInVerticalL2R(false)
162 "no frame selected or no shell, update not possible");
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" );
227 sal_uInt16 nPhyPageNum, nVirtPageNum;
231 if ((RndStdIds::FLY_AT_PAGE == eId) || (RndStdIds::FLY_AT_PARA == eId) || (RndStdIds::FLY_AT_CHAR == eId)
232 || (RndStdIds::FLY_AT_FLY == eId))
265 bool bOnlyPercentRefValue )
267 if (!bOnlyPercentRefValue)
287 if (bOnlyPercentRefValue)
295 aPos.
setX( aPos.
Y() );
298 nTmp = aSize.
Width();
301 aBoundRect.
Chg( aPos, aSize );
307 if ((eAnchorType == RndStdIds::FLY_AT_PAGE) || (eAnchorType == RndStdIds::FLY_AT_FLY))
344 nV = aBoundRect.
Top();
347 nH = aBoundRect.
Left();
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) ) )
375 rVal.
nVRelOrient == text::RelOrientation::PAGE_FRAME ||
376 rVal.
nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
378 SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
382 if ( rVal.
nVPos > nTmpMaxVPos )
386 rVal.
nVPos = nTmpMaxVPos;
390 rVal.
nHeight = ( bMaxVPosAtBottom
402 if ( bMaxVPosAtBottom )
425 else if ( (eAnchorType == RndStdIds::FLY_AT_CHAR) &&
426 ( rVal.
nVRelOrient == text::RelOrientation::CHAR ||
427 rVal.
nVRelOrient == text::RelOrientation::TEXT_LINE ) )
472 else if ( eAnchorType == RndStdIds::FLY_AS_CHAR )
540 OSL_ENSURE(
LONG_MAX != nLeft &&
LONG_MAX != nRight,
"Which border to set?" );
544 aTmp.
SetLeft( sal_uInt16(nLeft) );
546 aTmp.
SetRight( sal_uInt16(nRight) );
552 OSL_ENSURE(
LONG_MAX != nTop &&
LONG_MAX != nBottom,
"Which border to set?" );
558 aTmp.
SetLower( sal_uInt16(nBottom) );
567 aHoriOrient.
SetPos ( rPoint.
X() );
570 aVertOrient.
SetPos ( rPoint.
Y() );
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)
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
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
void StartAllAction()
For all views of this document.
SwFormat * GetFormatFromPool(sal_uInt16 nId)
return the requested automatic format - base-class !
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
bool SetFlyFrameAttr(SfxItemSet &rSet)
void SetFlyPos(const Point &rAbsPos)
void SetFlyName(const OUString &rName)
Set name at selected FlyFrame.
bool IsFrameSelected() const
bool IsFrameVertical(const bool bEnvironment, bool &bRightToLeft, bool &bVertL2R) const
Determines whether a frame or its environment is vertically formatted and right-to-left.
const SwFrameFormat * NewFlyFrame(const SfxItemSet &rSet, bool bAnchValid=false, SwFrameFormat *pParent=nullptr)
bool GetFlyFrameAttr(SfxItemSet &rSet) const
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...
void SetVertOrientation(sal_Int16 eOrient)
void SetAbsPos(const Point &rLPoint)
SwFlyFrameAttrMgr(bool bNew, SwWrtShell *pSh, Frmmgr_Type nType, const SvGlobalName *pName)
SAL_DLLPRIVATE SwTwips CalcBottomSpace()
const SwFormatFrameSize & GetFrameSize() const
const SwFormatVertOrient & GetVertOrient() const
void SetAnchor(RndStdIds eId)
SAL_DLLPRIVATE SwTwips CalcRightSpace()
void SetSize(const Size &rLSize)
void SetRotation(Degree10 nOld, Degree10 nNew, const Size &rUnrotatedSize)
void SetCol(const SwFormatCol &rCol)
SAL_DLLPRIVATE SwTwips CalcTopSpace()
void SetAttrSet(const SfxItemSet &rSet)
void SetPos(const Point &rLPoint)
void DelAttr(sal_uInt16 nId)
SAL_DLLPRIVATE void UpdateFlyFrame_()
void SetLRSpace(tools::Long nLeft, tools::Long nRight)
const SwFormatHoriOrient & GetHoriOrient() const
SAL_DLLPRIVATE SwTwips CalcLeftSpace()
void SetHorzOrientation(sal_Int16 eOrient)
void SetHeightSizeType(SwFrameSize eType)
const SvxBoxItem & GetBox() const
const SvxShadowItem & GetShadow() const
void SetULSpace(tools::Long nTop, tools::Long nBottom)
void ValidateMetrics(SvxSwFrameValidation &rVal, const SwFormatAnchor *pToCharContentPos, bool bOnlyPercentRefValue=false)
Of course Writer needs its own rectangles.
void Chg(const Point &rNP, const Size &rNS)
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Pos(const Point &rNew)
void SSize(const Size &rNew)
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
RndStdIds GetDefaultAnchorType() const
const SwViewOption * GetViewOptions() const
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
const SwView & GetView() const
void FrameNotify(SwViewShell *pVwSh, FlyMode eMode)
@ 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
constexpr SwTwips DFLT_WIDTH
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)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
static constexpr auto Items
@ RES_POOLFRM_FRAME
Frame.
@ RES_POOLFRM_GRAPHIC
Graphics.
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)