diff options
author | Michael Brauer <mib@openoffice.org> | 2001-04-04 13:56:07 +0000 |
---|---|---|
committer | Michael Brauer <mib@openoffice.org> | 2001-04-04 13:56:07 +0000 |
commit | 21f93d6816a0ecc82a679908deba968990de44e2 (patch) | |
tree | 0fa580e6e139fb357f9aa7eee74d3cf1dffffc93 /sw | |
parent | ed125415ede114fd6325954bb76a89fd9ad60637 (diff) |
#85733#: drawing defaults
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/xml/xmlfmt.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlfmte.cxx | 22 |
2 files changed, 28 insertions, 8 deletions
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 4847ba092dfb..491d252a4802 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlfmt.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: mib $ $Date: 2001-03-09 07:19:47 $ + * last change: $Author: mib $ $Date: 2001-04-04 14:56:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -155,6 +155,9 @@ #ifndef _XMLOFF_XMLTEXTSHAPESTYLECONTEXT_HXX #include <xmloff/XMLTextShapeStyleContext.hxx> #endif +#ifndef _XMLOFF_XMLGRAPHICSDEFAULTSTYLE_HXX +#include <xmloff/XMLGraphicsDefaultStyle.hxx> +#endif #ifndef _NUMRULE_HXX #include <numrule.hxx> @@ -945,10 +948,9 @@ SvXMLStyleContext *SwXMLStylesContext_Impl::CreateDefaultStyleStyleChildContext( sal_True ); break; case XML_STYLE_FAMILY_SD_GRAPHICS_ID: - // As long as there are no element items, we can use the text - // style class. - pStyle = new XMLTextStyleContext( GetImport(), nPrefix, - rLocalName, xAttrList, *this, nFamily, sal_True ); + // There are no writer specific defaults for graphic styles! + pStyle = new XMLGraphicsDefaultStyle( GetImport(), nPrefix, + rLocalName, xAttrList, *this ); break; default: pStyle = SvXMLStylesContext::CreateDefaultStyleStyleChildContext( nFamily, diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index a5cf76b5a775..9f97884456dd 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlfmte.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: dvo $ $Date: 2001-03-27 09:37:50 $ + * last change: $Author: mib $ $Date: 2001-04-04 14:56:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -129,6 +129,9 @@ #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> #endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif #ifndef _XMLEXP_HXX #include "xmlexp.hxx" @@ -139,6 +142,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; using namespace ::com::sun::star::drawing; +using namespace ::com::sun::star::lang; void SwXMLExport::ExportFmt( const SwFmt& rFmt, const char *pFamily ) { @@ -237,6 +241,20 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, const char *pFamily ) void SwXMLExport::_ExportStyles( sal_Bool bUsed ) { SvXMLExport::_ExportStyles( bUsed ); + Reference < XMultiServiceFactory > xFactory (GetModel(), UNO_QUERY); + if (xFactory.is()) + { + OUString sDrawingDefaults ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.drawing.Defaults" ) ); + Reference < XInterface > xInt = xFactory->createInstance ( sDrawingDefaults ); + if ( xInt.is() ) + { + Reference < XPropertySet > xPropSet (xInt, UNO_QUERY); + if (xPropSet.is()) + GetTextParagraphExport()->exportDefaultStyle( + xPropSet, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, + GetShapeExport()->CreateShapePropMapper(*this)); + } + } GetTextParagraphExport()->exportTextStyles( bUsed ); } |