xref: /aoo41x/main/svx/source/xoutdev/xtabhtch.cxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_svx.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir // include ---------------------------------------------------------------
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir #ifndef SVX_LIGHT
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp>
36*cdf0e10cSrcweir #include "svx/XPropertyTable.hxx"
37*cdf0e10cSrcweir #include <unotools/ucbstreamhelper.hxx>
38*cdf0e10cSrcweir #include <vcl/svapp.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #include "xmlxtexp.hxx"
41*cdf0e10cSrcweir #include "xmlxtimp.hxx"
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir #endif
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir #include <tools/urlobj.hxx>
46*cdf0e10cSrcweir #include <vcl/virdev.hxx>
47*cdf0e10cSrcweir #include <svl/itemset.hxx>
48*cdf0e10cSrcweir #include <sfx2/docfile.hxx>
49*cdf0e10cSrcweir #include <svx/dialogs.hrc>
50*cdf0e10cSrcweir #include <svx/dialmgr.hxx>
51*cdf0e10cSrcweir #include <svx/xtable.hxx>
52*cdf0e10cSrcweir #include <svx/xpool.hxx>
53*cdf0e10cSrcweir #include "svx/dlgutil.hxx"
54*cdf0e10cSrcweir #include <svx/xflhtit.hxx>
55*cdf0e10cSrcweir #include <svx/xflclit.hxx>
56*cdf0e10cSrcweir #include <svx/xfillit0.hxx>
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir #include <svx/svdorect.hxx>
59*cdf0e10cSrcweir #include <svx/svdmodel.hxx>
60*cdf0e10cSrcweir #include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
61*cdf0e10cSrcweir #include <svx/sdr/contact/displayinfo.hxx>
62*cdf0e10cSrcweir #include <svx/xlnclit.hxx>
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir using namespace ::com::sun::star;
65*cdf0e10cSrcweir using namespace ::rtl;
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir sal_Unicode const pszExtHatch[]	 = {'s','o','h'};
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir char const aChckHatch[]  = { 0x04, 0x00, 'S','O','H','L'};	// < 5.2
70*cdf0e10cSrcweir char const aChckHatch0[] = { 0x04, 0x00, 'S','O','H','0'};	// = 5.2
71*cdf0e10cSrcweir char const aChckXML[]    = { '<', '?', 'x', 'm', 'l' };		// = 6.0
72*cdf0e10cSrcweir 
73*cdf0e10cSrcweir // ------------------
74*cdf0e10cSrcweir // class XHatchTable
75*cdf0e10cSrcweir // ------------------
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir /*************************************************************************
78*cdf0e10cSrcweir |*
79*cdf0e10cSrcweir |* XHatchTable::XHatchTable()
80*cdf0e10cSrcweir |*
81*cdf0e10cSrcweir *************************************************************************/
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir XHatchTable::XHatchTable( const String& rPath,
84*cdf0e10cSrcweir 							XOutdevItemPool* pInPool,
85*cdf0e10cSrcweir 							sal_uInt16 nInitSize, sal_uInt16 nReSize ) :
86*cdf0e10cSrcweir 				XPropertyTable( rPath, pInPool, nInitSize, nReSize)
87*cdf0e10cSrcweir {
88*cdf0e10cSrcweir 	pBmpTable = new Table( nInitSize, nReSize );
89*cdf0e10cSrcweir }
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir /************************************************************************/
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir XHatchTable::~XHatchTable()
94*cdf0e10cSrcweir {
95*cdf0e10cSrcweir }
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir /************************************************************************/
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir XHatchEntry* XHatchTable::Replace(long nIndex, XHatchEntry* pEntry )
100*cdf0e10cSrcweir {
101*cdf0e10cSrcweir 	return (XHatchEntry*) XPropertyTable::Replace(nIndex, pEntry);
102*cdf0e10cSrcweir }
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir /************************************************************************/
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir XHatchEntry* XHatchTable::Remove(long nIndex)
107*cdf0e10cSrcweir {
108*cdf0e10cSrcweir 	return (XHatchEntry*) XPropertyTable::Remove(nIndex, 0);
109*cdf0e10cSrcweir }
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir /************************************************************************/
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir XHatchEntry* XHatchTable::GetHatch(long nIndex) const
114*cdf0e10cSrcweir {
115*cdf0e10cSrcweir 	return (XHatchEntry*) XPropertyTable::Get(nIndex, 0);
116*cdf0e10cSrcweir }
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir /************************************************************************/
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir sal_Bool XHatchTable::Load()
121*cdf0e10cSrcweir {
122*cdf0e10cSrcweir 	return( sal_False );
123*cdf0e10cSrcweir }
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir /************************************************************************/
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir sal_Bool XHatchTable::Save()
128*cdf0e10cSrcweir {
129*cdf0e10cSrcweir 	return( sal_False );
130*cdf0e10cSrcweir }
131*cdf0e10cSrcweir 
132*cdf0e10cSrcweir /************************************************************************/
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir sal_Bool XHatchTable::Create()
135*cdf0e10cSrcweir {
136*cdf0e10cSrcweir 	return( sal_False );
137*cdf0e10cSrcweir }
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir /************************************************************************/
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir sal_Bool XHatchTable::CreateBitmapsForUI()
142*cdf0e10cSrcweir {
143*cdf0e10cSrcweir 	return( sal_False );
144*cdf0e10cSrcweir }
145*cdf0e10cSrcweir 
146*cdf0e10cSrcweir /************************************************************************/
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir Bitmap* XHatchTable::CreateBitmapForUI( long /*nIndex*/, sal_Bool /*bDelete*/)
149*cdf0e10cSrcweir {
150*cdf0e10cSrcweir 	return( NULL );
151*cdf0e10cSrcweir }
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir // -----------------
154*cdf0e10cSrcweir // class XHatchList
155*cdf0e10cSrcweir // -----------------
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir class impXHatchList
158*cdf0e10cSrcweir {
159*cdf0e10cSrcweir private:
160*cdf0e10cSrcweir 	VirtualDevice*          mpVirtualDevice;
161*cdf0e10cSrcweir 	SdrModel*				mpSdrModel;
162*cdf0e10cSrcweir 	SdrObject*			    mpBackgroundObject;
163*cdf0e10cSrcweir 	SdrObject*			    mpHatchObject;
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir public:
166*cdf0e10cSrcweir     impXHatchList(VirtualDevice* pV, SdrModel* pM, SdrObject* pB, SdrObject* pH)
167*cdf0e10cSrcweir     :   mpVirtualDevice(pV),
168*cdf0e10cSrcweir         mpSdrModel(pM),
169*cdf0e10cSrcweir         mpBackgroundObject(pB),
170*cdf0e10cSrcweir         mpHatchObject(pH)
171*cdf0e10cSrcweir     {}
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir     ~impXHatchList()
174*cdf0e10cSrcweir     {
175*cdf0e10cSrcweir         delete mpVirtualDevice;
176*cdf0e10cSrcweir         SdrObject::Free(mpBackgroundObject);
177*cdf0e10cSrcweir         SdrObject::Free(mpHatchObject);
178*cdf0e10cSrcweir         delete mpSdrModel;
179*cdf0e10cSrcweir     }
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir     VirtualDevice* getVirtualDevice() const { return mpVirtualDevice; }
182*cdf0e10cSrcweir     SdrObject* getBackgroundObject() const { return mpBackgroundObject; }
183*cdf0e10cSrcweir     SdrObject* getHatchObject() const { return mpHatchObject; }
184*cdf0e10cSrcweir };
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir void XHatchList::impCreate()
187*cdf0e10cSrcweir {
188*cdf0e10cSrcweir     if(!mpData)
189*cdf0e10cSrcweir     {
190*cdf0e10cSrcweir     	const Point aZero(0, 0);
191*cdf0e10cSrcweir 		const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir         VirtualDevice* pVirDev = new VirtualDevice;
194*cdf0e10cSrcweir 		OSL_ENSURE(0 != pVirDev, "XDashList: no VirtualDevice created!" );
195*cdf0e10cSrcweir 		pVirDev->SetMapMode(MAP_100TH_MM);
196*cdf0e10cSrcweir 		const Size aSize(pVirDev->PixelToLogic(Size(BITMAP_WIDTH, BITMAP_HEIGHT)));
197*cdf0e10cSrcweir 		pVirDev->SetOutputSize(aSize);
198*cdf0e10cSrcweir         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
199*cdf0e10cSrcweir             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
200*cdf0e10cSrcweir             : DRAWMODE_DEFAULT);
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 	    SdrModel* pSdrModel = new SdrModel();
203*cdf0e10cSrcweir 		OSL_ENSURE(0 != pSdrModel, "XDashList: no SdrModel created!" );
204*cdf0e10cSrcweir 	    pSdrModel->GetItemPool().FreezeIdRanges();
205*cdf0e10cSrcweir 
206*cdf0e10cSrcweir         const Size aSinglePixel(pVirDev->PixelToLogic(Size(1, 1)));
207*cdf0e10cSrcweir         const Rectangle aBackgroundSize(aZero, Size(aSize.getWidth() - aSinglePixel.getWidth(), aSize.getHeight() - aSinglePixel.getHeight()));
208*cdf0e10cSrcweir         SdrObject* pBackgroundObject = new SdrRectObj(aBackgroundSize);
209*cdf0e10cSrcweir 		OSL_ENSURE(0 != pBackgroundObject, "XDashList: no BackgroundObject created!" );
210*cdf0e10cSrcweir     	pBackgroundObject->SetModel(pSdrModel);
211*cdf0e10cSrcweir         pBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_SOLID));
212*cdf0e10cSrcweir         pBackgroundObject->SetMergedItem(XFillColorItem(String(), rStyleSettings.GetFieldColor()));
213*cdf0e10cSrcweir         pBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_SOLID));
214*cdf0e10cSrcweir         pBackgroundObject->SetMergedItem(XLineColorItem(String(), Color(COL_BLACK)));
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir         SdrObject* pHatchObject = new SdrRectObj(aBackgroundSize);
217*cdf0e10cSrcweir 		OSL_ENSURE(0 != pHatchObject, "XDashList: no HatchObject created!" );
218*cdf0e10cSrcweir     	pHatchObject->SetModel(pSdrModel);
219*cdf0e10cSrcweir         pHatchObject->SetMergedItem(XFillStyleItem(XFILL_HATCH));
220*cdf0e10cSrcweir         pHatchObject->SetMergedItem(XLineStyleItem(XLINE_NONE));
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir         mpData = new impXHatchList(pVirDev, pSdrModel, pBackgroundObject, pHatchObject);
223*cdf0e10cSrcweir 		OSL_ENSURE(0 != mpData, "XDashList: data creation went wrong!" );
224*cdf0e10cSrcweir     }
225*cdf0e10cSrcweir }
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir void XHatchList::impDestroy()
228*cdf0e10cSrcweir {
229*cdf0e10cSrcweir     if(mpData)
230*cdf0e10cSrcweir     {
231*cdf0e10cSrcweir         delete mpData;
232*cdf0e10cSrcweir         mpData = 0;
233*cdf0e10cSrcweir     }
234*cdf0e10cSrcweir }
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir XHatchList::XHatchList(const String& rPath, XOutdevItemPool* pInPool, sal_uInt16 nInitSize, sal_uInt16 nReSize)
237*cdf0e10cSrcweir :   XPropertyList(rPath, pInPool, nInitSize, nReSize),
238*cdf0e10cSrcweir     mpData(0)
239*cdf0e10cSrcweir {
240*cdf0e10cSrcweir 	pBmpList = new List(nInitSize, nReSize);
241*cdf0e10cSrcweir }
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir XHatchList::~XHatchList()
244*cdf0e10cSrcweir {
245*cdf0e10cSrcweir     if(mpData)
246*cdf0e10cSrcweir     {
247*cdf0e10cSrcweir         delete mpData;
248*cdf0e10cSrcweir         mpData = 0;
249*cdf0e10cSrcweir     }
250*cdf0e10cSrcweir }
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir XHatchEntry* XHatchList::Replace(XHatchEntry* pEntry, long nIndex )
253*cdf0e10cSrcweir {
254*cdf0e10cSrcweir 	return (XHatchEntry*) XPropertyList::Replace(pEntry, nIndex);
255*cdf0e10cSrcweir }
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir XHatchEntry* XHatchList::Remove(long nIndex)
258*cdf0e10cSrcweir {
259*cdf0e10cSrcweir 	return (XHatchEntry*) XPropertyList::Remove(nIndex, 0);
260*cdf0e10cSrcweir }
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir XHatchEntry* XHatchList::GetHatch(long nIndex) const
263*cdf0e10cSrcweir {
264*cdf0e10cSrcweir 	return (XHatchEntry*) XPropertyList::Get(nIndex, 0);
265*cdf0e10cSrcweir }
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir sal_Bool XHatchList::Load()
268*cdf0e10cSrcweir {
269*cdf0e10cSrcweir 	if( bListDirty )
270*cdf0e10cSrcweir 	{
271*cdf0e10cSrcweir 		bListDirty = sal_False;
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir 		INetURLObject aURL( aPath );
274*cdf0e10cSrcweir 
275*cdf0e10cSrcweir 		if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
276*cdf0e10cSrcweir 		{
277*cdf0e10cSrcweir 			DBG_ASSERT( !aPath.Len(), "invalid URL" );
278*cdf0e10cSrcweir 			return sal_False;
279*cdf0e10cSrcweir 		}
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir 		aURL.Append( aName );
282*cdf0e10cSrcweir 
283*cdf0e10cSrcweir 		if( !aURL.getExtension().getLength() )
284*cdf0e10cSrcweir 			aURL.setExtension( rtl::OUString( pszExtHatch, 3 ) );
285*cdf0e10cSrcweir 
286*cdf0e10cSrcweir 		uno::Reference< container::XNameContainer > xTable( SvxUnoXHatchTable_createInstance( this ), uno::UNO_QUERY );
287*cdf0e10cSrcweir 		return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
288*cdf0e10cSrcweir 	}
289*cdf0e10cSrcweir 	return( sal_False );
290*cdf0e10cSrcweir }
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir sal_Bool XHatchList::Save()
293*cdf0e10cSrcweir {
294*cdf0e10cSrcweir 	INetURLObject aURL( aPath );
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir 	if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
297*cdf0e10cSrcweir 	{
298*cdf0e10cSrcweir 		DBG_ASSERT( !aPath.Len(), "invalid URL" );
299*cdf0e10cSrcweir 		return sal_False;
300*cdf0e10cSrcweir 	}
301*cdf0e10cSrcweir 
302*cdf0e10cSrcweir 	aURL.Append( aName );
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir 	if( !aURL.getExtension().getLength() )
305*cdf0e10cSrcweir 		aURL.setExtension( rtl::OUString( pszExtHatch, 3 ) );
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir 	uno::Reference< container::XNameContainer > xTable( SvxUnoXHatchTable_createInstance( this ), uno::UNO_QUERY );
308*cdf0e10cSrcweir 	return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
309*cdf0e10cSrcweir }
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir sal_Bool XHatchList::Create()
312*cdf0e10cSrcweir {
313*cdf0e10cSrcweir 	XubString aStr( SVX_RES( RID_SVXSTR_HATCH ) );
314*cdf0e10cSrcweir 	xub_StrLen nLen;
315*cdf0e10cSrcweir 
316*cdf0e10cSrcweir 	aStr.AppendAscii(" 1");
317*cdf0e10cSrcweir 	nLen = aStr.Len() - 1;
318*cdf0e10cSrcweir 	Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLACK),XHATCH_SINGLE,100,  0),aStr));
319*cdf0e10cSrcweir 	aStr.SetChar(nLen, sal_Unicode('2'));
320*cdf0e10cSrcweir 	Insert(new XHatchEntry(XHatch(RGB_Color(COL_RED  ),XHATCH_DOUBLE, 80,450),aStr));
321*cdf0e10cSrcweir 	aStr.SetChar(nLen, sal_Unicode('3'));
322*cdf0e10cSrcweir 	Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLUE ),XHATCH_TRIPLE,120,  0),aStr));
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir 	return( sal_True );
325*cdf0e10cSrcweir }
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir sal_Bool XHatchList::CreateBitmapsForUI()
328*cdf0e10cSrcweir {
329*cdf0e10cSrcweir     impCreate();
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir     for( long i = 0; i < Count(); i++)
332*cdf0e10cSrcweir 	{
333*cdf0e10cSrcweir 		Bitmap* pBmp = CreateBitmapForUI( i, sal_False );
334*cdf0e10cSrcweir 		DBG_ASSERT( pBmp, "XHatchList: Bitmap(UI) konnte nicht erzeugt werden!" );
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir 		if( pBmp )
337*cdf0e10cSrcweir 			pBmpList->Insert( pBmp, i );
338*cdf0e10cSrcweir 	}
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir     impDestroy();
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir 	return( sal_True );
343*cdf0e10cSrcweir }
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir Bitmap* XHatchList::CreateBitmapForUI( long nIndex, sal_Bool bDelete )
346*cdf0e10cSrcweir {
347*cdf0e10cSrcweir     impCreate();
348*cdf0e10cSrcweir     VirtualDevice* pVD = mpData->getVirtualDevice();
349*cdf0e10cSrcweir     SdrObject* pHatchObject = mpData->getHatchObject();
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir     pHatchObject->SetMergedItem(XFillStyleItem(XFILL_HATCH));
352*cdf0e10cSrcweir     pHatchObject->SetMergedItem(XFillHatchItem(String(), GetHatch(nIndex)->GetHatch()));
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir     sdr::contact::SdrObjectVector aObjectVector;
355*cdf0e10cSrcweir 	aObjectVector.push_back(mpData->getBackgroundObject());
356*cdf0e10cSrcweir 	aObjectVector.push_back(pHatchObject);
357*cdf0e10cSrcweir 	sdr::contact::ObjectContactOfObjListPainter aPainter(*pVD, aObjectVector, 0);
358*cdf0e10cSrcweir 	sdr::contact::DisplayInfo aDisplayInfo;
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir 	aPainter.ProcessDisplay(aDisplayInfo);
361*cdf0e10cSrcweir 
362*cdf0e10cSrcweir     const Point aZero(0, 0);
363*cdf0e10cSrcweir 	Bitmap* pBitmap = new Bitmap(pVD->GetBitmap(aZero, pVD->GetOutputSize()));
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 	if(bDelete)
366*cdf0e10cSrcweir 	{
367*cdf0e10cSrcweir         impDestroy();
368*cdf0e10cSrcweir 	}
369*cdf0e10cSrcweir 
370*cdf0e10cSrcweir 	return pBitmap;
371*cdf0e10cSrcweir }
372*cdf0e10cSrcweir 
373*cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
374*cdf0e10cSrcweir // eof
375