1*f6e50924SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*f6e50924SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f6e50924SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f6e50924SAndrew Rist * distributed with this work for additional information 6*f6e50924SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f6e50924SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f6e50924SAndrew Rist * "License"); you may not use this file except in compliance 9*f6e50924SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*f6e50924SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*f6e50924SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f6e50924SAndrew Rist * software distributed under the License is distributed on an 15*f6e50924SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f6e50924SAndrew Rist * KIND, either express or implied. See the License for the 17*f6e50924SAndrew Rist * specific language governing permissions and limitations 18*f6e50924SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*f6e50924SAndrew Rist *************************************************************/ 21*f6e50924SAndrew Rist 22*f6e50924SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_svx.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir // include --------------------------------------------------------------- 28cdf0e10cSrcweir 29cdf0e10cSrcweir #ifndef SVX_LIGHT 30cdf0e10cSrcweir 31cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp> 32cdf0e10cSrcweir #include "svx/XPropertyTable.hxx" 33cdf0e10cSrcweir #include <unotools/ucbstreamhelper.hxx> 34cdf0e10cSrcweir 35cdf0e10cSrcweir #include "xmlxtexp.hxx" 36cdf0e10cSrcweir #include "xmlxtimp.hxx" 37cdf0e10cSrcweir 38cdf0e10cSrcweir #endif 39cdf0e10cSrcweir #include <tools/urlobj.hxx> 40cdf0e10cSrcweir #include <vcl/virdev.hxx> 41cdf0e10cSrcweir 42cdf0e10cSrcweir #ifndef _SV_APP_HXX 43cdf0e10cSrcweir #include <vcl/svapp.hxx> 44cdf0e10cSrcweir #endif 45cdf0e10cSrcweir #include <svl/itemset.hxx> 46cdf0e10cSrcweir #include <sfx2/docfile.hxx> 47cdf0e10cSrcweir 48cdf0e10cSrcweir #include <svx/dialogs.hrc> 49cdf0e10cSrcweir #include <svx/dialmgr.hxx> 50cdf0e10cSrcweir 51cdf0e10cSrcweir #include <svx/xtable.hxx> 52cdf0e10cSrcweir #include <svx/xpool.hxx> 53cdf0e10cSrcweir #include <svx/xfillit0.hxx> 54cdf0e10cSrcweir #include <svx/xflclit.hxx> 55cdf0e10cSrcweir #include <svx/xlnstwit.hxx> 56cdf0e10cSrcweir #include <svx/xlnedwit.hxx> 57cdf0e10cSrcweir #include <svx/xlnclit.hxx> 58cdf0e10cSrcweir #include <svx/xlineit0.hxx> 59cdf0e10cSrcweir #include <svx/xlnstit.hxx> 60cdf0e10cSrcweir #include <svx/xlnedit.hxx> 61cdf0e10cSrcweir #include <basegfx/point/b2dpoint.hxx> 62cdf0e10cSrcweir #include <basegfx/polygon/b2dpolygon.hxx> 63cdf0e10cSrcweir #include <basegfx/polygon/b2dpolygontools.hxx> 64cdf0e10cSrcweir 65cdf0e10cSrcweir #include <svx/svdorect.hxx> 66cdf0e10cSrcweir #include <svx/svdopath.hxx> 67cdf0e10cSrcweir #include <svx/svdmodel.hxx> 68cdf0e10cSrcweir #include <svx/sdr/contact/objectcontactofobjlistpainter.hxx> 69cdf0e10cSrcweir #include <svx/sdr/contact/displayinfo.hxx> 70cdf0e10cSrcweir 71cdf0e10cSrcweir #define GLOBALOVERFLOW 72cdf0e10cSrcweir 73cdf0e10cSrcweir using namespace com::sun::star; 74cdf0e10cSrcweir using namespace rtl; 75cdf0e10cSrcweir 76cdf0e10cSrcweir sal_Unicode const pszExtLineEnd[] = {'s','o','e'}; 77cdf0e10cSrcweir 78cdf0e10cSrcweir static char const aChckLEnd[] = { 0x04, 0x00, 'S','O','E','L'}; // < 5.2 79cdf0e10cSrcweir static char const aChckLEnd0[] = { 0x04, 0x00, 'S','O','E','0'}; // = 5.2 80cdf0e10cSrcweir static char const aChckXML[] = { '<', '?', 'x', 'm', 'l' }; // = 6.0 81cdf0e10cSrcweir 82cdf0e10cSrcweir // -------------------- 83cdf0e10cSrcweir // class XLineEndTable 84cdf0e10cSrcweir // -------------------- 85cdf0e10cSrcweir 86cdf0e10cSrcweir /************************************************************************* 87cdf0e10cSrcweir |* 88cdf0e10cSrcweir |* XLineEndTable::XLineEndTable() 89cdf0e10cSrcweir |* 90cdf0e10cSrcweir *************************************************************************/ 91cdf0e10cSrcweir 92cdf0e10cSrcweir XLineEndTable::XLineEndTable( const String& rPath, 93cdf0e10cSrcweir XOutdevItemPool* pInPool, 94cdf0e10cSrcweir sal_uInt16 nInitSize, sal_uInt16 nReSize ) : 95cdf0e10cSrcweir XPropertyTable( rPath, pInPool, nInitSize, nReSize) 96cdf0e10cSrcweir { 97cdf0e10cSrcweir pBmpTable = new Table( nInitSize, nReSize ); 98cdf0e10cSrcweir } 99cdf0e10cSrcweir 100cdf0e10cSrcweir /************************************************************************/ 101cdf0e10cSrcweir 102cdf0e10cSrcweir XLineEndTable::~XLineEndTable() 103cdf0e10cSrcweir { 104cdf0e10cSrcweir } 105cdf0e10cSrcweir 106cdf0e10cSrcweir /************************************************************************/ 107cdf0e10cSrcweir 108cdf0e10cSrcweir XLineEndEntry* XLineEndTable::Replace(long nIndex, XLineEndEntry* pEntry ) 109cdf0e10cSrcweir { 110cdf0e10cSrcweir return (XLineEndEntry*) XPropertyTable::Replace(nIndex, pEntry); 111cdf0e10cSrcweir } 112cdf0e10cSrcweir 113cdf0e10cSrcweir /************************************************************************/ 114cdf0e10cSrcweir 115cdf0e10cSrcweir XLineEndEntry* XLineEndTable::Remove(long nIndex) 116cdf0e10cSrcweir { 117cdf0e10cSrcweir return (XLineEndEntry*) XPropertyTable::Remove(nIndex, 0); 118cdf0e10cSrcweir } 119cdf0e10cSrcweir 120cdf0e10cSrcweir /************************************************************************/ 121cdf0e10cSrcweir 122cdf0e10cSrcweir XLineEndEntry* XLineEndTable::GetLineEnd(long nIndex) const 123cdf0e10cSrcweir { 124cdf0e10cSrcweir return (XLineEndEntry*) XPropertyTable::Get(nIndex, 0); 125cdf0e10cSrcweir } 126cdf0e10cSrcweir 127cdf0e10cSrcweir /************************************************************************/ 128cdf0e10cSrcweir 129cdf0e10cSrcweir sal_Bool XLineEndTable::Load() 130cdf0e10cSrcweir { 131cdf0e10cSrcweir return( sal_False ); 132cdf0e10cSrcweir } 133cdf0e10cSrcweir 134cdf0e10cSrcweir /************************************************************************/ 135cdf0e10cSrcweir 136cdf0e10cSrcweir sal_Bool XLineEndTable::Save() 137cdf0e10cSrcweir { 138cdf0e10cSrcweir return( sal_False ); 139cdf0e10cSrcweir } 140cdf0e10cSrcweir 141cdf0e10cSrcweir /************************************************************************/ 142cdf0e10cSrcweir 143cdf0e10cSrcweir sal_Bool XLineEndTable::Create() 144cdf0e10cSrcweir { 145cdf0e10cSrcweir return( sal_False ); 146cdf0e10cSrcweir } 147cdf0e10cSrcweir 148cdf0e10cSrcweir /************************************************************************/ 149cdf0e10cSrcweir 150cdf0e10cSrcweir Bitmap* XLineEndTable::CreateBitmapForUI( long /*nIndex*/, sal_Bool /*bDelete*/) 151cdf0e10cSrcweir { 152cdf0e10cSrcweir return( NULL ); 153cdf0e10cSrcweir } 154cdf0e10cSrcweir 155cdf0e10cSrcweir /************************************************************************/ 156cdf0e10cSrcweir 157cdf0e10cSrcweir sal_Bool XLineEndTable::CreateBitmapsForUI() 158cdf0e10cSrcweir { 159cdf0e10cSrcweir return( sal_False ); 160cdf0e10cSrcweir } 161cdf0e10cSrcweir 162cdf0e10cSrcweir // -------------------- 163cdf0e10cSrcweir // class XLineEndList 164cdf0e10cSrcweir // -------------------- 165cdf0e10cSrcweir 166cdf0e10cSrcweir class impXLineEndList 167cdf0e10cSrcweir { 168cdf0e10cSrcweir private: 169cdf0e10cSrcweir VirtualDevice* mpVirtualDevice; 170cdf0e10cSrcweir SdrModel* mpSdrModel; 171cdf0e10cSrcweir SdrObject* mpBackgroundObject; 172cdf0e10cSrcweir SdrObject* mpLineObject; 173cdf0e10cSrcweir 174cdf0e10cSrcweir public: 175cdf0e10cSrcweir impXLineEndList(VirtualDevice* pV, SdrModel* pM, SdrObject* pB, SdrObject* pL) 176cdf0e10cSrcweir : mpVirtualDevice(pV), 177cdf0e10cSrcweir mpSdrModel(pM), 178cdf0e10cSrcweir mpBackgroundObject(pB), 179cdf0e10cSrcweir mpLineObject(pL) 180cdf0e10cSrcweir {} 181cdf0e10cSrcweir 182cdf0e10cSrcweir ~impXLineEndList() 183cdf0e10cSrcweir { 184cdf0e10cSrcweir delete mpVirtualDevice; 185cdf0e10cSrcweir SdrObject::Free(mpBackgroundObject); 186cdf0e10cSrcweir SdrObject::Free(mpLineObject); 187cdf0e10cSrcweir delete mpSdrModel; 188cdf0e10cSrcweir } 189cdf0e10cSrcweir 190cdf0e10cSrcweir VirtualDevice* getVirtualDevice() const { return mpVirtualDevice; } 191cdf0e10cSrcweir SdrObject* getBackgroundObject() const { return mpBackgroundObject; } 192cdf0e10cSrcweir SdrObject* getLineObject() const { return mpLineObject; } 193cdf0e10cSrcweir }; 194cdf0e10cSrcweir 195cdf0e10cSrcweir void XLineEndList::impCreate() 196cdf0e10cSrcweir { 197cdf0e10cSrcweir if(!mpData) 198cdf0e10cSrcweir { 199cdf0e10cSrcweir const Point aZero(0, 0); 200cdf0e10cSrcweir const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); 201cdf0e10cSrcweir 202cdf0e10cSrcweir VirtualDevice* pVirDev = new VirtualDevice; 203cdf0e10cSrcweir OSL_ENSURE(0 != pVirDev, "XLineEndList: no VirtualDevice created!" ); 204cdf0e10cSrcweir pVirDev->SetMapMode(MAP_100TH_MM); 205cdf0e10cSrcweir const Size aSize(pVirDev->PixelToLogic(Size(BITMAP_WIDTH * 2, BITMAP_HEIGHT))); 206cdf0e10cSrcweir pVirDev->SetOutputSize(aSize); 207cdf0e10cSrcweir pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode() 208cdf0e10cSrcweir ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT 209cdf0e10cSrcweir : DRAWMODE_DEFAULT); 210cdf0e10cSrcweir 211cdf0e10cSrcweir SdrModel* pSdrModel = new SdrModel(); 212cdf0e10cSrcweir OSL_ENSURE(0 != pSdrModel, "XLineEndList: no SdrModel created!" ); 213cdf0e10cSrcweir pSdrModel->GetItemPool().FreezeIdRanges(); 214cdf0e10cSrcweir 215cdf0e10cSrcweir const Rectangle aBackgroundSize(aZero, aSize); 216cdf0e10cSrcweir SdrObject* pBackgroundObject = new SdrRectObj(aBackgroundSize); 217cdf0e10cSrcweir OSL_ENSURE(0 != pBackgroundObject, "XLineEndList: no BackgroundObject created!" ); 218cdf0e10cSrcweir pBackgroundObject->SetModel(pSdrModel); 219cdf0e10cSrcweir pBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_SOLID)); 220cdf0e10cSrcweir pBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_NONE)); 221cdf0e10cSrcweir pBackgroundObject->SetMergedItem(XFillColorItem(String(), rStyleSettings.GetFieldColor())); 222cdf0e10cSrcweir 223cdf0e10cSrcweir const basegfx::B2DPoint aStart(0, aSize.Height() / 2); 224cdf0e10cSrcweir const basegfx::B2DPoint aEnd(aSize.Width(), aSize.Height() / 2); 225cdf0e10cSrcweir basegfx::B2DPolygon aPolygon; 226cdf0e10cSrcweir aPolygon.append(aStart); 227cdf0e10cSrcweir aPolygon.append(aEnd); 228cdf0e10cSrcweir SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon)); 229cdf0e10cSrcweir OSL_ENSURE(0 != pLineObject, "XLineEndList: no LineObject created!" ); 230cdf0e10cSrcweir pLineObject->SetModel(pSdrModel); 231cdf0e10cSrcweir pLineObject->SetMergedItem(XLineStartWidthItem(aSize.Height())); 232cdf0e10cSrcweir pLineObject->SetMergedItem(XLineEndWidthItem(aSize.Height())); 233cdf0e10cSrcweir pLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor())); 234cdf0e10cSrcweir 235cdf0e10cSrcweir mpData = new impXLineEndList(pVirDev, pSdrModel, pBackgroundObject, pLineObject); 236cdf0e10cSrcweir OSL_ENSURE(0 != mpData, "XLineEndList: data creation went wrong!" ); 237cdf0e10cSrcweir } 238cdf0e10cSrcweir } 239cdf0e10cSrcweir 240cdf0e10cSrcweir void XLineEndList::impDestroy() 241cdf0e10cSrcweir { 242cdf0e10cSrcweir if(mpData) 243cdf0e10cSrcweir { 244cdf0e10cSrcweir delete mpData; 245cdf0e10cSrcweir mpData = 0; 246cdf0e10cSrcweir } 247cdf0e10cSrcweir } 248cdf0e10cSrcweir 249cdf0e10cSrcweir XLineEndList::XLineEndList(const String& rPath, XOutdevItemPool* _pXPool, sal_uInt16 nInitSize, sal_uInt16 nReSize) 250cdf0e10cSrcweir : XPropertyList(rPath, _pXPool, nInitSize, nReSize), 251cdf0e10cSrcweir mpData(0) 252cdf0e10cSrcweir { 253cdf0e10cSrcweir pBmpList = new List(nInitSize, nReSize); 254cdf0e10cSrcweir } 255cdf0e10cSrcweir 256cdf0e10cSrcweir XLineEndList::~XLineEndList() 257cdf0e10cSrcweir { 258cdf0e10cSrcweir impDestroy(); 259cdf0e10cSrcweir } 260cdf0e10cSrcweir 261cdf0e10cSrcweir XLineEndEntry* XLineEndList::Replace(XLineEndEntry* pEntry, long nIndex ) 262cdf0e10cSrcweir { 263cdf0e10cSrcweir return (XLineEndEntry*) XPropertyList::Replace(pEntry, nIndex); 264cdf0e10cSrcweir } 265cdf0e10cSrcweir 266cdf0e10cSrcweir XLineEndEntry* XLineEndList::Remove(long nIndex) 267cdf0e10cSrcweir { 268cdf0e10cSrcweir return (XLineEndEntry*) XPropertyList::Remove(nIndex, 0); 269cdf0e10cSrcweir } 270cdf0e10cSrcweir 271cdf0e10cSrcweir XLineEndEntry* XLineEndList::GetLineEnd(long nIndex) const 272cdf0e10cSrcweir { 273cdf0e10cSrcweir return (XLineEndEntry*) XPropertyList::Get(nIndex, 0); 274cdf0e10cSrcweir } 275cdf0e10cSrcweir 276cdf0e10cSrcweir sal_Bool XLineEndList::Load() 277cdf0e10cSrcweir { 278cdf0e10cSrcweir if( bListDirty ) 279cdf0e10cSrcweir { 280cdf0e10cSrcweir bListDirty = sal_False; 281cdf0e10cSrcweir 282cdf0e10cSrcweir INetURLObject aURL( aPath ); 283cdf0e10cSrcweir 284cdf0e10cSrcweir if( INET_PROT_NOT_VALID == aURL.GetProtocol() ) 285cdf0e10cSrcweir { 286cdf0e10cSrcweir DBG_ASSERT( !aPath.Len(), "invalid URL" ); 287cdf0e10cSrcweir return sal_False; 288cdf0e10cSrcweir } 289cdf0e10cSrcweir 290cdf0e10cSrcweir aURL.Append( aName ); 291cdf0e10cSrcweir 292cdf0e10cSrcweir if( !aURL.getExtension().getLength() ) 293cdf0e10cSrcweir aURL.setExtension( rtl::OUString( pszExtLineEnd, 3 ) ); 294cdf0e10cSrcweir 295cdf0e10cSrcweir uno::Reference< container::XNameContainer > xTable( SvxUnoXLineEndTable_createInstance( this ), uno::UNO_QUERY ); 296cdf0e10cSrcweir return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable ); 297cdf0e10cSrcweir } 298cdf0e10cSrcweir return( sal_False ); 299cdf0e10cSrcweir } 300cdf0e10cSrcweir 301cdf0e10cSrcweir sal_Bool XLineEndList::Save() 302cdf0e10cSrcweir { 303cdf0e10cSrcweir INetURLObject aURL( aPath ); 304cdf0e10cSrcweir 305cdf0e10cSrcweir if( INET_PROT_NOT_VALID == aURL.GetProtocol() ) 306cdf0e10cSrcweir { 307cdf0e10cSrcweir DBG_ASSERT( !aPath.Len(), "invalid URL" ); 308cdf0e10cSrcweir return sal_False; 309cdf0e10cSrcweir } 310cdf0e10cSrcweir 311cdf0e10cSrcweir aURL.Append( aName ); 312cdf0e10cSrcweir 313cdf0e10cSrcweir if( !aURL.getExtension().getLength() ) 314cdf0e10cSrcweir aURL.setExtension( rtl::OUString( pszExtLineEnd, 3 ) ); 315cdf0e10cSrcweir 316cdf0e10cSrcweir uno::Reference< container::XNameContainer > xTable( SvxUnoXLineEndTable_createInstance( this ), uno::UNO_QUERY ); 317cdf0e10cSrcweir return SvxXMLXTableExportComponent::save( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable ); 318cdf0e10cSrcweir } 319cdf0e10cSrcweir 320cdf0e10cSrcweir sal_Bool XLineEndList::Create() 321cdf0e10cSrcweir { 322cdf0e10cSrcweir basegfx::B2DPolygon aTriangle; 323cdf0e10cSrcweir aTriangle.append(basegfx::B2DPoint(10.0, 0.0)); 324cdf0e10cSrcweir aTriangle.append(basegfx::B2DPoint(0.0, 30.0)); 325cdf0e10cSrcweir aTriangle.append(basegfx::B2DPoint(20.0, 30.0)); 326cdf0e10cSrcweir aTriangle.setClosed(true); 327cdf0e10cSrcweir Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aTriangle), SVX_RESSTR( RID_SVXSTR_ARROW ) ) ); 328cdf0e10cSrcweir 329cdf0e10cSrcweir basegfx::B2DPolygon aSquare; 330cdf0e10cSrcweir aSquare.append(basegfx::B2DPoint(0.0, 0.0)); 331cdf0e10cSrcweir aSquare.append(basegfx::B2DPoint(10.0, 0.0)); 332cdf0e10cSrcweir aSquare.append(basegfx::B2DPoint(10.0, 10.0)); 333cdf0e10cSrcweir aSquare.append(basegfx::B2DPoint(0.0, 10.0)); 334cdf0e10cSrcweir aSquare.setClosed(true); 335cdf0e10cSrcweir Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aSquare), SVX_RESSTR( RID_SVXSTR_SQUARE ) ) ); 336cdf0e10cSrcweir 337cdf0e10cSrcweir basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 100.0)); 338cdf0e10cSrcweir Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aCircle), SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) ); 339cdf0e10cSrcweir 340cdf0e10cSrcweir return( sal_True ); 341cdf0e10cSrcweir } 342cdf0e10cSrcweir 343cdf0e10cSrcweir sal_Bool XLineEndList::CreateBitmapsForUI() 344cdf0e10cSrcweir { 345cdf0e10cSrcweir impCreate(); 346cdf0e10cSrcweir 347cdf0e10cSrcweir for( long i = 0; i < Count(); i++) 348cdf0e10cSrcweir { 349cdf0e10cSrcweir Bitmap* pBmp = CreateBitmapForUI( i, sal_False ); 350cdf0e10cSrcweir OSL_ENSURE(0 != pBmp, "XLineEndList: Bitmap(UI) could not be created!" ); 351cdf0e10cSrcweir 352cdf0e10cSrcweir if( pBmp ) 353cdf0e10cSrcweir pBmpList->Insert( pBmp, i ); 354cdf0e10cSrcweir } 355cdf0e10cSrcweir 356cdf0e10cSrcweir impDestroy(); 357cdf0e10cSrcweir 358cdf0e10cSrcweir return( sal_True ); 359cdf0e10cSrcweir } 360cdf0e10cSrcweir 361cdf0e10cSrcweir Bitmap* XLineEndList::CreateBitmapForUI( long nIndex, sal_Bool bDelete ) 362cdf0e10cSrcweir { 363cdf0e10cSrcweir impCreate(); 364cdf0e10cSrcweir VirtualDevice* pVD = mpData->getVirtualDevice(); 365cdf0e10cSrcweir SdrObject* pLine = mpData->getLineObject(); 366cdf0e10cSrcweir 367cdf0e10cSrcweir pLine->SetMergedItem(XLineStyleItem(XLINE_SOLID)); 368cdf0e10cSrcweir pLine->SetMergedItem(XLineStartItem(String(), GetLineEnd(nIndex)->GetLineEnd())); 369cdf0e10cSrcweir pLine->SetMergedItem(XLineEndItem(String(), GetLineEnd(nIndex)->GetLineEnd())); 370cdf0e10cSrcweir 371cdf0e10cSrcweir sdr::contact::SdrObjectVector aObjectVector; 372cdf0e10cSrcweir aObjectVector.push_back(mpData->getBackgroundObject()); 373cdf0e10cSrcweir aObjectVector.push_back(pLine); 374cdf0e10cSrcweir sdr::contact::ObjectContactOfObjListPainter aPainter(*pVD, aObjectVector, 0); 375cdf0e10cSrcweir sdr::contact::DisplayInfo aDisplayInfo; 376cdf0e10cSrcweir 377cdf0e10cSrcweir aPainter.ProcessDisplay(aDisplayInfo); 378cdf0e10cSrcweir 379cdf0e10cSrcweir const Point aZero(0, 0); 380cdf0e10cSrcweir Bitmap* pBitmap = new Bitmap(pVD->GetBitmap(aZero, pVD->GetOutputSize())); 381cdf0e10cSrcweir 382cdf0e10cSrcweir if(bDelete) 383cdf0e10cSrcweir { 384cdf0e10cSrcweir impDestroy(); 385cdf0e10cSrcweir } 386cdf0e10cSrcweir 387cdf0e10cSrcweir return pBitmap; 388cdf0e10cSrcweir } 389cdf0e10cSrcweir 390cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 391cdf0e10cSrcweir // eof 392