1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OOo2Oasis.hxx,v $
10 * $Revision: 1.6.56.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XMLOFF_OOO2OASIS_HXX
32 #define _XMLOFF_OOO2OASIS_HXX
34 #include <com/sun/star/document/XImporter.hpp>
35 #include <com/sun/star/document/XFilter.hpp>
36 #include "ActionMapTypesOOo.hxx"
37 #ifndef _XMLOFF_TRANSFORMERBASE_HXX_
38 #include "TransformerBase.hxx"
41 class XMLTransformerOOoEventMap_Impl
;
43 class OOo2OasisTransformer
:
44 public XMLTransformerBase
,
45 public ::com::sun::star::document::XImporter
,
46 public ::com::sun::star::document::XFilter
48 ::rtl::OUString m_aImplName
;
49 ::rtl::OUString m_aSubServiceName
;
51 XMLTransformerActions
*m_aActions
[MAX_OOO_ACTIONS
];
52 XMLTransformerOOoEventMap_Impl
*m_pEventMap
;
55 virtual XMLTransformerContext
*CreateUserDefinedContext(
56 const TransformerAction_Impl
& rAction
,
57 const ::rtl::OUString
& rQName
,
58 sal_Bool bPersistent
=sal_False
);
60 virtual XMLTransformerActions
*GetUserDefinedActions( sal_uInt16 n
);
63 OOo2OasisTransformer( const sal_Char
*pImplName
=0,
64 const sal_Char
*pSubServiceName
=0 ) throw();
65 virtual ~OOo2OasisTransformer() throw();
67 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId() throw();
71 // (XInterface methods need to be implemented to disambigouate
72 // between those inherited through XMLTransformerBase and
73 // the new interfaces).
75 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
76 const ::com::sun::star::uno::Type
& aType
)
77 throw (::com::sun::star::uno::RuntimeException
);
79 virtual void SAL_CALL
acquire( ) throw ()
80 { XMLTransformerBase::acquire(); };
82 virtual void SAL_CALL
release( ) throw ()
83 { XMLTransformerBase::release(); };
86 virtual void SAL_CALL
initialize( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aArguments
) throw(::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
);
90 virtual ::rtl::OUString SAL_CALL
getImplementationName( ) throw(::com::sun::star::uno::RuntimeException
);
91 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
) throw(::com::sun::star::uno::RuntimeException
);
92 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException
);
95 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
98 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
101 virtual void SAL_CALL
setTargetDocument( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& xDoc
) throw(::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
104 virtual sal_Bool SAL_CALL
filter( const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& aDescriptor
) throw (::com::sun::star::uno::RuntimeException
);
105 virtual void SAL_CALL
cancel( ) throw (::com::sun::star::uno::RuntimeException
);
107 void SAL_CALL
Initialize( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aArguments
) throw(::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
);
109 // ::com::sun::star::xml::sax::XDocumentHandler
110 virtual void SAL_CALL
startDocument(void)
111 throw( ::com::sun::star::xml::sax::SAXException
, ::com::sun::star::uno::RuntimeException
);
113 virtual ::rtl::OUString
GetEventName( const ::rtl::OUString
& rName
,
114 sal_Bool bForm
= sal_False
);
117 #endif // _XMLOFF_TRANSFORMER_BASE_HXX