xref: /aoo42x/main/svx/source/xoutdev/xattr.cxx (revision 97e8a929)
1f6e50924SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f6e50924SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f6e50924SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f6e50924SAndrew Rist  * distributed with this work for additional information
6f6e50924SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f6e50924SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f6e50924SAndrew Rist  * "License"); you may not use this file except in compliance
9f6e50924SAndrew Rist  * with the License.  You may obtain a copy of the License at
10f6e50924SAndrew Rist  *
11f6e50924SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12f6e50924SAndrew Rist  *
13f6e50924SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f6e50924SAndrew Rist  * software distributed under the License is distributed on an
15f6e50924SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f6e50924SAndrew Rist  * KIND, either express or implied.  See the License for the
17f6e50924SAndrew Rist  * specific language governing permissions and limitations
18f6e50924SAndrew Rist  * under the License.
19f6e50924SAndrew Rist  *
20f6e50924SAndrew Rist  *************************************************************/
21f6e50924SAndrew Rist 
22f6e50924SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svx.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir // include ---------------------------------------------------------------
28cdf0e10cSrcweir #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
29cdf0e10cSrcweir #include <com/sun/star/drawing/Hatch.hpp>
30cdf0e10cSrcweir #include <com/sun/star/drawing/LineStyle.hpp>
31cdf0e10cSrcweir #include <com/sun/star/drawing/LineDash.hpp>
32cdf0e10cSrcweir #include <com/sun/star/drawing/DashStyle.hpp>
33cdf0e10cSrcweir #include <com/sun/star/awt/Point.hpp>
34cdf0e10cSrcweir #include <com/sun/star/drawing/PointSequence.hpp>
35cdf0e10cSrcweir #include <com/sun/star/drawing/FillStyle.hpp>
36cdf0e10cSrcweir #include <com/sun/star/awt/Gradient.hpp>
37cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
38cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp>
39cdf0e10cSrcweir #include <svl/itempool.hxx>
40cdf0e10cSrcweir #include <editeng/memberids.hrc>
41cdf0e10cSrcweir #include <tools/stream.hxx>
42cdf0e10cSrcweir 
43cdf0e10cSrcweir #include "svx/unoapi.hxx"
44cdf0e10cSrcweir #include <svl/style.hxx>
45cdf0e10cSrcweir #include "unopolyhelper.hxx"
46cdf0e10cSrcweir 
47cdf0e10cSrcweir #include <tools/bigint.hxx>
48cdf0e10cSrcweir #include <svl/itemset.hxx>
49cdf0e10cSrcweir #include <svx/dialogs.hrc>
50cdf0e10cSrcweir #include "svx/svdstr.hrc"
51cdf0e10cSrcweir #include "svx/xattr.hxx"
52cdf0e10cSrcweir #include <svx/xtable.hxx>
53cdf0e10cSrcweir #include <svx/dialmgr.hxx>
54cdf0e10cSrcweir #include <editeng/itemtype.hxx>
55cdf0e10cSrcweir #include <svx/xdef.hxx>
56cdf0e10cSrcweir #include <svx/unomid.hxx>
57cdf0e10cSrcweir #include <svx/svdmodel.hxx>
58cdf0e10cSrcweir #include <basegfx/polygon/b2dpolygon.hxx>
59cdf0e10cSrcweir #include <basegfx/point/b2dpoint.hxx>
60cdf0e10cSrcweir #include <basegfx/vector/b2dvector.hxx>
61cdf0e10cSrcweir 
62cdf0e10cSrcweir #include <stdio.h>
63cdf0e10cSrcweir 
64cdf0e10cSrcweir using namespace ::rtl;
65cdf0e10cSrcweir using namespace ::com::sun::star;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir #define GLOBALOVERFLOW
68cdf0e10cSrcweir 
69cdf0e10cSrcweir #define TWIP_TO_MM100(TWIP)     ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
70cdf0e10cSrcweir #define MM100_TO_TWIP(MM100)    ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
71cdf0e10cSrcweir 
72cdf0e10cSrcweir /************************************************************************/
73cdf0e10cSrcweir 
74cdf0e10cSrcweir #define VCLTOSVCOL( rCol ) (sal_uInt16)((((sal_uInt16)(rCol))<<8)|(rCol))
75cdf0e10cSrcweir 
76cdf0e10cSrcweir /************************************************************************/
77cdf0e10cSrcweir 
78cdf0e10cSrcweir XubString aNameOrIndexEmptyString;
79cdf0e10cSrcweir 
80cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(NameOrIndex, SfxStringItem);
81cdf0e10cSrcweir 
82cdf0e10cSrcweir /*************************************************************************
83cdf0e10cSrcweir |*
84cdf0e10cSrcweir |*
85cdf0e10cSrcweir |*
86cdf0e10cSrcweir \*************************************************************************/
87cdf0e10cSrcweir 
88cdf0e10cSrcweir long ScaleMetricValue( long nVal, long nMul, long nDiv )
89cdf0e10cSrcweir {
90cdf0e10cSrcweir 	BigInt aVal( nVal );
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 	aVal *= nMul;
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 	if ( aVal.IsNeg() != ( nDiv < 0 ) )
95cdf0e10cSrcweir 		aVal-=nDiv/2; // fuer korrektes Runden
96cdf0e10cSrcweir 	else
97cdf0e10cSrcweir 		aVal+=nDiv/2; // fuer korrektes Runden
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 	aVal/=nDiv;
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	return long( aVal );
102cdf0e10cSrcweir }
103cdf0e10cSrcweir 
104cdf0e10cSrcweir /*************************************************************************
105cdf0e10cSrcweir |*
106cdf0e10cSrcweir |*	  NameOrIndex::NameOrIndex(sal_uInt16 nWhich, sal_Int32 nIndex)
107cdf0e10cSrcweir |*
108cdf0e10cSrcweir |*	  Beschreibung
109cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
110cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
111cdf0e10cSrcweir |*
112cdf0e10cSrcweir *************************************************************************/
113cdf0e10cSrcweir 
114cdf0e10cSrcweir NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, sal_Int32 nIndex) :
115cdf0e10cSrcweir 	SfxStringItem(_nWhich, aNameOrIndexEmptyString),
116cdf0e10cSrcweir 	nPalIndex(nIndex)
117cdf0e10cSrcweir {
118cdf0e10cSrcweir }
119cdf0e10cSrcweir 
120cdf0e10cSrcweir /*************************************************************************
121cdf0e10cSrcweir |*
122cdf0e10cSrcweir |*	  NameOrIndex::NameOrIndex(sal_uInt16 nWhich, const String& rName)
123cdf0e10cSrcweir |*
124cdf0e10cSrcweir |*	  Beschreibung
125cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
126cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
127cdf0e10cSrcweir |*
128cdf0e10cSrcweir *************************************************************************/
129cdf0e10cSrcweir 
130cdf0e10cSrcweir NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, const XubString& rName) :
131cdf0e10cSrcweir 	SfxStringItem(_nWhich, rName),
132cdf0e10cSrcweir 	nPalIndex(-1)
133cdf0e10cSrcweir {
134cdf0e10cSrcweir }
135cdf0e10cSrcweir 
136cdf0e10cSrcweir /*************************************************************************
137cdf0e10cSrcweir |*
138cdf0e10cSrcweir |*	  NameOrIndex::NameOrIndex(sal_uInt16 nWhich, SvStream& rIn)
139cdf0e10cSrcweir |*
140cdf0e10cSrcweir |*	  Beschreibung
141cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
142cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
143cdf0e10cSrcweir |*
144cdf0e10cSrcweir *************************************************************************/
145cdf0e10cSrcweir 
146cdf0e10cSrcweir NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, SvStream& rIn) :
147cdf0e10cSrcweir 	SfxStringItem(_nWhich, rIn)
148cdf0e10cSrcweir {
149cdf0e10cSrcweir 	rIn >> nPalIndex;
150cdf0e10cSrcweir }
151cdf0e10cSrcweir 
152cdf0e10cSrcweir /*************************************************************************
153cdf0e10cSrcweir |*
154cdf0e10cSrcweir |*	  NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex)
155cdf0e10cSrcweir |*
156cdf0e10cSrcweir |*	  Beschreibung
157cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
158cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
159cdf0e10cSrcweir |*
160cdf0e10cSrcweir *************************************************************************/
161cdf0e10cSrcweir 
162cdf0e10cSrcweir NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) :
163cdf0e10cSrcweir 	SfxStringItem(rNameOrIndex),
164cdf0e10cSrcweir 	nPalIndex(rNameOrIndex.nPalIndex)
165cdf0e10cSrcweir {
166cdf0e10cSrcweir }
167cdf0e10cSrcweir 
168cdf0e10cSrcweir /*************************************************************************
169cdf0e10cSrcweir |*
170cdf0e10cSrcweir |*	  int NameOrIndex::operator==(const SfxPoolItem& rItem) const
171cdf0e10cSrcweir |*
172cdf0e10cSrcweir |*	  Beschreibung
173cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
174cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
175cdf0e10cSrcweir |*
176cdf0e10cSrcweir *************************************************************************/
177cdf0e10cSrcweir 
178cdf0e10cSrcweir int NameOrIndex::operator==(const SfxPoolItem& rItem) const
179cdf0e10cSrcweir {
180cdf0e10cSrcweir 	return ( SfxStringItem::operator==(rItem) &&
181cdf0e10cSrcweir 			((const NameOrIndex&) rItem).nPalIndex == nPalIndex );
182cdf0e10cSrcweir }
183cdf0e10cSrcweir 
184cdf0e10cSrcweir /*************************************************************************
185cdf0e10cSrcweir |*
186cdf0e10cSrcweir |*	  SfxPoolItem* NameOrIndex::Clone(SfxItemPool* pPool) const
187cdf0e10cSrcweir |*
188cdf0e10cSrcweir |*	  Beschreibung
189cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
190cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
191cdf0e10cSrcweir |*
192cdf0e10cSrcweir *************************************************************************/
193cdf0e10cSrcweir 
194cdf0e10cSrcweir SfxPoolItem* NameOrIndex::Clone(SfxItemPool* /*pPool*/) const
195cdf0e10cSrcweir {
196cdf0e10cSrcweir 
197cdf0e10cSrcweir 	return new NameOrIndex(*this);
198cdf0e10cSrcweir }
199cdf0e10cSrcweir 
200cdf0e10cSrcweir /*************************************************************************
201cdf0e10cSrcweir |*
202cdf0e10cSrcweir |*	  SfxPoolItem* NameOrIndex::Create(SvStream& rIn, sal_uInt16 nVer) const
203cdf0e10cSrcweir |*
204cdf0e10cSrcweir |*	  Beschreibung
205cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
206cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
207cdf0e10cSrcweir |*
208cdf0e10cSrcweir *************************************************************************/
209cdf0e10cSrcweir 
210cdf0e10cSrcweir SfxPoolItem* NameOrIndex::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
211cdf0e10cSrcweir {
212cdf0e10cSrcweir 	return new NameOrIndex(Which(), rIn);
213cdf0e10cSrcweir }
214cdf0e10cSrcweir 
215cdf0e10cSrcweir /*************************************************************************
216cdf0e10cSrcweir |*
217cdf0e10cSrcweir |*	  SvStream* NameOrIndex::Store(SvStream& rIn) const
218cdf0e10cSrcweir |*
219cdf0e10cSrcweir |*	  Beschreibung
220cdf0e10cSrcweir |*	  Ersterstellung	14.11.94
221cdf0e10cSrcweir |*	  Letzte Aenderung	14.11.94
222cdf0e10cSrcweir |*
223cdf0e10cSrcweir *************************************************************************/
224cdf0e10cSrcweir 
225cdf0e10cSrcweir SvStream& NameOrIndex::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
226cdf0e10cSrcweir {
227cdf0e10cSrcweir 	SfxStringItem::Store( rOut, nItemVersion );
228cdf0e10cSrcweir 	rOut << nPalIndex;
229cdf0e10cSrcweir 	return rOut;
230cdf0e10cSrcweir }
231cdf0e10cSrcweir 
232cdf0e10cSrcweir /** this static checks if the given NameOrIndex item has a unique name for its value.
233cdf0e10cSrcweir 	The returned String is a unique name for an item with this value in both given pools.
234cdf0e10cSrcweir 	Argument pPool2 can be null.
235cdf0e10cSrcweir 	If returned string equals NameOrIndex->GetName(), the name was already unique.
236cdf0e10cSrcweir */
237cdf0e10cSrcweir String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* /*pPool2*/, SvxCompareValueFunc pCompareValueFunc, sal_uInt16 nPrefixResId, XPropertyList* pDefaults )
238cdf0e10cSrcweir {
239cdf0e10cSrcweir 	sal_Bool bForceNew = sal_False;
240cdf0e10cSrcweir 
241cdf0e10cSrcweir 	String aUniqueName;
242cdf0e10cSrcweir 	SvxUnogetInternalNameForItem( nWhich, pCheckItem->GetName(), aUniqueName );
243cdf0e10cSrcweir 
244cdf0e10cSrcweir 	// 2. if we have a name check if there is already an item with the
245cdf0e10cSrcweir 	// same name in the documents pool with a different line end or start
246cdf0e10cSrcweir 
247cdf0e10cSrcweir 	if( aUniqueName.Len() && pPool1 )
248cdf0e10cSrcweir 	{
249cdf0e10cSrcweir 		const sal_uInt32 nCount = pPool1->GetItemCount2( nWhich );
250cdf0e10cSrcweir 
251cdf0e10cSrcweir 		const NameOrIndex *pItem;
252cdf0e10cSrcweir 		for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
253cdf0e10cSrcweir 		{
254cdf0e10cSrcweir 			pItem = (NameOrIndex*)pPool1->GetItem2( nWhich, nSurrogate );
255cdf0e10cSrcweir 
256cdf0e10cSrcweir 			if( pItem && ( pItem->GetName() == pCheckItem->GetName() ) )
257cdf0e10cSrcweir 			{
258cdf0e10cSrcweir 				// if there is already an item with the same name and the same
259cdf0e10cSrcweir 				// value its ok to set it
260cdf0e10cSrcweir 				if( !pCompareValueFunc( pItem, pCheckItem ) )
261cdf0e10cSrcweir 				{
262cdf0e10cSrcweir 					// same name but different value, we need a new name for this item
263cdf0e10cSrcweir 					aUniqueName = String();
264cdf0e10cSrcweir 					bForceNew = sal_True;
265cdf0e10cSrcweir 				}
266cdf0e10cSrcweir 				break;
267cdf0e10cSrcweir 			}
268cdf0e10cSrcweir 		}
269cdf0e10cSrcweir 	}
270cdf0e10cSrcweir 
271cdf0e10cSrcweir 	// if we have no name yet, find existing item with same conent or
272cdf0e10cSrcweir 	// create a unique name
273cdf0e10cSrcweir 	if( aUniqueName.Len() == 0 )
274cdf0e10cSrcweir 	{
275cdf0e10cSrcweir 		sal_Int32 nUserIndex = 1;
276cdf0e10cSrcweir 		const ResId aRes(SVX_RES(nPrefixResId));
277cdf0e10cSrcweir 		String aUser( aRes );
278cdf0e10cSrcweir 		aUser += sal_Unicode( ' ' );
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 		if( pDefaults )
281cdf0e10cSrcweir 		{
282cdf0e10cSrcweir 			const int nCount = pDefaults->Count();
283cdf0e10cSrcweir 			int nIndex;
284cdf0e10cSrcweir 			for( nIndex = 0; nIndex < nCount; nIndex++ )
285cdf0e10cSrcweir 			{
286cdf0e10cSrcweir 				XPropertyEntry* pEntry = pDefaults->Get( nIndex, 0 );
287cdf0e10cSrcweir 				if( pEntry )
288cdf0e10cSrcweir 				{
289cdf0e10cSrcweir 					bool bFound = false;
290cdf0e10cSrcweir 
291cdf0e10cSrcweir 					switch( nWhich )
292cdf0e10cSrcweir 					{
293cdf0e10cSrcweir 					case XATTR_FILLBITMAP:
29470d3707aSArmin Le Grand                     {
29570d3707aSArmin Le Grand                         const GraphicObject& rGraphicObjectA(((XFillBitmapItem*)pCheckItem)->GetGraphicObject());
29670d3707aSArmin Le Grand                         const GraphicObject& rGraphicObjectB(((XBitmapEntry*)pEntry)->GetGraphicObject());
29770d3707aSArmin Le Grand 
29870d3707aSArmin Le Grand                         bFound = (rGraphicObjectA == rGraphicObjectB);
299cdf0e10cSrcweir 						break;
30070d3707aSArmin Le Grand                     }
301cdf0e10cSrcweir 					case XATTR_LINEDASH:
302cdf0e10cSrcweir 						bFound = (((XLineDashItem*)pCheckItem)->GetDashValue() == ((XDashEntry*)pEntry) ->GetDash());
303cdf0e10cSrcweir 						break;
304cdf0e10cSrcweir 					case XATTR_LINESTART:
305cdf0e10cSrcweir 						bFound = (((XLineStartItem*)pCheckItem)->GetLineStartValue() == ((XLineEndEntry*)pEntry)->GetLineEnd());
306cdf0e10cSrcweir 						break;
307cdf0e10cSrcweir 					case XATTR_LINEEND:
308cdf0e10cSrcweir 						bFound = (((XLineEndItem*)pCheckItem)->GetLineEndValue() == ((XLineEndEntry*)pEntry)->GetLineEnd());
309cdf0e10cSrcweir 						break;
310cdf0e10cSrcweir 					case XATTR_FILLGRADIENT:
311cdf0e10cSrcweir 						bFound = (((XFillGradientItem*)pCheckItem)->GetGradientValue() == ((XGradientEntry*)pEntry)->GetGradient());
312cdf0e10cSrcweir 						break;
313cdf0e10cSrcweir 					case XATTR_FILLHATCH:
314cdf0e10cSrcweir 						bFound = (((XFillHatchItem*)pCheckItem)->GetHatchValue() == ((XHatchEntry*)pEntry)->GetHatch());
315cdf0e10cSrcweir 						break;
316cdf0e10cSrcweir 					}
317cdf0e10cSrcweir 
318cdf0e10cSrcweir 					if( bFound )
319cdf0e10cSrcweir 					{
320cdf0e10cSrcweir 						aUniqueName = pEntry->GetName();
321cdf0e10cSrcweir 						break;
322cdf0e10cSrcweir 					}
323cdf0e10cSrcweir 					else
324cdf0e10cSrcweir 					{
325cdf0e10cSrcweir 						sal_Int32 nThisIndex = pEntry->GetName().Copy( aUser.Len() ).ToInt32();
326cdf0e10cSrcweir 						if( nThisIndex >= nUserIndex )
327cdf0e10cSrcweir 							nUserIndex = nThisIndex + 1;
328cdf0e10cSrcweir 					}
329cdf0e10cSrcweir 				}
330cdf0e10cSrcweir 			}
331cdf0e10cSrcweir 		}
332cdf0e10cSrcweir 
333cdf0e10cSrcweir 		if( (aUniqueName.Len() == 0) && pPool1 )
334cdf0e10cSrcweir 		{
335cdf0e10cSrcweir 			const sal_uInt32 nCount = pPool1->GetItemCount2( nWhich );
336cdf0e10cSrcweir 			const NameOrIndex *pItem;
337cdf0e10cSrcweir 			for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
338cdf0e10cSrcweir 			{
339cdf0e10cSrcweir 				pItem = (NameOrIndex*)pPool1->GetItem2( nWhich, nSurrogate );
340cdf0e10cSrcweir 
341cdf0e10cSrcweir 				if( pItem && pItem->GetName().Len() )
342cdf0e10cSrcweir 				{
343cdf0e10cSrcweir 					if( !bForceNew && pCompareValueFunc( pItem, pCheckItem ) )
344cdf0e10cSrcweir 						return pItem->GetName();
345cdf0e10cSrcweir 
346cdf0e10cSrcweir 					if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
347cdf0e10cSrcweir 					{
348cdf0e10cSrcweir 						sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
349cdf0e10cSrcweir 						if( nThisIndex >= nUserIndex )
350cdf0e10cSrcweir 							nUserIndex = nThisIndex + 1;
351cdf0e10cSrcweir 					}
352cdf0e10cSrcweir 				}
353cdf0e10cSrcweir 			}
354cdf0e10cSrcweir             aUniqueName = aUser;
355cdf0e10cSrcweir             aUniqueName += String::CreateFromInt32( nUserIndex );
356cdf0e10cSrcweir 		}
357cdf0e10cSrcweir 	}
358cdf0e10cSrcweir 
359cdf0e10cSrcweir 	return aUniqueName;
360cdf0e10cSrcweir }
361cdf0e10cSrcweir 
362cdf0e10cSrcweir //*************************************************************************
363cdf0e10cSrcweir 
364cdf0e10cSrcweir // -------------------
365cdf0e10cSrcweir // class XColorItem
366cdf0e10cSrcweir // -------------------
367cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XColorItem, NameOrIndex);
368cdf0e10cSrcweir 
369cdf0e10cSrcweir /*************************************************************************
370cdf0e10cSrcweir |*
371cdf0e10cSrcweir |*	  XColorItem::XColorItem(sal_uInt16 nWhich, sal_Int32 nIndex, const Color& rTheColor)
372cdf0e10cSrcweir |*
373cdf0e10cSrcweir \************************************************************************/
374cdf0e10cSrcweir 
375cdf0e10cSrcweir XColorItem::XColorItem(sal_uInt16 _nWhich, sal_Int32 nIndex, const Color& rTheColor) :
376cdf0e10cSrcweir 	NameOrIndex(_nWhich, nIndex),
377cdf0e10cSrcweir 	aColor(rTheColor)
378cdf0e10cSrcweir {
379cdf0e10cSrcweir }
380cdf0e10cSrcweir 
381cdf0e10cSrcweir /*************************************************************************
382cdf0e10cSrcweir |*
383cdf0e10cSrcweir |*	  XColorItem::XColorItem(sal_uInt16 nWhich, const String& rName, const Color& rTheColor)
384cdf0e10cSrcweir |*
385cdf0e10cSrcweir \************************************************************************/
386cdf0e10cSrcweir 
387cdf0e10cSrcweir XColorItem::XColorItem(sal_uInt16 _nWhich, const XubString& rName, const Color& rTheColor) :
388cdf0e10cSrcweir 	NameOrIndex(_nWhich, rName),
389cdf0e10cSrcweir 	aColor(rTheColor)
390cdf0e10cSrcweir {
391cdf0e10cSrcweir }
392cdf0e10cSrcweir 
393cdf0e10cSrcweir /*************************************************************************
394cdf0e10cSrcweir |*
395cdf0e10cSrcweir |*	  XColorItem::XColorItem(const XColorItem& rItem)
396cdf0e10cSrcweir |*
397cdf0e10cSrcweir \************************************************************************/
398cdf0e10cSrcweir 
399cdf0e10cSrcweir XColorItem::XColorItem(const XColorItem& rItem) :
400cdf0e10cSrcweir 	NameOrIndex(rItem),
401cdf0e10cSrcweir 	aColor(rItem.aColor)
402cdf0e10cSrcweir {
403cdf0e10cSrcweir }
404cdf0e10cSrcweir 
405cdf0e10cSrcweir /*************************************************************************
406cdf0e10cSrcweir |*
407cdf0e10cSrcweir |*	  XColorItem::XColorItem(sal_uInt16 nWhich, SvStream& rIn)
408cdf0e10cSrcweir |*
409cdf0e10cSrcweir \************************************************************************/
410cdf0e10cSrcweir 
411cdf0e10cSrcweir XColorItem::XColorItem(sal_uInt16 _nWhich, SvStream& rIn) :
412cdf0e10cSrcweir 	NameOrIndex(_nWhich, rIn)
413cdf0e10cSrcweir {
414cdf0e10cSrcweir 	if (!IsIndex())
415cdf0e10cSrcweir 	{
416cdf0e10cSrcweir 		rIn >> aColor;
417cdf0e10cSrcweir 	}
418cdf0e10cSrcweir }
419cdf0e10cSrcweir 
420cdf0e10cSrcweir /*************************************************************************
421cdf0e10cSrcweir |*
422cdf0e10cSrcweir |*	  XColorItem::Clone(SfxItemPool* pPool) const
423cdf0e10cSrcweir |*
424cdf0e10cSrcweir \************************************************************************/
425cdf0e10cSrcweir 
426cdf0e10cSrcweir SfxPoolItem* XColorItem::Clone(SfxItemPool* /*pPool*/) const
427cdf0e10cSrcweir {
428cdf0e10cSrcweir 	return new XColorItem(*this);
429cdf0e10cSrcweir }
430cdf0e10cSrcweir 
431cdf0e10cSrcweir /*************************************************************************
432cdf0e10cSrcweir |*
433cdf0e10cSrcweir |*	  int XColorItem::operator==(const SfxPoolItem& rItem) const
434cdf0e10cSrcweir |*
435cdf0e10cSrcweir \************************************************************************/
436cdf0e10cSrcweir 
437cdf0e10cSrcweir int XColorItem::operator==(const SfxPoolItem& rItem) const
438cdf0e10cSrcweir {
439cdf0e10cSrcweir 	return ( NameOrIndex::operator==(rItem) &&
440cdf0e10cSrcweir 			((const XColorItem&) rItem).aColor == aColor );
441cdf0e10cSrcweir }
442cdf0e10cSrcweir 
443cdf0e10cSrcweir /*************************************************************************
444cdf0e10cSrcweir |*
445cdf0e10cSrcweir |*	  SfxPoolItem* XColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const
446cdf0e10cSrcweir |*
447cdf0e10cSrcweir \************************************************************************/
448cdf0e10cSrcweir 
449cdf0e10cSrcweir SfxPoolItem* XColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
450cdf0e10cSrcweir {
451cdf0e10cSrcweir 	return new XColorItem(Which(), rIn);
452cdf0e10cSrcweir }
453cdf0e10cSrcweir 
454cdf0e10cSrcweir /*************************************************************************
455cdf0e10cSrcweir |*
456cdf0e10cSrcweir |*	  SfxPoolItem* XColorItem::Store(SvStream& rOut) const
457cdf0e10cSrcweir |*
458cdf0e10cSrcweir \************************************************************************/
459cdf0e10cSrcweir 
460cdf0e10cSrcweir SvStream& XColorItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
461cdf0e10cSrcweir {
462cdf0e10cSrcweir 	NameOrIndex::Store( rOut, nItemVersion );
463cdf0e10cSrcweir 
464cdf0e10cSrcweir 	if ( !IsIndex() )
465cdf0e10cSrcweir 	{
466cdf0e10cSrcweir 		rOut << aColor;
467cdf0e10cSrcweir 	}
468cdf0e10cSrcweir 
469cdf0e10cSrcweir 	return rOut;
470cdf0e10cSrcweir }
471cdf0e10cSrcweir 
472cdf0e10cSrcweir /*************************************************************************
473cdf0e10cSrcweir |*
474*97e8a929SArmin Le Grand |*	  const XColor& XColorItem::GetColorValue(const XColorList* pTable) const
475cdf0e10cSrcweir |*
476cdf0e10cSrcweir \************************************************************************/
477cdf0e10cSrcweir 
478*97e8a929SArmin Le Grand const Color& XColorItem::GetColorValue(const XColorList* pTable) const
479cdf0e10cSrcweir {
480cdf0e10cSrcweir 	if (!IsIndex())
481cdf0e10cSrcweir 		return aColor;
482cdf0e10cSrcweir 	else
483cdf0e10cSrcweir 		return pTable->GetColor(GetIndex())->GetColor();
484cdf0e10cSrcweir 
485cdf0e10cSrcweir }
486cdf0e10cSrcweir 
487cdf0e10cSrcweir sal_Bool XColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
488cdf0e10cSrcweir {
489cdf0e10cSrcweir     rVal <<= (sal_Int32)GetColorValue().GetRGBColor();
490cdf0e10cSrcweir 	return sal_True;
491cdf0e10cSrcweir }
492cdf0e10cSrcweir 
493cdf0e10cSrcweir sal_Bool XColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
494cdf0e10cSrcweir {
495cdf0e10cSrcweir 	sal_Int32 nValue = 0;
496cdf0e10cSrcweir 	rVal >>= nValue;
497cdf0e10cSrcweir 	SetColorValue( nValue );
498cdf0e10cSrcweir 
499cdf0e10cSrcweir 	return sal_True;
500cdf0e10cSrcweir }
501cdf0e10cSrcweir 
502cdf0e10cSrcweir 
503cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
504cdf0e10cSrcweir //							 Linienattribute
505cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
506cdf0e10cSrcweir 
507cdf0e10cSrcweir //---------------------
508cdf0e10cSrcweir // class XLineStyleItem
509cdf0e10cSrcweir //---------------------
510cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineStyleItem, SfxEnumItem);
511cdf0e10cSrcweir 
512cdf0e10cSrcweir /*************************************************************************
513cdf0e10cSrcweir |*
514cdf0e10cSrcweir |*	  XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle)
515cdf0e10cSrcweir |*
516cdf0e10cSrcweir |*	  Beschreibung
517cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
518cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
519cdf0e10cSrcweir |*
520cdf0e10cSrcweir *************************************************************************/
521cdf0e10cSrcweir 
522cdf0e10cSrcweir XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle) :
523cdf0e10cSrcweir 	SfxEnumItem(XATTR_LINESTYLE, sal::static_int_cast< sal_uInt16 >(eTheLineStyle))
524cdf0e10cSrcweir {
525cdf0e10cSrcweir }
526cdf0e10cSrcweir 
527cdf0e10cSrcweir /*************************************************************************
528cdf0e10cSrcweir |*
529cdf0e10cSrcweir |*	  XLineStyleItem::XLineStyleItem(SvStream& rIn)
530cdf0e10cSrcweir |*
531cdf0e10cSrcweir |*	  Beschreibung
532cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
533cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
534cdf0e10cSrcweir |*
535cdf0e10cSrcweir *************************************************************************/
536cdf0e10cSrcweir 
537cdf0e10cSrcweir XLineStyleItem::XLineStyleItem(SvStream& rIn) :
538cdf0e10cSrcweir 	SfxEnumItem(XATTR_LINESTYLE, rIn)
539cdf0e10cSrcweir {
540cdf0e10cSrcweir }
541cdf0e10cSrcweir 
542cdf0e10cSrcweir /*************************************************************************
543cdf0e10cSrcweir |*
544cdf0e10cSrcweir |*	  XLineStyleItem::Clone(SfxItemPool* pPool) const
545cdf0e10cSrcweir |*
546cdf0e10cSrcweir |*	  Beschreibung
547cdf0e10cSrcweir |*	  Ersterstellung	09.11.94
548cdf0e10cSrcweir |*	  Letzte Aenderung	09.11.94
549cdf0e10cSrcweir |*
550cdf0e10cSrcweir *************************************************************************/
551cdf0e10cSrcweir 
552cdf0e10cSrcweir SfxPoolItem* XLineStyleItem::Clone(SfxItemPool* /*pPool*/) const
553cdf0e10cSrcweir {
554cdf0e10cSrcweir 	return new XLineStyleItem( *this );
555cdf0e10cSrcweir }
556cdf0e10cSrcweir 
557cdf0e10cSrcweir /*************************************************************************
558cdf0e10cSrcweir |*
559cdf0e10cSrcweir |*	  SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, sal_uInt16 nVer) const
560cdf0e10cSrcweir |*
561cdf0e10cSrcweir |*	  Beschreibung
562cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
563cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
564cdf0e10cSrcweir |*
565cdf0e10cSrcweir *************************************************************************/
566cdf0e10cSrcweir 
567cdf0e10cSrcweir SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
568cdf0e10cSrcweir {
569cdf0e10cSrcweir 	return new XLineStyleItem(rIn);
570cdf0e10cSrcweir }
571cdf0e10cSrcweir 
572cdf0e10cSrcweir //------------------------------------------------------------------------
573cdf0e10cSrcweir 
574cdf0e10cSrcweir SfxItemPresentation XLineStyleItem::GetPresentation
575cdf0e10cSrcweir (
576cdf0e10cSrcweir 	SfxItemPresentation ePres,
577cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
578cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
579cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
580cdf0e10cSrcweir )	const
581cdf0e10cSrcweir {
582cdf0e10cSrcweir 	rText.Erase();
583cdf0e10cSrcweir 
584cdf0e10cSrcweir 	switch ( ePres )
585cdf0e10cSrcweir 	{
586cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
587cdf0e10cSrcweir 			return ePres;
588cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
589cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
590cdf0e10cSrcweir 		{
591cdf0e10cSrcweir 			sal_uInt16 nId = 0;
592cdf0e10cSrcweir 
593cdf0e10cSrcweir 			switch( (sal_uInt16)GetValue() )
594cdf0e10cSrcweir 			{
595cdf0e10cSrcweir 				case XLINE_NONE:
596cdf0e10cSrcweir 					nId = RID_SVXSTR_INVISIBLE;
597cdf0e10cSrcweir 					break;
598cdf0e10cSrcweir 				case XLINE_SOLID:
599cdf0e10cSrcweir 					nId = RID_SVXSTR_SOLID;
600cdf0e10cSrcweir 					break;
601cdf0e10cSrcweir 			}
602cdf0e10cSrcweir 
603cdf0e10cSrcweir 			if ( nId )
604cdf0e10cSrcweir 				rText = SVX_RESSTR( nId );
605cdf0e10cSrcweir 			return ePres;
606cdf0e10cSrcweir 		}
607cdf0e10cSrcweir 		default:
608cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
609cdf0e10cSrcweir 	}
610cdf0e10cSrcweir }
611cdf0e10cSrcweir 
612cdf0e10cSrcweir sal_Bool XLineStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
613cdf0e10cSrcweir {
614cdf0e10cSrcweir 	::com::sun::star::drawing::LineStyle eLS = (::com::sun::star::drawing::LineStyle)GetValue();
615cdf0e10cSrcweir 	rVal <<= eLS;
616cdf0e10cSrcweir 	return sal_True;
617cdf0e10cSrcweir }
618cdf0e10cSrcweir 
619cdf0e10cSrcweir sal_Bool XLineStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
620cdf0e10cSrcweir {
621cdf0e10cSrcweir 	::com::sun::star::drawing::LineStyle eLS;
622cdf0e10cSrcweir 	if(!(rVal >>= eLS ))
623cdf0e10cSrcweir     {
624cdf0e10cSrcweir         // also try an int (for Basic)
625cdf0e10cSrcweir         sal_Int32 nLS = 0;
626cdf0e10cSrcweir         if(!(rVal >>= nLS))
627cdf0e10cSrcweir             return sal_False;
628cdf0e10cSrcweir         eLS = (::com::sun::star::drawing::LineStyle)nLS;
629cdf0e10cSrcweir     }
630cdf0e10cSrcweir 
631cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( eLS ) );
632cdf0e10cSrcweir 	return sal_True;
633cdf0e10cSrcweir }
634cdf0e10cSrcweir 
635cdf0e10cSrcweir //------------------------------------------------------------------------
636cdf0e10cSrcweir 
637cdf0e10cSrcweir sal_uInt16 XLineStyleItem::GetValueCount() const
638cdf0e10cSrcweir {
639cdf0e10cSrcweir 	return 3;
640cdf0e10cSrcweir }
641cdf0e10cSrcweir 
642cdf0e10cSrcweir 
643cdf0e10cSrcweir // ------------
644cdf0e10cSrcweir // class XDash
645cdf0e10cSrcweir // ------------
646cdf0e10cSrcweir /*************************************************************************
647cdf0e10cSrcweir |*
648cdf0e10cSrcweir |*	  XDash::XDash(XDashStyle, sal_uInt16, sal_uIntPtr, sal_uInt16, sal_uIntPtr, sal_uIntPtr)
649cdf0e10cSrcweir |*
650cdf0e10cSrcweir |*	  Beschreibung
651cdf0e10cSrcweir |*	  Ersterstellung	21.11.94
652cdf0e10cSrcweir |*	  Letzte Aenderung	21.11.94
653cdf0e10cSrcweir |*
654cdf0e10cSrcweir *************************************************************************/
655cdf0e10cSrcweir 
656cdf0e10cSrcweir XDash::XDash(XDashStyle eTheDash, sal_uInt16 nTheDots, sal_uIntPtr nTheDotLen,
657cdf0e10cSrcweir 			 sal_uInt16 nTheDashes, sal_uIntPtr nTheDashLen, sal_uIntPtr nTheDistance) :
658cdf0e10cSrcweir 	eDash(eTheDash),
659cdf0e10cSrcweir 	nDots(nTheDots),
660cdf0e10cSrcweir 	nDotLen(nTheDotLen),
661cdf0e10cSrcweir 	nDashes(nTheDashes),
662cdf0e10cSrcweir 	nDashLen(nTheDashLen),
663cdf0e10cSrcweir 	nDistance(nTheDistance)
664cdf0e10cSrcweir {
665cdf0e10cSrcweir }
666cdf0e10cSrcweir 
667cdf0e10cSrcweir /*************************************************************************
668cdf0e10cSrcweir |*
669cdf0e10cSrcweir |*	  int XDash::operator==(const SfxPoolItem& rItem) const
670cdf0e10cSrcweir |*
671cdf0e10cSrcweir |*	  Beschreibung
672cdf0e10cSrcweir |*	  Ersterstellung	29.11.94
673cdf0e10cSrcweir |*	  Letzte Aenderung	29.11.94
674cdf0e10cSrcweir |*
675cdf0e10cSrcweir *************************************************************************/
676cdf0e10cSrcweir 
677cdf0e10cSrcweir bool XDash::operator==(const XDash& rDash) const
678cdf0e10cSrcweir {
679cdf0e10cSrcweir 	return ( eDash		== rDash.eDash		&&
680cdf0e10cSrcweir 			 nDots		== rDash.nDots		&&
681cdf0e10cSrcweir 			 nDotLen	== rDash.nDotLen	&&
682cdf0e10cSrcweir 			 nDashes	== rDash.nDashes	&&
683cdf0e10cSrcweir 			 nDashLen	== rDash.nDashLen	&&
684cdf0e10cSrcweir 			 nDistance	== rDash.nDistance );
685cdf0e10cSrcweir }
686cdf0e10cSrcweir 
687cdf0e10cSrcweir // XDash is translated into an array of doubles which describe the lengths of the
688cdf0e10cSrcweir // dashes, dots and empty passages. It returns the complete length of the full DashDot
689cdf0e10cSrcweir // sequence and fills the given vetor of doubles accordingly (also resizing, so deleting it).
690cdf0e10cSrcweir static double SMALLEST_DASH_WIDTH(26.95);
691cdf0e10cSrcweir double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double fLineWidth) const
692cdf0e10cSrcweir {
693cdf0e10cSrcweir 	double fFullDotDashLen(0.0);
694cdf0e10cSrcweir 	const sal_uInt16 nNumDotDashArray = (GetDots() + GetDashes()) * 2;
695cdf0e10cSrcweir 	rDotDashArray.resize( nNumDotDashArray, 0.0 );
696cdf0e10cSrcweir 	sal_uInt16 a;
697cdf0e10cSrcweir 	sal_uInt16 nIns(0);
698cdf0e10cSrcweir 	double fDashDotDistance = (double)GetDistance();
699cdf0e10cSrcweir 	double fSingleDashLen = (double)GetDashLen();
700cdf0e10cSrcweir 	double fSingleDotLen = (double)GetDotLen();
701cdf0e10cSrcweir 
702cdf0e10cSrcweir 	if(GetDashStyle() == XDASH_RECTRELATIVE || GetDashStyle() == XDASH_ROUNDRELATIVE)
703cdf0e10cSrcweir 	{
704cdf0e10cSrcweir 		if(fLineWidth != 0.0)
705cdf0e10cSrcweir 		{
706cdf0e10cSrcweir 			double fFactor = fLineWidth / 100.0;
707cdf0e10cSrcweir 
708cdf0e10cSrcweir 			if(GetDashes())
709cdf0e10cSrcweir 			{
710cdf0e10cSrcweir 				if(GetDashLen())
711cdf0e10cSrcweir 				{
712cdf0e10cSrcweir 					// is a dash
713cdf0e10cSrcweir 					fSingleDashLen *= fFactor;
714cdf0e10cSrcweir 				}
715cdf0e10cSrcweir 				else
716cdf0e10cSrcweir 				{
717cdf0e10cSrcweir 					// is a dot
718cdf0e10cSrcweir 					fSingleDashLen = fLineWidth;
719cdf0e10cSrcweir 				}
720cdf0e10cSrcweir 			}
721cdf0e10cSrcweir 
722cdf0e10cSrcweir 			if(GetDots())
723cdf0e10cSrcweir 			{
724cdf0e10cSrcweir 				if(GetDotLen())
725cdf0e10cSrcweir 				{
726cdf0e10cSrcweir 					// is a dash
727cdf0e10cSrcweir 					fSingleDotLen *= fFactor;
728cdf0e10cSrcweir 				}
729cdf0e10cSrcweir 				else
730cdf0e10cSrcweir 				{
731cdf0e10cSrcweir 					// is a dot
732cdf0e10cSrcweir 					fSingleDotLen = fLineWidth;
733cdf0e10cSrcweir 				}
734cdf0e10cSrcweir 			}
735cdf0e10cSrcweir 
736cdf0e10cSrcweir 			if(GetDashes() || GetDots())
737cdf0e10cSrcweir 			{
738cdf0e10cSrcweir 				if(GetDistance())
739cdf0e10cSrcweir 				{
740cdf0e10cSrcweir 					fDashDotDistance *= fFactor;
741cdf0e10cSrcweir 				}
742cdf0e10cSrcweir 				else
743cdf0e10cSrcweir 				{
744cdf0e10cSrcweir 					fDashDotDistance = fLineWidth;
745cdf0e10cSrcweir 				}
746cdf0e10cSrcweir 			}
747cdf0e10cSrcweir 		}
748cdf0e10cSrcweir 		else
749cdf0e10cSrcweir 		{
750cdf0e10cSrcweir 			if(GetDashes())
751cdf0e10cSrcweir 			{
752cdf0e10cSrcweir 				if(GetDashLen())
753cdf0e10cSrcweir 				{
754cdf0e10cSrcweir 					// is a dash
755cdf0e10cSrcweir 					fSingleDashLen = (SMALLEST_DASH_WIDTH * fSingleDashLen) / 100.0;
756cdf0e10cSrcweir 				}
757cdf0e10cSrcweir 				else
758cdf0e10cSrcweir 				{
759cdf0e10cSrcweir 					// is a dot
760cdf0e10cSrcweir 					fSingleDashLen = SMALLEST_DASH_WIDTH;
761cdf0e10cSrcweir 				}
762cdf0e10cSrcweir 			}
763cdf0e10cSrcweir 
764cdf0e10cSrcweir 			if(GetDots())
765cdf0e10cSrcweir 			{
766cdf0e10cSrcweir 				if(GetDotLen())
767cdf0e10cSrcweir 				{
768cdf0e10cSrcweir 					// is a dash
769cdf0e10cSrcweir 					fSingleDotLen = (SMALLEST_DASH_WIDTH * fSingleDotLen) / 100.0;
770cdf0e10cSrcweir 				}
771cdf0e10cSrcweir 				else
772cdf0e10cSrcweir 				{
773cdf0e10cSrcweir 					// is a dot
774cdf0e10cSrcweir 					fSingleDotLen = SMALLEST_DASH_WIDTH;
775cdf0e10cSrcweir 				}
776cdf0e10cSrcweir 			}
777cdf0e10cSrcweir 
778cdf0e10cSrcweir 			if(GetDashes() || GetDots())
779cdf0e10cSrcweir 			{
780cdf0e10cSrcweir 				if(GetDistance())
781cdf0e10cSrcweir 				{
782cdf0e10cSrcweir 					// dash as distance
783cdf0e10cSrcweir 					fDashDotDistance = (SMALLEST_DASH_WIDTH * fDashDotDistance) / 100.0;
784cdf0e10cSrcweir 				}
785cdf0e10cSrcweir 				else
786cdf0e10cSrcweir 				{
787cdf0e10cSrcweir 					// dot as distance
788cdf0e10cSrcweir 					fDashDotDistance = SMALLEST_DASH_WIDTH;
789cdf0e10cSrcweir 				}
790cdf0e10cSrcweir 			}
791cdf0e10cSrcweir 		}
792cdf0e10cSrcweir 	}
793cdf0e10cSrcweir 	else
794cdf0e10cSrcweir 	{
795cdf0e10cSrcweir 		// smallest dot size compare value
796cdf0e10cSrcweir 		double fDotCompVal(fLineWidth != 0.0 ? fLineWidth : SMALLEST_DASH_WIDTH);
797cdf0e10cSrcweir 
798cdf0e10cSrcweir 		// absolute values
799cdf0e10cSrcweir 		if(GetDashes())
800cdf0e10cSrcweir 		{
801cdf0e10cSrcweir 			if(GetDashLen())
802cdf0e10cSrcweir 			{
803cdf0e10cSrcweir 				// is a dash
804cdf0e10cSrcweir 				if(fSingleDashLen < SMALLEST_DASH_WIDTH)
805cdf0e10cSrcweir 				{
806cdf0e10cSrcweir 					fSingleDashLen = SMALLEST_DASH_WIDTH;
807cdf0e10cSrcweir 				}
808cdf0e10cSrcweir 			}
809cdf0e10cSrcweir 			else
810cdf0e10cSrcweir 			{
811cdf0e10cSrcweir 				// is a dot
812cdf0e10cSrcweir 				if(fSingleDashLen < fDotCompVal)
813cdf0e10cSrcweir 				{
814cdf0e10cSrcweir 					fSingleDashLen = fDotCompVal;
815cdf0e10cSrcweir 				}
816cdf0e10cSrcweir 			}
817cdf0e10cSrcweir 		}
818cdf0e10cSrcweir 
819cdf0e10cSrcweir 		if(GetDots())
820cdf0e10cSrcweir 		{
821cdf0e10cSrcweir 			if(GetDotLen())
822cdf0e10cSrcweir 			{
823cdf0e10cSrcweir 				// is a dash
824cdf0e10cSrcweir 				if(fSingleDotLen < SMALLEST_DASH_WIDTH)
825cdf0e10cSrcweir 				{
826cdf0e10cSrcweir 					fSingleDotLen = SMALLEST_DASH_WIDTH;
827cdf0e10cSrcweir 				}
828cdf0e10cSrcweir 			}
829cdf0e10cSrcweir 			else
830cdf0e10cSrcweir 			{
831cdf0e10cSrcweir 				// is a dot
832cdf0e10cSrcweir 				if(fSingleDotLen < fDotCompVal)
833cdf0e10cSrcweir 				{
834cdf0e10cSrcweir 					fSingleDotLen = fDotCompVal;
835cdf0e10cSrcweir 				}
836cdf0e10cSrcweir 			}
837cdf0e10cSrcweir 		}
838cdf0e10cSrcweir 
839cdf0e10cSrcweir 		if(GetDashes() || GetDots())
840cdf0e10cSrcweir 		{
841cdf0e10cSrcweir 			if(GetDistance())
842cdf0e10cSrcweir 			{
843cdf0e10cSrcweir 				// dash as distance
844cdf0e10cSrcweir 				if(fDashDotDistance < SMALLEST_DASH_WIDTH)
845cdf0e10cSrcweir 				{
846cdf0e10cSrcweir 					fDashDotDistance = SMALLEST_DASH_WIDTH;
847cdf0e10cSrcweir 				}
848cdf0e10cSrcweir 			}
849cdf0e10cSrcweir 			else
850cdf0e10cSrcweir 			{
851cdf0e10cSrcweir 				// dot as distance
852cdf0e10cSrcweir 				if(fDashDotDistance < fDotCompVal)
853cdf0e10cSrcweir 				{
854cdf0e10cSrcweir 					fDashDotDistance = fDotCompVal;
855cdf0e10cSrcweir 				}
856cdf0e10cSrcweir 			}
857cdf0e10cSrcweir 		}
858cdf0e10cSrcweir 	}
859cdf0e10cSrcweir 
860cdf0e10cSrcweir 	for(a=0;a<GetDots();a++)
861cdf0e10cSrcweir 	{
862cdf0e10cSrcweir 		rDotDashArray[nIns++] = fSingleDotLen;
863cdf0e10cSrcweir 		fFullDotDashLen += fSingleDotLen;
864cdf0e10cSrcweir 		rDotDashArray[nIns++] = fDashDotDistance;
865cdf0e10cSrcweir 		fFullDotDashLen += fDashDotDistance;
866cdf0e10cSrcweir 	}
867cdf0e10cSrcweir 
868cdf0e10cSrcweir 	for(a=0;a<GetDashes();a++)
869cdf0e10cSrcweir 	{
870cdf0e10cSrcweir 		rDotDashArray[nIns++] = fSingleDashLen;
871cdf0e10cSrcweir 		fFullDotDashLen += fSingleDashLen;
872cdf0e10cSrcweir 		rDotDashArray[nIns++] = fDashDotDistance;
873cdf0e10cSrcweir 		fFullDotDashLen += fDashDotDistance;
874cdf0e10cSrcweir 	}
875cdf0e10cSrcweir 
876cdf0e10cSrcweir 	return fFullDotDashLen;
877cdf0e10cSrcweir }
878cdf0e10cSrcweir 
879cdf0e10cSrcweir // -------------------
880cdf0e10cSrcweir // class XLineDashItem
881cdf0e10cSrcweir // -------------------
882cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex);
883cdf0e10cSrcweir 
884cdf0e10cSrcweir /*************************************************************************
885cdf0e10cSrcweir |*
886cdf0e10cSrcweir |*	  XLineDashItem::XLineDashItem(sal_Int32 nIndex, const XDash& rTheDash)
887cdf0e10cSrcweir |*
888cdf0e10cSrcweir |*	  Beschreibung
889cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
890cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
891cdf0e10cSrcweir |*
892cdf0e10cSrcweir *************************************************************************/
893cdf0e10cSrcweir 
894cdf0e10cSrcweir XLineDashItem::XLineDashItem(sal_Int32 nIndex, const XDash& rTheDash) :
895cdf0e10cSrcweir 	NameOrIndex(XATTR_LINEDASH, nIndex),
896cdf0e10cSrcweir 	aDash(rTheDash)
897cdf0e10cSrcweir {
898cdf0e10cSrcweir }
899cdf0e10cSrcweir 
900cdf0e10cSrcweir /*************************************************************************
901cdf0e10cSrcweir |*
902cdf0e10cSrcweir |*	  XLineDashItem::XLineDashItem(const String& rName, const XDash& rTheDash)
903cdf0e10cSrcweir |*
904cdf0e10cSrcweir |*	  Beschreibung
905cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
906cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
907cdf0e10cSrcweir |*
908cdf0e10cSrcweir *************************************************************************/
909cdf0e10cSrcweir 
910cdf0e10cSrcweir XLineDashItem::XLineDashItem(const XubString& rName, const XDash& rTheDash) :
911cdf0e10cSrcweir 	NameOrIndex(XATTR_LINEDASH, rName),
912cdf0e10cSrcweir 	aDash(rTheDash)
913cdf0e10cSrcweir {
914cdf0e10cSrcweir }
915cdf0e10cSrcweir 
916cdf0e10cSrcweir /*************************************************************************
917cdf0e10cSrcweir |*
918cdf0e10cSrcweir |*	  XLineDashItem::XLineDashItem(const XLineDashItem& rItem)
919cdf0e10cSrcweir |*
920cdf0e10cSrcweir |*	  Beschreibung
921cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
922cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
923cdf0e10cSrcweir |*
924cdf0e10cSrcweir *************************************************************************/
925cdf0e10cSrcweir 
926cdf0e10cSrcweir XLineDashItem::XLineDashItem(const XLineDashItem& rItem) :
927cdf0e10cSrcweir 	NameOrIndex(rItem),
928cdf0e10cSrcweir 	aDash(rItem.aDash)
929cdf0e10cSrcweir {
930cdf0e10cSrcweir }
931cdf0e10cSrcweir 
932cdf0e10cSrcweir /*************************************************************************
933cdf0e10cSrcweir |*
934cdf0e10cSrcweir |*	  XLineDashItem::XLineDashItem(SvStream& rIn)
935cdf0e10cSrcweir |*
936cdf0e10cSrcweir |*	  Beschreibung
937cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
938cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
939cdf0e10cSrcweir |*
940cdf0e10cSrcweir *************************************************************************/
941cdf0e10cSrcweir 
942cdf0e10cSrcweir XLineDashItem::XLineDashItem(SvStream& rIn) :
943cdf0e10cSrcweir 	NameOrIndex(XATTR_LINEDASH, rIn)
944cdf0e10cSrcweir {
945cdf0e10cSrcweir 	if (!IsIndex())
946cdf0e10cSrcweir 	{
947cdf0e10cSrcweir 		sal_uInt16	nSTemp;
948cdf0e10cSrcweir 		sal_uInt32	nLTemp;
949cdf0e10cSrcweir 		sal_Int32   nITemp;
950cdf0e10cSrcweir 
951cdf0e10cSrcweir 		rIn >> nITemp; aDash.SetDashStyle((XDashStyle)nITemp);
952cdf0e10cSrcweir 		rIn >> nSTemp; aDash.SetDots(nSTemp);
953cdf0e10cSrcweir 		rIn >> nLTemp; aDash.SetDotLen(nLTemp);
954cdf0e10cSrcweir 		rIn >> nSTemp; aDash.SetDashes(nSTemp);
955cdf0e10cSrcweir 		rIn >> nLTemp; aDash.SetDashLen(nLTemp);
956cdf0e10cSrcweir 		rIn >> nLTemp; aDash.SetDistance(nLTemp);
957cdf0e10cSrcweir 	}
958cdf0e10cSrcweir }
959cdf0e10cSrcweir 
960cdf0e10cSrcweir //*************************************************************************
961cdf0e10cSrcweir 
962cdf0e10cSrcweir XLineDashItem::XLineDashItem(SfxItemPool* /*pPool*/, const XDash& rTheDash)
963cdf0e10cSrcweir : 	NameOrIndex( XATTR_LINEDASH, -1 ),
964cdf0e10cSrcweir 	aDash(rTheDash)
965cdf0e10cSrcweir {
966cdf0e10cSrcweir }
967cdf0e10cSrcweir 
968cdf0e10cSrcweir //*************************************************************************
969cdf0e10cSrcweir 
970cdf0e10cSrcweir XLineDashItem::XLineDashItem(SfxItemPool* /*pPool*/)
971cdf0e10cSrcweir : NameOrIndex(XATTR_LINEDASH, -1 )
972cdf0e10cSrcweir {
973cdf0e10cSrcweir }
974cdf0e10cSrcweir 
975cdf0e10cSrcweir /*************************************************************************
976cdf0e10cSrcweir |*
977cdf0e10cSrcweir |*	  XLineDashItem::Clone(SfxItemPool* pPool) const
978cdf0e10cSrcweir |*
979cdf0e10cSrcweir |*	  Beschreibung
980cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
981cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
982cdf0e10cSrcweir |*
983cdf0e10cSrcweir *************************************************************************/
984cdf0e10cSrcweir 
985cdf0e10cSrcweir SfxPoolItem* XLineDashItem::Clone(SfxItemPool* /*pPool*/) const
986cdf0e10cSrcweir {
987cdf0e10cSrcweir 	return new XLineDashItem(*this);
988cdf0e10cSrcweir }
989cdf0e10cSrcweir 
990cdf0e10cSrcweir /*************************************************************************
991cdf0e10cSrcweir |*
992cdf0e10cSrcweir |*	  int XLineDashItem::operator==(const SfxPoolItem& rItem) const
993cdf0e10cSrcweir |*
994cdf0e10cSrcweir |*	  Beschreibung
995cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
996cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
997cdf0e10cSrcweir |*
998cdf0e10cSrcweir *************************************************************************/
999cdf0e10cSrcweir 
1000cdf0e10cSrcweir int XLineDashItem::operator==(const SfxPoolItem& rItem) const
1001cdf0e10cSrcweir {
1002cdf0e10cSrcweir 	return ( NameOrIndex::operator==(rItem) &&
1003cdf0e10cSrcweir 			 aDash == ((const XLineDashItem&) rItem).aDash );
1004cdf0e10cSrcweir }
1005cdf0e10cSrcweir 
1006cdf0e10cSrcweir /*************************************************************************
1007cdf0e10cSrcweir |*
1008cdf0e10cSrcweir |*	  SfxPoolItem* XLineDashItem::Create(SvStream& rIn, sal_uInt16 nVer) const
1009cdf0e10cSrcweir |*
1010cdf0e10cSrcweir |*	  Beschreibung
1011cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1012cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1013cdf0e10cSrcweir |*
1014cdf0e10cSrcweir *************************************************************************/
1015cdf0e10cSrcweir 
1016cdf0e10cSrcweir SfxPoolItem* XLineDashItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
1017cdf0e10cSrcweir {
1018cdf0e10cSrcweir 	return new XLineDashItem(rIn);
1019cdf0e10cSrcweir }
1020cdf0e10cSrcweir 
1021cdf0e10cSrcweir /*************************************************************************
1022cdf0e10cSrcweir |*
1023cdf0e10cSrcweir |*	  SfxPoolItem* XLineDashItem::Store(SvStream& rOut) const
1024cdf0e10cSrcweir |*
1025cdf0e10cSrcweir |*	  Beschreibung
1026cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1027cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1028cdf0e10cSrcweir |*
1029cdf0e10cSrcweir *************************************************************************/
1030cdf0e10cSrcweir 
1031cdf0e10cSrcweir SvStream& XLineDashItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
1032cdf0e10cSrcweir {
1033cdf0e10cSrcweir 	NameOrIndex::Store( rOut, nItemVersion );
1034cdf0e10cSrcweir 
1035cdf0e10cSrcweir 	if (!IsIndex())
1036cdf0e10cSrcweir 	{
1037cdf0e10cSrcweir 		rOut << (sal_Int32) aDash.GetDashStyle();
1038cdf0e10cSrcweir 		rOut << aDash.GetDots();
1039cdf0e10cSrcweir 		rOut << (sal_uInt32) aDash.GetDotLen();
1040cdf0e10cSrcweir 		rOut << aDash.GetDashes();
1041cdf0e10cSrcweir 		rOut << (sal_uInt32) aDash.GetDashLen();
1042cdf0e10cSrcweir 		rOut << (sal_uInt32) aDash.GetDistance();
1043cdf0e10cSrcweir 	}
1044cdf0e10cSrcweir 
1045cdf0e10cSrcweir 	return rOut;
1046cdf0e10cSrcweir }
1047cdf0e10cSrcweir 
1048cdf0e10cSrcweir /*************************************************************************
1049cdf0e10cSrcweir |*
1050*97e8a929SArmin Le Grand |*	  const XDash& XLineDashItem::GetValue(const XDashList* pTable) const
1051cdf0e10cSrcweir |*
1052cdf0e10cSrcweir |*	  Beschreibung
1053cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1054cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
1055cdf0e10cSrcweir |*
1056cdf0e10cSrcweir *************************************************************************/
1057cdf0e10cSrcweir 
1058*97e8a929SArmin Le Grand const XDash& XLineDashItem::GetDashValue(const XDashList* pTable) const // GetValue -> GetDashValue
1059cdf0e10cSrcweir {
1060cdf0e10cSrcweir 	if (!IsIndex())
1061cdf0e10cSrcweir 		return aDash;
1062cdf0e10cSrcweir 	else
1063cdf0e10cSrcweir 		return pTable->GetDash(GetIndex())->GetDash();
1064cdf0e10cSrcweir }
1065cdf0e10cSrcweir 
1066cdf0e10cSrcweir //------------------------------------------------------------------------
1067cdf0e10cSrcweir 
1068cdf0e10cSrcweir SfxItemPresentation XLineDashItem::GetPresentation
1069cdf0e10cSrcweir (
1070cdf0e10cSrcweir 	SfxItemPresentation ePres,
1071cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
1072cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
1073cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
1074cdf0e10cSrcweir )	const
1075cdf0e10cSrcweir {
1076cdf0e10cSrcweir 	switch ( ePres )
1077cdf0e10cSrcweir 	{
1078cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
1079cdf0e10cSrcweir 			rText.Erase();
1080cdf0e10cSrcweir 			return ePres;
1081cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
1082cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
1083cdf0e10cSrcweir 			rText = GetName();
1084cdf0e10cSrcweir 			return ePres;
1085cdf0e10cSrcweir 		default:
1086cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
1087cdf0e10cSrcweir 	}
1088cdf0e10cSrcweir }
1089cdf0e10cSrcweir 
1090cdf0e10cSrcweir //------------------------------------------------------------------------
1091cdf0e10cSrcweir 
1092cdf0e10cSrcweir FASTBOOL XLineDashItem::HasMetrics() const
1093cdf0e10cSrcweir {
1094cdf0e10cSrcweir 	return sal_True;
1095cdf0e10cSrcweir }
1096cdf0e10cSrcweir 
1097cdf0e10cSrcweir //------------------------------------------------------------------------
1098cdf0e10cSrcweir 
1099cdf0e10cSrcweir FASTBOOL XLineDashItem::ScaleMetrics(long nMul, long nDiv)
1100cdf0e10cSrcweir {
1101cdf0e10cSrcweir 	aDash.SetDotLen( ScaleMetricValue( aDash.GetDotLen(), nMul, nDiv ) );
1102cdf0e10cSrcweir 	aDash.SetDashLen( ScaleMetricValue( aDash.GetDashLen(), nMul, nDiv ) );
1103cdf0e10cSrcweir 	aDash.SetDistance( ScaleMetricValue( aDash.GetDistance(), nMul, nDiv ) );
1104cdf0e10cSrcweir 	return sal_True;
1105cdf0e10cSrcweir }
1106cdf0e10cSrcweir 
1107cdf0e10cSrcweir sal_Bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
1108cdf0e10cSrcweir {
1109cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
1110cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
1111cdf0e10cSrcweir 
1112cdf0e10cSrcweir 	switch ( nMemberId )
1113cdf0e10cSrcweir 	{
1114cdf0e10cSrcweir         case 0:
1115cdf0e10cSrcweir         {
1116cdf0e10cSrcweir             uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
1117cdf0e10cSrcweir 
1118cdf0e10cSrcweir             ::com::sun::star::drawing::LineDash aLineDash;
1119cdf0e10cSrcweir 
1120cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1121cdf0e10cSrcweir 			aLineDash.Style = (::com::sun::star::drawing::DashStyle)((sal_uInt16)rXD.GetDashStyle());
1122cdf0e10cSrcweir 			aLineDash.Dots = rXD.GetDots();
1123cdf0e10cSrcweir 			aLineDash.DotLen = rXD.GetDotLen();
1124cdf0e10cSrcweir 			aLineDash.Dashes = rXD.GetDashes();
1125cdf0e10cSrcweir 			aLineDash.DashLen = rXD.GetDashLen();
1126cdf0e10cSrcweir 			aLineDash.Distance = rXD.GetDistance();
1127cdf0e10cSrcweir 
1128cdf0e10cSrcweir 			rtl::OUString aApiName;
1129cdf0e10cSrcweir 			SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
1130cdf0e10cSrcweir             aPropSeq[0].Name    = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ));
1131cdf0e10cSrcweir             aPropSeq[0].Value   = uno::makeAny( aApiName );
1132cdf0e10cSrcweir             aPropSeq[1].Name    = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineDash" ));
1133cdf0e10cSrcweir             aPropSeq[1].Value   = uno::makeAny( aLineDash );
1134cdf0e10cSrcweir             rVal = uno::makeAny( aPropSeq );
1135cdf0e10cSrcweir             break;
1136cdf0e10cSrcweir         }
1137cdf0e10cSrcweir 
1138cdf0e10cSrcweir         case MID_NAME:
1139cdf0e10cSrcweir 		{
1140cdf0e10cSrcweir 			rtl::OUString aApiName;
1141cdf0e10cSrcweir 			SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
1142cdf0e10cSrcweir 			rVal <<= aApiName;
1143cdf0e10cSrcweir 			break;
1144cdf0e10cSrcweir 		}
1145cdf0e10cSrcweir 
1146cdf0e10cSrcweir 		case MID_LINEDASH:
1147cdf0e10cSrcweir 		{
1148cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1149cdf0e10cSrcweir 
1150cdf0e10cSrcweir 			::com::sun::star::drawing::LineDash aLineDash;
1151cdf0e10cSrcweir 
1152cdf0e10cSrcweir 			aLineDash.Style = (::com::sun::star::drawing::DashStyle)((sal_uInt16)rXD.GetDashStyle());
1153cdf0e10cSrcweir 			aLineDash.Dots = rXD.GetDots();
1154cdf0e10cSrcweir 			aLineDash.DotLen = rXD.GetDotLen();
1155cdf0e10cSrcweir 			aLineDash.Dashes = rXD.GetDashes();
1156cdf0e10cSrcweir 			aLineDash.DashLen = rXD.GetDashLen();
1157cdf0e10cSrcweir 			aLineDash.Distance = rXD.GetDistance();
1158cdf0e10cSrcweir 
1159cdf0e10cSrcweir 			rVal <<= aLineDash;
1160cdf0e10cSrcweir 			break;
1161cdf0e10cSrcweir 		}
1162cdf0e10cSrcweir 
1163cdf0e10cSrcweir 		case MID_LINEDASH_STYLE:
1164cdf0e10cSrcweir 		{
1165cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1166cdf0e10cSrcweir 			rVal <<= (::com::sun::star::drawing::DashStyle)((sal_Int16)rXD.GetDashStyle());
1167cdf0e10cSrcweir 			break;
1168cdf0e10cSrcweir 		}
1169cdf0e10cSrcweir 
1170cdf0e10cSrcweir 		case MID_LINEDASH_DOTS:
1171cdf0e10cSrcweir 		{
1172cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1173cdf0e10cSrcweir 			rVal <<= rXD.GetDots();
1174cdf0e10cSrcweir 			break;
1175cdf0e10cSrcweir 		}
1176cdf0e10cSrcweir 
1177cdf0e10cSrcweir 		case MID_LINEDASH_DOTLEN:
1178cdf0e10cSrcweir 		{
1179cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1180cdf0e10cSrcweir 			rVal <<= rXD.GetDotLen();
1181cdf0e10cSrcweir 			break;
1182cdf0e10cSrcweir 		}
1183cdf0e10cSrcweir 
1184cdf0e10cSrcweir 		case MID_LINEDASH_DASHES:
1185cdf0e10cSrcweir 		{
1186cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1187cdf0e10cSrcweir 			rVal <<= rXD.GetDashes();
1188cdf0e10cSrcweir 			break;
1189cdf0e10cSrcweir 		}
1190cdf0e10cSrcweir 
1191cdf0e10cSrcweir 		case MID_LINEDASH_DASHLEN:
1192cdf0e10cSrcweir 		{
1193cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1194cdf0e10cSrcweir 			rVal <<= rXD.GetDashLen();
1195cdf0e10cSrcweir 			break;
1196cdf0e10cSrcweir 		}
1197cdf0e10cSrcweir 
1198cdf0e10cSrcweir 		case MID_LINEDASH_DISTANCE:
1199cdf0e10cSrcweir 		{
1200cdf0e10cSrcweir 			const XDash& rXD = GetDashValue();
1201cdf0e10cSrcweir 			rVal <<= rXD.GetDistance();
1202cdf0e10cSrcweir 			break;
1203cdf0e10cSrcweir 		}
1204cdf0e10cSrcweir 
1205cdf0e10cSrcweir 		default: DBG_ERROR("Wrong MemberId!"); return sal_False;
1206cdf0e10cSrcweir 	}
1207cdf0e10cSrcweir 
1208cdf0e10cSrcweir 	return sal_True;
1209cdf0e10cSrcweir }
1210cdf0e10cSrcweir 
1211cdf0e10cSrcweir sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
1212cdf0e10cSrcweir {
1213cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
1214cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
1215cdf0e10cSrcweir 
1216cdf0e10cSrcweir 	switch ( nMemberId )
1217cdf0e10cSrcweir 	{
1218cdf0e10cSrcweir         case 0:
1219cdf0e10cSrcweir         {
1220cdf0e10cSrcweir             uno::Sequence< beans::PropertyValue >   aPropSeq;
1221cdf0e10cSrcweir             ::com::sun::star::drawing::LineDash     aLineDash;
1222cdf0e10cSrcweir             rtl::OUString                           aName;
1223cdf0e10cSrcweir             sal_Bool                                bLineDash( sal_False );
1224cdf0e10cSrcweir 
1225cdf0e10cSrcweir             if ( rVal >>= aPropSeq )
1226cdf0e10cSrcweir             {
1227cdf0e10cSrcweir                 for ( sal_Int32 n = 0; n < aPropSeq.getLength(); n++ )
1228cdf0e10cSrcweir                 {
1229cdf0e10cSrcweir                     if ( aPropSeq[n].Name.equalsAsciiL( "Name", 4  ))
1230cdf0e10cSrcweir                         aPropSeq[n].Value >>= aName;
1231cdf0e10cSrcweir                     else if ( aPropSeq[n].Name.equalsAsciiL( "LineDash", 8 ))
1232cdf0e10cSrcweir                     {
1233cdf0e10cSrcweir                         if ( aPropSeq[n].Value >>= aLineDash )
1234cdf0e10cSrcweir                             bLineDash = sal_True;
1235cdf0e10cSrcweir                     }
1236cdf0e10cSrcweir                 }
1237cdf0e10cSrcweir 
1238cdf0e10cSrcweir                 SetName( aName );
1239cdf0e10cSrcweir                 if ( bLineDash )
1240cdf0e10cSrcweir                 {
1241cdf0e10cSrcweir 			        XDash aXDash;
1242cdf0e10cSrcweir 
1243cdf0e10cSrcweir 			        aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(aLineDash.Style)));
1244cdf0e10cSrcweir 			        aXDash.SetDots(aLineDash.Dots);
1245cdf0e10cSrcweir 			        aXDash.SetDotLen(aLineDash.DotLen);
1246cdf0e10cSrcweir 			        aXDash.SetDashes(aLineDash.Dashes);
1247cdf0e10cSrcweir 			        aXDash.SetDashLen(aLineDash.DashLen);
1248cdf0e10cSrcweir 			        aXDash.SetDistance(aLineDash.Distance);
1249cdf0e10cSrcweir 
1250cdf0e10cSrcweir 			        if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
1251cdf0e10cSrcweir 				        aXDash.SetDots(1);
1252cdf0e10cSrcweir 
1253cdf0e10cSrcweir 			        SetDashValue( aXDash );
1254cdf0e10cSrcweir                 }
1255cdf0e10cSrcweir 
1256cdf0e10cSrcweir                 return sal_True;
1257cdf0e10cSrcweir             }
1258cdf0e10cSrcweir 
1259cdf0e10cSrcweir             return sal_False;
1260cdf0e10cSrcweir         }
1261cdf0e10cSrcweir 
1262cdf0e10cSrcweir         case MID_NAME:
1263cdf0e10cSrcweir 		{
1264cdf0e10cSrcweir 			rtl::OUString aName;
1265cdf0e10cSrcweir 			if (!(rVal >>= aName))
1266cdf0e10cSrcweir 				return sal_False;
1267cdf0e10cSrcweir 			SetName( aName );
1268cdf0e10cSrcweir 			break;
1269cdf0e10cSrcweir 		}
1270cdf0e10cSrcweir 
1271cdf0e10cSrcweir 		case MID_LINEDASH:
1272cdf0e10cSrcweir 		{
1273cdf0e10cSrcweir 			::com::sun::star::drawing::LineDash aLineDash;
1274cdf0e10cSrcweir 			if(!(rVal >>= aLineDash))
1275cdf0e10cSrcweir 				return sal_False;
1276cdf0e10cSrcweir 
1277cdf0e10cSrcweir 			XDash aXDash;
1278cdf0e10cSrcweir 
1279cdf0e10cSrcweir 			aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(aLineDash.Style)));
1280cdf0e10cSrcweir 			aXDash.SetDots(aLineDash.Dots);
1281cdf0e10cSrcweir 			aXDash.SetDotLen(aLineDash.DotLen);
1282cdf0e10cSrcweir 			aXDash.SetDashes(aLineDash.Dashes);
1283cdf0e10cSrcweir 			aXDash.SetDashLen(aLineDash.DashLen);
1284cdf0e10cSrcweir 			aXDash.SetDistance(aLineDash.Distance);
1285cdf0e10cSrcweir 
1286cdf0e10cSrcweir 			if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
1287cdf0e10cSrcweir 				aXDash.SetDots(1);
1288cdf0e10cSrcweir 
1289cdf0e10cSrcweir 			SetDashValue( aXDash );
1290cdf0e10cSrcweir 			break;
1291cdf0e10cSrcweir 		}
1292cdf0e10cSrcweir 
1293cdf0e10cSrcweir 		case MID_LINEDASH_STYLE:
1294cdf0e10cSrcweir 		{
1295cdf0e10cSrcweir 			sal_Int16 nVal = sal_Int16();
1296cdf0e10cSrcweir 			if(!(rVal >>= nVal))
1297cdf0e10cSrcweir 				return sal_False;
1298cdf0e10cSrcweir 
1299cdf0e10cSrcweir 			XDash aXDash = GetDashValue();
1300cdf0e10cSrcweir 			aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(nVal)));
1301cdf0e10cSrcweir 
1302cdf0e10cSrcweir 			if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
1303cdf0e10cSrcweir 				aXDash.SetDots(1);
1304cdf0e10cSrcweir 
1305cdf0e10cSrcweir 			SetDashValue( aXDash );
1306cdf0e10cSrcweir 
1307cdf0e10cSrcweir 			break;
1308cdf0e10cSrcweir 		}
1309cdf0e10cSrcweir 
1310cdf0e10cSrcweir 		case MID_LINEDASH_DOTS:
1311cdf0e10cSrcweir 		case MID_LINEDASH_DASHES:
1312cdf0e10cSrcweir 		{
1313cdf0e10cSrcweir 			sal_Int16 nVal = sal_Int16();
1314cdf0e10cSrcweir 			if(!(rVal >>= nVal))
1315cdf0e10cSrcweir 				return sal_False;
1316cdf0e10cSrcweir 
1317cdf0e10cSrcweir 			XDash aXDash = GetDashValue();
1318cdf0e10cSrcweir 			if ( nMemberId == MID_LINEDASH_DOTS )
1319cdf0e10cSrcweir 				aXDash.SetDots( nVal );
1320cdf0e10cSrcweir 			else
1321cdf0e10cSrcweir 				aXDash.SetDashes( nVal );
1322cdf0e10cSrcweir 
1323cdf0e10cSrcweir 			if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
1324cdf0e10cSrcweir 				aXDash.SetDots(1);
1325cdf0e10cSrcweir 
1326cdf0e10cSrcweir 			SetDashValue( aXDash );
1327cdf0e10cSrcweir 			break;
1328cdf0e10cSrcweir 		}
1329cdf0e10cSrcweir 
1330cdf0e10cSrcweir 		case MID_LINEDASH_DOTLEN:
1331cdf0e10cSrcweir 		case MID_LINEDASH_DASHLEN:
1332cdf0e10cSrcweir 		case MID_LINEDASH_DISTANCE:
1333cdf0e10cSrcweir 		{
1334cdf0e10cSrcweir 			sal_Int32 nVal = 0;
1335cdf0e10cSrcweir 			if(!(rVal >>= nVal))
1336cdf0e10cSrcweir 				return sal_False;
1337cdf0e10cSrcweir 
1338cdf0e10cSrcweir 			XDash aXDash = GetDashValue();
1339cdf0e10cSrcweir 			if ( nMemberId == MID_LINEDASH_DOTLEN )
1340cdf0e10cSrcweir 				aXDash.SetDotLen( nVal );
1341cdf0e10cSrcweir 			else if ( nMemberId == MID_LINEDASH_DASHLEN )
1342cdf0e10cSrcweir 				aXDash.SetDashLen( nVal );
1343cdf0e10cSrcweir 			else
1344cdf0e10cSrcweir 				aXDash.SetDistance( nVal );
1345cdf0e10cSrcweir 
1346cdf0e10cSrcweir 			if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
1347cdf0e10cSrcweir 				aXDash.SetDots(1);
1348cdf0e10cSrcweir 
1349cdf0e10cSrcweir 			SetDashValue( aXDash );
1350cdf0e10cSrcweir 			break;
1351cdf0e10cSrcweir 		}
1352cdf0e10cSrcweir 	}
1353cdf0e10cSrcweir 
1354cdf0e10cSrcweir 	return sal_True;
1355cdf0e10cSrcweir }
1356cdf0e10cSrcweir 
1357cdf0e10cSrcweir sal_Bool XLineDashItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
1358cdf0e10cSrcweir {
1359cdf0e10cSrcweir 	return ((XLineDashItem*)p1)->GetDashValue() == ((XLineDashItem*)p2)->GetDashValue();
1360cdf0e10cSrcweir }
1361cdf0e10cSrcweir 
1362cdf0e10cSrcweir XLineDashItem* XLineDashItem::checkForUniqueItem( SdrModel* pModel ) const
1363cdf0e10cSrcweir {
1364cdf0e10cSrcweir 	if( pModel )
1365cdf0e10cSrcweir 	{
1366cdf0e10cSrcweir 		const String aUniqueName = NameOrIndex::CheckNamedItem(	this,
1367cdf0e10cSrcweir 																XATTR_LINEDASH,
1368cdf0e10cSrcweir 																&pModel->GetItemPool(),
1369cdf0e10cSrcweir 																pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
1370cdf0e10cSrcweir 																XLineDashItem::CompareValueFunc,
1371cdf0e10cSrcweir 																RID_SVXSTR_DASH11,
1372cdf0e10cSrcweir 																pModel->GetDashList() );
1373cdf0e10cSrcweir 
1374cdf0e10cSrcweir 		// if the given name is not valid, replace it!
1375cdf0e10cSrcweir 		if( aUniqueName != GetName() )
1376cdf0e10cSrcweir 		{
1377cdf0e10cSrcweir 			return new XLineDashItem( aUniqueName, aDash );
1378cdf0e10cSrcweir 		}
1379cdf0e10cSrcweir 	}
1380cdf0e10cSrcweir 
1381cdf0e10cSrcweir 	return (XLineDashItem*)this;
1382cdf0e10cSrcweir }
1383cdf0e10cSrcweir 
1384cdf0e10cSrcweir // -------------------
1385cdf0e10cSrcweir // class XLineWidthItem
1386cdf0e10cSrcweir // -------------------
1387cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineWidthItem, SfxMetricItem);
1388cdf0e10cSrcweir 
1389cdf0e10cSrcweir /*************************************************************************
1390cdf0e10cSrcweir |*
1391cdf0e10cSrcweir |*	  XLineWidthItem::XLineWidthItem(long nWidth)
1392cdf0e10cSrcweir |*
1393cdf0e10cSrcweir |*	  Beschreibung
1394cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1395cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
1396cdf0e10cSrcweir |*
1397cdf0e10cSrcweir *************************************************************************/
1398cdf0e10cSrcweir 
1399cdf0e10cSrcweir XLineWidthItem::XLineWidthItem(long nWidth) :
1400cdf0e10cSrcweir 	SfxMetricItem(XATTR_LINEWIDTH, nWidth)
1401cdf0e10cSrcweir {
1402cdf0e10cSrcweir }
1403cdf0e10cSrcweir 
1404cdf0e10cSrcweir /*************************************************************************
1405cdf0e10cSrcweir |*
1406cdf0e10cSrcweir |*	  XLineWidthItem::XLineWidthItem(SvStream& rIn)
1407cdf0e10cSrcweir |*
1408cdf0e10cSrcweir |*	  Beschreibung
1409cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1410cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1411cdf0e10cSrcweir |*
1412cdf0e10cSrcweir *************************************************************************/
1413cdf0e10cSrcweir 
1414cdf0e10cSrcweir XLineWidthItem::XLineWidthItem(SvStream& rIn) :
1415cdf0e10cSrcweir 	SfxMetricItem(XATTR_LINEWIDTH, rIn)
1416cdf0e10cSrcweir {
1417cdf0e10cSrcweir }
1418cdf0e10cSrcweir 
1419cdf0e10cSrcweir /*************************************************************************
1420cdf0e10cSrcweir |*
1421cdf0e10cSrcweir |*	  XLineWidthItem::Clone(SfxItemPool* pPool) const
1422cdf0e10cSrcweir |*
1423cdf0e10cSrcweir |*	  Beschreibung
1424cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1425cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1426cdf0e10cSrcweir |*
1427cdf0e10cSrcweir *************************************************************************/
1428cdf0e10cSrcweir 
1429cdf0e10cSrcweir SfxPoolItem* XLineWidthItem::Clone(SfxItemPool* /*pPool*/) const
1430cdf0e10cSrcweir {
1431cdf0e10cSrcweir 	return new XLineWidthItem(*this);
1432cdf0e10cSrcweir }
1433cdf0e10cSrcweir 
1434cdf0e10cSrcweir /*************************************************************************
1435cdf0e10cSrcweir |*
1436cdf0e10cSrcweir |*	  SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, sal_uInt16 nVer) const
1437cdf0e10cSrcweir |*
1438cdf0e10cSrcweir |*	  Beschreibung
1439cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1440cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1441cdf0e10cSrcweir |*
1442cdf0e10cSrcweir *************************************************************************/
1443cdf0e10cSrcweir 
1444cdf0e10cSrcweir SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
1445cdf0e10cSrcweir {
1446cdf0e10cSrcweir 	return new XLineWidthItem(rIn);
1447cdf0e10cSrcweir }
1448cdf0e10cSrcweir 
1449cdf0e10cSrcweir //------------------------------------------------------------------------
1450cdf0e10cSrcweir 
1451cdf0e10cSrcweir SfxItemPresentation XLineWidthItem::GetPresentation
1452cdf0e10cSrcweir (
1453cdf0e10cSrcweir 	SfxItemPresentation ePres,
1454cdf0e10cSrcweir 	SfxMapUnit			eCoreUnit,
1455cdf0e10cSrcweir 	SfxMapUnit			ePresUnit,
1456cdf0e10cSrcweir     XubString&          rText, const IntlWrapper * pIntl
1457cdf0e10cSrcweir )	const
1458cdf0e10cSrcweir {
1459cdf0e10cSrcweir 	switch ( ePres )
1460cdf0e10cSrcweir 	{
1461cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
1462cdf0e10cSrcweir 			rText.Erase();
1463cdf0e10cSrcweir 			return ePres;
1464cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
1465cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
1466cdf0e10cSrcweir 			rText = GetMetricText( (long) GetValue(),
1467cdf0e10cSrcweir                                     eCoreUnit, ePresUnit, pIntl);
1468cdf0e10cSrcweir 			rText += SVX_RESSTR( GetMetricId( ePresUnit) );
1469cdf0e10cSrcweir 			return ePres;
1470cdf0e10cSrcweir 		default:
1471cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
1472cdf0e10cSrcweir 	}
1473cdf0e10cSrcweir }
1474cdf0e10cSrcweir 
1475cdf0e10cSrcweir sal_Bool XLineWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
1476cdf0e10cSrcweir {
1477cdf0e10cSrcweir     sal_Int32 nValue = GetValue();
1478cdf0e10cSrcweir     if( 0 != (nMemberId&CONVERT_TWIPS) )
1479cdf0e10cSrcweir         nValue = TWIP_TO_MM100(nValue);
1480cdf0e10cSrcweir 
1481cdf0e10cSrcweir     rVal <<= nValue;
1482cdf0e10cSrcweir 	return sal_True;
1483cdf0e10cSrcweir }
1484cdf0e10cSrcweir 
1485cdf0e10cSrcweir sal_Bool XLineWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
1486cdf0e10cSrcweir {
1487cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1488cdf0e10cSrcweir 	rVal >>= nValue;
1489cdf0e10cSrcweir     if( 0 != (nMemberId&CONVERT_TWIPS) )
1490cdf0e10cSrcweir         nValue = MM100_TO_TWIP(nValue);
1491cdf0e10cSrcweir 
1492cdf0e10cSrcweir 	SetValue( nValue );
1493cdf0e10cSrcweir 	return sal_True;
1494cdf0e10cSrcweir }
1495cdf0e10cSrcweir 
1496cdf0e10cSrcweir // -------------------
1497cdf0e10cSrcweir // class XLineColorItem
1498cdf0e10cSrcweir // -------------------
1499cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem);
1500cdf0e10cSrcweir 
1501cdf0e10cSrcweir /*************************************************************************
1502cdf0e10cSrcweir |*
1503cdf0e10cSrcweir |*	  XLineColorItem::XLineColorItem(sal_Int32 nIndex, const Color& rTheColor)
1504cdf0e10cSrcweir |*
1505cdf0e10cSrcweir |*	  Beschreibung
1506cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1507cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1508cdf0e10cSrcweir |*
1509cdf0e10cSrcweir *************************************************************************/
1510cdf0e10cSrcweir 
1511cdf0e10cSrcweir XLineColorItem::XLineColorItem(sal_Int32 nIndex, const Color& rTheColor) :
1512cdf0e10cSrcweir 	XColorItem(XATTR_LINECOLOR, nIndex, rTheColor)
1513cdf0e10cSrcweir {
1514cdf0e10cSrcweir }
1515cdf0e10cSrcweir 
1516cdf0e10cSrcweir /*************************************************************************
1517cdf0e10cSrcweir |*
1518cdf0e10cSrcweir |*	  XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor)
1519cdf0e10cSrcweir |*
1520cdf0e10cSrcweir |*	  Beschreibung
1521cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1522cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1523cdf0e10cSrcweir |*
1524cdf0e10cSrcweir *************************************************************************/
1525cdf0e10cSrcweir 
1526cdf0e10cSrcweir XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor) :
1527cdf0e10cSrcweir 	XColorItem(XATTR_LINECOLOR, rName, rTheColor)
1528cdf0e10cSrcweir {
1529cdf0e10cSrcweir }
1530cdf0e10cSrcweir 
1531cdf0e10cSrcweir /*************************************************************************
1532cdf0e10cSrcweir |*
1533cdf0e10cSrcweir |*	  XLineColorItem::XLineColorItem(SvStream& rIn)
1534cdf0e10cSrcweir |*
1535cdf0e10cSrcweir |*	  Beschreibung
1536cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1537cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1538cdf0e10cSrcweir |*
1539cdf0e10cSrcweir *************************************************************************/
1540cdf0e10cSrcweir 
1541cdf0e10cSrcweir XLineColorItem::XLineColorItem(SvStream& rIn) :
1542cdf0e10cSrcweir 	XColorItem(XATTR_LINECOLOR, rIn)
1543cdf0e10cSrcweir {
1544cdf0e10cSrcweir }
1545cdf0e10cSrcweir 
1546cdf0e10cSrcweir /*************************************************************************
1547cdf0e10cSrcweir |*
1548cdf0e10cSrcweir |*	  XLineColorItem::Clone(SfxItemPool* pPool) const
1549cdf0e10cSrcweir |*
1550cdf0e10cSrcweir |*	  Beschreibung
1551cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1552cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1553cdf0e10cSrcweir |*
1554cdf0e10cSrcweir *************************************************************************/
1555cdf0e10cSrcweir 
1556cdf0e10cSrcweir SfxPoolItem* XLineColorItem::Clone(SfxItemPool* /*pPool*/) const
1557cdf0e10cSrcweir {
1558cdf0e10cSrcweir 	return new XLineColorItem(*this);
1559cdf0e10cSrcweir }
1560cdf0e10cSrcweir 
1561cdf0e10cSrcweir /*************************************************************************
1562cdf0e10cSrcweir |*
1563cdf0e10cSrcweir |*	  SfxPoolItem* XLineColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const
1564cdf0e10cSrcweir |*
1565cdf0e10cSrcweir |*	  Beschreibung
1566cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1567cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1568cdf0e10cSrcweir |*
1569cdf0e10cSrcweir *************************************************************************/
1570cdf0e10cSrcweir 
1571cdf0e10cSrcweir SfxPoolItem* XLineColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
1572cdf0e10cSrcweir {
1573cdf0e10cSrcweir 	return new XLineColorItem(rIn);
1574cdf0e10cSrcweir }
1575cdf0e10cSrcweir 
1576cdf0e10cSrcweir //------------------------------------------------------------------------
1577cdf0e10cSrcweir 
1578cdf0e10cSrcweir SfxItemPresentation XLineColorItem::GetPresentation
1579cdf0e10cSrcweir (
1580cdf0e10cSrcweir 	SfxItemPresentation ePres,
1581cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
1582cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
1583cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
1584cdf0e10cSrcweir )	const
1585cdf0e10cSrcweir {
1586cdf0e10cSrcweir 	switch ( ePres )
1587cdf0e10cSrcweir 	{
1588cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
1589cdf0e10cSrcweir 			rText.Erase();
1590cdf0e10cSrcweir 			return ePres;
1591cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
1592cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
1593cdf0e10cSrcweir 			rText = GetName();
1594cdf0e10cSrcweir 			return ePres;
1595cdf0e10cSrcweir 		default:
1596cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
1597cdf0e10cSrcweir 	}
1598cdf0e10cSrcweir }
1599cdf0e10cSrcweir 
1600cdf0e10cSrcweir sal_Bool XLineColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
1601cdf0e10cSrcweir {
1602cdf0e10cSrcweir     rVal <<= (sal_Int32)GetColorValue().GetRGBColor();
1603cdf0e10cSrcweir 	return sal_True;
1604cdf0e10cSrcweir }
1605cdf0e10cSrcweir 
1606cdf0e10cSrcweir sal_Bool XLineColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
1607cdf0e10cSrcweir {
1608cdf0e10cSrcweir 	sal_Int32 nValue = 0;
1609cdf0e10cSrcweir 	if(!(rVal >>= nValue))
1610cdf0e10cSrcweir 		return sal_False;
1611cdf0e10cSrcweir 
1612cdf0e10cSrcweir 	SetColorValue( nValue );
1613cdf0e10cSrcweir 	return sal_True;
1614cdf0e10cSrcweir }
1615cdf0e10cSrcweir 
1616cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
1617cdf0e10cSrcweir // tooling for simple spooling B2DPolygon to file and back
1618cdf0e10cSrcweir 
1619cdf0e10cSrcweir namespace
1620cdf0e10cSrcweir {
1621cdf0e10cSrcweir 	void streamOutB2DPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, SvStream& rOut)
1622cdf0e10cSrcweir 	{
1623cdf0e10cSrcweir 		const sal_uInt32 nPolygonCount(rPolyPolygon.count());
1624cdf0e10cSrcweir 		rOut << nPolygonCount;
1625cdf0e10cSrcweir 
1626cdf0e10cSrcweir 		for(sal_uInt32 a(0L); a < nPolygonCount; a++)
1627cdf0e10cSrcweir 		{
1628cdf0e10cSrcweir 			const basegfx::B2DPolygon aCandidate(rPolyPolygon.getB2DPolygon(a));
1629cdf0e10cSrcweir 			const sal_uInt32 nPointCount(aCandidate.count());
1630cdf0e10cSrcweir 			const sal_uInt8 bClosed(aCandidate.isClosed() ? 1 : 0);
1631cdf0e10cSrcweir 			const sal_uInt8 bControlPoints(aCandidate.areControlPointsUsed() ? 1 : 0);
1632cdf0e10cSrcweir 			rOut << nPointCount;
1633cdf0e10cSrcweir 			rOut << bClosed;
1634cdf0e10cSrcweir 			rOut << bControlPoints;
1635cdf0e10cSrcweir 
1636cdf0e10cSrcweir 			for(sal_uInt32 b(0L); b < nPointCount; b++)
1637cdf0e10cSrcweir 			{
1638cdf0e10cSrcweir 				const basegfx::B2DPoint aPoint(aCandidate.getB2DPoint(b));
1639cdf0e10cSrcweir 				rOut << aPoint.getX();
1640cdf0e10cSrcweir 				rOut << aPoint.getY();
1641cdf0e10cSrcweir 
1642cdf0e10cSrcweir 				if(bControlPoints)
1643cdf0e10cSrcweir 				{
1644cdf0e10cSrcweir 					const sal_uInt8 bEdgeIsCurve(aCandidate.isPrevControlPointUsed(b) || aCandidate.isNextControlPointUsed(b) ? 1 : 0);
1645cdf0e10cSrcweir 					rOut << bEdgeIsCurve;
1646cdf0e10cSrcweir 
1647cdf0e10cSrcweir 					if(bEdgeIsCurve)
1648cdf0e10cSrcweir 					{
1649cdf0e10cSrcweir 						const basegfx::B2DVector aControlVectorA(aCandidate.getPrevControlPoint(b));
1650cdf0e10cSrcweir 						rOut << aControlVectorA.getX();
1651cdf0e10cSrcweir 						rOut << aControlVectorA.getY();
1652cdf0e10cSrcweir 
1653cdf0e10cSrcweir 						const basegfx::B2DVector aControlVectorB(aCandidate.getNextControlPoint(b));
1654cdf0e10cSrcweir 						rOut << aControlVectorB.getX();
1655cdf0e10cSrcweir 						rOut << aControlVectorB.getY();
1656cdf0e10cSrcweir 					}
1657cdf0e10cSrcweir 				}
1658cdf0e10cSrcweir 			}
1659cdf0e10cSrcweir 		}
1660cdf0e10cSrcweir 	}
1661cdf0e10cSrcweir 
1662cdf0e10cSrcweir 	basegfx::B2DPolyPolygon streamInB2DPolyPolygon(SvStream& rIn)
1663cdf0e10cSrcweir 	{
1664cdf0e10cSrcweir 		basegfx::B2DPolyPolygon aRetval;
1665cdf0e10cSrcweir 		sal_uInt32 nPolygonCount;
1666cdf0e10cSrcweir 		rIn >> nPolygonCount;
1667cdf0e10cSrcweir 
1668cdf0e10cSrcweir 		for(sal_uInt32 a(0L); a < nPolygonCount; a++)
1669cdf0e10cSrcweir 		{
1670cdf0e10cSrcweir 			sal_uInt32 nPointCount;
1671cdf0e10cSrcweir 			sal_uInt8 bClosed;
1672cdf0e10cSrcweir 			sal_uInt8 bControlPoints;
1673cdf0e10cSrcweir 
1674cdf0e10cSrcweir 			rIn >> nPointCount;
1675cdf0e10cSrcweir 			rIn >> bClosed;
1676cdf0e10cSrcweir 			rIn >> bControlPoints;
1677cdf0e10cSrcweir 
1678cdf0e10cSrcweir 			basegfx::B2DPolygon aCandidate;
1679cdf0e10cSrcweir 			aCandidate.setClosed(0 != bClosed);
1680cdf0e10cSrcweir 
1681cdf0e10cSrcweir 			for(sal_uInt32 b(0L); b < nPointCount; b++)
1682cdf0e10cSrcweir 			{
1683cdf0e10cSrcweir 				double fX, fY;
1684cdf0e10cSrcweir 				rIn >> fX;
1685cdf0e10cSrcweir 				rIn >> fY;
1686cdf0e10cSrcweir 				aCandidate.append(basegfx::B2DPoint(fX, fY));
1687cdf0e10cSrcweir 
1688cdf0e10cSrcweir 				if(0 != bControlPoints)
1689cdf0e10cSrcweir 				{
1690cdf0e10cSrcweir 					sal_uInt8 bEdgeIsCurve;
1691cdf0e10cSrcweir 					rIn >> bEdgeIsCurve;
1692cdf0e10cSrcweir 
1693cdf0e10cSrcweir 					if(0 != bEdgeIsCurve)
1694cdf0e10cSrcweir 					{
1695cdf0e10cSrcweir 						rIn >> fX;
1696cdf0e10cSrcweir 						rIn >> fY;
1697cdf0e10cSrcweir 						aCandidate.setPrevControlPoint(b, basegfx::B2DVector(fX, fY));
1698cdf0e10cSrcweir 
1699cdf0e10cSrcweir 						rIn >> fX;
1700cdf0e10cSrcweir 						rIn >> fY;
1701cdf0e10cSrcweir 						aCandidate.setNextControlPoint(b, basegfx::B2DVector(fX, fY));
1702cdf0e10cSrcweir 					}
1703cdf0e10cSrcweir 				}
1704cdf0e10cSrcweir 			}
1705cdf0e10cSrcweir 
1706cdf0e10cSrcweir 			aRetval.append(aCandidate);
1707cdf0e10cSrcweir 		}
1708cdf0e10cSrcweir 
1709cdf0e10cSrcweir 		return aRetval;
1710cdf0e10cSrcweir 	}
1711cdf0e10cSrcweir }
1712cdf0e10cSrcweir 
1713cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
1714cdf0e10cSrcweir 
1715cdf0e10cSrcweir // -----------------------
1716cdf0e10cSrcweir // class XLineStartItem
1717cdf0e10cSrcweir // -----------------------
1718cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex);
1719cdf0e10cSrcweir 
1720cdf0e10cSrcweir /*************************************************************************
1721cdf0e10cSrcweir |*
1722cdf0e10cSrcweir |*	  XLineStartItem::XLineStartItem(sal_Int32 nIndex)
1723cdf0e10cSrcweir |*
1724cdf0e10cSrcweir |*	  Beschreibung
1725cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1726cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
1727cdf0e10cSrcweir |*
1728cdf0e10cSrcweir *************************************************************************/
1729cdf0e10cSrcweir 
1730cdf0e10cSrcweir XLineStartItem::XLineStartItem(sal_Int32 nIndex)
1731cdf0e10cSrcweir :	NameOrIndex(XATTR_LINESTART, nIndex)
1732cdf0e10cSrcweir {
1733cdf0e10cSrcweir }
1734cdf0e10cSrcweir 
1735cdf0e10cSrcweir /*************************************************************************
1736cdf0e10cSrcweir |*
1737cdf0e10cSrcweir |*	  XLineStartItem::XLineStartItem(const XubString& rName,
1738cdf0e10cSrcweir |*									 const basegfx::B2DPolyPolygon& rXPolygon)
1739cdf0e10cSrcweir |*
1740cdf0e10cSrcweir |*	  Beschreibung
1741cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1742cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
1743cdf0e10cSrcweir |*
1744cdf0e10cSrcweir *************************************************************************/
1745cdf0e10cSrcweir 
1746cdf0e10cSrcweir XLineStartItem::XLineStartItem(const XubString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon)
1747cdf0e10cSrcweir :	NameOrIndex(XATTR_LINESTART, rName),
1748cdf0e10cSrcweir 	maPolyPolygon(rPolyPolygon)
1749cdf0e10cSrcweir {
1750cdf0e10cSrcweir }
1751cdf0e10cSrcweir 
1752cdf0e10cSrcweir /*************************************************************************
1753cdf0e10cSrcweir |*
1754cdf0e10cSrcweir |*	  XLineStartItem::XLineStartItem(const XLineStartItem& rItem)
1755cdf0e10cSrcweir |*
1756cdf0e10cSrcweir |*	  Beschreibung
1757cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1758cdf0e10cSrcweir |*	  Letzte Aenderung	17.11.94
1759cdf0e10cSrcweir |*
1760cdf0e10cSrcweir *************************************************************************/
1761cdf0e10cSrcweir 
1762cdf0e10cSrcweir XLineStartItem::XLineStartItem(const XLineStartItem& rItem)
1763cdf0e10cSrcweir :	NameOrIndex(rItem),
1764cdf0e10cSrcweir 	maPolyPolygon(rItem.maPolyPolygon)
1765cdf0e10cSrcweir {
1766cdf0e10cSrcweir }
1767cdf0e10cSrcweir 
1768cdf0e10cSrcweir /*************************************************************************
1769cdf0e10cSrcweir |*
1770cdf0e10cSrcweir |*	  XLineStartItem::XLineStartItem(SvStream& rIn)
1771cdf0e10cSrcweir |*
1772cdf0e10cSrcweir |*	  Beschreibung
1773cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1774cdf0e10cSrcweir |*	  Letzte Aenderung	17.11.94
1775cdf0e10cSrcweir |*
1776cdf0e10cSrcweir *************************************************************************/
1777cdf0e10cSrcweir 
1778cdf0e10cSrcweir XLineStartItem::XLineStartItem(SvStream& rIn) :
1779cdf0e10cSrcweir 	NameOrIndex(XATTR_LINESTART, rIn)
1780cdf0e10cSrcweir {
1781cdf0e10cSrcweir 	if (!IsIndex())
1782cdf0e10cSrcweir 	{
1783cdf0e10cSrcweir 		maPolyPolygon = streamInB2DPolyPolygon(rIn);
1784cdf0e10cSrcweir 	}
1785cdf0e10cSrcweir }
1786cdf0e10cSrcweir 
1787cdf0e10cSrcweir //*************************************************************************
1788cdf0e10cSrcweir 
1789cdf0e10cSrcweir XLineStartItem::XLineStartItem(SfxItemPool* /*pPool*/, const basegfx::B2DPolyPolygon& rPolyPolygon)
1790cdf0e10cSrcweir : 	NameOrIndex( XATTR_LINESTART, -1 ),
1791cdf0e10cSrcweir 	maPolyPolygon(rPolyPolygon)
1792cdf0e10cSrcweir {
1793cdf0e10cSrcweir }
1794cdf0e10cSrcweir 
1795cdf0e10cSrcweir //*************************************************************************
1796cdf0e10cSrcweir 
1797cdf0e10cSrcweir XLineStartItem::XLineStartItem(SfxItemPool* /*pPool*/)
1798cdf0e10cSrcweir :	NameOrIndex(XATTR_LINESTART, -1 )
1799cdf0e10cSrcweir {
1800cdf0e10cSrcweir }
1801cdf0e10cSrcweir 
1802cdf0e10cSrcweir /*************************************************************************
1803cdf0e10cSrcweir |*
1804cdf0e10cSrcweir |*	  XLineStartItem::Clone(SfxItemPool* pPool) const
1805cdf0e10cSrcweir |*
1806cdf0e10cSrcweir |*	  Beschreibung
1807cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1808cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1809cdf0e10cSrcweir |*
1810cdf0e10cSrcweir *************************************************************************/
1811cdf0e10cSrcweir 
1812cdf0e10cSrcweir SfxPoolItem* XLineStartItem::Clone(SfxItemPool* /*pPool*/) const
1813cdf0e10cSrcweir {
1814cdf0e10cSrcweir 	return new XLineStartItem(*this);
1815cdf0e10cSrcweir }
1816cdf0e10cSrcweir 
1817cdf0e10cSrcweir /*************************************************************************
1818cdf0e10cSrcweir |*
1819cdf0e10cSrcweir |*	  int XLineStartItem::operator==(const SfxPoolItem& rItem) const
1820cdf0e10cSrcweir |*
1821cdf0e10cSrcweir |*	  Beschreibung
1822cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1823cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
1824cdf0e10cSrcweir |*
1825cdf0e10cSrcweir *************************************************************************/
1826cdf0e10cSrcweir 
1827cdf0e10cSrcweir int XLineStartItem::operator==(const SfxPoolItem& rItem) const
1828cdf0e10cSrcweir {
1829cdf0e10cSrcweir 	return ( NameOrIndex::operator==(rItem) && ((const XLineStartItem&) rItem).maPolyPolygon == maPolyPolygon );
1830cdf0e10cSrcweir }
1831cdf0e10cSrcweir 
1832cdf0e10cSrcweir /*************************************************************************
1833cdf0e10cSrcweir |*
1834cdf0e10cSrcweir |*	  SfxPoolItem* XLineStartItem::Create(SvStream& rIn, sal_uInt16 nVer) const
1835cdf0e10cSrcweir |*
1836cdf0e10cSrcweir |*	  Beschreibung
1837cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1838cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
1839cdf0e10cSrcweir |*
1840cdf0e10cSrcweir *************************************************************************/
1841cdf0e10cSrcweir 
1842cdf0e10cSrcweir SfxPoolItem* XLineStartItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
1843cdf0e10cSrcweir {
1844cdf0e10cSrcweir 	return new XLineStartItem(rIn);
1845cdf0e10cSrcweir }
1846cdf0e10cSrcweir 
1847cdf0e10cSrcweir /*************************************************************************
1848cdf0e10cSrcweir |*
1849cdf0e10cSrcweir |*	  SfxPoolItem* XLineStartItem::Store(SvStream& rOut) const
1850cdf0e10cSrcweir |*
1851cdf0e10cSrcweir |*	  Beschreibung
1852cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1853cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
1854cdf0e10cSrcweir |*
1855cdf0e10cSrcweir *************************************************************************/
1856cdf0e10cSrcweir 
1857cdf0e10cSrcweir SvStream& XLineStartItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
1858cdf0e10cSrcweir {
1859cdf0e10cSrcweir 	NameOrIndex::Store( rOut, nItemVersion );
1860cdf0e10cSrcweir 
1861cdf0e10cSrcweir 	if (!IsIndex())
1862cdf0e10cSrcweir 	{
1863cdf0e10cSrcweir 		streamOutB2DPolyPolygon(maPolyPolygon, rOut);
1864cdf0e10cSrcweir 	}
1865cdf0e10cSrcweir 
1866cdf0e10cSrcweir 	return rOut;
1867cdf0e10cSrcweir }
1868cdf0e10cSrcweir 
1869cdf0e10cSrcweir /*************************************************************************
1870cdf0e10cSrcweir |*
1871*97e8a929SArmin Le Grand |*	  const basegfx::B2DPolyPolygon& XLineStartItem::GetValue(const XLineEndList* pTable)
1872cdf0e10cSrcweir |*											   const
1873cdf0e10cSrcweir |*
1874cdf0e10cSrcweir |*	  Beschreibung
1875cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
1876cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
1877cdf0e10cSrcweir |*
1878cdf0e10cSrcweir *************************************************************************/
1879cdf0e10cSrcweir 
1880*97e8a929SArmin Le Grand basegfx::B2DPolyPolygon XLineStartItem::GetLineStartValue(const XLineEndList* pTable) const
1881cdf0e10cSrcweir {
1882cdf0e10cSrcweir 	if (!IsIndex())
1883cdf0e10cSrcweir 	{
1884cdf0e10cSrcweir 		return maPolyPolygon;
1885cdf0e10cSrcweir 	}
1886cdf0e10cSrcweir 	else
1887cdf0e10cSrcweir 	{
1888cdf0e10cSrcweir 		return pTable->GetLineEnd(GetIndex())->GetLineEnd();
1889cdf0e10cSrcweir 	}
1890cdf0e10cSrcweir }
1891cdf0e10cSrcweir 
1892cdf0e10cSrcweir //------------------------------------------------------------------------
1893cdf0e10cSrcweir 
1894cdf0e10cSrcweir SfxItemPresentation XLineStartItem::GetPresentation
1895cdf0e10cSrcweir (
1896cdf0e10cSrcweir 	SfxItemPresentation ePres,
1897cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
1898cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
1899cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
1900cdf0e10cSrcweir )	const
1901cdf0e10cSrcweir {
1902cdf0e10cSrcweir 	switch ( ePres )
1903cdf0e10cSrcweir 	{
1904cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
1905cdf0e10cSrcweir 			rText.Erase();
1906cdf0e10cSrcweir 			return ePres;
1907cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
1908cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
1909cdf0e10cSrcweir 			rText = GetName();
1910cdf0e10cSrcweir 			return ePres;
1911cdf0e10cSrcweir 		default:
1912cdf0e10cSrcweir 		return SFX_ITEM_PRESENTATION_NONE;
1913cdf0e10cSrcweir 	}
1914cdf0e10cSrcweir }
1915cdf0e10cSrcweir 
1916cdf0e10cSrcweir sal_Bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
1917cdf0e10cSrcweir {
1918cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
1919cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
1920cdf0e10cSrcweir 	if( nMemberId == MID_NAME )
1921cdf0e10cSrcweir 	{
1922cdf0e10cSrcweir 		rtl::OUString aApiName;
1923cdf0e10cSrcweir 		SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
1924cdf0e10cSrcweir 		rVal <<= aApiName;
1925cdf0e10cSrcweir 	}
1926cdf0e10cSrcweir 	else
1927cdf0e10cSrcweir 	{
1928cdf0e10cSrcweir 		com::sun::star::drawing::PolyPolygonBezierCoords aBezier;
1929cdf0e10cSrcweir 		SvxConvertB2DPolyPolygonToPolyPolygonBezier( maPolyPolygon, aBezier );
1930cdf0e10cSrcweir 		rVal <<= aBezier;
1931cdf0e10cSrcweir 	}
1932cdf0e10cSrcweir 
1933cdf0e10cSrcweir 	return sal_True;
1934cdf0e10cSrcweir }
1935cdf0e10cSrcweir 
1936cdf0e10cSrcweir sal_Bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
1937cdf0e10cSrcweir {
1938cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
1939cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
1940cdf0e10cSrcweir 	if( nMemberId == MID_NAME )
1941cdf0e10cSrcweir 	{
1942cdf0e10cSrcweir 		return sal_False;
1943cdf0e10cSrcweir 	}
1944cdf0e10cSrcweir 	else
1945cdf0e10cSrcweir 	{
1946cdf0e10cSrcweir 		maPolyPolygon.clear();
1947cdf0e10cSrcweir 
1948cdf0e10cSrcweir 		if( rVal.hasValue() && rVal.getValue() )
1949cdf0e10cSrcweir 		{
1950cdf0e10cSrcweir 			if( rVal.getValueType() != ::getCppuType((const com::sun::star::drawing::PolyPolygonBezierCoords*)0) )
1951cdf0e10cSrcweir 				return sal_False;
1952cdf0e10cSrcweir 
1953cdf0e10cSrcweir 			com::sun::star::drawing::PolyPolygonBezierCoords* pCoords = (com::sun::star::drawing::PolyPolygonBezierCoords*)rVal.getValue();
1954cdf0e10cSrcweir 			if( pCoords->Coordinates.getLength() > 0 )
1955cdf0e10cSrcweir 			{
1956cdf0e10cSrcweir 				maPolyPolygon = SvxConvertPolyPolygonBezierToB2DPolyPolygon( pCoords );
1957cdf0e10cSrcweir 				// #i72807# close line start/end polygons hard
1958cdf0e10cSrcweir 				// maPolyPolygon.setClosed(true);
1959cdf0e10cSrcweir 			}
1960cdf0e10cSrcweir 		}
1961cdf0e10cSrcweir 	}
1962cdf0e10cSrcweir 
1963cdf0e10cSrcweir 	return sal_True;
1964cdf0e10cSrcweir }
1965cdf0e10cSrcweir 
1966cdf0e10cSrcweir /** this function searches in both the models pool and the styles pool for XLineStartItem
1967cdf0e10cSrcweir 	and XLineEndItem with the same value or name and returns an item with the value of
1968cdf0e10cSrcweir 	this item and a unique name for an item with this value. */
1969cdf0e10cSrcweir XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
1970cdf0e10cSrcweir {
1971cdf0e10cSrcweir 	if( pModel )
1972cdf0e10cSrcweir 	{
1973cdf0e10cSrcweir 		XLineStartItem* pTempItem = NULL;
1974cdf0e10cSrcweir 		const XLineStartItem* pLineStartItem = this;
1975cdf0e10cSrcweir 
1976cdf0e10cSrcweir 		String aUniqueName( GetName() );
1977cdf0e10cSrcweir 
1978cdf0e10cSrcweir 		if( !maPolyPolygon.count() )
1979cdf0e10cSrcweir 		{
1980cdf0e10cSrcweir 			// if the polygon is empty, check if the name is empty
1981cdf0e10cSrcweir 			if( aUniqueName.Len() == 0 )
1982cdf0e10cSrcweir 				return (XLineStartItem*)this;
1983cdf0e10cSrcweir 
1984cdf0e10cSrcweir 			// force empty name for empty polygons
1985cdf0e10cSrcweir 			return new XLineStartItem( String(), maPolyPolygon );
1986cdf0e10cSrcweir 		}
1987cdf0e10cSrcweir 
1988cdf0e10cSrcweir 		if( maPolyPolygon.count() > 1L )
1989cdf0e10cSrcweir 		{
1990cdf0e10cSrcweir 			// check if the polygon is closed
1991cdf0e10cSrcweir 			if(!maPolyPolygon.isClosed())
1992cdf0e10cSrcweir 			{
1993cdf0e10cSrcweir 				// force a closed polygon
1994cdf0e10cSrcweir 				basegfx::B2DPolyPolygon aNew(maPolyPolygon);
1995cdf0e10cSrcweir 				aNew.setClosed(true);
1996cdf0e10cSrcweir 				pTempItem = new XLineStartItem( aUniqueName, aNew );
1997cdf0e10cSrcweir 				pLineStartItem = pTempItem;
1998cdf0e10cSrcweir 			}
1999cdf0e10cSrcweir 		}
2000cdf0e10cSrcweir 
2001cdf0e10cSrcweir 		sal_Bool bForceNew = sal_False;
2002cdf0e10cSrcweir 
2003cdf0e10cSrcweir 		// 2. if we have a name check if there is already an item with the
2004cdf0e10cSrcweir 		// same name in the documents pool with a different line end or start
2005cdf0e10cSrcweir 
2006cdf0e10cSrcweir 		sal_uInt32 nCount, nSurrogate;
2007cdf0e10cSrcweir 
2008cdf0e10cSrcweir 		const SfxItemPool* pPool1 = &pModel->GetItemPool();
2009cdf0e10cSrcweir 		if( aUniqueName.Len() && pPool1 )
2010cdf0e10cSrcweir 		{
2011cdf0e10cSrcweir 			nCount = pPool1->GetItemCount2( XATTR_LINESTART );
2012cdf0e10cSrcweir 
2013cdf0e10cSrcweir 			for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2014cdf0e10cSrcweir 			{
2015cdf0e10cSrcweir 				const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate );
2016cdf0e10cSrcweir 
2017cdf0e10cSrcweir 				if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
2018cdf0e10cSrcweir 				{
2019cdf0e10cSrcweir 					// if there is already an item with the same name and the same
2020cdf0e10cSrcweir 					// value its ok to set it
2021cdf0e10cSrcweir 					if( pItem->GetLineStartValue() != pLineStartItem->GetLineStartValue() )
2022cdf0e10cSrcweir 					{
2023cdf0e10cSrcweir 						// same name but different value, we need a new name for this item
2024cdf0e10cSrcweir 						aUniqueName = String();
2025cdf0e10cSrcweir 						bForceNew = sal_True;
2026cdf0e10cSrcweir 					}
2027cdf0e10cSrcweir 					break;
2028cdf0e10cSrcweir 				}
2029cdf0e10cSrcweir 			}
2030cdf0e10cSrcweir 
2031cdf0e10cSrcweir 			if( !bForceNew )
2032cdf0e10cSrcweir 			{
2033cdf0e10cSrcweir 				nCount = pPool1->GetItemCount2( XATTR_LINEEND );
2034cdf0e10cSrcweir 
2035cdf0e10cSrcweir 				for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2036cdf0e10cSrcweir 				{
2037cdf0e10cSrcweir 					const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate );
2038cdf0e10cSrcweir 
2039cdf0e10cSrcweir 					if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
2040cdf0e10cSrcweir 					{
2041cdf0e10cSrcweir 						// if there is already an item with the same name and the same
2042cdf0e10cSrcweir 						// value its ok to set it
2043cdf0e10cSrcweir 						if( pItem->GetLineEndValue() != pLineStartItem->GetLineStartValue() )
2044cdf0e10cSrcweir 						{
2045cdf0e10cSrcweir 							// same name but different value, we need a new name for this item
2046cdf0e10cSrcweir 							aUniqueName = String();
2047cdf0e10cSrcweir 							bForceNew = sal_True;
2048cdf0e10cSrcweir 						}
2049cdf0e10cSrcweir 						break;
2050cdf0e10cSrcweir 					}
2051cdf0e10cSrcweir 				}
2052cdf0e10cSrcweir 			}
2053cdf0e10cSrcweir 		}
2054cdf0e10cSrcweir 
2055cdf0e10cSrcweir 		const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
2056cdf0e10cSrcweir 		if( aUniqueName.Len() && pPool2)
2057cdf0e10cSrcweir 		{
2058cdf0e10cSrcweir 			nCount = pPool2->GetItemCount2( XATTR_LINESTART );
2059cdf0e10cSrcweir 			for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2060cdf0e10cSrcweir 			{
2061cdf0e10cSrcweir 				const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem2( XATTR_LINESTART, nSurrogate );
2062cdf0e10cSrcweir 
2063cdf0e10cSrcweir 				if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
2064cdf0e10cSrcweir 				{
2065cdf0e10cSrcweir 					// if there is already an item with the same name and the same
2066cdf0e10cSrcweir 					// value its ok to set it
2067cdf0e10cSrcweir 					if( pItem->GetLineStartValue() != pLineStartItem->GetLineStartValue() )
2068cdf0e10cSrcweir 					{
2069cdf0e10cSrcweir 						// same name but different value, we need a new name for this item
2070cdf0e10cSrcweir 						aUniqueName = String();
2071cdf0e10cSrcweir 						bForceNew = sal_True;
2072cdf0e10cSrcweir 					}
2073cdf0e10cSrcweir 					break;
2074cdf0e10cSrcweir 				}
2075cdf0e10cSrcweir 			}
2076cdf0e10cSrcweir 
2077cdf0e10cSrcweir 			if( !bForceNew )
2078cdf0e10cSrcweir 			{
2079cdf0e10cSrcweir 				nCount = pPool2->GetItemCount2( XATTR_LINEEND );
2080cdf0e10cSrcweir 				for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2081cdf0e10cSrcweir 				{
2082cdf0e10cSrcweir 					const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem2( XATTR_LINEEND, nSurrogate );
2083cdf0e10cSrcweir 
2084cdf0e10cSrcweir 					if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
2085cdf0e10cSrcweir 					{
2086cdf0e10cSrcweir 						// if there is already an item with the same name and the same
2087cdf0e10cSrcweir 						// value its ok to set it
2088cdf0e10cSrcweir 						if( pItem->GetLineEndValue() != pLineStartItem->GetLineStartValue() )
2089cdf0e10cSrcweir 						{
2090cdf0e10cSrcweir 							// same name but different value, we need a new name for this item
2091cdf0e10cSrcweir 							aUniqueName = String();
2092cdf0e10cSrcweir 							bForceNew = sal_True;
2093cdf0e10cSrcweir 						}
2094cdf0e10cSrcweir 						break;
2095cdf0e10cSrcweir 					}
2096cdf0e10cSrcweir 				}
2097cdf0e10cSrcweir 			}
2098cdf0e10cSrcweir 		}
2099cdf0e10cSrcweir 
2100cdf0e10cSrcweir 		// if we have no name yet, find existing item with same conent or
2101cdf0e10cSrcweir 		// create a unique name
2102cdf0e10cSrcweir 		if( aUniqueName.Len() == 0 )
2103cdf0e10cSrcweir 		{
2104cdf0e10cSrcweir 			sal_Bool bFoundExisting = sal_False;
2105cdf0e10cSrcweir 
2106cdf0e10cSrcweir 			sal_Int32 nUserIndex = 1;
2107cdf0e10cSrcweir 			const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
2108cdf0e10cSrcweir 			const String aUser( aRes );
2109cdf0e10cSrcweir 
2110cdf0e10cSrcweir 			if( pPool1 )
2111cdf0e10cSrcweir 			{
2112cdf0e10cSrcweir 				nCount = pPool1->GetItemCount2( XATTR_LINESTART );
2113cdf0e10cSrcweir 				sal_uInt32 nSurrogate2;
2114cdf0e10cSrcweir 
2115cdf0e10cSrcweir 				for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
2116cdf0e10cSrcweir 				{
2117cdf0e10cSrcweir 					const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
2118cdf0e10cSrcweir 
2119cdf0e10cSrcweir 					if( pItem && pItem->GetName().Len() )
2120cdf0e10cSrcweir 					{
2121cdf0e10cSrcweir 						if( !bForceNew && pItem->GetLineStartValue() == pLineStartItem->GetLineStartValue() )
2122cdf0e10cSrcweir 						{
2123cdf0e10cSrcweir 							aUniqueName = pItem->GetName();
2124cdf0e10cSrcweir 							bFoundExisting = sal_True;
2125cdf0e10cSrcweir 							break;
2126cdf0e10cSrcweir 						}
2127cdf0e10cSrcweir 
2128cdf0e10cSrcweir 						if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
2129cdf0e10cSrcweir 						{
2130cdf0e10cSrcweir 							sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
2131cdf0e10cSrcweir 							if( nThisIndex >= nUserIndex )
2132cdf0e10cSrcweir 								nUserIndex = nThisIndex + 1;
2133cdf0e10cSrcweir 						}
2134cdf0e10cSrcweir 					}
2135cdf0e10cSrcweir 				}
2136cdf0e10cSrcweir 
2137cdf0e10cSrcweir 				nCount = pPool1->GetItemCount2( XATTR_LINEEND );
2138cdf0e10cSrcweir 				for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
2139cdf0e10cSrcweir 				{
2140cdf0e10cSrcweir 					const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
2141cdf0e10cSrcweir 
2142cdf0e10cSrcweir 					if( pItem && pItem->GetName().Len() )
2143cdf0e10cSrcweir 					{
2144cdf0e10cSrcweir 						if( !bForceNew && pItem->GetLineEndValue() == pLineStartItem->GetLineStartValue() )
2145cdf0e10cSrcweir 						{
2146cdf0e10cSrcweir 							aUniqueName = pItem->GetName();
2147cdf0e10cSrcweir 							bFoundExisting = sal_True;
2148cdf0e10cSrcweir 							break;
2149cdf0e10cSrcweir 						}
2150cdf0e10cSrcweir 
2151cdf0e10cSrcweir 						if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
2152cdf0e10cSrcweir 						{
2153cdf0e10cSrcweir 							sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
2154cdf0e10cSrcweir 							if( nThisIndex >= nUserIndex )
2155cdf0e10cSrcweir 								nUserIndex = nThisIndex + 1;
2156cdf0e10cSrcweir 						}
2157cdf0e10cSrcweir 					}
2158cdf0e10cSrcweir 				}
2159cdf0e10cSrcweir 			}
2160cdf0e10cSrcweir 
2161cdf0e10cSrcweir 			if( !bFoundExisting )
2162cdf0e10cSrcweir 			{
2163cdf0e10cSrcweir 				aUniqueName = aUser;
2164cdf0e10cSrcweir 				aUniqueName += sal_Unicode(' ');
2165cdf0e10cSrcweir 				aUniqueName += String::CreateFromInt32( nUserIndex );
2166cdf0e10cSrcweir 			}
2167cdf0e10cSrcweir 		}
2168cdf0e10cSrcweir 
2169cdf0e10cSrcweir 		// if the given name is not valid, replace it!
2170cdf0e10cSrcweir 		if( aUniqueName != GetName() || pTempItem )
2171cdf0e10cSrcweir 		{
2172cdf0e10cSrcweir 			if( pTempItem )
2173cdf0e10cSrcweir 			{
2174cdf0e10cSrcweir 				pTempItem->SetName( aUniqueName );
2175cdf0e10cSrcweir 				return pTempItem;
2176cdf0e10cSrcweir 			}
2177cdf0e10cSrcweir 			else
2178cdf0e10cSrcweir 			{
2179cdf0e10cSrcweir 				return new XLineStartItem( aUniqueName, maPolyPolygon );
2180cdf0e10cSrcweir 			}
2181cdf0e10cSrcweir 		}
2182cdf0e10cSrcweir 	}
2183cdf0e10cSrcweir 
2184cdf0e10cSrcweir 	return (XLineStartItem*)this;
2185cdf0e10cSrcweir }
2186cdf0e10cSrcweir 
2187cdf0e10cSrcweir // ---------------------
2188cdf0e10cSrcweir // class XLineEndItem
2189cdf0e10cSrcweir // ---------------------
2190cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex);
2191cdf0e10cSrcweir 
2192cdf0e10cSrcweir /*************************************************************************
2193cdf0e10cSrcweir |*
2194cdf0e10cSrcweir |*	  XLineEndItem::XLineEndItem(sal_Int32 nIndex)
2195cdf0e10cSrcweir |*
2196cdf0e10cSrcweir |*	  Beschreibung
2197cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2198cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
2199cdf0e10cSrcweir |*
2200cdf0e10cSrcweir *************************************************************************/
2201cdf0e10cSrcweir 
2202cdf0e10cSrcweir XLineEndItem::XLineEndItem(sal_Int32 nIndex)
2203cdf0e10cSrcweir :	NameOrIndex(XATTR_LINEEND, nIndex)
2204cdf0e10cSrcweir {
2205cdf0e10cSrcweir }
2206cdf0e10cSrcweir 
2207cdf0e10cSrcweir /*************************************************************************
2208cdf0e10cSrcweir |*
2209cdf0e10cSrcweir |*	  XLineEndItem::XLineEndItem(const XubString& rName,
2210cdf0e10cSrcweir |*								 const basegfx::B2DPolyPolygon& rXPolygon)
2211cdf0e10cSrcweir |*
2212cdf0e10cSrcweir |*	  Beschreibung
2213cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2214cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
2215cdf0e10cSrcweir |*
2216cdf0e10cSrcweir *************************************************************************/
2217cdf0e10cSrcweir 
2218cdf0e10cSrcweir XLineEndItem::XLineEndItem(const XubString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon)
2219cdf0e10cSrcweir :	NameOrIndex(XATTR_LINEEND, rName),
2220cdf0e10cSrcweir 	maPolyPolygon(rPolyPolygon)
2221cdf0e10cSrcweir {
2222cdf0e10cSrcweir }
2223cdf0e10cSrcweir 
2224cdf0e10cSrcweir /*************************************************************************
2225cdf0e10cSrcweir |*
2226cdf0e10cSrcweir |*	  XLineEndItem::XLineEndItem(const XLineEndItem& rItem)
2227cdf0e10cSrcweir |*
2228cdf0e10cSrcweir |*	  Beschreibung
2229cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2230cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
2231cdf0e10cSrcweir |*
2232cdf0e10cSrcweir *************************************************************************/
2233cdf0e10cSrcweir 
2234cdf0e10cSrcweir XLineEndItem::XLineEndItem(const XLineEndItem& rItem)
2235cdf0e10cSrcweir :	NameOrIndex(rItem),
2236cdf0e10cSrcweir 	maPolyPolygon(rItem.maPolyPolygon)
2237cdf0e10cSrcweir {
2238cdf0e10cSrcweir }
2239cdf0e10cSrcweir 
2240cdf0e10cSrcweir /*************************************************************************
2241cdf0e10cSrcweir |*
2242cdf0e10cSrcweir |*	  XLineEndItem::XLineEndItem(SvStream& rIn)
2243cdf0e10cSrcweir |*
2244cdf0e10cSrcweir |*	  Beschreibung
2245cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2246cdf0e10cSrcweir |*	  Letzte Aenderung	17.11.94
2247cdf0e10cSrcweir |*
2248cdf0e10cSrcweir *************************************************************************/
2249cdf0e10cSrcweir 
2250cdf0e10cSrcweir XLineEndItem::XLineEndItem(SvStream& rIn) :
2251cdf0e10cSrcweir 	NameOrIndex(XATTR_LINEEND, rIn)
2252cdf0e10cSrcweir {
2253cdf0e10cSrcweir 	if (!IsIndex())
2254cdf0e10cSrcweir 	{
2255cdf0e10cSrcweir 		maPolyPolygon = streamInB2DPolyPolygon(rIn);
2256cdf0e10cSrcweir 	}
2257cdf0e10cSrcweir }
2258cdf0e10cSrcweir 
2259cdf0e10cSrcweir //*************************************************************************
2260cdf0e10cSrcweir 
2261cdf0e10cSrcweir XLineEndItem::XLineEndItem(SfxItemPool* /*pPool*/, const basegfx::B2DPolyPolygon& rPolyPolygon)
2262cdf0e10cSrcweir : 	NameOrIndex( XATTR_LINEEND, -1 ),
2263cdf0e10cSrcweir 	maPolyPolygon(rPolyPolygon)
2264cdf0e10cSrcweir {
2265cdf0e10cSrcweir }
2266cdf0e10cSrcweir 
2267cdf0e10cSrcweir //*************************************************************************
2268cdf0e10cSrcweir 
2269cdf0e10cSrcweir XLineEndItem::XLineEndItem(SfxItemPool* /*pPool*/)
2270cdf0e10cSrcweir :	NameOrIndex(XATTR_LINEEND, -1 )
2271cdf0e10cSrcweir {
2272cdf0e10cSrcweir }
2273cdf0e10cSrcweir 
2274cdf0e10cSrcweir /*************************************************************************
2275cdf0e10cSrcweir |*
2276cdf0e10cSrcweir |*	  XLineEndItem::Clone(SfxItemPool* pPool) const
2277cdf0e10cSrcweir |*
2278cdf0e10cSrcweir |*	  Beschreibung
2279cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2280cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2281cdf0e10cSrcweir |*
2282cdf0e10cSrcweir *************************************************************************/
2283cdf0e10cSrcweir 
2284cdf0e10cSrcweir SfxPoolItem* XLineEndItem::Clone(SfxItemPool* /*pPool*/) const
2285cdf0e10cSrcweir {
2286cdf0e10cSrcweir 	return new XLineEndItem(*this);
2287cdf0e10cSrcweir }
2288cdf0e10cSrcweir 
2289cdf0e10cSrcweir /*************************************************************************
2290cdf0e10cSrcweir |*
2291cdf0e10cSrcweir |*	  int XLineEndItem::operator==(const SfxPoolItem& rItem) const
2292cdf0e10cSrcweir |*
2293cdf0e10cSrcweir |*	  Beschreibung
2294cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2295cdf0e10cSrcweir |*	  Letzte Aenderung	17.11.94
2296cdf0e10cSrcweir |*
2297cdf0e10cSrcweir *************************************************************************/
2298cdf0e10cSrcweir 
2299cdf0e10cSrcweir int XLineEndItem::operator==(const SfxPoolItem& rItem) const
2300cdf0e10cSrcweir {
2301cdf0e10cSrcweir 	return ( NameOrIndex::operator==(rItem) && ((const XLineEndItem&) rItem).maPolyPolygon == maPolyPolygon );
2302cdf0e10cSrcweir }
2303cdf0e10cSrcweir 
2304cdf0e10cSrcweir /*************************************************************************
2305cdf0e10cSrcweir |*
2306cdf0e10cSrcweir |*	  SfxPoolItem* XLineEndItem::Create(SvStream& rIn, sal_uInt16 nVer) const
2307cdf0e10cSrcweir |*
2308cdf0e10cSrcweir |*	  Beschreibung
2309cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2310cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2311cdf0e10cSrcweir |*
2312cdf0e10cSrcweir *************************************************************************/
2313cdf0e10cSrcweir 
2314cdf0e10cSrcweir SfxPoolItem* XLineEndItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
2315cdf0e10cSrcweir {
2316cdf0e10cSrcweir 	return new XLineEndItem(rIn);
2317cdf0e10cSrcweir }
2318cdf0e10cSrcweir 
2319cdf0e10cSrcweir /*************************************************************************
2320cdf0e10cSrcweir |*
2321cdf0e10cSrcweir |*	  SfxPoolItem* XLineEndItem::Store(SvStream& rOut) const
2322cdf0e10cSrcweir |*
2323cdf0e10cSrcweir |*	  Beschreibung
2324cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2325cdf0e10cSrcweir |*	  Letzte Aenderung	17.11.94
2326cdf0e10cSrcweir |*
2327cdf0e10cSrcweir *************************************************************************/
2328cdf0e10cSrcweir 
2329cdf0e10cSrcweir SvStream& XLineEndItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
2330cdf0e10cSrcweir {
2331cdf0e10cSrcweir 	NameOrIndex::Store( rOut, nItemVersion );
2332cdf0e10cSrcweir 
2333cdf0e10cSrcweir 	if (!IsIndex())
2334cdf0e10cSrcweir 	{
2335cdf0e10cSrcweir 		streamOutB2DPolyPolygon(maPolyPolygon, rOut);
2336cdf0e10cSrcweir 	}
2337cdf0e10cSrcweir 
2338cdf0e10cSrcweir 	return rOut;
2339cdf0e10cSrcweir }
2340cdf0e10cSrcweir 
2341cdf0e10cSrcweir /*************************************************************************
2342cdf0e10cSrcweir |*
2343*97e8a929SArmin Le Grand |*	  const basegfx::B2DPolyPolygon& XLineEndItem::GetValue(const XLineEndList* pTable) const
2344cdf0e10cSrcweir |*
2345cdf0e10cSrcweir |*	  Beschreibung
2346cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2347cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
2348cdf0e10cSrcweir |*
2349cdf0e10cSrcweir *************************************************************************/
2350cdf0e10cSrcweir 
2351*97e8a929SArmin Le Grand basegfx::B2DPolyPolygon XLineEndItem::GetLineEndValue(const XLineEndList* pTable) const
2352cdf0e10cSrcweir {
2353cdf0e10cSrcweir 	if (!IsIndex())
2354cdf0e10cSrcweir 	{
2355cdf0e10cSrcweir 		return maPolyPolygon;
2356cdf0e10cSrcweir 	}
2357cdf0e10cSrcweir 	else
2358cdf0e10cSrcweir 	{
2359cdf0e10cSrcweir 		return pTable->GetLineEnd(GetIndex())->GetLineEnd();
2360cdf0e10cSrcweir 	}
2361cdf0e10cSrcweir }
2362cdf0e10cSrcweir 
2363cdf0e10cSrcweir 
2364cdf0e10cSrcweir /** this function searches in both the models pool and the styles pool for XLineStartItem
2365cdf0e10cSrcweir 	and XLineEndItem with the same value or name and returns an item with the value of
2366cdf0e10cSrcweir 	this item and a unique name for an item with this value. */
2367cdf0e10cSrcweir XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
2368cdf0e10cSrcweir {
2369cdf0e10cSrcweir 	if( pModel )
2370cdf0e10cSrcweir 	{
2371cdf0e10cSrcweir 		XLineEndItem* pTempItem = NULL;
2372cdf0e10cSrcweir 		const XLineEndItem* pLineEndItem = this;
2373cdf0e10cSrcweir 
2374cdf0e10cSrcweir 		String aUniqueName( GetName() );
2375cdf0e10cSrcweir 
2376cdf0e10cSrcweir 		if( !maPolyPolygon.count() )
2377cdf0e10cSrcweir 		{
2378cdf0e10cSrcweir 			// if the polygon is empty, check if the name is empty
2379cdf0e10cSrcweir 			if( aUniqueName.Len() == 0 )
2380cdf0e10cSrcweir 				return (XLineEndItem*)this;
2381cdf0e10cSrcweir 
2382cdf0e10cSrcweir 			// force empty name for empty polygons
2383cdf0e10cSrcweir 			return new XLineEndItem( String(), maPolyPolygon );
2384cdf0e10cSrcweir 		}
2385cdf0e10cSrcweir 
2386cdf0e10cSrcweir 		if( maPolyPolygon.count() > 1L )
2387cdf0e10cSrcweir 		{
2388cdf0e10cSrcweir 			// check if the polygon is closed
2389cdf0e10cSrcweir 			if(!maPolyPolygon.isClosed())
2390cdf0e10cSrcweir 			{
2391cdf0e10cSrcweir 				// force a closed polygon
2392cdf0e10cSrcweir 				basegfx::B2DPolyPolygon aNew(maPolyPolygon);
2393cdf0e10cSrcweir 				aNew.setClosed(true);
2394cdf0e10cSrcweir 				pTempItem = new XLineEndItem( aUniqueName, aNew );
2395cdf0e10cSrcweir 				pLineEndItem = pTempItem;
2396cdf0e10cSrcweir 			}
2397cdf0e10cSrcweir 		}
2398cdf0e10cSrcweir 
2399cdf0e10cSrcweir 		sal_Bool bForceNew = sal_False;
2400cdf0e10cSrcweir 
2401cdf0e10cSrcweir 		// 2. if we have a name check if there is already an item with the
2402cdf0e10cSrcweir 		// same name in the documents pool with a different line end or start
2403cdf0e10cSrcweir 
2404cdf0e10cSrcweir 		sal_uInt16 nCount, nSurrogate;
2405cdf0e10cSrcweir 
2406cdf0e10cSrcweir 		const SfxItemPool* pPool1 = &pModel->GetItemPool();
2407cdf0e10cSrcweir 		if( aUniqueName.Len() && pPool1 )
2408cdf0e10cSrcweir 		{
2409cdf0e10cSrcweir 			nCount = pPool1->GetItemCount2( XATTR_LINESTART );
2410cdf0e10cSrcweir 
2411cdf0e10cSrcweir 			for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2412cdf0e10cSrcweir 			{
2413cdf0e10cSrcweir 				const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate );
2414cdf0e10cSrcweir 
2415cdf0e10cSrcweir 				if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
2416cdf0e10cSrcweir 				{
2417cdf0e10cSrcweir 					// if there is already an item with the same name and the same
2418cdf0e10cSrcweir 					// value its ok to set it
2419cdf0e10cSrcweir 					if( pItem->GetLineStartValue() != pLineEndItem->GetLineEndValue() )
2420cdf0e10cSrcweir 					{
2421cdf0e10cSrcweir 						// same name but different value, we need a new name for this item
2422cdf0e10cSrcweir 						aUniqueName = String();
2423cdf0e10cSrcweir 						bForceNew = sal_True;
2424cdf0e10cSrcweir 					}
2425cdf0e10cSrcweir 					break;
2426cdf0e10cSrcweir 				}
2427cdf0e10cSrcweir 			}
2428cdf0e10cSrcweir 
2429cdf0e10cSrcweir 			if( !bForceNew )
2430cdf0e10cSrcweir 			{
2431cdf0e10cSrcweir 				nCount = pPool1->GetItemCount2( XATTR_LINEEND );
2432cdf0e10cSrcweir 
2433cdf0e10cSrcweir 				for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2434cdf0e10cSrcweir 				{
2435cdf0e10cSrcweir 					const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate );
2436cdf0e10cSrcweir 
2437cdf0e10cSrcweir 					if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
2438cdf0e10cSrcweir 					{
2439cdf0e10cSrcweir 						// if there is already an item with the same name and the same
2440cdf0e10cSrcweir 						// value its ok to set it
2441cdf0e10cSrcweir 						if( pItem->GetLineEndValue() != pLineEndItem->GetLineEndValue() )
2442cdf0e10cSrcweir 						{
2443cdf0e10cSrcweir 							// same name but different value, we need a new name for this item
2444cdf0e10cSrcweir 							aUniqueName = String();
2445cdf0e10cSrcweir 							bForceNew = sal_True;
2446cdf0e10cSrcweir 						}
2447cdf0e10cSrcweir 						break;
2448cdf0e10cSrcweir 					}
2449cdf0e10cSrcweir 				}
2450cdf0e10cSrcweir 			}
2451cdf0e10cSrcweir 		}
2452cdf0e10cSrcweir 
2453cdf0e10cSrcweir 		const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
2454cdf0e10cSrcweir 		if( aUniqueName.Len() && pPool2)
2455cdf0e10cSrcweir 		{
2456cdf0e10cSrcweir 			nCount = pPool2->GetItemCount2( XATTR_LINESTART );
2457cdf0e10cSrcweir 			for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2458cdf0e10cSrcweir 			{
2459cdf0e10cSrcweir 				const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem2( XATTR_LINESTART, nSurrogate );
2460cdf0e10cSrcweir 
2461cdf0e10cSrcweir 				if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
2462cdf0e10cSrcweir 				{
2463cdf0e10cSrcweir 					// if there is already an item with the same name and the same
2464cdf0e10cSrcweir 					// value its ok to set it
2465cdf0e10cSrcweir 					if( pItem->GetLineStartValue() != pLineEndItem->GetLineEndValue() )
2466cdf0e10cSrcweir 					{
2467cdf0e10cSrcweir 						// same name but different value, we need a new name for this item
2468cdf0e10cSrcweir 						aUniqueName = String();
2469cdf0e10cSrcweir 						bForceNew = sal_True;
2470cdf0e10cSrcweir 					}
2471cdf0e10cSrcweir 					break;
2472cdf0e10cSrcweir 				}
2473cdf0e10cSrcweir 			}
2474cdf0e10cSrcweir 
2475cdf0e10cSrcweir 			if( !bForceNew )
2476cdf0e10cSrcweir 			{
2477cdf0e10cSrcweir 				nCount = pPool2->GetItemCount2( XATTR_LINEEND );
2478cdf0e10cSrcweir 				for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
2479cdf0e10cSrcweir 				{
2480cdf0e10cSrcweir 					const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem2( XATTR_LINEEND, nSurrogate );
2481cdf0e10cSrcweir 
2482cdf0e10cSrcweir 					if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
2483cdf0e10cSrcweir 					{
2484cdf0e10cSrcweir 						// if there is already an item with the same name and the same
2485cdf0e10cSrcweir 						// value its ok to set it
2486cdf0e10cSrcweir 						if( pItem->GetLineEndValue() != pLineEndItem->GetLineEndValue() )
2487cdf0e10cSrcweir 						{
2488cdf0e10cSrcweir 							// same name but different value, we need a new name for this item
2489cdf0e10cSrcweir 							aUniqueName = String();
2490cdf0e10cSrcweir 							bForceNew = sal_True;
2491cdf0e10cSrcweir 						}
2492cdf0e10cSrcweir 						break;
2493cdf0e10cSrcweir 					}
2494cdf0e10cSrcweir 				}
2495cdf0e10cSrcweir 			}
2496cdf0e10cSrcweir 		}
2497cdf0e10cSrcweir 
2498cdf0e10cSrcweir 		// if we have no name yet, find existing item with same conent or
2499cdf0e10cSrcweir 		// create a unique name
2500cdf0e10cSrcweir 		if( aUniqueName.Len() == 0 )
2501cdf0e10cSrcweir 		{
2502cdf0e10cSrcweir 			sal_Bool bFoundExisting = sal_False;
2503cdf0e10cSrcweir 
2504cdf0e10cSrcweir 			sal_Int32 nUserIndex = 1;
2505cdf0e10cSrcweir 			const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
2506cdf0e10cSrcweir 			const String aUser( aRes );
2507cdf0e10cSrcweir 
2508cdf0e10cSrcweir 			if( pPool1 )
2509cdf0e10cSrcweir 			{
2510cdf0e10cSrcweir 				nCount = pPool1->GetItemCount2( XATTR_LINESTART );
2511cdf0e10cSrcweir 				sal_uInt32 nSurrogate2;
2512cdf0e10cSrcweir 
2513cdf0e10cSrcweir 				for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
2514cdf0e10cSrcweir 				{
2515cdf0e10cSrcweir 					const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
2516cdf0e10cSrcweir 
2517cdf0e10cSrcweir 					if( pItem && pItem->GetName().Len() )
2518cdf0e10cSrcweir 					{
2519cdf0e10cSrcweir 						if( !bForceNew && pItem->GetLineStartValue() == pLineEndItem->GetLineEndValue() )
2520cdf0e10cSrcweir 						{
2521cdf0e10cSrcweir 							aUniqueName = pItem->GetName();
2522cdf0e10cSrcweir 							bFoundExisting = sal_True;
2523cdf0e10cSrcweir 							break;
2524cdf0e10cSrcweir 						}
2525cdf0e10cSrcweir 
2526cdf0e10cSrcweir 						if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
2527cdf0e10cSrcweir 						{
2528cdf0e10cSrcweir 							sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
2529cdf0e10cSrcweir 							if( nThisIndex >= nUserIndex )
2530cdf0e10cSrcweir 								nUserIndex = nThisIndex + 1;
2531cdf0e10cSrcweir 						}
2532cdf0e10cSrcweir 					}
2533cdf0e10cSrcweir 				}
2534cdf0e10cSrcweir 
2535cdf0e10cSrcweir 				nCount = pPool1->GetItemCount2( XATTR_LINEEND );
2536cdf0e10cSrcweir 				for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
2537cdf0e10cSrcweir 				{
2538cdf0e10cSrcweir 					const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
2539cdf0e10cSrcweir 
2540cdf0e10cSrcweir 					if( pItem && pItem->GetName().Len() )
2541cdf0e10cSrcweir 					{
2542cdf0e10cSrcweir 						if( !bForceNew && pItem->GetLineEndValue() == pLineEndItem->GetLineEndValue() )
2543cdf0e10cSrcweir 						{
2544cdf0e10cSrcweir 							aUniqueName = pItem->GetName();
2545cdf0e10cSrcweir 							bFoundExisting = sal_True;
2546cdf0e10cSrcweir 							break;
2547cdf0e10cSrcweir 						}
2548cdf0e10cSrcweir 
2549cdf0e10cSrcweir 						if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
2550cdf0e10cSrcweir 						{
2551cdf0e10cSrcweir 							sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
2552cdf0e10cSrcweir 							if( nThisIndex >= nUserIndex )
2553cdf0e10cSrcweir 								nUserIndex = nThisIndex + 1;
2554cdf0e10cSrcweir 						}
2555cdf0e10cSrcweir 					}
2556cdf0e10cSrcweir 				}
2557cdf0e10cSrcweir 			}
2558cdf0e10cSrcweir 
2559cdf0e10cSrcweir 			if( !bFoundExisting )
2560cdf0e10cSrcweir 			{
2561cdf0e10cSrcweir 				aUniqueName = aUser;
2562cdf0e10cSrcweir 				aUniqueName += sal_Unicode(' ');
2563cdf0e10cSrcweir 				aUniqueName += String::CreateFromInt32( nUserIndex );
2564cdf0e10cSrcweir 			}
2565cdf0e10cSrcweir 		}
2566cdf0e10cSrcweir 
2567cdf0e10cSrcweir 		// if the given name is not valid, replace it!
2568cdf0e10cSrcweir 		if( aUniqueName != GetName() || pTempItem )
2569cdf0e10cSrcweir 		{
2570cdf0e10cSrcweir 			if( pTempItem )
2571cdf0e10cSrcweir 			{
2572cdf0e10cSrcweir 				pTempItem->SetName( aUniqueName );
2573cdf0e10cSrcweir 				return pTempItem;
2574cdf0e10cSrcweir 			}
2575cdf0e10cSrcweir 			else
2576cdf0e10cSrcweir 			{
2577cdf0e10cSrcweir 				return new XLineEndItem( aUniqueName, maPolyPolygon );
2578cdf0e10cSrcweir 			}
2579cdf0e10cSrcweir 		}
2580cdf0e10cSrcweir 	}
2581cdf0e10cSrcweir 
2582cdf0e10cSrcweir 	return (XLineEndItem*)this;
2583cdf0e10cSrcweir }
2584cdf0e10cSrcweir 
2585cdf0e10cSrcweir 
2586cdf0e10cSrcweir //------------------------------------------------------------------------
2587cdf0e10cSrcweir 
2588cdf0e10cSrcweir SfxItemPresentation XLineEndItem::GetPresentation
2589cdf0e10cSrcweir (
2590cdf0e10cSrcweir 	SfxItemPresentation ePres,
2591cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
2592cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
2593cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
2594cdf0e10cSrcweir )	const
2595cdf0e10cSrcweir {
2596cdf0e10cSrcweir 	switch ( ePres )
2597cdf0e10cSrcweir 	{
2598cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
2599cdf0e10cSrcweir 			rText.Erase();
2600cdf0e10cSrcweir 			return ePres;
2601cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
2602cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
2603cdf0e10cSrcweir 			rText = GetName();
2604cdf0e10cSrcweir 			return ePres;
2605cdf0e10cSrcweir 		default:
2606cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
2607cdf0e10cSrcweir 	}
2608cdf0e10cSrcweir }
2609cdf0e10cSrcweir 
2610cdf0e10cSrcweir sal_Bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
2611cdf0e10cSrcweir {
2612cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
2613cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
2614cdf0e10cSrcweir 	if( nMemberId == MID_NAME )
2615cdf0e10cSrcweir 	{
2616cdf0e10cSrcweir 		rtl::OUString aApiName;
2617cdf0e10cSrcweir 		SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
2618cdf0e10cSrcweir 		rVal <<= aApiName;
2619cdf0e10cSrcweir 	}
2620cdf0e10cSrcweir 	else
2621cdf0e10cSrcweir 	{
2622cdf0e10cSrcweir 		com::sun::star::drawing::PolyPolygonBezierCoords aBezier;
2623cdf0e10cSrcweir 		SvxConvertB2DPolyPolygonToPolyPolygonBezier( maPolyPolygon, aBezier );
2624cdf0e10cSrcweir 		rVal <<= aBezier;
2625cdf0e10cSrcweir 	}
2626cdf0e10cSrcweir 	return sal_True;
2627cdf0e10cSrcweir }
2628cdf0e10cSrcweir 
2629cdf0e10cSrcweir sal_Bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
2630cdf0e10cSrcweir {
2631cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
2632cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
2633cdf0e10cSrcweir 	if( nMemberId == MID_NAME )
2634cdf0e10cSrcweir 	{
2635cdf0e10cSrcweir 		return sal_False;
2636cdf0e10cSrcweir 	}
2637cdf0e10cSrcweir 	else
2638cdf0e10cSrcweir 	{
2639cdf0e10cSrcweir 		maPolyPolygon.clear();
2640cdf0e10cSrcweir 
2641cdf0e10cSrcweir 		if( rVal.hasValue() && rVal.getValue() )
2642cdf0e10cSrcweir 		{
2643cdf0e10cSrcweir 			if( rVal.getValueType() != ::getCppuType((const com::sun::star::drawing::PolyPolygonBezierCoords*)0) )
2644cdf0e10cSrcweir 				return sal_False;
2645cdf0e10cSrcweir 
2646cdf0e10cSrcweir 			com::sun::star::drawing::PolyPolygonBezierCoords* pCoords = (com::sun::star::drawing::PolyPolygonBezierCoords*)rVal.getValue();
2647cdf0e10cSrcweir 			if( pCoords->Coordinates.getLength() > 0 )
2648cdf0e10cSrcweir 			{
2649cdf0e10cSrcweir 				maPolyPolygon = SvxConvertPolyPolygonBezierToB2DPolyPolygon( pCoords );
2650cdf0e10cSrcweir 				// #i72807# close line start/end polygons hard
2651cdf0e10cSrcweir 				// maPolyPolygon.setClosed(true);
2652cdf0e10cSrcweir 			}
2653cdf0e10cSrcweir 		}
2654cdf0e10cSrcweir 	}
2655cdf0e10cSrcweir 
2656cdf0e10cSrcweir 	return sal_True;
2657cdf0e10cSrcweir }
2658cdf0e10cSrcweir 
2659cdf0e10cSrcweir // ----------------------------
2660cdf0e10cSrcweir // class XLineStartWidthItem
2661cdf0e10cSrcweir // ----------------------------
2662cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineStartWidthItem, SfxMetricItem);
2663cdf0e10cSrcweir 
2664cdf0e10cSrcweir /*************************************************************************
2665cdf0e10cSrcweir |*
2666cdf0e10cSrcweir |*	  XLineStartWidthItem::XLineStartWidthItem(sal_Int32 nWidth)
2667cdf0e10cSrcweir |*
2668cdf0e10cSrcweir |*	  Beschreibung
2669cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2670cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
2671cdf0e10cSrcweir |*
2672cdf0e10cSrcweir *************************************************************************/
2673cdf0e10cSrcweir 
2674cdf0e10cSrcweir XLineStartWidthItem::XLineStartWidthItem(long nWidth) :
2675cdf0e10cSrcweir 	SfxMetricItem(XATTR_LINESTARTWIDTH, nWidth)
2676cdf0e10cSrcweir {
2677cdf0e10cSrcweir }
2678cdf0e10cSrcweir 
2679cdf0e10cSrcweir /*************************************************************************
2680cdf0e10cSrcweir |*
2681cdf0e10cSrcweir |*	  XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn)
2682cdf0e10cSrcweir |*
2683cdf0e10cSrcweir |*	  Beschreibung
2684cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2685cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2686cdf0e10cSrcweir |*
2687cdf0e10cSrcweir *************************************************************************/
2688cdf0e10cSrcweir 
2689cdf0e10cSrcweir XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn) :
2690cdf0e10cSrcweir 	SfxMetricItem(XATTR_LINESTARTWIDTH, rIn)
2691cdf0e10cSrcweir {
2692cdf0e10cSrcweir }
2693cdf0e10cSrcweir 
2694cdf0e10cSrcweir /*************************************************************************
2695cdf0e10cSrcweir |*
2696cdf0e10cSrcweir |*	  XLineStartWidthItem::Clone(SfxItemPool* pPool) const
2697cdf0e10cSrcweir |*
2698cdf0e10cSrcweir |*	  Beschreibung
2699cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2700cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2701cdf0e10cSrcweir |*
2702cdf0e10cSrcweir *************************************************************************/
2703cdf0e10cSrcweir 
2704cdf0e10cSrcweir SfxPoolItem* XLineStartWidthItem::Clone(SfxItemPool* /*pPool*/) const
2705cdf0e10cSrcweir {
2706cdf0e10cSrcweir 	return new XLineStartWidthItem(*this);
2707cdf0e10cSrcweir }
2708cdf0e10cSrcweir 
2709cdf0e10cSrcweir /*************************************************************************
2710cdf0e10cSrcweir |*
2711cdf0e10cSrcweir |*	  SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, sal_uInt16 nVer)
2712cdf0e10cSrcweir |*												const
2713cdf0e10cSrcweir |*
2714cdf0e10cSrcweir |*	  Beschreibung
2715cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2716cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2717cdf0e10cSrcweir |*
2718cdf0e10cSrcweir *************************************************************************/
2719cdf0e10cSrcweir 
2720cdf0e10cSrcweir SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
2721cdf0e10cSrcweir {
2722cdf0e10cSrcweir 	return new XLineStartWidthItem(rIn);
2723cdf0e10cSrcweir }
2724cdf0e10cSrcweir 
2725cdf0e10cSrcweir //------------------------------------------------------------------------
2726cdf0e10cSrcweir 
2727cdf0e10cSrcweir SfxItemPresentation XLineStartWidthItem::GetPresentation
2728cdf0e10cSrcweir (
2729cdf0e10cSrcweir 	SfxItemPresentation ePres,
2730cdf0e10cSrcweir 	SfxMapUnit			eCoreUnit,
2731cdf0e10cSrcweir 	SfxMapUnit			ePresUnit,
2732cdf0e10cSrcweir     XubString&          rText, const IntlWrapper * pIntl
2733cdf0e10cSrcweir )	const
2734cdf0e10cSrcweir {
2735cdf0e10cSrcweir 	switch ( ePres )
2736cdf0e10cSrcweir 	{
2737cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
2738cdf0e10cSrcweir 			rText.Erase();
2739cdf0e10cSrcweir 			return ePres;
2740cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
2741cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
2742cdf0e10cSrcweir 			rText = GetMetricText( (long) GetValue(),
2743cdf0e10cSrcweir                                     eCoreUnit, ePresUnit, pIntl);
2744cdf0e10cSrcweir 			rText += SVX_RESSTR( GetMetricId( ePresUnit) );
2745cdf0e10cSrcweir 			return ePres;
2746cdf0e10cSrcweir 		default:
2747cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
2748cdf0e10cSrcweir 	}
2749cdf0e10cSrcweir }
2750cdf0e10cSrcweir 
2751cdf0e10cSrcweir sal_Bool XLineStartWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2752cdf0e10cSrcweir {
2753cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
2754cdf0e10cSrcweir 	return sal_True;
2755cdf0e10cSrcweir }
2756cdf0e10cSrcweir 
2757cdf0e10cSrcweir sal_Bool XLineStartWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2758cdf0e10cSrcweir {
2759cdf0e10cSrcweir 	sal_Int32 nValue = 0;
2760cdf0e10cSrcweir 	rVal >>= nValue;
2761cdf0e10cSrcweir 	SetValue( nValue );
2762cdf0e10cSrcweir 	return sal_True;
2763cdf0e10cSrcweir }
2764cdf0e10cSrcweir 
2765cdf0e10cSrcweir 
2766cdf0e10cSrcweir 
2767cdf0e10cSrcweir // --------------------------
2768cdf0e10cSrcweir // class XLineEndWidthItem
2769cdf0e10cSrcweir // --------------------------
2770cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineEndWidthItem, SfxMetricItem);
2771cdf0e10cSrcweir 
2772cdf0e10cSrcweir /*************************************************************************
2773cdf0e10cSrcweir |*
2774cdf0e10cSrcweir |*	  XLineEndWidthItem::XLineEndWidthItem(long nWidth)
2775cdf0e10cSrcweir |*
2776cdf0e10cSrcweir |*	  Beschreibung
2777cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2778cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2779cdf0e10cSrcweir |*
2780cdf0e10cSrcweir *************************************************************************/
2781cdf0e10cSrcweir 
2782cdf0e10cSrcweir XLineEndWidthItem::XLineEndWidthItem(long nWidth) :
2783cdf0e10cSrcweir    SfxMetricItem(XATTR_LINEENDWIDTH, nWidth)
2784cdf0e10cSrcweir {
2785cdf0e10cSrcweir }
2786cdf0e10cSrcweir 
2787cdf0e10cSrcweir /*************************************************************************
2788cdf0e10cSrcweir |*
2789cdf0e10cSrcweir |*	  XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn)
2790cdf0e10cSrcweir |*
2791cdf0e10cSrcweir |*	  Beschreibung
2792cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2793cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2794cdf0e10cSrcweir |*
2795cdf0e10cSrcweir *************************************************************************/
2796cdf0e10cSrcweir 
2797cdf0e10cSrcweir XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn) :
2798cdf0e10cSrcweir 	SfxMetricItem(XATTR_LINEENDWIDTH, rIn)
2799cdf0e10cSrcweir {
2800cdf0e10cSrcweir }
2801cdf0e10cSrcweir 
2802cdf0e10cSrcweir /*************************************************************************
2803cdf0e10cSrcweir |*
2804cdf0e10cSrcweir |*	  XLineEndWidthItem::Clone(SfxItemPool* pPool) const
2805cdf0e10cSrcweir |*
2806cdf0e10cSrcweir |*	  Beschreibung
2807cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2808cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2809cdf0e10cSrcweir |*
2810cdf0e10cSrcweir *************************************************************************/
2811cdf0e10cSrcweir 
2812cdf0e10cSrcweir SfxPoolItem* XLineEndWidthItem::Clone(SfxItemPool* /*pPool*/) const
2813cdf0e10cSrcweir {
2814cdf0e10cSrcweir 	return new XLineEndWidthItem(*this);
2815cdf0e10cSrcweir }
2816cdf0e10cSrcweir 
2817cdf0e10cSrcweir /*************************************************************************
2818cdf0e10cSrcweir |*
2819cdf0e10cSrcweir |*	  SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, sal_uInt16 nVer) const
2820cdf0e10cSrcweir |*
2821cdf0e10cSrcweir |*	  Beschreibung
2822cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2823cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2824cdf0e10cSrcweir |*
2825cdf0e10cSrcweir *************************************************************************/
2826cdf0e10cSrcweir 
2827cdf0e10cSrcweir SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
2828cdf0e10cSrcweir {
2829cdf0e10cSrcweir 	return new XLineEndWidthItem(rIn);
2830cdf0e10cSrcweir }
2831cdf0e10cSrcweir 
2832cdf0e10cSrcweir //------------------------------------------------------------------------
2833cdf0e10cSrcweir 
2834cdf0e10cSrcweir SfxItemPresentation XLineEndWidthItem::GetPresentation
2835cdf0e10cSrcweir (
2836cdf0e10cSrcweir 	SfxItemPresentation ePres,
2837cdf0e10cSrcweir 	SfxMapUnit			eCoreUnit,
2838cdf0e10cSrcweir 	SfxMapUnit			ePresUnit,
2839cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *pIntl
2840cdf0e10cSrcweir )	const
2841cdf0e10cSrcweir {
2842cdf0e10cSrcweir 	switch ( ePres )
2843cdf0e10cSrcweir 	{
2844cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
2845cdf0e10cSrcweir 			rText.Erase();
2846cdf0e10cSrcweir 			return ePres;
2847cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
2848cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
2849cdf0e10cSrcweir 			rText = GetMetricText( (long) GetValue(),
2850cdf0e10cSrcweir                                     eCoreUnit, ePresUnit, pIntl);
2851cdf0e10cSrcweir 			rText += SVX_RESSTR( GetMetricId( ePresUnit) );
2852cdf0e10cSrcweir 			return ePres;
2853cdf0e10cSrcweir 		default:
2854cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
2855cdf0e10cSrcweir 	}
2856cdf0e10cSrcweir }
2857cdf0e10cSrcweir 
2858cdf0e10cSrcweir sal_Bool XLineEndWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2859cdf0e10cSrcweir {
2860cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
2861cdf0e10cSrcweir 	return sal_True;
2862cdf0e10cSrcweir }
2863cdf0e10cSrcweir 
2864cdf0e10cSrcweir sal_Bool XLineEndWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2865cdf0e10cSrcweir {
2866cdf0e10cSrcweir 	sal_Int32 nValue = 0;
2867cdf0e10cSrcweir 	rVal >>= nValue;
2868cdf0e10cSrcweir 	SetValue( nValue );
2869cdf0e10cSrcweir 	return sal_True;
2870cdf0e10cSrcweir }
2871cdf0e10cSrcweir 
2872cdf0e10cSrcweir 
2873cdf0e10cSrcweir // -----------------------------
2874cdf0e10cSrcweir // class XLineStartCenterItem
2875cdf0e10cSrcweir // -----------------------------
2876cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineStartCenterItem, SfxBoolItem);
2877cdf0e10cSrcweir 
2878cdf0e10cSrcweir /*************************************************************************
2879cdf0e10cSrcweir |*
2880cdf0e10cSrcweir |*	  XLineStartCenterItem::XLineStartCenterItem(sal_Bool bStartCenter)
2881cdf0e10cSrcweir |*
2882cdf0e10cSrcweir |*	  Beschreibung
2883cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2884cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2885cdf0e10cSrcweir |*
2886cdf0e10cSrcweir *************************************************************************/
2887cdf0e10cSrcweir 
2888cdf0e10cSrcweir XLineStartCenterItem::XLineStartCenterItem(sal_Bool bStartCenter) :
2889cdf0e10cSrcweir 	SfxBoolItem(XATTR_LINESTARTCENTER, bStartCenter)
2890cdf0e10cSrcweir {
2891cdf0e10cSrcweir }
2892cdf0e10cSrcweir 
2893cdf0e10cSrcweir /*************************************************************************
2894cdf0e10cSrcweir |*
2895cdf0e10cSrcweir |*	  XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn)
2896cdf0e10cSrcweir |*
2897cdf0e10cSrcweir |*	  Beschreibung
2898cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2899cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2900cdf0e10cSrcweir |*
2901cdf0e10cSrcweir *************************************************************************/
2902cdf0e10cSrcweir 
2903cdf0e10cSrcweir XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn) :
2904cdf0e10cSrcweir 	SfxBoolItem(XATTR_LINESTARTCENTER, rIn)
2905cdf0e10cSrcweir {
2906cdf0e10cSrcweir }
2907cdf0e10cSrcweir 
2908cdf0e10cSrcweir /*************************************************************************
2909cdf0e10cSrcweir |*
2910cdf0e10cSrcweir |*	  XLineStartCenterItem::Clone(SfxItemPool* pPool) const
2911cdf0e10cSrcweir |*
2912cdf0e10cSrcweir |*	  Beschreibung
2913cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2914cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2915cdf0e10cSrcweir |*
2916cdf0e10cSrcweir *************************************************************************/
2917cdf0e10cSrcweir 
2918cdf0e10cSrcweir SfxPoolItem* XLineStartCenterItem::Clone(SfxItemPool* /*pPool*/) const
2919cdf0e10cSrcweir {
2920cdf0e10cSrcweir 	return new XLineStartCenterItem(*this);
2921cdf0e10cSrcweir }
2922cdf0e10cSrcweir 
2923cdf0e10cSrcweir /*************************************************************************
2924cdf0e10cSrcweir |*
2925cdf0e10cSrcweir |*	  SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, sal_uInt16 nVer)
2926cdf0e10cSrcweir |*												const
2927cdf0e10cSrcweir |*
2928cdf0e10cSrcweir |*	  Beschreibung
2929cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2930cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2931cdf0e10cSrcweir |*
2932cdf0e10cSrcweir *************************************************************************/
2933cdf0e10cSrcweir 
2934cdf0e10cSrcweir SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
2935cdf0e10cSrcweir {
2936cdf0e10cSrcweir 	return new XLineStartCenterItem(rIn);
2937cdf0e10cSrcweir }
2938cdf0e10cSrcweir 
2939cdf0e10cSrcweir //------------------------------------------------------------------------
2940cdf0e10cSrcweir 
2941cdf0e10cSrcweir SfxItemPresentation XLineStartCenterItem::GetPresentation
2942cdf0e10cSrcweir (
2943cdf0e10cSrcweir 	SfxItemPresentation ePres,
2944cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
2945cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
2946cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
2947cdf0e10cSrcweir )	const
2948cdf0e10cSrcweir {
2949cdf0e10cSrcweir 	switch ( ePres )
2950cdf0e10cSrcweir 	{
2951cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
2952cdf0e10cSrcweir 			rText.Erase();
2953cdf0e10cSrcweir 			return ePres;
2954cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
2955cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
2956cdf0e10cSrcweir 			rText = XubString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
2957cdf0e10cSrcweir 							RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
2958cdf0e10cSrcweir 			return ePres;
2959cdf0e10cSrcweir 		default:
2960cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
2961cdf0e10cSrcweir 	}
2962cdf0e10cSrcweir }
2963cdf0e10cSrcweir 
2964cdf0e10cSrcweir sal_Bool XLineStartCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
2965cdf0e10cSrcweir {
2966cdf0e10cSrcweir 	sal_Bool bValue = GetValue();
2967cdf0e10cSrcweir 	rVal.setValue( &bValue, ::getCppuBooleanType()  );
2968cdf0e10cSrcweir 	return sal_True;
2969cdf0e10cSrcweir }
2970cdf0e10cSrcweir 
2971cdf0e10cSrcweir sal_Bool XLineStartCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
2972cdf0e10cSrcweir {
2973cdf0e10cSrcweir 	if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() )
2974cdf0e10cSrcweir 		return sal_False;
2975cdf0e10cSrcweir 
2976cdf0e10cSrcweir 	SetValue( *(sal_Bool*)rVal.getValue() );
2977cdf0e10cSrcweir 	return sal_True;
2978cdf0e10cSrcweir }
2979cdf0e10cSrcweir 
2980cdf0e10cSrcweir 
2981cdf0e10cSrcweir // ---------------------------
2982cdf0e10cSrcweir // class XLineEndCenterItem
2983cdf0e10cSrcweir // ---------------------------
2984cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XLineEndCenterItem, SfxBoolItem);
2985cdf0e10cSrcweir 
2986cdf0e10cSrcweir /*************************************************************************
2987cdf0e10cSrcweir |*
2988cdf0e10cSrcweir |*	  XLineEndCenterItem::XLineEndCenterItem(sal_Bool bEndCenter)
2989cdf0e10cSrcweir |*
2990cdf0e10cSrcweir |*	  Beschreibung
2991cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
2992cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
2993cdf0e10cSrcweir |*
2994cdf0e10cSrcweir *************************************************************************/
2995cdf0e10cSrcweir 
2996cdf0e10cSrcweir XLineEndCenterItem::XLineEndCenterItem(sal_Bool bEndCenter) :
2997cdf0e10cSrcweir 	SfxBoolItem(XATTR_LINEENDCENTER, bEndCenter)
2998cdf0e10cSrcweir {
2999cdf0e10cSrcweir }
3000cdf0e10cSrcweir 
3001cdf0e10cSrcweir /*************************************************************************
3002cdf0e10cSrcweir |*
3003cdf0e10cSrcweir |*	  XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn)
3004cdf0e10cSrcweir |*
3005cdf0e10cSrcweir |*	  Beschreibung
3006cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3007cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3008cdf0e10cSrcweir |*
3009cdf0e10cSrcweir *************************************************************************/
3010cdf0e10cSrcweir 
3011cdf0e10cSrcweir XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn) :
3012cdf0e10cSrcweir 	SfxBoolItem(XATTR_LINEENDCENTER, rIn)
3013cdf0e10cSrcweir {
3014cdf0e10cSrcweir }
3015cdf0e10cSrcweir 
3016cdf0e10cSrcweir /*************************************************************************
3017cdf0e10cSrcweir |*
3018cdf0e10cSrcweir |*	  XLineEndCenterItem::Clone(SfxItemPool* pPool) const
3019cdf0e10cSrcweir |*
3020cdf0e10cSrcweir |*	  Beschreibung
3021cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3022cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3023cdf0e10cSrcweir |*
3024cdf0e10cSrcweir *************************************************************************/
3025cdf0e10cSrcweir 
3026cdf0e10cSrcweir SfxPoolItem* XLineEndCenterItem::Clone(SfxItemPool* /*pPool*/) const
3027cdf0e10cSrcweir {
3028cdf0e10cSrcweir 	return new XLineEndCenterItem(*this);
3029cdf0e10cSrcweir }
3030cdf0e10cSrcweir 
3031cdf0e10cSrcweir /*************************************************************************
3032cdf0e10cSrcweir |*
3033cdf0e10cSrcweir |*	  SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, sal_uInt16 nVer)
3034cdf0e10cSrcweir |*												const
3035cdf0e10cSrcweir |*
3036cdf0e10cSrcweir |*	  Beschreibung
3037cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3038cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3039cdf0e10cSrcweir |*
3040cdf0e10cSrcweir *************************************************************************/
3041cdf0e10cSrcweir 
3042cdf0e10cSrcweir SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
3043cdf0e10cSrcweir {
3044cdf0e10cSrcweir 	return new XLineEndCenterItem(rIn);
3045cdf0e10cSrcweir }
3046cdf0e10cSrcweir 
3047cdf0e10cSrcweir //------------------------------------------------------------------------
3048cdf0e10cSrcweir 
3049cdf0e10cSrcweir SfxItemPresentation XLineEndCenterItem::GetPresentation
3050cdf0e10cSrcweir (
3051cdf0e10cSrcweir 	SfxItemPresentation ePres,
3052cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
3053cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
3054cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
3055cdf0e10cSrcweir )	const
3056cdf0e10cSrcweir {
3057cdf0e10cSrcweir 	switch ( ePres )
3058cdf0e10cSrcweir 	{
3059cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
3060cdf0e10cSrcweir 			rText.Erase();
3061cdf0e10cSrcweir 			return ePres;
3062cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
3063cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
3064cdf0e10cSrcweir 			rText = XubString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
3065cdf0e10cSrcweir 							RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
3066cdf0e10cSrcweir 			return ePres;
3067cdf0e10cSrcweir 		default:
3068cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
3069cdf0e10cSrcweir 	}
3070cdf0e10cSrcweir }
3071cdf0e10cSrcweir 
3072cdf0e10cSrcweir sal_Bool XLineEndCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
3073cdf0e10cSrcweir {
3074cdf0e10cSrcweir 	sal_Bool bValue = GetValue();
3075cdf0e10cSrcweir 	rVal.setValue( &bValue, ::getCppuBooleanType()  );
3076cdf0e10cSrcweir 	return sal_True;
3077cdf0e10cSrcweir }
3078cdf0e10cSrcweir 
3079cdf0e10cSrcweir sal_Bool XLineEndCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
3080cdf0e10cSrcweir {
3081cdf0e10cSrcweir 	if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() )
3082cdf0e10cSrcweir 		return sal_False;
3083cdf0e10cSrcweir 
3084cdf0e10cSrcweir 	SetValue( *(sal_Bool*)rVal.getValue() );
3085cdf0e10cSrcweir 	return sal_True;
3086cdf0e10cSrcweir }
3087cdf0e10cSrcweir 
3088cdf0e10cSrcweir 
3089cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3090cdf0e10cSrcweir //							 Fuellattribute
3091cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3092cdf0e10cSrcweir 
3093cdf0e10cSrcweir // --------------------
3094cdf0e10cSrcweir // class XFillStyleItem
3095cdf0e10cSrcweir // --------------------
3096cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFillStyleItem, SfxEnumItem);
3097cdf0e10cSrcweir 
3098cdf0e10cSrcweir /*************************************************************************
3099cdf0e10cSrcweir |*
3100cdf0e10cSrcweir |*	  XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle)
3101cdf0e10cSrcweir |*
3102cdf0e10cSrcweir |*	  Beschreibung
3103cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3104cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3105cdf0e10cSrcweir |*
3106cdf0e10cSrcweir *************************************************************************/
3107cdf0e10cSrcweir 
3108cdf0e10cSrcweir XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) :
3109cdf0e10cSrcweir 	SfxEnumItem(XATTR_FILLSTYLE, sal::static_int_cast< sal_uInt16 >(eFillStyle))
3110cdf0e10cSrcweir {
3111cdf0e10cSrcweir }
3112cdf0e10cSrcweir 
3113cdf0e10cSrcweir /*************************************************************************
3114cdf0e10cSrcweir |*
3115cdf0e10cSrcweir |*	  XFillStyleItem::XFillStyleItem(SvStream& rIn)
3116cdf0e10cSrcweir |*
3117cdf0e10cSrcweir |*	  Beschreibung
3118cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3119cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3120cdf0e10cSrcweir |*
3121cdf0e10cSrcweir *************************************************************************/
3122cdf0e10cSrcweir 
3123cdf0e10cSrcweir XFillStyleItem::XFillStyleItem(SvStream& rIn) :
3124cdf0e10cSrcweir 	SfxEnumItem(XATTR_FILLSTYLE, rIn)
3125cdf0e10cSrcweir {
3126cdf0e10cSrcweir }
3127cdf0e10cSrcweir 
3128cdf0e10cSrcweir /*************************************************************************
3129cdf0e10cSrcweir |*
3130cdf0e10cSrcweir |*	  XFillStyleItem::Clone(SfxItemPool* pPool) const
3131cdf0e10cSrcweir |*
3132cdf0e10cSrcweir |*	  Beschreibung
3133cdf0e10cSrcweir |*	  Ersterstellung	09.11.94
3134cdf0e10cSrcweir |*	  Letzte Aenderung	09.11.94
3135cdf0e10cSrcweir |*
3136cdf0e10cSrcweir *************************************************************************/
3137cdf0e10cSrcweir 
3138cdf0e10cSrcweir SfxPoolItem* XFillStyleItem::Clone(SfxItemPool* /*pPool*/) const
3139cdf0e10cSrcweir {
3140cdf0e10cSrcweir 	return new XFillStyleItem( *this );
3141cdf0e10cSrcweir }
3142cdf0e10cSrcweir 
3143cdf0e10cSrcweir /*************************************************************************
3144cdf0e10cSrcweir |*
3145cdf0e10cSrcweir |*	  SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, sal_uInt16 nVer) const
3146cdf0e10cSrcweir |*
3147cdf0e10cSrcweir |*	  Beschreibung
3148cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3149cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3150cdf0e10cSrcweir |*
3151cdf0e10cSrcweir *************************************************************************/
3152cdf0e10cSrcweir 
3153cdf0e10cSrcweir SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
3154cdf0e10cSrcweir {
3155cdf0e10cSrcweir 	return new XFillStyleItem(rIn);
3156cdf0e10cSrcweir }
3157cdf0e10cSrcweir 
3158cdf0e10cSrcweir //------------------------------------------------------------------------
3159cdf0e10cSrcweir 
3160cdf0e10cSrcweir SfxItemPresentation XFillStyleItem::GetPresentation
3161cdf0e10cSrcweir (
3162cdf0e10cSrcweir 	SfxItemPresentation ePres,
3163cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
3164cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
3165cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
3166cdf0e10cSrcweir )	const
3167cdf0e10cSrcweir {
3168cdf0e10cSrcweir 	rText.Erase();
3169cdf0e10cSrcweir 
3170cdf0e10cSrcweir 	switch ( ePres )
3171cdf0e10cSrcweir 	{
3172cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
3173cdf0e10cSrcweir 			return ePres;
3174cdf0e10cSrcweir 
3175cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
3176cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
3177cdf0e10cSrcweir 		{
3178cdf0e10cSrcweir 			sal_uInt16 nId = 0;
3179cdf0e10cSrcweir 
3180cdf0e10cSrcweir 			switch( (sal_uInt16)GetValue() )
3181cdf0e10cSrcweir 			{
3182cdf0e10cSrcweir 				case XFILL_NONE:
3183cdf0e10cSrcweir 					nId = RID_SVXSTR_INVISIBLE;
3184cdf0e10cSrcweir 					break;
3185cdf0e10cSrcweir 				case XFILL_SOLID:
3186cdf0e10cSrcweir 					nId = RID_SVXSTR_SOLID;
3187cdf0e10cSrcweir 					break;
3188cdf0e10cSrcweir 				case XFILL_GRADIENT:
3189cdf0e10cSrcweir 					nId = RID_SVXSTR_GRADIENT;
3190cdf0e10cSrcweir 					break;
3191cdf0e10cSrcweir 				case XFILL_HATCH:
3192cdf0e10cSrcweir 					nId = RID_SVXSTR_HATCH;
3193cdf0e10cSrcweir 					break;
3194cdf0e10cSrcweir 				case XFILL_BITMAP:
3195cdf0e10cSrcweir 					nId = RID_SVXSTR_BITMAP;
3196cdf0e10cSrcweir 					break;
3197cdf0e10cSrcweir 			}
3198cdf0e10cSrcweir 
3199cdf0e10cSrcweir 			if ( nId )
3200cdf0e10cSrcweir 				rText = SVX_RESSTR( nId );
3201cdf0e10cSrcweir 			return ePres;
3202cdf0e10cSrcweir 		}
3203cdf0e10cSrcweir 		default:
3204cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
3205cdf0e10cSrcweir 	}
3206cdf0e10cSrcweir }
3207cdf0e10cSrcweir 
3208cdf0e10cSrcweir //------------------------------------------------------------------------
3209cdf0e10cSrcweir 
3210cdf0e10cSrcweir sal_uInt16 XFillStyleItem::GetValueCount() const
3211cdf0e10cSrcweir {
3212cdf0e10cSrcweir 	return 5;
3213cdf0e10cSrcweir }
3214cdf0e10cSrcweir 
3215cdf0e10cSrcweir // -----------------------------------------------------------------------
3216cdf0e10cSrcweir sal_Bool XFillStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
3217cdf0e10cSrcweir {
3218cdf0e10cSrcweir 	::com::sun::star::drawing::FillStyle eFS = (::com::sun::star::drawing::FillStyle)GetValue();
3219cdf0e10cSrcweir 
3220cdf0e10cSrcweir 	rVal <<= eFS;
3221cdf0e10cSrcweir 
3222cdf0e10cSrcweir 	return sal_True;
3223cdf0e10cSrcweir }
3224cdf0e10cSrcweir 
3225cdf0e10cSrcweir // -----------------------------------------------------------------------
3226cdf0e10cSrcweir sal_Bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
3227cdf0e10cSrcweir {
3228cdf0e10cSrcweir     ::com::sun::star::drawing::FillStyle eFS;
3229cdf0e10cSrcweir 	if(!(rVal >>= eFS))
3230cdf0e10cSrcweir     {
3231cdf0e10cSrcweir         // also try an int (for Basic)
3232cdf0e10cSrcweir         sal_Int32 nFS = 0;
3233cdf0e10cSrcweir         if(!(rVal >>= nFS))
3234cdf0e10cSrcweir             return sal_False;
3235cdf0e10cSrcweir         eFS = (::com::sun::star::drawing::FillStyle)nFS;
3236cdf0e10cSrcweir     }
3237cdf0e10cSrcweir 
3238cdf0e10cSrcweir 	SetValue( sal::static_int_cast< sal_uInt16 >( eFS ) );
3239cdf0e10cSrcweir 
3240cdf0e10cSrcweir 	return sal_True;
3241cdf0e10cSrcweir }
3242cdf0e10cSrcweir 
3243cdf0e10cSrcweir 
3244cdf0e10cSrcweir // -------------------
3245cdf0e10cSrcweir // class XFillColorItem
3246cdf0e10cSrcweir // -------------------
3247cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem);
3248cdf0e10cSrcweir 
3249cdf0e10cSrcweir /*************************************************************************
3250cdf0e10cSrcweir |*
3251cdf0e10cSrcweir |*	  XFillColorItem::XFillColorItem(sal_Int32 nIndex, const Color& rTheColor)
3252cdf0e10cSrcweir |*
3253cdf0e10cSrcweir |*	  Beschreibung
3254cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3255cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3256cdf0e10cSrcweir |*
3257cdf0e10cSrcweir *************************************************************************/
3258cdf0e10cSrcweir 
3259cdf0e10cSrcweir XFillColorItem::XFillColorItem(sal_Int32 nIndex, const Color& rTheColor) :
3260cdf0e10cSrcweir 	XColorItem(XATTR_FILLCOLOR, nIndex, rTheColor)
3261cdf0e10cSrcweir {
3262cdf0e10cSrcweir }
3263cdf0e10cSrcweir 
3264cdf0e10cSrcweir /*************************************************************************
3265cdf0e10cSrcweir |*
3266cdf0e10cSrcweir |*	  XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor)
3267cdf0e10cSrcweir |*
3268cdf0e10cSrcweir |*	  Beschreibung
3269cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3270cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3271cdf0e10cSrcweir |*
3272cdf0e10cSrcweir *************************************************************************/
3273cdf0e10cSrcweir 
3274cdf0e10cSrcweir XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor) :
3275cdf0e10cSrcweir 	XColorItem(XATTR_FILLCOLOR, rName, rTheColor)
3276cdf0e10cSrcweir {
3277cdf0e10cSrcweir }
3278cdf0e10cSrcweir 
3279cdf0e10cSrcweir /*************************************************************************
3280cdf0e10cSrcweir |*
3281cdf0e10cSrcweir |*	  XFillColorItem::XFillColorItem(SvStream& rIn)
3282cdf0e10cSrcweir |*
3283cdf0e10cSrcweir |*	  Beschreibung
3284cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3285cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3286cdf0e10cSrcweir |*
3287cdf0e10cSrcweir *************************************************************************/
3288cdf0e10cSrcweir 
3289cdf0e10cSrcweir XFillColorItem::XFillColorItem(SvStream& rIn) :
3290cdf0e10cSrcweir 	XColorItem(XATTR_FILLCOLOR, rIn)
3291cdf0e10cSrcweir {
3292cdf0e10cSrcweir }
3293cdf0e10cSrcweir 
3294cdf0e10cSrcweir /*************************************************************************
3295cdf0e10cSrcweir |*
3296cdf0e10cSrcweir |*	  XFillColorItem::Clone(SfxItemPool* pPool) const
3297cdf0e10cSrcweir |*
3298cdf0e10cSrcweir |*	  Beschreibung
3299cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3300cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3301cdf0e10cSrcweir |*
3302cdf0e10cSrcweir *************************************************************************/
3303cdf0e10cSrcweir 
3304cdf0e10cSrcweir SfxPoolItem* XFillColorItem::Clone(SfxItemPool* /*pPool*/) const
3305cdf0e10cSrcweir {
3306cdf0e10cSrcweir 	return new XFillColorItem(*this);
3307cdf0e10cSrcweir }
3308cdf0e10cSrcweir 
3309cdf0e10cSrcweir /*************************************************************************
3310cdf0e10cSrcweir |*
3311cdf0e10cSrcweir |*	  SfxPoolItem* XFillColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const
3312cdf0e10cSrcweir |*
3313cdf0e10cSrcweir |*	  Beschreibung
3314cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3315cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3316cdf0e10cSrcweir |*
3317cdf0e10cSrcweir *************************************************************************/
3318cdf0e10cSrcweir 
3319cdf0e10cSrcweir SfxPoolItem* XFillColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
3320cdf0e10cSrcweir {
3321cdf0e10cSrcweir 	return new XFillColorItem(rIn);
3322cdf0e10cSrcweir }
3323cdf0e10cSrcweir 
3324cdf0e10cSrcweir //------------------------------------------------------------------------
3325cdf0e10cSrcweir 
3326cdf0e10cSrcweir SfxItemPresentation XFillColorItem::GetPresentation
3327cdf0e10cSrcweir (
3328cdf0e10cSrcweir 	SfxItemPresentation ePres,
3329cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
3330cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
3331cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
3332cdf0e10cSrcweir )	const
3333cdf0e10cSrcweir {
3334cdf0e10cSrcweir 	switch ( ePres )
3335cdf0e10cSrcweir 	{
3336cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
3337cdf0e10cSrcweir 			rText.Erase();
3338cdf0e10cSrcweir 			return ePres;
3339cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
3340cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
3341cdf0e10cSrcweir 			rText = GetName();
3342cdf0e10cSrcweir 			return ePres;
3343cdf0e10cSrcweir 		default:
3344cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
3345cdf0e10cSrcweir 	}
3346cdf0e10cSrcweir }
3347cdf0e10cSrcweir 
3348cdf0e10cSrcweir // -----------------------------------------------------------------------
3349cdf0e10cSrcweir 
3350cdf0e10cSrcweir sal_Bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
3351cdf0e10cSrcweir {
3352cdf0e10cSrcweir     rVal <<= (sal_Int32)GetColorValue().GetRGBColor();
3353cdf0e10cSrcweir 
3354cdf0e10cSrcweir 	return sal_True;
3355cdf0e10cSrcweir }
3356cdf0e10cSrcweir 
3357cdf0e10cSrcweir // -----------------------------------------------------------------------
3358cdf0e10cSrcweir 
3359cdf0e10cSrcweir sal_Bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
3360cdf0e10cSrcweir {
3361cdf0e10cSrcweir 	sal_Int32 nValue = 0;
3362cdf0e10cSrcweir 	if(!(rVal >>= nValue ))
3363cdf0e10cSrcweir 		return sal_False;
3364cdf0e10cSrcweir 
3365cdf0e10cSrcweir 	SetColorValue( nValue );
3366cdf0e10cSrcweir 	return sal_True;
3367cdf0e10cSrcweir }
3368cdf0e10cSrcweir 
3369cdf0e10cSrcweir // -----------------------------
3370cdf0e10cSrcweir // class XSecondaryFillColorItem
3371cdf0e10cSrcweir // -----------------------------
3372cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XSecondaryFillColorItem, XColorItem);
3373cdf0e10cSrcweir 
3374cdf0e10cSrcweir XSecondaryFillColorItem::XSecondaryFillColorItem(sal_Int32 nIndex, const Color& rTheColor) :
3375cdf0e10cSrcweir 	XColorItem(XATTR_SECONDARYFILLCOLOR, nIndex, rTheColor)
3376cdf0e10cSrcweir {
3377cdf0e10cSrcweir }
3378cdf0e10cSrcweir 
3379cdf0e10cSrcweir XSecondaryFillColorItem::XSecondaryFillColorItem(const XubString& rName, const Color& rTheColor) :
3380cdf0e10cSrcweir 	XColorItem(XATTR_SECONDARYFILLCOLOR, rName, rTheColor)
3381cdf0e10cSrcweir {
3382cdf0e10cSrcweir }
3383cdf0e10cSrcweir 
3384cdf0e10cSrcweir XSecondaryFillColorItem::XSecondaryFillColorItem( SvStream& rIn ) :
3385cdf0e10cSrcweir 	XColorItem(XATTR_SECONDARYFILLCOLOR, rIn)
3386cdf0e10cSrcweir {
3387cdf0e10cSrcweir }
3388cdf0e10cSrcweir 
3389cdf0e10cSrcweir SfxPoolItem* XSecondaryFillColorItem::Clone(SfxItemPool* /*pPool*/) const
3390cdf0e10cSrcweir {
3391cdf0e10cSrcweir 	return new XSecondaryFillColorItem(*this);
3392cdf0e10cSrcweir }
3393cdf0e10cSrcweir 
3394cdf0e10cSrcweir SfxPoolItem* XSecondaryFillColorItem::Create( SvStream& rIn, sal_uInt16 nVer ) const
3395cdf0e10cSrcweir {
3396cdf0e10cSrcweir 	if ( nVer >= 2 )
3397cdf0e10cSrcweir 		return new XSecondaryFillColorItem( rIn );
3398cdf0e10cSrcweir 	else
3399cdf0e10cSrcweir 		return new XSecondaryFillColorItem( String(), Color(0,184,255) );
3400cdf0e10cSrcweir }
3401cdf0e10cSrcweir sal_uInt16 XSecondaryFillColorItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/ ) const
3402cdf0e10cSrcweir {
3403cdf0e10cSrcweir 	return 2;
3404cdf0e10cSrcweir }
3405cdf0e10cSrcweir SfxItemPresentation XSecondaryFillColorItem::GetPresentation
3406cdf0e10cSrcweir (
3407cdf0e10cSrcweir 	SfxItemPresentation ePres,
3408cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
3409cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
3410cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
3411cdf0e10cSrcweir )	const
3412cdf0e10cSrcweir {
3413cdf0e10cSrcweir 	switch ( ePres )
3414cdf0e10cSrcweir 	{
3415cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
3416cdf0e10cSrcweir 			rText.Erase();
3417cdf0e10cSrcweir 			return ePres;
3418cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
3419cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
3420cdf0e10cSrcweir 			rText = GetName();
3421cdf0e10cSrcweir 			return ePres;
3422cdf0e10cSrcweir 		default:
3423cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
3424cdf0e10cSrcweir 	}
3425cdf0e10cSrcweir }
3426cdf0e10cSrcweir 
3427cdf0e10cSrcweir // ----------------
3428cdf0e10cSrcweir // class XGradient
3429cdf0e10cSrcweir // ----------------
3430cdf0e10cSrcweir 
3431cdf0e10cSrcweir /*************************************************************************
3432cdf0e10cSrcweir |*
3433cdf0e10cSrcweir |*    XGradient::XGradient()
3434cdf0e10cSrcweir |*
3435cdf0e10cSrcweir *************************************************************************/
3436cdf0e10cSrcweir 
3437cdf0e10cSrcweir XGradient::XGradient() :
3438cdf0e10cSrcweir     eStyle( XGRAD_LINEAR ),
3439cdf0e10cSrcweir     aStartColor( Color( COL_BLACK ) ),
3440cdf0e10cSrcweir     aEndColor( Color( COL_WHITE ) ),
3441cdf0e10cSrcweir     nAngle( 0 ),
3442cdf0e10cSrcweir     nBorder( 0 ),
3443cdf0e10cSrcweir     nOfsX( 50 ),
3444cdf0e10cSrcweir     nOfsY( 50 ),
3445cdf0e10cSrcweir     nIntensStart( 100 ),
3446cdf0e10cSrcweir     nIntensEnd( 100 ),
3447cdf0e10cSrcweir     nStepCount( 0 )
3448cdf0e10cSrcweir {
3449cdf0e10cSrcweir }
3450cdf0e10cSrcweir 
3451cdf0e10cSrcweir /*************************************************************************
3452cdf0e10cSrcweir |*
3453cdf0e10cSrcweir |*    XGradient::XGradient(XGradientStyle, const Color&, const Color&,
3454cdf0e10cSrcweir |*                         long, sal_uInt16, sal_uInt16, sal_uInt16)
3455cdf0e10cSrcweir |*
3456cdf0e10cSrcweir |*    Beschreibung
3457cdf0e10cSrcweir |*    Ersterstellung    21.11.94
3458cdf0e10cSrcweir |*    Letzte Aenderung  21.11.94
3459cdf0e10cSrcweir |*
3460cdf0e10cSrcweir *************************************************************************/
3461cdf0e10cSrcweir 
3462cdf0e10cSrcweir XGradient::XGradient(const Color& rStart, const Color& rEnd,
3463cdf0e10cSrcweir 					 XGradientStyle eTheStyle, long nTheAngle, sal_uInt16 nXOfs,
3464cdf0e10cSrcweir 					 sal_uInt16 nYOfs, sal_uInt16 nTheBorder,
3465cdf0e10cSrcweir 					 sal_uInt16 nStartIntens, sal_uInt16 nEndIntens,
3466cdf0e10cSrcweir 					 sal_uInt16 nSteps) :
3467cdf0e10cSrcweir 	eStyle(eTheStyle),
3468cdf0e10cSrcweir 	aStartColor(rStart),
3469cdf0e10cSrcweir 	aEndColor(rEnd),
3470cdf0e10cSrcweir 	nAngle(nTheAngle),
3471cdf0e10cSrcweir 	nBorder(nTheBorder),
3472cdf0e10cSrcweir 	nOfsX(nXOfs),
3473cdf0e10cSrcweir 	nOfsY(nYOfs),
3474cdf0e10cSrcweir 	nIntensStart(nStartIntens),
3475cdf0e10cSrcweir 	nIntensEnd(nEndIntens),
3476cdf0e10cSrcweir 	nStepCount(nSteps)
3477cdf0e10cSrcweir {
3478cdf0e10cSrcweir }
3479cdf0e10cSrcweir 
3480cdf0e10cSrcweir /*************************************************************************
3481cdf0e10cSrcweir |*
3482cdf0e10cSrcweir |*	  int XGradient::operator==(const SfxPoolItem& rItem) const
3483cdf0e10cSrcweir |*
3484cdf0e10cSrcweir |*	  Beschreibung
3485cdf0e10cSrcweir |*	  Ersterstellung	29.11.94
3486cdf0e10cSrcweir |*	  Letzte Aenderung	29.11.94
3487cdf0e10cSrcweir |*
3488cdf0e10cSrcweir *************************************************************************/
3489cdf0e10cSrcweir 
3490cdf0e10cSrcweir bool XGradient::operator==(const XGradient& rGradient) const
3491cdf0e10cSrcweir {
3492cdf0e10cSrcweir 	return ( eStyle 		== rGradient.eStyle 		&&
3493cdf0e10cSrcweir 			 aStartColor	== rGradient.aStartColor	&&
3494cdf0e10cSrcweir 			 aEndColor		== rGradient.aEndColor		&&
3495cdf0e10cSrcweir 			 nAngle 		== rGradient.nAngle 		&&
3496cdf0e10cSrcweir 			 nBorder		== rGradient.nBorder		&&
3497cdf0e10cSrcweir 			 nOfsX			== rGradient.nOfsX			&&
3498cdf0e10cSrcweir 			 nOfsY			== rGradient.nOfsY			&&
3499cdf0e10cSrcweir 			 nIntensStart	== rGradient.nIntensStart	&&
3500cdf0e10cSrcweir 			 nIntensEnd		== rGradient.nIntensEnd		&&
3501cdf0e10cSrcweir 			 nStepCount		== rGradient.nStepCount );
3502cdf0e10cSrcweir }
3503cdf0e10cSrcweir 
3504cdf0e10cSrcweir 
3505cdf0e10cSrcweir // -----------------------
3506cdf0e10cSrcweir // class XFillGradientItem
3507cdf0e10cSrcweir // -----------------------
3508cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
3509cdf0e10cSrcweir 
3510cdf0e10cSrcweir /*************************************************************************
3511cdf0e10cSrcweir |*
3512cdf0e10cSrcweir |*	  XFillGradientItem::XFillGradientItem(sal_Int32 nIndex,
3513cdf0e10cSrcweir |*										 const XGradient& rTheGradient)
3514cdf0e10cSrcweir |*
3515cdf0e10cSrcweir |*	  Beschreibung
3516cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3517cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3518cdf0e10cSrcweir |*
3519cdf0e10cSrcweir *************************************************************************/
3520cdf0e10cSrcweir 
3521cdf0e10cSrcweir XFillGradientItem::XFillGradientItem(sal_Int32 nIndex,
3522cdf0e10cSrcweir 								   const XGradient& rTheGradient) :
3523cdf0e10cSrcweir 	NameOrIndex(XATTR_FILLGRADIENT, nIndex),
3524cdf0e10cSrcweir 	aGradient(rTheGradient)
3525cdf0e10cSrcweir {
3526cdf0e10cSrcweir }
3527cdf0e10cSrcweir 
3528cdf0e10cSrcweir /*************************************************************************
3529cdf0e10cSrcweir |*
3530cdf0e10cSrcweir |*	  XFillGradientItem::XFillGradientItem(const XubString& rName,
3531cdf0e10cSrcweir |*										 const XGradient& rTheGradient)
3532cdf0e10cSrcweir |*
3533cdf0e10cSrcweir |*	  Beschreibung
3534cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3535cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3536cdf0e10cSrcweir |*
3537cdf0e10cSrcweir *************************************************************************/
3538cdf0e10cSrcweir 
3539cdf0e10cSrcweir XFillGradientItem::XFillGradientItem(const XubString& rName,
3540cdf0e10cSrcweir 								   const XGradient& rTheGradient) :
3541cdf0e10cSrcweir 	NameOrIndex(XATTR_FILLGRADIENT, rName),
3542cdf0e10cSrcweir 	aGradient(rTheGradient)
3543cdf0e10cSrcweir {
3544cdf0e10cSrcweir }
3545cdf0e10cSrcweir 
3546cdf0e10cSrcweir /*************************************************************************
3547cdf0e10cSrcweir |*
3548cdf0e10cSrcweir |*	  XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem)
3549cdf0e10cSrcweir |*
3550cdf0e10cSrcweir |*	  Beschreibung
3551cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3552cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3553cdf0e10cSrcweir |*
3554cdf0e10cSrcweir *************************************************************************/
3555cdf0e10cSrcweir 
3556cdf0e10cSrcweir XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) :
3557cdf0e10cSrcweir 	NameOrIndex(rItem),
3558cdf0e10cSrcweir 	aGradient(rItem.aGradient)
3559cdf0e10cSrcweir {
3560cdf0e10cSrcweir }
3561cdf0e10cSrcweir 
3562cdf0e10cSrcweir /*************************************************************************
3563cdf0e10cSrcweir |*
3564cdf0e10cSrcweir |*	  XFillGradientItem::XFillGradientItem(SvStream& rIn)
3565cdf0e10cSrcweir |*
3566cdf0e10cSrcweir |*	  Beschreibung
3567cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3568cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3569cdf0e10cSrcweir |*
3570cdf0e10cSrcweir *************************************************************************/
3571cdf0e10cSrcweir 
3572cdf0e10cSrcweir XFillGradientItem::XFillGradientItem(SvStream& rIn, sal_uInt16 nVer) :
3573cdf0e10cSrcweir 	NameOrIndex(XATTR_FILLGRADIENT, rIn),
3574cdf0e10cSrcweir 	aGradient(COL_BLACK, COL_WHITE)
3575cdf0e10cSrcweir {
3576cdf0e10cSrcweir 	if (!IsIndex())
3577cdf0e10cSrcweir 	{
3578cdf0e10cSrcweir 		sal_uInt16 nUSTemp;
3579cdf0e10cSrcweir 		sal_uInt16 nRed;
3580cdf0e10cSrcweir 		sal_uInt16 nGreen;
3581cdf0e10cSrcweir 		sal_uInt16 nBlue;
3582cdf0e10cSrcweir 		sal_Int16  nITemp;
3583cdf0e10cSrcweir 		sal_Int32  nLTemp;
3584cdf0e10cSrcweir 
3585cdf0e10cSrcweir 		rIn >> nITemp; aGradient.SetGradientStyle((XGradientStyle)nITemp);
3586cdf0e10cSrcweir 		rIn >> nRed;
3587cdf0e10cSrcweir 		rIn >> nGreen;
3588cdf0e10cSrcweir 		rIn >> nBlue;
3589cdf0e10cSrcweir 		Color aCol;
3590cdf0e10cSrcweir 		aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) );
3591cdf0e10cSrcweir 		aGradient.SetStartColor( aCol );
3592cdf0e10cSrcweir 
3593cdf0e10cSrcweir 		rIn >> nRed;
3594cdf0e10cSrcweir 		rIn >> nGreen;
3595cdf0e10cSrcweir 		rIn >> nBlue;
3596cdf0e10cSrcweir 		aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) );
3597cdf0e10cSrcweir 		aGradient.SetEndColor(aCol);
3598cdf0e10cSrcweir 		rIn >> nLTemp; aGradient.SetAngle(nLTemp);
3599cdf0e10cSrcweir 		rIn >> nUSTemp; aGradient.SetBorder(nUSTemp);
3600cdf0e10cSrcweir 		rIn >> nUSTemp; aGradient.SetXOffset(nUSTemp);
3601cdf0e10cSrcweir 		rIn >> nUSTemp; aGradient.SetYOffset(nUSTemp);
3602cdf0e10cSrcweir 		rIn >> nUSTemp; aGradient.SetStartIntens(nUSTemp);
3603cdf0e10cSrcweir 		rIn >> nUSTemp; aGradient.SetEndIntens(nUSTemp);
3604cdf0e10cSrcweir 
3605cdf0e10cSrcweir 		// bei neueren Versionen wird zusaetzlich
3606cdf0e10cSrcweir 		// die Schrittweite mit eingelesen
3607cdf0e10cSrcweir 		if (nVer >= 1)
3608cdf0e10cSrcweir 		{
3609cdf0e10cSrcweir 			rIn >> nUSTemp; aGradient.SetSteps(nUSTemp);
3610cdf0e10cSrcweir 		}
3611cdf0e10cSrcweir 	}
3612cdf0e10cSrcweir }
3613cdf0e10cSrcweir 
3614cdf0e10cSrcweir //*************************************************************************
3615cdf0e10cSrcweir 
3616cdf0e10cSrcweir XFillGradientItem::XFillGradientItem(SfxItemPool* /*pPool*/, const XGradient& rTheGradient)
3617cdf0e10cSrcweir : 	NameOrIndex( XATTR_FILLGRADIENT, -1 ),
3618cdf0e10cSrcweir 	aGradient(rTheGradient)
3619cdf0e10cSrcweir {
3620cdf0e10cSrcweir }
3621cdf0e10cSrcweir 
3622cdf0e10cSrcweir //*************************************************************************
3623cdf0e10cSrcweir 
3624cdf0e10cSrcweir XFillGradientItem::XFillGradientItem(SfxItemPool* /*pPool*/)
3625cdf0e10cSrcweir : NameOrIndex(XATTR_FILLGRADIENT, -1 )
3626cdf0e10cSrcweir {
3627cdf0e10cSrcweir }
3628cdf0e10cSrcweir 
3629cdf0e10cSrcweir /*************************************************************************
3630cdf0e10cSrcweir |*
3631cdf0e10cSrcweir |*	  XFillGradientItem::Clone(SfxItemPool* pPool) const
3632cdf0e10cSrcweir |*
3633cdf0e10cSrcweir |*	  Beschreibung
3634cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3635cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3636cdf0e10cSrcweir |*
3637cdf0e10cSrcweir *************************************************************************/
3638cdf0e10cSrcweir 
3639cdf0e10cSrcweir SfxPoolItem* XFillGradientItem::Clone(SfxItemPool* /*pPool*/) const
3640cdf0e10cSrcweir {
3641cdf0e10cSrcweir 	return new XFillGradientItem(*this);
3642cdf0e10cSrcweir }
3643cdf0e10cSrcweir 
3644cdf0e10cSrcweir /*************************************************************************
3645cdf0e10cSrcweir |*
3646cdf0e10cSrcweir |*	  int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
3647cdf0e10cSrcweir |*
3648cdf0e10cSrcweir |*	  Beschreibung
3649cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3650cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3651cdf0e10cSrcweir |*
3652cdf0e10cSrcweir *************************************************************************/
3653cdf0e10cSrcweir 
3654cdf0e10cSrcweir int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
3655cdf0e10cSrcweir {
3656cdf0e10cSrcweir 	return ( NameOrIndex::operator==(rItem) &&
3657cdf0e10cSrcweir 			 aGradient == ((const XFillGradientItem&) rItem).aGradient );
3658cdf0e10cSrcweir }
3659cdf0e10cSrcweir 
3660cdf0e10cSrcweir /*************************************************************************
3661cdf0e10cSrcweir |*
3662cdf0e10cSrcweir |*	  SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, sal_uInt16 nVer) const
3663cdf0e10cSrcweir |*
3664cdf0e10cSrcweir |*	  Beschreibung
3665cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3666cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3667cdf0e10cSrcweir |*
3668cdf0e10cSrcweir *************************************************************************/
3669cdf0e10cSrcweir 
3670cdf0e10cSrcweir SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, sal_uInt16 nVer) const
3671cdf0e10cSrcweir {
3672cdf0e10cSrcweir 	return new XFillGradientItem(rIn, nVer);
3673cdf0e10cSrcweir }
3674cdf0e10cSrcweir 
3675cdf0e10cSrcweir /*************************************************************************
3676cdf0e10cSrcweir |*
3677cdf0e10cSrcweir |*	  SfxPoolItem* XFillGradientItem::Store(SvStream& rOut) const
3678cdf0e10cSrcweir |*
3679cdf0e10cSrcweir |*	  Beschreibung
3680cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3681cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
3682cdf0e10cSrcweir |*
3683cdf0e10cSrcweir *************************************************************************/
3684cdf0e10cSrcweir 
3685cdf0e10cSrcweir SvStream& XFillGradientItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
3686cdf0e10cSrcweir {
3687cdf0e10cSrcweir 	NameOrIndex::Store( rOut, nItemVersion );
3688cdf0e10cSrcweir 
3689cdf0e10cSrcweir 	if (!IsIndex())
3690cdf0e10cSrcweir 	{
3691cdf0e10cSrcweir 		rOut << (sal_Int16)aGradient.GetGradientStyle();
3692cdf0e10cSrcweir 
3693cdf0e10cSrcweir 		sal_uInt16 nTmp;
3694cdf0e10cSrcweir 
3695cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetRed() ); rOut << nTmp;
3696cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetGreen() ); rOut << nTmp;
3697cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetBlue() ); rOut << nTmp;
3698cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetRed() ); rOut << nTmp;
3699cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetGreen() ); rOut << nTmp;
3700cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetBlue() ); rOut << nTmp;
3701cdf0e10cSrcweir 
3702cdf0e10cSrcweir 		rOut << (sal_Int32) aGradient.GetAngle();
3703cdf0e10cSrcweir 		rOut << aGradient.GetBorder();
3704cdf0e10cSrcweir 		rOut << aGradient.GetXOffset();
3705cdf0e10cSrcweir 		rOut << aGradient.GetYOffset();
3706cdf0e10cSrcweir 		rOut << aGradient.GetStartIntens();
3707cdf0e10cSrcweir 		rOut << aGradient.GetEndIntens();
3708cdf0e10cSrcweir 		rOut << aGradient.GetSteps();
3709cdf0e10cSrcweir 	}
3710cdf0e10cSrcweir 
3711cdf0e10cSrcweir 	return rOut;
3712cdf0e10cSrcweir }
3713cdf0e10cSrcweir 
3714cdf0e10cSrcweir /*************************************************************************
3715cdf0e10cSrcweir |*
3716*97e8a929SArmin Le Grand |*	  const XGradient& XFillGradientItem::GetValue(const XGradientList* pTable)
3717cdf0e10cSrcweir |*																   const
3718cdf0e10cSrcweir |*
3719cdf0e10cSrcweir |*	  Beschreibung
3720cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
3721cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
3722cdf0e10cSrcweir |*
3723cdf0e10cSrcweir *************************************************************************/
3724cdf0e10cSrcweir 
3725*97e8a929SArmin Le Grand const XGradient& XFillGradientItem::GetGradientValue(const XGradientList* pTable) const // GetValue -> GetGradientValue
3726cdf0e10cSrcweir {
3727cdf0e10cSrcweir 	if (!IsIndex())
3728cdf0e10cSrcweir 		return aGradient;
3729cdf0e10cSrcweir 	else
3730cdf0e10cSrcweir 		return pTable->GetGradient(GetIndex())->GetGradient();
3731cdf0e10cSrcweir }
3732cdf0e10cSrcweir 
3733cdf0e10cSrcweir 
3734cdf0e10cSrcweir /*************************************************************************
3735cdf0e10cSrcweir |*
3736cdf0e10cSrcweir |*	  sal_uInt16 XFillGradientItem::GetVersion() const
3737cdf0e10cSrcweir |*
3738cdf0e10cSrcweir |*	  Beschreibung
3739cdf0e10cSrcweir |*	  Ersterstellung	01.11.95
3740cdf0e10cSrcweir |*	  Letzte Aenderung	01.11.95
3741cdf0e10cSrcweir |*
3742cdf0e10cSrcweir *************************************************************************/
3743cdf0e10cSrcweir 
3744cdf0e10cSrcweir sal_uInt16 XFillGradientItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
3745cdf0e10cSrcweir {
3746cdf0e10cSrcweir 	// !!! this version number also represents the version number of superclasses
3747cdf0e10cSrcweir 	// !!! (e.g. XFillFloatTransparenceItem); if you make any changes here,
3748cdf0e10cSrcweir 	// !!! the superclass is also affected
3749cdf0e10cSrcweir 	return 1;
3750cdf0e10cSrcweir }
3751cdf0e10cSrcweir 
3752cdf0e10cSrcweir //------------------------------------------------------------------------
3753cdf0e10cSrcweir 
3754cdf0e10cSrcweir SfxItemPresentation XFillGradientItem::GetPresentation
3755cdf0e10cSrcweir (
3756cdf0e10cSrcweir 	SfxItemPresentation ePres,
3757cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
3758cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
3759cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
3760cdf0e10cSrcweir )	const
3761cdf0e10cSrcweir {
3762cdf0e10cSrcweir 	switch ( ePres )
3763cdf0e10cSrcweir 	{
3764cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
3765cdf0e10cSrcweir 			rText.Erase();
3766cdf0e10cSrcweir 			return ePres;
3767cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
3768cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
3769cdf0e10cSrcweir 			rText = GetName();
3770cdf0e10cSrcweir 			return ePres;
3771cdf0e10cSrcweir 		default:
3772cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
3773cdf0e10cSrcweir 	}
3774cdf0e10cSrcweir }
3775cdf0e10cSrcweir 
3776cdf0e10cSrcweir // -----------------------------------------------------------------------
3777cdf0e10cSrcweir sal_Bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
3778cdf0e10cSrcweir {
3779cdf0e10cSrcweir     //sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
3780cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
3781cdf0e10cSrcweir 	switch ( nMemberId )
3782cdf0e10cSrcweir 	{
3783cdf0e10cSrcweir         case 0:
3784cdf0e10cSrcweir         {
3785cdf0e10cSrcweir             uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
3786cdf0e10cSrcweir 
3787cdf0e10cSrcweir             ::com::sun::star::awt::Gradient aGradient2;
3788cdf0e10cSrcweir 
3789cdf0e10cSrcweir 			const XGradient& aXGradient = GetGradientValue();
3790cdf0e10cSrcweir 			aGradient2.Style = (::com::sun::star::awt::GradientStyle) aXGradient.GetGradientStyle();
3791cdf0e10cSrcweir 			aGradient2.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor();
3792cdf0e10cSrcweir 			aGradient2.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor();
3793cdf0e10cSrcweir 			aGradient2.Angle = (short)aXGradient.GetAngle();
3794cdf0e10cSrcweir 			aGradient2.Border = aXGradient.GetBorder();
3795cdf0e10cSrcweir 			aGradient2.XOffset = aXGradient.GetXOffset();
3796cdf0e10cSrcweir 			aGradient2.YOffset = aXGradient.GetYOffset();
3797cdf0e10cSrcweir 			aGradient2.StartIntensity = aXGradient.GetStartIntens();
3798cdf0e10cSrcweir 			aGradient2.EndIntensity = aXGradient.GetEndIntens();
3799cdf0e10cSrcweir 			aGradient2.StepCount = aXGradient.GetSteps();
3800cdf0e10cSrcweir 
3801cdf0e10cSrcweir 			rtl::OUString aApiName;
3802cdf0e10cSrcweir 			SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
3803cdf0e10cSrcweir             aPropSeq[0].Name    = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ));
3804cdf0e10cSrcweir             aPropSeq[0].Value   = uno::makeAny( aApiName );
3805cdf0e10cSrcweir             aPropSeq[1].Name    = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" ));
3806cdf0e10cSrcweir             aPropSeq[1].Value   = uno::makeAny( aGradient2 );
3807cdf0e10cSrcweir             rVal = uno::makeAny( aPropSeq );
3808cdf0e10cSrcweir             break;
3809cdf0e10cSrcweir         }
3810cdf0e10cSrcweir 
3811cdf0e10cSrcweir         case MID_FILLGRADIENT:
3812cdf0e10cSrcweir 		{
3813cdf0e10cSrcweir 			const XGradient& aXGradient = GetGradientValue();
3814cdf0e10cSrcweir 			::com::sun::star::awt::Gradient aGradient2;
3815cdf0e10cSrcweir 
3816cdf0e10cSrcweir 			aGradient2.Style = (::com::sun::star::awt::GradientStyle) aXGradient.GetGradientStyle();
3817cdf0e10cSrcweir 			aGradient2.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor();
3818cdf0e10cSrcweir 			aGradient2.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor();
3819cdf0e10cSrcweir 			aGradient2.Angle = (short)aXGradient.GetAngle();
3820cdf0e10cSrcweir 			aGradient2.Border = aXGradient.GetBorder();
3821cdf0e10cSrcweir 			aGradient2.XOffset = aXGradient.GetXOffset();
3822cdf0e10cSrcweir 			aGradient2.YOffset = aXGradient.GetYOffset();
3823cdf0e10cSrcweir 			aGradient2.StartIntensity = aXGradient.GetStartIntens();
3824cdf0e10cSrcweir 			aGradient2.EndIntensity = aXGradient.GetEndIntens();
3825cdf0e10cSrcweir 			aGradient2.StepCount = aXGradient.GetSteps();
3826cdf0e10cSrcweir 
3827cdf0e10cSrcweir 			rVal <<= aGradient2;
3828cdf0e10cSrcweir 			break;
3829cdf0e10cSrcweir 		}
3830cdf0e10cSrcweir 
3831cdf0e10cSrcweir 		case MID_NAME:
3832cdf0e10cSrcweir 		{
3833cdf0e10cSrcweir 			rtl::OUString aApiName;
3834cdf0e10cSrcweir 			SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
3835cdf0e10cSrcweir 			rVal <<= aApiName;
3836cdf0e10cSrcweir 			break;
3837cdf0e10cSrcweir 		}
3838cdf0e10cSrcweir 
3839cdf0e10cSrcweir 		case MID_GRADIENT_STYLE: rVal <<= (sal_Int16)GetGradientValue().GetGradientStyle(); break;
3840cdf0e10cSrcweir 		case MID_GRADIENT_STARTCOLOR: rVal <<= (sal_Int32)GetGradientValue().GetStartColor().GetColor(); break;
3841cdf0e10cSrcweir 		case MID_GRADIENT_ENDCOLOR: rVal <<= (sal_Int32)GetGradientValue().GetEndColor().GetColor(); break;
3842cdf0e10cSrcweir 		case MID_GRADIENT_ANGLE: rVal <<= (sal_Int16)GetGradientValue().GetAngle(); break;
3843cdf0e10cSrcweir 		case MID_GRADIENT_BORDER: rVal <<= GetGradientValue().GetBorder(); break;
3844cdf0e10cSrcweir 		case MID_GRADIENT_XOFFSET: rVal <<= GetGradientValue().GetXOffset(); break;
3845cdf0e10cSrcweir 		case MID_GRADIENT_YOFFSET: rVal <<= GetGradientValue().GetYOffset(); break;
3846cdf0e10cSrcweir 		case MID_GRADIENT_STARTINTENSITY: rVal <<= GetGradientValue().GetStartIntens(); break;
3847cdf0e10cSrcweir 		case MID_GRADIENT_ENDINTENSITY: rVal <<= GetGradientValue().GetEndIntens(); break;
3848cdf0e10cSrcweir 		case MID_GRADIENT_STEPCOUNT: rVal <<= GetGradientValue().GetSteps(); break;
3849cdf0e10cSrcweir 
3850cdf0e10cSrcweir 		default: DBG_ERROR("Wrong MemberId!"); return sal_False;
3851cdf0e10cSrcweir 	}
3852cdf0e10cSrcweir 
3853cdf0e10cSrcweir 	return sal_True;
3854cdf0e10cSrcweir }
3855cdf0e10cSrcweir 
3856cdf0e10cSrcweir // -----------------------------------------------------------------------
3857cdf0e10cSrcweir sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
3858cdf0e10cSrcweir {
3859cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
3860cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
3861cdf0e10cSrcweir 
3862cdf0e10cSrcweir 	switch ( nMemberId )
3863cdf0e10cSrcweir 	{
3864cdf0e10cSrcweir         case 0:
3865cdf0e10cSrcweir         {
3866cdf0e10cSrcweir             uno::Sequence< beans::PropertyValue >   aPropSeq;
3867cdf0e10cSrcweir             ::com::sun::star::awt::Gradient         aGradient2;
3868cdf0e10cSrcweir             rtl::OUString                           aName;
3869cdf0e10cSrcweir             bool                                    bGradient( false );
3870cdf0e10cSrcweir 
3871cdf0e10cSrcweir             if ( rVal >>= aPropSeq )
3872cdf0e10cSrcweir             {
3873cdf0e10cSrcweir                 for ( sal_Int32 n = 0; n < aPropSeq.getLength(); n++ )
3874cdf0e10cSrcweir                 {
3875cdf0e10cSrcweir                     if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" )))
3876cdf0e10cSrcweir                         aPropSeq[n].Value >>= aName;
3877cdf0e10cSrcweir                     else if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FillGradient" )))
3878cdf0e10cSrcweir                     {
3879cdf0e10cSrcweir                         if ( aPropSeq[n].Value >>= aGradient2 )
3880cdf0e10cSrcweir                             bGradient = true;
3881cdf0e10cSrcweir                     }
3882cdf0e10cSrcweir                 }
3883cdf0e10cSrcweir 
3884cdf0e10cSrcweir                 SetName( aName );
3885cdf0e10cSrcweir                 if ( bGradient )
3886cdf0e10cSrcweir                 {
3887cdf0e10cSrcweir 			        XGradient aXGradient;
3888cdf0e10cSrcweir 
3889cdf0e10cSrcweir                     aXGradient.SetGradientStyle( (XGradientStyle) aGradient2.Style );
3890cdf0e10cSrcweir                     aXGradient.SetStartColor( aGradient2.StartColor );
3891cdf0e10cSrcweir                     aXGradient.SetEndColor( aGradient2.EndColor );
3892cdf0e10cSrcweir                     aXGradient.SetAngle( aGradient2.Angle );
3893cdf0e10cSrcweir                     aXGradient.SetBorder( aGradient2.Border );
3894cdf0e10cSrcweir                     aXGradient.SetXOffset( aGradient2.XOffset );
3895cdf0e10cSrcweir                     aXGradient.SetYOffset( aGradient2.YOffset );
3896cdf0e10cSrcweir                     aXGradient.SetStartIntens( aGradient2.StartIntensity );
3897cdf0e10cSrcweir                     aXGradient.SetEndIntens( aGradient2.EndIntensity );
3898cdf0e10cSrcweir                     aXGradient.SetSteps( aGradient2.StepCount );
3899cdf0e10cSrcweir 
3900cdf0e10cSrcweir                     SetGradientValue( aXGradient );
3901cdf0e10cSrcweir                 }
3902cdf0e10cSrcweir 
3903cdf0e10cSrcweir                 return sal_True;
3904cdf0e10cSrcweir             }
3905cdf0e10cSrcweir 
3906cdf0e10cSrcweir             return sal_False;
3907cdf0e10cSrcweir         }
3908cdf0e10cSrcweir 
3909cdf0e10cSrcweir 		case MID_NAME:
3910cdf0e10cSrcweir 		{
3911cdf0e10cSrcweir 			rtl::OUString aName;
3912cdf0e10cSrcweir 			if (!(rVal >>= aName ))
3913cdf0e10cSrcweir 				return sal_False;
3914cdf0e10cSrcweir 			SetName( aName );
3915cdf0e10cSrcweir 			break;
3916cdf0e10cSrcweir 		}
3917cdf0e10cSrcweir 
3918cdf0e10cSrcweir 		case MID_FILLGRADIENT:
3919cdf0e10cSrcweir 		{
3920cdf0e10cSrcweir 			::com::sun::star::awt::Gradient aGradient2;
3921cdf0e10cSrcweir 			if(!(rVal >>= aGradient2))
3922cdf0e10cSrcweir 				return sal_False;
3923cdf0e10cSrcweir 
3924cdf0e10cSrcweir 			XGradient aXGradient;
3925cdf0e10cSrcweir 
3926cdf0e10cSrcweir 			aXGradient.SetGradientStyle( (XGradientStyle) aGradient2.Style );
3927cdf0e10cSrcweir 			aXGradient.SetStartColor( aGradient2.StartColor );
3928cdf0e10cSrcweir 			aXGradient.SetEndColor( aGradient2.EndColor );
3929cdf0e10cSrcweir 			aXGradient.SetAngle( aGradient2.Angle );
3930cdf0e10cSrcweir 			aXGradient.SetBorder( aGradient2.Border );
3931cdf0e10cSrcweir 			aXGradient.SetXOffset( aGradient2.XOffset );
3932cdf0e10cSrcweir 			aXGradient.SetYOffset( aGradient2.YOffset );
3933cdf0e10cSrcweir 			aXGradient.SetStartIntens( aGradient2.StartIntensity );
3934cdf0e10cSrcweir 			aXGradient.SetEndIntens( aGradient2.EndIntensity );
3935cdf0e10cSrcweir 			aXGradient.SetSteps( aGradient2.StepCount );
3936cdf0e10cSrcweir 
3937cdf0e10cSrcweir 			SetGradientValue( aXGradient );
3938cdf0e10cSrcweir 			break;
3939cdf0e10cSrcweir 		}
3940cdf0e10cSrcweir 
3941cdf0e10cSrcweir 		case MID_GRADIENT_STARTCOLOR:
3942cdf0e10cSrcweir 		case MID_GRADIENT_ENDCOLOR:
3943cdf0e10cSrcweir 		{
3944cdf0e10cSrcweir 			sal_Int32 nVal = 0;
3945cdf0e10cSrcweir 			if(!(rVal >>= nVal ))
3946cdf0e10cSrcweir 				return sal_False;
3947cdf0e10cSrcweir 
3948cdf0e10cSrcweir 			XGradient aXGradient = GetGradientValue();
3949cdf0e10cSrcweir 
3950cdf0e10cSrcweir 			if ( nMemberId == MID_GRADIENT_STARTCOLOR )
3951cdf0e10cSrcweir 				aXGradient.SetStartColor( nVal );
3952cdf0e10cSrcweir 			else
3953cdf0e10cSrcweir 				aXGradient.SetEndColor( nVal );
3954cdf0e10cSrcweir 			SetGradientValue( aXGradient );
3955cdf0e10cSrcweir 			break;
3956cdf0e10cSrcweir 		}
3957cdf0e10cSrcweir 
3958cdf0e10cSrcweir 		case MID_GRADIENT_STYLE:
3959cdf0e10cSrcweir 		case MID_GRADIENT_ANGLE:
3960cdf0e10cSrcweir 		case MID_GRADIENT_BORDER:
3961cdf0e10cSrcweir 		case MID_GRADIENT_STARTINTENSITY:
3962cdf0e10cSrcweir 		case MID_GRADIENT_ENDINTENSITY:
3963cdf0e10cSrcweir 		case MID_GRADIENT_STEPCOUNT:
3964cdf0e10cSrcweir 		case MID_GRADIENT_XOFFSET:
3965cdf0e10cSrcweir 		case MID_GRADIENT_YOFFSET:
3966cdf0e10cSrcweir 		{
3967cdf0e10cSrcweir 			sal_Int16 nVal = sal_Int16();
3968cdf0e10cSrcweir 			if(!(rVal >>= nVal ))
3969cdf0e10cSrcweir 				return sal_False;
3970cdf0e10cSrcweir 
3971cdf0e10cSrcweir 			XGradient aXGradient = GetGradientValue();
3972cdf0e10cSrcweir 
3973cdf0e10cSrcweir 			switch ( nMemberId )
3974cdf0e10cSrcweir 			{
3975cdf0e10cSrcweir 				case MID_GRADIENT_STYLE:
3976cdf0e10cSrcweir 					aXGradient.SetGradientStyle( (XGradientStyle)nVal ); break;
3977cdf0e10cSrcweir 				case MID_GRADIENT_ANGLE:
3978cdf0e10cSrcweir 					aXGradient.SetAngle( nVal ); break;
3979cdf0e10cSrcweir 				case MID_GRADIENT_BORDER:
3980cdf0e10cSrcweir 					aXGradient.SetBorder( nVal ); break;
3981cdf0e10cSrcweir 				case MID_GRADIENT_STARTINTENSITY:
3982cdf0e10cSrcweir 					aXGradient.SetStartIntens( nVal ); break;
3983cdf0e10cSrcweir 				case MID_GRADIENT_ENDINTENSITY:
3984cdf0e10cSrcweir 					aXGradient.SetEndIntens( nVal ); break;
3985cdf0e10cSrcweir 				case MID_GRADIENT_STEPCOUNT:
3986cdf0e10cSrcweir 					aXGradient.SetSteps( nVal ); break;
3987cdf0e10cSrcweir 				case MID_GRADIENT_XOFFSET:
3988cdf0e10cSrcweir 					aXGradient.SetXOffset( nVal ); break;
3989cdf0e10cSrcweir 				case MID_GRADIENT_YOFFSET:
3990cdf0e10cSrcweir 					aXGradient.SetYOffset( nVal ); break;
3991cdf0e10cSrcweir 			}
3992cdf0e10cSrcweir 
3993cdf0e10cSrcweir 			SetGradientValue( aXGradient );
3994cdf0e10cSrcweir 			break;
3995cdf0e10cSrcweir 		}
3996cdf0e10cSrcweir 	}
3997cdf0e10cSrcweir 
3998cdf0e10cSrcweir 	return sal_True;
3999cdf0e10cSrcweir }
4000cdf0e10cSrcweir 
4001cdf0e10cSrcweir sal_Bool XFillGradientItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
4002cdf0e10cSrcweir {
4003cdf0e10cSrcweir 	return ((XFillGradientItem*)p1)->GetGradientValue() == ((XFillGradientItem*)p2)->GetGradientValue();
4004cdf0e10cSrcweir }
4005cdf0e10cSrcweir 
4006cdf0e10cSrcweir XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) const
4007cdf0e10cSrcweir {
4008cdf0e10cSrcweir 	if( pModel )
4009cdf0e10cSrcweir 	{
4010cdf0e10cSrcweir 		const String aUniqueName = NameOrIndex::CheckNamedItem(	this,
4011cdf0e10cSrcweir 																XATTR_FILLGRADIENT,
4012cdf0e10cSrcweir 																&pModel->GetItemPool(),
4013cdf0e10cSrcweir 																pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
4014cdf0e10cSrcweir 																XFillGradientItem::CompareValueFunc,
4015cdf0e10cSrcweir 																RID_SVXSTR_GRADIENT,
4016cdf0e10cSrcweir 																pModel->GetGradientList() );
4017cdf0e10cSrcweir 
4018cdf0e10cSrcweir 		// if the given name is not valid, replace it!
4019cdf0e10cSrcweir 		if( aUniqueName != GetName() )
4020cdf0e10cSrcweir 		{
4021cdf0e10cSrcweir 			return new XFillGradientItem( aUniqueName, aGradient );
4022cdf0e10cSrcweir 		}
4023cdf0e10cSrcweir 	}
4024cdf0e10cSrcweir 
4025cdf0e10cSrcweir 	return (XFillGradientItem*)this;
4026cdf0e10cSrcweir }
4027cdf0e10cSrcweir 
4028cdf0e10cSrcweir // ----------------------------------
4029cdf0e10cSrcweir // class XFillFloatTransparenceItem -
4030cdf0e10cSrcweir // ----------------------------------
4031cdf0e10cSrcweir 
4032cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY( XFillFloatTransparenceItem, XFillGradientItem );
4033cdf0e10cSrcweir 
4034cdf0e10cSrcweir // -----------------------------------------------------------------------------
4035cdf0e10cSrcweir 
4036cdf0e10cSrcweir XFillFloatTransparenceItem::XFillFloatTransparenceItem() :
4037cdf0e10cSrcweir 	bEnabled( sal_False )
4038cdf0e10cSrcweir {
4039cdf0e10cSrcweir 	SetWhich( XATTR_FILLFLOATTRANSPARENCE );
4040cdf0e10cSrcweir }
4041cdf0e10cSrcweir 
4042cdf0e10cSrcweir //------------------------------------------------------------------------
4043cdf0e10cSrcweir 
4044cdf0e10cSrcweir XFillFloatTransparenceItem::XFillFloatTransparenceItem( sal_Int32 nIndex, const XGradient& rGradient, sal_Bool bEnable ) :
4045cdf0e10cSrcweir 	XFillGradientItem	( nIndex, rGradient ),
4046cdf0e10cSrcweir 	bEnabled			( bEnable )
4047cdf0e10cSrcweir {
4048cdf0e10cSrcweir 	SetWhich( XATTR_FILLFLOATTRANSPARENCE );
4049cdf0e10cSrcweir }
4050cdf0e10cSrcweir 
4051cdf0e10cSrcweir //------------------------------------------------------------------------
4052cdf0e10cSrcweir 
4053cdf0e10cSrcweir XFillFloatTransparenceItem::XFillFloatTransparenceItem(const XubString& rName, const XGradient& rGradient, sal_Bool bEnable ) :
4054cdf0e10cSrcweir 	XFillGradientItem	( rName, rGradient ),
4055cdf0e10cSrcweir 	bEnabled			( bEnable )
4056cdf0e10cSrcweir {
4057cdf0e10cSrcweir 	SetWhich( XATTR_FILLFLOATTRANSPARENCE );
4058cdf0e10cSrcweir }
4059cdf0e10cSrcweir 
4060cdf0e10cSrcweir //------------------------------------------------------------------------
4061cdf0e10cSrcweir 
4062cdf0e10cSrcweir XFillFloatTransparenceItem::XFillFloatTransparenceItem( const XFillFloatTransparenceItem& rItem ) :
4063cdf0e10cSrcweir 	XFillGradientItem	( rItem ),
4064cdf0e10cSrcweir 	bEnabled			( rItem.bEnabled )
4065cdf0e10cSrcweir {
4066cdf0e10cSrcweir 	SetWhich( XATTR_FILLFLOATTRANSPARENCE );
4067cdf0e10cSrcweir }
4068cdf0e10cSrcweir 
4069cdf0e10cSrcweir //------------------------------------------------------------------------
4070cdf0e10cSrcweir 
4071cdf0e10cSrcweir //XFillFloatTransparenceItem::XFillFloatTransparenceItem( SvStream& rIn, sal_uInt16 nVer ) :
4072cdf0e10cSrcweir //	XFillGradientItem	( rIn, nVer )
4073cdf0e10cSrcweir //{
4074cdf0e10cSrcweir //	SetWhich( XATTR_FILLFLOATTRANSPARENCE );
4075cdf0e10cSrcweir //	rIn >> bEnabled;
4076cdf0e10cSrcweir //}
4077cdf0e10cSrcweir 
4078cdf0e10cSrcweir //*************************************************************************
4079cdf0e10cSrcweir 
4080cdf0e10cSrcweir XFillFloatTransparenceItem::XFillFloatTransparenceItem(SfxItemPool* /*pPool*/, const XGradient& rTheGradient, sal_Bool bEnable )
4081cdf0e10cSrcweir : 	XFillGradientItem	( -1, rTheGradient ),
4082cdf0e10cSrcweir 	bEnabled			( bEnable )
4083cdf0e10cSrcweir {
4084cdf0e10cSrcweir 	SetWhich( XATTR_FILLFLOATTRANSPARENCE );
4085cdf0e10cSrcweir }
4086cdf0e10cSrcweir 
4087cdf0e10cSrcweir //*************************************************************************
4088cdf0e10cSrcweir 
4089cdf0e10cSrcweir XFillFloatTransparenceItem::XFillFloatTransparenceItem(SfxItemPool* /*pPool*/)
4090cdf0e10cSrcweir {
4091cdf0e10cSrcweir 	SetWhich( XATTR_FILLFLOATTRANSPARENCE );
4092cdf0e10cSrcweir }
4093cdf0e10cSrcweir 
4094cdf0e10cSrcweir //------------------------------------------------------------------------
4095cdf0e10cSrcweir 
4096cdf0e10cSrcweir int XFillFloatTransparenceItem::operator==( const SfxPoolItem& rItem ) const
4097cdf0e10cSrcweir {
4098cdf0e10cSrcweir 	return ( NameOrIndex::operator==(rItem) ) &&
4099cdf0e10cSrcweir 			( GetGradientValue() == ((const XFillGradientItem&)rItem).GetGradientValue() ) &&
4100cdf0e10cSrcweir 		     ( bEnabled == ( (XFillFloatTransparenceItem&) rItem ).bEnabled );
4101cdf0e10cSrcweir }
4102cdf0e10cSrcweir 
4103cdf0e10cSrcweir //------------------------------------------------------------------------
4104cdf0e10cSrcweir 
4105cdf0e10cSrcweir SfxPoolItem* XFillFloatTransparenceItem::Clone( SfxItemPool* /*pPool*/) const
4106cdf0e10cSrcweir {
4107cdf0e10cSrcweir 	return new XFillFloatTransparenceItem( *this );
4108cdf0e10cSrcweir }
4109cdf0e10cSrcweir 
4110cdf0e10cSrcweir //------------------------------------------------------------------------
4111cdf0e10cSrcweir 
4112cdf0e10cSrcweir //SfxPoolItem* XFillFloatTransparenceItem::Create( SvStream& rIn, sal_uInt16 nVer ) const
4113cdf0e10cSrcweir //{
4114cdf0e10cSrcweir //	return( ( 0 == nVer ) ? Clone( NULL ) : new XFillFloatTransparenceItem( rIn, nVer ) );
4115cdf0e10cSrcweir //}
4116cdf0e10cSrcweir 
4117cdf0e10cSrcweir //------------------------------------------------------------------------
4118cdf0e10cSrcweir 
4119cdf0e10cSrcweir //SvStream& XFillFloatTransparenceItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
4120cdf0e10cSrcweir //{
4121cdf0e10cSrcweir //	XFillGradientItem::Store( rOut, nItemVersion );
4122cdf0e10cSrcweir //	rOut << bEnabled;
4123cdf0e10cSrcweir //	return rOut;
4124cdf0e10cSrcweir //}
4125cdf0e10cSrcweir 
4126cdf0e10cSrcweir //------------------------------------------------------------------------
4127cdf0e10cSrcweir 
4128cdf0e10cSrcweir sal_uInt16 XFillFloatTransparenceItem::GetVersion( sal_uInt16 nFileFormatVersion ) const
4129cdf0e10cSrcweir {
4130cdf0e10cSrcweir 	// !!! if version number of this object must be increased, please	!!!
4131cdf0e10cSrcweir 	// !!! increase version number of base class XFillGradientItem		!!!
4132cdf0e10cSrcweir 	return XFillGradientItem::GetVersion( nFileFormatVersion );
4133cdf0e10cSrcweir }
4134cdf0e10cSrcweir 
4135cdf0e10cSrcweir //------------------------------------------------------------------------
4136cdf0e10cSrcweir 
4137cdf0e10cSrcweir sal_Bool XFillFloatTransparenceItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
4138cdf0e10cSrcweir {
4139cdf0e10cSrcweir 	return XFillGradientItem::QueryValue( rVal, nMemberId );
4140cdf0e10cSrcweir }
4141cdf0e10cSrcweir 
4142cdf0e10cSrcweir //------------------------------------------------------------------------
4143cdf0e10cSrcweir 
4144cdf0e10cSrcweir sal_Bool XFillFloatTransparenceItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
4145cdf0e10cSrcweir {
4146cdf0e10cSrcweir 	return XFillGradientItem::PutValue( rVal, nMemberId );
4147cdf0e10cSrcweir }
4148cdf0e10cSrcweir 
4149cdf0e10cSrcweir //------------------------------------------------------------------------
4150cdf0e10cSrcweir 
4151cdf0e10cSrcweir SfxItemPresentation XFillFloatTransparenceItem::GetPresentation(	SfxItemPresentation ePres,
4152cdf0e10cSrcweir 																	SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit,
4153cdf0e10cSrcweir 																	XubString& rText,
4154cdf0e10cSrcweir                                                                     const IntlWrapper * pIntlWrapper ) const
4155cdf0e10cSrcweir {
4156cdf0e10cSrcweir     return XFillGradientItem::GetPresentation( ePres, eCoreUnit, ePresUnit, rText, pIntlWrapper );
4157cdf0e10cSrcweir }
4158cdf0e10cSrcweir 
4159cdf0e10cSrcweir sal_Bool XFillFloatTransparenceItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
4160cdf0e10cSrcweir {
4161cdf0e10cSrcweir 	return	((XFillFloatTransparenceItem*)p1)->IsEnabled() == ((XFillFloatTransparenceItem*)p2)->IsEnabled() &&
4162cdf0e10cSrcweir 			((XFillFloatTransparenceItem*)p1)->GetGradientValue()  == ((XFillFloatTransparenceItem*)p2)->GetGradientValue();
4163cdf0e10cSrcweir }
4164cdf0e10cSrcweir 
4165cdf0e10cSrcweir XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrModel* pModel ) const
4166cdf0e10cSrcweir {
4167cdf0e10cSrcweir 	// #85953# unique name only necessary when enabled
4168cdf0e10cSrcweir 	if(IsEnabled())
4169cdf0e10cSrcweir 	{
4170cdf0e10cSrcweir 		if( pModel )
4171cdf0e10cSrcweir 		{
4172cdf0e10cSrcweir 			const String aUniqueName = NameOrIndex::CheckNamedItem(	this,
4173cdf0e10cSrcweir 																	XATTR_FILLFLOATTRANSPARENCE,
4174cdf0e10cSrcweir 																	&pModel->GetItemPool(),
4175cdf0e10cSrcweir 																	pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
4176cdf0e10cSrcweir 																	XFillFloatTransparenceItem::CompareValueFunc,
4177cdf0e10cSrcweir 																	RID_SVXSTR_TRASNGR0,
4178cdf0e10cSrcweir 																	NULL );
4179cdf0e10cSrcweir 
4180cdf0e10cSrcweir 			// if the given name is not valid, replace it!
4181cdf0e10cSrcweir 			if( aUniqueName != GetName() )
4182cdf0e10cSrcweir 			{
4183cdf0e10cSrcweir 				return new XFillFloatTransparenceItem( aUniqueName, GetGradientValue(), sal_True );
4184cdf0e10cSrcweir 			}
4185cdf0e10cSrcweir 		}
4186cdf0e10cSrcweir 	}
4187cdf0e10cSrcweir 	else
4188cdf0e10cSrcweir 	{
4189cdf0e10cSrcweir 		// #85953# if disabled, force name to empty string
4190cdf0e10cSrcweir 		if(GetName().Len())
4191cdf0e10cSrcweir 		{
4192cdf0e10cSrcweir 			return new XFillFloatTransparenceItem(String(), GetGradientValue(), sal_False);
4193cdf0e10cSrcweir 		}
4194cdf0e10cSrcweir 	}
4195cdf0e10cSrcweir 
4196cdf0e10cSrcweir 	return (XFillFloatTransparenceItem*)this;
4197cdf0e10cSrcweir }
4198cdf0e10cSrcweir 
4199cdf0e10cSrcweir // -------------
4200cdf0e10cSrcweir // class XHatch
4201cdf0e10cSrcweir // -------------
4202cdf0e10cSrcweir 
4203cdf0e10cSrcweir /*************************************************************************
4204cdf0e10cSrcweir |*
4205cdf0e10cSrcweir |*	  XHatch::XHatch(XHatchStyle, const Color&, long, long)
4206cdf0e10cSrcweir |*
4207cdf0e10cSrcweir |*	  Beschreibung
4208cdf0e10cSrcweir |*	  Ersterstellung	21.11.94
4209cdf0e10cSrcweir |*	  Letzte Aenderung	21.11.94
4210cdf0e10cSrcweir |*
4211cdf0e10cSrcweir *************************************************************************/
4212cdf0e10cSrcweir 
4213cdf0e10cSrcweir XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance,
4214cdf0e10cSrcweir 			   long nTheAngle) :
4215cdf0e10cSrcweir 	eStyle(eTheStyle),
4216cdf0e10cSrcweir 	aColor(rCol),
4217cdf0e10cSrcweir 	nDistance(nTheDistance),
4218cdf0e10cSrcweir 	nAngle(nTheAngle)
4219cdf0e10cSrcweir {
4220cdf0e10cSrcweir }
4221cdf0e10cSrcweir 
4222cdf0e10cSrcweir /*************************************************************************
4223cdf0e10cSrcweir |*
4224cdf0e10cSrcweir |*	  int XHatch::operator==(const SfxPoolItem& rItem) const
4225cdf0e10cSrcweir |*
4226cdf0e10cSrcweir |*	  Beschreibung
4227cdf0e10cSrcweir |*	  Ersterstellung	29.11.94
4228cdf0e10cSrcweir |*	  Letzte Aenderung	29.11.94
4229cdf0e10cSrcweir |*
4230cdf0e10cSrcweir *************************************************************************/
4231cdf0e10cSrcweir 
4232cdf0e10cSrcweir bool XHatch::operator==(const XHatch& rHatch) const
4233cdf0e10cSrcweir {
4234cdf0e10cSrcweir 	return ( eStyle 	== rHatch.eStyle	&&
4235cdf0e10cSrcweir 			 aColor 	== rHatch.aColor	&&
4236cdf0e10cSrcweir 			 nDistance	== rHatch.nDistance &&
4237cdf0e10cSrcweir 			 nAngle 	== rHatch.nAngle );
4238cdf0e10cSrcweir }
4239cdf0e10cSrcweir 
4240cdf0e10cSrcweir 
4241cdf0e10cSrcweir // -----------------------
4242cdf0e10cSrcweir // class XFillHatchItem
4243cdf0e10cSrcweir // -----------------------
4244cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex);
4245cdf0e10cSrcweir 
4246cdf0e10cSrcweir /*************************************************************************
4247cdf0e10cSrcweir |*
4248cdf0e10cSrcweir |*	  XFillHatchItem::XFillHatchItem(sal_Int32 nIndex,
4249cdf0e10cSrcweir |*								   const XHatch& rTheHatch)
4250cdf0e10cSrcweir |*
4251cdf0e10cSrcweir |*	  Beschreibung
4252cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4253cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4254cdf0e10cSrcweir |*
4255cdf0e10cSrcweir *************************************************************************/
4256cdf0e10cSrcweir 
4257cdf0e10cSrcweir XFillHatchItem::XFillHatchItem(sal_Int32 nIndex,
4258cdf0e10cSrcweir 							 const XHatch& rTheHatch) :
4259cdf0e10cSrcweir 	NameOrIndex(XATTR_FILLHATCH, nIndex),
4260cdf0e10cSrcweir 	aHatch(rTheHatch)
4261cdf0e10cSrcweir {
4262cdf0e10cSrcweir }
4263cdf0e10cSrcweir 
4264cdf0e10cSrcweir /*************************************************************************
4265cdf0e10cSrcweir |*
4266cdf0e10cSrcweir |*	  XFillHatchItem::XFillHatchItem(const XubString& rName,
4267cdf0e10cSrcweir |*								   const XHatch& rTheHatch)
4268cdf0e10cSrcweir |*
4269cdf0e10cSrcweir |*	  Beschreibung
4270cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4271cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4272cdf0e10cSrcweir |*
4273cdf0e10cSrcweir *************************************************************************/
4274cdf0e10cSrcweir 
4275cdf0e10cSrcweir XFillHatchItem::XFillHatchItem(const XubString& rName,
4276cdf0e10cSrcweir 							 const XHatch& rTheHatch) :
4277cdf0e10cSrcweir 	NameOrIndex(XATTR_FILLHATCH, rName),
4278cdf0e10cSrcweir 	aHatch(rTheHatch)
4279cdf0e10cSrcweir {
4280cdf0e10cSrcweir }
4281cdf0e10cSrcweir 
4282cdf0e10cSrcweir /*************************************************************************
4283cdf0e10cSrcweir |*
4284cdf0e10cSrcweir |*	  XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem)
4285cdf0e10cSrcweir |*
4286cdf0e10cSrcweir |*	  Beschreibung
4287cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4288cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4289cdf0e10cSrcweir |*
4290cdf0e10cSrcweir *************************************************************************/
4291cdf0e10cSrcweir 
4292cdf0e10cSrcweir XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) :
4293cdf0e10cSrcweir 	NameOrIndex(rItem),
4294cdf0e10cSrcweir 	aHatch(rItem.aHatch)
4295cdf0e10cSrcweir {
4296cdf0e10cSrcweir }
4297cdf0e10cSrcweir 
4298cdf0e10cSrcweir /*************************************************************************
4299cdf0e10cSrcweir |*
4300cdf0e10cSrcweir |*	  XFillHatchItem::XFillHatchItem(SvStream& rIn)
4301cdf0e10cSrcweir |*
4302cdf0e10cSrcweir |*	  Beschreibung
4303cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4304cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4305cdf0e10cSrcweir |*
4306cdf0e10cSrcweir *************************************************************************/
4307cdf0e10cSrcweir 
4308cdf0e10cSrcweir XFillHatchItem::XFillHatchItem(SvStream& rIn) :
4309cdf0e10cSrcweir 	NameOrIndex(XATTR_FILLHATCH, rIn),
4310cdf0e10cSrcweir 	aHatch(COL_BLACK)
4311cdf0e10cSrcweir {
4312cdf0e10cSrcweir 	if (!IsIndex())
4313cdf0e10cSrcweir 	{
4314cdf0e10cSrcweir 		sal_uInt16 nRed;
4315cdf0e10cSrcweir 		sal_uInt16 nGreen;
4316cdf0e10cSrcweir 		sal_uInt16 nBlue;
4317cdf0e10cSrcweir 		sal_Int16  nITemp;
4318cdf0e10cSrcweir 		sal_Int32  nLTemp;
4319cdf0e10cSrcweir 
4320cdf0e10cSrcweir 		rIn >> nITemp; aHatch.SetHatchStyle((XHatchStyle)nITemp);
4321cdf0e10cSrcweir 		rIn >> nRed;
4322cdf0e10cSrcweir 		rIn >> nGreen;
4323cdf0e10cSrcweir 		rIn >> nBlue;
4324cdf0e10cSrcweir 
4325cdf0e10cSrcweir 		Color aCol;
4326cdf0e10cSrcweir 		aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) );
4327cdf0e10cSrcweir 		aHatch.SetColor(aCol);
4328cdf0e10cSrcweir 		rIn >> nLTemp; aHatch.SetDistance(nLTemp);
4329cdf0e10cSrcweir 		rIn >> nLTemp; aHatch.SetAngle(nLTemp);
4330cdf0e10cSrcweir 	}
4331cdf0e10cSrcweir }
4332cdf0e10cSrcweir 
4333cdf0e10cSrcweir //*************************************************************************
4334cdf0e10cSrcweir 
4335cdf0e10cSrcweir XFillHatchItem::XFillHatchItem(SfxItemPool* /*pPool*/, const XHatch& rTheHatch)
4336cdf0e10cSrcweir : 	NameOrIndex( XATTR_FILLHATCH, -1 ),
4337cdf0e10cSrcweir 	aHatch(rTheHatch)
4338cdf0e10cSrcweir {
4339cdf0e10cSrcweir }
4340cdf0e10cSrcweir 
4341cdf0e10cSrcweir //*************************************************************************
4342cdf0e10cSrcweir 
4343cdf0e10cSrcweir XFillHatchItem::XFillHatchItem(SfxItemPool* /*pPool*/)
4344cdf0e10cSrcweir : NameOrIndex(XATTR_FILLHATCH, -1 )
4345cdf0e10cSrcweir {
4346cdf0e10cSrcweir }
4347cdf0e10cSrcweir 
4348cdf0e10cSrcweir /*************************************************************************
4349cdf0e10cSrcweir |*
4350cdf0e10cSrcweir |*	  XFillHatchItem::Clone(SfxItemPool* pPool) const
4351cdf0e10cSrcweir |*
4352cdf0e10cSrcweir |*	  Beschreibung
4353cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4354cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4355cdf0e10cSrcweir |*
4356cdf0e10cSrcweir *************************************************************************/
4357cdf0e10cSrcweir 
4358cdf0e10cSrcweir SfxPoolItem* XFillHatchItem::Clone(SfxItemPool* /*pPool*/) const
4359cdf0e10cSrcweir {
4360cdf0e10cSrcweir 	return new XFillHatchItem(*this);
4361cdf0e10cSrcweir }
4362cdf0e10cSrcweir 
4363cdf0e10cSrcweir /*************************************************************************
4364cdf0e10cSrcweir |*
4365cdf0e10cSrcweir |*	  int XFillHatchItem::operator==(const SfxPoolItem& rItem) const
4366cdf0e10cSrcweir |*
4367cdf0e10cSrcweir |*	  Beschreibung
4368cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4369cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4370cdf0e10cSrcweir |*
4371cdf0e10cSrcweir *************************************************************************/
4372cdf0e10cSrcweir 
4373cdf0e10cSrcweir int XFillHatchItem::operator==(const SfxPoolItem& rItem) const
4374cdf0e10cSrcweir {
4375cdf0e10cSrcweir 	return ( NameOrIndex::operator==(rItem) &&
4376cdf0e10cSrcweir 			 aHatch == ((const XFillHatchItem&) rItem).aHatch );
4377cdf0e10cSrcweir }
4378cdf0e10cSrcweir 
4379cdf0e10cSrcweir /*************************************************************************
4380cdf0e10cSrcweir |*
4381cdf0e10cSrcweir |*	  SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, sal_uInt16 nVer) const
4382cdf0e10cSrcweir |*
4383cdf0e10cSrcweir |*	  Beschreibung
4384cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4385cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4386cdf0e10cSrcweir |*
4387cdf0e10cSrcweir *************************************************************************/
4388cdf0e10cSrcweir 
4389cdf0e10cSrcweir SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
4390cdf0e10cSrcweir {
4391cdf0e10cSrcweir 	return new XFillHatchItem(rIn);
4392cdf0e10cSrcweir }
4393cdf0e10cSrcweir 
4394cdf0e10cSrcweir /*************************************************************************
4395cdf0e10cSrcweir |*
4396cdf0e10cSrcweir |*	  SfxPoolItem* XFillHatchItem::Store(SvStream& rOut) const
4397cdf0e10cSrcweir |*
4398cdf0e10cSrcweir |*	  Beschreibung
4399cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4400cdf0e10cSrcweir |*	  Letzte Aenderung	15.11.94
4401cdf0e10cSrcweir |*
4402cdf0e10cSrcweir *************************************************************************/
4403cdf0e10cSrcweir 
4404cdf0e10cSrcweir SvStream& XFillHatchItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
4405cdf0e10cSrcweir {
4406cdf0e10cSrcweir 	NameOrIndex::Store( rOut, nItemVersion );
4407cdf0e10cSrcweir 
4408cdf0e10cSrcweir 	if (!IsIndex())
4409cdf0e10cSrcweir 	{
4410cdf0e10cSrcweir 		rOut << (sal_Int16)aHatch.GetHatchStyle();
4411cdf0e10cSrcweir 
4412cdf0e10cSrcweir 		sal_uInt16 nTmp;
4413cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aHatch.GetColor().GetRed() ); rOut << nTmp;
4414cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aHatch.GetColor().GetGreen() ); rOut << nTmp;
4415cdf0e10cSrcweir 		nTmp = VCLTOSVCOL( aHatch.GetColor().GetBlue() ); rOut << nTmp;
4416cdf0e10cSrcweir 
4417cdf0e10cSrcweir 		rOut << (sal_Int32) aHatch.GetDistance();
4418cdf0e10cSrcweir 		rOut << (sal_Int32) aHatch.GetAngle();
4419cdf0e10cSrcweir 	}
4420cdf0e10cSrcweir 
4421cdf0e10cSrcweir 	return rOut;
4422cdf0e10cSrcweir }
4423cdf0e10cSrcweir 
4424cdf0e10cSrcweir /*************************************************************************
4425cdf0e10cSrcweir |*
4426*97e8a929SArmin Le Grand |*	  const XHatch& XFillHatchItem::GetValue(const XHatchList* pTable) const
4427cdf0e10cSrcweir |*
4428cdf0e10cSrcweir |*	  Beschreibung
4429cdf0e10cSrcweir |*	  Ersterstellung	15.11.94
4430cdf0e10cSrcweir |*	  Letzte Aenderung	18.11.94
4431cdf0e10cSrcweir |*
4432cdf0e10cSrcweir *************************************************************************/
4433cdf0e10cSrcweir 
4434*97e8a929SArmin Le Grand const XHatch& XFillHatchItem::GetHatchValue(const XHatchList* pTable) const // GetValue -> GetHatchValue
4435cdf0e10cSrcweir {
4436cdf0e10cSrcweir 	if (!IsIndex())
4437cdf0e10cSrcweir 		return aHatch;
4438cdf0e10cSrcweir 	else
4439cdf0e10cSrcweir 		return pTable->GetHatch(GetIndex())->GetHatch();
4440cdf0e10cSrcweir }
4441cdf0e10cSrcweir 
4442cdf0e10cSrcweir //------------------------------------------------------------------------
4443cdf0e10cSrcweir 
4444cdf0e10cSrcweir SfxItemPresentation XFillHatchItem::GetPresentation
4445cdf0e10cSrcweir (
4446cdf0e10cSrcweir 	SfxItemPresentation ePres,
4447cdf0e10cSrcweir 	SfxMapUnit			/*eCoreUnit*/,
4448cdf0e10cSrcweir 	SfxMapUnit			/*ePresUnit*/,
4449cdf0e10cSrcweir     XubString&          rText, const IntlWrapper *
4450cdf0e10cSrcweir )	const
4451cdf0e10cSrcweir {
4452cdf0e10cSrcweir 	switch ( ePres )
4453cdf0e10cSrcweir 	{
4454cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NONE:
4455cdf0e10cSrcweir 			rText.Erase();
4456cdf0e10cSrcweir 			return ePres;
4457cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_NAMELESS:
4458cdf0e10cSrcweir 		case SFX_ITEM_PRESENTATION_COMPLETE:
4459cdf0e10cSrcweir 			rText = GetName();
4460cdf0e10cSrcweir 			return ePres;
4461cdf0e10cSrcweir 		default:
4462cdf0e10cSrcweir 			return SFX_ITEM_PRESENTATION_NONE;
4463cdf0e10cSrcweir 	}
4464cdf0e10cSrcweir }
4465cdf0e10cSrcweir 
4466cdf0e10cSrcweir //------------------------------------------------------------------------
4467cdf0e10cSrcweir 
4468cdf0e10cSrcweir FASTBOOL XFillHatchItem::HasMetrics() const
4469cdf0e10cSrcweir {
4470cdf0e10cSrcweir 	return sal_True;
4471cdf0e10cSrcweir }
4472cdf0e10cSrcweir 
4473cdf0e10cSrcweir //------------------------------------------------------------------------
4474cdf0e10cSrcweir 
4475cdf0e10cSrcweir FASTBOOL XFillHatchItem::ScaleMetrics(long nMul, long nDiv)
4476cdf0e10cSrcweir {
4477cdf0e10cSrcweir 	aHatch.SetDistance( ScaleMetricValue( aHatch.GetDistance(), nMul, nDiv ) );
4478cdf0e10cSrcweir 	return sal_True;
4479cdf0e10cSrcweir }
4480cdf0e10cSrcweir 
4481cdf0e10cSrcweir // -----------------------------------------------------------------------
4482cdf0e10cSrcweir sal_Bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
4483cdf0e10cSrcweir {
4484cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
4485cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
4486cdf0e10cSrcweir 
4487cdf0e10cSrcweir 	switch ( nMemberId )
4488cdf0e10cSrcweir 	{
4489cdf0e10cSrcweir         case 0:
4490cdf0e10cSrcweir         {
4491cdf0e10cSrcweir             uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
4492cdf0e10cSrcweir 
4493cdf0e10cSrcweir 			::com::sun::star::drawing::Hatch aUnoHatch;
4494cdf0e10cSrcweir 
4495cdf0e10cSrcweir 			aUnoHatch.Style = (::com::sun::star::drawing::HatchStyle)aHatch.GetHatchStyle();
4496cdf0e10cSrcweir 			aUnoHatch.Color = aHatch.GetColor().GetColor();
4497cdf0e10cSrcweir 			aUnoHatch.Distance = aHatch.GetDistance();
4498cdf0e10cSrcweir 			aUnoHatch.Angle = aHatch.GetAngle();
4499cdf0e10cSrcweir 
4500cdf0e10cSrcweir 			rtl::OUString aApiName;
4501cdf0e10cSrcweir 			SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
4502cdf0e10cSrcweir             aPropSeq[0].Name    = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ));
4503cdf0e10cSrcweir             aPropSeq[0].Value   = uno::makeAny( aApiName );
4504cdf0e10cSrcweir             aPropSeq[1].Name    = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillHatch" ));
4505cdf0e10cSrcweir             aPropSeq[1].Value   = uno::makeAny( aUnoHatch );
4506cdf0e10cSrcweir             rVal = uno::makeAny( aPropSeq );
4507cdf0e10cSrcweir             break;
4508cdf0e10cSrcweir         }
4509cdf0e10cSrcweir 
4510cdf0e10cSrcweir 		case MID_FILLHATCH:
4511cdf0e10cSrcweir 		{
4512cdf0e10cSrcweir 			::com::sun::star::drawing::Hatch aUnoHatch;
4513cdf0e10cSrcweir 
4514cdf0e10cSrcweir 			aUnoHatch.Style = (::com::sun::star::drawing::HatchStyle)aHatch.GetHatchStyle();
4515cdf0e10cSrcweir 			aUnoHatch.Color = aHatch.GetColor().GetColor();
4516cdf0e10cSrcweir 			aUnoHatch.Distance = aHatch.GetDistance();
4517cdf0e10cSrcweir 			aUnoHatch.Angle = aHatch.GetAngle();
4518cdf0e10cSrcweir 			rVal <<= aUnoHatch;
4519cdf0e10cSrcweir 			break;
4520cdf0e10cSrcweir 		}
4521cdf0e10cSrcweir 
4522cdf0e10cSrcweir 		case MID_NAME:
4523cdf0e10cSrcweir 		{
4524cdf0e10cSrcweir 			rtl::OUString aApiName;
4525cdf0e10cSrcweir 			SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
4526cdf0e10cSrcweir 			rVal <<= aApiName;
4527cdf0e10cSrcweir 			break;
4528cdf0e10cSrcweir 		}
4529cdf0e10cSrcweir 
4530cdf0e10cSrcweir 		case MID_HATCH_STYLE:
4531cdf0e10cSrcweir 			rVal <<= (::com::sun::star::drawing::HatchStyle)aHatch.GetHatchStyle(); break;
4532cdf0e10cSrcweir 		case MID_HATCH_COLOR:
4533cdf0e10cSrcweir 			rVal <<= (sal_Int32)aHatch.GetColor().GetColor(); break;
4534cdf0e10cSrcweir 		case MID_HATCH_DISTANCE:
4535cdf0e10cSrcweir 			rVal <<= aHatch.GetDistance(); break;
4536cdf0e10cSrcweir 		case MID_HATCH_ANGLE:
4537cdf0e10cSrcweir 			rVal <<= aHatch.GetAngle(); break;
4538cdf0e10cSrcweir 
4539cdf0e10cSrcweir 		default: DBG_ERROR("Wrong MemberId!"); return sal_False;
4540cdf0e10cSrcweir 	}
4541cdf0e10cSrcweir 
4542cdf0e10cSrcweir 	return sal_True;
4543cdf0e10cSrcweir }
4544cdf0e10cSrcweir 
4545cdf0e10cSrcweir // -----------------------------------------------------------------------
4546cdf0e10cSrcweir sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
4547cdf0e10cSrcweir {
4548cdf0e10cSrcweir //    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
4549cdf0e10cSrcweir     nMemberId &= ~CONVERT_TWIPS;
4550cdf0e10cSrcweir 
4551cdf0e10cSrcweir 	switch ( nMemberId )
4552cdf0e10cSrcweir 	{
4553cdf0e10cSrcweir         case 0:
4554cdf0e10cSrcweir         {
4555cdf0e10cSrcweir             uno::Sequence< beans::PropertyValue >   aPropSeq;
4556cdf0e10cSrcweir 			::com::sun::star::drawing::Hatch        aUnoHatch;
4557cdf0e10cSrcweir             rtl::OUString                           aName;
4558cdf0e10cSrcweir             bool                                    bHatch( false );
4559cdf0e10cSrcweir 
4560cdf0e10cSrcweir             if ( rVal >>= aPropSeq )
4561cdf0e10cSrcweir             {
4562cdf0e10cSrcweir                 for ( sal_Int32 n = 0; n < aPropSeq.getLength(); n++ )
4563cdf0e10cSrcweir                 {
4564cdf0e10cSrcweir                     if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" )))
4565cdf0e10cSrcweir                         aPropSeq[n].Value >>= aName;
4566cdf0e10cSrcweir                     else if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FillHatch" )))
4567cdf0e10cSrcweir                     {
4568cdf0e10cSrcweir                         if ( aPropSeq[n].Value >>= aUnoHatch )
4569cdf0e10cSrcweir                             bHatch = true;
4570cdf0e10cSrcweir                     }
4571cdf0e10cSrcweir                 }
4572cdf0e10cSrcweir 
4573cdf0e10cSrcweir                 SetName( aName );
4574cdf0e10cSrcweir                 if ( bHatch )
4575cdf0e10cSrcweir                 {
4576cdf0e10cSrcweir                     aHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
4577cdf0e10cSrcweir                     aHatch.SetColor( aUnoHatch.Color );
4578cdf0e10cSrcweir                     aHatch.SetDistance( aUnoHatch.Distance );
4579cdf0e10cSrcweir                     aHatch.SetAngle( aUnoHatch.Angle );
4580cdf0e10cSrcweir                 }
4581cdf0e10cSrcweir 
4582cdf0e10cSrcweir                 return sal_True;
4583cdf0e10cSrcweir             }
4584cdf0e10cSrcweir 
4585cdf0e10cSrcweir             return sal_False;
4586cdf0e10cSrcweir         }
4587cdf0e10cSrcweir 
4588cdf0e10cSrcweir 		case MID_FILLHATCH:
4589cdf0e10cSrcweir 		{
4590cdf0e10cSrcweir 			::com::sun::star::drawing::Hatch aUnoHatch;
4591cdf0e10cSrcweir 			if(!(rVal >>= aUnoHatch))
4592cdf0e10cSrcweir 				return sal_False;
4593cdf0e10cSrcweir 
4594cdf0e10cSrcweir 			aHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
4595cdf0e10cSrcweir 			aHatch.SetColor( aUnoHatch.Color );
4596cdf0e10cSrcweir 			aHatch.SetDistance( aUnoHatch.Distance );
4597cdf0e10cSrcweir 			aHatch.SetAngle( aUnoHatch.Angle );
4598cdf0e10cSrcweir 			break;
4599cdf0e10cSrcweir 		}
4600cdf0e10cSrcweir 
4601cdf0e10cSrcweir 		case MID_NAME:
4602cdf0e10cSrcweir 		{
4603cdf0e10cSrcweir 			rtl::OUString aName;
4604cdf0e10cSrcweir 			if (!(rVal >>= aName ))
4605cdf0e10cSrcweir 				return sal_False;
4606cdf0e10cSrcweir 			SetName( aName );
4607cdf0e10cSrcweir 			break;
4608cdf0e10cSrcweir 		}
4609cdf0e10cSrcweir 
4610cdf0e10cSrcweir 		case MID_HATCH_STYLE:
4611cdf0e10cSrcweir 		{
4612cdf0e10cSrcweir 			sal_Int16 nVal = sal_Int16();
4613cdf0e10cSrcweir 			if (!(rVal >>= nVal ))
4614cdf0e10cSrcweir 				return sal_False;
4615cdf0e10cSrcweir 			aHatch.SetHatchStyle( (XHatchStyle)nVal );
4616cdf0e10cSrcweir 			break;
4617cdf0e10cSrcweir 		}
4618cdf0e10cSrcweir 
4619cdf0e10cSrcweir 		case MID_HATCH_COLOR:
4620cdf0e10cSrcweir 		case MID_HATCH_DISTANCE:
4621cdf0e10cSrcweir 		case MID_HATCH_ANGLE:
4622cdf0e10cSrcweir 		{
4623cdf0e10cSrcweir 			sal_Int32 nVal = 0;
4624cdf0e10cSrcweir 			if (!(rVal >>= nVal ))
4625cdf0e10cSrcweir 				return sal_False;
4626cdf0e10cSrcweir 
4627cdf0e10cSrcweir 			if ( nMemberId == MID_HATCH_COLOR )
4628cdf0e10cSrcweir 				aHatch.SetColor( nVal );
4629cdf0e10cSrcweir 			else if ( nMemberId == MID_HATCH_DISTANCE )
4630cdf0e10cSrcweir 				aHatch.SetDistance( nVal );
4631cdf0e10cSrcweir 			else
4632cdf0e10cSrcweir 				aHatch.SetAngle( nVal );
4633cdf0e10cSrcweir 			break;
4634cdf0e10cSrcweir 		}
4635cdf0e10cSrcweir 
4636cdf0e10cSrcweir 		default: DBG_ERROR("Wrong MemberId!"); return sal_False;
4637cdf0e10cSrcweir 	}
4638cdf0e10cSrcweir 
4639cdf0e10cSrcweir 	return sal_True;
4640cdf0e10cSrcweir }
4641cdf0e10cSrcweir 
4642cdf0e10cSrcweir sal_Bool XFillHatchItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
4643cdf0e10cSrcweir {
4644cdf0e10cSrcweir 	return ((XFillHatchItem*)p1)->GetHatchValue() == ((XFillHatchItem*)p2)->GetHatchValue();
4645cdf0e10cSrcweir }
4646cdf0e10cSrcweir 
4647cdf0e10cSrcweir XFillHatchItem* XFillHatchItem::checkForUniqueItem( SdrModel* pModel ) const
4648cdf0e10cSrcweir {
4649cdf0e10cSrcweir 	if( pModel )
4650cdf0e10cSrcweir 	{
4651cdf0e10cSrcweir 		const String aUniqueName = NameOrIndex::CheckNamedItem(	this,
4652cdf0e10cSrcweir 																XATTR_FILLHATCH,
4653cdf0e10cSrcweir 																&pModel->GetItemPool(),
4654cdf0e10cSrcweir 																pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
4655cdf0e10cSrcweir 																XFillHatchItem::CompareValueFunc,
4656cdf0e10cSrcweir 																RID_SVXSTR_HATCH10,
4657cdf0e10cSrcweir 																pModel->GetHatchList() );
4658cdf0e10cSrcweir 
4659cdf0e10cSrcweir 		// if the given name is not valid, replace it!
4660cdf0e10cSrcweir 		if( aUniqueName != GetName() )
4661cdf0e10cSrcweir 		{
4662cdf0e10cSrcweir 			return new XFillHatchItem( aUniqueName, aHatch );
4663cdf0e10cSrcweir 		}
4664cdf0e10cSrcweir 	}
4665cdf0e10cSrcweir 
4666cdf0e10cSrcweir 	return (XFillHatchItem*)this;
4667cdf0e10cSrcweir }
4668cdf0e10cSrcweir 
4669cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4670cdf0e10cSrcweir //							FormText-Attribute
4671cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4672cdf0e10cSrcweir 
4673cdf0e10cSrcweir //-------------------------
4674cdf0e10cSrcweir // class XFormTextStyleItem
4675cdf0e10cSrcweir //-------------------------
4676cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextStyleItem, SfxEnumItem);
4677cdf0e10cSrcweir 
4678cdf0e10cSrcweir /*************************************************************************
4679cdf0e10cSrcweir |*
4680cdf0e10cSrcweir |*	  XFormTextStyleItem::XFormTextStyleItem()
4681cdf0e10cSrcweir |*
4682cdf0e10cSrcweir |*	  Beschreibung
4683cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4684cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4685cdf0e10cSrcweir |*
4686cdf0e10cSrcweir *************************************************************************/
4687cdf0e10cSrcweir 
4688cdf0e10cSrcweir XFormTextStyleItem::XFormTextStyleItem(XFormTextStyle eTheStyle) :
4689cdf0e10cSrcweir 	SfxEnumItem(XATTR_FORMTXTSTYLE, sal::static_int_cast< sal_uInt16 >(eTheStyle))
4690cdf0e10cSrcweir {
4691cdf0e10cSrcweir }
4692cdf0e10cSrcweir 
4693cdf0e10cSrcweir /*************************************************************************
4694cdf0e10cSrcweir |*
4695cdf0e10cSrcweir |*	  XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn)
4696cdf0e10cSrcweir |*
4697cdf0e10cSrcweir |*	  Beschreibung
4698cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4699cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4700cdf0e10cSrcweir |*
4701cdf0e10cSrcweir *************************************************************************/
4702cdf0e10cSrcweir 
4703cdf0e10cSrcweir XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) :
4704cdf0e10cSrcweir 	SfxEnumItem(XATTR_FORMTXTSTYLE, rIn)
4705cdf0e10cSrcweir {
4706cdf0e10cSrcweir }
4707cdf0e10cSrcweir 
4708cdf0e10cSrcweir /*************************************************************************
4709cdf0e10cSrcweir |*
4710cdf0e10cSrcweir |*	  XFormTextStyleItem::Clone(SfxItemPool* pPool) const
4711cdf0e10cSrcweir |*
4712cdf0e10cSrcweir |*	  Beschreibung
4713cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4714cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4715cdf0e10cSrcweir |*
4716cdf0e10cSrcweir *************************************************************************/
4717cdf0e10cSrcweir 
4718cdf0e10cSrcweir SfxPoolItem* XFormTextStyleItem::Clone(SfxItemPool* /*pPool*/) const
4719cdf0e10cSrcweir {
4720cdf0e10cSrcweir 	return new XFormTextStyleItem( *this );
4721cdf0e10cSrcweir }
4722cdf0e10cSrcweir 
4723cdf0e10cSrcweir /*************************************************************************
4724cdf0e10cSrcweir |*
4725cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, sal_uInt16 nVer) const
4726cdf0e10cSrcweir |*
4727cdf0e10cSrcweir |*	  Beschreibung
4728cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4729cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4730cdf0e10cSrcweir |*
4731cdf0e10cSrcweir *************************************************************************/
4732cdf0e10cSrcweir 
4733cdf0e10cSrcweir SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
4734cdf0e10cSrcweir {
4735cdf0e10cSrcweir 	return new XFormTextStyleItem(rIn);
4736cdf0e10cSrcweir }
4737cdf0e10cSrcweir 
4738cdf0e10cSrcweir /*************************************************************************
4739cdf0e10cSrcweir |*
4740cdf0e10cSrcweir |*
4741cdf0e10cSrcweir |*
4742cdf0e10cSrcweir \*************************************************************************/
4743cdf0e10cSrcweir 
4744cdf0e10cSrcweir sal_uInt16 XFormTextStyleItem::GetValueCount() const
4745cdf0e10cSrcweir {
4746cdf0e10cSrcweir 	return 5;
4747cdf0e10cSrcweir }
4748cdf0e10cSrcweir 
4749cdf0e10cSrcweir /*************************************************************************
4750cdf0e10cSrcweir |*
4751cdf0e10cSrcweir |*
4752cdf0e10cSrcweir |*
4753cdf0e10cSrcweir \*************************************************************************/
4754cdf0e10cSrcweir 
4755cdf0e10cSrcweir // #FontWork#
4756cdf0e10cSrcweir sal_Bool XFormTextStyleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
4757cdf0e10cSrcweir {
4758cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
4759cdf0e10cSrcweir 	return sal_True;
4760cdf0e10cSrcweir }
4761cdf0e10cSrcweir 
4762cdf0e10cSrcweir /*************************************************************************
4763cdf0e10cSrcweir |*
4764cdf0e10cSrcweir |*
4765cdf0e10cSrcweir |*
4766cdf0e10cSrcweir \*************************************************************************/
4767cdf0e10cSrcweir 
4768cdf0e10cSrcweir // #FontWork#
4769cdf0e10cSrcweir sal_Bool XFormTextStyleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
4770cdf0e10cSrcweir {
4771cdf0e10cSrcweir 	sal_Int32 nValue = 0;
4772cdf0e10cSrcweir 	rVal >>= nValue;
4773cdf0e10cSrcweir 	SetValue(sal::static_int_cast< sal_uInt16 >(nValue));
4774cdf0e10cSrcweir 
4775cdf0e10cSrcweir 	return sal_True;
4776cdf0e10cSrcweir }
4777cdf0e10cSrcweir 
4778cdf0e10cSrcweir //-------------------------
4779cdf0e10cSrcweir // class XFormTextAdjustItem
4780cdf0e10cSrcweir //-------------------------
4781cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextAdjustItem, SfxEnumItem);
4782cdf0e10cSrcweir 
4783cdf0e10cSrcweir /*************************************************************************
4784cdf0e10cSrcweir |*
4785cdf0e10cSrcweir |*	  XFormTextAdjustItem::XFormTextAdjustItem()
4786cdf0e10cSrcweir |*
4787cdf0e10cSrcweir |*	  Beschreibung
4788cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4789cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4790cdf0e10cSrcweir |*
4791cdf0e10cSrcweir *************************************************************************/
4792cdf0e10cSrcweir 
4793cdf0e10cSrcweir XFormTextAdjustItem::XFormTextAdjustItem(XFormTextAdjust eTheAdjust) :
4794cdf0e10cSrcweir 	SfxEnumItem(XATTR_FORMTXTADJUST, sal::static_int_cast< sal_uInt16 >(eTheAdjust))
4795cdf0e10cSrcweir {
4796cdf0e10cSrcweir }
4797cdf0e10cSrcweir 
4798cdf0e10cSrcweir /*************************************************************************
4799cdf0e10cSrcweir |*
4800cdf0e10cSrcweir |*	  XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn)
4801cdf0e10cSrcweir |*
4802cdf0e10cSrcweir |*	  Beschreibung
4803cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4804cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4805cdf0e10cSrcweir |*
4806cdf0e10cSrcweir *************************************************************************/
4807cdf0e10cSrcweir 
4808cdf0e10cSrcweir XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) :
4809cdf0e10cSrcweir 	SfxEnumItem(XATTR_FORMTXTADJUST, rIn)
4810cdf0e10cSrcweir {
4811cdf0e10cSrcweir }
4812cdf0e10cSrcweir 
4813cdf0e10cSrcweir /*************************************************************************
4814cdf0e10cSrcweir |*
4815cdf0e10cSrcweir |*	  XFormTextAdjustItem::Clone(SfxItemPool* pPool) const
4816cdf0e10cSrcweir |*
4817cdf0e10cSrcweir |*	  Beschreibung
4818cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4819cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4820cdf0e10cSrcweir |*
4821cdf0e10cSrcweir *************************************************************************/
4822cdf0e10cSrcweir 
4823cdf0e10cSrcweir SfxPoolItem* XFormTextAdjustItem::Clone(SfxItemPool* /*pPool*/) const
4824cdf0e10cSrcweir {
4825cdf0e10cSrcweir 	return new XFormTextAdjustItem( *this );
4826cdf0e10cSrcweir }
4827cdf0e10cSrcweir 
4828cdf0e10cSrcweir /*************************************************************************
4829cdf0e10cSrcweir |*
4830cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, sal_uInt16 nVer) const
4831cdf0e10cSrcweir |*
4832cdf0e10cSrcweir |*	  Beschreibung
4833cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4834cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4835cdf0e10cSrcweir |*
4836cdf0e10cSrcweir *************************************************************************/
4837cdf0e10cSrcweir 
4838cdf0e10cSrcweir SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
4839cdf0e10cSrcweir {
4840cdf0e10cSrcweir 	return new XFormTextAdjustItem(rIn);
4841cdf0e10cSrcweir }
4842cdf0e10cSrcweir 
4843cdf0e10cSrcweir /*************************************************************************
4844cdf0e10cSrcweir |*
4845cdf0e10cSrcweir |*
4846cdf0e10cSrcweir |*
4847cdf0e10cSrcweir \*************************************************************************/
4848cdf0e10cSrcweir 
4849cdf0e10cSrcweir sal_uInt16 XFormTextAdjustItem::GetValueCount() const
4850cdf0e10cSrcweir {
4851cdf0e10cSrcweir 	return 4;
4852cdf0e10cSrcweir }
4853cdf0e10cSrcweir 
4854cdf0e10cSrcweir /*************************************************************************
4855cdf0e10cSrcweir |*
4856cdf0e10cSrcweir |*
4857cdf0e10cSrcweir |*
4858cdf0e10cSrcweir \*************************************************************************/
4859cdf0e10cSrcweir 
4860cdf0e10cSrcweir // #FontWork#
4861cdf0e10cSrcweir sal_Bool XFormTextAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
4862cdf0e10cSrcweir {
4863cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
4864cdf0e10cSrcweir 	return sal_True;
4865cdf0e10cSrcweir }
4866cdf0e10cSrcweir 
4867cdf0e10cSrcweir /*************************************************************************
4868cdf0e10cSrcweir |*
4869cdf0e10cSrcweir |*
4870cdf0e10cSrcweir |*
4871cdf0e10cSrcweir \*************************************************************************/
4872cdf0e10cSrcweir 
4873cdf0e10cSrcweir // #FontWork#
4874cdf0e10cSrcweir sal_Bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
4875cdf0e10cSrcweir {
4876cdf0e10cSrcweir 	sal_Int32 nValue = 0;
4877cdf0e10cSrcweir 	rVal >>= nValue;
4878cdf0e10cSrcweir 	SetValue(sal::static_int_cast< sal_uInt16 >(nValue));
4879cdf0e10cSrcweir 
4880cdf0e10cSrcweir 	return sal_True;
4881cdf0e10cSrcweir }
4882cdf0e10cSrcweir 
4883cdf0e10cSrcweir //----------------------------
4884cdf0e10cSrcweir // class XFormTextDistanceItem
4885cdf0e10cSrcweir //----------------------------
4886cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextDistanceItem, SfxMetricItem);
4887cdf0e10cSrcweir 
4888cdf0e10cSrcweir /*************************************************************************
4889cdf0e10cSrcweir |*
4890cdf0e10cSrcweir |*	  XFormTextDistanceItem::XFormTextDistanceItem()
4891cdf0e10cSrcweir |*
4892cdf0e10cSrcweir |*	  Beschreibung
4893cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4894cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4895cdf0e10cSrcweir |*
4896cdf0e10cSrcweir *************************************************************************/
4897cdf0e10cSrcweir 
4898cdf0e10cSrcweir XFormTextDistanceItem::XFormTextDistanceItem(long nDist) :
4899cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTDISTANCE, nDist)
4900cdf0e10cSrcweir {
4901cdf0e10cSrcweir }
4902cdf0e10cSrcweir 
4903cdf0e10cSrcweir /*************************************************************************
4904cdf0e10cSrcweir |*
4905cdf0e10cSrcweir |*	  XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn)
4906cdf0e10cSrcweir |*
4907cdf0e10cSrcweir |*	  Beschreibung
4908cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4909cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4910cdf0e10cSrcweir |*
4911cdf0e10cSrcweir *************************************************************************/
4912cdf0e10cSrcweir 
4913cdf0e10cSrcweir XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) :
4914cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTDISTANCE, rIn)
4915cdf0e10cSrcweir {
4916cdf0e10cSrcweir }
4917cdf0e10cSrcweir 
4918cdf0e10cSrcweir /*************************************************************************
4919cdf0e10cSrcweir |*
4920cdf0e10cSrcweir |*	  XFormTextDistanceItem::Clone(SfxItemPool* pPool) const
4921cdf0e10cSrcweir |*
4922cdf0e10cSrcweir |*	  Beschreibung
4923cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4924cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4925cdf0e10cSrcweir |*
4926cdf0e10cSrcweir *************************************************************************/
4927cdf0e10cSrcweir 
4928cdf0e10cSrcweir SfxPoolItem* XFormTextDistanceItem::Clone(SfxItemPool* /*pPool*/) const
4929cdf0e10cSrcweir {
4930cdf0e10cSrcweir 	return new XFormTextDistanceItem(*this);
4931cdf0e10cSrcweir }
4932cdf0e10cSrcweir 
4933cdf0e10cSrcweir /*************************************************************************
4934cdf0e10cSrcweir |*
4935cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, sal_uInt16 nVer) const
4936cdf0e10cSrcweir |*
4937cdf0e10cSrcweir |*	  Beschreibung
4938cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4939cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4940cdf0e10cSrcweir |*
4941cdf0e10cSrcweir *************************************************************************/
4942cdf0e10cSrcweir 
4943cdf0e10cSrcweir SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
4944cdf0e10cSrcweir {
4945cdf0e10cSrcweir 	return new XFormTextDistanceItem(rIn);
4946cdf0e10cSrcweir }
4947cdf0e10cSrcweir 
4948cdf0e10cSrcweir //-------------------------
4949cdf0e10cSrcweir // class XFormTextStartItem
4950cdf0e10cSrcweir //-------------------------
4951cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextStartItem, SfxMetricItem);
4952cdf0e10cSrcweir 
4953cdf0e10cSrcweir /*************************************************************************
4954cdf0e10cSrcweir |*
4955cdf0e10cSrcweir |*	  XFormTextStartItem::XFormTextStartItem(long nStart)
4956cdf0e10cSrcweir |*
4957cdf0e10cSrcweir |*	  Beschreibung
4958cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4959cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4960cdf0e10cSrcweir |*
4961cdf0e10cSrcweir *************************************************************************/
4962cdf0e10cSrcweir 
4963cdf0e10cSrcweir XFormTextStartItem::XFormTextStartItem(long nStart) :
4964cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTSTART, nStart)
4965cdf0e10cSrcweir {
4966cdf0e10cSrcweir }
4967cdf0e10cSrcweir 
4968cdf0e10cSrcweir /*************************************************************************
4969cdf0e10cSrcweir |*
4970cdf0e10cSrcweir |*	  XFormTextStartItem::XFormTextStartItem(SvStream& rIn)
4971cdf0e10cSrcweir |*
4972cdf0e10cSrcweir |*	  Beschreibung
4973cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4974cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4975cdf0e10cSrcweir |*
4976cdf0e10cSrcweir *************************************************************************/
4977cdf0e10cSrcweir 
4978cdf0e10cSrcweir XFormTextStartItem::XFormTextStartItem(SvStream& rIn) :
4979cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTSTART, rIn)
4980cdf0e10cSrcweir {
4981cdf0e10cSrcweir }
4982cdf0e10cSrcweir 
4983cdf0e10cSrcweir /*************************************************************************
4984cdf0e10cSrcweir |*
4985cdf0e10cSrcweir |*	  XFormTextStartItem::Clone(SfxItemPool* pPool) const
4986cdf0e10cSrcweir |*
4987cdf0e10cSrcweir |*	  Beschreibung
4988cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
4989cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
4990cdf0e10cSrcweir |*
4991cdf0e10cSrcweir *************************************************************************/
4992cdf0e10cSrcweir 
4993cdf0e10cSrcweir SfxPoolItem* XFormTextStartItem::Clone(SfxItemPool* /*pPool*/) const
4994cdf0e10cSrcweir {
4995cdf0e10cSrcweir 	return new XFormTextStartItem(*this);
4996cdf0e10cSrcweir }
4997cdf0e10cSrcweir 
4998cdf0e10cSrcweir /*************************************************************************
4999cdf0e10cSrcweir |*
5000cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, sal_uInt16 nVer) const
5001cdf0e10cSrcweir |*
5002cdf0e10cSrcweir |*	  Beschreibung
5003cdf0e10cSrcweir |*	  Ersterstellung	02.02.95 ESO
5004cdf0e10cSrcweir |*	  Letzte Aenderung	02.02.95 ESO
5005cdf0e10cSrcweir |*
5006cdf0e10cSrcweir *************************************************************************/
5007cdf0e10cSrcweir 
5008cdf0e10cSrcweir SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5009cdf0e10cSrcweir {
5010cdf0e10cSrcweir 	return new XFormTextStartItem(rIn);
5011cdf0e10cSrcweir }
5012cdf0e10cSrcweir 
5013cdf0e10cSrcweir // -------------------------
5014cdf0e10cSrcweir // class XFormTextMirrorItem
5015cdf0e10cSrcweir // -------------------------
5016cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextMirrorItem, SfxBoolItem);
5017cdf0e10cSrcweir 
5018cdf0e10cSrcweir /*************************************************************************
5019cdf0e10cSrcweir |*
5020cdf0e10cSrcweir |*	  XFormTextMirrorItem::XFormTextMirrorItem(sal_Bool bMirror)
5021cdf0e10cSrcweir |*
5022cdf0e10cSrcweir |*	  Ersterstellung	06.02.95 ESO
5023cdf0e10cSrcweir |*	  Letzte Aenderung	06.02.95 ESO
5024cdf0e10cSrcweir |*
5025cdf0e10cSrcweir *************************************************************************/
5026cdf0e10cSrcweir 
5027cdf0e10cSrcweir XFormTextMirrorItem::XFormTextMirrorItem(sal_Bool bMirror) :
5028cdf0e10cSrcweir 	SfxBoolItem(XATTR_FORMTXTMIRROR, bMirror)
5029cdf0e10cSrcweir {
5030cdf0e10cSrcweir }
5031cdf0e10cSrcweir 
5032cdf0e10cSrcweir /*************************************************************************
5033cdf0e10cSrcweir |*
5034cdf0e10cSrcweir |*	  XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn)
5035cdf0e10cSrcweir |*
5036cdf0e10cSrcweir |*	  Ersterstellung	06.02.95 ESO
5037cdf0e10cSrcweir |*	  Letzte Aenderung	06.02.95 ESO
5038cdf0e10cSrcweir |*
5039cdf0e10cSrcweir *************************************************************************/
5040cdf0e10cSrcweir 
5041cdf0e10cSrcweir XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) :
5042cdf0e10cSrcweir 	SfxBoolItem(XATTR_FORMTXTMIRROR, rIn)
5043cdf0e10cSrcweir {
5044cdf0e10cSrcweir }
5045cdf0e10cSrcweir 
5046cdf0e10cSrcweir /*************************************************************************
5047cdf0e10cSrcweir |*
5048cdf0e10cSrcweir |*	  XFormTextMirrorItem::Clone(SfxItemPool* pPool) const
5049cdf0e10cSrcweir |*
5050cdf0e10cSrcweir |*	  Ersterstellung	06.02.95 ESO
5051cdf0e10cSrcweir |*	  Letzte Aenderung	06.02.95 ESO
5052cdf0e10cSrcweir |*
5053cdf0e10cSrcweir *************************************************************************/
5054cdf0e10cSrcweir 
5055cdf0e10cSrcweir SfxPoolItem* XFormTextMirrorItem::Clone(SfxItemPool* /*pPool*/) const
5056cdf0e10cSrcweir {
5057cdf0e10cSrcweir 	return new XFormTextMirrorItem(*this);
5058cdf0e10cSrcweir }
5059cdf0e10cSrcweir 
5060cdf0e10cSrcweir /*************************************************************************
5061cdf0e10cSrcweir |*
5062cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, sal_uInt16 nVer)
5063cdf0e10cSrcweir |*												const
5064cdf0e10cSrcweir |*
5065cdf0e10cSrcweir |*	  Ersterstellung	06.02.95 ESO
5066cdf0e10cSrcweir |*	  Letzte Aenderung	06.02.95 ESO
5067cdf0e10cSrcweir |*
5068cdf0e10cSrcweir *************************************************************************/
5069cdf0e10cSrcweir 
5070cdf0e10cSrcweir SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5071cdf0e10cSrcweir {
5072cdf0e10cSrcweir 	return new XFormTextMirrorItem(rIn);
5073cdf0e10cSrcweir }
5074cdf0e10cSrcweir 
5075cdf0e10cSrcweir 
5076cdf0e10cSrcweir // --------------------------
5077cdf0e10cSrcweir // class XFormTextOutlineItem
5078cdf0e10cSrcweir // --------------------------
5079cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextOutlineItem, SfxBoolItem);
5080cdf0e10cSrcweir 
5081cdf0e10cSrcweir /*************************************************************************
5082cdf0e10cSrcweir |*
5083cdf0e10cSrcweir |*	  XFormTextOutlineItem::XFormTextOutlineItem()
5084cdf0e10cSrcweir |*
5085cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5086cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5087cdf0e10cSrcweir |*
5088cdf0e10cSrcweir *************************************************************************/
5089cdf0e10cSrcweir 
5090cdf0e10cSrcweir XFormTextOutlineItem::XFormTextOutlineItem(sal_Bool bOutline) :
5091cdf0e10cSrcweir 	SfxBoolItem(XATTR_FORMTXTOUTLINE, bOutline)
5092cdf0e10cSrcweir {
5093cdf0e10cSrcweir }
5094cdf0e10cSrcweir 
5095cdf0e10cSrcweir /*************************************************************************
5096cdf0e10cSrcweir |*
5097cdf0e10cSrcweir |*	  XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn)
5098cdf0e10cSrcweir |*
5099cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5100cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5101cdf0e10cSrcweir |*
5102cdf0e10cSrcweir *************************************************************************/
5103cdf0e10cSrcweir 
5104cdf0e10cSrcweir XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) :
5105cdf0e10cSrcweir 	SfxBoolItem(XATTR_FORMTXTOUTLINE, rIn)
5106cdf0e10cSrcweir {
5107cdf0e10cSrcweir }
5108cdf0e10cSrcweir 
5109cdf0e10cSrcweir /*************************************************************************
5110cdf0e10cSrcweir |*
5111cdf0e10cSrcweir |*	  XFormTextOutlineItem::Clone(SfxItemPool* pPool) const
5112cdf0e10cSrcweir |*
5113cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5114cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5115cdf0e10cSrcweir |*
5116cdf0e10cSrcweir *************************************************************************/
5117cdf0e10cSrcweir 
5118cdf0e10cSrcweir SfxPoolItem* XFormTextOutlineItem::Clone(SfxItemPool* /*pPool*/) const
5119cdf0e10cSrcweir {
5120cdf0e10cSrcweir 	return new XFormTextOutlineItem(*this);
5121cdf0e10cSrcweir }
5122cdf0e10cSrcweir 
5123cdf0e10cSrcweir /*************************************************************************
5124cdf0e10cSrcweir |*
5125cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, sal_uInt16 nVer)
5126cdf0e10cSrcweir |*												const
5127cdf0e10cSrcweir |*
5128cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5129cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5130cdf0e10cSrcweir |*
5131cdf0e10cSrcweir *************************************************************************/
5132cdf0e10cSrcweir 
5133cdf0e10cSrcweir SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5134cdf0e10cSrcweir {
5135cdf0e10cSrcweir 	return new XFormTextOutlineItem(rIn);
5136cdf0e10cSrcweir }
5137cdf0e10cSrcweir 
5138cdf0e10cSrcweir //--------------------------
5139cdf0e10cSrcweir // class XFormTextShadowItem
5140cdf0e10cSrcweir //--------------------------
5141cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextShadowItem, SfxEnumItem);
5142cdf0e10cSrcweir 
5143cdf0e10cSrcweir /*************************************************************************
5144cdf0e10cSrcweir |*
5145cdf0e10cSrcweir |*	  XFormTextShadowItem::XFormTextShadowItem()
5146cdf0e10cSrcweir |*
5147cdf0e10cSrcweir |*	  Beschreibung
5148cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5149cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5150cdf0e10cSrcweir |*
5151cdf0e10cSrcweir *************************************************************************/
5152cdf0e10cSrcweir 
5153cdf0e10cSrcweir XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) :
5154cdf0e10cSrcweir 	SfxEnumItem(
5155cdf0e10cSrcweir         XATTR_FORMTXTSHADOW, sal::static_int_cast< sal_uInt16 >(eFormTextShadow))
5156cdf0e10cSrcweir {
5157cdf0e10cSrcweir }
5158cdf0e10cSrcweir 
5159cdf0e10cSrcweir /*************************************************************************
5160cdf0e10cSrcweir |*
5161cdf0e10cSrcweir |*	  XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn)
5162cdf0e10cSrcweir |*
5163cdf0e10cSrcweir |*	  Beschreibung
5164cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5165cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5166cdf0e10cSrcweir |*
5167cdf0e10cSrcweir *************************************************************************/
5168cdf0e10cSrcweir 
5169cdf0e10cSrcweir XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) :
5170cdf0e10cSrcweir 	SfxEnumItem(XATTR_FORMTXTSHADOW, rIn)
5171cdf0e10cSrcweir {
5172cdf0e10cSrcweir }
5173cdf0e10cSrcweir 
5174cdf0e10cSrcweir /*************************************************************************
5175cdf0e10cSrcweir |*
5176cdf0e10cSrcweir |*	  XFormTextShadowItem::Clone(SfxItemPool* pPool) const
5177cdf0e10cSrcweir |*
5178cdf0e10cSrcweir |*	  Beschreibung
5179cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5180cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5181cdf0e10cSrcweir |*
5182cdf0e10cSrcweir *************************************************************************/
5183cdf0e10cSrcweir 
5184cdf0e10cSrcweir SfxPoolItem* XFormTextShadowItem::Clone(SfxItemPool* /*pPool*/) const
5185cdf0e10cSrcweir {
5186cdf0e10cSrcweir 	return new XFormTextShadowItem( *this );
5187cdf0e10cSrcweir }
5188cdf0e10cSrcweir 
5189cdf0e10cSrcweir /*************************************************************************
5190cdf0e10cSrcweir |*
5191cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, sal_uInt16 nVer) const
5192cdf0e10cSrcweir |*
5193cdf0e10cSrcweir |*	  Beschreibung
5194cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5195cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5196cdf0e10cSrcweir |*
5197cdf0e10cSrcweir *************************************************************************/
5198cdf0e10cSrcweir 
5199cdf0e10cSrcweir SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5200cdf0e10cSrcweir {
5201cdf0e10cSrcweir 	return new XFormTextShadowItem(rIn);
5202cdf0e10cSrcweir }
5203cdf0e10cSrcweir 
5204cdf0e10cSrcweir 
5205cdf0e10cSrcweir /*************************************************************************
5206cdf0e10cSrcweir |*
5207cdf0e10cSrcweir |*
5208cdf0e10cSrcweir |*
5209cdf0e10cSrcweir \*************************************************************************/
5210cdf0e10cSrcweir 
5211cdf0e10cSrcweir sal_uInt16 XFormTextShadowItem::GetValueCount() const
5212cdf0e10cSrcweir {
5213cdf0e10cSrcweir 	return 3;
5214cdf0e10cSrcweir }
5215cdf0e10cSrcweir 
5216cdf0e10cSrcweir /*************************************************************************
5217cdf0e10cSrcweir |*
5218cdf0e10cSrcweir |*
5219cdf0e10cSrcweir |*
5220cdf0e10cSrcweir \*************************************************************************/
5221cdf0e10cSrcweir 
5222cdf0e10cSrcweir // #FontWork#
5223cdf0e10cSrcweir sal_Bool XFormTextShadowItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
5224cdf0e10cSrcweir {
5225cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
5226cdf0e10cSrcweir 	return sal_True;
5227cdf0e10cSrcweir }
5228cdf0e10cSrcweir 
5229cdf0e10cSrcweir /*************************************************************************
5230cdf0e10cSrcweir |*
5231cdf0e10cSrcweir |*
5232cdf0e10cSrcweir |*
5233cdf0e10cSrcweir \*************************************************************************/
5234cdf0e10cSrcweir 
5235cdf0e10cSrcweir // #FontWork#
5236cdf0e10cSrcweir sal_Bool XFormTextShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
5237cdf0e10cSrcweir {
5238cdf0e10cSrcweir 	sal_Int32 nValue = 0;
5239cdf0e10cSrcweir 	rVal >>= nValue;
5240cdf0e10cSrcweir 	SetValue(sal::static_int_cast< sal_uInt16 >(nValue));
5241cdf0e10cSrcweir 
5242cdf0e10cSrcweir 	return sal_True;
5243cdf0e10cSrcweir }
5244cdf0e10cSrcweir 
5245cdf0e10cSrcweir // -------------------------------
5246cdf0e10cSrcweir // class XFormTextShadowColorItem
5247cdf0e10cSrcweir // -------------------------------
5248cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextShadowColorItem, XColorItem);
5249cdf0e10cSrcweir 
5250cdf0e10cSrcweir /*************************************************************************
5251cdf0e10cSrcweir |*
5252cdf0e10cSrcweir |*	  XFormTextShadowColorItem::XFormTextShadowColorItem()
5253cdf0e10cSrcweir |*
5254cdf0e10cSrcweir |*	  Beschreibung
5255cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5256cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5257cdf0e10cSrcweir |*
5258cdf0e10cSrcweir *************************************************************************/
5259cdf0e10cSrcweir 
5260cdf0e10cSrcweir XFormTextShadowColorItem::XFormTextShadowColorItem(sal_Int32 nIndex,
5261cdf0e10cSrcweir 													 const Color& rTheColor) :
5262cdf0e10cSrcweir 	XColorItem(XATTR_FORMTXTSHDWCOLOR, nIndex, rTheColor)
5263cdf0e10cSrcweir {
5264cdf0e10cSrcweir }
5265cdf0e10cSrcweir 
5266cdf0e10cSrcweir /*************************************************************************
5267cdf0e10cSrcweir |*
5268cdf0e10cSrcweir |*	  XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, const Color& rTheColor)
5269cdf0e10cSrcweir |*
5270cdf0e10cSrcweir |*	  Beschreibung
5271cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5272cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5273cdf0e10cSrcweir |*
5274cdf0e10cSrcweir *************************************************************************/
5275cdf0e10cSrcweir 
5276cdf0e10cSrcweir XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName,
5277cdf0e10cSrcweir 													 const Color& rTheColor) :
5278cdf0e10cSrcweir 	XColorItem(XATTR_FORMTXTSHDWCOLOR, rName, rTheColor)
5279cdf0e10cSrcweir {
5280cdf0e10cSrcweir }
5281cdf0e10cSrcweir 
5282cdf0e10cSrcweir /*************************************************************************
5283cdf0e10cSrcweir |*
5284cdf0e10cSrcweir |*	  XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn)
5285cdf0e10cSrcweir |*
5286cdf0e10cSrcweir |*	  Beschreibung
5287cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5288cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5289cdf0e10cSrcweir |*
5290cdf0e10cSrcweir *************************************************************************/
5291cdf0e10cSrcweir 
5292cdf0e10cSrcweir XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) :
5293cdf0e10cSrcweir 	XColorItem(XATTR_FORMTXTSHDWCOLOR, rIn)
5294cdf0e10cSrcweir {
5295cdf0e10cSrcweir }
5296cdf0e10cSrcweir 
5297cdf0e10cSrcweir /*************************************************************************
5298cdf0e10cSrcweir |*
5299cdf0e10cSrcweir |*	  XFormTextShadowColorItem::Clone(SfxItemPool* pPool) const
5300cdf0e10cSrcweir |*
5301cdf0e10cSrcweir |*	  Beschreibung
5302cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5303cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5304cdf0e10cSrcweir |*
5305cdf0e10cSrcweir *************************************************************************/
5306cdf0e10cSrcweir 
5307cdf0e10cSrcweir SfxPoolItem* XFormTextShadowColorItem::Clone(SfxItemPool* /*pPool*/) const
5308cdf0e10cSrcweir {
5309cdf0e10cSrcweir 	return new XFormTextShadowColorItem(*this);
5310cdf0e10cSrcweir }
5311cdf0e10cSrcweir 
5312cdf0e10cSrcweir /*************************************************************************
5313cdf0e10cSrcweir |*
5314cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const
5315cdf0e10cSrcweir |*
5316cdf0e10cSrcweir |*	  Beschreibung
5317cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5318cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5319cdf0e10cSrcweir |*
5320cdf0e10cSrcweir *************************************************************************/
5321cdf0e10cSrcweir 
5322cdf0e10cSrcweir SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5323cdf0e10cSrcweir {
5324cdf0e10cSrcweir 	return new XFormTextShadowColorItem(rIn);
5325cdf0e10cSrcweir }
5326cdf0e10cSrcweir 
5327cdf0e10cSrcweir //------------------------------
5328cdf0e10cSrcweir // class XFormTextShadowXValItem
5329cdf0e10cSrcweir //------------------------------
5330cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextShadowXValItem, SfxMetricItem);
5331cdf0e10cSrcweir 
5332cdf0e10cSrcweir /*************************************************************************
5333cdf0e10cSrcweir |*
5334cdf0e10cSrcweir |*	  XFormTextShadowXValItem::XFormTextShadowXValItem(long)
5335cdf0e10cSrcweir |*
5336cdf0e10cSrcweir |*	  Beschreibung
5337cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5338cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5339cdf0e10cSrcweir |*
5340cdf0e10cSrcweir *************************************************************************/
5341cdf0e10cSrcweir 
5342cdf0e10cSrcweir XFormTextShadowXValItem::XFormTextShadowXValItem(long nVal) :
5343cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTSHDWXVAL, nVal)
5344cdf0e10cSrcweir {
5345cdf0e10cSrcweir }
5346cdf0e10cSrcweir 
5347cdf0e10cSrcweir /*************************************************************************
5348cdf0e10cSrcweir |*
5349cdf0e10cSrcweir |*	  XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn)
5350cdf0e10cSrcweir |*
5351cdf0e10cSrcweir |*	  Beschreibung
5352cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5353cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5354cdf0e10cSrcweir |*
5355cdf0e10cSrcweir *************************************************************************/
5356cdf0e10cSrcweir 
5357cdf0e10cSrcweir XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) :
5358cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTSHDWXVAL, rIn)
5359cdf0e10cSrcweir {
5360cdf0e10cSrcweir }
5361cdf0e10cSrcweir 
5362cdf0e10cSrcweir /*************************************************************************
5363cdf0e10cSrcweir |*
5364cdf0e10cSrcweir |*	  XFormTextShadowXValItem::Clone(SfxItemPool* pPool) const
5365cdf0e10cSrcweir |*
5366cdf0e10cSrcweir |*	  Beschreibung
5367cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5368cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5369cdf0e10cSrcweir |*
5370cdf0e10cSrcweir *************************************************************************/
5371cdf0e10cSrcweir 
5372cdf0e10cSrcweir SfxPoolItem* XFormTextShadowXValItem::Clone(SfxItemPool* /*pPool*/) const
5373cdf0e10cSrcweir {
5374cdf0e10cSrcweir 	return new XFormTextShadowXValItem(*this);
5375cdf0e10cSrcweir }
5376cdf0e10cSrcweir 
5377cdf0e10cSrcweir /*************************************************************************
5378cdf0e10cSrcweir |*
5379cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, sal_uInt16 nVer) const
5380cdf0e10cSrcweir |*
5381cdf0e10cSrcweir |*	  Beschreibung
5382cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5383cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5384cdf0e10cSrcweir |*
5385cdf0e10cSrcweir *************************************************************************/
5386cdf0e10cSrcweir 
5387cdf0e10cSrcweir SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5388cdf0e10cSrcweir {
5389cdf0e10cSrcweir 	return new XFormTextShadowXValItem(rIn);
5390cdf0e10cSrcweir }
5391cdf0e10cSrcweir 
5392cdf0e10cSrcweir //------------------------------
5393cdf0e10cSrcweir // class XFormTextShadowYValItem
5394cdf0e10cSrcweir //------------------------------
5395cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextShadowYValItem, SfxMetricItem);
5396cdf0e10cSrcweir 
5397cdf0e10cSrcweir /*************************************************************************
5398cdf0e10cSrcweir |*
5399cdf0e10cSrcweir |*	  XFormTextShadowYValItem::XFormTextShadowYValItem(long)
5400cdf0e10cSrcweir |*
5401cdf0e10cSrcweir |*	  Beschreibung
5402cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5403cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5404cdf0e10cSrcweir |*
5405cdf0e10cSrcweir *************************************************************************/
5406cdf0e10cSrcweir 
5407cdf0e10cSrcweir XFormTextShadowYValItem::XFormTextShadowYValItem(long nVal) :
5408cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTSHDWYVAL, nVal)
5409cdf0e10cSrcweir {
5410cdf0e10cSrcweir }
5411cdf0e10cSrcweir 
5412cdf0e10cSrcweir /*************************************************************************
5413cdf0e10cSrcweir |*
5414cdf0e10cSrcweir |*	  XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn)
5415cdf0e10cSrcweir |*
5416cdf0e10cSrcweir |*	  Beschreibung
5417cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5418cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5419cdf0e10cSrcweir |*
5420cdf0e10cSrcweir *************************************************************************/
5421cdf0e10cSrcweir 
5422cdf0e10cSrcweir XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) :
5423cdf0e10cSrcweir 	SfxMetricItem(XATTR_FORMTXTSHDWYVAL, rIn)
5424cdf0e10cSrcweir {
5425cdf0e10cSrcweir }
5426cdf0e10cSrcweir 
5427cdf0e10cSrcweir /*************************************************************************
5428cdf0e10cSrcweir |*
5429cdf0e10cSrcweir |*	  XFormTextShadowYValItem::Clone(SfxItemPool* pPool) const
5430cdf0e10cSrcweir |*
5431cdf0e10cSrcweir |*	  Beschreibung
5432cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5433cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5434cdf0e10cSrcweir |*
5435cdf0e10cSrcweir *************************************************************************/
5436cdf0e10cSrcweir 
5437cdf0e10cSrcweir SfxPoolItem* XFormTextShadowYValItem::Clone(SfxItemPool* /*pPool*/) const
5438cdf0e10cSrcweir {
5439cdf0e10cSrcweir 	return new XFormTextShadowYValItem(*this);
5440cdf0e10cSrcweir }
5441cdf0e10cSrcweir 
5442cdf0e10cSrcweir /*************************************************************************
5443cdf0e10cSrcweir |*
5444cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, sal_uInt16 nVer) const
5445cdf0e10cSrcweir |*
5446cdf0e10cSrcweir |*	  Beschreibung
5447cdf0e10cSrcweir |*	  Ersterstellung	28.06.95 ESO
5448cdf0e10cSrcweir |*	  Letzte Aenderung	28.06.95 ESO
5449cdf0e10cSrcweir |*
5450cdf0e10cSrcweir *************************************************************************/
5451cdf0e10cSrcweir 
5452cdf0e10cSrcweir SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5453cdf0e10cSrcweir {
5454cdf0e10cSrcweir 	return new XFormTextShadowYValItem(rIn);
5455cdf0e10cSrcweir }
5456cdf0e10cSrcweir 
5457cdf0e10cSrcweir //---------------------------
5458cdf0e10cSrcweir // class XFormTextStdFormItem
5459cdf0e10cSrcweir //---------------------------
5460cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextStdFormItem, SfxEnumItem);
5461cdf0e10cSrcweir 
5462cdf0e10cSrcweir /*************************************************************************
5463cdf0e10cSrcweir |*
5464cdf0e10cSrcweir |*	  XFormTextStdFormItem::XFormTextStdFormItem()
5465cdf0e10cSrcweir |*
5466cdf0e10cSrcweir |*	  Beschreibung
5467cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5468cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5469cdf0e10cSrcweir |*
5470cdf0e10cSrcweir *************************************************************************/
5471cdf0e10cSrcweir 
5472cdf0e10cSrcweir XFormTextStdFormItem::XFormTextStdFormItem(XFormTextStdForm eFormTextStdForm) :
5473cdf0e10cSrcweir 	SfxEnumItem(
5474cdf0e10cSrcweir         XATTR_FORMTXTSTDFORM, sal::static_int_cast< sal_uInt16 >(eFormTextStdForm))
5475cdf0e10cSrcweir {
5476cdf0e10cSrcweir }
5477cdf0e10cSrcweir 
5478cdf0e10cSrcweir /*************************************************************************
5479cdf0e10cSrcweir |*
5480cdf0e10cSrcweir |*	  XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn)
5481cdf0e10cSrcweir |*
5482cdf0e10cSrcweir |*	  Beschreibung
5483cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5484cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5485cdf0e10cSrcweir |*
5486cdf0e10cSrcweir *************************************************************************/
5487cdf0e10cSrcweir 
5488cdf0e10cSrcweir XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn) :
5489cdf0e10cSrcweir 	SfxEnumItem(XATTR_FORMTXTSTDFORM, rIn)
5490cdf0e10cSrcweir {
5491cdf0e10cSrcweir }
5492cdf0e10cSrcweir 
5493cdf0e10cSrcweir /*************************************************************************
5494cdf0e10cSrcweir |*
5495cdf0e10cSrcweir |*	  XFormTextStdFormItem::Clone(SfxItemPool* pPool) const
5496cdf0e10cSrcweir |*
5497cdf0e10cSrcweir |*	  Beschreibung
5498cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5499cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5500cdf0e10cSrcweir |*
5501cdf0e10cSrcweir *************************************************************************/
5502cdf0e10cSrcweir 
5503cdf0e10cSrcweir SfxPoolItem* XFormTextStdFormItem::Clone(SfxItemPool* /*pPool*/) const
5504cdf0e10cSrcweir {
5505cdf0e10cSrcweir 	return new XFormTextStdFormItem( *this );
5506cdf0e10cSrcweir }
5507cdf0e10cSrcweir 
5508cdf0e10cSrcweir /*************************************************************************
5509cdf0e10cSrcweir |*
5510cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, sal_uInt16 nVer) const
5511cdf0e10cSrcweir |*
5512cdf0e10cSrcweir |*	  Beschreibung
5513cdf0e10cSrcweir |*	  Ersterstellung	27.06.95
5514cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95
5515cdf0e10cSrcweir |*
5516cdf0e10cSrcweir *************************************************************************/
5517cdf0e10cSrcweir 
5518cdf0e10cSrcweir SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5519cdf0e10cSrcweir {
5520cdf0e10cSrcweir 	return new XFormTextStdFormItem(rIn);
5521cdf0e10cSrcweir }
5522cdf0e10cSrcweir 
5523cdf0e10cSrcweir 
5524cdf0e10cSrcweir /*************************************************************************
5525cdf0e10cSrcweir |*
5526cdf0e10cSrcweir |*
5527cdf0e10cSrcweir |*
5528cdf0e10cSrcweir \*************************************************************************/
5529cdf0e10cSrcweir 
5530cdf0e10cSrcweir sal_uInt16 XFormTextStdFormItem::GetValueCount() const
5531cdf0e10cSrcweir {
5532cdf0e10cSrcweir 	return 3;
5533cdf0e10cSrcweir }
5534cdf0e10cSrcweir 
5535cdf0e10cSrcweir /*************************************************************************
5536cdf0e10cSrcweir |*
5537cdf0e10cSrcweir |*
5538cdf0e10cSrcweir |*
5539cdf0e10cSrcweir \*************************************************************************/
5540cdf0e10cSrcweir 
5541cdf0e10cSrcweir // #FontWork#
5542cdf0e10cSrcweir sal_Bool XFormTextStdFormItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
5543cdf0e10cSrcweir {
5544cdf0e10cSrcweir 	rVal <<= (sal_Int32)GetValue();
5545cdf0e10cSrcweir 	return sal_True;
5546cdf0e10cSrcweir }
5547cdf0e10cSrcweir 
5548cdf0e10cSrcweir /*************************************************************************
5549cdf0e10cSrcweir |*
5550cdf0e10cSrcweir |*
5551cdf0e10cSrcweir |*
5552cdf0e10cSrcweir \*************************************************************************/
5553cdf0e10cSrcweir 
5554cdf0e10cSrcweir // #FontWork#
5555cdf0e10cSrcweir sal_Bool XFormTextStdFormItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
5556cdf0e10cSrcweir {
5557cdf0e10cSrcweir 	sal_Int32 nValue = 0;
5558cdf0e10cSrcweir 	rVal >>= nValue;
5559cdf0e10cSrcweir 	SetValue(sal::static_int_cast< sal_uInt16 >(nValue));
5560cdf0e10cSrcweir 
5561cdf0e10cSrcweir 	return sal_True;
5562cdf0e10cSrcweir }
5563cdf0e10cSrcweir 
5564cdf0e10cSrcweir // --------------------------
5565cdf0e10cSrcweir // class XFormTextHideFormItem
5566cdf0e10cSrcweir // --------------------------
5567cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(XFormTextHideFormItem, SfxBoolItem);
5568cdf0e10cSrcweir 
5569cdf0e10cSrcweir /*************************************************************************
5570cdf0e10cSrcweir |*
5571cdf0e10cSrcweir |*	  XFormTextHideFormItem::XFormTextHideFormItem()
5572cdf0e10cSrcweir |*
5573cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5574cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5575cdf0e10cSrcweir |*
5576cdf0e10cSrcweir *************************************************************************/
5577cdf0e10cSrcweir 
5578cdf0e10cSrcweir XFormTextHideFormItem::XFormTextHideFormItem(sal_Bool bHide) :
5579cdf0e10cSrcweir 	SfxBoolItem(XATTR_FORMTXTHIDEFORM, bHide)
5580cdf0e10cSrcweir {
5581cdf0e10cSrcweir }
5582cdf0e10cSrcweir 
5583cdf0e10cSrcweir /*************************************************************************
5584cdf0e10cSrcweir |*
5585cdf0e10cSrcweir |*	  XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn)
5586cdf0e10cSrcweir |*
5587cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5588cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5589cdf0e10cSrcweir |*
5590cdf0e10cSrcweir *************************************************************************/
5591cdf0e10cSrcweir 
5592cdf0e10cSrcweir XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) :
5593cdf0e10cSrcweir 	SfxBoolItem(XATTR_FORMTXTHIDEFORM, rIn)
5594cdf0e10cSrcweir {
5595cdf0e10cSrcweir }
5596cdf0e10cSrcweir 
5597cdf0e10cSrcweir /*************************************************************************
5598cdf0e10cSrcweir |*
5599cdf0e10cSrcweir |*	  XFormTextHideFormItem::Clone(SfxItemPool* pPool) const
5600cdf0e10cSrcweir |*
5601cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5602cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5603cdf0e10cSrcweir |*
5604cdf0e10cSrcweir *************************************************************************/
5605cdf0e10cSrcweir 
5606cdf0e10cSrcweir SfxPoolItem* XFormTextHideFormItem::Clone(SfxItemPool* /*pPool*/) const
5607cdf0e10cSrcweir {
5608cdf0e10cSrcweir 	return new XFormTextHideFormItem(*this);
5609cdf0e10cSrcweir }
5610cdf0e10cSrcweir 
5611cdf0e10cSrcweir /*************************************************************************
5612cdf0e10cSrcweir |*
5613cdf0e10cSrcweir |*	  SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, sal_uInt16 nVer)
5614cdf0e10cSrcweir |*												const
5615cdf0e10cSrcweir |*
5616cdf0e10cSrcweir |*	  Ersterstellung	27.06.95 ESO
5617cdf0e10cSrcweir |*	  Letzte Aenderung	27.06.95 ESO
5618cdf0e10cSrcweir |*
5619cdf0e10cSrcweir *************************************************************************/
5620cdf0e10cSrcweir 
5621cdf0e10cSrcweir SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
5622cdf0e10cSrcweir {
5623cdf0e10cSrcweir 	return new XFormTextHideFormItem(rIn);
5624cdf0e10cSrcweir }
5625cdf0e10cSrcweir 
5626cdf0e10cSrcweir 
5627cdf0e10cSrcweir 
5628cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5629cdf0e10cSrcweir //								SetItems
5630cdf0e10cSrcweir //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5631cdf0e10cSrcweir 
5632cdf0e10cSrcweir TYPEINIT1(XLineAttrSetItem, SfxSetItem);
5633cdf0e10cSrcweir 
5634cdf0e10cSrcweir /*************************************************************************
5635cdf0e10cSrcweir |*
5636cdf0e10cSrcweir |* Konstruktoren fuer Linienattribute-SetItem
5637cdf0e10cSrcweir |*
5638cdf0e10cSrcweir \************************************************************************/
5639cdf0e10cSrcweir 
5640cdf0e10cSrcweir XLineAttrSetItem::XLineAttrSetItem( SfxItemSet* pItemSet ) :
5641cdf0e10cSrcweir 	SfxSetItem( XATTRSET_LINE, pItemSet)
5642cdf0e10cSrcweir {
5643cdf0e10cSrcweir }
5644cdf0e10cSrcweir 
5645cdf0e10cSrcweir /************************************************************************/
5646cdf0e10cSrcweir 
5647cdf0e10cSrcweir XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) :
5648cdf0e10cSrcweir 	SfxSetItem( XATTRSET_LINE,
5649cdf0e10cSrcweir 		new SfxItemSet( *pItemPool, XATTR_LINE_FIRST, XATTR_LINE_LAST))
5650cdf0e10cSrcweir {
5651cdf0e10cSrcweir }
5652cdf0e10cSrcweir 
5653cdf0e10cSrcweir /************************************************************************/
5654cdf0e10cSrcweir 
5655cdf0e10cSrcweir XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr ) :
5656cdf0e10cSrcweir 	SfxSetItem( rLineAttr )
5657cdf0e10cSrcweir {
5658cdf0e10cSrcweir }
5659cdf0e10cSrcweir 
5660cdf0e10cSrcweir /************************************************************************/
5661cdf0e10cSrcweir 
5662cdf0e10cSrcweir XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr,
5663cdf0e10cSrcweir 									SfxItemPool* pItemPool) :
5664cdf0e10cSrcweir 	SfxSetItem( rLineAttr, pItemPool )
5665cdf0e10cSrcweir {
5666cdf0e10cSrcweir }
5667cdf0e10cSrcweir 
5668cdf0e10cSrcweir /*************************************************************************
5669cdf0e10cSrcweir |*
5670cdf0e10cSrcweir |* Clone-Funktion
5671cdf0e10cSrcweir |*
5672cdf0e10cSrcweir \************************************************************************/
5673cdf0e10cSrcweir 
5674cdf0e10cSrcweir SfxPoolItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const
5675cdf0e10cSrcweir {
5676cdf0e10cSrcweir 	return new XLineAttrSetItem( *this, pPool );
5677cdf0e10cSrcweir }
5678cdf0e10cSrcweir 
5679cdf0e10cSrcweir /*************************************************************************
5680cdf0e10cSrcweir |*
5681cdf0e10cSrcweir |* SetItem aus Stream erzeugen
5682cdf0e10cSrcweir |*
5683cdf0e10cSrcweir \************************************************************************/
5684cdf0e10cSrcweir 
5685cdf0e10cSrcweir SfxPoolItem* XLineAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion*/) const
5686cdf0e10cSrcweir {
5687cdf0e10cSrcweir 	SfxItemSet *pSet2 = new SfxItemSet( *GetItemSet().GetPool(),
5688cdf0e10cSrcweir 									XATTR_LINE_FIRST, XATTR_LINE_LAST);
5689cdf0e10cSrcweir 	pSet2->Load( rStream );
5690cdf0e10cSrcweir 	return new XLineAttrSetItem( pSet2 );
5691cdf0e10cSrcweir }
5692cdf0e10cSrcweir 
5693cdf0e10cSrcweir /*************************************************************************
5694cdf0e10cSrcweir |*
5695cdf0e10cSrcweir |* SetItem in Stream speichern
5696cdf0e10cSrcweir |*
5697cdf0e10cSrcweir \************************************************************************/
5698cdf0e10cSrcweir 
5699cdf0e10cSrcweir SvStream& XLineAttrSetItem::Store( SvStream& rStream, sal_uInt16 nItemVersion ) const
5700cdf0e10cSrcweir {
5701cdf0e10cSrcweir 	return SfxSetItem::Store( rStream, nItemVersion );
5702cdf0e10cSrcweir }
5703cdf0e10cSrcweir 
5704cdf0e10cSrcweir 
5705cdf0e10cSrcweir TYPEINIT1(XFillAttrSetItem, SfxSetItem);
5706cdf0e10cSrcweir 
5707cdf0e10cSrcweir /*************************************************************************
5708cdf0e10cSrcweir |*
5709cdf0e10cSrcweir |* Konstruktoren fuer Fuellattribute-SetItem
5710cdf0e10cSrcweir |*
5711cdf0e10cSrcweir \************************************************************************/
5712cdf0e10cSrcweir 
5713cdf0e10cSrcweir XFillAttrSetItem::XFillAttrSetItem( SfxItemSet* pItemSet ) :
5714cdf0e10cSrcweir 	SfxSetItem( XATTRSET_FILL, pItemSet)
5715cdf0e10cSrcweir {
5716cdf0e10cSrcweir }
5717cdf0e10cSrcweir 
5718cdf0e10cSrcweir /************************************************************************/
5719cdf0e10cSrcweir 
5720cdf0e10cSrcweir XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) :
5721cdf0e10cSrcweir 	SfxSetItem( XATTRSET_FILL,
5722cdf0e10cSrcweir 		new SfxItemSet( *pItemPool, XATTR_FILL_FIRST, XATTR_FILL_LAST))
5723cdf0e10cSrcweir {
5724cdf0e10cSrcweir }
5725cdf0e10cSrcweir 
5726cdf0e10cSrcweir /************************************************************************/
5727cdf0e10cSrcweir 
5728cdf0e10cSrcweir XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr ) :
5729cdf0e10cSrcweir 	SfxSetItem( rFillAttr )
5730cdf0e10cSrcweir {
5731cdf0e10cSrcweir }
5732cdf0e10cSrcweir 
5733cdf0e10cSrcweir /************************************************************************/
5734cdf0e10cSrcweir 
5735cdf0e10cSrcweir XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr,
5736cdf0e10cSrcweir 									SfxItemPool* pItemPool ) :
5737cdf0e10cSrcweir 	SfxSetItem( rFillAttr, pItemPool )
5738cdf0e10cSrcweir {
5739cdf0e10cSrcweir }
5740cdf0e10cSrcweir 
5741cdf0e10cSrcweir /*************************************************************************
5742cdf0e10cSrcweir |*
5743cdf0e10cSrcweir |* Clone-Funktion
5744cdf0e10cSrcweir |*
5745cdf0e10cSrcweir \************************************************************************/
5746cdf0e10cSrcweir 
5747cdf0e10cSrcweir SfxPoolItem* XFillAttrSetItem::Clone( SfxItemPool* pPool ) const
5748cdf0e10cSrcweir {
5749cdf0e10cSrcweir 	return new XFillAttrSetItem( *this, pPool );
5750cdf0e10cSrcweir }
5751cdf0e10cSrcweir 
5752cdf0e10cSrcweir /*************************************************************************
5753cdf0e10cSrcweir |*
5754cdf0e10cSrcweir |* SetItem aus Stream erzeugen
5755cdf0e10cSrcweir |*
5756cdf0e10cSrcweir \************************************************************************/
5757cdf0e10cSrcweir 
5758cdf0e10cSrcweir SfxPoolItem* XFillAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion*/) const
5759cdf0e10cSrcweir {
5760cdf0e10cSrcweir 	SfxItemSet *pSet2 = new SfxItemSet( *GetItemSet().GetPool(),
5761cdf0e10cSrcweir 									XATTR_FILL_FIRST, XATTR_FILL_LAST);
5762cdf0e10cSrcweir 	pSet2->Load( rStream );
5763cdf0e10cSrcweir 	return new XFillAttrSetItem( pSet2 );
5764cdf0e10cSrcweir }
5765cdf0e10cSrcweir 
5766cdf0e10cSrcweir /*************************************************************************
5767cdf0e10cSrcweir |*
5768cdf0e10cSrcweir |* SetItem in Stream speichern
5769cdf0e10cSrcweir |*
5770cdf0e10cSrcweir \************************************************************************/
5771cdf0e10cSrcweir 
5772cdf0e10cSrcweir SvStream& XFillAttrSetItem::Store( SvStream& rStream, sal_uInt16 nItemVersion ) const
5773cdf0e10cSrcweir {
5774cdf0e10cSrcweir 	return SfxSetItem::Store( rStream, nItemVersion );
5775cdf0e10cSrcweir }
5776cdf0e10cSrcweir 
5777cdf0e10cSrcweir // eof
5778cdf0e10cSrcweir 
5779