41 #include <com/sun/star/text/HoriOrientation.hpp>
42 #include <com/sun/star/text/VertOrientation.hpp>
43 #include <com/sun/star/text/RelOrientation.hpp>
59 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
69 m_bIsInVertical( false ),
70 m_bIsInVerticalL2R( false )
81 default: nId=0;
break;
112 m_bIsInVertical(false),
113 m_bIsInVerticalL2R(false)
150 "no frame selected or no shell, update not possible");
161 SfxItemState::SET == aGetSet.GetItemState(
RES_ANCHOR,
false, &pGItem )
200 OSL_ENSURE( eAnchorType == RndStdIds::FLY_AT_PAGE ||
201 eAnchorType == RndStdIds::FLY_AT_PARA ||
202 eAnchorType == RndStdIds::FLY_AT_CHAR ||
203 eAnchorType == RndStdIds::FLY_AT_FLY ||
204 eAnchorType == RndStdIds::FLY_AS_CHAR,
"invalid frame type" );
216 sal_uInt16 nPhyPageNum, nVirtPageNum;
220 if ((RndStdIds::FLY_AT_PAGE == eId) || (RndStdIds::FLY_AT_PARA == eId) || (RndStdIds::FLY_AT_CHAR == eId)
221 || (RndStdIds::FLY_AT_FLY == eId))
254 bool bOnlyPercentRefValue )
256 if (!bOnlyPercentRefValue)
276 if (bOnlyPercentRefValue)
284 aPos.setX( aPos.Y() );
287 nTmp = aSize.
Width();
288 aSize.setWidth( aSize.Height() );
289 aSize.setHeight( nTmp );
290 aBoundRect.
Chg( aPos, aSize );
296 if ((eAnchorType == RndStdIds::FLY_AT_PAGE) || (eAnchorType == RndStdIds::FLY_AT_FLY))
333 nV = aBoundRect.
Top();
336 nH = aBoundRect.
Left();
346 else if ((eAnchorType == RndStdIds::FLY_AT_PARA) ||
347 ((eAnchorType == RndStdIds::FLY_AT_CHAR) &&
348 (rVal.
nVRelOrient != text::RelOrientation::CHAR) &&
349 (rVal.
nVRelOrient != text::RelOrientation::TEXT_LINE) ) )
364 rVal.
nVRelOrient == text::RelOrientation::PAGE_FRAME ||
365 rVal.
nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
367 SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
371 if ( rVal.
nVPos > nTmpMaxVPos )
375 rVal.
nVPos = nTmpMaxVPos;
379 rVal.
nHeight = ( bMaxVPosAtBottom
391 if ( bMaxVPosAtBottom )
414 else if ( (eAnchorType == RndStdIds::FLY_AT_CHAR) &&
415 ( rVal.
nVRelOrient == text::RelOrientation::CHAR ||
416 rVal.
nVRelOrient == text::RelOrientation::TEXT_LINE ) )
461 else if ( eAnchorType == RndStdIds::FLY_AS_CHAR )
529 OSL_ENSURE(
LONG_MAX != nLeft &&
LONG_MAX != nRight,
"Which border to set?" );
533 aTmp.
SetLeft( sal_uInt16(nLeft) );
535 aTmp.SetRight( sal_uInt16(nRight) );
541 OSL_ENSURE(
LONG_MAX != nTop &&
LONG_MAX != nBottom,
"Which border to set?" );
547 aTmp.SetLower( sal_uInt16(nBottom) );
556 aHoriOrient.
SetPos ( rPoint.X() );
559 aVertOrient.
SetPos ( rPoint.Y() );
void SetFlyName(const OUString &rName)
Set name at selected FlyFrame.
void FrameNotify(SwViewShell *pVwSh, FlyMode eMode)
const SwFormatFrameSize & GetFrameSize() const
void Right(const tools::Long nRight)
SAL_DLLPRIVATE SwTwips CalcTopSpace()
Marks a position in the document model.
void SetPos(const Point &rLPoint)
void Left(const tools::Long nLeft)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(133)
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
void SetCol(const SwFormatCol &rCol)
void Pos(const Point &rNew)
Of course Writer needs its own rectangles.
void DelAttr(sal_uInt16 nId)
Value in Var-direction gives minimum (can be exceeded but not be less).
Used by the UI to modify the document model.
const SwTwips DFLT_HEIGHT
const SwView & GetView() const
void Width(tools::Long nNew)
void SetVertOrientation(sal_Int16 eOrient)
void SetFlyPos(const Point &rAbsPos)
bool GetFlyFrameAttr(SfxItemSet &rSet) const
void SetHeightSizeType(SwFrameSize eType)
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)
sal_uInt16 CalcShadowSpace(SvxShadowItemSide nShadow) const
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
bool SetFlyFrameAttr(SfxItemSet &rSet)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
void SetAttrSet(const SfxItemSet &rSet)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
tools::Long Width() const
SAL_DLLPRIVATE SwTwips CalcBottomSpace()
void SetAnchor(RndStdIds eId)
void SSize(const Size &rNew)
SwFlyFrameAttrMgr(bool bNew, SwWrtShell *pSh, Frmmgr_Type nType, const SvGlobalName *pName)
SfxItemPool * GetPool() const
SwDocShell * GetDocShell()
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...
void SetParent(const SfxItemSet *pNew)
constexpr sal_uInt16 RES_FRMATR_END(131)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void Bottom(const tools::Long nBottom)
const SwFrameFormat * NewFlyFrame(const SfxItemSet &rSet, bool bAnchValid=false, SwFrameFormat *pParent=nullptr)
SAL_DLLPRIVATE SwTwips CalcRightSpace()
bool IsFrameVertical(const bool bEnvironment, bool &bRightToLeft, bool &bVertL2R) const
Determines whether a frame or its environment is vertically formatted and right-to-left.
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const SwViewOption * GetViewOptions() const
void SetHorzOrientation(sal_Int16 eOrient)
void SetULSpace(tools::Long nTop, tools::Long nBottom)
SwFormat * GetFormatFromPool(sal_uInt16 nId)
return the requested automatic format - base-class !
void Top(const tools::Long nTop)
tools::Long Height() const
void SetSize(const Size &rSize)
void SetSize(const Size &rLSize)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
const SwFormatVertOrient & GetVertOrient() const
sal_uInt16 CalcLineSpace(SvxBoxItemLine nLine, bool bEvenIfNoLine=false) const
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
const SvxShadowItem & GetShadow() const
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
if(!pCandidateA->getEnd().equal(pCandidateB->getStart()))
void StartAllAction()
For all views of this document.
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
void Chg(const Point &rNP, const Size &rNS)
void Height(tools::Long nNew)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
bool IsFrameSelected() const
void ValidateMetrics(SvxSwFrameValidation &rVal, const SwPosition *pToCharContentPos, bool bOnlyPercentRefValue=false)
SAL_DLLPRIVATE void UpdateFlyFrame_()
void SetRotation(Degree10 nOld, Degree10 nNew, const Size &rUnrotatedSize)
SAL_DLLPRIVATE SwTwips CalcLeftSpace()
const SwFormatHoriOrient & GetHoriOrient() const
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
const SvxBoxItem & GetBox() const
static sal_uInt16 aFrameMgrRange[]
void SetLRSpace(tools::Long nLeft, tools::Long nRight)