Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _XMLOFF_STYLEEXP_HXX_
29 : : #define _XMLOFF_STYLEEXP_HXX_
30 : :
31 : : #include "sal/config.h"
32 : : #include "xmloff/dllapi.h"
33 : : #include <rtl/ustring.hxx>
34 : : #include <com/sun/star/uno/Reference.h>
35 : :
36 : : #include <xmloff/uniref.hxx>
37 : :
38 : : namespace com { namespace sun { namespace star
39 : : {
40 : : namespace style
41 : : {
42 : : class XStyle;
43 : : }
44 : : namespace beans
45 : : {
46 : : class XPropertySet;
47 : : }
48 : : namespace container
49 : : {
50 : : class XNameAccess;
51 : : }
52 : :
53 : : } } }
54 : :
55 : : class XMLPropertySetMapper;
56 : : class SvXMLExportPropertyMapper;
57 : : class SvXMLAutoStylePoolP;
58 : : class SvXMLExport;
59 : :
60 : : class XMLOFF_DLLPUBLIC XMLStyleExport : public UniRefBase
61 : : {
62 : : SvXMLExport& rExport;
63 : : protected:
64 : : const ::rtl::OUString sIsPhysical;
65 : : const ::rtl::OUString sIsAutoUpdate;
66 : : const ::rtl::OUString sFollowStyle;
67 : : const ::rtl::OUString sNumberingStyleName;
68 : : const ::rtl::OUString sOutlineLevel;
69 : :
70 : 8 : SvXMLExport& GetExport() { return rExport; }
71 : : const SvXMLExport& GetExport() const { return rExport; }
72 : :
73 : : private:
74 : :
75 : : const ::rtl::OUString sPoolStyleName;
76 : :
77 : : SvXMLAutoStylePoolP *pAutoStylePool;
78 : :
79 : : protected:
80 : :
81 : : virtual sal_Bool exportStyle(
82 : : const ::com::sun::star::uno::Reference<
83 : : ::com::sun::star::style::XStyle > & rStyle,
84 : : const ::rtl::OUString& rXMLFamily,
85 : : const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
86 : : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xStyles,
87 : : const ::rtl::OUString* pPrefix = 0L );
88 : :
89 : : virtual void exportStyleAttributes(
90 : : const ::com::sun::star::uno::Reference<
91 : : ::com::sun::star::style::XStyle > & rStyle );
92 : :
93 : : virtual void exportStyleContent(
94 : : const ::com::sun::star::uno::Reference<
95 : : ::com::sun::star::style::XStyle > & rStyle );
96 : : public:
97 : : XMLStyleExport(
98 : : SvXMLExport& rExp,
99 : : const ::rtl::OUString& rPoolStyleName,
100 : : SvXMLAutoStylePoolP *pAutoStyleP=0 );
101 : : virtual ~XMLStyleExport();
102 : :
103 : : // void exportStyleFamily(
104 : : // const ::rtl::OUString& rFamily, const ::rtl::OUString& rXMLFamily,
105 : : // const UniReference < XMLPropertySetMapper >& rPropMapper,
106 : : // sal_Bool bUsed, sal_uInt16 nFamily = 0,
107 : : // const ::rtl::OUString* pPrefix = 0L);
108 : :
109 : : // void exportStyleFamily(
110 : : // const sal_Char *pFamily, const ::rtl::OUString& rXMLFamily,
111 : : // const UniReference < XMLPropertySetMapper >& rPropMapper,
112 : : // sal_Bool bUsed, sal_uInt16 nFamily = 0,
113 : : // const ::rtl::OUString* pPrefix = 0L);
114 : :
115 : : virtual sal_Bool exportDefaultStyle(
116 : : const ::com::sun::star::uno::Reference<
117 : : ::com::sun::star::beans::XPropertySet > & xPropSet,
118 : : const ::rtl::OUString& rXMLFamily,
119 : : const UniReference < SvXMLExportPropertyMapper >& rPropMapper );
120 : :
121 : : void exportStyleFamily(
122 : : const ::rtl::OUString& rFamily, const ::rtl::OUString& rXMLFamily,
123 : : const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
124 : : sal_Bool bUsed, sal_uInt16 nFamily = 0,
125 : : const ::rtl::OUString* pPrefix = 0L);
126 : :
127 : : void exportStyleFamily(
128 : : const sal_Char *pFamily, const ::rtl::OUString& rXMLFamily,
129 : : const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
130 : : sal_Bool bUsed, sal_uInt16 nFamily = 0,
131 : : const ::rtl::OUString* pPrefix = 0L);
132 : : };
133 : :
134 : : #endif
135 : :
136 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|