LibreOffice Module filter (master) 1
|
#include <svgwriter.hxx>
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) |
Static Private Attributes | |
static const bool | mbIWS = false |
Definition at line 199 of file svgwriter.hxx.
|
explicit |
Definition at line 462 of file svgwriter.cxx.
SVGTextWriter::~SVGTextWriter | ( | ) |
Definition at line 486 of file svgwriter.cxx.
References endTextParagraph().
void SVGTextWriter::addFontAttributes | ( | bool | bIsTextContainer | ) |
Definition at line 806 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLAttrFontSize, aXMLAttrFontStyle, aXMLAttrFontWeight, aXMLAttrTextDecoration, vcl::Font::GetFamilyName(), vcl::Font::GetFontHeight(), vcl::Font::GetItalic(), vcl::Font::GetStrikeout(), vcl::Font::GetUnderline(), vcl::Font::GetWeight(), implSetCurrentFont(), implSetFontFamily(), SVGExport::IsUseNativeTextDecoration(), ITALIC_NONE, ITALIC_OBLIQUE, LINESTYLE_NONE, maCurrentFont, maParentFont, mrExport, STRIKEOUT_NONE, WEIGHT_BLACK, WEIGHT_BOLD, WEIGHT_LIGHT, WEIGHT_MEDIUM, WEIGHT_NORMAL, WEIGHT_SEMIBOLD, WEIGHT_SEMILIGHT, WEIGHT_THIN, WEIGHT_ULTRABOLD, WEIGHT_ULTRALIGHT, and XML_NAMESPACE_NONE.
Referenced by implWriteTextPortion(), and startTextParagraph().
void SVGTextWriter::createParagraphEnumeration | ( | ) |
Definition at line 941 of file svgwriter.cxx.
References implGetValidIDFromInterface(), mrParagraphEnumeration, mrTextShape, and msShapeId.
Referenced by SVGActionWriter::ImplWriteActions().
void SVGTextWriter::endTextParagraph | ( | ) |
Definition at line 1362 of file svgwriter.cxx.
References endTextPosition(), mbIsListLevelStyleImage, mbIsNewListItem, mbPositioningNeeded, mpTextParagraphElem, and mrCurrentTextPortion.
Referenced by endTextShape(), nextParagraph(), startTextParagraph(), SVGActionWriter::WriteMetaFile(), and ~SVGTextWriter().
void SVGTextWriter::endTextPosition | ( | ) |
Definition at line 1387 of file svgwriter.cxx.
References mpTextPositionElem.
Referenced by endTextParagraph(), startTextPosition(), and writeBitmapPlaceholder().
void SVGTextWriter::endTextShape | ( | ) |
Definition at line 1308 of file svgwriter.cxx.
References endTextParagraph(), implExportHyperlinkIds(), implWriteBulletChars(), implWriteEmbeddedBitmaps(), maTextOpacity, mbIsTextShapeStarted, mpTextShapeElem, mrCurrentTextParagraph, mrParagraphEnumeration, and mrTextShape.
Referenced by SVGActionWriter::ImplWriteActions(), and writeTextPortion().
bool SVGTextWriter::hasTextOpacity | ( | ) | const |
Definition at line 1392 of file svgwriter.cxx.
References maTextOpacity.
Referenced by SVGActionWriter::ImplWriteMask().
void SVGTextWriter::implExportHyperlinkIds | ( | ) |
Definition at line 1394 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), SvXMLExport::GetDocHandler(), mrExport, msHyperlinkIdList, and XML_NAMESPACE_NONE.
Referenced by endTextShape().
|
private |
Definition at line 542 of file svgwriter.cxx.
References nLength.
|
private |
Definition at line 557 of file svgwriter.cxx.
References MetaTextRectAction::GetRect(), MetaTextRectAction::GetText(), nLength, and tools::Rectangle::TopLeft().
|
private |
Definition at line 572 of file svgwriter.cxx.
|
private |
Definition at line 499 of file svgwriter.cxx.
References comphelper::UnoInterfaceToUniqueIdentifierMapper::getIdentifier(), SvXMLExport::getInterfaceToIdentifierMapper(), and mrExport.
Referenced by createParagraphEnumeration(), implWriteTextPortion(), nextParagraph(), and nextTextPortion().
Definition at line 514 of file svgwriter.cxx.
References OutputDevice::LogicToLogic(), mpTargetMapMode, and mpVDev.
Definition at line 505 of file svgwriter.cxx.
References OutputDevice::LogicToLogic(), mpTargetMapMode, and mpVDev.
Referenced by implSetCurrentFont(), implWriteEmbeddedBitmaps(), implWriteTextPortion(), setTextPosition(), and writeBitmapPlaceholder().
|
private |
Definition at line 492 of file svgwriter.cxx.
References SvXMLExport::getInterfaceToIdentifierMapper(), mrExport, and comphelper::UnoInterfaceToUniqueIdentifierMapper::registerReference().
Referenced by implWriteTextPortion(), and nextTextPortion().
|
private |
Definition at line 523 of file svgwriter.cxx.
References vcl::Font::GetFontHeight(), Size::Height(), implMap(), maCurrentFont, mpVDev, and vcl::Font::SetFontHeight().
Referenced by addFontAttributes().
|
private |
Definition at line 920 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLAttrFontFamily, FAMILY_ROMAN, FAMILY_SWISS, vcl::Font::GetFamilyName(), vcl::Font::GetFamilyType(), vcl::Font::GetPitch(), maCurrentFont, mrExport, PITCH_FIXED, and XML_NAMESPACE_NONE.
Referenced by addFontAttributes().
void SVGTextWriter::implWriteBulletChars | ( | ) |
Definition at line 1406 of file svgwriter.cxx.
References BulletListItemInfo::aColor, SvXMLExport::AddAttribute(), SVGAttributeWriter::AddPaintAttr(), BulletListItemInfo::aFont, BulletListItemInfo::aPos, aStr, aXMLAttrXLinkHRef, aXMLElemG, BulletListItemInfo::cBulletChar, COL_TRANSPARENT(), vcl::FONT, vcl::Font::GetFontHeight(), SVGActionWriter::GetPathString(), SVGExport::IsEmbeddedBulletGlyph(), maBulletListItemMap, mpVDev, mrAttributeWriter, mrExport, sId, Point::X(), XML_NAMESPACE_NONE, and Point::Y().
Referenced by endTextShape().
void SVGTextWriter::implWriteEmbeddedBitmaps | ( | ) |
Definition at line 1505 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLAttrX, aXMLAttrXLinkHRef, aXMLAttrY, aXMLElemG, GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), MetaBmpScaleAction::GetBitmap(), MetaBmpExScaleAction::GetBitmapEx(), BitmapEx::GetChecksum(), SVGActionWriter::GetChecksum(), MetaBmpExScaleAction::GetPoint(), MetaBmpScaleAction::GetPoint(), MetaBmpExScaleAction::GetSize(), MetaBmpScaleAction::GetSize(), MetaAction::GetType(), implMap(), mpTextEmbeddedBitmapMtf, mrExport, msShapeId, nCount, nId, nType, sId, Point::X(), XML_NAMESPACE_NONE, and Point::Y().
Referenced by endTextShape().
void SVGTextWriter::implWriteTextPortion | ( | const Point & | rPos, |
const OUString & | rText, | ||
Color | aTextColor | ||
) |
Definition at line 1672 of file svgwriter.cxx.
References BulletListItemInfo::aColor, SvXMLExport::AddAttribute(), addFontAttributes(), SVGAttributeWriter::AddPaintAttr(), Point::AdjustY(), BulletListItemInfo::aFont, ALIGN_BOTTOM, ALIGN_TOP, BulletListItemInfo::aPos, aXMLAttrXLinkHRef, aXMLElemTspan, BulletListItemInfo::cBulletChar, COL_TRANSPARENT(), vcl::Font::GetAlignment(), FontMetric::GetAscent(), FontMetric::GetDescent(), SvXMLExport::GetDocHandler(), implGetValidIDFromInterface(), implMap(), implRegisterInterface(), maBulletListItemMap, maTextOpacity, maTextPos, mbIsNewListItem, mbIsPlaceholderShape, mbIsURLField, mbIWS, mbLineBreak, mbPositioningNeeded, mcBulletChar, meNumberingType, mnTextWidth, mpVDev, mrAttributeWriter, mrCurrentTextParagraph, mrCurrentTextPortion, mrExport, msDateTimeType, msPageCount, msTextFieldType, msUrl, Point::setX(), Point::setY(), sId, startTextPosition(), Point::X(), XML_NAMESPACE_NONE, and Point::Y().
Referenced by writeTextPortion().
|
inline |
Definition at line 254 of file svgwriter.hxx.
References mbIsTextShapeStarted.
Referenced by SVGActionWriter::ImplWriteActions(), and writeTextPortion().
bool SVGTextWriter::nextParagraph | ( | ) |
Definition at line 965 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLElemTspan, endTextParagraph(), eType, gentoken::i, implGetValidIDFromInterface(), mbIsListLevelStyleImage, mbIsNewListItem, mbIWS, mcBulletChar, meNumberingType, mpTextParagraphElem, mrCurrentTextParagraph, mrExport, mrParagraphEnumeration, mrTextPortionEnumeration, nCount, and XML_NAMESPACE_NONE.
Referenced by setTextPosition(), and startTextParagraph().
bool SVGTextWriter::nextTextPortion | ( | ) |
Definition at line 1128 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), SvXMLExport::GetDocHandler(), SvXMLExport::GetRelativeReference(), implGetValidIDFromInterface(), implRegisterInterface(), mbIsPlaceholderShape, mbIsURLField, mbIWS, mrCurrentTextPortion, mrExport, mrTextPortionEnumeration, msDateTimeType, msHyperlinkIdList, msPageCount, msTextFieldType, msUrl, nCount, u, and XML_NAMESPACE_NONE.
Referenced by setTextPosition(), and writeTextPortion().
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.
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().
void SVGTextWriter::setTextProperties | ( | const GDIMetaFile & | rMtf, |
size_t | nCurAction | ||
) |
Definition at line 737 of file svgwriter.cxx.
References Execute(), GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), MetaCommentAction::GetComment(), MetaStretchTextAction::GetLen(), MetaTextAction::GetLen(), MetaTextArrayAction::GetLen(), MetaTextRectAction::GetText(), MetaAction::GetType(), mpVDev, nCount, and nType.
Referenced by SVGActionWriter::ImplWriteActions().
|
inline |
Definition at line 279 of file svgwriter.hxx.
References mpTextEmbeddedBitmapMtf, and mrTextShape.
Referenced by SVGActionWriter::ImplWriteActions().
|
inline |
Definition at line 271 of file svgwriter.hxx.
References mpTargetMapMode, and mpVDev.
Referenced by SVGActionWriter::SVGActionWriter().
void SVGTextWriter::startTextParagraph | ( | ) |
Definition at line 1325 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), addFontAttributes(), aXMLElemTspan, endTextParagraph(), maParentFont, mbIsListLevelStyleImage, mbIsNewListItem, mbIWS, mbPositioningNeeded, meNumberingType, mpTextParagraphElem, mrExport, nextParagraph(), and XML_NAMESPACE_NONE.
Referenced by SVGActionWriter::ImplWriteActions(), and startTextShape().
void SVGTextWriter::startTextPosition | ( | bool | bExportX = true , |
bool | bExportY = true |
||
) |
Definition at line 1373 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLAttrX, aXMLAttrY, aXMLElemTspan, endTextPosition(), maTextPos, mbIWS, mnTextWidth, mpTextPositionElem, mrExport, Point::X(), XML_NAMESPACE_NONE, and Point::Y().
Referenced by SVGActionWriter::ImplWriteActions(), implWriteTextPortion(), and writeBitmapPlaceholder().
void SVGTextWriter::startTextShape | ( | ) |
Definition at line 1278 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLAttrTransform, aXMLElemText, o3tl::strong_int< typename UNDERLYING_TYPE, typename PHANTOM_TYPE >::get(), vcl::Font::GetOrientation(), maParentFont, maTextPos, mbIsTextShapeStarted, mbIWS, mpTextShapeElem, mpVDev, mrExport, startTextParagraph(), Point::X(), XML_NAMESPACE_NONE, and Point::Y().
Referenced by SVGActionWriter::ImplWriteActions(), and writeTextPortion().
void SVGTextWriter::writeBitmapPlaceholder | ( | const MetaBitmapActionType * | pAction | ) |
Definition at line 1478 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLElemTspan, endTextPosition(), SVGActionWriter::GetChecksum(), implMap(), maTextPos, mbIsListLevelStyleImage, mbIsNewListItem, mbIWS, mbPositioningNeeded, mrExport, msShapeId, nId, sId, startTextPosition(), and XML_NAMESPACE_NONE.
Referenced by SVGActionWriter::ImplWriteActions().
void SVGTextWriter::writeTextPortion | ( | const Point & | rPos, |
const OUString & | rText | ||
) |
Definition at line 1582 of file svgwriter.cxx.
References endTextShape(), vcl::Font::GetRelief(), implWriteTextPortion(), vcl::Font::IsOutline(), vcl::Font::IsShadow(), isTextShapeStarted(), mbIsListLevelStyleImage, mbIsNewListItem, mbIsURLField, mbLineBreak, mbPositioningNeeded, mnLeftTextPortionLength, mpVDev, mrCurrentTextPortion, nextTextPortion(), and startTextShape().
Referenced by SVGActionWriter::ImplWriteActions().
|
private |
Definition at line 226 of file svgwriter.hxx.
Referenced by implWriteBulletChars(), and implWriteTextPortion().
|
private |
Definition at line 237 of file svgwriter.hxx.
Referenced by addFontAttributes(), implSetCurrentFont(), and implSetFontFamily().
|
private |
Definition at line 238 of file svgwriter.hxx.
Referenced by addFontAttributes(), startTextParagraph(), and startTextShape().
|
private |
Definition at line 218 of file svgwriter.hxx.
Referenced by endTextShape(), hasTextOpacity(), implWriteTextPortion(), and setTextPosition().
|
private |
Definition at line 220 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), setTextPosition(), startTextPosition(), startTextShape(), and writeBitmapPlaceholder().
|
private |
Definition at line 227 of file svgwriter.hxx.
Referenced by endTextParagraph(), nextParagraph(), startTextParagraph(), writeBitmapPlaceholder(), and writeTextPortion().
|
private |
Definition at line 223 of file svgwriter.hxx.
Referenced by endTextParagraph(), implWriteTextPortion(), nextParagraph(), startTextParagraph(), writeBitmapPlaceholder(), and writeTextPortion().
|
private |
Definition at line 235 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), and nextTextPortion().
|
private |
Definition at line 206 of file svgwriter.hxx.
Referenced by endTextShape(), isTextShapeStarted(), and startTextShape().
|
private |
Definition at line 229 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), nextTextPortion(), and writeTextPortion().
|
staticprivate |
Definition at line 236 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), nextParagraph(), nextTextPortion(), startTextParagraph(), startTextPosition(), startTextShape(), and writeBitmapPlaceholder().
|
private |
Definition at line 228 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), setTextPosition(), and writeTextPortion().
|
private |
Definition at line 222 of file svgwriter.hxx.
Referenced by endTextParagraph(), implWriteTextPortion(), startTextParagraph(), writeBitmapPlaceholder(), and writeTextPortion().
|
private |
Definition at line 225 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), and nextParagraph().
|
private |
Definition at line 224 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), nextParagraph(), and startTextParagraph().
|
private |
Definition at line 219 of file svgwriter.hxx.
Referenced by writeTextPortion().
|
private |
Definition at line 221 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), and startTextPosition().
|
private |
Definition at line 214 of file svgwriter.hxx.
Referenced by implMap(), and setVirtualDevice().
|
private |
Definition at line 213 of file svgwriter.hxx.
Referenced by implWriteEmbeddedBitmaps(), and setTextShape().
|
private |
Definition at line 216 of file svgwriter.hxx.
Referenced by endTextParagraph(), nextParagraph(), and startTextParagraph().
|
private |
Definition at line 217 of file svgwriter.hxx.
Referenced by endTextPosition(), and startTextPosition().
|
private |
Definition at line 215 of file svgwriter.hxx.
Referenced by endTextShape(), and startTextShape().
|
private |
Definition at line 205 of file svgwriter.hxx.
Referenced by implMap(), implSetCurrentFont(), implWriteBulletChars(), implWriteTextPortion(), setTextProperties(), setVirtualDevice(), startTextShape(), and writeTextPortion().
|
private |
Definition at line 204 of file svgwriter.hxx.
Referenced by setTextPosition().
|
private |
Definition at line 203 of file svgwriter.hxx.
Referenced by implWriteBulletChars(), and implWriteTextPortion().
|
private |
Definition at line 210 of file svgwriter.hxx.
Referenced by endTextShape(), implWriteTextPortion(), and nextParagraph().
|
private |
Definition at line 212 of file svgwriter.hxx.
Referenced by endTextParagraph(), implWriteTextPortion(), nextTextPortion(), setTextPosition(), and writeTextPortion().
|
private |
Definition at line 202 of file svgwriter.hxx.
Referenced by addFontAttributes(), implExportHyperlinkIds(), implGetValidIDFromInterface(), implRegisterInterface(), implSetFontFamily(), implWriteBulletChars(), implWriteEmbeddedBitmaps(), implWriteTextPortion(), nextParagraph(), nextTextPortion(), startTextParagraph(), startTextPosition(), startTextShape(), and writeBitmapPlaceholder().
|
private |
Definition at line 209 of file svgwriter.hxx.
Referenced by createParagraphEnumeration(), endTextShape(), and nextParagraph().
|
private |
Definition at line 211 of file svgwriter.hxx.
Referenced by nextParagraph(), and nextTextPortion().
|
private |
Definition at line 207 of file svgwriter.hxx.
Referenced by createParagraphEnumeration(), endTextShape(), and setTextShape().
|
private |
Definition at line 233 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), and nextTextPortion().
|
private |
Definition at line 231 of file svgwriter.hxx.
Referenced by implExportHyperlinkIds(), and nextTextPortion().
|
private |
Definition at line 232 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), and nextTextPortion().
|
private |
Definition at line 208 of file svgwriter.hxx.
Referenced by createParagraphEnumeration(), implWriteEmbeddedBitmaps(), and writeBitmapPlaceholder().
|
private |
Definition at line 234 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), and nextTextPortion().
|
private |
Definition at line 230 of file svgwriter.hxx.
Referenced by implWriteTextPortion(), and nextTextPortion().