xref: /trunk/main/xmloff/source/draw/sdpropls.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1ecfe53c5SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3ecfe53c5SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4ecfe53c5SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5ecfe53c5SAndrew Rist  * distributed with this work for additional information
6ecfe53c5SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7ecfe53c5SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8ecfe53c5SAndrew Rist  * "License"); you may not use this file except in compliance
9ecfe53c5SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11ecfe53c5SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13ecfe53c5SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14ecfe53c5SAndrew Rist  * software distributed under the License is distributed on an
15ecfe53c5SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ecfe53c5SAndrew Rist  * KIND, either express or implied.  See the License for the
17ecfe53c5SAndrew Rist  * specific language governing permissions and limitations
18ecfe53c5SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20ecfe53c5SAndrew Rist  *************************************************************/
21ecfe53c5SAndrew Rist 
22cdf0e10cSrcweir #ifndef _SDPROPLS_HXX
23cdf0e10cSrcweir #define _SDPROPLS_HXX
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
26cdf0e10cSrcweir #include <xmloff/xmlnume.hxx>
27cdf0e10cSrcweir #include <xmloff/maptype.hxx>
28cdf0e10cSrcweir #include <xmloff/xmltypes.hxx>
29cdf0e10cSrcweir #include <xmloff/xmlement.hxx>
30cdf0e10cSrcweir #include <xmloff/prhdlfac.hxx>
31cdf0e10cSrcweir #include <xmloff/xmlprmap.hxx>
32cdf0e10cSrcweir #include "xmloff/XMLTextListAutoStylePool.hxx"
33cdf0e10cSrcweir #include <xmloff/xmlexppr.hxx>
34*56b35d86SArmin Le Grand #include <xmlsdtypes.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
37cdf0e10cSrcweir // entry list for graphic properties
38cdf0e10cSrcweir 
39cdf0e10cSrcweir extern const XMLPropertyMapEntry aXMLSDProperties[];
40cdf0e10cSrcweir 
41cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
42cdf0e10cSrcweir // entry list for presentation page properties
43cdf0e10cSrcweir 
44cdf0e10cSrcweir extern const XMLPropertyMapEntry aXMLSDPresPageProps[];
45cdf0e10cSrcweir extern const XMLPropertyMapEntry aXMLSDPresPageProps_onlyHeadersFooter[];
46cdf0e10cSrcweir 
47cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
48cdf0e10cSrcweir // enum maps for attributes
49cdf0e10cSrcweir 
50cdf0e10cSrcweir extern SvXMLEnumMapEntry aXML_ConnectionKind_EnumMap[];
51cdf0e10cSrcweir extern SvXMLEnumMapEntry aXML_CircleKind_EnumMap[];
52cdf0e10cSrcweir 
53cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
54cdf0e10cSrcweir 
55cdf0e10cSrcweir /** contains the attribute to property mapping for a drawing layer table */
56cdf0e10cSrcweir extern const XMLPropertyMapEntry aXMLTableShapeAttributes[];
57cdf0e10cSrcweir 
58cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
59cdf0e10cSrcweir // factory for own graphic properties
60cdf0e10cSrcweir 
61cdf0e10cSrcweir class SvXMLExport;
62cdf0e10cSrcweir class SvXMLImport;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir class XMLSdPropHdlFactory : public XMLPropertyHandlerFactory
65cdf0e10cSrcweir {
66cdf0e10cSrcweir private:
67cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
68cdf0e10cSrcweir     SvXMLExport* mpExport;
69cdf0e10cSrcweir     SvXMLImport* mpImport;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir public:
72cdf0e10cSrcweir     XMLSdPropHdlFactory( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >, SvXMLExport& rExport );
73cdf0e10cSrcweir     XMLSdPropHdlFactory( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >, SvXMLImport& rImport );
74cdf0e10cSrcweir     virtual ~XMLSdPropHdlFactory();
75cdf0e10cSrcweir     virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
76cdf0e10cSrcweir };
77cdf0e10cSrcweir 
78cdf0e10cSrcweir class XMLShapePropertySetMapper : public XMLPropertySetMapper
79cdf0e10cSrcweir {
80cdf0e10cSrcweir public:
81cdf0e10cSrcweir     XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef);
82cdf0e10cSrcweir     XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, sal_uInt16 nOffset);
83cdf0e10cSrcweir     ~XMLShapePropertySetMapper();
84cdf0e10cSrcweir };
85cdf0e10cSrcweir 
86cdf0e10cSrcweir class XMLShapeExportPropertyMapper : public SvXMLExportPropertyMapper
87cdf0e10cSrcweir {
88cdf0e10cSrcweir private:
89cdf0e10cSrcweir     XMLTextListAutoStylePool *mpListAutoPool;
90cdf0e10cSrcweir     SvXMLExport& mrExport;
91cdf0e10cSrcweir     SvxXMLNumRuleExport maNumRuleExp;
92cdf0e10cSrcweir     sal_Bool mbIsInAutoStyles;
93cdf0e10cSrcweir 
94cdf0e10cSrcweir     const rtl::OUString msCDATA;
95cdf0e10cSrcweir     const rtl::OUString msTrue;
96cdf0e10cSrcweir     const rtl::OUString msFalse;
97cdf0e10cSrcweir 
98cdf0e10cSrcweir protected:
99cdf0e10cSrcweir     virtual void ContextFilter(
100cdf0e10cSrcweir         ::std::vector< XMLPropertyState >& rProperties,
101cdf0e10cSrcweir         ::com::sun::star::uno::Reference<
102cdf0e10cSrcweir             ::com::sun::star::beans::XPropertySet > rPropSet ) const;
103cdf0e10cSrcweir public:
104cdf0e10cSrcweir     XMLShapeExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, XMLTextListAutoStylePool *pListAutoPool, SvXMLExport& rExport );
105cdf0e10cSrcweir     virtual ~XMLShapeExportPropertyMapper();
106cdf0e10cSrcweir 
107cdf0e10cSrcweir     virtual void        handleElementItem(
108cdf0e10cSrcweir                             SvXMLExport& rExport,
109cdf0e10cSrcweir                             const XMLPropertyState& rProperty,
110cdf0e10cSrcweir                             sal_uInt16 nFlags,
111cdf0e10cSrcweir                             const ::std::vector< XMLPropertyState >* pProperties = 0,
112cdf0e10cSrcweir                             sal_uInt32 nIdx = 0
113cdf0e10cSrcweir                             ) const;
114cdf0e10cSrcweir 
SetAutoStyles(sal_Bool bIsInAutoStyles)115cdf0e10cSrcweir     void SetAutoStyles( sal_Bool bIsInAutoStyles ) { mbIsInAutoStyles = bIsInAutoStyles; }
116cdf0e10cSrcweir 
117cdf0e10cSrcweir     virtual void handleSpecialItem(
118cdf0e10cSrcweir             SvXMLAttributeList& rAttrList,
119cdf0e10cSrcweir             const XMLPropertyState& rProperty,
120cdf0e10cSrcweir             const SvXMLUnitConverter& rUnitConverter,
121cdf0e10cSrcweir             const SvXMLNamespaceMap& rNamespaceMap,
122cdf0e10cSrcweir             const ::std::vector< XMLPropertyState > *pProperties = 0,
123cdf0e10cSrcweir             sal_uInt32 nIdx = 0 ) const;
124cdf0e10cSrcweir };
125cdf0e10cSrcweir 
126cdf0e10cSrcweir class XMLPagePropertySetMapper : public XMLPropertySetMapper
127cdf0e10cSrcweir {
128cdf0e10cSrcweir public:
129cdf0e10cSrcweir     XMLPagePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef);
130cdf0e10cSrcweir     ~XMLPagePropertySetMapper();
131cdf0e10cSrcweir };
132cdf0e10cSrcweir 
133cdf0e10cSrcweir class XMLPageExportPropertyMapper : public SvXMLExportPropertyMapper
134cdf0e10cSrcweir {
135cdf0e10cSrcweir private:
136cdf0e10cSrcweir     SvXMLExport& mrExport;
137cdf0e10cSrcweir 
138cdf0e10cSrcweir     const rtl::OUString msCDATA;
139cdf0e10cSrcweir     const rtl::OUString msTrue;
140cdf0e10cSrcweir     const rtl::OUString msFalse;
141cdf0e10cSrcweir 
142cdf0e10cSrcweir protected:
143cdf0e10cSrcweir     virtual void ContextFilter(
144cdf0e10cSrcweir         ::std::vector< XMLPropertyState >& rProperties,
145cdf0e10cSrcweir         ::com::sun::star::uno::Reference<
146cdf0e10cSrcweir             ::com::sun::star::beans::XPropertySet > rPropSet ) const;
147cdf0e10cSrcweir public:
148cdf0e10cSrcweir     XMLPageExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport );
149cdf0e10cSrcweir     virtual ~XMLPageExportPropertyMapper();
150cdf0e10cSrcweir 
151cdf0e10cSrcweir     virtual void        handleElementItem(
152cdf0e10cSrcweir                             SvXMLExport& rExport,
153cdf0e10cSrcweir                             const XMLPropertyState& rProperty,
154cdf0e10cSrcweir                             sal_uInt16 nFlags,
155cdf0e10cSrcweir                             const ::std::vector< XMLPropertyState >* pProperties = 0,
156cdf0e10cSrcweir                             sal_uInt32 nIdx = 0
157cdf0e10cSrcweir                             ) const;
158cdf0e10cSrcweir };
159cdf0e10cSrcweir 
160cdf0e10cSrcweir #endif  //  _SDPROPLS_HXX
161