From e0881b2f8916530a18c637bb16d5cdf993f7b5d4 Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Tue, 26 Jun 2012 19:07:12 +0200 Subject: Added new class EnhancedShapeDumper handled in XShapeDumper Change-Id: Ie719eba2579998917cea030fad51f07b0bcacec4 --- drawinglayer/Library_drawinglayer.mk | 1 + drawinglayer/Package_inc.mk | 1 + .../inc/drawinglayer/EnhancedShapeDumper.hxx | 49 ++++++++++++++++++++++ drawinglayer/inc/drawinglayer/XShapeDumper.hxx | 7 +++- drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 33 +++++++++++++++ drawinglayer/source/dumper/XShapeDumper.cxx | 13 ++++++ 6 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx create mode 100644 drawinglayer/source/dumper/EnhancedShapeDumper.cxx (limited to 'drawinglayer') diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index 202211858278..146c38b98348 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -177,6 +177,7 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/texture/texture3d \ drawinglayer/source/texture/texture \ drawinglayer/source/dumper/XShapeDumper \ + drawinglayer/source/dumper/EnhancedShapeDumper \ )) # vim: set noet sw=4 ts=4: diff --git a/drawinglayer/Package_inc.mk b/drawinglayer/Package_inc.mk index 7d41e6c2b5d8..585a027735f5 100644 --- a/drawinglayer/Package_inc.mk +++ b/drawinglayer/Package_inc.mk @@ -138,5 +138,6 @@ $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/processor3d/ $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/texture/texture3d.hxx,drawinglayer/texture/texture3d.hxx)) $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/texture/texture.hxx,drawinglayer/texture/texture.hxx)) $(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/XShapeDumper.hxx,drawinglayer/XShapeDumper.hxx)) +$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/XShapeDumper.hxx,drawinglayer/EnhancedShapeDumper.hxx)) # vim: set noet sw=4 ts=4: diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx new file mode 100644 index 000000000000..71b0fde3600f --- /dev/null +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2012 Artur Dorda (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include +#include + +#ifndef EnhancedShapeDumper_hxx +#define EnhancedShapeDumper_hxx + +class DRAWINGLAYER_DLLPUBLIC EnhancedShapeDumper +{ +public: + EnhancedShapeDumper(xmlTextWriterPtr writer) + : + xmlWriter(writer) + { + + } + + +private: + xmlTextWriterPtr xmlWriter; +}; +#endif diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx index f497e0a6b8de..544636e69d32 100644 --- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx @@ -28,6 +28,8 @@ #include #include +#include + #include #include #include @@ -57,8 +59,8 @@ #include -#ifndef ChartViewDumper_hxx -#define ChartViewDumper_hxx +#ifndef XShapeDumper_hxx +#define XShapeDumper_hxx class DRAWINGLAYER_DLLPUBLIC XShapeDumper { @@ -193,6 +195,7 @@ private: void dumpShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); void dumpPolyPolygonBezierDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); void dumpCustomShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); + void dumpEnhancedCustomShapeExtrusionService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, EnhancedShapeDumper enhancedDumper); }; #endif diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx new file mode 100644 index 000000000000..f68d3206dd62 --- /dev/null +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2012 Artur Dorda (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include +#include + + + diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index 7ed19c045b0a..990e033b85a6 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -1618,6 +1618,11 @@ namespace { } } + void XShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference< beans::XPropertySet > xPropSet, EnhancedShapeDumper enhancedDumper) + { + + } + void XShapeDumper::dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter) { xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) ); @@ -1677,6 +1682,14 @@ namespace { if(xServiceInfo->supportsService("com.sun.star.drawing.CustomShape")) dumpCustomShapeService(xPropSet, xmlWriter); + // EnhancedShapeDumper used + + if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeExtrusion")) + { + EnhancedShapeDumper enhancedDumper(xmlWriter); + dumpEnhancedCustomShapeExtrusionService(xPropSet, enhancedDumper); + } + #if DEBUG_DUMPER sal_Int32 nServices = aServiceNames.getLength(); for (sal_Int32 i = 0; i < nServices; ++i) -- cgit