#97452# +CreateStylesContext for creating and registering the styles context

This commit is contained in:
Björn Milcke 2002-02-11 08:54:28 +00:00
parent 2894663127
commit 381bc7f7c3
2 changed files with 21 additions and 5 deletions

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: SchXMLImport.hxx,v $ * $RCSfile: SchXMLImport.hxx,v $
* *
* $Revision: 1.17 $ * $Revision: 1.18 $
* *
* last change: $Author: bm $ $Date: 2001-12-17 10:22:10 $ * last change: $Author: bm $ $Date: 2002-02-11 09:54:08 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@ -216,6 +216,9 @@ public:
// XServiceInfo ( : SvXMLExport ) // XServiceInfo ( : SvXMLExport )
virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
SvXMLImportContext* CreateStylesContext( const ::rtl::OUString& rLocalName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
}; };
#endif // SCH_XMLIMPORT_HXX_ #endif // SCH_XMLIMPORT_HXX_

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: SchXMLImport.cxx,v $ * $RCSfile: SchXMLImport.cxx,v $
* *
* $Revision: 1.25 $ * $Revision: 1.26 $
* *
* last change: $Author: bm $ $Date: 2001-12-17 10:22:10 $ * last change: $Author: bm $ $Date: 2002-02-11 09:54:28 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@ -581,6 +581,20 @@ SvXMLImportContext *SchXMLImport::CreateContext( USHORT nPrefix, const rtl::OUSt
return pContext; return pContext;
} }
SvXMLImportContext* SchXMLImport::CreateStylesContext(
const ::rtl::OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList )
{
SvXMLStylesContext* pStylesCtxt =
new SvXMLStylesContext( *(this), XML_NAMESPACE_OFFICE, rLocalName, xAttrList );
// set context at base class, so that all auto-style classes are imported
SetAutoStyles( pStylesCtxt );
maImportHelper.SetAutoStylesContext( pStylesCtxt );
return pStylesCtxt;
}
// export components ======================================== // export components ========================================
// first version: everything comes from one storage // first version: everything comes from one storage
@ -661,7 +675,6 @@ uno::Reference< uno::XInterface > SAL_CALL SchXMLImport_Meta_createInstance(cons
return (cppu::OWeakObject*)new SchXMLImport( IMPORT_META ); return (cppu::OWeakObject*)new SchXMLImport( IMPORT_META );
} }
// XServiceInfo // XServiceInfo
OUString SAL_CALL SchXMLImport::getImplementationName() throw( uno::RuntimeException ) OUString SAL_CALL SchXMLImport::getImplementationName() throw( uno::RuntimeException )
{ {