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 : :
29 : : #ifndef _SDASITM_HXX
30 : : #define _SDASITM_HXX
31 : :
32 : : #include <svx/svddef.hxx>
33 : : #include <svx/sdooitm.hxx>
34 : : #include <svl/stritem.hxx>
35 : : #include <com/sun/star/uno/Sequence.hxx>
36 : : #include <com/sun/star/beans/PropertyValue.hpp>
37 : : #include <com/sun/star/uno/Any.hxx>
38 : : #include <rtl/ustring.hxx>
39 : : #include <boost/unordered_map.hpp>
40 : : #include <map>
41 : : #include "svx/svxdllapi.h"
42 : :
43 : : class SdrCustomShapeEngineItem : public SfxStringItem
44 : : {
45 : : public :
46 : : SdrCustomShapeEngineItem();
47 : : };
48 : :
49 : : class SdrCustomShapeDataItem : public SfxStringItem
50 : : {
51 : : public :
52 : : SdrCustomShapeDataItem();
53 : : };
54 : :
55 [ # # ][ # # ]: 0 : class SVX_DLLPUBLIC SdrCustomShapeGeometryItem : public SfxPoolItem
[ # # ]
56 : : {
57 : : public:
58 : : typedef std::pair < const ::rtl::OUString, const ::rtl::OUString > PropertyPair;
59 : :
60 : : private:
61 : : struct SVX_DLLPUBLIC PropertyEq
62 : : {
63 : : bool operator()( const rtl::OUString&, const rtl::OUString& ) const;
64 : : };
65 : : struct SVX_DLLPUBLIC PropertyPairEq
66 : : {
67 : : bool operator()( const SdrCustomShapeGeometryItem::PropertyPair&, const SdrCustomShapeGeometryItem::PropertyPair& ) const;
68 : : };
69 : : struct SVX_DLLPUBLIC PropertyPairHash
70 : : {
71 : : size_t operator()( const SdrCustomShapeGeometryItem::PropertyPair& ) const;
72 : : };
73 : : typedef boost::unordered_map < PropertyPair, sal_Int32, PropertyPairHash, PropertyPairEq > PropertyPairHashMap;
74 : : typedef boost::unordered_map< rtl::OUString, sal_Int32, rtl::OUStringHash, PropertyEq > PropertyHashMap;
75 : :
76 : : PropertyHashMap aPropHashMap;
77 : : PropertyPairHashMap aPropPairHashMap;
78 : :
79 : : com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aPropSeq;
80 : :
81 : : public :
82 : :
83 : : TYPEINFO();
84 : :
85 : : SdrCustomShapeGeometryItem();
86 : : SdrCustomShapeGeometryItem( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& );
87 : : SdrCustomShapeGeometryItem( SvStream& rIn, sal_uInt16 nVersion );
88 : : ~SdrCustomShapeGeometryItem();
89 : :
90 : : virtual int operator==( const SfxPoolItem& ) const;
91 : : virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation,
92 : : SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric,
93 : : String &rText, const IntlWrapper * = 0) const;
94 : :
95 : : virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const;
96 : : virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const;
97 : :
98 : : virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
99 : : virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
100 : :
101 : : virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
102 : : virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
103 : :
104 : : const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& GetGeometry() const;
105 : :
106 : : com::sun::star::uno::Any* GetPropertyValueByName( const rtl::OUString& rPropName );
107 : : com::sun::star::uno::Any* GetPropertyValueByName( const rtl::OUString& rPropName, const rtl::OUString& rPropName2 );
108 : :
109 : : void SetPropertyValue( const com::sun::star::beans::PropertyValue& rPropVal );
110 : : void SetPropertyValue( const rtl::OUString& rSequenceName, const com::sun::star::beans::PropertyValue& rPropVal );
111 : :
112 : : void ClearPropertyValue( const rtl::OUString& rPropertyName );
113 : : };
114 : :
115 : : class SdrCustomShapeReplacementURLItem : public SfxStringItem
116 : : {
117 : : public :
118 : : SdrCustomShapeReplacementURLItem();
119 : : };
120 : :
121 : : //---------------------------
122 : : // class SdrTextWordWrapItem
123 : : //---------------------------
124 [ - + ]: 1022 : class SdrTextWordWrapItem : public SdrOnOffItem {
125 : : public:
126 : 1022 : SdrTextWordWrapItem( sal_Bool bAuto = sal_False ): SdrOnOffItem( SDRATTR_TEXT_WORDWRAP, bAuto ) {}
127 : : SdrTextWordWrapItem( SvStream& rIn ) : SdrOnOffItem( SDRATTR_TEXT_WORDWRAP, rIn ) {}
128 : : };
129 : :
130 : : //-------------------------------
131 : : // class SdrTextAutoGrowSizeItem
132 : : //-------------------------------
133 [ # # ]: 0 : class SdrTextAutoGrowSizeItem : public SdrOnOffItem {
134 : : public:
135 : : SdrTextAutoGrowSizeItem( sal_Bool bAuto = sal_False ): SdrOnOffItem( SDRATTR_TEXT_AUTOGROWSIZE, bAuto ) {}
136 : : SdrTextAutoGrowSizeItem( SvStream& rIn ) : SdrOnOffItem( SDRATTR_TEXT_AUTOGROWSIZE, rIn ) {}
137 : : };
138 : :
139 : : #endif
140 : :
141 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|