diff options
author | Martin Gallwey <mtg@openoffice.org> | 2001-03-22 14:30:20 +0000 |
---|---|---|
committer | Martin Gallwey <mtg@openoffice.org> | 2001-03-22 14:30:20 +0000 |
commit | e00f54efe6ccff158facb5e186603a8d42873456 (patch) | |
tree | 61f8d3b49e567c012711f0cd06e52f4a5a7265a2 | |
parent | 9634242f92de89761ce8090952ae157667f1f58f (diff) |
Export default styles using com.sun.star.text.Defaults service
-rw-r--r-- | xmloff/source/text/txtstyle.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx index eedd1b8a772c..6a97f22bb9b8 100644 --- a/xmloff/source/text/txtstyle.cxx +++ b/xmloff/source/text/txtstyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtstyle.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sab $ $Date: 2001-02-27 16:39:44 $ + * last change: $Author: mtg $ $Date: 2001-03-22 15:30:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -186,6 +186,19 @@ void XMLTextParagraphExport::exportNumStyles( sal_Bool bUsed ) void XMLTextParagraphExport::exportTextStyles( sal_Bool bUsed ) { + Reference < lang::XMultiServiceFactory > xFactory (GetExport().GetModel(), UNO_QUERY); + if (xFactory.is()) + { + Reference < XInterface > xInt = xFactory->createInstance ( + OUString( RTL_CONSTASCII_USTRINGPARAM ( + "com.sun.star.text.Defaults") ) ); + if ( xInt.is() ) + { + Reference < XPropertySet > xPropSet (xInt, UNO_QUERY); + if (xPropSet.is()) + exportDefaultStyle( xPropSet, sXML_text, GetParaPropMapper()); + } + } exportStyleFamily( "ParagraphStyles", sXML_paragraph, GetParaPropMapper(), bUsed, XML_STYLE_FAMILY_TEXT_PARAGRAPH, 0); exportStyleFamily( "CharacterStyles", sXML_text, GetTextPropMapper(), @@ -203,5 +216,3 @@ void XMLTextParagraphExport::exportTextStyles( sal_Bool bUsed ) aLineNumberingExport.Export(); } } - - |