LibreOffice Module sw (master) 1
|
#include <ascharanchoredobjectposition.hxx>
Public Member Functions | |
SwAsCharAnchoredObjectPosition (SdrObject &_rDrawObj, const Point &_rProposedAnchorPos, const AsCharFlags _nFlags, const SwTwips _nLineAscent, const SwTwips _nLineDescent, const SwTwips _nLineAscentInclObjs, const SwTwips _nLineDescentInclObjs) | |
constructor; provided object to be positioned and needed data for calculation of the object position More... | |
virtual | ~SwAsCharAnchoredObjectPosition () override |
destructor More... | |
virtual void | CalcPosition () override |
calculate position for object position More... | |
const Point & | GetAnchorPos () const |
SwTwips | GetRelPosY () const |
const SwRect & | GetObjBoundRectInclSpacing () const |
sw::LineAlign | GetLineAlignment () const |
virtual void | CalcPosition ()=0 |
Private Member Functions | |
const SwTextFrame & | GetAnchorTextFrame () const |
method to cast <SwAnchoredObjectPosition::GetAnchorFrame()> to needed type More... | |
SwTwips | GetRelPosToBase (const SwTwips _nObjBoundHeight, const SwFormatVertOrient &_rVert) |
determine the relative position to base line for object position More... | |
Private Attributes | |
const Point & | mrProposedAnchorPos |
const AsCharFlags | mnFlags |
const SwTwips | mnLineAscent |
const SwTwips | mnLineDescent |
const SwTwips | mnLineAscentInclObjs |
const SwTwips | mnLineDescentInclObjs |
Point | maAnchorPos |
SwTwips | mnRelPos |
SwRect | maObjBoundRect |
sw::LineAlign | mnLineAlignment |
Additional Inherited Members | |
Protected Member Functions inherited from objectpositioning::SwAnchoredObjectPosition | |
SwAnchoredObjectPosition (SdrObject &_rDrawObj) | |
virtual | ~SwAnchoredObjectPosition () |
SdrObject & | GetObject () const |
bool | IsObjFly () const |
SwAnchoredObject & | GetAnchoredObj () const |
SwFrame & | GetAnchorFrame () const |
const SwFrameFormat & | GetFrameFormat () const |
bool | DoesObjFollowsTextFlow () const |
virtual bool | IsAnchoredToChar () const |
virtual const SwFrame * | ToCharOrientFrame () const |
virtual const SwRect * | ToCharRect () const |
virtual SwTwips | ToCharTopOfLine () const |
SwTwips | GetTopForObjPos (const SwFrame &_rFrame, const SwRectFn &_fnRect, const bool _bVert) const |
helper method to determine top of a frame for the vertical object positioning More... | |
void | GetVertAlignmentValues (const SwFrame &_rVertOrientFrame, const SwFrame &_rPageAlignLayFrame, const sal_Int16 _eRelOrient, SwTwips &_orAlignAreaHeight, SwTwips &_orAlignAreaOffset) const |
SwTwips | GetVertRelPos (const SwFrame &_rVertOrientFrame, const SwFrame &_rPageAlignLayFrame, const sal_Int16 _eVertOrient, const sal_Int16 _eRelOrient, const SwTwips _nVertPos, const SvxLRSpaceItem &_rLRSpacing, const SvxULSpaceItem &_rULSpacing, SwTwips &_roVertOffsetToFrameAnchorPos) const |
SwTwips | AdjustVertRelPos (const SwTwips nTopOfAnch, const bool bVert, const bool bVertL2R, const SwFrame &rPageAlignLayFrame, const SwTwips nProposedRelPosY, const bool bFollowTextFlow, const bool bCheckBottom=true) const |
adjust calculated vertical in order to keep object inside 'page' alignment layout frame. More... | |
SwTwips | CalcRelPosX (const SwFrame &_rHoriOrientFrame, const SwEnvironmentOfAnchoredObject &_rEnvOfObj, const SwFormatHoriOrient &_rHoriOrient, const SvxLRSpaceItem &_rLRSpacing, const SvxULSpaceItem &_rULSpacing, const bool _bObjWrapThrough, const SwTwips _nRelPosY, SwTwips &_roHoriOffsetToFrameAnchorPos) const |
calculate relative horizontal position More... | |
SwTwips | AdjustHoriRelPos (const SwFrame &_rPageAlignLayFrame, const SwTwips _nProposedRelPosX) const |
adjust calculated horizontal in order to keep object inside 'page' alignment layout frame for object type position TO_CNTNT More... | |
void | GetHoriAlignmentValues (const SwFrame &_rHoriOrientFrame, const SwFrame &_rPageAlignLayFrame, const sal_Int16 _eRelOrient, const bool _bObjWrapThrough, SwTwips &_orAlignAreaWidth, SwTwips &_orAlignAreaOffset, bool &_obAlignedRelToPage) const |
determine alignment values for horizontal position of object More... | |
SwTwips | AdjustHoriRelPosForDrawAside (const SwFrame &_rHoriOrientFrame, const SwTwips _nProposedRelPosX, const SwTwips _nRelPosY, const sal_Int16 _eHoriOrient, const sal_Int16 _eRelOrient, const SvxLRSpaceItem &_rLRSpacing, const SvxULSpaceItem &_rULSpacing, const bool _bEvenPage) const |
adjust calculated horizontal position in order to draw object aside other objects with same positioning More... | |
bool | DrawAsideFly (const SwFlyFrame *_pFly, const SwRect &_rObjRect, const SwFrame *_pObjContext, const SwNodeOffset _nObjIndex, const bool _bEvenPage, const sal_Int16 _eHoriOrient, const sal_Int16 _eRelOrient) const |
determine, if object has to draw aside given fly frame More... | |
Static Protected Member Functions inherited from objectpositioning::SwAnchoredObjectPosition | |
static void | ToggleHoriOrientAndAlign (const bool _bToggleLeftRight, sal_Int16 &_ioeHoriOrient, sal_Int16 &_iopeRelOrient) |
toggle given horizontal orientation and relative alignment More... | |
static bool | Minor_ (sal_Int16 _eRelOrient1, sal_Int16 _eRelOrient2, bool _bLeft) |
determine, if object has to draw aside another object More... | |
Definition at line 58 of file ascharanchoredobjectposition.hxx.
objectpositioning::SwAsCharAnchoredObjectPosition::SwAsCharAnchoredObjectPosition | ( | SdrObject & | _rDrawObj, |
const Point & | _rProposedAnchorPos, | ||
const AsCharFlags | _nFlags, | ||
const SwTwips | _nLineAscent, | ||
const SwTwips | _nLineDescent, | ||
const SwTwips | _nLineAscentInclObjs, | ||
const SwTwips | _nLineDescentInclObjs | ||
) |
constructor; provided object to be positioned and needed data for calculation of the object position
constructor
_rDrawObj | input parameter - object, that is be positioned. |
_rProposedAnchorPos | proposed anchor position; starting point for the calculation of the anchor position |
_nFlags | flags that influences the calculation of the anchor position AsCharFlags::Quick : quick formatting - calculated position not set at object AsCharFlags::UlSpace : consider upper/lower spacing - adjustment of anchor position AsCharFlags::Init : initial calculation AsCharFlags::Rotate : object is rotated by 90 degrees AsCharFlags::Reverse : object is reversed (rotated by 270 degrees) AsCharFlags::Bidi : object belongs to a BIDI-multi-portion |
_nLineAscent,_nLineDescent,_nLineAscentInclObjs,_nLineDescentInclObjs | - needed line values for the different alignments. |
Definition at line 40 of file ascharanchoredobjectposition.cxx.
|
overridevirtual |
destructor
Definition at line 60 of file ascharanchoredobjectposition.cxx.
|
overridevirtual |
calculate position for object position
calculate position for object
members <maAnchorPos>, <mnRelPos>, <maObjBoundRect> and <mnLineAlignment> are calculated. calculated position is set at the given object.
OD 30.07.2003 #110978# members <maAnchorPos>, <mnRelPos>, <maObjBoundRect> and <mnLineAlignment> are calculated. calculated position is set at the given object.
Implements objectpositioning::SwAnchoredObjectPosition.
Definition at line 79 of file ascharanchoredobjectposition.cxx.
References SwRect::AddHeight(), SwRect::AddLeft(), SwRect::AddTop(), SwRect::AddWidth(), Point::AdjustX(), Point::AdjustY(), Bidi, objectpositioning::SwAnchoredObjectPosition::GetAnchoredObj(), GetAnchorTextFrame(), SwAnchoredObject::GetCurrRelPos(), SwFrameAreaDefinition::getFrameArea(), objectpositioning::SwAnchoredObjectPosition::GetFrameFormat(), SwRectFnSet::GetHeight(), SvxLRSpaceItem::GetLeft(), SvxULSpaceItem::GetLower(), SwFormat::GetLRSpace(), objectpositioning::SwAnchoredObjectPosition::GetObject(), SwAnchoredObject::GetObjRect(), SwAnchoredDrawObject::GetObjRect(), SwFormatVertOrient::GetPos(), SwFlyInContentFrame::GetRefPoint(), GetRelPosToBase(), SvxLRSpaceItem::GetRight(), SwFormat::GetULSpace(), SvxULSpaceItem::GetUpper(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), SwRectFnSet::GetWidth(), SwRect::Height(), Init, objectpositioning::SwAnchoredObjectPosition::IsObjFly(), SwFrame::IsRightToLeft(), SwFrame::IsVertical(), SwRect::Left(), maAnchorPos, maObjBoundRect, mnFlags, mnLineAscentInclObjs, mnRelPos, SdrObject::Move(), mrProposedAnchorPos, SwPostItHelper::NONE, Quick, Reverse, Rotate, SdrObject::SetAnchorPos(), SwAnchoredDrawObject::SetLastObjRect(), SwFormatVertOrient::SetPos(), SwFlyInContentFrame::SetRefPoint(), Point::setX(), Point::setY(), SwRect::SVRect(), SwTextFrame::SwitchHorizontalToVertical(), SwTextFrame::SwitchLTRtoRTL(), SwTextFrame::SwitchVerticalToHorizontal(), SwRect::Top(), SwRect::TopLeft(), UlSpace, SwRect::Width(), Point::X(), and Point::Y().
Referenced by SwFlyCntPortion::SetBase().
|
inline |
Definition at line 145 of file ascharanchoredobjectposition.hxx.
References maAnchorPos.
Referenced by SwFlyCntPortion::SetBase().
|
private |
method to cast <SwAnchoredObjectPosition::GetAnchorFrame()> to needed type
Definition at line 64 of file ascharanchoredobjectposition.cxx.
References objectpositioning::SwAnchoredObjectPosition::GetAnchorFrame().
Referenced by CalcPosition().
|
inline |
Definition at line 154 of file ascharanchoredobjectposition.hxx.
References mnLineAlignment.
Referenced by SwFlyCntPortion::SetBase().
|
inline |
Definition at line 151 of file ascharanchoredobjectposition.hxx.
References maObjBoundRect.
Referenced by SwFlyCntPortion::SetBase().
|
private |
determine the relative position to base line for object position
determine the relative position to base line for object position type AS_CHAR
_ObjBoundHeight | height including corresponding spacing of the object, for which the Y-position has to be calculated. |
_rVert | given vertical positioning and alignment |
OD 29.07.2003 #110978# Note about values set at member <mnLineAlignment> - value gives feedback for the line formatting. 0 - no feedback; 1|2|3 - proposed formatting of characters at top|at center|at bottom of line.
Definition at line 335 of file ascharanchoredobjectposition.cxx.
References sw::BOTTOM, sw::CENTER, SwFormatVertOrient::GetPos(), SwFormatVertOrient::GetVertOrient(), mnLineAlignment, mnLineAscent, mnLineAscentInclObjs, mnLineDescent, mnLineDescentInclObjs, SwPostItHelper::NONE, sw::NONE, and sw::TOP.
Referenced by CalcPosition().
|
inline |
Definition at line 148 of file ascharanchoredobjectposition.hxx.
References mnRelPos.
Referenced by SwFlyCntPortion::SetBase().
|
private |
Definition at line 80 of file ascharanchoredobjectposition.hxx.
Referenced by CalcPosition(), and GetAnchorPos().
|
private |
Definition at line 82 of file ascharanchoredobjectposition.hxx.
Referenced by CalcPosition(), and GetObjBoundRectInclSpacing().
|
private |
Definition at line 72 of file ascharanchoredobjectposition.hxx.
Referenced by CalcPosition().
|
private |
Definition at line 84 of file ascharanchoredobjectposition.hxx.
Referenced by GetLineAlignment(), and GetRelPosToBase().
|
private |
Definition at line 74 of file ascharanchoredobjectposition.hxx.
Referenced by GetRelPosToBase().
|
private |
Definition at line 76 of file ascharanchoredobjectposition.hxx.
Referenced by CalcPosition(), and GetRelPosToBase().
|
private |
Definition at line 75 of file ascharanchoredobjectposition.hxx.
Referenced by GetRelPosToBase().
|
private |
Definition at line 77 of file ascharanchoredobjectposition.hxx.
Referenced by GetRelPosToBase().
|
private |
Definition at line 81 of file ascharanchoredobjectposition.hxx.
Referenced by CalcPosition(), and GetRelPosY().
|
private |
Definition at line 64 of file ascharanchoredobjectposition.hxx.
Referenced by CalcPosition().