diff options
-rw-r--r-- | include/oox/export/drawingml.hxx | 7 | ||||
-rw-r--r-- | include/oox/export/utils.hxx | 4 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xeescher.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 6 |
6 files changed, 16 insertions, 11 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 988d34eed315..9305c0108da2 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -29,6 +29,8 @@ #include <filter/msfilter/escherex.hxx> #include "oox/drawingml/drawingmltypes.hxx" #include <oox/token/tokens.hxx> +#include <oox/export/utils.hxx> + #ifndef OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY // Our rotation is counter-clockwise and is in 100ths of a degree. // drawingML rotation is clockwise and is in 60000ths of a degree. @@ -86,9 +88,8 @@ protected: virtual ~DMLTextExport() {} }; -class OOX_DLLPUBLIC DrawingML { -public: - enum DocumentType { DOCUMENT_DOCX, DOCUMENT_PPTX, DOCUMENT_XLSX }; +class OOX_DLLPUBLIC DrawingML +{ private: static int mnImageCounter; diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx index 53cdfcd9f92d..32a9fbed2a0f 100644 --- a/include/oox/export/utils.hxx +++ b/include/oox/export/utils.hxx @@ -44,6 +44,10 @@ OString write1000thOfAPercent(T number) return OString::number( number * 1000 ); } +namespace oox { namespace drawingml { + enum DocumentType { DOCUMENT_DOCX, DOCUMENT_PPTX, DOCUMENT_XLSX }; +} } + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 654b11f4e256..8320aad9ee27 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1144,7 +1144,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape ) typedef ShapeExport& (ShapeExport::*ShapeConverter)( Reference< XShape > ); typedef std::unordered_map< const char*, ShapeConverter, rtl::CStringHash, rtl::CStringEqual> NameToConvertMapType; -static const NameToConvertMapType& lcl_GetConverters(DrawingML::DocumentType eDocumentType) +static const NameToConvertMapType& lcl_GetConverters(DocumentType eDocumentType) { static bool shape_map_inited = false; static NameToConvertMapType shape_converters; @@ -1177,7 +1177,7 @@ static const NameToConvertMapType& lcl_GetConverters(DrawingML::DocumentType eDo shape_converters[ "com.sun.star.presentation.OutlinerShape" ] = &ShapeExport::WriteTextShape; shape_converters[ "com.sun.star.presentation.SlideNumberShape" ] = &ShapeExport::WriteTextShape; shape_converters[ "com.sun.star.presentation.TitleTextShape" ] = &ShapeExport::WriteTextShape; - if (eDocumentType == DrawingML::DOCUMENT_DOCX) + if (eDocumentType == DOCUMENT_DOCX) shape_converters[ "com.sun.star.drawing.GroupShape" ] = &ShapeExport::WriteGroupShape; shape_map_inited = true; diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 6e04a38a4f09..7c7d4d88b542 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -445,7 +445,7 @@ void XclExpImgData::SaveXml( XclExpXmlStream& rStrm ) { sax_fastparser::FSHelperPtr pWorksheet = rStrm.GetCurrentStream(); - DrawingML aDML( pWorksheet, &rStrm, DrawingML::DOCUMENT_XLSX ); + DrawingML aDML(pWorksheet, &rStrm, drawingml::DOCUMENT_XLSX); OUString rId = aDML.WriteImage( maGraphic ); pWorksheet->singleElement( XML_picture, FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( rId ).getStr(), @@ -1137,7 +1137,7 @@ void XclExpChartObj::SaveXml( XclExpXmlStream& rStrm ) { XclObjAny::WriteFromTo( rStrm, mxShape, GetTab() ); Reference< XModel > xModel( mxChartDoc, UNO_QUERY ); - ChartExport aChartExport( XML_xdr, pDrawing, xModel, &rStrm, DrawingML::DOCUMENT_XLSX ); + ChartExport aChartExport(XML_xdr, pDrawing, xModel, &rStrm, drawingml::DOCUMENT_XLSX); static sal_Int32 nChartCount = 0; nChartCount++; aChartExport.WriteChartObj( mxShape, nChartCount ); diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 5a76ae87ef27..8f5ac1491491 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -1164,7 +1164,7 @@ void XclObjAny::SaveXml( XclExpXmlStream& rStrm ) sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream(); - ShapeExport aDML( XML_xdr, pDrawing, nullptr, &rStrm, DrawingML::DOCUMENT_XLSX ); + ShapeExport aDML(XML_xdr, pDrawing, nullptr, &rStrm, drawingml::DOCUMENT_XLSX); std::shared_ptr<oox::drawingml::URLTransformer> pURLTransformer(new ScURLTransformer(*mpDoc)); aDML.SetURLTranslator(pURLTransformer); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 6382af4196c2..28f027bea3de 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -361,7 +361,7 @@ OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_In m_pFilter->openFragmentStreamWithSerializer( aFileName, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml" ); - oox::drawingml::ChartExport aChartExport( XML_w, pChartFS, xModel, m_pFilter, oox::drawingml::DrawingML::DOCUMENT_DOCX ); + oox::drawingml::ChartExport aChartExport(XML_w, pChartFS, xModel, m_pFilter, oox::drawingml::DOCUMENT_DOCX); aChartExport.ExportContent(); return OUStringToOString( sId, RTL_TEXTENCODING_UTF8 ); } @@ -422,7 +422,7 @@ void DocxExport::OutputDML(uno::Reference<drawing::XShape>& xShape) nNamespace = XML_wpg; else if (xServiceInfo->supportsService("com.sun.star.drawing.GraphicObjectShape")) nNamespace = XML_pic; - oox::drawingml::ShapeExport aExport(nNamespace, m_pAttrOutput->GetSerializer(), nullptr, m_pFilter, oox::drawingml::DrawingML::DOCUMENT_DOCX, m_pAttrOutput); + oox::drawingml::ShapeExport aExport(nNamespace, m_pAttrOutput->GetSerializer(), nullptr, m_pFilter, oox::drawingml::DOCUMENT_DOCX, m_pAttrOutput); aExport.WriteShape(xShape); } @@ -1450,7 +1450,7 @@ DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCur SetFS(m_pDocumentFS); // the DrawingML access - m_pDrawingML = new oox::drawingml::DrawingML( m_pDocumentFS, m_pFilter, oox::drawingml::DrawingML::DOCUMENT_DOCX ); + m_pDrawingML = new oox::drawingml::DrawingML(m_pDocumentFS, m_pFilter, oox::drawingml::DOCUMENT_DOCX); // the attribute output for the document m_pAttrOutput = new DocxAttributeOutput( *this, m_pDocumentFS, m_pDrawingML ); |