diff options
author | Martin Gallwey <mtg@openoffice.org> | 2001-03-23 08:56:06 +0000 |
---|---|---|
committer | Martin Gallwey <mtg@openoffice.org> | 2001-03-23 08:56:06 +0000 |
commit | 7fd0caf4b08e0f5037ccba8f36c2a56cc3008ff1 (patch) | |
tree | 3d279928ae4ff6e26f0139fa338232bdb008dff5 /xmloff | |
parent | 1c1c5c62edf0b2afb5dfd605110cad457b24b6db (diff) |
add SetDefaults
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtstyli.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 259e2a073fb6..abbf81a5b44c 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtstyli.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: dvo $ $Date: 2001-03-20 11:33:56 $ + * last change: $Author: mtg $ $Date: 2001-03-23 09:56:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,6 +68,10 @@ #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ #include <com/sun/star/container/XNameContainer.hpp> #endif + +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif #ifndef _COM_SUN_STAR_STYLE_PARAGRAPHSTYLECATEGORY_HPP_ #include <com/sun/star/style/ParagraphStyleCategory.hpp> #endif @@ -121,6 +125,7 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::style; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; //using namespace ::com::sun::star::text; @@ -272,6 +277,21 @@ void XMLTextStyleContext::CreateAndInsert( sal_Bool bOverwrite ) } } +void XMLTextStyleContext::SetDefaults( ) +{ + if (GetFamily() == XML_STYLE_FAMILY_TEXT_PARAGRAPH ) + { + Reference < XMultiServiceFactory > xFactory ( GetImport().GetModel(), UNO_QUERY); + if (xFactory.is()) + { + Reference < XInterface > xInt = xFactory->createInstance ( + OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.Defaults" ) ) ); + Reference < XPropertySet > xProperties ( xInt, UNO_QUERY ); + if ( xProperties.is() ) + FillPropertySet ( xProperties ); + } + } +} void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) { XMLPropStyleContext::Finish( bOverwrite ); |