Added new class EnhancedShapeDumper handled in XShapeDumper
Change-Id: Ie719eba2579998917cea030fad51f07b0bcacec4
This commit is contained in:
parent
d96a9a2b6c
commit
e0881b2f89
6 changed files with 102 additions and 2 deletions
|
@ -177,6 +177,7 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
|
||||||
drawinglayer/source/texture/texture3d \
|
drawinglayer/source/texture/texture3d \
|
||||||
drawinglayer/source/texture/texture \
|
drawinglayer/source/texture/texture \
|
||||||
drawinglayer/source/dumper/XShapeDumper \
|
drawinglayer/source/dumper/XShapeDumper \
|
||||||
|
drawinglayer/source/dumper/EnhancedShapeDumper \
|
||||||
))
|
))
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
|
|
@ -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/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/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/XShapeDumper.hxx))
|
||||||
|
$(eval $(call gb_Package_add_file,drawinglayer_inc,inc/drawinglayer/XShapeDumper.hxx,drawinglayer/EnhancedShapeDumper.hxx))
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
|
49
drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
Normal file
49
drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
Normal file
|
@ -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 <artur.dorda+libo@gmail.com> (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 <libxml/xmlwriter.h>
|
||||||
|
#include <drawinglayer/drawinglayerdllapi.h>
|
||||||
|
|
||||||
|
#ifndef EnhancedShapeDumper_hxx
|
||||||
|
#define EnhancedShapeDumper_hxx
|
||||||
|
|
||||||
|
class DRAWINGLAYER_DLLPUBLIC EnhancedShapeDumper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EnhancedShapeDumper(xmlTextWriterPtr writer)
|
||||||
|
:
|
||||||
|
xmlWriter(writer)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
xmlTextWriterPtr xmlWriter;
|
||||||
|
};
|
||||||
|
#endif
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
#include <libxml/xmlwriter.h>
|
#include <libxml/xmlwriter.h>
|
||||||
#include <drawinglayer/drawinglayerdllapi.h>
|
#include <drawinglayer/drawinglayerdllapi.h>
|
||||||
|
#include <drawinglayer/EnhancedShapeDumper.hxx>
|
||||||
|
|
||||||
#include <com/sun/star/drawing/XShapes.hpp>
|
#include <com/sun/star/drawing/XShapes.hpp>
|
||||||
#include <com/sun/star/drawing/XShape.hpp>
|
#include <com/sun/star/drawing/XShape.hpp>
|
||||||
#include <com/sun/star/drawing/FillStyle.hpp>
|
#include <com/sun/star/drawing/FillStyle.hpp>
|
||||||
|
@ -57,8 +59,8 @@
|
||||||
|
|
||||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||||
|
|
||||||
#ifndef ChartViewDumper_hxx
|
#ifndef XShapeDumper_hxx
|
||||||
#define ChartViewDumper_hxx
|
#define XShapeDumper_hxx
|
||||||
|
|
||||||
class DRAWINGLAYER_DLLPUBLIC XShapeDumper
|
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 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 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 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
|
#endif
|
||||||
|
|
33
drawinglayer/source/dumper/EnhancedShapeDumper.cxx
Normal file
33
drawinglayer/source/dumper/EnhancedShapeDumper.cxx
Normal file
|
@ -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 <artur.dorda+libo@gmail.com> (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 <drawinglayer/EnhancedShapeDumper.hxx>
|
||||||
|
#include <rtl/strbuf.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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)
|
void XShapeDumper::dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter)
|
||||||
{
|
{
|
||||||
xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) );
|
xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) );
|
||||||
|
@ -1677,6 +1682,14 @@ namespace {
|
||||||
if(xServiceInfo->supportsService("com.sun.star.drawing.CustomShape"))
|
if(xServiceInfo->supportsService("com.sun.star.drawing.CustomShape"))
|
||||||
dumpCustomShapeService(xPropSet, xmlWriter);
|
dumpCustomShapeService(xPropSet, xmlWriter);
|
||||||
|
|
||||||
|
// EnhancedShapeDumper used
|
||||||
|
|
||||||
|
if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeExtrusion"))
|
||||||
|
{
|
||||||
|
EnhancedShapeDumper enhancedDumper(xmlWriter);
|
||||||
|
dumpEnhancedCustomShapeExtrusionService(xPropSet, enhancedDumper);
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG_DUMPER
|
#if DEBUG_DUMPER
|
||||||
sal_Int32 nServices = aServiceNames.getLength();
|
sal_Int32 nServices = aServiceNames.getLength();
|
||||||
for (sal_Int32 i = 0; i < nServices; ++i)
|
for (sal_Int32 i = 0; i < nServices; ++i)
|
||||||
|
|
Loading…
Reference in a new issue