summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorPhilipp Riemer <ruderphilipp@gmail.com>2012-06-02 16:18:44 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-03 00:58:59 -0500
commit9b43bf2ce3b947b494e076cad853d09a6e6d7544 (patch)
treedfe8e27c6060168551aca95cec0be9cf00f67226 /sw
parentb7543e5281d9481d7fc152797b53c0831105b3f5 (diff)
re-indent files in sw/source/core/inc
* re-indentatation by -4 spaces * delete ASCII art separators
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx816
-rw-r--r--sw/source/core/inc/ascharanchoredobjectposition.hxx199
2 files changed, 499 insertions, 516 deletions
diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx
index dc1ceaf7a0e9..8892f5e30036 100644
--- a/sw/source/core/inc/anchoredobjectposition.hxx
+++ b/sw/source/core/inc/anchoredobjectposition.hxx
@@ -51,424 +51,412 @@ namespace objectpositioning
class SwAnchoredObjectPosition
{
- private:
- // object to be positioned
- SdrObject& mrDrawObj;
-
- // information about object
- // does the object represents a Writer fly frame
- bool mbIsObjFly;
- // #i26791# - anchored object the object belongs to;
- SwAnchoredObject* mpAnchoredObj;
- // frame the object is anchored at
- SwFrm* mpAnchorFrm;
- // contact object
- SwContact* mpContact;
- // frame format
- const SwFrmFmt* mpFrmFmt;
- // #i62875#
- bool mbFollowTextFlow;
- // #i62875#
- // for compatibility option <DoNotCaptureDrawObjsOnPage>
- bool mbDoNotCaptureAnchoredObj;
-
- /** determine information about object
-
- member <mbIsObjFly>, <mpAnchoredObj>, <mpAnchorFrm>, <mpContact>
- and <mpFrmFmt> are set
- */
- void _GetInfoAboutObj();
-
- // #i62875#
- // --> OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
- SwTwips _ImplAdjustVertRelPos( const SwTwips nTopOfAnch,
- const bool bVert,
- const bool bVertL2R,
- const SwFrm& rPageAlignLayFrm,
- const SwTwips nProposedRelPosY,
- const bool bFollowTextFlow,
- const bool bCheckBottom = true ) const;
- SwTwips _ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosX ) const;
-
- protected:
- SwAnchoredObjectPosition( SdrObject& _rDrawObj );
- virtual ~SwAnchoredObjectPosition();
-
- // accessors for object and its corresponding data/information
- inline SdrObject& GetObject() const
- {
- return mrDrawObj;
- }
- inline bool IsObjFly() const
- {
- return mbIsObjFly;
- }
- inline SwAnchoredObject& GetAnchoredObj() const
- {
- return *mpAnchoredObj;
- }
- inline SwFrm& GetAnchorFrm() const
- {
- return *mpAnchorFrm;
- }
- inline SwContact& GetContact() const
- {
- return *mpContact;
- }
- inline const SwFrmFmt& GetFrmFmt() const
- {
- return *mpFrmFmt;
- }
- // #i62875#
- inline bool DoesObjFollowsTextFlow() const
- {
- return mbFollowTextFlow;
- }
-
- // virtual methods providing data for to character anchored objects.
- virtual bool IsAnchoredToChar() const;
- virtual const SwFrm* ToCharOrientFrm() const;
- virtual const SwRect* ToCharRect() const;
- // #i22341#
- virtual SwTwips ToCharTopOfLine() const;
-
- // *********************************************************************
- /** helper method to determine top of a frame for the vertical
- object positioning
-
- #i11860#
- */
- SwTwips _GetTopForObjPos( const SwFrm& _rFrm,
- const SwRectFn& _fnRect,
- const bool _bVert ) const;
-
- // *********************************************************************
- void _GetVertAlignmentValues( const SwFrm& _rVertOrientFrm,
- const SwFrm& _rPageAlignLayFrm,
- const sal_Int16 _eRelOrient,
- SwTwips& _orAlignAreaHeight,
- SwTwips& _orAlignAreaOffset ) const;
-
- // *********************************************************************
+ private:
+ // object to be positioned
+ SdrObject& mrDrawObj;
+
+ // does the object represents a Writer fly frame
+ bool mbIsObjFly;
+ // #i26791# - anchored object the object belongs to;
+ SwAnchoredObject* mpAnchoredObj;
+ // frame the object is anchored at
+ SwFrm* mpAnchorFrm;
+ // contact object
+ SwContact* mpContact;
+ // frame format
+ const SwFrmFmt* mpFrmFmt;
+ // #i62875#
+ bool mbFollowTextFlow;
+ // #i62875#
+ // for compatibility option <DoNotCaptureDrawObjsOnPage>
+ bool mbDoNotCaptureAnchoredObj;
+
+ /** determine information about object
+
+ member <mbIsObjFly>, <mpAnchoredObj>, <mpAnchorFrm>, <mpContact>
+ and <mpFrmFmt> are set
+ */
+ void _GetInfoAboutObj();
+
+ // #i62875#
+ // --> OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
+ SwTwips _ImplAdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom = true ) const;
+ SwTwips _ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm,
+ const SwTwips _nProposedRelPosX ) const;
+
+ protected:
+ SwAnchoredObjectPosition( SdrObject& _rDrawObj );
+ virtual ~SwAnchoredObjectPosition();
+
+ // accessors for object and its corresponding data/information
+ inline SdrObject& GetObject() const
+ {
+ return mrDrawObj;
+ }
+ inline bool IsObjFly() const
+ {
+ return mbIsObjFly;
+ }
+ inline SwAnchoredObject& GetAnchoredObj() const
+ {
+ return *mpAnchoredObj;
+ }
+ inline SwFrm& GetAnchorFrm() const
+ {
+ return *mpAnchorFrm;
+ }
+ inline SwContact& GetContact() const
+ {
+ return *mpContact;
+ }
+ inline const SwFrmFmt& GetFrmFmt() const
+ {
+ return *mpFrmFmt;
+ }
+ // #i62875#
+ inline bool DoesObjFollowsTextFlow() const
+ {
+ return mbFollowTextFlow;
+ }
+
+ // virtual methods providing data for to character anchored objects.
+ virtual bool IsAnchoredToChar() const;
+ virtual const SwFrm* ToCharOrientFrm() const;
+ virtual const SwRect* ToCharRect() const;
+ // #i22341#
+ virtual SwTwips ToCharTopOfLine() const;
+
+ /** helper method to determine top of a frame for the vertical object
+ positioning
+
+ #i11860#
+ */
+ SwTwips _GetTopForObjPos( const SwFrm& _rFrm,
+ const SwRectFn& _fnRect,
+ const bool _bVert ) const;
+
+ void _GetVertAlignmentValues( const SwFrm& _rVertOrientFrm,
+ const SwFrm& _rPageAlignLayFrm,
+ const sal_Int16 _eRelOrient,
+ SwTwips& _orAlignAreaHeight,
+ SwTwips& _orAlignAreaOffset ) const;
+
// #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos>
- SwTwips _GetVertRelPos( const SwFrm& _rVertOrientFrm,
- const SwFrm& _rPageAlignLayFrm,
- const sal_Int16 _eVertOrient,
- const sal_Int16 _eRelOrient,
- const SwTwips _nVertPos,
- const SvxLRSpaceItem& _rLRSpacing,
- const SvxULSpaceItem& _rULSpacing,
- SwTwips& _roVertOffsetToFrmAnchorPos ) const;
-
- // *********************************************************************
- /** adjust calculated vertical in order to keep object inside
- 'page' alignment layout frame.
-
- #i31805# - add parameter <_bCheckBottom>
- #i26945# - add parameter <_bFollowTextFlow>
- #i62875# - made inline, intrinsic actions moved
- to private method <_ImplAdjustVertRelPos>, which is only
- called, if <mbDoNotCaptureAnchoredObj> not set.
- OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
-
- @param nTopOfAnch
- input parameter - 'vertical' position, at which the relative
- position of the object is calculated from.
-
- @param bVert
- input parameter - boolean, indicating, if object is in vertical
- layout.
-
- @param bVertL2R
- input parameter - boolean, indicating, if object is in mongolian
- layout (vertical left-to-right layout).
-
- @param rPageAlignLayFrm
- input parameter - layout frame, which determines the 'page area'
- the object has to be vertical positioned in.
-
- @param nProposedRelPosY
- input parameter - proposed relative vertical position, which
- will be adjusted.
-
- @param bFollowTextFlow
- input parameter - value of attribute 'Follow text flow' of the
- anchored object.
-
- @param bCheckBottom
- input parameter - boolean indicating, if bottom of anchored
- object has to be checked and thus, (if needed) the proposed
- relative position has to be adjusted. default value <true>
- */
- inline SwTwips _AdjustVertRelPos( const SwTwips nTopOfAnch,
- const bool bVert,
- const bool bVertL2R,
- const SwFrm& rPageAlignLayFrm,
- const SwTwips nProposedRelPosY,
- const bool bFollowTextFlow,
- const bool bCheckBottom = true ) const
- {
- return !mbDoNotCaptureAnchoredObj
- ? _ImplAdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
- rPageAlignLayFrm,
- nProposedRelPosY,
- bFollowTextFlow,
- bCheckBottom )
- : nProposedRelPosY;
- }
-
- // *********************************************************************
- /** calculate relative horizontal position
-
- #i26791# - add output parameter
- <_roHoriOffsetToFrmAnchorPos>
-
- @param _rHoriOrientFrm
- input parameter - frame the horizontal position of the object
- is oriented at.
-
- @param _rEnvOfObj
- input parameter - object instance to retrieve environment
- information about the object
-
- @param _rHoriOrient
- input parameter - horizontal positioning and alignment, for which
- the relative position is calculated.
-
- @param _rLRSpacing
- input parameter - left and right spacing of the object to the text
-
- @param _rULSpacing
- input parameter - upper and lower spacing of the object to the text
-
- @param _bObjWrapThrough
- input parameter - boolean indicating, if object has wrap mode
- 'wrap through'.
-
- @param _nRelPosY
- input parameter - relative vertical position
-
- @param _roHoriOffsetToFrmAnchorPos
- output parameter - 'horizontal' offset to frame anchor position
- according to the alignment
-
- @return relative horizontal position in SwTwips
- */
- SwTwips _CalcRelPosX( const SwFrm& _rHoriOrientFrm,
- const SwEnvironmentOfAnchoredObject& _rEnvOfObj,
- const SwFmtHoriOrient& _rHoriOrient,
- const SvxLRSpaceItem& _rLRSpacing,
- const SvxULSpaceItem& _rULSpacing,
- const bool _bObjWrapThrough,
- const SwTwips _nRelPosY,
- SwTwips& _roHoriOffsetToFrmAnchorPos
- ) const;
-
- // *********************************************************************
- /** adjust calculated horizontal in order to keep object inside
- 'page' alignment layout frame for object type position TO_CNTNT
-
- #i62875# - made inline, intrinsic actions moved
- to private method <_ImplAdjustHoriRelPos>, which is only
- called, if <mbDoNotCaptureAnchoredObj> not set.
-
- @param _rPageAlignLayFrm
- input paramter - layout frame, which determines the 'page area'
- the object has to be horizontal positioned in.
-
- @param _nProposedRelPosX
- input parameter - proposed relative horizontal position, which
- will be adjusted.
-
- @return adjusted relative horizontal position in SwTwips.
- */
- inline SwTwips _AdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosX ) const
- {
- return !mbDoNotCaptureAnchoredObj
- ? _ImplAdjustHoriRelPos( _rPageAlignLayFrm, _nProposedRelPosX )
- : _nProposedRelPosX;
- }
-
- // *********************************************************************
- /** toggle given horizontal orientation and relative alignment
-
- @param _bToggleLeftRight
- input parameter - boolean indicating, if horizontal orientation
- and relative alignment has to be toggled.
-
- @param _ioeHoriOrient
- input/output parameter - horizontal orientation, that is toggled,
- if needed.
-
- @param _iopeRelOrient
- optional input/output parameter (default value NULL)
- - if set, relative alignment, that is toggled, if needed.
- */
- void _ToggleHoriOrientAndAlign( const bool _bToggleLeftRight,
- sal_Int16& _ioeHoriOrient,
- sal_Int16& _iopeRelOrient
- ) const;
-
- // *********************************************************************
- /** determine alignment values for horizontal position of object
-
- @param _rHoriOrientFrm
- input parameter - frame the horizontal position of the object
- is oriented at.
-
- @param _rPageAlignLayFrm
- input paramter - layout frame, which determines the 'page area'
- the object has to be horizontal positioned in.
-
- @param _eRelOrient
- input parameter - horizontal relative alignment, for which
- the relative position is calculated.
-
- @param _bToggleLeftRight
- input parameter - boolean indicating, if left/right alignments
- have to be toggled.
-
- @param _bObjWrapThrough
- input parameter - boolean indicating, if object has wrap mode
- 'wrap through'.
- important note: value is only relevant, if _rHoriOrientFrm is
- a text frame.
-
- @param _orAlignAreaWidth
- output parameter - width in SwTwips of the area the horizontal
- position is aligned to.
-
- @param _orAlignAreaOffset
- output parameter - offset in SwTwips of the area the horizontal
- position is aligned to. offset is given to the 'left' of the
- anchor position.
-
- @param _obAlignedRelToPage
- output parameter - boolean indicating, that object is aligned
- to 'page area'.
- */
- void _GetHoriAlignmentValues( const SwFrm& _rHoriOrientFrm,
- const SwFrm& _rPageAlignLayFrm,
- const sal_Int16 _eRelOrient,
- const bool _bObjWrapThrough,
- SwTwips& _orAlignAreaWidth,
- SwTwips& _orAlignAreaOffset,
- bool& _obAlignedRelToPage ) const;
-
- // *********************************************************************
- /** adjust calculated horizontal position in order to draw object
- aside other objects with same positioning
-
- @param _rHoriOrientFrm
- input parameter - frame the horizontal position of the object
- is oriented at.
-
- @param _nProposedRelPosX
- input parameter - proposed relative horizontal position, which
- will be adjusted.
-
- @param _nRelPosY
- input parameter - relative vertical position
-
- @param _eHoriOrient
- input parameter - horizontal position of object
-
- @param _eRelOrient
- inpt parameter - alignment of object
-
- @param _rLRSpacing
- input parameter - left and right spacing of the object to the text
-
- @param _rULSpacing
- input parameter - upper and lower spacing of the object to the text
-
- @param _bEvenPage
- input parameter - boolean indicating, if object is on an even page.
-
- @return adjusted relative horizontal position in SwTwips
- */
- SwTwips _AdjustHoriRelPosForDrawAside( const SwFrm& _rHoriOrientFrm,
- const SwTwips _nProposedRelPosX,
- const SwTwips _nRelPosY,
- const sal_Int16 _eHoriOrient,
- const sal_Int16 _eRelOrient,
- const SvxLRSpaceItem& _rLRSpacing,
- const SvxULSpaceItem& _rULSpacing,
- const bool _bEvenPage
- ) const;
-
- // *********************************************************************
- /** detemine, if object has to draw aside given fly frame
-
- method used by <_AdjustHoriRelPosForDrawAside(..)>
-
- @param _pFly
- input parameter - fly frame the draw aside check is done for.
-
- @param _rObjRect
- input parameter - proposed object rectangle
-
- @param _pObjContext
- input parameter - context of the object
-
- @param _nObjIndex
- input parameter - index of the anchor frame of the object
-
- @param _bEvenPage
- input parameter - boolean indicating, if object is on an even page.
-
- @param _eHoriOrient
- input parameter - horizontal position of object
-
- @param _eRelOrient
- inpt parameter - alignment of object
-
- @return boolean indicating, if object has to be drawn aside
- given fly frame.
- */
- bool _DrawAsideFly( const SwFlyFrm* _pFly,
- const SwRect& _rObjRect,
- const SwFrm* _pObjContext,
- const sal_uLong _nObjIndex,
- const bool _bEvenPage,
- const sal_Int16 _eHoriOrient,
- const sal_Int16 _eRelOrient
- ) const;
-
- // *********************************************************************
- /** determine, if object has to draw aside another object
-
- the different alignments of the objects determines, if one has
- to draw aside another one. Thus, the given alignment are checked
- against each other, which one has to be drawn aside the other one.
- depending on parameter _bLeft check is done for left or right
- positioning.
- method used by <_DrawAsideFly(..)>
-
- @param _eRelOrient1
- input parameter - alignment 1
-
- @param _eRelOrient2
- input parameter - alignment 2
-
- @param _bLeft
- input parameter - boolean indicating, if check is done for left
- or for right positioning.
+ SwTwips _GetVertRelPos( const SwFrm& _rVertOrientFrm,
+ const SwFrm& _rPageAlignLayFrm,
+ const sal_Int16 _eVertOrient,
+ const sal_Int16 _eRelOrient,
+ const SwTwips _nVertPos,
+ const SvxLRSpaceItem& _rLRSpacing,
+ const SvxULSpaceItem& _rULSpacing,
+ SwTwips& _roVertOffsetToFrmAnchorPos ) const;
+
+ /** adjust calculated vertical in order to keep object inside
+ 'page' alignment layout frame.
+
+ #i31805# - add parameter <_bCheckBottom>
+ #i26945# - add parameter <_bFollowTextFlow>
+ #i62875# - made inline, intrinsic actions moved
+ to private method <_ImplAdjustVertRelPos>, which is only
+ called, if <mbDoNotCaptureAnchoredObj> not set.
+ OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
+
+ @param nTopOfAnch
+ input parameter - 'vertical' position, at which the relative
+ position of the object is calculated from.
+
+ @param bVert
+ input parameter - boolean, indicating, if object is in vertical
+ layout.
+
+ @param bVertL2R
+ input parameter - boolean, indicating, if object is in mongolian
+ layout (vertical left-to-right layout).
+
+ @param rPageAlignLayFrm
+ input parameter - layout frame, which determines the 'page area'
+ the object has to be vertical positioned in.
+
+ @param nProposedRelPosY
+ input parameter - proposed relative vertical position, which
+ will be adjusted.
+
+ @param bFollowTextFlow
+ input parameter - value of attribute 'Follow text flow' of the
+ anchored object.
+
+ @param bCheckBottom
+ input parameter - boolean indicating, if bottom of anchored
+ object has to be checked and thus, (if needed) the proposed
+ relative position has to be adjusted. default value <true>
+ */
+ inline SwTwips _AdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom = true ) const
+ {
+ return !mbDoNotCaptureAnchoredObj
+ ? _ImplAdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
+ rPageAlignLayFrm,
+ nProposedRelPosY,
+ bFollowTextFlow,
+ bCheckBottom )
+ : nProposedRelPosY;
+ }
+
+ /** calculate relative horizontal position
+
+ #i26791# - add output parameter
+ <_roHoriOffsetToFrmAnchorPos>
+
+ @param _rHoriOrientFrm
+ input parameter - frame the horizontal position of the object
+ is oriented at.
+
+ @param _rEnvOfObj
+ input parameter - object instance to retrieve environment
+ information about the object
+
+ @param _rHoriOrient
+ input parameter - horizontal positioning and alignment, for which
+ the relative position is calculated.
+
+ @param _rLRSpacing
+ input parameter - left and right spacing of the object to the text
+
+ @param _rULSpacing
+ input parameter - upper and lower spacing of the object to the text
+
+ @param _bObjWrapThrough
+ input parameter - boolean indicating, if object has wrap mode
+ 'wrap through'.
+
+ @param _nRelPosY
+ input parameter - relative vertical position
+
+ @param _roHoriOffsetToFrmAnchorPos
+ output parameter - 'horizontal' offset to frame anchor position
+ according to the alignment
+
+ @return relative horizontal position in SwTwips
+ */
+ SwTwips _CalcRelPosX( const SwFrm& _rHoriOrientFrm,
+ const SwEnvironmentOfAnchoredObject& _rEnvOfObj,
+ const SwFmtHoriOrient& _rHoriOrient,
+ const SvxLRSpaceItem& _rLRSpacing,
+ const SvxULSpaceItem& _rULSpacing,
+ const bool _bObjWrapThrough,
+ const SwTwips _nRelPosY,
+ SwTwips& _roHoriOffsetToFrmAnchorPos
+ ) const;
+
+ /** adjust calculated horizontal in order to keep object inside
+ 'page' alignment layout frame for object type position TO_CNTNT
+
+ #i62875# - made inline, intrinsic actions moved
+ to private method <_ImplAdjustHoriRelPos>, which is only
+ called, if <mbDoNotCaptureAnchoredObj> not set.
+
+ @param _rPageAlignLayFrm
+ input paramter - layout frame, which determines the 'page area'
+ the object has to be horizontal positioned in.
+
+ @param _nProposedRelPosX
+ input parameter - proposed relative horizontal position, which
+ will be adjusted.
+
+ @return adjusted relative horizontal position in SwTwips.
+ */
+ inline SwTwips _AdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm,
+ const SwTwips _nProposedRelPosX ) const
+ {
+ return !mbDoNotCaptureAnchoredObj
+ ? _ImplAdjustHoriRelPos( _rPageAlignLayFrm, _nProposedRelPosX )
+ : _nProposedRelPosX;
+ }
+
+ /** toggle given horizontal orientation and relative alignment
+
+ @param _bToggleLeftRight
+ input parameter - boolean indicating, if horizontal orientation
+ and relative alignment has to be toggled.
+
+ @param _ioeHoriOrient
+ input/output parameter - horizontal orientation, that is toggled,
+ if needed.
+
+ @param _iopeRelOrient
+ optional input/output parameter (default value NULL)
+ - if set, relative alignment, that is toggled, if needed.
+ */
+ void _ToggleHoriOrientAndAlign( const bool _bToggleLeftRight,
+ sal_Int16& _ioeHoriOrient,
+ sal_Int16& _iopeRelOrient
+ ) const;
+
+ /** determine alignment values for horizontal position of object
+
+ @param _rHoriOrientFrm
+ input parameter - frame the horizontal position of the object
+ is oriented at.
+
+ @param _rPageAlignLayFrm
+ input paramter - layout frame, which determines the 'page area'
+ the object has to be horizontal positioned in.
+
+ @param _eRelOrient
+ input parameter - horizontal relative alignment, for which
+ the relative position is calculated.
+
+ @param _bToggleLeftRight
+ input parameter - boolean indicating, if left/right alignments
+ have to be toggled.
+
+ @param _bObjWrapThrough
+ input parameter - boolean indicating, if object has wrap mode
+ 'wrap through'.
+ important note: value is only relevant, if _rHoriOrientFrm is
+ a text frame.
+
+ @param _orAlignAreaWidth
+ output parameter - width in SwTwips of the area the horizontal
+ position is aligned to.
+
+ @param _orAlignAreaOffset
+ output parameter - offset in SwTwips of the area the horizontal
+ position is aligned to. offset is given to the 'left' of the
+ anchor position.
+
+ @param _obAlignedRelToPage
+ output parameter - boolean indicating, that object is aligned
+ to 'page area'.
+ */
+ void _GetHoriAlignmentValues( const SwFrm& _rHoriOrientFrm,
+ const SwFrm& _rPageAlignLayFrm,
+ const sal_Int16 _eRelOrient,
+ const bool _bObjWrapThrough,
+ SwTwips& _orAlignAreaWidth,
+ SwTwips& _orAlignAreaOffset,
+ bool& _obAlignedRelToPage ) const;
+
+ /** adjust calculated horizontal position in order to draw object
+ aside other objects with same positioning
+
+ @param _rHoriOrientFrm
+ input parameter - frame the horizontal position of the object
+ is oriented at.
+
+ @param _nProposedRelPosX
+ input parameter - proposed relative horizontal position, which
+ will be adjusted.
+
+ @param _nRelPosY
+ input parameter - relative vertical position
+
+ @param _eHoriOrient
+ input parameter - horizontal position of object
+
+ @param _eRelOrient
+ inpt parameter - alignment of object
+
+ @param _rLRSpacing
+ input parameter - left and right spacing of the object to the text
+
+ @param _rULSpacing
+ input parameter - upper and lower spacing of the object to the text
+
+ @param _bEvenPage
+ input parameter - boolean indicating, if object is on an even page.
+
+ @return adjusted relative horizontal position in SwTwips
+ */
+ SwTwips _AdjustHoriRelPosForDrawAside( const SwFrm& _rHoriOrientFrm,
+ const SwTwips _nProposedRelPosX,
+ const SwTwips _nRelPosY,
+ const sal_Int16 _eHoriOrient,
+ const sal_Int16 _eRelOrient,
+ const SvxLRSpaceItem& _rLRSpacing,
+ const SvxULSpaceItem& _rULSpacing,
+ const bool _bEvenPage
+ ) const;
+
+ /** detemine, if object has to draw aside given fly frame
+
+ method used by <_AdjustHoriRelPosForDrawAside(..)>
+
+ @param _pFly
+ input parameter - fly frame the draw aside check is done for.
+
+ @param _rObjRect
+ input parameter - proposed object rectangle
+
+ @param _pObjContext
+ input parameter - context of the object
+
+ @param _nObjIndex
+ input parameter - index of the anchor frame of the object
+
+ @param _bEvenPage
+ input parameter - boolean indicating, if object is on an even page.
+
+ @param _eHoriOrient
+ input parameter - horizontal position of object
+
+ @param _eRelOrient
+ inpt parameter - alignment of object
+
+ @return boolean indicating, if object has to be drawn aside
+ given fly frame.
+ */
+ bool _DrawAsideFly( const SwFlyFrm* _pFly,
+ const SwRect& _rObjRect,
+ const SwFrm* _pObjContext,
+ const sal_uLong _nObjIndex,
+ const bool _bEvenPage,
+ const sal_Int16 _eHoriOrient,
+ const sal_Int16 _eRelOrient
+ ) const;
+
+ /** determine, if object has to draw aside another object
+
+ the different alignments of the objects determines, if one has
+ to draw aside another one. Thus, the given alignment are checked
+ against each other, which one has to be drawn aside the other one.
+ depending on parameter _bLeft check is done for left or right
+ positioning.
+ method used by <_DrawAsideFly(..)>
+
+ @param _eRelOrient1
+ input parameter - alignment 1
+
+ @param _eRelOrient2
+ input parameter - alignment 2
+
+ @param _bLeft
+ input parameter - boolean indicating, if check is done for left
+ or for right positioning.
- @return boolean indicating, if an object with an alignment
- <_eRelOrient1> has to be drawn aside an object with an
- alignment <_eRelOrient2>
- */
- bool _Minor( sal_Int16 _eRelOrient1,
- sal_Int16 _eRelOrient2,
- bool _bLeft ) const;
+ @return boolean indicating, if an object with an alignment
+ <_eRelOrient1> has to be drawn aside an object with an
+ alignment <_eRelOrient2>
+ */
+ bool _Minor( sal_Int16 _eRelOrient1,
+ sal_Int16 _eRelOrient2,
+ bool _bLeft ) const;
- public:
- virtual void CalcPosition() = 0;
+ public:
+ virtual void CalcPosition() = 0;
};
-} // namespace objectpositioning
+}
#endif
diff --git a/sw/source/core/inc/ascharanchoredobjectposition.hxx b/sw/source/core/inc/ascharanchoredobjectposition.hxx
index c60f8f604428..8c86ccf36923 100644
--- a/sw/source/core/inc/ascharanchoredobjectposition.hxx
+++ b/sw/source/core/inc/ascharanchoredobjectposition.hxx
@@ -51,109 +51,104 @@ namespace objectpositioning
class SwAsCharAnchoredObjectPosition : public SwAnchoredObjectPosition
{
- private:
- // data to calculate object position
- // proposed anchor position, starting point for the calculation
- // of the object position
- const Point& mrProposedAnchorPos;
- // flags that influences the calculation of the anchor position
- // AS_CHAR_QUICK : quick formatting - calculated position not set at object
- // AS_CHAR_ULSPACE : consider upper/lower spacing - adjustment of anchor position
- // AS_CHAR_INIT : initial calculation
- // AS_CHAR_ROTATE : object is rotated by 90 degrees
- // AS_CHAR_REVERSE : object is reversed (rotated by 270 degrees)
- // AS_CHAR_BIDI : object belongs to a BIDI-multi-portion
- const AsCharFlags mnFlags;
- // needed line values for the different alignments.
- const SwTwips mnLineAscent;
- const SwTwips mnLineDescent;
- const SwTwips mnLineAscentInclObjs;
- const SwTwips mnLineDescentInclObjs;
-
- // calculated data for object position
- Point maAnchorPos;
- SwTwips mnRelPos;
- SwRect maObjBoundRect;
- // line alignment relative to line height; gives feedback for line formatting
- // 0 - no line alignment, 1 - at top, 2 - at center, 3 - at bottom
- sal_uInt8 mnLineAlignment;
-
- // method to cast <SwAnchoredObjectPosition::GetAnchorFrm()>
- const SwTxtFrm& GetAnchorTxtFrm() const;
-
- /** determine the relative position to base line for object position
-
- @param _ObjBoundHeight
- height including corresponding spacing of the object, for which
- the Y-position has to be calculated.
-
- @param _rVert
- given vertical positioning and alignment
-
- @return relative position to the base line
- */
- SwTwips _GetRelPosToBase( const SwTwips _nObjBoundHeight,
- const SwFmtVertOrient& _rVert );
-
- // *********************************************************************
- public:
- /** construtor; provided object to be positioned and needed data
- for calculation of the object position
-
- @param _rDrawObj
- input parameter - object, that is be positioned.
-
- @param _rProposedAnchorPos
- proposed anchor position; starting point for the calculation
- of the anchor position
-
- @param _nFlags
- flags that influences the calculation of the anchor position
- AS_CHAR_QUICK : quick formatting - calculated position not set at object
- AS_CHAR_ULSPACE : consider upper/lower spacing - adjustment of anchor position
- AS_CHAR_INIT : initial calculation
- AS_CHAR_ROTATE : object is rotated by 90 degrees
- AS_CHAR_REVERSE : object is reversed (rotated by 270 degrees)
- AS_CHAR_BIDI : object belongs to a BIDI-multi-portion
-
- @param _nLineAscent, _nLineDescent, _nLineAscentInclObjs,
- _nLineDescentInclObjs - needed line values for the different
- alignments.
- */
- SwAsCharAnchoredObjectPosition( SdrObject& _rDrawObj,
- const Point& _rProposedAnchorPos,
- const AsCharFlags _nFlags,
- const SwTwips _nLineAscent,
- const SwTwips _nLineDescent,
- const SwTwips _nLineAscentInclObjs,
- const SwTwips _nLineDescentInclObjs );
- virtual ~SwAsCharAnchoredObjectPosition();
-
- /** calculate position for object position
-
- members <maAnchorPos>, <mnRelPos>, <maObjBoundRect> and
- <mnLineAlignment> are calculated.
- calculated position is set at the given object.
- */
- virtual void CalcPosition();
-
- // calculated anchored position for object position type AS_CHAR
-
- Point GetAnchorPos() const;
-
- // calculated relative position to base line for object position type AS_CHAR
-
- SwTwips GetRelPosY() const;
-
- // determined object rectangle including spacing for object position type AS_CHAR
-
- SwRect GetObjBoundRectInclSpacing() const;
-
- // determined line alignment relative to line height
-
- sal_uInt8 GetLineAlignment() const;
+ private:
+ // data to calculate object position
+ // Proposed anchor position, starting point for the calculation
+ // of the object position.
+ const Point& mrProposedAnchorPos;
+ // flags that influences the calculation of the anchor position
+ // AS_CHAR_QUICK : quick formatting - calculated position not set at object
+ // AS_CHAR_ULSPACE : consider upper/lower spacing - adjustment of anchor position
+ // AS_CHAR_INIT : initial calculation
+ // AS_CHAR_ROTATE : object is rotated by 90 degrees
+ // AS_CHAR_REVERSE : object is reversed (rotated by 270 degrees)
+ // AS_CHAR_BIDI : object belongs to a BIDI-multi-portion
+ const AsCharFlags mnFlags;
+ // needed line values for the different alignments.
+ const SwTwips mnLineAscent;
+ const SwTwips mnLineDescent;
+ const SwTwips mnLineAscentInclObjs;
+ const SwTwips mnLineDescentInclObjs;
+
+ // calculated data for object position
+ Point maAnchorPos;
+ SwTwips mnRelPos;
+ SwRect maObjBoundRect;
+ // line alignment relative to line height; gives feedback for line formatting
+ // 0 - no line alignment, 1 - at top, 2 - at center, 3 - at bottom
+ sal_uInt8 mnLineAlignment;
+
+ // method to cast <SwAnchoredObjectPosition::GetAnchorFrm()>
+ const SwTxtFrm& GetAnchorTxtFrm() const;
+
+ /** determine the relative position to base line for object position
+
+ @param _ObjBoundHeight
+ height including corresponding spacing of the object, for which
+ the Y-position has to be calculated.
+
+ @param _rVert
+ given vertical positioning and alignment
+
+ @return relative position to the base line
+ */
+ SwTwips _GetRelPosToBase( const SwTwips _nObjBoundHeight,
+ const SwFmtVertOrient& _rVert );
+
+ public:
+ /** construtor; provided object to be positioned and needed data
+ for calculation of the object position
+
+ @param _rDrawObj
+ input parameter - object, that is be positioned.
+
+ @param _rProposedAnchorPos
+ proposed anchor position; starting point for the calculation
+ of the anchor position
+
+ @param _nFlags
+ flags that influences the calculation of the anchor position
+ AS_CHAR_QUICK : quick formatting - calculated position not set at object
+ AS_CHAR_ULSPACE : consider upper/lower spacing - adjustment of anchor position
+ AS_CHAR_INIT : initial calculation
+ AS_CHAR_ROTATE : object is rotated by 90 degrees
+ AS_CHAR_REVERSE : object is reversed (rotated by 270 degrees)
+ AS_CHAR_BIDI : object belongs to a BIDI-multi-portion
+
+ @param _nLineAscent, _nLineDescent, _nLineAscentInclObjs,
+ _nLineDescentInclObjs - needed line values for the different
+ alignments.
+ */
+ SwAsCharAnchoredObjectPosition( SdrObject& _rDrawObj,
+ const Point& _rProposedAnchorPos,
+ const AsCharFlags _nFlags,
+ const SwTwips _nLineAscent,
+ const SwTwips _nLineDescent,
+ const SwTwips _nLineAscentInclObjs,
+ const SwTwips _nLineDescentInclObjs );
+ virtual ~SwAsCharAnchoredObjectPosition();
+
+ /** calculate position for object position
+
+ members <maAnchorPos>, <mnRelPos>, <maObjBoundRect> and
+ <mnLineAlignment> are calculated.
+ calculated position is set at the given object.
+ */
+ virtual void CalcPosition();
+
+ // calculated anchored position for object position type AS_CHAR
+ Point GetAnchorPos() const;
+
+ // calculated relative position to base line for object position type AS_CHAR
+ SwTwips GetRelPosY() const;
+
+ // determined object rectangle including spacing for object position type AS_CHAR
+ SwRect GetObjBoundRectInclSpacing() const;
+
+ // determined line alignment relative to line height
+ sal_uInt8 GetLineAlignment() const;
};
-} // namespace objectpositioning
+}
#endif