LibreOffice Module sw (master)  1
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
sw::DefaultToxTabStopTokenHandler Class Reference

The default implementation of ToxTabStopTokenHandler. More...

#include <ToxTabStopTokenHandler.hxx>

Inheritance diagram for sw::DefaultToxTabStopTokenHandler:
[legend]
Collaboration diagram for sw::DefaultToxTabStopTokenHandler:
[legend]

Public Types

enum  TabStopReferencePolicy {
  TABSTOPS_RELATIVE_TO_INDENT,
  TABSTOPS_RELATIVE_TO_PAGE
}
 

Public Member Functions

 DefaultToxTabStopTokenHandler (sal_uInt32 indexOfSectionNode, const SwPageDesc &defaultPageDescription, bool tabPositionIsRelativeToParagraphIndent, TabStopReferencePolicy referencePolicy)
 
ToxTabStopTokenHandler::HandledTabStopToken HandleTabStopToken (const SwFormToken &aToken, const SwTextNode &targetNode, const SwRootFrame *currentLayout) const override
 Handle a tab stop token. More...
 
- Public Member Functions inherited from sw::ToxTabStopTokenHandler
virtual ~ToxTabStopTokenHandler ()
 

Private Member Functions

long CalculatePageMarginFromPageDescription (const SwTextNode &targetNode) const
 Calculate the page margin from the page description. More...
 

Static Private Member Functions

static bool CanUseLayoutRectangle (const SwTextNode &targetNode, const SwRootFrame *currentLayout)
 Test whether the page layout can be obtained by a layout rectangle. More...
 

Private Attributes

sal_uInt32 const mIndexOfSectionNode
 
const SwPageDescmDefaultPageDescription
 
bool const mTabPositionIsRelativeToParagraphIndent
 
TabStopReferencePolicy const mTabStopReferencePolicy
 

Detailed Description

The default implementation of ToxTabStopTokenHandler.

Definition at line 52 of file ToxTabStopTokenHandler.hxx.

Member Enumeration Documentation

Enumerator
TABSTOPS_RELATIVE_TO_INDENT 
TABSTOPS_RELATIVE_TO_PAGE 

Definition at line 56 of file ToxTabStopTokenHandler.hxx.

Constructor & Destructor Documentation

sw::DefaultToxTabStopTokenHandler::DefaultToxTabStopTokenHandler ( sal_uInt32  indexOfSectionNode,
const SwPageDesc defaultPageDescription,
bool  tabPositionIsRelativeToParagraphIndent,
TabStopReferencePolicy  referencePolicy 
)
Parameters
indexOfSectionNodeThe index of the section node. It is needed to determine whether a page description was given by a node before the tox section.
defaultPageDescriptionWhich page description shall be used if we do not find one or the found page description was provided by a node before the tox section
tabPositionIsRelativeToParagraphIndentWhether the tab position is relative to the paragraph indent. (toxForm.IsRelTabPos() is true or false.)
tabstopReferencePolicyHow tab stops are positioned. (#i21237) The default behavior is to place tab stops relative to the page.

Definition at line 29 of file ToxTabStopTokenHandler.cxx.

Member Function Documentation

long sw::DefaultToxTabStopTokenHandler::CalculatePageMarginFromPageDescription ( const SwTextNode targetNode) const
private
bool sw::DefaultToxTabStopTokenHandler::CanUseLayoutRectangle ( const SwTextNode targetNode,
const SwRootFrame currentLayout 
)
staticprivate

Test whether the page layout can be obtained by a layout rectangle.

Is used to determine how to find tab stop position.

Definition at line 106 of file ToxTabStopTokenHandler.cxx.

References SwFrame::FindPageFrame(), SwContentNode::getLayoutFrame(), SwPageFrame::GetPageDesc(), and RES_PAGEDESC.

Referenced by HandleTabStopToken().

ToxTabStopTokenHandler::HandledTabStopToken sw::DefaultToxTabStopTokenHandler::HandleTabStopToken ( const SwFormToken aToken,
const SwTextNode targetNode,
const SwRootFrame currentLayout 
) const
overridevirtual

Member Data Documentation

const SwPageDesc& sw::DefaultToxTabStopTokenHandler::mDefaultPageDescription
private

Definition at line 104 of file ToxTabStopTokenHandler.hxx.

Referenced by CalculatePageMarginFromPageDescription().

sal_uInt32 const sw::DefaultToxTabStopTokenHandler::mIndexOfSectionNode
private

Definition at line 103 of file ToxTabStopTokenHandler.hxx.

Referenced by CalculatePageMarginFromPageDescription().

bool const sw::DefaultToxTabStopTokenHandler::mTabPositionIsRelativeToParagraphIndent
private

Definition at line 105 of file ToxTabStopTokenHandler.hxx.

Referenced by HandleTabStopToken().

TabStopReferencePolicy const sw::DefaultToxTabStopTokenHandler::mTabStopReferencePolicy
private

Definition at line 106 of file ToxTabStopTokenHandler.hxx.

Referenced by HandleTabStopToken().


The documentation for this class was generated from the following files: