LibreOffice Module sd (master) 1
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sdext::presenter::PresenterTextParagraph Class Reference

#include <PresenterTextView.hxx>

Classes

class  Cell
 A portion of a string that encodes one unicode cell. More...
 
class  Line
 

Public Member Functions

 PresenterTextParagraph (const sal_Int32 nParagraphIndex, const css::uno::Reference< css::i18n::XBreakIterator > &rxBreakIterator, const css::uno::Reference< css::i18n::XScriptTypeDetector > &rxScriptTypeDetector, const css::uno::Reference< css::text::XTextRange > &rxTextRange, SharedPresenterTextCaret xCaret)
 
void Paint (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas, const css::geometry::RealSize2D &rSize, const PresenterTheme::SharedFontDescriptor &rpFont, const css::rendering::ViewState &rViewState, css::rendering::RenderState &rRenderState, const double nTopOffset, const double nClipTop, const double nClipBottom)
 
double GetTotalTextHeight () const
 
void SetCharacterOffset (const sal_Int32 nCharacterOffset)
 
sal_Int32 GetCharacterCount () const
 
sal_Unicode GetCharacter (const sal_Int32 nGlobalCharacterIndex) const
 
const OUString & GetText () const
 
css::accessibility::TextSegment GetTextSegment (const sal_Int32 nOffset, const sal_Int32 nGlobalCharacterIndex, const sal_Int16 nTextType) const
 
css::accessibility::TextSegment GetWordTextSegment (const sal_Int32 nOffset, const sal_Int32 nIndex) const
 
css::accessibility::TextSegment CreateTextSegment (sal_Int32 nStartIndex, sal_Int32 nEndIndex) const
 
css::awt::Rectangle GetCharacterBounds (sal_Int32 nGlobalCharacterIndex, const bool bCaretBox)
 
void SetupCellArray (const PresenterTheme::SharedFontDescriptor &rpFont)
 
void Format (const double nY, const double nWidth, const PresenterTheme::SharedFontDescriptor &rpFont)
 
sal_Int32 GetWordBoundary (const sal_Int32 nLocalCharacterIndex, const sal_Int32 nDistance)
 
sal_Int32 GetCaretPosition () const
 
void SetCaretPosition (const sal_Int32 nPosition) const
 
void SetOrigin (const double nXOrigin, const double nYOrigin)
 
css::awt::Point GetRelativeLocation () const
 
css::awt::Size GetSize () const
 

Private Member Functions

void AddWord (const double nWidth, css::i18n::Boundary &rCurrentLine, const sal_Int32 nWordBoundary, const PresenterTheme::SharedFontDescriptor &rpFont)
 
void AddLine (css::i18n::Boundary &rCurrentLine)
 
sal_Int8 GetTextDirection () const
 
bool IsTextReferencePointLeft () const
 

Private Attributes

OUString msParagraphText
 
const sal_Int32 mnParagraphIndex
 
SharedPresenterTextCaret mpCaret
 
css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator
 
css::uno::Reference< css::i18n::XScriptTypeDetector > mxScriptTypeDetector
 
::std::vector< LinemaLines
 
::std::vector< sal_Int32 > maWordBoundaries
 
double mnVerticalOffset
 
double mnXOrigin
 
double mnYOrigin
 
double mnWidth
 
double mnAscent
 
double mnDescent
 
double mnLineHeight
 
sal_Int8 mnWritingMode
 
sal_Int32 mnCharacterOffset
 The index of the first character in this paragraph with respect to the whole text. More...
 
::std::vector< CellmaCells
 

Detailed Description

Definition at line 88 of file PresenterTextView.hxx.

Constructor & Destructor Documentation

◆ PresenterTextParagraph()

sdext::presenter::PresenterTextParagraph::PresenterTextParagraph ( const sal_Int32  nParagraphIndex,
const css::uno::Reference< css::i18n::XBreakIterator > &  rxBreakIterator,
const css::uno::Reference< css::i18n::XScriptTypeDetector > &  rxScriptTypeDetector,
const css::uno::Reference< css::text::XTextRange > &  rxTextRange,
SharedPresenterTextCaret  xCaret 
)

Definition at line 431 of file PresenterTextView.cxx.

References mnParagraphIndex, mnWidth, mnWritingMode, msParagraphText, and text().

Member Function Documentation

◆ AddLine()

void sdext::presenter::PresenterTextParagraph::AddLine ( css::i18n::Boundary &  rCurrentLine)
private

◆ AddWord()

void sdext::presenter::PresenterTextParagraph::AddWord ( const double  nWidth,
css::i18n::Boundary &  rCurrentLine,
const sal_Int32  nWordBoundary,
const PresenterTheme::SharedFontDescriptor rpFont 
)
private

◆ CreateTextSegment()

TextSegment sdext::presenter::PresenterTextParagraph::CreateTextSegment ( sal_Int32  nStartIndex,
sal_Int32  nEndIndex 
) const

Definition at line 857 of file PresenterTextView.cxx.

References msParagraphText.

Referenced by GetTextSegment(), and GetWordTextSegment().

◆ Format()

void sdext::presenter::PresenterTextParagraph::Format ( const double  nY,
const double  nWidth,
const PresenterTheme::SharedFontDescriptor rpFont 
)

◆ GetCaretPosition()

sal_Int32 sdext::presenter::PresenterTextParagraph::GetCaretPosition ( ) const

Definition at line 623 of file PresenterTextView.cxx.

References mnParagraphIndex, and mpCaret.

◆ GetCharacter()

sal_Unicode sdext::presenter::PresenterTextParagraph::GetCharacter ( const sal_Int32  nGlobalCharacterIndex) const

Definition at line 733 of file PresenterTextView.cxx.

References mnCharacterOffset, and msParagraphText.

◆ GetCharacterBounds()

awt::Rectangle sdext::presenter::PresenterTextParagraph::GetCharacterBounds ( sal_Int32  nGlobalCharacterIndex,
const bool  bCaretBox 
)

◆ GetCharacterCount()

sal_Int32 sdext::presenter::PresenterTextParagraph::GetCharacterCount ( ) const

Definition at line 728 of file PresenterTextView.cxx.

References msParagraphText.

Referenced by GetWordBoundary(), and GetWordTextSegment().

◆ GetRelativeLocation()

awt::Point sdext::presenter::PresenterTextParagraph::GetRelativeLocation ( ) const

Definition at line 643 of file PresenterTextView.cxx.

References mnVerticalOffset, mnXOrigin, and mnYOrigin.

◆ GetSize()

awt::Size sdext::presenter::PresenterTextParagraph::GetSize ( ) const

Definition at line 650 of file PresenterTextView.cxx.

References GetTotalTextHeight(), and mnWidth.

◆ GetText()

const OUString & sdext::presenter::PresenterTextParagraph::GetText ( ) const

Definition at line 747 of file PresenterTextView.cxx.

References msParagraphText.

◆ GetTextDirection()

sal_Int8 sdext::presenter::PresenterTextParagraph::GetTextDirection ( ) const
private

◆ GetTextSegment()

TextSegment sdext::presenter::PresenterTextParagraph::GetTextSegment ( const sal_Int32  nOffset,
const sal_Int32  nGlobalCharacterIndex,
const sal_Int16  nTextType 
) const

◆ GetTotalTextHeight()

double sdext::presenter::PresenterTextParagraph::GetTotalTextHeight ( ) const

Definition at line 718 of file PresenterTextView.cxx.

References maLines, and mnLineHeight.

Referenced by GetSize().

◆ GetWordBoundary()

sal_Int32 sdext::presenter::PresenterTextParagraph::GetWordBoundary ( const sal_Int32  nLocalCharacterIndex,
const sal_Int32  nDistance 
)

◆ GetWordTextSegment()

TextSegment sdext::presenter::PresenterTextParagraph::GetWordTextSegment ( const sal_Int32  nOffset,
const sal_Int32  nIndex 
) const

◆ IsTextReferencePointLeft()

bool sdext::presenter::PresenterTextParagraph::IsTextReferencePointLeft ( ) const
private

Definition at line 988 of file PresenterTextView.cxx.

References mnWritingMode.

Referenced by Paint().

◆ Paint()

void sdext::presenter::PresenterTextParagraph::Paint ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas,
const css::geometry::RealSize2D &  rSize,
const PresenterTheme::SharedFontDescriptor rpFont,
const css::rendering::ViewState rViewState,
css::rendering::RenderState &  rRenderState,
const double  nTopOffset,
const double  nClipTop,
const double  nClipBottom 
)

◆ SetCaretPosition()

void sdext::presenter::PresenterTextParagraph::SetCaretPosition ( const sal_Int32  nPosition) const

Definition at line 631 of file PresenterTextView.cxx.

References mnParagraphIndex, and mpCaret.

◆ SetCharacterOffset()

void sdext::presenter::PresenterTextParagraph::SetCharacterOffset ( const sal_Int32  nCharacterOffset)

Definition at line 723 of file PresenterTextView.cxx.

References mnCharacterOffset.

◆ SetOrigin()

void sdext::presenter::PresenterTextParagraph::SetOrigin ( const double  nXOrigin,
const double  nYOrigin 
)

Definition at line 637 of file PresenterTextView.cxx.

References mnXOrigin, and mnYOrigin.

◆ SetupCellArray()

void sdext::presenter::PresenterTextParagraph::SetupCellArray ( const PresenterTheme::SharedFontDescriptor rpFont)

Member Data Documentation

◆ maCells

::std::vector<Cell> sdext::presenter::PresenterTextParagraph::maCells
private

Definition at line 198 of file PresenterTextView.hxx.

Referenced by AddLine(), and SetupCellArray().

◆ maLines

::std::vector<Line> sdext::presenter::PresenterTextParagraph::maLines
private

◆ maWordBoundaries

::std::vector<sal_Int32> sdext::presenter::PresenterTextParagraph::maWordBoundaries
private

Definition at line 184 of file PresenterTextView.hxx.

Referenced by Format(), and GetWordBoundary().

◆ mnAscent

double sdext::presenter::PresenterTextParagraph::mnAscent
private

Definition at line 191 of file PresenterTextView.hxx.

Referenced by AddLine(), Format(), GetCharacterBounds(), and Paint().

◆ mnCharacterOffset

sal_Int32 sdext::presenter::PresenterTextParagraph::mnCharacterOffset
private

The index of the first character in this paragraph with respect to the whole text.

Definition at line 197 of file PresenterTextView.hxx.

Referenced by GetCharacter(), GetTextSegment(), and SetCharacterOffset().

◆ mnDescent

double sdext::presenter::PresenterTextParagraph::mnDescent
private

Definition at line 192 of file PresenterTextView.hxx.

Referenced by Format(), and GetCharacterBounds().

◆ mnLineHeight

double sdext::presenter::PresenterTextParagraph::mnLineHeight
private

Definition at line 193 of file PresenterTextView.hxx.

Referenced by AddLine(), Format(), GetCharacterBounds(), GetTotalTextHeight(), and Paint().

◆ mnParagraphIndex

const sal_Int32 sdext::presenter::PresenterTextParagraph::mnParagraphIndex
private

Definition at line 144 of file PresenterTextView.hxx.

Referenced by GetCaretPosition(), and SetCaretPosition().

◆ mnVerticalOffset

double sdext::presenter::PresenterTextParagraph::mnVerticalOffset
private

Definition at line 187 of file PresenterTextView.hxx.

Referenced by AddLine(), Format(), GetCharacterBounds(), and GetRelativeLocation().

◆ mnWidth

double sdext::presenter::PresenterTextParagraph::mnWidth
private

Definition at line 190 of file PresenterTextView.hxx.

Referenced by Format(), and GetSize().

◆ mnWritingMode

sal_Int8 sdext::presenter::PresenterTextParagraph::mnWritingMode
private

◆ mnXOrigin

double sdext::presenter::PresenterTextParagraph::mnXOrigin
private

Definition at line 188 of file PresenterTextView.hxx.

Referenced by GetCharacterBounds(), GetRelativeLocation(), and SetOrigin().

◆ mnYOrigin

double sdext::presenter::PresenterTextParagraph::mnYOrigin
private

Definition at line 189 of file PresenterTextView.hxx.

Referenced by GetCharacterBounds(), GetRelativeLocation(), and SetOrigin().

◆ mpCaret

SharedPresenterTextCaret sdext::presenter::PresenterTextParagraph::mpCaret
private

Definition at line 145 of file PresenterTextView.hxx.

Referenced by GetCaretPosition(), and SetCaretPosition().

◆ msParagraphText

OUString sdext::presenter::PresenterTextParagraph::msParagraphText
private

◆ mxBreakIterator

css::uno::Reference<css::i18n::XBreakIterator> sdext::presenter::PresenterTextParagraph::mxBreakIterator
private

Definition at line 181 of file PresenterTextView.hxx.

Referenced by Format(), GetTextSegment(), GetWordTextSegment(), and SetupCellArray().

◆ mxScriptTypeDetector

css::uno::Reference<css::i18n::XScriptTypeDetector> sdext::presenter::PresenterTextParagraph::mxScriptTypeDetector
private

Definition at line 182 of file PresenterTextView.hxx.

Referenced by Format(), and GetTextDirection().


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