LibreOffice Module sw (master)
1
|
Handles export of drawings using RTF markup. More...
#include <rtfsdrexport.hxx>
Public Member Functions | |
RtfSdrExport (RtfExport &rExport) | |
~RtfSdrExport () override | |
void | AddSdrObject (const SdrObject &rObj) |
Export the sdr object as Sdr. More... | |
void | WriteOutliner (const OutlinerParaObject &rParaObj, TextTypes eType) |
Write editeng text, e.g. shape or comment. More... | |
![]() | |
EscherEx (const std::shared_ptr< EscherExGlobal > &rxGlobal, SvStream *pOutStrm, bool bOOXML=false) | |
virtual | ~EscherEx () override |
virtual sal_uInt32 | GenerateShapeId () |
EscherGraphicProvider & | GetGraphicProvider () |
SvStream * | QueryPictureStream () |
void | Flush (SvStream *pPicStreamMergeBSE=nullptr) |
void | InsertAtCurrentPos (sal_uInt32 nBytes) |
void | InsertPersistOffset (sal_uInt32 nKey, sal_uInt32 nOffset) |
void | ReplacePersistOffset (sal_uInt32 nKey, sal_uInt32 nOffset) |
sal_uInt32 | GetPersistOffset (sal_uInt32 nKey) |
bool | SeekToPersistOffset (sal_uInt32 nKey) |
void | InsertAtPersistOffset (sal_uInt32 nKey, sal_uInt32 nValue) |
void | SetEditAs (const OUString &rEditAs) |
const OUString & | GetEditAs () const |
SvStream & | GetStream () const |
sal_uLong | GetStreamPos () const |
void | BeginAtom () |
void | EndAtom (sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0) |
void | AddAtom (sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0) |
void | AddChildAnchor (const tools::Rectangle &rRectangle) |
void | AddClientAnchor (const tools::Rectangle &rRectangle) |
sal_uInt32 | EnterGroup (const tools::Rectangle *pBoundRect=nullptr) |
sal_uInt32 | GetGroupLevel () const |
void | SetGroupSnapRect (sal_uInt32 nGroupLevel, const tools::Rectangle &rRect) |
void | SetGroupLogicRect (sal_uInt32 nGroupLevel, const tools::Rectangle &rRect) |
void | AddSdrPage (const SdrPage &rPage) |
void | AddUnoShapes (const css::uno::Reference< css::drawing::XShapes > &rxShapes) |
sal_uInt32 | AddSdrObject (const SdrObject &rObj, bool ooxmlExport=false) |
virtual void | AddSdrObjectVMLObject (const SdrObject &) |
void | EndSdrObjectPage () |
virtual EscherExHostAppData * | StartShape (const css::uno::Reference< css::drawing::XShape > &rShape, const tools::Rectangle *pChildAnchor) |
virtual void | EndShape (sal_uInt16 nShapeType, sal_uInt32 nShapeID) |
virtual EscherExHostAppData * | EnterAdditionalTextGroup () |
virtual sal_uInt32 | QueryTextID (const css::uno::Reference< css::drawing::XShape > &, sal_uInt32 nShapeId) |
sal_uInt32 | AddDummyShape () |
void | SetHellLayerId (SdrLayerID nId) |
SdrLayerID | GetHellLayerId () const |
![]() | |
bool | PtIsID (sal_uInt32 nID) |
void | PtInsert (sal_uInt32 nID, sal_uInt32 nOfs) |
void | PtDelete (sal_uInt32 nID) |
sal_uInt32 | PtGetOffsetByID (sal_uInt32 nID) |
void | PtReplace (sal_uInt32 nID, sal_uInt32 nOfs) |
void | PtReplaceOrInsert (sal_uInt32 nID, sal_uInt32 nOfs) |
EscherPersistTable () | |
virtual | ~EscherPersistTable () |
EscherPersistTable & | operator= (EscherPersistTable const &)=delete |
EscherPersistTable (EscherPersistTable const &)=delete | |
Static Public Member Functions | |
static bool | isTextBox (const SwFrameFormat &rFrameFormat) |
Is this a standalone TextFrame, or used as a TextBox of a shape? More... | |
![]() | |
static sal_uInt32 | GetColor (const sal_uInt32 nColor) |
static sal_uInt32 | GetColor (const Color &rColor) |
static const SdrObject * | GetSdrObject (const css::uno::Reference< css::drawing::XShape > &rXShape) |
Private Member Functions | |
sal_Int32 | StartShape () |
void | EndShape (sal_Int32 nShapeElement) |
void | Commit (EscherPropertyContainer &rProps, const tools::Rectangle &rRect) override |
void | OpenContainer (sal_uInt16 nEscherContainer, int nRecInstance=0) override |
void | CloseContainer () override |
sal_uInt32 | EnterGroup (const OUString &rShapeName, const tools::Rectangle *pBoundRect) override |
void | LeaveGroup () override |
void | AddShape (sal_uInt32 nShapeType, ShapeFlag nShapeFlags, sal_uInt32 nShapeId=0) override |
void | AddLineDimensions (const tools::Rectangle &rRectangle) |
Add starting and ending point of a line to the m_pShapeAttrList. More... | |
void | AddRectangleDimensions (OStringBuffer &rBuffer, const tools::Rectangle &rRectangle) |
Add position and size to the OStringBuffer. More... | |
void | impl_writeGraphic () |
Exports the pib property of the shape. More... | |
Private Attributes | |
RtfExport & | m_rExport |
RtfAttributeOutput & | m_rAttrOutput |
const SdrObject * | m_pSdrObject |
sal_uInt32 | m_nShapeType |
Remember the shape type. More... | |
ShapeFlag | m_nShapeFlags |
Remember the shape flags. More... | |
OStringBuffer | m_aShapeStyle |
Remember style, the most important shape attribute ;-) More... | |
std::map< OString, OString > | m_aShapeProps |
std::unique_ptr< bool[]> | m_pShapeTypeWritten |
Remember which shape types we had already written. More... | |
bool | m_bInGroup = false |
Additional Inherited Members | |
![]() | |
::std::vector< std::unique_ptr< EscherPersistEntry > > | maPersistTable |
![]() | |
bool | DoSeek (sal_uInt32 nKey) |
![]() | |
std::shared_ptr< EscherExGlobal > | mxGlobal |
::std::unique_ptr< ImplEESdrWriter > | mpImplEESdrWriter |
SvStream * | mpOutStrm |
bool | mbOwnsStrm |
sal_uInt32 | mnStrmStartOfs |
std::vector< sal_uInt32 > | mOffsets |
std::vector< sal_uInt16 > | mRecTypes |
sal_uInt32 | mnCurrentDg |
sal_uInt32 | mnCountOfs |
sal_uInt32 | mnGroupLevel |
SdrLayerID | mnHellLayerId |
bool | mbEscherSpgr |
bool | mbEscherDg |
bool | mbOOXML |
OUString | mEditAs |
Handles export of drawings using RTF markup.
Definition at line 37 of file rtfsdrexport.hxx.
|
explicit |
Definition at line 45 of file rtfsdrexport.cxx.
References ESCHER_ShpInst_COUNT, ESCHER_ShpInst_Nil, m_pShapeTypeWritten, make_shared(), EscherEx::mnGroupLevel, and NONE.
|
override |
Definition at line 59 of file rtfsdrexport.cxx.
References EscherEx::mpOutStrm.
|
private |
Add starting and ending point of a line to the m_pShapeAttrList.
Definition at line 459 of file rtfsdrexport.cxx.
References tools::Rectangle::Bottom(), tools::Rectangle::Left(), m_aShapeProps, m_aShapeStyle, m_nShapeFlags, OOO_STRING_SVTOOLS_RTF_SHPBOTTOM, OOO_STRING_SVTOOLS_RTF_SHPLEFT, OOO_STRING_SVTOOLS_RTF_SHPRIGHT, OOO_STRING_SVTOOLS_RTF_SHPTOP, tools::Rectangle::Right(), and tools::Rectangle::Top().
Referenced by Commit().
|
private |
Add position and size to the OStringBuffer.
Definition at line 477 of file rtfsdrexport.cxx.
References tools::Rectangle::Bottom(), tools::Rectangle::Left(), m_aShapeProps, OOO_STRING_SVTOOLS_RTF_SHPBOTTOM, OOO_STRING_SVTOOLS_RTF_SHPLEFT, OOO_STRING_SVTOOLS_RTF_SHPRIGHT, OOO_STRING_SVTOOLS_RTF_SHPTOP, tools::Rectangle::Right(), and tools::Rectangle::Top().
Referenced by Commit().
Export the sdr object as Sdr.
Call this when you need to export the object as Sdr in RTF.
Definition at line 749 of file rtfsdrexport.cxx.
References EscherEx::AddSdrObject(), and m_pSdrObject.
|
overrideprivatevirtual |
Reimplemented from EscherEx.
Definition at line 102 of file rtfsdrexport.cxx.
References m_nShapeFlags, and m_nShapeType.
|
overrideprivatevirtual |
Reimplemented from EscherEx.
Definition at line 78 of file rtfsdrexport.cxx.
References EscherEx::CloseContainer(), EndShape(), ESCHER_ShpInst_Nil, ESCHER_SpContainer, m_nShapeType, EscherEx::mRecTypes, and StartShape().
|
overrideprivatevirtual |
Reimplemented from EscherEx.
Definition at line 141 of file rtfsdrexport.cxx.
References aBuf, AddLineDimensions(), AddRectangleDimensions(), aSegments, ESCHER_Prop_adjustValue, ESCHER_Prop_AnchorText, ESCHER_Prop_dxTextLeft, ESCHER_Prop_dxTextRight, ESCHER_Prop_dyTextBottom, ESCHER_Prop_dyTextTop, ESCHER_Prop_fFillOK, ESCHER_Prop_fillBackColor, ESCHER_Prop_fillBlip, ESCHER_Prop_fillColor, ESCHER_Prop_fillOpacity, ESCHER_Prop_fillType, ESCHER_Prop_FitTextToShape, ESCHER_Prop_fNoFillHitTest, ESCHER_Prop_fNoLineDrawDash, ESCHER_Prop_fshadowObscured, ESCHER_Prop_geoBottom, ESCHER_Prop_geoLeft, ESCHER_Prop_geoRight, ESCHER_Prop_geoTop, ESCHER_Prop_lineBackColor, ESCHER_Prop_lineColor, ESCHER_Prop_lineJoinStyle, ESCHER_Prop_pSegmentInfo, ESCHER_Prop_pVertices, ESCHER_Prop_shapePath, ESCHER_Prop_txflTextFlow, ESCHER_Prop_WrapText, ESCHER_ShpInst_Line, ESCHER_ShpInst_Nil, ESCHER_WrapByPoints, ESCHER_WrapNone, ESCHER_WrapSquare, ESCHER_WrapThrough, ESCHER_WrapTopBottom, EscherPropertyContainer::GetOpt(), EscherPropertyContainer::GetOpts(), i, impl_GetPointComponent(), impl_GetUInt16(), m_aShapeProps, m_aShapeStyle, m_nShapeType, msopathClientEscape, msopathClose, msopathCurveTo, msopathEnd, msopathEscape, msopathLineTo, msopathMoveTo, nId, EscherPropSortStruct::nProp, OOO_STRING_SVTOOLS_RTF_PICT, OOO_STRING_SVTOOLS_RTF_PNGBLIP, OOO_STRING_SVTOOLS_RTF_SHPWR, SAL_INFO, SAL_NEWLINE_STRING, SAL_WARN, and msfilter::rtfutil::WriteHex().
|
private |
Definition at line 740 of file rtfsdrexport.cxx.
References m_rAttrOutput, and RtfAttributeOutput::RunText().
Referenced by CloseContainer().
|
overrideprivatevirtual |
Reimplemented from EscherEx.
Definition at line 93 of file rtfsdrexport.cxx.
References EscherEx::GenerateShapeId(), and m_bInGroup.
|
private |
Exports the pib property of the shape.
Definition at line 504 of file rtfsdrexport.cxx.
References aBuf, GraphicConverter::Export(), SvMemoryStream::GetData(), Graphic::GetPrefSize(), GetXShapeForSdrObject(), m_aShapeProps, m_pSdrObject, OOO_STRING_SVTOOLS_RTF_PICH, OOO_STRING_SVTOOLS_RTF_PICT, OOO_STRING_SVTOOLS_RTF_PICW, OOO_STRING_SVTOOLS_RTF_PNGBLIP, SAL_NEWLINE_STRING, SvMemoryStream::TellEnd(), TOOLS_WARN_EXCEPTION, void(), msfilter::rtfutil::WriteHex(), and xGraphic.
Referenced by StartShape().
|
static |
Is this a standalone TextFrame, or used as a TextBox of a shape?
Definition at line 755 of file rtfsdrexport.cxx.
References SwTextBoxHelper::isTextBox(), and RES_FLYFRMFMT().
Referenced by RtfAttributeOutput::OutputFlyFrame_Impl().
|
overrideprivatevirtual |
Reimplemented from EscherEx.
Definition at line 100 of file rtfsdrexport.cxx.
References m_bInGroup.
|
overrideprivatevirtual |
Reimplemented from EscherEx.
Definition at line 65 of file rtfsdrexport.cxx.
References ESCHER_ShpInst_Nil, ESCHER_SpContainer, m_aShapeProps, m_aShapeStyle, m_nShapeType, and EscherEx::OpenContainer().
|
private |
Definition at line 549 of file rtfsdrexport.cxx.
References ESCHER_ShpInst_Nil, ESCHER_ShpInst_PictureFrame, FindFrameFormat(), RtfExport::GetCurrentEncoding(), SdrObject::GetDescription(), SfxItemSet::GetItem(), SdrObject::GetName(), SdrObject::GetOrdNum(), SwTextBoxHelper::getOtherTextBoxFormat(), EditTextObject::GetParaAttribs(), EditTextObject::GetText(), OutlinerParaObject::GetTextObject(), impl_writeGraphic(), lcl_AppendSP(), MSWordExportBase::m_aFrames, m_aShapeProps, m_aShapeStyle, m_bInGroup, m_nShapeType, m_pSdrObject, m_rAttrOutput, m_rExport, OOO_STRING_SVTOOLS_RTF_IGNORE, OOO_STRING_SVTOOLS_RTF_SHP, OOO_STRING_SVTOOLS_RTF_SHPBXIGNORE, OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE, OOO_STRING_SVTOOLS_RTF_SHPINST, OOO_STRING_SVTOOLS_RTF_SHPZ, msfilter::rtfutil::OutString(), RES_DRAWFRMFMT(), RTF_MULTIPLIER, RtfAttributeOutput::RunText(), TransformMetric(), TXT_HFTXTBOX, WriteOutliner(), and RtfAttributeOutput::writeTextFrame().
Referenced by CloseContainer().
void RtfSdrExport::WriteOutliner | ( | const OutlinerParaObject & | rParaObj, |
TextTypes | eType | ||
) |
Write editeng text, e.g. shape or comment.
Definition at line 683 of file rtfsdrexport.cxx.
References aStr, MSWord_SdrAttrIter::GetNextCharSet(), MSWord_SdrAttrIter::GetNodeCharSet(), EditTextObject::GetParagraphCount(), EditTextObject::GetText(), OutlinerParaObject::GetTextObject(), MSWord_SdrAttrIter::IsTextAttr(), m_rAttrOutput, m_rExport, RtfAttributeOutput::MoveCharacterProperties(), n, MSWord_SdrAttrIter::NextPara(), MSWord_SdrAttrIter::NextPos(), OOO_STRING_SVTOOLS_RTF_PAR, OOO_STRING_SVTOOLS_RTF_SHPTXT, MSWord_SdrAttrIter::OutAttr(), MSWord_SdrAttrIter::OutParaAttr(), msfilter::rtfutil::OutString(), RtfAttributeOutput::RunText(), SAL_INFO, SAL_NEWLINE_STRING, TXT_HFTXTBOX, and MSWord_SdrAttrIter::WhereNext().
Referenced by StartShape().
|
private |
Definition at line 54 of file rtfsdrexport.hxx.
Referenced by AddLineDimensions(), AddRectangleDimensions(), Commit(), impl_writeGraphic(), OpenContainer(), and StartShape().
|
private |
Remember style, the most important shape attribute ;-)
Definition at line 52 of file rtfsdrexport.hxx.
Referenced by AddLineDimensions(), Commit(), OpenContainer(), and StartShape().
|
private |
Definition at line 59 of file rtfsdrexport.hxx.
Referenced by EnterGroup(), LeaveGroup(), and StartShape().
|
private |
Remember the shape flags.
Definition at line 49 of file rtfsdrexport.hxx.
Referenced by AddLineDimensions(), and AddShape().
|
private |
Remember the shape type.
Definition at line 46 of file rtfsdrexport.hxx.
Referenced by AddShape(), CloseContainer(), Commit(), OpenContainer(), and StartShape().
|
private |
Definition at line 43 of file rtfsdrexport.hxx.
Referenced by AddSdrObject(), impl_writeGraphic(), and StartShape().
|
private |
Remember which shape types we had already written.
Definition at line 57 of file rtfsdrexport.hxx.
Referenced by RtfSdrExport().
|
private |
Definition at line 41 of file rtfsdrexport.hxx.
Referenced by EndShape(), StartShape(), and WriteOutliner().
|
private |
Definition at line 39 of file rtfsdrexport.hxx.
Referenced by StartShape(), and WriteOutliner().