diff options
Diffstat (limited to 'sd/source/filter/eppt/eppt.cxx')
-rwxr-xr-x | sd/source/filter/eppt/eppt.cxx | 196 |
1 files changed, 98 insertions, 98 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index c4c2aa3dbee6..292db06bb472 100755 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -92,31 +92,31 @@ using namespace com::sun::star; static PHLayout pPHLayout[] = { - { EPP_LAYOUT_TITLESLIDE, { 0x0d, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x10, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, TRUE, TRUE, TRUE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_BLANCSLIDE, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, FALSE, FALSE, FALSE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x14, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x15, 0x0d, 0x0e, TRUE, FALSE, FALSE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, FALSE, FALSE }, - { EPP_LAYOUT_RIGHTCOLUMN2ROWS, { 0x0d, 0x0e, 0x13, 0x13, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_2ROWSANDTITLE, { 0x0d, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_LEFTCOLUMN2ROWS, { 0x0d, 0x13, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_TOPROW2COLUMN, { 0x0d, 0x13, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_2ROWSANDTITLE, { 0x0d, 0x0e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_4OBJECTS, { 0x0d, 0x13, 0x13, 0x13, 0x13, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, TRUE, FALSE, FALSE }, - { EPP_LAYOUT_ONLYTITLE, { 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, TRUE, FALSE, FALSE }, - { EPP_LAYOUT_BLANCSLIDE, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, FALSE, FALSE, FALSE }, - { EPP_LAYOUT_TITLERIGHT2BODIESLEFT, { 0x11, 0x12, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x11, 0x12, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_TITLERIGHTBODYLEFT, { 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x11, 0x12, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x12, TRUE, TRUE, FALSE }, - { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x16, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x12, TRUE, TRUE, FALSE } + { EPP_LAYOUT_TITLESLIDE, { 0x0d, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x10, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, sal_True, sal_True, sal_True }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_BLANCSLIDE, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, sal_False, sal_False, sal_False }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x14, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x15, 0x0d, 0x0e, sal_True, sal_False, sal_False }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x0e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_False, sal_False }, + { EPP_LAYOUT_RIGHTCOLUMN2ROWS, { 0x0d, 0x0e, 0x13, 0x13, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_2ROWSANDTITLE, { 0x0d, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_LEFTCOLUMN2ROWS, { 0x0d, 0x13, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_TOPROW2COLUMN, { 0x0d, 0x13, 0x13, 0x0e, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_2ROWSANDTITLE, { 0x0d, 0x0e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_4OBJECTS, { 0x0d, 0x13, 0x13, 0x13, 0x13, 0x00, 0x00, 0x00 }, 0x13, 0x0d, 0x0e, sal_True, sal_False, sal_False }, + { EPP_LAYOUT_ONLYTITLE, { 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, sal_True, sal_False, sal_False }, + { EPP_LAYOUT_BLANCSLIDE, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x0e, sal_False, sal_False, sal_False }, + { EPP_LAYOUT_TITLERIGHT2BODIESLEFT, { 0x11, 0x12, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x14, 0x11, 0x12, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_TITLERIGHTBODYLEFT, { 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x11, 0x12, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_TITLEANDBODYSLIDE, { 0x0d, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x00, 0x0d, 0x12, sal_True, sal_True, sal_False }, + { EPP_LAYOUT_2COLUMNSANDTITLE, { 0x0d, 0x16, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0x16, 0x0d, 0x12, sal_True, sal_True, sal_False } }; //============================ PPTWriter ================================== @@ -134,7 +134,7 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage, meLatestPageType ( NORMAL ), mXModel ( rXModel ), mXStatusIndicator ( rXStatInd ), - mbStatusIndicator ( FALSE ), + mbStatusIndicator ( sal_False ), mpCurUserStrm ( NULL ), mpStrm ( NULL ), mpPicStrm ( NULL ), @@ -158,10 +158,10 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage, if ( !ImplGetPageByIndex( 0, NOTICE ) ) return; - INT32 nWidth = 21000; + sal_Int32 nWidth = 21000; if ( ImplGetPropertyValue( mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ) ) mAny >>= nWidth; - INT32 nHeight = 29700; + sal_Int32 nHeight = 29700; if ( ImplGetPropertyValue( mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) ) mAny >>= nHeight; @@ -186,7 +186,7 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage, if ( mXStatusIndicator.is() ) { - mbStatusIndicator = TRUE; + mbStatusIndicator = sal_True; mnStatMaxValue = ( mnPages + mnMasterPages ) * 5; mXStatusIndicator->start( String( RTL_CONSTASCII_USTRINGPARAM( "PowerPoint Export" ) ), mnStatMaxValue + ( mnStatMaxValue >> 3 ) ); @@ -254,7 +254,7 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage, if ( !ImplCreateDocumentSummaryInformation( nCnvrtFlags ) ) return; - mbStatus = TRUE; + mbStatus = sal_True; }; @@ -288,7 +288,7 @@ PPTWriter::~PPTWriter() // --------------------------------------------------------------------------------------------- -static inline sal_uInt32 PPTtoEMU( INT32 nPPT ) +static inline sal_uInt32 PPTtoEMU( sal_Int32 nPPT ) { return (sal_uInt32)( (double)nPPT * 1587.5 ); } @@ -299,7 +299,7 @@ sal_Bool PPTWriter::ImplCreateCurrentUserStream() { mpCurUserStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Current User" ) ) ); if ( !mpCurUserStrm ) - return FALSE; + return sal_False; char pUserName[] = "Current User"; sal_uInt32 nLenOfUserName = strlen( pUserName ); sal_uInt32 nSizeOfRecord = 0x14 + ( ( nLenOfUserName + 4 ) & ~ 3 ); @@ -322,7 +322,7 @@ sal_Bool PPTWriter::ImplCreateCurrentUserStream() *mpCurUserStrm << (sal_uInt8)0; // pad bytes }; mpCurUserStrm->Seek( nEditPos ); - return TRUE; + return sal_True; }; // --------------------------------------------------------------------------------------------- @@ -529,9 +529,9 @@ sal_Bool PPTWriter::ImplCreateDocument() mpPptEscherEx->AddAtom( 40, EPP_DocumentAtom, 1 ); *mpStrm << nWidth // Slide Size in Master coordinates X << nHeight // " " " " " Y - << (INT32)maNotesPageSize.Width // Notes Page Size X - << (INT32)maNotesPageSize.Height // " " " Y - << (INT32)1 << (INT32)2; // the scale used when the Powerpoint document is embedded. the default is 1:2 + << (sal_Int32)maNotesPageSize.Width // Notes Page Size X + << (sal_Int32)maNotesPageSize.Height // " " " Y + << (sal_Int32)1 << (sal_Int32)2; // the scale used when the Powerpoint document is embedded. the default is 1:2 mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTESMASTER_PERSIST_KEY, mpStrm->Tell() ); *mpStrm << (sal_uInt32)0 // Reference to NotesMaster ( 0 if none ); << (sal_uInt32)0 // Reference to HandoutMaster ( 0 if none ); @@ -565,12 +565,12 @@ sal_Bool PPTWriter::ImplCreateDocument() mpPptEscherEx->InsertPersistOffset( EPP_MAINSLIDE_PERSIST_KEY | i, mpStrm->Tell() ); *mpStrm << (sal_uInt32)0 // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY ) << (sal_uInt32)4 // flags - only bit 3 used, if set then slide contains shapes other than placeholders - << (INT32)0 // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects - << (INT32)i + 0x100 // slideId - Unique slide identifier, used for OLE link monikers for example + << (sal_Int32)0 // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects + << (sal_Int32)i + 0x100 // slideId - Unique slide identifier, used for OLE link monikers for example << (sal_uInt32)0; // reserved, usualy 0 if ( !ImplGetPageByIndex( i, NORMAL ) ) // sehr aufregend: noch einmal ueber alle seiten - return FALSE; + return sal_False; ImplSetCurrentStyleSheet( ImplGetMasterIndex( NORMAL ) ); ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > @@ -594,8 +594,8 @@ sal_Bool PPTWriter::ImplCreateDocument() mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTES_PERSIST_KEY | i, mpStrm->Tell() ); *mpStrm << (sal_uInt32)0 << (sal_uInt32)4 - << (INT32)0 - << (INT32)i + 0x100 + << (sal_Int32)0 + << (sal_Int32)i + 0x100 << (sal_uInt32)0; } mpPptEscherEx->CloseContainer(); // EPP_SlideListWithText @@ -615,7 +615,7 @@ sal_Bool PPTWriter::ImplCreateDocument() { ::rtl::OUString aCustomShow; sal_uInt32 nPenColor = 0x1000000; - INT32 nRestartTime = 0x7fffffff; + sal_Int32 nRestartTime = 0x7fffffff; sal_Int16 nStartSlide = 0; sal_Int16 nEndSlide = 0; sal_uInt32 nFlags = 0; // Bit 0: Auto advance @@ -750,8 +750,8 @@ sal_Bool PPTWriter::ImplCreateDocument() { mpPptEscherEx->BeginAtom(); - INT32 nSlideCount = aXIC->getCount(); - for ( INT32 j = 0; j < nSlideCount; j++ ) // Anzahl der Slides + sal_Int32 nSlideCount = aXIC->getCount(); + for ( sal_Int32 j = 0; j < nSlideCount; j++ ) // Anzahl der Slides { mAny = aXIC->getByIndex( j ); if ( mAny.getValue() ) @@ -796,7 +796,7 @@ sal_Bool PPTWriter::ImplCreateDocument() } mpPptEscherEx->AddAtom( 0, EPP_EndDocument ); mpPptEscherEx->CloseContainer(); // EPP_Document - return TRUE; + return sal_True; }; // --------------------------------------------------------------------------------------------- @@ -880,7 +880,7 @@ sal_Bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) rStrm << (sal_uInt32)( nCurrentOfs - ( nParaOfs + 4 ) ); rStrm << nParaCount; rStrm.Seek( nCurrentOfs ); - return TRUE; + return sal_True; } PHLayout& PPTWriter::ImplGetLayout( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const @@ -905,14 +905,14 @@ PHLayout& PPTWriter::ImplGetLayout( const ::com::sun::star::uno::Reference< ::c sal_Bool PPTWriter::ImplCreateMaster( sal_uInt32 nPageNum ) { if ( !ImplGetPageByIndex( nPageNum, MASTER ) ) - return FALSE; + return sal_False; ImplSetCurrentStyleSheet( nPageNum ); if ( !ImplGetPropertyValue( mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Background" ) ) ) ) // Backgroundshape laden - return FALSE; + return sal_False; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet; if ( !( mAny >>= aXBackgroundPropSet ) ) - return FALSE; + return sal_False; sal_uInt32 nFillColor = 0xffffff; sal_uInt32 nFillBackColor = 0x000000; @@ -949,7 +949,7 @@ sal_Bool PPTWriter::ImplCreateMaster( sal_uInt32 nPageNum ) mpPptEscherEx->PtReplaceOrInsert( EPP_Persist_MainMaster | nPageNum, mpStrm->Tell() ); mpPptEscherEx->OpenContainer( EPP_MainMaster ); mpPptEscherEx->AddAtom( 24, EPP_SlideAtom, 2 ); - *mpStrm << (INT32)EPP_LAYOUT_TITLEANDBODYSLIDE // slide layout -> title and body slide + *mpStrm << (sal_Int32)EPP_LAYOUT_TITLEANDBODYSLIDE // slide layout -> title and body slide << (sal_uInt8)1 << (sal_uInt8)2 << (sal_uInt8)0 << (sal_uInt8)0 << (sal_uInt8)0 << (sal_uInt8)0 << (sal_uInt8)0 << (sal_uInt8)0 // placeholderID << (sal_uInt32)0 // master ID ( ist gleich null bei einer masterpage ) << (sal_uInt32)0 // notes ID ( ist gleich null wenn keine notizen vorhanden ) @@ -984,8 +984,8 @@ sal_Bool PPTWriter::ImplCreateMaster( sal_uInt32 nPageNum ) mpPptEscherEx->BeginAtom(); - sal_Bool bFirst = TRUE; - sal_Bool bSimpleText = FALSE; + sal_Bool bFirst = sal_True; + sal_Bool bSimpleText = sal_False; *mpStrm << (sal_uInt16)5; // paragraph count @@ -993,13 +993,13 @@ sal_Bool PPTWriter::ImplCreateMaster( sal_uInt32 nPageNum ) { if ( nInstance >= EPP_TEXTTYPE_CenterBody ) { - bFirst = FALSE; - bSimpleText = TRUE; + bFirst = sal_False; + bSimpleText = sal_True; *mpStrm << nLev; } mpStyleSheet->mpParaSheet[ nInstance ]->Write( *mpStrm, mpPptEscherEx, nLev, bFirst, bSimpleText, mXPagePropSet ); mpStyleSheet->mpCharSheet[ nInstance ]->Write( *mpStrm, mpPptEscherEx, nLev, bFirst, bSimpleText, mXPagePropSet ); - bFirst = FALSE; + bFirst = sal_False; } mpPptEscherEx->EndAtom( EPP_TxMasterStyleAtom, 0, nInstance ); } @@ -1011,7 +1011,7 @@ sal_Bool PPTWriter::ImplCreateMaster( sal_uInt32 nPageNum ) mpPptEscherEx->OpenContainer( ESCHER_DgContainer ); mpPptEscherEx->EnterGroup(0,0); - ImplWritePage( pPHLayout[ 0 ], aSolverContainer, MASTER, TRUE ); // Die Shapes der Seite werden im PPT Dok. erzeugt + ImplWritePage( pPHLayout[ 0 ], aSolverContainer, MASTER, sal_True ); // Die Shapes der Seite werden im PPT Dok. erzeugt mpPptEscherEx->LeaveGroup(); ImplWriteBackground( aXBackgroundPropSet ); @@ -1028,7 +1028,7 @@ sal_Bool PPTWriter::ImplCreateMaster( sal_uInt32 nPageNum ) ImplProgTagContainer( mpStrm, &aBuExMasterStream ); } mpPptEscherEx->CloseContainer(); // EPP_MainMaster - return TRUE; + return sal_True; }; // --------------------------------------------------------------------------------------------- @@ -1036,30 +1036,30 @@ sal_Bool PPTWriter::ImplCreateMaster( sal_uInt32 nPageNum ) sal_Bool PPTWriter::ImplCreateMainNotes() { if ( !ImplGetPageByIndex( 0, NOTICE ) ) - return FALSE; + return sal_False; ImplSetCurrentStyleSheet( 0 ); ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XMasterPageTarget > aXMasterPageTarget( mXDrawPage, ::com::sun::star::uno::UNO_QUERY ); if ( !aXMasterPageTarget.is() ) - return FALSE; + return sal_False; mXDrawPage = aXMasterPageTarget->getMasterPage(); if ( !mXDrawPage.is() ) - return FALSE; + return sal_False; mXPropSet = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > ( mXDrawPage, ::com::sun::star::uno::UNO_QUERY ); if ( !mXPropSet.is() ) - return FALSE; + return sal_False; mXShapes = ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > ( mXDrawPage, ::com::sun::star::uno::UNO_QUERY ); if ( !mXShapes.is() ) - return FALSE; + return sal_False; EscherSolverContainer aSolverContainer; @@ -1072,7 +1072,7 @@ sal_Bool PPTWriter::ImplCreateMainNotes() mpPptEscherEx->OpenContainer( ESCHER_DgContainer ); mpPptEscherEx->EnterGroup(0,0); - ImplWritePage( pPHLayout[ 20 ], aSolverContainer, NOTICE, TRUE ); + ImplWritePage( pPHLayout[ 20 ], aSolverContainer, NOTICE, sal_True ); mpPptEscherEx->LeaveGroup(); mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); @@ -1096,7 +1096,7 @@ sal_Bool PPTWriter::ImplCreateMainNotes() mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 1 ); *mpStrm << (sal_uInt32)0xffffff << (sal_uInt32)0x000000 << (sal_uInt32)0x808080 << (sal_uInt32)0x000000 << (sal_uInt32)0x99cc00 << (sal_uInt32)0xcc3333 << (sal_uInt32)0xffcccc << (sal_uInt32)0xb2b2b2; mpPptEscherEx->CloseContainer(); // EPP_Notes - return TRUE; + return sal_True; } // --------------------------------------------------------------------------------------------- @@ -1193,7 +1193,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) ::com::sun::star::uno::Any aAny; if ( !ImplGetPageByIndex( nPageNum, NORMAL ) ) - return FALSE; + return sal_False; sal_uInt32 nMasterID = ImplGetMasterIndex( NORMAL ); ImplSetCurrentStyleSheet( nMasterID ); nMasterID |= 0x80000000; @@ -1247,7 +1247,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) aAny >>= bVisible; if ( GetPropertyValue( aAny, mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Change" ) ) ) ) { - switch ( *(INT32*)aAny.getValue() ) + switch ( *(sal_Int32*)aAny.getValue() ) { case 1 : // automatisch mnDiaMode++; @@ -1281,7 +1281,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) aAny >>= bLoopSound; - sal_Bool bNeedsSSSlideInfoAtom = ( bVisible == FALSE ) + sal_Bool bNeedsSSSlideInfoAtom = ( bVisible == sal_False ) || ( mnDiaMode == 2 ) || ( bIsSound ) || ( bStopSound ) @@ -1291,7 +1291,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) sal_uInt8 nDirection = 0; sal_uInt8 nTransitionType = 0; sal_uInt16 nBuildFlags = 1; // advange by mouseclick - INT32 nSlideTime = 0; // muss noch !!! + sal_Int32 nSlideTime = 0; // muss noch !!! sal_uInt8 nSpeed = 1; if ( GetPropertyValue( aAny, mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Speed" ) ) ) ) @@ -1493,7 +1493,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) } if ( mnDiaMode == 2 ) // automatic ? nBuildFlags |= 0x400; - if ( bVisible == FALSE ) + if ( bVisible == sal_False ) nBuildFlags |= 4; if ( bIsSound ) nBuildFlags |= 16; @@ -1503,7 +1503,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) nBuildFlags |= 256; if ( GetPropertyValue( aAny, mXPagePropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Duration" ) ) ) )// duration of this slide - nSlideTime = *(INT32*)aAny.getValue() << 10; // in ticks + nSlideTime = *(sal_Int32*)aAny.getValue() << 10; // in ticks mpPptEscherEx->AddAtom( 16, EPP_SSSlideInfoAtom ); @@ -1522,7 +1522,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) mpPptEscherEx->OpenContainer( EPP_PPDrawing ); mpPptEscherEx->OpenContainer( ESCHER_DgContainer ); mpPptEscherEx->EnterGroup(0,0); - ImplWritePage( rLayout, aSolverContainer, NORMAL, FALSE, nPageNum ); // Die Shapes der Seite werden im PPT Dok. erzeugt + ImplWritePage( rLayout, aSolverContainer, NORMAL, sal_False, nPageNum ); // Die Shapes der Seite werden im PPT Dok. erzeugt mpPptEscherEx->LeaveGroup(); if ( bHasBackground ) @@ -1632,7 +1632,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) } */ mpPptEscherEx->CloseContainer(); // EPP_Slide - return TRUE; + return sal_True; }; // --------------------------------------------------------------------------------------------- @@ -1640,7 +1640,7 @@ sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) sal_Bool PPTWriter::ImplCreateNotes( sal_uInt32 nPageNum ) { if ( !ImplGetPageByIndex( nPageNum, NOTICE ) ) - return FALSE; + return sal_False; ImplSetCurrentStyleSheet( ImplGetMasterIndex( NORMAL ) ); @@ -1659,7 +1659,7 @@ sal_Bool PPTWriter::ImplCreateNotes( sal_uInt32 nPageNum ) mpPptEscherEx->OpenContainer( ESCHER_DgContainer ); mpPptEscherEx->EnterGroup(0,0); - ImplWritePage( pPHLayout[ 20 ], aSolverContainer, NOTICE, FALSE ); // Die Shapes der Seite werden im PPT Dok. erzeugt + ImplWritePage( pPHLayout[ 20 ], aSolverContainer, NOTICE, sal_False ); // Die Shapes der Seite werden im PPT Dok. erzeugt mpPptEscherEx->LeaveGroup(); mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); @@ -1683,7 +1683,7 @@ sal_Bool PPTWriter::ImplCreateNotes( sal_uInt32 nPageNum ) mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 1 ); *mpStrm << (sal_uInt32)0xffffff << (sal_uInt32)0x000000 << (sal_uInt32)0x808080 << (sal_uInt32)0x000000 << (sal_uInt32)0x99cc00 << (sal_uInt32)0xcc3333 << (sal_uInt32)0xffcccc << (sal_uInt32)0xb2b2b2; mpPptEscherEx->CloseContainer(); // EPP_Notes - return TRUE; + return sal_True; }; void PPTWriter::ImplWriteBackground( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet ) @@ -1788,13 +1788,13 @@ void PPTWriter::ImplWriteOLE( sal_uInt32 nCnvrtFlags ) ::uno::Reference < embed::XEmbeddedObject > xObj( ( (SdrOle2Obj*) pSdrObj )->GetObjRef() ); if( xObj.is() ) { - SvStorageRef xTempStorage( new SvStorage( new SvMemoryStream(), TRUE ) ); + SvStorageRef xTempStorage( new SvStorage( new SvMemoryStream(), sal_True ) ); aOleExport.ExportOLEObject( xObj, *xTempStorage ); //TODO/MBA: testing String aPersistStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( SVEXT_PERSIST_STREAM ) ) ); SvMemoryStream aStream; - SvStorageRef xCleanStorage( new SvStorage( FALSE, aStream ) ); + SvStorageRef xCleanStorage( new SvStorage( sal_False, aStream ) ); xTempStorage->CopyTo( xCleanStorage ); // SJ: #99809# create a dummy content stream, the dummy content is necessary for ppt, but not for // doc files, so we can't share code. @@ -1820,7 +1820,7 @@ void PPTWriter::ImplWriteOLE( sal_uInt32 nCnvrtFlags ) { String aName; ::com::sun::star::awt::Size aSize; - SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) ); + SvStorageRef xDest( new SvStorage( new SvMemoryStream(), sal_True ) ); sal_Bool bOk = SvxMSConvertOCXControls::WriteOCXStream( xDest, pPtr->xControlModel, aSize, aName ); if ( bOk ) pStrm = xDest->CreateMemoryStream(); @@ -1954,7 +1954,7 @@ sal_Bool PPTWriter::ImplWriteAtomEnding() *mpCurUserStrm << (sal_uInt32)nPos; // offset to current edit setzen mpPptEscherEx->AddAtom( 28, EPP_UserEditAtom ); - *mpStrm << (INT32)0x100 // last slide ID + *mpStrm << (sal_Int32)0x100 // last slide ID << (sal_uInt32)0x03000dbc // minor and major app version that did the save << (sal_uInt32)0 // offset last save, 0 after a full save << nPersistOfs // File offset to persist pointers for this save operation @@ -1963,7 +1963,7 @@ sal_Bool PPTWriter::ImplWriteAtomEnding() << (sal_Int16)EPP_LastViewTypeSlideView // last view type << (sal_Int16)0x12; // padword - return TRUE; + return sal_True; } // --------------------------------------------------------------------------------------------- @@ -2077,7 +2077,7 @@ PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBull rBuProv ( rProv ), mnInstance ( nInstance ) { - sal_Bool bHasBullet = FALSE; + sal_Bool bHasBullet = sal_False; sal_uInt16 nUpperDist = 0; sal_uInt16 nBulletChar = 0x2022; @@ -2097,7 +2097,7 @@ PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBull case EPP_TEXTTYPE_HalfBody : case EPP_TEXTTYPE_QuarterBody : { - bHasBullet = TRUE; + bHasBullet = sal_True; nUpperDist = 0x14; } break; @@ -2163,7 +2163,7 @@ PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBull rLev.mnAsianSettings = 2; rLev.mnBiDi = 0; - rLev.mbExtendedBulletsUsed = FALSE; + rLev.mbExtendedBulletsUsed = sal_False; rLev.mnBulletId = 0xffff; rLev.mnBulletStart = 0; rLev.mnMappedNumType = 0; @@ -2242,7 +2242,7 @@ void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::co { PPTExParaLevel& rLevel = maParaLevel[ i ]; if ( i ) - aParagraphObj.ImplGetNumberingLevel( rBuProv, i, FALSE ); + aParagraphObj.ImplGetNumberingLevel( rBuProv, i, sal_False ); // rLevel.mbIsBullet = ( ( aParagraphObj.nBulletFlags & 1 ) != 0 ); rLevel.mnTextOfs = aParagraphObj.nTextOfs; rLevel.mnBulletOfs = (sal_uInt16)aParagraphObj.nBulletOfs; @@ -2375,7 +2375,7 @@ sal_Bool PPTExStyleSheet::IsHardAttribute( sal_uInt32 nInstance, sal_uInt32 nLev switch ( eAttr ) { - case ParaAttr_BulletOn : return ( rPara.mbIsBullet ) ? ( nValue ) ? FALSE : TRUE : ( nValue ) ? TRUE : FALSE; + case ParaAttr_BulletOn : return ( rPara.mbIsBullet ) ? ( nValue ) ? sal_False : sal_True : ( nValue ) ? sal_True : sal_False; case ParaAttr_BuHardFont : case ParaAttr_BulletFont : return ( rPara.mnBulletFont != nValue ); case ParaAttr_BuHardColor : @@ -2399,7 +2399,7 @@ sal_Bool PPTExStyleSheet::IsHardAttribute( sal_uInt32 nInstance, sal_uInt32 nLev case CharAttr_Embossed : nFlag = 512; break; case CharAttr_Font : return ( rChar.mnFont != nValue ); case CharAttr_AsianOrComplexFont : return ( rChar.mnAsianOrComplexFont != nValue ); - case CharAttr_Symbol : return TRUE; + case CharAttr_Symbol : return sal_True; case CharAttr_FontHeight : return ( rChar.mnFontHeight != nValue ); case CharAttr_FontColor : return ( rChar.mnFontColor != nValue ); case CharAttr_Escapement : return ( rChar.mnEscapement != nValue ); @@ -2413,7 +2413,7 @@ sal_Bool PPTExStyleSheet::IsHardAttribute( sal_uInt32 nInstance, sal_uInt32 nLev else return ( ( nValue & nFlag ) != 0 ); } - return TRUE; + return sal_True; } sal_uInt32 PPTExStyleSheet::SizeOfTxCFStyleAtom() const @@ -2452,29 +2452,29 @@ void PPTExStyleSheet::WriteTxCFStyleAtom( SvStream& rSt ) // - exported function - // --------------------- -extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI ExportPPT( SvStorageRef& rSvStorage, +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI ExportPPT( SvStorageRef& rSvStorage, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rXModel, ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rXStatInd, SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ) { PPTWriter* pPPTWriter; - BOOL bStatus = FALSE; + sal_Bool bStatus = sal_False; pPPTWriter = new PPTWriter( rSvStorage, rXModel, rXStatInd, pVBA, nCnvrtFlags ); if ( pPPTWriter ) { - bStatus = ( pPPTWriter->IsValid() == TRUE ); + bStatus = ( pPPTWriter->IsValid() == sal_True ); delete pPPTWriter; } return bStatus; } -extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ) +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ) { - SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) ); - SvxImportMSVBasic aMSVBas( rDocShell, *xDest, FALSE, FALSE ); - aMSVBas.SaveOrDelMSVBAStorage( TRUE, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); + SvStorageRef xDest( new SvStorage( new SvMemoryStream(), sal_True ) ); + SvxImportMSVBasic aMSVBas( rDocShell, *xDest, sal_False, sal_False ); + aMSVBas.SaveOrDelMSVBAStorage( sal_True, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); SvStorageRef xOverhead = xDest->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) ) @@ -2485,7 +2485,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rD SvStorageStreamRef xTemp = xOverhead2->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead2") ) ); if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) ) { - UINT32 nLen = xTemp->GetSize(); + sal_uInt32 nLen = xTemp->GetSize(); if ( nLen ) { char* pTemp = new char[ nLen ]; @@ -2494,14 +2494,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rD xTemp->Seek( STREAM_SEEK_TO_BEGIN ); xTemp->Read( pTemp, nLen ); pBas = new SvMemoryStream( pTemp, nLen, STREAM_READ ); - pBas->ObjectOwnsMemory( TRUE ); - return TRUE; + pBas->ObjectOwnsMemory( sal_True ); + return sal_True; } } } } } - return FALSE; + return sal_False; } |