1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cgm.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_goodies.hxx"
33 #include <com/sun/star/task/XStatusIndicator.hpp>
34 #include <unotools/ucbstreamhelper.hxx>
36 #define CGM_BREAK_ACTION 0xffffffff
37 #include <osl/endian.h>
38 #include <vcl/virdev.hxx>
39 #include <vcl/graph.hxx>
40 #include <tools/stream.hxx>
43 #include <elements.hxx>
46 using namespace ::com::sun::star
;
48 // ---------------------------------------------------------------
50 void CGM::ImplCGMInit()
52 mbIsFinished
= mbPicture
= mbMetaFile
= mbPictureBody
= sal_False
;
62 pCopyOfE
= new CGMElements( *this );
63 pElement
= new CGMElements( *this );
66 // ---------------------------------------------------------------
68 #ifdef CGM_EXPORT_IMPRESS
70 CGM::CGM( sal_uInt32 nMode
, uno::Reference
< frame::XModel
> & rModel
) :
72 mpCommentOut ( NULL
),
73 mbStatus ( sal_True
),
74 mpOutAct ( new CGMImpressOutAct( *this, rModel
) ),
77 mnMode
|= CGM_EXPORT_IMPRESS
;
82 // ---------------------------------------------------------------
84 void CGM::ImplComment( sal_uInt32 Level
, const char* Description
)
88 if ( Level
== CGM_DESCRIPTION
)
90 *mpCommentOut
<< " " << Description
<< "\n";
94 sal_Int8 nFirst
, nSecond
, i
, nCount
= 0;
95 if ( mnActCount
< 10000 )
97 if ( mnActCount
< 1000 )
99 if ( mnActCount
< 100 )
101 if ( mnActCount
< 10 )
103 for ( i
= 0; i
<= nCount
; i
++ )
104 *mpCommentOut
<< " ";
105 mpCommentOut
->WriteNumber( mnActCount
);
107 switch( Level
& 0xff )
109 case CGM_UNKNOWN_LEVEL
:
110 *mpCommentOut
<< " L?";
112 case CGM_UNKNOWN_COMMAND
:
113 *mpCommentOut
<< " UNKNOWN COMMAND";
116 *mpCommentOut
<< " LI";
119 *mpCommentOut
<< " L";
120 mpCommentOut
->WriteNumber( Level
& 0xff );
123 *mpCommentOut
<< " C";
124 mpCommentOut
->WriteNumber( mnElementClass
);
125 *mpCommentOut
<< " ID-0x";
126 nFirst
= ( mnElementID
> 0x9F ) ? (sal_Int8
)( mnElementID
>> 4 ) + 'A' - 10: (sal_Int8
)( mnElementID
>> 4 ) + '0';
127 nSecond
= ( ( mnElementID
& 15 ) > 9 ) ? (sal_Int8
)( mnElementID
& 15 ) + 'A' - 10 : (sal_Int8
)( mnElementID
& 15 ) + '0';
128 *mpCommentOut
<< nFirst
<< nSecond
;
129 *mpCommentOut
<< " Size";
131 if ( mnElementSize
< 1000000 )
133 if ( mnElementSize
< 100000 )
135 if ( mnElementSize
< 10000 )
137 if ( mnElementSize
< 1000 )
139 if ( mnElementSize
< 100 )
141 if ( mnElementSize
< 10 )
143 for ( i
= 0; i
< nCount
; i
++ )
144 *mpCommentOut
<< " ";
145 mpCommentOut
->WriteNumber( mnElementSize
);
146 *mpCommentOut
<< " " << Description
<< "\n";
151 // ---------------------------------------------------------------
156 #ifdef CGM_EXPORT_META
159 mpGDIMetaFile
->Stop();
160 mpGDIMetaFile
->SetPrefMapMode( MapMode() );
161 mpGDIMetaFile
->SetPrefSize( Size( static_cast< long >( mnOutdx
), static_cast< long >( mnOutdy
) ) );
163 *mpGraphic
= Graphic( *mpGDIMetaFile
);
166 sal_Int8
* pBuf
= (sal_Int8
*)maDefRepList
.First();
170 pBuf
= (sal_Int8
*)maDefRepList
.Next();
172 maDefRepList
.Clear();
173 delete mpBitmapInUse
;
182 // ---------------------------------------------------------------
184 sal_uInt32
CGM::GetBackGroundColor()
186 return ( pElement
) ? pElement
->aColorTable
[ 0 ] : 0;
189 // ---------------------------------------------------------------
191 sal_uInt32
CGM::ImplGetUI16( sal_uInt32
/*nAlign*/ )
193 sal_uInt8
* pSource
= mpSource
+ mnParaSize
;
195 return ( pSource
[ 0 ] << 8 ) + pSource
[ 1 ];
198 // ---------------------------------------------------------------
200 sal_uInt8
CGM::ImplGetByte( sal_uInt32 nSource
, sal_uInt32 nPrecision
)
202 return (sal_uInt8
)( nSource
>> ( ( nPrecision
- 1 ) << 3 ) );
205 // ---------------------------------------------------------------
207 long CGM::ImplGetI( sal_uInt32 nPrecision
)
209 sal_uInt8
* pSource
= mpSource
+ mnParaSize
;
210 mnParaSize
+= nPrecision
;
215 return (char)*pSource
;
220 return (sal_Int16
)( ( pSource
[ 0 ] << 8 ) | pSource
[ 1 ] );
225 return ( ( pSource
[ 0 ] << 24 ) | ( pSource
[ 1 ] << 16 ) | pSource
[ 2 ] << 8 ) >> 8;
229 return (sal_Int32
)( ( pSource
[ 0 ] << 24 ) | ( pSource
[ 1 ] << 16 ) | ( pSource
[ 2 ] << 8 ) | ( pSource
[ 3 ] ) );
232 mbStatus
= sal_False
;
237 // ---------------------------------------------------------------
239 sal_uInt32
CGM::ImplGetUI( sal_uInt32 nPrecision
)
241 sal_uInt8
* pSource
= mpSource
+ mnParaSize
;
242 mnParaSize
+= nPrecision
;
246 return (sal_Int8
)*pSource
;
249 return (sal_uInt16
)( ( pSource
[ 0 ] << 8 ) | pSource
[ 1 ] );
253 return ( pSource
[ 0 ] << 16 ) | ( pSource
[ 1 ] << 8 ) | pSource
[ 2 ];
257 return (sal_uInt32
)( ( pSource
[ 0 ] << 24 ) | ( pSource
[ 1 ] << 16 ) | ( pSource
[ 2 ] << 8 ) | ( pSource
[ 3 ] ) );
260 mbStatus
= sal_False
;
265 // ---------------------------------------------------------------
267 void CGM::ImplGetSwitch4( sal_uInt8
* pSource
, sal_uInt8
* pDest
)
269 for ( int i
= 0; i
< 4; i
++ )
271 pDest
[ i
] = pSource
[ i
^ 3 ]; // Little Endian <-> Big Endian switch
275 // ---------------------------------------------------------------
277 void CGM::ImplGetSwitch8( sal_uInt8
* pSource
, sal_uInt8
* pDest
)
279 for ( int i
= 0; i
< 8; i
++ )
281 pDest
[ i
] = pSource
[ i
^ 7 ]; // Little Endian <-> Big Endian switch
285 // ---------------------------------------------------------------
287 double CGM::ImplGetFloat( RealPrecision eRealPrecision
, sal_uInt32 nRealSize
)
291 sal_Bool bCompatible
;
297 bCompatible
= sal_True
;
299 bCompatible
= sal_False
;
302 pPtr
= mpSource
+ mnParaSize
;
305 if ( nRealSize
== 4 )
306 ImplGetSwitch4( mpSource
+ mnParaSize
, &aBuf
[0] );
308 ImplGetSwitch8( mpSource
+ mnParaSize
, &aBuf
[0] );
311 if ( eRealPrecision
== RP_FLOAT
)
313 if ( nRealSize
== 4 )
315 memcpy( (void*)&fFloatBuf
, pPtr
, 4 );
316 nRetValue
= (double)fFloatBuf
;
320 memcpy( (void*)&fDoubleBuf
, pPtr
, 8 );
321 nRetValue
= fDoubleBuf
;
327 int nSwitch
= ( bCompatible
) ? 0 : 1 ;
328 if ( nRealSize
== 4 )
330 sal_uInt16
* pShort
= (sal_uInt16
*)pPtr
;
331 nVal
= pShort
[ nSwitch
];
333 nVal
|= pShort
[ nSwitch
^ 1 ];
334 nRetValue
= (double)nVal
;
339 long* pLong
= (long*)pPtr
;
340 nRetValue
= (double)abs( pLong
[ nSwitch
] );
342 nVal
= (sal_uInt32
)( pLong
[ nSwitch
^ 1 ] );
344 nRetValue
+= (double)nVal
;
345 if ( pLong
[ nSwitch
] < 0 )
347 nRetValue
-= nRetValue
;
352 mnParaSize
+= nRealSize
;
356 // ---------------------------------------------------------------
358 sal_uInt32
CGM::ImplGetPointSize()
360 if ( pElement
->eVDCType
== VDC_INTEGER
)
361 return pElement
->nVDCIntegerPrecision
<< 1;
363 return pElement
->nVDCRealSize
<< 1;
366 // ---------------------------------------------------------------
368 inline double CGM::ImplGetIX()
370 return ( ( ImplGetI( pElement
->nVDCIntegerPrecision
) + mnVDCXadd
) * mnVDCXmul
);
373 // ---------------------------------------------------------------
375 inline double CGM::ImplGetFX()
377 return ( ( ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
) + mnVDCXadd
) * mnVDCXmul
);
380 // ---------------------------------------------------------------
382 inline double CGM::ImplGetIY()
384 return ( ( ImplGetI( pElement
->nVDCIntegerPrecision
) + mnVDCYadd
) * mnVDCYmul
);
387 // ---------------------------------------------------------------
389 inline double CGM::ImplGetFY()
391 return ( ( ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
) + mnVDCYadd
) * mnVDCYmul
);
394 // ---------------------------------------------------------------
396 void CGM::ImplGetPoint( FloatPoint
& rFloatPoint
, sal_Bool bMap
)
398 if ( pElement
->eVDCType
== VDC_INTEGER
)
400 rFloatPoint
.X
= ImplGetIX();
401 rFloatPoint
.Y
= ImplGetIY();
403 else // ->floating points
405 rFloatPoint
.X
= ImplGetFX();
406 rFloatPoint
.Y
= ImplGetFY();
409 ImplMapPoint( rFloatPoint
);
412 // ---------------------------------------------------------------
414 void CGM::ImplGetRectangle( FloatRect
& rFloatRect
, sal_Bool bMap
)
416 if ( pElement
->eVDCType
== VDC_INTEGER
)
418 rFloatRect
.Left
= ImplGetIX();
419 rFloatRect
.Bottom
= ImplGetIY();
420 rFloatRect
.Right
= ImplGetIX();
421 rFloatRect
.Top
= ImplGetIY();
423 else // ->floating points
425 rFloatRect
.Left
= ImplGetFX();
426 rFloatRect
.Bottom
= ImplGetFY();
427 rFloatRect
.Right
= ImplGetFX();
428 rFloatRect
.Top
= ImplGetFY();
432 ImplMapX( rFloatRect
.Left
);
433 ImplMapX( rFloatRect
.Right
);
434 ImplMapY( rFloatRect
.Top
);
435 ImplMapY( rFloatRect
.Bottom
);
436 rFloatRect
.Justify();
440 // ---------------------------------------------------------------
442 void CGM::ImplGetRectangleNS( FloatRect
& rFloatRect
)
444 if ( pElement
->eVDCType
== VDC_INTEGER
)
446 rFloatRect
.Left
= ImplGetI( pElement
->nVDCIntegerPrecision
);
447 rFloatRect
.Bottom
= ImplGetI( pElement
->nVDCIntegerPrecision
);
448 rFloatRect
.Right
= ImplGetI( pElement
->nVDCIntegerPrecision
);
449 rFloatRect
.Top
= ImplGetI( pElement
->nVDCIntegerPrecision
);
451 else // ->floating points
453 rFloatRect
.Left
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
454 rFloatRect
.Bottom
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
455 rFloatRect
.Right
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
456 rFloatRect
.Top
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
460 // ---------------------------------------------------------------
462 sal_uInt32
CGM::ImplGetBitmapColor( sal_Bool bDirect
)
464 // the background color is always a direct color
467 if ( ( pElement
->eColorSelectionMode
== CSM_DIRECT
) || bDirect
)
469 sal_uInt32 nColor
= ImplGetByte( ImplGetUI( pElement
->nColorPrecision
), 1 );
470 sal_uInt32 nDiff
= pElement
->nColorValueExtent
[ 3 ] - pElement
->nColorValueExtent
[ 0 ] + 1;
474 nColor
= ( ( nColor
- pElement
->nColorValueExtent
[ 0 ] ) << 8 ) / nDiff
;
475 nTmp
= nColor
<< 16 & 0xff0000;
477 nColor
= ImplGetByte( ImplGetUI( pElement
->nColorPrecision
), 1 );
478 nDiff
= pElement
->nColorValueExtent
[ 4 ] - pElement
->nColorValueExtent
[ 1 ] + 1;
481 nColor
= ( ( nColor
- pElement
->nColorValueExtent
[ 1 ] ) << 8 ) / nDiff
;
482 nTmp
|= nColor
<< 8 & 0xff00;
484 nColor
= ImplGetByte( ImplGetUI( pElement
->nColorPrecision
), 1 );
485 nDiff
= pElement
->nColorValueExtent
[ 5 ] - pElement
->nColorValueExtent
[ 2 ] + 1;
488 nColor
= ( ( nColor
- pElement
->nColorValueExtent
[ 2 ] ) << 8 ) / nDiff
;
489 nTmp
|= (sal_uInt8
)nColor
;
493 sal_uInt32 nIndex
= ImplGetUI( pElement
->nColorIndexPrecision
);
494 nTmp
= pElement
->aColorTable
[ (sal_uInt8
)( nIndex
) ] ;
499 // ---------------------------------------------------------------
501 // call this function each time after the mapmode settings has been changed
502 void CGM::ImplSetMapMode()
505 mnVDCdx
= pElement
->aVDCExtent
.Right
- pElement
->aVDCExtent
.Left
;
507 mnVDCXadd
= -pElement
->aVDCExtent
.Left
;
516 mnVDCdy
= pElement
->aVDCExtent
.Bottom
- pElement
->aVDCExtent
.Top
;
517 mnVDCYadd
= -pElement
->aVDCExtent
.Top
;
526 mbAngReverse
= sal_True
;
528 mbAngReverse
= sal_False
;
530 double fQuo1
= mnVDCdx
/ mnVDCdy
;
531 double fQuo2
= mnOutdx
/ mnOutdy
;
534 mnXFraction
= mnOutdx
/ mnVDCdx
;
535 mnYFraction
= mnOutdy
* ( fQuo2
/ fQuo1
) / mnVDCdy
;
539 mnXFraction
= mnOutdx
* ( fQuo1
/ fQuo2
) / mnVDCdx
;
540 mnYFraction
= mnOutdy
/ mnVDCdy
;
544 // ---------------------------------------------------------------
546 void CGM::ImplMapDouble( double& nNumb
)
548 if ( pElement
->eDeviceViewPortMap
== DVPM_FORCED
)
550 // point is 1mm * ScalingFactor
551 switch ( pElement
->eDeviceViewPortMode
)
555 nNumb
*= ( mnXFraction
+ mnYFraction
) / 2;
561 // nNumb *= ( 100 * pElement->nDeviceViewPortScale );
562 nNumb
*= ( mnXFraction
+ mnYFraction
) / 2;
563 if ( pElement
->nDeviceViewPortScale
< 0 )
586 // ---------------------------------------------------------------
588 void CGM::ImplMapX( double& nNumb
)
590 if ( pElement
->eDeviceViewPortMap
== DVPM_FORCED
)
592 // point is 1mm * ScalingFactor
593 switch ( pElement
->eDeviceViewPortMode
)
597 nNumb
*= mnXFraction
;
603 // nNumb *= ( 100 * pElement->nDeviceViewPortScale );
604 nNumb
*= mnXFraction
;
605 if ( pElement
->nDeviceViewPortScale
< 0 )
629 // ---------------------------------------------------------------
631 void CGM::ImplMapY( double& nNumb
)
633 if ( pElement
->eDeviceViewPortMap
== DVPM_FORCED
)
635 // point is 1mm * ScalingFactor
636 switch ( pElement
->eDeviceViewPortMode
)
640 nNumb
*= mnYFraction
;
646 // nNumb *= ( 100 * pElement->nDeviceViewPortScale );
647 nNumb
*= mnYFraction
;
648 if ( pElement
->nDeviceViewPortScale
< 0 )
672 // ---------------------------------------------------------------
674 // convert a point to the current VC mapmode (1/100TH mm)
675 void CGM::ImplMapPoint( FloatPoint
& rFloatPoint
)
677 if ( pElement
->eDeviceViewPortMap
== DVPM_FORCED
)
679 // point is 1mm * ScalingFactor
680 switch ( pElement
->eDeviceViewPortMode
)
684 rFloatPoint
.X
*= mnXFraction
;
685 rFloatPoint
.Y
*= mnYFraction
;
691 rFloatPoint
.X
*= mnXFraction
;
692 rFloatPoint
.Y
*= mnYFraction
;
693 if ( pElement
->nDeviceViewPortScale
< 0 )
695 rFloatPoint
.X
= -rFloatPoint
.X
;
696 rFloatPoint
.Y
= -rFloatPoint
.Y
;
719 // ---------------------------------------------------------------
721 void CGM::ImplDoClass()
723 #ifdef CGM_USER_BREAKPOINT
725 if ( mnActCount
== CGM_BREAK_ACTION
)
729 switch ( mnElementClass
)
731 case 0 : ImplDoClass0(); break;
732 case 1 : ImplDoClass1(); break;
733 case 2 : ImplDoClass2(); break;
734 case 3 : ImplDoClass3(); break;
741 case 5 : ImplDoClass5(); break;
742 case 6 : ImplDoClass6(); break;
743 case 7 : ImplDoClass7(); break;
744 case 8 : ImplDoClass8(); break;
745 case 9 : ImplDoClass9(); break;
746 case 15 :ImplDoClass15(); break;
747 default : ComOut( CGM_UNKNOWN_COMMAND
, "" ); break;
752 // ---------------------------------------------------------------
754 void CGM::ImplDefaultReplacement()
756 sal_uInt8
* pBuf
= (sal_uInt8
*)maDefRepList
.First();
759 sal_uInt32 nElementSize
= (sal_uInt32
)(sal_uIntPtr
)maDefRepSizeList
.First();
760 sal_uInt32 nOldEscape
= mnEscape
;
761 sal_uInt32 nOldElementClass
= mnElementClass
;
762 sal_uInt32 nOldElementID
= mnElementID
;
763 sal_uInt32 nOldElementSize
= mnElementSize
;
764 sal_uInt8
* pOldBuf
= mpSource
;
767 sal_uInt32 nCount
= 0;
768 while ( mbStatus
&& ( nCount
< nElementSize
) )
770 mpSource
= pBuf
+ nCount
;
772 mnEscape
= ImplGetUI16();
773 mnElementClass
= mnEscape
>> 12;
774 mnElementID
= ( mnEscape
& 0x0fe0 ) >> 5;
775 mnElementSize
= mnEscape
& 0x1f;
776 if ( mnElementSize
== 31 )
778 mnElementSize
= ImplGetUI16();
780 nCount
+= mnParaSize
;
782 mpSource
= pBuf
+ nCount
;
783 if ( mnElementSize
& 1 )
785 nCount
+= mnElementSize
;
786 if ( ( mnElementClass
!= 1 ) || ( mnElementID
!= 0xc ) ) // rekursion hier nicht moeglich!!
789 nElementSize
= (sal_uInt32
)(sal_uIntPtr
)maDefRepSizeList
.Next();
790 pBuf
= (sal_uInt8
*)maDefRepList
.Next();
792 mnEscape
= nOldEscape
;
793 mnElementClass
= nOldElementClass
;
794 mnElementID
= nOldElementID
;
795 mnParaSize
= mnElementSize
= nOldElementSize
;
800 // ---------------------------------------------------------------
802 sal_Bool
CGM::Write( SvStream
& rIStm
)
805 mpBuf
= new sal_uInt8
[ 0xffff ];
809 rIStm
.Read( mpSource
, 2 );
810 mnEscape
= ImplGetUI16();
811 mnElementClass
= mnEscape
>> 12;
812 mnElementID
= ( mnEscape
& 0x0fe0 ) >> 5;
813 mnElementSize
= mnEscape
& 0x1f;
815 if ( mnElementSize
== 31 )
817 rIStm
.Read( mpSource
+ mnParaSize
, 2 );
818 mnElementSize
= ImplGetUI16();
822 rIStm
.Read( mpSource
+ mnParaSize
, mnElementSize
);
824 if ( mnElementSize
& 1 )
829 #ifdef CGM_USER_BREAKPOINT
831 if ( !mbStatus
|| mnParaSize
&& ( mnElementSize
!= mnParaSize
) )
839 // ---------------------------------------------------------------
841 SvStream
& operator>>( SvStream
& rOStm
, CGM
& /*rCGM*/ )
847 // ---------------------------------------------------------------
851 //================== GraphicImport - die exportierte Funktion ================
853 extern "C" sal_uInt32 __LOADONCALLAPI
ImportCGM( String
& rFileName
, uno::Reference
< frame::XModel
> & rXModel
, sal_uInt32 nMode
, void* pProgressBar
)
856 sal_uInt32 nStatus
= 0; // retvalue == 0 -> ERROR
857 // == 0xffrrggbb -> background color in the lower 24 bits
858 sal_Bool bProgressBar
= sal_False
;
866 pCGM
= new CGM( nMode
, rXModel
);
867 if ( pCGM
&& pCGM
->IsValid() )
869 if ( nMode
& CGM_IMPORT_CGM
)
871 SvStream
* pIn
= ::utl::UcbStreamHelper::CreateStream( rFileName
, STREAM_READ
);
874 pIn
->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN
);
875 pIn
->Seek( STREAM_SEEK_TO_END
);
876 sal_uInt32 nInSize
= pIn
->Tell();
879 #ifdef CGM_EXPORT_IMPRESS
880 uno::Reference
< task::XStatusIndicator
> aXStatInd
;
881 sal_uInt32 nNext
= 0;
882 sal_uInt32 nAdd
= nInSize
/ 20;
884 aXStatInd
= *(uno::Reference
< task::XStatusIndicator
> *)pProgressBar
;
885 bProgressBar
= aXStatInd
.is();
887 aXStatInd
->start( rtl::OUString::createFromAscii("CGM Import"), nInSize
);
890 while ( pCGM
->IsValid() && ( pIn
->Tell() < nInSize
) && !pCGM
->IsFinished() )
893 #ifdef CGM_EXPORT_IMPRESS
898 sal_uInt32 nCurrentPos
= pIn
->Tell();
899 if ( nCurrentPos
>= nNext
)
901 aXStatInd
->setValue( nCurrentPos
);
902 nNext
= nCurrentPos
+ nAdd
;
907 if ( pCGM
->Write( *pIn
) == sal_False
)
910 if ( pCGM
->IsValid() )
912 nStatus
= pCGM
->GetBackGroundColor() | 0xff000000;
914 #ifdef CGM_EXPORT_IMPRESS
923 catch( ::com::sun::star::uno::Exception
& )