[Libreoffice-commits] core.git: xmloff/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Apr 8 06:40:11 PDT 2015
xmloff/source/draw/shapeexport.cxx | 36 +++++++++++++++++++++++-------------
1 file changed, 23 insertions(+), 13 deletions(-)
New commits:
commit 204d1093d4954596cc7d7578e0630648f1f678f5
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 6 15:25:54 2015 +0200
only try to export text:p for elements that really support it
Change-Id: Ie2c072c67ecaa0c0ec45c804ebbd4b3bcd631a13
Reviewed-on: https://gerrit.libreoffice.org/15172
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 7e2b5d6..2d0506c 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -121,6 +121,27 @@ using namespace ::com::sun::star;
using namespace ::xmloff::EnhancedCustomShapeToken;
using namespace ::xmloff::token;
+namespace {
+
+bool supportsText(XmlShapeType eShapeType)
+{
+ return eShapeType != XmlShapeTypePresChartShape &&
+ eShapeType != XmlShapeTypePresOLE2Shape &&
+ eShapeType != XmlShapeTypeDrawSheetShape &&
+ eShapeType != XmlShapeTypePresSheetShape &&
+ eShapeType != XmlShapeTypeDraw3DSceneObject &&
+ eShapeType != XmlShapeTypeDraw3DCubeObject &&
+ eShapeType != XmlShapeTypeDraw3DSphereObject &&
+ eShapeType != XmlShapeTypeDraw3DLatheObject &&
+ eShapeType != XmlShapeTypeDraw3DExtrudeObject &&
+ eShapeType != XmlShapeTypeDrawPageShape &&
+ eShapeType != XmlShapeTypePresPageShape &&
+ eShapeType != XmlShapeTypeDrawGroupShape;
+
+}
+
+}
+
XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
SvXMLExportPropertyMapper *pExtMapper )
: mrExport( rExp ),
@@ -267,18 +288,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
// #i118485# enabled XmlShapeTypeDrawChartShape and XmlShapeTypeDrawOLE2Shape
// to have text
const bool bObjSupportsText =
- aShapeInfo.meShapeType != XmlShapeTypePresChartShape &&
- aShapeInfo.meShapeType != XmlShapeTypePresOLE2Shape &&
- aShapeInfo.meShapeType != XmlShapeTypeDrawSheetShape &&
- aShapeInfo.meShapeType != XmlShapeTypePresSheetShape &&
- aShapeInfo.meShapeType != XmlShapeTypeDraw3DSceneObject &&
- aShapeInfo.meShapeType != XmlShapeTypeDraw3DCubeObject &&
- aShapeInfo.meShapeType != XmlShapeTypeDraw3DSphereObject &&
- aShapeInfo.meShapeType != XmlShapeTypeDraw3DLatheObject &&
- aShapeInfo.meShapeType != XmlShapeTypeDraw3DExtrudeObject &&
- aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape &&
- aShapeInfo.meShapeType != XmlShapeTypePresPageShape &&
- aShapeInfo.meShapeType != XmlShapeTypeDrawGroupShape;
+ supportsText(aShapeInfo.meShapeType);
const bool bObjSupportsStyle =
aShapeInfo.meShapeType != XmlShapeTypeDrawGroupShape;
@@ -2790,7 +2800,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
if( !sClassId.isEmpty() )
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_CLASS_ID, sClassId );
- if(eShapeType != XmlShapeTypePresChartShape && eShapeType != XmlShapeTypeDrawChartShape)
+ if(supportsText(eShapeType))
{
// #i118485# Add text export, the draw OLE shape allows text now
// fdo#58571 chart objects don't allow text:p
More information about the Libreoffice-commits
mailing list