1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _XMLFILTERCOMMON_HXX_
20 #define _XMLFILTERCOMMON_HXX_
22 #include <com/sun/star/lang/XComponent.hpp>
23 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
24 #include <com/sun/star/container/XHierarchicalName.hpp>
25 #include <com/sun/star/container/XNameContainer.hpp>
26 #include <com/sun/star/io/XInputStream.hpp>
27 #include <com/sun/star/io/XOutputStream.hpp>
31 // --------------------------------------------------------------------
33 extern OUString
string_encode( const OUString
& rText
);
34 extern OUString
string_decode( const OUString
& rText
);
36 // --------------------------------------------------------------------
38 extern bool isFileURL( const OUString
& rURL
);
40 // --------------------------------------------------------------------
42 bool copyStreams( ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
> xIS
, ::com::sun::star::uno::Reference
< ::com::sun::star::io::XOutputStream
> xOS
);
43 bool createDirectory( OUString
& rURL
);
45 // --------------------------------------------------------------------
47 class filter_info_impl
50 OUString maFilterName
;
52 OUString maDocumentService
;
53 OUString maFilterService
;
54 OUString maInterfaceName
;
57 OUString maExportXSLT
;
58 OUString maImportXSLT
;
59 OUString maImportTemplate
;
61 OUString maImportService
;
62 OUString maExportService
;
65 sal_Int32 maFileFormatVersion
;
66 sal_Int32 mnDocumentIconID
;
70 sal_Bool mbNeedsXSLT2
;
73 filter_info_impl( const filter_info_impl
& rInfo
);
74 int operator==( const filter_info_impl
& ) const;
76 com::sun::star::uno::Sequence
< OUString
> getFilterUserData() const;
79 // --------------------------------------------------------------------
81 struct application_info_impl
83 OUString maDocumentService
;
84 OUString maDocumentUIName
;
85 OUString maXMLImporter
;
86 OUString maXMLExporter
;
88 application_info_impl( const sal_Char
* pDocumentService
, ResId
& rUINameRes
, const sal_Char
* mpXMLImporter
, const sal_Char
* mpXMLExporter
);
91 // --------------------------------------------------------------------
93 extern std::vector
< application_info_impl
* >& getApplicationInfos();
94 extern OUString
getApplicationUIName( const OUString
& rServiceName
);
95 extern const application_info_impl
* getApplicationInfo( const OUString
& rServiceName
);
97 extern ResMgr
* getXSLTDialogResMgr();
99 #define RESID(x) ResId(x, *getXSLTDialogResMgr())
100 #define RESIDSTR(x) RESID(x).toString()
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */