LibreOffice Module filter (master) 1
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SVGTextWriter Class Referencefinal

#include <svgwriter.hxx>

Collaboration diagram for SVGTextWriter:
[legend]

Public Member Functions

 SVGTextWriter (SVGExport &rExport, SVGAttributeWriter &rAttributeWriter, SVGActionWriter &mrActionWriter)
 
 ~SVGTextWriter ()
 
sal_Int32 setTextPosition (const GDIMetaFile &rMtf, size_t &nCurAction, sal_uInt32 nWriteFlags)
 setTextPosition Set the start position of the next line of text. More...
 
void setTextProperties (const GDIMetaFile &rMtf, size_t nCurAction)
 
void addFontAttributes (bool bIsTextContainer)
 
void createParagraphEnumeration ()
 
bool nextParagraph ()
 
bool nextTextPortion ()
 
bool isTextShapeStarted () const
 
void startTextShape ()
 
void endTextShape ()
 
void startTextParagraph ()
 
void endTextParagraph ()
 
void startTextPosition (bool bExportX=true, bool bExportY=true)
 
void endTextPosition ()
 
bool hasTextOpacity () const
 
void implExportHyperlinkIds ()
 
void implWriteBulletChars ()
 
template<typename MetaBitmapActionType >
void writeBitmapPlaceholder (const MetaBitmapActionType *pAction)
 
void implWriteEmbeddedBitmaps ()
 
void writeTextPortion (const Point &rPos, const OUString &rText)
 
void implWriteTextPortion (const Point &rPos, const OUString &rText, Color aTextColor)
 
void setVirtualDevice (VirtualDevice *pVDev, MapMode &rTargetMapMode)
 
void setTextShape (const Reference< XText > &rxText, const GDIMetaFile *pTextEmbeddedBitmapMtf)
 

Private Member Functions

void implMap (const Size &rSz, Size &rDstSz) const
 
void implMap (const Point &rPt, Point &rDstPt) const
 
void implSetCurrentFont ()
 
void implSetFontFamily ()
 
template<typename SubType >
bool implGetTextPosition (const MetaAction *pAction, Point &raPos, bool &bEmpty)
 
template<typename SubType >
bool implGetTextPositionFromBitmap (const MetaAction *pAction, Point &raPos, bool &rbEmpty)
 
void implRegisterInterface (const Reference< XInterface > &rxIf)
 
const OUString & implGetValidIDFromInterface (const Reference< XInterface > &rxIf)
 
template<>
bool implGetTextPosition (const MetaAction *pAction, Point &raPos, bool &rbEmpty)
 

Private Attributes

SVGExportmrExport
 
SVGAttributeWritermrAttributeWriter
 
SVGActionWritermrActionWriter
 
VclPtr< VirtualDevicempVDev
 
bool mbIsTextShapeStarted
 
Reference< XText > mrTextShape
 
OUString msShapeId
 
Reference< XEnumeration > mrParagraphEnumeration
 
Reference< XTextContent > mrCurrentTextParagraph
 
Reference< XEnumeration > mrTextPortionEnumeration
 
Reference< XTextRange > mrCurrentTextPortion
 
const GDIMetaFilempTextEmbeddedBitmapMtf
 
MapModempTargetMapMode
 
std::unique_ptr< SvXMLElementExportmpTextShapeElem
 
std::unique_ptr< SvXMLElementExportmpTextParagraphElem
 
std::unique_ptr< SvXMLElementExportmpTextPositionElem
 
OUString maTextOpacity
 
sal_Int32 mnLeftTextPortionLength
 
Point maTextPos
 
tools::Long mnTextWidth
 
bool mbPositioningNeeded
 
bool mbIsNewListItem
 
sal_Int16 meNumberingType
 
sal_Unicode mcBulletChar
 
std::unordered_map< OUString, BulletListItemInfomaBulletListItemMap
 
bool mbIsListLevelStyleImage
 
bool mbLineBreak
 
bool mbIsURLField
 
OUString msUrl
 
OUString msHyperlinkIdList
 
OUString msPageCount
 
OUString msDateTimeType
 
OUString msTextFieldType
 
bool mbIsPlaceholderShape
 
vcl::Font maCurrentFont
 
vcl::Font maParentFont
 

Static Private Attributes

static const bool mbIWS = false
 

Detailed Description

Definition at line 199 of file svgwriter.hxx.

Constructor & Destructor Documentation

◆ SVGTextWriter()

SVGTextWriter::SVGTextWriter ( SVGExport rExport,
SVGAttributeWriter rAttributeWriter,
SVGActionWriter mrActionWriter 
)
explicit

Definition at line 462 of file svgwriter.cxx.

◆ ~SVGTextWriter()

SVGTextWriter::~SVGTextWriter ( )

Definition at line 486 of file svgwriter.cxx.

References endTextParagraph().

Member Function Documentation

◆ addFontAttributes()

void SVGTextWriter::addFontAttributes ( bool  bIsTextContainer)

◆ createParagraphEnumeration()

void SVGTextWriter::createParagraphEnumeration ( )

◆ endTextParagraph()

void SVGTextWriter::endTextParagraph ( )

◆ endTextPosition()

void SVGTextWriter::endTextPosition ( )

Definition at line 1387 of file svgwriter.cxx.

References mpTextPositionElem.

Referenced by endTextParagraph(), startTextPosition(), and writeBitmapPlaceholder().

◆ endTextShape()

void SVGTextWriter::endTextShape ( )

◆ hasTextOpacity()

bool SVGTextWriter::hasTextOpacity ( ) const

Definition at line 1392 of file svgwriter.cxx.

References maTextOpacity.

Referenced by SVGActionWriter::ImplWriteMask().

◆ implExportHyperlinkIds()

void SVGTextWriter::implExportHyperlinkIds ( )

◆ implGetTextPosition() [1/2]

template<typename SubType >
bool SVGTextWriter::implGetTextPosition ( const MetaAction pAction,
Point raPos,
bool &  bEmpty 
)
private

Definition at line 542 of file svgwriter.cxx.

References nLength.

◆ implGetTextPosition() [2/2]

template<>
bool SVGTextWriter::implGetTextPosition ( const MetaAction pAction,
Point raPos,
bool &  rbEmpty 
)
private

◆ implGetTextPositionFromBitmap()

template<typename SubType >
bool SVGTextWriter::implGetTextPositionFromBitmap ( const MetaAction pAction,
Point raPos,
bool &  rbEmpty 
)
private

Definition at line 572 of file svgwriter.cxx.

◆ implGetValidIDFromInterface()

const OUString & SVGTextWriter::implGetValidIDFromInterface ( const Reference< XInterface > &  rxIf)
private

◆ implMap() [1/2]

void SVGTextWriter::implMap ( const Point rPt,
Point rDstPt 
) const
private

Definition at line 514 of file svgwriter.cxx.

References OutputDevice::LogicToLogic(), mpTargetMapMode, and mpVDev.

◆ implMap() [2/2]

void SVGTextWriter::implMap ( const Size rSz,
Size rDstSz 
) const
private

◆ implRegisterInterface()

void SVGTextWriter::implRegisterInterface ( const Reference< XInterface > &  rxIf)
private

◆ implSetCurrentFont()

void SVGTextWriter::implSetCurrentFont ( )
private

◆ implSetFontFamily()

void SVGTextWriter::implSetFontFamily ( )
private

◆ implWriteBulletChars()

void SVGTextWriter::implWriteBulletChars ( )

◆ implWriteEmbeddedBitmaps()

void SVGTextWriter::implWriteEmbeddedBitmaps ( )

◆ implWriteTextPortion()

void SVGTextWriter::implWriteTextPortion ( const Point rPos,
const OUString &  rText,
Color  aTextColor 
)

◆ isTextShapeStarted()

bool SVGTextWriter::isTextShapeStarted ( ) const
inline

Definition at line 254 of file svgwriter.hxx.

References mbIsTextShapeStarted.

Referenced by SVGActionWriter::ImplWriteActions(), and writeTextPortion().

◆ nextParagraph()

bool SVGTextWriter::nextParagraph ( )

◆ nextTextPortion()

bool SVGTextWriter::nextTextPortion ( )

◆ setTextPosition()

sal_Int32 SVGTextWriter::setTextPosition ( const GDIMetaFile rMtf,
size_t &  nCurAction,
sal_uInt32  nWriteFlags 
)

setTextPosition Set the start position of the next line of text.

In case no text is found the current action index is updated to the index value we reached while searching for text.

Returns
{sal_Int32} -2 if no text found and end of line is reached -1 if no text found and end of paragraph is reached 0 if no text found and end of text shape is reached 1 if text found!

Definition at line 592 of file svgwriter.cxx.

References GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), MetaCommentAction::GetComment(), MetaFloatTransparentAction::GetGDIMetaFile(), MetaFloatTransparentAction::GetGradient(), MetaFloatTransparentAction::GetPoint(), MetaFloatTransparentAction::GetSize(), MetaFloatTransparentAction::getSVGTransparencyColorStops(), MetaAction::GetType(), implMap(), maTextOpacity, maTextPos, mbLineBreak, mrActionWriter, mrCurrentTextPortion, nCount, nextParagraph(), nextTextPortion(), nType, setTextPosition(), and SVGActionWriter::StartMask().

Referenced by SVGActionWriter::ImplWriteActions(), and setTextPosition().

◆ setTextProperties()

void SVGTextWriter::setTextProperties ( const GDIMetaFile rMtf,
size_t  nCurAction 
)

◆ setTextShape()

void SVGTextWriter::setTextShape ( const Reference< XText > &  rxText,
const GDIMetaFile pTextEmbeddedBitmapMtf 
)
inline

Definition at line 279 of file svgwriter.hxx.

References mpTextEmbeddedBitmapMtf, and mrTextShape.

Referenced by SVGActionWriter::ImplWriteActions().

◆ setVirtualDevice()

void SVGTextWriter::setVirtualDevice ( VirtualDevice pVDev,
MapMode rTargetMapMode 
)
inline

Definition at line 271 of file svgwriter.hxx.

References mpTargetMapMode, and mpVDev.

Referenced by SVGActionWriter::SVGActionWriter().

◆ startTextParagraph()

void SVGTextWriter::startTextParagraph ( )

◆ startTextPosition()

void SVGTextWriter::startTextPosition ( bool  bExportX = true,
bool  bExportY = true 
)

◆ startTextShape()

void SVGTextWriter::startTextShape ( )

◆ writeBitmapPlaceholder()

template<typename MetaBitmapActionType >
void SVGTextWriter::writeBitmapPlaceholder ( const MetaBitmapActionType *  pAction)

◆ writeTextPortion()

void SVGTextWriter::writeTextPortion ( const Point rPos,
const OUString &  rText 
)

Member Data Documentation

◆ maBulletListItemMap

std::unordered_map< OUString, BulletListItemInfo > SVGTextWriter::maBulletListItemMap
private

Definition at line 226 of file svgwriter.hxx.

Referenced by implWriteBulletChars(), and implWriteTextPortion().

◆ maCurrentFont

vcl::Font SVGTextWriter::maCurrentFont
private

Definition at line 237 of file svgwriter.hxx.

Referenced by addFontAttributes(), implSetCurrentFont(), and implSetFontFamily().

◆ maParentFont

vcl::Font SVGTextWriter::maParentFont
private

Definition at line 238 of file svgwriter.hxx.

Referenced by addFontAttributes(), startTextParagraph(), and startTextShape().

◆ maTextOpacity

OUString SVGTextWriter::maTextOpacity
private

Definition at line 218 of file svgwriter.hxx.

Referenced by endTextShape(), hasTextOpacity(), implWriteTextPortion(), and setTextPosition().

◆ maTextPos

Point SVGTextWriter::maTextPos
private

◆ mbIsListLevelStyleImage

bool SVGTextWriter::mbIsListLevelStyleImage
private

◆ mbIsNewListItem

bool SVGTextWriter::mbIsNewListItem
private

◆ mbIsPlaceholderShape

bool SVGTextWriter::mbIsPlaceholderShape
private

Definition at line 235 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), and nextTextPortion().

◆ mbIsTextShapeStarted

bool SVGTextWriter::mbIsTextShapeStarted
private

Definition at line 206 of file svgwriter.hxx.

Referenced by endTextShape(), isTextShapeStarted(), and startTextShape().

◆ mbIsURLField

bool SVGTextWriter::mbIsURLField
private

Definition at line 229 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), nextTextPortion(), and writeTextPortion().

◆ mbIWS

const bool SVGTextWriter::mbIWS = false
staticprivate

◆ mbLineBreak

bool SVGTextWriter::mbLineBreak
private

Definition at line 228 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), setTextPosition(), and writeTextPortion().

◆ mbPositioningNeeded

bool SVGTextWriter::mbPositioningNeeded
private

◆ mcBulletChar

sal_Unicode SVGTextWriter::mcBulletChar
private

Definition at line 225 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), and nextParagraph().

◆ meNumberingType

sal_Int16 SVGTextWriter::meNumberingType
private

Definition at line 224 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), nextParagraph(), and startTextParagraph().

◆ mnLeftTextPortionLength

sal_Int32 SVGTextWriter::mnLeftTextPortionLength
private

Definition at line 219 of file svgwriter.hxx.

Referenced by writeTextPortion().

◆ mnTextWidth

tools::Long SVGTextWriter::mnTextWidth
private

Definition at line 221 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), and startTextPosition().

◆ mpTargetMapMode

MapMode* SVGTextWriter::mpTargetMapMode
private

Definition at line 214 of file svgwriter.hxx.

Referenced by implMap(), and setVirtualDevice().

◆ mpTextEmbeddedBitmapMtf

const GDIMetaFile* SVGTextWriter::mpTextEmbeddedBitmapMtf
private

Definition at line 213 of file svgwriter.hxx.

Referenced by implWriteEmbeddedBitmaps(), and setTextShape().

◆ mpTextParagraphElem

std::unique_ptr<SvXMLElementExport> SVGTextWriter::mpTextParagraphElem
private

Definition at line 216 of file svgwriter.hxx.

Referenced by endTextParagraph(), nextParagraph(), and startTextParagraph().

◆ mpTextPositionElem

std::unique_ptr<SvXMLElementExport> SVGTextWriter::mpTextPositionElem
private

Definition at line 217 of file svgwriter.hxx.

Referenced by endTextPosition(), and startTextPosition().

◆ mpTextShapeElem

std::unique_ptr<SvXMLElementExport> SVGTextWriter::mpTextShapeElem
private

Definition at line 215 of file svgwriter.hxx.

Referenced by endTextShape(), and startTextShape().

◆ mpVDev

VclPtr<VirtualDevice> SVGTextWriter::mpVDev
private

◆ mrActionWriter

SVGActionWriter& SVGTextWriter::mrActionWriter
private

Definition at line 204 of file svgwriter.hxx.

Referenced by setTextPosition().

◆ mrAttributeWriter

SVGAttributeWriter& SVGTextWriter::mrAttributeWriter
private

Definition at line 203 of file svgwriter.hxx.

Referenced by implWriteBulletChars(), and implWriteTextPortion().

◆ mrCurrentTextParagraph

Reference<XTextContent> SVGTextWriter::mrCurrentTextParagraph
private

Definition at line 210 of file svgwriter.hxx.

Referenced by endTextShape(), implWriteTextPortion(), and nextParagraph().

◆ mrCurrentTextPortion

Reference<XTextRange> SVGTextWriter::mrCurrentTextPortion
private

◆ mrExport

SVGExport& SVGTextWriter::mrExport
private

◆ mrParagraphEnumeration

Reference<XEnumeration> SVGTextWriter::mrParagraphEnumeration
private

Definition at line 209 of file svgwriter.hxx.

Referenced by createParagraphEnumeration(), endTextShape(), and nextParagraph().

◆ mrTextPortionEnumeration

Reference<XEnumeration> SVGTextWriter::mrTextPortionEnumeration
private

Definition at line 211 of file svgwriter.hxx.

Referenced by nextParagraph(), and nextTextPortion().

◆ mrTextShape

Reference<XText> SVGTextWriter::mrTextShape
private

Definition at line 207 of file svgwriter.hxx.

Referenced by createParagraphEnumeration(), endTextShape(), and setTextShape().

◆ msDateTimeType

OUString SVGTextWriter::msDateTimeType
private

Definition at line 233 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), and nextTextPortion().

◆ msHyperlinkIdList

OUString SVGTextWriter::msHyperlinkIdList
private

Definition at line 231 of file svgwriter.hxx.

Referenced by implExportHyperlinkIds(), and nextTextPortion().

◆ msPageCount

OUString SVGTextWriter::msPageCount
private

Definition at line 232 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), and nextTextPortion().

◆ msShapeId

OUString SVGTextWriter::msShapeId
private

◆ msTextFieldType

OUString SVGTextWriter::msTextFieldType
private

Definition at line 234 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), and nextTextPortion().

◆ msUrl

OUString SVGTextWriter::msUrl
private

Definition at line 230 of file svgwriter.hxx.

Referenced by implWriteTextPortion(), and nextTextPortion().


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