diff options
author | Christian Lippka <cl@openoffice.org> | 2001-09-28 13:31:58 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-09-28 13:31:58 +0000 |
commit | 040fcc3e658650935b22cc6c5889ea528c0e2ece (patch) | |
tree | 7394e21b279dd64270bcdfbdc62eeac701a79481 /xmloff | |
parent | d67ddded9092d6947a563a8b82148c2165452fd6 (diff) |
#86794# new service for drawing layer clipboard export
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 53 |
1 files changed, 41 insertions, 12 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index c9b4c4927a73..e0620658d033 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdxmlexp.cxx,v $ * - * $Revision: 1.73 $ + * $Revision: 1.74 $ * - * last change: $Author: bm $ $Date: 2001-09-14 11:22:00 $ + * last change: $Author: cl $ $Date: 2001-09-28 14:31:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,6 +85,10 @@ #include "xmlmetae.hxx" #endif +#ifndef _COM_SUN_STAR_LANG_SERVICENOTREGISTEREDEXCEPTION_HPP_ +#include <com/sun/star/lang/ServiceNotRegisteredException.hpp> +#endif + #ifndef _COM_SUN_STAR_PRESENTATION_XPRESENTATIONSUPPLIER_HPP_ #include <com/sun/star/presentation/XPresentationSupplier.hpp> #endif @@ -851,17 +855,23 @@ void SdXMLExport::ImpWriteObjGraphicStyleInfos() // write graphic family default style uno::Reference< lang::XMultiServiceFactory > xFact( GetModel(), uno::UNO_QUERY ); - if( !xFact.is() ) - return; - - uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults") ) ), uno::UNO_QUERY ); - if( !xDefaults.is() ) - return; - - aStEx.exportDefaultStyle( xDefaults, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef ); + if( xFact.is() ) + { + try + { + uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults") ) ), uno::UNO_QUERY ); + if( xDefaults.is() ) + { + aStEx.exportDefaultStyle( xDefaults, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef ); - // write graphic family styles - aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef, FALSE, XML_STYLE_FAMILY_SD_GRAPHICS_ID); + // write graphic family styles + aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef, FALSE, XML_STYLE_FAMILY_SD_GRAPHICS_ID); + } + } + catch( lang::ServiceNotRegisteredException& ) + { + } + } } ////////////////////////////////////////////////////////////////////////////// @@ -2436,6 +2446,25 @@ uno::Reference< uno::XInterface > SAL_CALL SdDrawXMLExport_createInstance(const ////////////////////////////////////////////////////////////////////////////// +uno::Sequence< OUString > SAL_CALL DrawingLayerXMLExport_getSupportedServiceNames() throw() +{ + const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.DrawingLayer.XMLExporter" ) ); + const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + return aSeq; +} + +OUString SAL_CALL DrawingLayerXMLExport_getImplementationName() throw() +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "DrawingLayerXMLExport" ) ); +} + +uno::Reference< uno::XInterface > SAL_CALL DrawingLayerXMLExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception ) +{ + return (cppu::OWeakObject*)new SdXMLExport( sal_True, EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_FONTDECLS|EXPORT_EMBEDDED ); +} + +////////////////////////////////////////////////////////////////////////////// + uno::Sequence< OUString > SAL_CALL SdImpressXMLExport_Style_getSupportedServiceNames() throw() { const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Impress.XMLStylesExporter" ) ); |