LibreOffice Module sw (master) 1
|
The SwPortionHandler interface implements a visitor for the layout engine's text portions. More...
#include <SwPortionHandler.hxx>
Public Member Functions | |
virtual | ~SwPortionHandler () |
virtual void | Text (TextFrameIndex nLength, PortionType nType)=0 |
(empty) destructor More... | |
virtual void | Special (TextFrameIndex nLength, const OUString &rText, PortionType nType)=0 |
special portion. More... | |
virtual void | LineBreak ()=0 |
line break. More... | |
virtual void | Skip (TextFrameIndex nLength)=0 |
skip characters. More... | |
virtual void | Finish ()=0 |
end of paragraph. More... | |
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
This can be used to gather information of the on-screen representation of a single paragraph.
For each text portion, one of the methods text(...) or special(...) is called, depending on whether it is a 'normal' run of text, or any other portion. Additionally, the linebreak() method is called once at the end of every on-screen line.
All parameters relate to the 'view string', which is the text string held by the sequence of all corresponding SwTextFrames.
The SwPortionHandler can be used with the SwTextFrame::VisitPortions(...) method.
Definition at line 45 of file SwPortionHandler.hxx.
|
inlinevirtual |
Definition at line 49 of file SwPortionHandler.hxx.
|
pure virtual |
end of paragraph.
This method is to be called when all the paragraph's portions have been processed.
Implemented in SwAccessiblePortionData.
Referenced by SwTextFrame::VisitPortions().
|
pure virtual |
line break.
This method is called whenever a line break in the layout occurs.
Implemented in SwAccessiblePortionData.
Referenced by SwTextFrame::VisitPortions().
|
pure virtual |
skip characters.
The SwTextFrame may only display partially display a certain paragraph (e.g. when the paragraph is split across multiple pages). In this case, the Skip() method must be called to inform the portion handler to ignore a certain run of characters in the 'view string'. Skip(), if used at all, must be called before any of the other methods is called. Calling Skip() between portions is not allowed.
nLength | number of 'view string' characters to be skipped |
Implemented in SwAccessiblePortionData.
Referenced by SwTextFrame::VisitPortions().
|
pure virtual |
special portion.
This method is called for every non-text portion. The parameters describe the length of the corresponding characters in the view string (often 0 or 1), the text which is displayed, and the type of the portion.
nLength | length of this portion in the view string |
nType | text which is painted on-screen type of this portion |
Implemented in SwAccessiblePortionData.
Referenced by SwLinePortion::HandlePortion(), SwExpandPortion::HandlePortion(), SwBlankPortion::HandlePortion(), SwFieldPortion::HandlePortion(), SwQuoVadisPortion::HandlePortion(), SwHyphPortion::HandlePortion(), SwHyphStrPortion::HandlePortion(), SwSoftHyphPortion::HandlePortion(), SwIsoRefPortion::HandlePortion(), SwBookmarkPortion::HandlePortion(), and SwIsoToxPortion::HandlePortion().
|
pure virtual |
(empty) destructor
text portion. A run of nLength characters from the view string, that contains no special characters like embedded fields, etc. Thus, the on-screen text of this portion corresponds exactly to the corresponding characters in the view string.
nLength | length of this portion in the view string |
nType | type of this portion |
Implemented in SwAccessiblePortionData.
Referenced by SwMultiPortion::HandlePortion(), SwBreakPortion::HandlePortion(), SwTabPortion::HandlePortion(), SwTextPortion::HandlePortion(), and SwHolePortion::HandlePortion().