LibreOffice Module editeng (master) 1
|
Helper class for common functionality in edit sources. More...
#include <unoedhlp.hxx>
Public Member Functions | |
static ::std::unique_ptr< SfxHint > | EENotification2Hint (EENotify const *aNotify) |
Translates EditEngine notifications into broadcastable hints. More... | |
Static Public Member Functions | |
static void | GetAttributeRun (sal_Int32 &nStartIndex, sal_Int32 &nEndIndex, const EditEngine &rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell=false) |
Calculate attribute run for EditEngines. More... | |
static Point | EEToUserSpace (const Point &rPoint, const Size &rEESize, bool bIsVertical) |
Convert point from edit engine to user coordinate space. More... | |
static Point | UserSpaceToEE (const Point &rPoint, const Size &rEESize, bool bIsVertical) |
Convert point from user to edit engine coordinate space. More... | |
static tools::Rectangle | EEToUserSpace (const tools::Rectangle &rRect, const Size &rEESize, bool bIsVertical) |
Convert rect from edit engine to user coordinate space. More... | |
Helper class for common functionality in edit sources.
Definition at line 58 of file unoedhlp.hxx.
Translates EditEngine notifications into broadcastable hints.
aNotify | Notification object sent by the EditEngine. |
Definition at line 44 of file unoedhlp.cxx.
References EE_NOTIFY_PARAGRAPHINSERTED, EE_NOTIFY_PARAGRAPHREMOVED, EE_NOTIFY_PARAGRAPHSMOVED, EE_NOTIFY_PROCESSNOTIFICATIONS, EE_NOTIFY_TextHeightChanged, EE_NOTIFY_TEXTMODIFIED, EE_NOTIFY_TEXTVIEWSCROLLED, EE_NOTIFY_TEXTVIEWSELECTIONCHANGED, EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA, EENotify::eNotificationType, EENotify::nParagraph, EENotify::nParam1, and EENotify::nParam2.
|
static |
Convert point from edit engine to user coordinate space.
As the edit engine internally keeps vertical text unrotated, all internal edit engine methods return their stuff unrotated, too. This method rotates and shifts given point appropriately, if vertical writing is on.
rPoint | Point to transform |
rEESize | Paper size of the edit engine |
bIsVertical | Whether output text is vertical or not |
Definition at line 234 of file unoedhlp.cxx.
References Size::Height(), Point::X(), and Point::Y().
Referenced by EEToUserSpace(), SvxEditEngineForwarder::GetCharBounds(), and SvxOutlinerForwarder::GetCharBounds().
|
static |
Convert rect from edit engine to user coordinate space.
As the edit engine internally keeps vertical text unrotated, all internal edit engine methods return their stuff unrotated, too. This method rotates and shifts given rect appropriately, if vertical writing is on.
rRect | Rectangle to transform |
rEESize | Paper size of the edit engine |
bIsVertical | Whether output text is vertical or not |
Definition at line 244 of file unoedhlp.cxx.
References tools::Rectangle::BottomLeft(), EEToUserSpace(), and tools::Rectangle::TopRight().
|
static |
Calculate attribute run for EditEngines.
Please note that the range returned is half-open: [nStartIndex,nEndIndex)
nStartIndex | Herein, the start index of the range of similar attributes is returned |
nEndIndex | Herein, the end index (exclusive) of the range of similar attributes is returned |
rEE | The EditEngine to query for attributes |
nPara | The paragraph the following index value is to be interpreted in |
nIndex | The character index from which the range of similar attributed characters is requested |
Definition at line 85 of file unoedhlp.cxx.
References CHARATTRIBS, EditEngine::GetAttribs(), GetAttributeRun(), EditEngine::GetCharAttribs(), EditEngine::GetParagraphCount(), EditEngine::GetTextLen(), i, nIndex, EPosition::nIndex, and EPosition::nPara.
Referenced by GetAttributeRun(), SvxEditEngineForwarder::GetAttributeRun(), and SvxOutlinerForwarder::GetAttributeRun().
|
static |
Convert point from user to edit engine coordinate space.
As the edit engine internally keeps vertical text unrotated, all internal edit engine methods return their stuff unrotated, too. This method rotates and shifts given point appropriately, if vertical writing is on.
rPoint | Point to transform |
rEESize | Paper size of the edit engine |
bIsVertical | Whether output text is vertical or not |
Definition at line 239 of file unoedhlp.cxx.
References Size::Height(), Point::X(), and Point::Y().
Referenced by SvxEditEngineForwarder::GetIndexAtPoint(), and SvxOutlinerForwarder::GetIndexAtPoint().