diff options
Diffstat (limited to 'sd/source/filter')
24 files changed, 317 insertions, 609 deletions
diff --git a/sd/source/filter/cgm/makefile.mk b/sd/source/filter/cgm/makefile.mk index 65ac2c48557d..510a727c51d3 100644 --- a/sd/source/filter/cgm/makefile.mk +++ b/sd/source/filter/cgm/makefile.mk @@ -36,7 +36,9 @@ TARGET=cgm # --- Files -------------------------------------------------------- -SLOFILES = $(SLO)$/sdcgmfilter.obj +SLOFILES = $(EXCEPTIONSFILES) + +EXCEPTIONSFILES = $(SLO)$/sdcgmfilter.obj # --- Targets -------------------------------------------------------------- diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx index dc03cd6b3829..884d5524bbee 100644 --- a/sd/source/filter/cgm/sdcgmfilter.cxx +++ b/sd/source/filter/cgm/sdcgmfilter.cxx @@ -95,7 +95,7 @@ sal_Bool SdCGMFilter::Import() if( pLibrary && mxModel.is() ) { - ImportCGM FncImportCGM = reinterpret_cast< ImportCGM >( pLibrary->getFunctionSymbol( ::rtl::OUString::createFromAscii( "ImportCGM" ) ) ); + ImportCGM FncImportCGM = reinterpret_cast< ImportCGM >( pLibrary->getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ImportCGM" ) ) ) ); ::rtl::OUString aFileURL( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); UINT32 nRetValue; @@ -139,16 +139,12 @@ sal_Bool SdCGMFilter::Export() if( pLibrary && mxModel.is() ) { - ExportCGM FncCGMExport = reinterpret_cast< ExportCGM >( pLibrary->getFunctionSymbol( ::rtl::OUString::createFromAscii( "ExportCGM" ) ) ); + ExportCGM FncCGMExport = reinterpret_cast< ExportCGM >( pLibrary->getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ExportCGM" ) ) ) ); if( FncCGMExport ) { ::rtl::OUString aPhysicalName( mrMedium.GetPhysicalName() ); - /* !!! - if ( pViewShell && pViewShell->GetView() ) - pViewShell->GetView()->SdrEndTextEdit(); - */ CreateStatusIndicator(); bRet = FncCGMExport( aPhysicalName, mxModel, mxStatusIndicator, NULL ); } diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index abbfadd9ee63..97ef46008ece 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -347,46 +347,6 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ mpStrm->Write( aBinaryTagData10Atom.GetData(), aBinaryTagData10Atom.Tell() ); } } -/* - if ( mbUseNewAnimations ) - { - SvMemoryStream amsofbtAnimGroup; - ppt::AnimationExporter aExporter( aSolverContainer, maSoundCollection ); - aExporter.doexport( mXDrawPage, amsofbtAnimGroup ); - sal_uInt32 nmsofbtAnimGroupSize = amsofbtAnimGroup.Tell(); - if ( nmsofbtAnimGroupSize ) - { - EscherExContainer aProgTags ( *mpStrm, EPP_ProgTags ); - EscherExContainer aProgBinaryTag( *mpStrm, EPP_ProgBinaryTag ); - { - EscherExAtom aCString( *mpStrm, EPP_CString ); - *mpStrm << (sal_uInt32)0x5f005f - << (sal_uInt32)0x50005f - << (sal_uInt32)0x540050 - << (sal_uInt16)0x31 - << (sal_uInt16)0x30; - } - { - EscherExAtom aBinaryTagData( *mpStrm, EPP_BinaryTagData ); - { - { - EscherExAtom aMagic2( *mpStrm, 0x2eeb ); - *mpStrm << (sal_uInt32)0x01c45df9 - << (sal_uInt32)0xe1471b30; - } - { - EscherExAtom aMagic( *mpStrm, 0x2b00 ); - *mpStrm << (sal_uInt32)0; - } - } - mpStrm->Write( amsofbtAnimGroup.GetData(), amsofbtAnimGroup.Tell() ); - { - EscherExContainer aMagic2( *mpStrm, 0x2b02 ); - } - } - } - } -*/ mpPptEscherEx->CloseContainer(); // EPP_Slide } @@ -897,12 +857,6 @@ sal_Bool PPTWriter::ImplCreateDocument() } } -// if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "DiaName" ) ) ) ) -// { -// } -// if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsAlwaysOnTop" ) ) ) ) -// { -// } if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsAutomatic" ) ) ) ) { sal_Bool bBool = sal_False; @@ -925,18 +879,7 @@ sal_Bool PPTWriter::ImplCreateDocument() if ( !bBool ) nFlags |= 0x11; } -// if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsMouseVisible" ) ) ) ) -// { -// } -// if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ) ) ) -// { -// } -// if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "StartWithNavigator" ) ) ) ) -// { -// } -// if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "UsePen" ) ) ) ) -// { -// } + mpPptEscherEx->AddAtom( 80, EPP_SSDocInfoAtom, 1 ); *mpStrm << nPenColor << nRestartTime << nStartSlide << nEndSlide; @@ -1044,8 +987,7 @@ sal_Bool PPTWriter::ImplCreateDocument() sal_Bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) { sal_uInt32 nCurrentOfs, nParaOfs, nParaCount = 0; -// SfxOlePropertySection does this... -// rStrm << (sal_uInt32)0x41; // property type VT_BLOB + nParaOfs = rStrm.Tell(); rStrm << (sal_uInt32)0; // property size rStrm << (sal_uInt32)0; // property count diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index b0576eeeee6c..b24aab18115e 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -86,7 +86,7 @@ struct PHLayout BOOL bSecOutlinerPossible; }; -enum PageType { NORMAL = 0, MASTER = 1, NOTICE = 2, UNDEFINED = 3 }; +enum PageType { NORMAL = 0, MASTER = 1, NOTICE = 2, UNDEFINED = 3, LAYOUT = 4 }; class PropValue { @@ -404,6 +404,7 @@ public: PHLayout& GetLayout( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const; PHLayout& GetLayout( sal_Int32 nOffset ) const; sal_Int32 GetLayoutOffset( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const; + sal_Int32 GetLayoutOffsetFixed( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const; sal_Bool CreateSlide( sal_uInt32 nPageNum ); sal_Bool CreateSlideMaster( sal_uInt32 nPageNum ); diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 75f9f1c88330..fd93a3ee905a 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -90,6 +90,7 @@ public: static const char* GetSideDirection( sal_uInt8 nDirection ); static const char* GetCornerDirection( sal_uInt8 nDirection ); static const char* Get8Direction( sal_uInt8 nDirection ); + static int GetPPTXLayoutId( int nOffset ); protected: @@ -98,6 +99,7 @@ protected: virtual void ImplWriteNotes( sal_uInt32 nPageNum ); virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet ); virtual void ImplWriteLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum ); + void ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum ); void WriteTheme( sal_Int32 nThemeNum ); virtual sal_Bool ImplCreateDocument(); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 55f143ee9849..d04a8c0bfbf9 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1121,33 +1121,6 @@ void PPTWriter::ImplAdjustFirstLineLineSpacing( TextObj& rTextObj, EscherPropert if ( ( nLineSpacing > 0 ) && ( nLineSpacing < 100 ) ) { - /* - if ( rxText.is() ) - { - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape( rxText, ::com::sun::star::uno::UNO_QUERY ); - if ( xShape.is() ) - { - SdrObject* pObj = GetSdrObjectFromXShape( mXShape ); - if ( pObj ) - { - const OutlinerParaObject* pParaObj = pObj->GetOutlinerParaObject(); - if ( pParaObj ) - { - SdrModel* pModel = pObj->GetModel(); - if ( pModel ) - { - Outliner aOutliner( &pModel->GetItemPool(), pParaObj->GetOutlinerMode() ); - aOutliner.SetText( *pParaObj ); - ULONG nTextHeight = aOutliner.GetLineHeight( 0, 0 ); - if ( nTextHeight ) - { - } - } - } - } - } - } - */ double fCharHeight = pPortion->mnCharHeight; fCharHeight *= 2540 / 72; fCharHeight *= 100 - nLineSpacing; @@ -1229,9 +1202,18 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u String aPageUrl; String aEmpty; String aFile( pFieldEntry->aFieldUrl ); + String aTarget( pFieldEntry->aFieldUrl ); INetURLObject aUrl( pFieldEntry->aFieldUrl ); if ( INET_PROT_FILE == aUrl.GetProtocol() ) aFile = aUrl.PathToFileName(); + else if ( INET_PROT_SMB == aUrl.GetProtocol() ) + { + // #n382718# (and #n261623#) Convert smb notation to '\\' + aFile = aUrl.GetMainURL( INetURLObject::NO_DECODE ); + aFile = String( aFile.GetBuffer() + 4 ); // skip the 'smb:' part + aFile.SearchAndReplaceAll( '/', '\\' ); + aTarget = aFile; + } else if ( pFieldEntry->aFieldUrl.GetChar( 0 ) == '#' ) { String aPage( INetURLObject::decode( pFieldEntry->aFieldUrl, '%', INetURLObject::DECODE_WITH_CHARSET ) ); @@ -1252,7 +1234,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u if ( aPageUrl.Len() ) nHyperId = ImplInsertBookmarkURL( aPageUrl, 1 | ( nPageIndex << 8 ) | ( 1 << 31 ), pFieldEntry->aRepresentation, aEmpty, aEmpty, aPageUrl ); else - nHyperId = ImplInsertBookmarkURL( pFieldEntry->aFieldUrl, 2 | ( nHyperId << 8 ), aFile, pFieldEntry->aFieldUrl, aEmpty, aEmpty ); + nHyperId = ImplInsertBookmarkURL( pFieldEntry->aFieldUrl, 2 | ( nHyperId << 8 ), aFile, aTarget, aEmpty, aEmpty ); rOut << (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) << (sal_uInt32)24 << (sal_uInt32)( EPP_InteractiveInfoAtom << 16 ) << (sal_uInt32)16 @@ -1436,7 +1418,6 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u nNumberingType = pBulletPara->nMappedNumType; break; - // case SVX_NUM_PAGEDESC : case SVX_NUM_BITMAP : nNumberingType = 0; break; @@ -2201,14 +2182,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag << (sal_uInt8)0 // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) << (sal_uInt16)0; // padword mpPptEscherEx->CloseContainer(); // ESCHER_ClientData -/* - if ( aExtBu.Tell() ) - { - if ( !pClientData ) - pClientData = new SvMemoryStream( 0x200, 0x200 ); - ImplProgTagContainer( pClientData, &aExtBu ); - } -*/ + if ( aClientTextBox.Tell() ) { *mpStrm << (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) @@ -2878,8 +2852,6 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a aPropertyOptions.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 ); aPropertyOptions.AddOpt( ESCHER_Prop_lTxid, mnTxId += 0x60 ); aPropertyOptions.AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle ); -// aPropertyOptions.AddOpt( ESCHER_Prop_fillColor, nFillColor ); -// aPropertyOptions.AddOpt( ESCHER_Prop_fillBackColor, nFillBackColor ); aPropertyOptions.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110001 ); aPropertyOptions.AddOpt( ESCHER_Prop_lineColor, 0x8000001 ); aPropertyOptions.AddOpt( ESCHER_Prop_shadowColor, 0x8000002 ); @@ -2971,8 +2943,6 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a EscherPropertyContainer aPropOpt2; aPropOpt2.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 ); aPropOpt2.AddOpt( ESCHER_Prop_lTxid, mnTxId += 0x60 ); -// aPropOpt2.AddOpt( ESCHER_Prop_fillColor, nFillColor ); -// aPropOpt2.AddOpt( ESCHER_Prop_fillBackColor, nFillBackColor ); aPropOpt2.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110001 ); aPropOpt2.AddOpt( ESCHER_Prop_lineColor, 0x8000001 ); aPropOpt2.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90001 ); @@ -3119,10 +3089,6 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a << (sal_uInt32)0 << (sal_uInt32)0x0012b600; -// PPTWriter::WriteCString( *mpExEmbed, "Photo Editor Photo", 1 ); -// PPTWriter::WriteCString( *mpExEmbed, "MSPhotoEd.3", 2 ); -// PPTWriter::WriteCString( *mpExEmbed, "Microsoft Photo Editor 3.0 Photo", 3 ); - nSize = mpExEmbed->Tell() - nOldPos; mpExEmbed->Seek( nOldPos - 4 ); *mpExEmbed << nSize; diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 23381d6ae002..1f2658bb94ec 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -584,14 +584,6 @@ void AnimationExporter::exportNode( SvStream& rStrm, Reference< XAnimationNode > exportAnimPropertySet( rStrm, xNode ); exportAnimEvent( rStrm, xNode, 0 ); exportAnimValue( rStrm, xNode, sal_False ); - - /* - EscherExContainer aContainer( rStrm, DFF_msofbtAnimGroup, 1 ); - exportAnimNode( rStrm, xNode, pParent, nGroupLevel + 1, nFillDefault ); - exportAnimPropertySet( rStrm, xNode ); - exportAnimEvent( rStrm, xNode, 0 ); - exportAnimValue( rStrm, xNode, sal_False ); - */ } break; @@ -823,14 +815,12 @@ void AnimationExporter::exportAnimNode( SvStream& rStrm, const Reference< XAnima case AnimationRestart::NEVER : aAnim.mnRestart = 3; break; } - // attribute Fill -// aAnim.mnFill = GetFillMode( xNode, pParent ); switch( nFillDefault ) { default: case AnimationFill::DEFAULT : aAnim.mnFill = 0; break; case AnimationFill::REMOVE : aAnim.mnFill = 1; break; - case AnimationFill::FREEZE : // aAnim.mnFill = 2; break; + case AnimationFill::FREEZE : case AnimationFill::HOLD : aAnim.mnFill = 3; break; case AnimationFill::TRANSITION : aAnim.mnFill = 4; break; } @@ -864,13 +854,6 @@ void AnimationExporter::exportAnimNode( SvStream& rStrm, const Reference< XAnima { case ::com::sun::star::presentation::EffectNodeType::TIMING_ROOT : aAnim.mnNodeType = 0x12; break; case ::com::sun::star::presentation::EffectNodeType::MAIN_SEQUENCE : aAnim.mnNodeType = 0x18; break; - /* - case ::com::sun::star::presentation::EffectNodeType::ON_CLICK : - case ::com::sun::star::presentation::EffectNodeType::WITH_PREVIOUS : - case ::com::sun::star::presentation::EffectNodeType::AFTER_PREVIOUS : - case ::com::sun::star::presentation::EffectNodeType::INTERACTIVE_SEQUENCE : - default: - */ } } break; @@ -981,7 +964,6 @@ sal_Int16 AnimationExporter::exportAnimPropertySet( SvStream& rStrm, const Refer Reference< XAnimationNode > xMaster; - //const Any aTrue( makeAny( (sal_Bool)sal_True ) ); Any aMasterRel, aOverride, aRunTimeContext; // storing user data into pAny, to allow direct access later @@ -1108,8 +1090,6 @@ sal_Int16 AnimationExporter::exportAnimPropertySet( SvStream& rStrm, const Refer Reference< XAnimateColor > xColor( xNode, UNO_QUERY ); if( xColor.is() ) { -// sal_uInt32 nColorSpace = xColor->getColorSpace() == AnimationColorSpace::RGB ? 0 : 1; -// exportAnimPropertyuInt32( rStrm, DFF_ANIM_COLORSPACE, nColorSpace, TRANSLATE_NONE ); sal_Bool bDirection = !xColor->getDirection(); exportAnimPropertyuInt32( rStrm, DFF_ANIM_DIRECTION, bDirection, TRANSLATE_NONE ); @@ -1323,7 +1303,6 @@ void AnimationExporter::exportAnimEvent( SvStream& rStrm, const Reference< XAnim Reference< XEnumeration > xE( xEA->createEnumeration(), UNO_QUERY_THROW ); if ( xE.is() && xE->hasMoreElements() ) { -// while( xE->hasMoreElements() ) { Reference< XAnimationNode > xClickNode( xE->nextElement(), UNO_QUERY ); aAny = xClickNode->getBegin(); @@ -1585,12 +1564,6 @@ sal_uInt32 AnimationExporter::GetValueTypeForAttributeName( const rtl::OUString& { sal_uInt32 nValueType = 0; -/* - AnimationValueType::STRING == 0; - AnimationValueType::NUMBER == 1; - AnimationValueType::COLOR == 2; -*/ - struct Entry { const sal_Char* pName; @@ -1728,9 +1701,9 @@ void AnimationExporter::exportAnimateTarget( SvStream& rStrm, const Reference< X rtl::OUString aAttributeName( xAnimate->getAttributeName() ); if ( nForceAttributeNames ) { - switch( nForceAttributeNames ) + if( nForceAttributeNames == 1 ) { - case 1 : aAttributeName = rtl::OUString::createFromAscii( "r" ); break; + aAttributeName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "r" )); } } sal_Int32 nIndex = 0; @@ -1982,11 +1955,7 @@ void AnimationExporter::exportAnimateMotion( SvStream& rStrm, const Reference< X float fToY = 100.0; // nBits&4 rStrm << nBits << fByX << fByY << fFromX << fFromY << fToX << fToY << nOrigin; } -/* ? - { - EscherExAtom aF137( rStrm, 0xf137 ); - } -*/ + OUString aStr; if ( xMotion->getPath() >>= aStr ) { diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 47084b9e2179..a1f47590c28d 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -453,6 +453,15 @@ sal_Int32 PPTWriterBase::GetLayoutOffset( const ::com::sun::star::uno::Reference if ( GetPropertyValue( aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Layout" ) ) ), sal_True ) aAny >>= nLayout; + DBG(printf("GetLayoutOffset %d\n", nLayout)); + + return nLayout; +} + +sal_Int32 PPTWriterBase::GetLayoutOffsetFixed( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const +{ + sal_Int32 nLayout = GetLayoutOffset( rXPropSet ); + if ( ( nLayout >= 21 ) && ( nLayout <= 26 ) ) // NOTES _> HANDOUT6 nLayout = 20; if ( ( nLayout >= 27 ) && ( nLayout <= 30 ) ) // VERTICAL LAYOUT @@ -465,7 +474,7 @@ sal_Int32 PPTWriterBase::GetLayoutOffset( const ::com::sun::star::uno::Reference PHLayout& PPTWriterBase::GetLayout( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet ) const { - return pPHLayout[ GetLayoutOffset( rXPropSet ) ]; + return pPHLayout[ GetLayoutOffsetFixed( rXPropSet ) ]; } // --------------------------------------------------------------------------------------------- diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 47e8c451f01b..ce801eeaad26 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -121,7 +121,93 @@ public: sal_Bool WritePlaceholder( Reference< XShape > xShape, PlaceholderType ePlaceholder, sal_Bool bMaster ); }; - PowerPointShapeExport::PowerPointShapeExport( FSHelperPtr pFS, ShapeHashMap* pShapeMap, PowerPointExport* pFB ) +enum PPTXLayout { + LAYOUT_BLANK, + LAYOUT_TITLE_SLIDE, + LAYOUT_TITLE_CONTENT, + LAYOUT_TITLE_2CONTENT, + LAYOUT_TITLE, + LAYOUT_CENTERED_TEXT, + LAYOUT_TITLE_2CONTENT_CONTENT, + LAYOUT_TITLE_CONTENT_2CONTENT, + LAYOUT_TITLE_2CONTENT_OVER_CONTENT, + LAYOUT_TITLE_CONTENT_OVER_CONTENT, + LAYOUT_TITLE_4CONTENT, + LAYOUT_TITLE_6CONTENT, + LAYOUT_SIZE +}; + +struct PPTXLayoutInfo { + int nType; + const char* sName; + const char* sType; +}; + +static PPTXLayoutInfo aLayoutInfo[LAYOUT_SIZE] = { + { 20, "Blank Slide", "blank" }, + { 0, "Title Slide", "tx" }, + { 1, "Title, Content", "obj" }, + { 3, "Title, 2 Content", "twoObj" }, + { 19, "Title Only", "titleOnly" }, + { 32, "Centered Text", "objOnly" }, // not exactly, but close + { 15, "Title, 2 Content and Content", "twoObjAndObj" }, + { 12, "Title Content and 2 Content", "objAndTwoObj" }, + { 16, "Title, 2 Content over Content", "twoObjOverTx" }, // not exactly, but close + { 14, "Title, Content over Content", "objOverTx" }, // not exactly, but close + { 18, "Title, 4 Content", "fourObj" }, + { 33, "Title, 6 Content", "blank" } // not defined => blank +}; + +int PowerPointExport::GetPPTXLayoutId( int nOffset ) +{ + int nId = LAYOUT_BLANK; + + DBG(printf("GetPPTXLayoutId %d\n", nOffset)); + + switch( nOffset ) { + case 0: + nId = LAYOUT_TITLE_SLIDE; + break; + case 1: + nId = LAYOUT_TITLE_CONTENT; + break; + case 3: + nId = LAYOUT_TITLE_2CONTENT; + break; + case 19: + nId = LAYOUT_TITLE; + break; + case 15: + nId = LAYOUT_TITLE_2CONTENT_CONTENT; + break; + case 12: + nId = LAYOUT_TITLE_CONTENT_2CONTENT; + break; + case 16: + nId = LAYOUT_TITLE_2CONTENT_OVER_CONTENT; + break; + case 14: + nId = LAYOUT_TITLE_CONTENT_OVER_CONTENT; + break; + case 18: + nId = LAYOUT_TITLE_4CONTENT; + break; + case 32: + nId = LAYOUT_CENTERED_TEXT; + break; + case 33: + nId = LAYOUT_TITLE_6CONTENT; + break; + case 20: + default: + nId = LAYOUT_BLANK; + break; + } + + return nId; +} + +PowerPointShapeExport::PowerPointShapeExport( FSHelperPtr pFS, ShapeHashMap* pShapeMap, PowerPointExport* pFB ) : ShapeExport( XML_p, pFS, pShapeMap, pFB ) , mrExport( *pFB ) { @@ -288,11 +374,6 @@ void PowerPointExport::ImplWriteBackground( FSHelperPtr pFS, Reference< XPropert if ( ImplGetPropertyValue( rXPropSet, S( "FillStyle" ) ) ) mAny >>= aFillStyle; - if( aFillStyle == FillStyle_BITMAP ) { - //DBG(printf ("FillStyle_BITMAP properties\n")); - //DBG(dump_pset(rXPropSet)); - } - if( aFillStyle == FillStyle_NONE || aFillStyle == FillStyle_GRADIENT || aFillStyle == FillStyle_HATCH ) @@ -478,10 +559,6 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS ) nTransition = XML_cover; pDirection = Get8Direction( nDirection ); break; -// we don't have cut transition AFAIK -// case PPT_TRANSITION_TYPE_CUT: -// nTransition = XML_cut; -// break; case PPT_TRANSITION_TYPE_DIAMOND: nTransition = XML_diamond; break; @@ -1188,7 +1265,7 @@ void PowerPointExport::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNu const char* pShow = NULL; if( GETA( Visible ) ) { - sal_Bool bShow; + sal_Bool bShow(sal_False); if( ( mAny >>= bShow ) && !bShow ) pShow = "0"; } @@ -1218,7 +1295,7 @@ void PowerPointExport::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNu US( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" ), OUStringBuffer() .appendAscii( "../slideLayouts/slideLayout" ) - .append( GetLayoutFileId( GetLayoutOffset( mXPagePropSet ), nMasterNum ) ) + .append( GetLayoutFileId( GetPPTXLayoutId( GetLayoutOffset( mXPagePropSet ) ), nMasterNum ) ) .appendAscii( ".xml" ) .makeStringAndClear() ); @@ -1243,11 +1320,6 @@ void PowerPointExport::ImplWriteNotes( sal_uInt32 nPageNum ) pFS->startElementNS( XML_p, XML_cSld, FSEND ); - // background -// if( bHasBackground ) { -// ImplWriteBackground( pFS, aXBackgroundPropSet ); -// } - WriteShapeTree( pFS, NOTICE, FALSE ); pFS->endElementNS( XML_p, XML_cSld ); @@ -1395,7 +1467,7 @@ void PowerPointExport::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPr pFS->startElementNS( XML_p, XML_cSld, FSEND ); ImplWriteBackground( pFS, aXBackgroundPropSet ); - WriteShapeTree( pFS, MASTER, TRUE ); + WriteShapeTree( pFS, LAYOUT, TRUE ); pFS->endElementNS( XML_p, XML_cSld ); @@ -1419,26 +1491,19 @@ void PowerPointExport::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPr pFS->startElementNS( XML_p, XML_sldLayoutIdLst, FSEND ); int nCount = 0; - for( int i = 0; i < EPP_LAYOUT_SIZE; i++) { - - sal_Int32 nLayoutFileId = GetLayoutFileId( i, nPageNum ); - if( nLayoutFileId > 0 ) { - AddLayoutIdAndRelation( pFS, nLayoutFileId ); - nCount++; - } - } - - if( nCount == 0 ) { - // add at least empty layout, so that we don't have master page - // without layout, such master cannot be used in ppt - ImplWriteLayout( 0, nPageNum ); - AddLayoutIdAndRelation( pFS, GetLayoutFileId( 0, nPageNum ) ); + for( int i = 0; i < LAYOUT_SIZE; i++) { + sal_Int32 nLayoutFileId = GetLayoutFileId( i, nPageNum ); + if( nLayoutFileId > 0 ) { + AddLayoutIdAndRelation( pFS, nLayoutFileId ); + nCount++; + } else { + ImplWritePPTXLayout( i, nPageNum ); + AddLayoutIdAndRelation( pFS, GetLayoutFileId( i, nPageNum ) ); + } } pFS->endElementNS( XML_p, XML_sldLayoutIdLst ); - // WriteTextStyles( pFS ); - pFS->endElementNS( XML_p, XML_sldMaster ); DBG(printf("----------------\n")); @@ -1446,14 +1511,42 @@ void PowerPointExport::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPr sal_Int32 PowerPointExport::GetLayoutFileId( sal_Int32 nOffset, sal_uInt32 nMasterNum ) { + DBG(printf("GetLayoutFileId offset: %d master: %d", nOffset, nMasterNum)); if( mLayoutInfo[ nOffset ].mnFileIdArray.size() <= nMasterNum ) - return 0; + return 0; return mLayoutInfo[ nOffset ].mnFileIdArray[ nMasterNum ]; } -void PowerPointExport::ImplWriteLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum ) +void PowerPointExport::ImplWriteLayout( sal_Int32 /*nOffset*/, sal_uInt32 /*nMasterNum*/ ) +{ + // we write all the layouts together with master(s) + // ImplWritePPTXLayout( GetPPTXLayoutId( nOffset ), nMasterNum ); +} + +void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum ) { + DBG(printf("write layout: %d\n", nOffset)); + + Reference< drawing::XDrawPagesSupplier > xDPS( getModel(), uno::UNO_QUERY ); + Reference< drawing::XDrawPages > xDrawPages( xDPS->getDrawPages(), uno::UNO_QUERY ); + Reference< drawing::XDrawPage > xSlide; + Reference< container::XIndexAccess > xIndexAccess( xDrawPages, uno::UNO_QUERY ); + + xSlide = xDrawPages->insertNewByIndex( xIndexAccess->getCount() ); + +#ifdef DEBUG + if( xSlide.is() ) + printf("new page created\n"); +#endif + + Reference< beans::XPropertySet > xPropSet( xSlide, uno::UNO_QUERY ); + xPropSet->setPropertyValue( US( "Layout" ), makeAny( short( aLayoutInfo[ nOffset ].nType ) ) ); + DBG(dump_pset( xPropSet )); + + mXPagePropSet = Reference< XPropertySet >( xSlide, UNO_QUERY ); + mXShapes = Reference< XShapes >( xSlide, UNO_QUERY ); + if( mLayoutInfo[ nOffset ].mnFileIdArray.size() < mnMasterPages ) { mLayoutInfo[ nOffset ].mnFileIdArray.resize( mnMasterPages ); } @@ -1469,8 +1562,6 @@ void PowerPointExport::ImplWriteLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum .makeStringAndClear(), US( "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml" ) ); -// LayoutInfo& rLayoutInfo = GetLayoutInfo( mXPagePropSet ); - // add implicit relation of slide layout to slide master addRelation( pFS->getOutputStream(), US( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" ), @@ -1482,14 +1573,16 @@ void PowerPointExport::ImplWriteLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum pFS->startElementNS( XML_p, XML_sldLayout, PNMSS, - XML_type, "title", + XML_type, aLayoutInfo[ nOffset ].sType, XML_preserve, "1", FSEND ); pFS->startElementNS( XML_p, XML_cSld, - XML_name, "Title Slide", + XML_name, aLayoutInfo[ nOffset ].sName, FSEND ); - pFS->write( MINIMAL_SPTREE ); // TODO: write actual shape tree + //pFS->write( MINIMAL_SPTREE ); // TODO: write actual shape tree + WriteShapeTree( pFS, LAYOUT, TRUE ); + pFS->endElementNS( XML_p, XML_cSld ); pFS->endElementNS( XML_p, XML_sldLayout ); @@ -1497,6 +1590,8 @@ void PowerPointExport::ImplWriteLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum mLayoutInfo[ nOffset ].mnFileIdArray[ nMasterNum ] = mnLayoutFileIdMax; mnLayoutFileIdMax ++; + + xDrawPages->remove( xSlide ); } void PowerPointExport::WriteShapeTree( FSHelperPtr pFS, PageType ePageType, sal_Bool bMaster ) @@ -1532,7 +1627,7 @@ void PowerPointExport::WriteShapeTree( FSHelperPtr pFS, PageType ePageType, sal_ ShapeExport& PowerPointShapeExport::WritePageShape( Reference< XShape > xShape, PageType ePageType, sal_Bool bPresObj ) { - if( ePageType == NOTICE && bPresObj ) + if( ( ePageType == NOTICE && bPresObj ) || ePageType == LAYOUT ) return WritePlaceholderShape( xShape, SlideImage ); return WriteTextShape( xShape ); @@ -1540,6 +1635,7 @@ ShapeExport& PowerPointShapeExport::WritePageShape( Reference< XShape > xShape, sal_Bool PowerPointShapeExport::WritePlaceholder( Reference< XShape > xShape, PlaceholderType ePlaceholder, sal_Bool bMaster ) { + DBG(printf("WritePlaceholder %d %d\n", bMaster, ShapeExport::NonEmptyText( xShape ))); if( bMaster && ShapeExport::NonEmptyText( xShape ) ) { WritePlaceholderShape( xShape, ePlaceholder ); @@ -1593,6 +1689,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape( Reference< XShape > x default: DBG(printf("warning: unhandled placeholder type: %d\n", ePlaceholder)); } + DBG(printf("write placeholder %s\n", pType)); mpFS->singleElementNS( XML_p, XML_ph, XML_type, pType, FSEND ); mpFS->endElementNS( XML_p, XML_nvPr ); mpFS->endElementNS( XML_p, XML_nvSpPr ); @@ -1998,7 +2095,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan { uno::Reference< registry::XRegistryKey > xNewKey1( static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - ::rtl::OUString::createFromAscii( IMPL_NAME "/UNO/SERVICES/" ) ) ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME "/UNO/SERVICES/" )) ) ); xNewKey1->createKey( oox::core::PowerPointExport_getSupportedServiceNames().getConstArray()[0] ); bRet = sal_True; @@ -2023,7 +2120,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplN if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 ) { - const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( IMPL_NAME ) ); + const ::rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME ) ); xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index 76ac156b342b..43de6be79a22 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -171,10 +171,6 @@ PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBull nUpperDist = 0x1e; break; -// default : -// case EPP_TEXTTYPE_notUsed : -// case EPP_TEXTTYPE_Other : -// break; } switch ( nDepth ) { @@ -309,7 +305,6 @@ void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::co PPTExParaLevel& rLevel = maParaLevel[ i ]; if ( i ) aParagraphObj.ImplGetNumberingLevel( rBuProv, i, FALSE ); -// rLevel.mbIsBullet = ( ( aParagraphObj.nBulletFlags & 1 ) != 0 ); rLevel.mnTextOfs = aParagraphObj.nTextOfs; rLevel.mnBulletOfs = (sal_uInt16)aParagraphObj.nBulletOfs; rLevel.mnBulletChar = aParagraphObj.cBulletId; diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 4c6bedbf0ca1..7168ea02eece 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -190,7 +190,6 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text case 156: nChar = 0x0153; break;// LATIN SMALL LIGATURE OE case 158: nChar = 0x017E; break;// LATIN SMALL LETTER Z WITH CARON case 159: nChar = 0x0178; break;// LATIN CAPITAL LETTER Y WITH DIAERESIS -// case 222: nChar = 0x00B6; break;// PILCROW SIGN / PARAGRAPH SIGN } } mpText[ i ] = nChar; @@ -789,7 +788,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1 ::com::sun::star::uno::Any aAny; if ( GetPropertyValue( aAny, mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "ParaLeftMargin" ) ) ) ) { - sal_Int32 nVal; + sal_Int32 nVal(0); if ( aAny >>= nVal ) nTextOfs = static_cast< sal_Int16 >( nVal / ( 2540.0 / 576 ) + 0.5 ) ; } @@ -945,49 +944,6 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1 if ( aFontDesc.Name.getLength() ) { -/* - if ( aFontDesc.CharSet != ::com::sun::star::awt::CharSet::SYMBOL ) - { - switch ( cBulletId ) - { - // Currency - case 128: cBulletId = 0x20AC; break; - // Punctuation and other - case 130: cBulletId = 0x201A; break;// SINGLE LOW-9 QUOTATION MARK - case 131: cBulletId = 0x0192; break;// LATIN SMALL LETTER F WITH HOOK - case 132: cBulletId = 0x201E; break;// DOUBLE LOW-9 QUOTATION MARK - // LOW DOUBLE PRIME QUOTATION MARK - case 133: cBulletId = 0x2026; break;// HORIZONTAL ELLIPSES - case 134: cBulletId = 0x2020; break;// DAGGER - case 135: cBulletId = 0x2021; break;// DOUBLE DAGGER - case 136: cBulletId = 0x02C6; break;// MODIFIER LETTER CIRCUMFLEX ACCENT - case 137: cBulletId = 0x2030; break;// PER MILLE SIGN - case 138: cBulletId = 0x0160; break;// LATIN CAPITAL LETTER S WITH CARON - case 139: cBulletId = 0x2039; break;// SINGLE LEFT-POINTING ANGLE QUOTATION MARK - case 140: cBulletId = 0x0152; break;// LATIN CAPITAL LIGATURE OE - case 142: cBulletId = 0x017D; break;// LATIN CAPITAL LETTER Z WITH CARON - case 145: cBulletId = 0x2018; break;// LEFT SINGLE QUOTATION MARK - // MODIFIER LETTER TURNED COMMA - case 146: cBulletId = 0x2019; break;// RIGHT SINGLE QUOTATION MARK - // MODIFIER LETTER APOSTROPHE - case 147: cBulletId = 0x201C; break;// LEFT DOUBLE QUOTATION MARK - // REVERSED DOUBLE PRIME QUOTATION MARK - case 148: cBulletId = 0x201D; break;// RIGHT DOUBLE QUOTATION MARK - // REVERSED DOUBLE PRIME QUOTATION MARK - case 149: cBulletId = 0x2022; break;// BULLET - case 150: cBulletId = 0x2013; break;// EN DASH - case 151: cBulletId = 0x2014; break;// EM DASH - case 152: cBulletId = 0x02DC; break;// SMALL TILDE - case 153: cBulletId = 0x2122; break;// TRADE MARK SIGN - case 154: cBulletId = 0x0161; break;// LATIN SMALL LETTER S WITH CARON - case 155: cBulletId = 0x203A; break;// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - case 156: cBulletId = 0x0153; break;// LATIN SMALL LIGATURE OE - case 158: cBulletId = 0x017E; break;// LATIN SMALL LETTER Z WITH CARON - case 159: cBulletId = 0x0178; break;// LATIN CAPITAL LETTER Y WITH DIAERESIS -// case 222: cBulletId = 0x00B6; break;// PILCROW SIGN / PARAGRAPH SIGN - } - } -*/ nParaFlags |= 0x90; // wir geben den Font und den Charset vor } } @@ -1409,12 +1365,12 @@ FontCollection::FontCollection() : com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - xInterface = xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ); + xInterface = xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.BreakIterator" ) ) ); if ( xInterface.is() ) xPPTBreakIter = com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > ( xInterface, com::sun::star::uno::UNO_QUERY ); - xInterface = xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.i18n.ScriptTypeDetector" ) ); + xInterface = xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.ScriptTypeDetector" ) ) ); if ( xInterface.is() ) xScriptTypeDetector = com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > ( xInterface, com::sun::star::uno::UNO_QUERY ); @@ -1446,8 +1402,6 @@ sal_uInt32 FontCollection::GetId( FontCollectionEntry& rEntry ) Font aFont; aFont.SetCharSet( rEntry.CharSet ); aFont.SetName( rEntry.Original ); -// aFont.SetFamily( rEntry.Family ); -// aFont.SetPitch( rEntry.Pitch ); aFont.SetHeight( 100 ); if ( !pVDev ) diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 0a1d1d5f47cc..162379581d3d 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -276,7 +276,7 @@ sal_Bool SdGRFFilter::Export() uno::Reference< lang::XMultiServiceFactory > xSMgr( ::comphelper::getProcessServiceFactory() ); uno::Reference< uno::XInterface > xComponent - ( xSMgr->createInstance( rtl::OUString::createFromAscii( "com.sun.star.drawing.GraphicExportFilter" ) ), + ( xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicExportFilter" ) ) ), uno::UNO_QUERY ); if ( xComponent.is() ) { @@ -440,7 +440,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su switch( nGraphicType ) { case ::com::sun::star::graphic::GraphicType::VECTOR: - aMimeType = OUString::createFromAscii( "image/x-svm" ); + aMimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "image/x-svm" ) ); break; case ::com::sun::star::graphic::GraphicType::PIXEL: @@ -450,14 +450,12 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su if( bAnimated ) { - aMimeType = OUString::createFromAscii( "image/gif" ); + aMimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "image/gif" ) ); break; } } - // Fallthrough! -// case ::com::sun::star::graphic::GraphicType::EMPTY: default: - aMimeType = OUString::createFromAscii( "image/png" ); + aMimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "image/png" ) ); break; } } diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx index cd47b0e21af7..0d5c88c5f31e 100644 --- a/sd/source/filter/html/buttonset.cxx +++ b/sd/source/filter/html/buttonset.cxx @@ -103,7 +103,7 @@ bool ButtonsImpl::getGraphic( const Reference< XGraphicProvider >& xGraphicProvi if( xInputStream.is() && xGraphicProvider.is() ) try { Sequence< PropertyValue > aMediaProperties( 1 ); - aMediaProperties[0].Name = ::rtl::OUString::createFromAscii( "InputStream" ); + aMediaProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" ) ); aMediaProperties[0].Value <<= xInputStream; Reference< XGraphic > xGraphic( xGraphicProvider->queryGraphic( aMediaProperties ) ); @@ -127,7 +127,7 @@ bool ButtonsImpl::copyGraphic( const OUString& rName, const OUString& rPath ) { osl::File::remove( rPath ); osl::File aOutputFile( rPath ); - if( aOutputFile.open( OpenFlag_Write|OpenFlag_Create ) == osl::FileBase::E_None ) + if( aOutputFile.open( osl_File_OpenFlag_Write|osl_File_OpenFlag_Create ) == osl::FileBase::E_None ) { Reference< XOutputStream > xOutput( new comphelper::OSLOutputStreamWrapper( aOutputFile ) ); comphelper::OStorageHelper::CopyInputToOutput( xInput, xOutput ); diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx index 0e3fdd0cba8c..a49b57060820 100644 --- a/sd/source/filter/html/htmlattr.cxx +++ b/sd/source/filter/html/htmlattr.cxx @@ -44,7 +44,6 @@ SdHtmlAttrPreview::SdHtmlAttrPreview( Window* pParent, const ResId& rResId ) :Control( pParent, rResId ) { -// SetMapMode( MAP_100TH_MM ); } // ===================================================================== diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index ec10650bfed8..896fd01bdb9a 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -654,21 +654,6 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams Size aTmpSize( pPage->GetSize() ); double dRatio=((double)aTmpSize.Width())/aTmpSize.Height(); -/* - switch( mnWidthPixel ) - { - case 800: - mnWidthPixel = 640; - break; - case 1024: - mnWidthPixel = 800; - break; - case 640: - default: - mnWidthPixel = 512; - break; - } -*/ mnHeightPixel = (USHORT)(mnWidthPixel/dRatio); //------------------------------------------------------------------ @@ -681,7 +666,6 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams maIndex = aINetURLObj.GetLastName(); mnSdPageCount = mpDoc->GetSdPageCount( PK_STANDARD ); -// USHORT nHiddenSlides = 0; for( USHORT nPage = 0; nPage < mnSdPageCount; nPage++ ) { pPage = mpDoc->GetSdPage( nPage, PK_STANDARD ); @@ -1107,7 +1091,6 @@ bool HtmlExport::CreateHtmlTextForPresPages() if( mbDocColors ) { SetDocColors( pPage ); -// maBackColor = pPage->GetPageBackgroundColor(); } // HTML Kopf @@ -2202,50 +2185,6 @@ String HtmlExport::getDocumentTitle() return mDocTitle; } -/* -var nCurrentPage = 0; -var nPageCount = JSCRIPT2; - -function NavigateAbs( nPage ) -{ - frames[\"show\"].location.href = \"img\" + nPage + \".htm\"; - frames[\"notes\"].location.href = \"note\" + nPage + \".htm\"; - nCurrentPage = nPage; - if(nCurrentPage==0) - { - frames[\"navbar1\"].location.href = \"navbar0.htm\"; - } - else if(nCurrentPage==nPageCount-1) - { - frames[\"navbar1\"].location.href = \"navbar2.htm\"; - } - else - frames[\"navbar1\"].location.href = \"navbar1.htm\"; - } -} - -function NavigateRel( nDelta ) -{ - var nPage = parseInt(nCurrentPage) + parseInt(nDelta); - if( (nPage >= 0) && (nPage < nPageCount) ) - { - NavigateAbs( nPage ); - } -} - -function ExpandOutline() -{ - frames[\"navbar2\"].location.href = \"navbar4.htm\"; - frames[\"outline\"].location.href = \"outline1.htm\"; -} - -function CollapseOutline() -{ - frames[\"navbar2\"].location.href = \"navbar3.htm\"; - frames[\"outline\"].location.href = \"outline0.htm\"; -} -*/ - static const char* JS_NavigateAbs = "function NavigateAbs( nPage )\r\n" "{\r\n" @@ -3221,13 +3160,6 @@ bool HtmlExport::checkForExistingFiles() String HtmlExport::StringToURL( const String& rURL ) { return rURL; -/* - return StringToHTMLString(rURL); - OUString aURL( StringToHTMLString(rURL) ); - - aURL = Uri::encode( aURL, rtl_UriCharClassUric, rtl_UriEncodeCheckEscapes, RTL_TEXTENCODING_UTF8); - return String( aURL ); -*/ } String HtmlExport::GetButtonName( int nButton ) const diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 6c0e4de2d3f9..89ef63a4e65f 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -174,7 +174,6 @@ SdPublishingDesign::SdPublishingDesign() m_aAuthor += (String)aUserOptions.GetLastName(); m_aEMail = aUserOptions.GetEmail(); m_bDownload = FALSE; -//-/ m_bCreated = TRUE; m_nButtonThema = -1; m_bUserAttr = FALSE; @@ -219,7 +218,6 @@ int SdPublishingDesign::operator ==(const SdPublishingDesign & rDesign) const m_aWWW == rDesign.m_aWWW && m_aMisc == rDesign.m_aMisc && m_bDownload == rDesign.m_bDownload && -//-/ m_bCreated == rDesign.m_bCreated && m_nButtonThema == rDesign.m_nButtonThema && m_bUserAttr == rDesign.m_bUserAttr && m_aBackColor == rDesign.m_aBackColor && @@ -639,8 +637,6 @@ void SdPublishingDlg::CreatePages() if(m_bImpress) aAssistentFunc.InsertControl(4, pPage4_Download = new CheckBox(this,SdResId(PAGE4_DOWNLOAD))); -//-/ aAssistentFunc.InsertControl(4, -//-/ pPage4_Created = new CheckBox(this,SdResId(PAGE4_CREATED))); // Seite 5 aAssistentFunc.InsertControl(5, @@ -766,7 +762,6 @@ void SdPublishingDlg::RemovePages() delete pPage4_Misc; if(m_bImpress) delete pPage4_Download; -//-/ delete pPage4_Created; delete pPage5_Bmp; delete pPage5_Titel; @@ -964,7 +959,6 @@ void SdPublishingDlg::GetParameterSequence( Sequence< PropertyValue >& rParams ) } // Seite 6 -// aSet.Put(SfxBoolItem(ATTR_PUBLISH_SLIDESOUND,pPage6_Sound->IsChecked())); rParams.realloc( aProps.size() ); @@ -1088,12 +1082,6 @@ IMPL_LINK( SdPublishingDlg, GfxFormatHdl, RadioButton *, pButton ) // ===================================================================== IMPL_LINK( SdPublishingDlg, BaseHdl, RadioButton *, EMPTYARG ) { -/* - if(pButton == pPage3_Standard) - pPage3_Frames->Check( pButton == pPage3 ); - else - pPage3_Standard->Check(FALSE); -*/ UpdatePage(); return 0; @@ -1516,7 +1504,6 @@ void SdPublishingDlg::SetDesign( SdPublishingDesign* pDesign ) pPage4_Misc->SetText(pDesign->m_aMisc); if(m_bImpress) pPage4_Download->Check(pDesign->m_bDownload); -//-/ pPage4_Created->Check(pDesign->m_bCreated); pPage5_TextOnly->Check(pDesign->m_nButtonThema == -1); if(pDesign->m_nButtonThema != -1) @@ -1581,7 +1568,6 @@ void SdPublishingDlg::GetDesign( SdPublishingDesign* pDesign ) pDesign->m_aWWW = pPage4_WWW->GetText(); pDesign->m_aMisc = pPage4_Misc->GetText(); pDesign->m_bDownload = m_bImpress?pPage4_Download->IsChecked():FALSE; -//-/ pDesign->m_bCreated = pPage4_Created->IsChecked(); if(pPage5_TextOnly->IsChecked()) pDesign->m_nButtonThema = -1; @@ -1717,10 +1703,6 @@ BOOL SdPublishingDlg::Save() // ********************************************************************* // SdDesignNameDlg Methoden // ********************************************************************* - -// ===================================================================== -// -// ===================================================================== SdDesignNameDlg::SdDesignNameDlg(Window* pWindow, const String& aName): ModalDialog (pWindow, SdResId( DLG_DESIGNNAME )), m_aEdit (this, SdResId(EDT_NAME)), @@ -1733,17 +1715,11 @@ SdDesignNameDlg::SdDesignNameDlg(Window* pWindow, const String& aName): m_aBtnOK.Enable(aName.Len() != 0); } -// ===================================================================== -// -// ===================================================================== String SdDesignNameDlg::GetDesignName() { return m_aEdit.GetText(); } -// ===================================================================== -// -// ===================================================================== IMPL_LINK( SdDesignNameDlg, ModifyHdl, Edit*, EMPTYARG ) { m_aBtnOK.Enable(m_aEdit.GetText().Len() != 0); diff --git a/sd/source/filter/makefile.mk b/sd/source/filter/makefile.mk index 554b1c5367be..78d383e03c5d 100644 --- a/sd/source/filter/makefile.mk +++ b/sd/source/filter/makefile.mk @@ -43,12 +43,11 @@ CDEFS+= -DDBG_ANIM_LOG # --- Files -------------------------------------------------------- SLOFILES =\ - $(SLO)$/sdfilter.obj \ - $(SLO)$/sdpptwrp.obj + $(EXCEPTIONSFILES) EXCEPTIONSFILES= \ - $(SLO)$/pptin.obj \ - $(SLO)$/sdfilter.obj + $(SLO)$/sdfilter.obj \ + $(SLO)$/sdpptwrp.obj # --- Tagets ------------------------------------------------------- diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx index f22df66795dd..b775fbf817c3 100644 --- a/sd/source/filter/ppt/ppt97animations.cxx +++ b/sd/source/filter/ppt/ppt97animations.cxx @@ -220,10 +220,10 @@ void Ppt97Animation::SetAnimateAssociatedShape( bool bAnimate ) if( !bAnimate ) { //the appear effect cannot be animated without text - if( this->GetPresetId().equals( ::rtl::OUString::createFromAscii("ooo-entrance-appear") ) ) + if( this->GetPresetId().equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-appear")) ) ) return; //the random effect may be the appear effect and than has the same problem - if( this->GetPresetId().equals( ::rtl::OUString::createFromAscii("ooo-entrance-random") ) ) + if( this->GetPresetId().equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-random")) ) ) { //this case is not 100% correct -> feel free to complete //i consider this case as seldom and not that problematic and a simple correct fix is not in sight @@ -300,26 +300,22 @@ void Ppt97Animation::UpdateCacheData() const switch( m_aAtom.nFlyMethod ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_APPEAR; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-appear"); // --- appear --- + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-appear")); // --- appear --- break; case 0x01: - //eRetval = ::com::sun::star::presentation::AnimationEffect_RANDOM; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-random"); // --- random --- + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-random")); // --- random --- break; case 0x02: // --- blinds effect --- { switch ( m_aAtom.nFlyDirection ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_VERTICAL_STRIPES; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-venetian-blinds"); - m_aSubType = ::rtl::OUString::createFromAscii("horizontal"); // horizontal + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-venetian-blinds")); + m_aSubType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("horizontal")); // horizontal break; case 0x1: - //eRetval = ::com::sun::star::presentation::AnimationEffect_HORIZONTAL_STRIPES; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-venetian-blinds"); - m_aSubType = ::rtl::OUString::createFromAscii("vertical"); // vertical + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-venetian-blinds")); + m_aSubType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vertical")); // vertical break; } } @@ -329,35 +325,30 @@ void Ppt97Animation::UpdateCacheData() const switch ( m_aAtom.nFlyDirection ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_HORIZONTAL_CHECKERBOARD; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-checkerboard"); - m_aSubType = ::rtl::OUString::createFromAscii("across"); // vertical ??? + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-checkerboard")); + m_aSubType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("across")); // vertical ??? break; case 0x1: - //eRetval = ::com::sun::star::presentation::AnimationEffect_VERTICAL_CHECKERBOARD; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-checkerboard"); - m_aSubType = ::rtl::OUString::createFromAscii("downward"); // horizontal ??? + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-checkerboard")); + m_aSubType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("downward")); // horizontal ??? break; } } break; case 0x05: - //eRetval = ::com::sun::star::presentation::AnimationEffect_DISSOLVE; // --- dissolve ---- - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-dissolve-in"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-dissolve-in")); break; case 0x08: // --- (hor/ver) lines --- { switch ( m_aAtom.nFlyDirection ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_HORIZONTAL_LINES; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-random-bars"); - m_aSubType = ::rtl::OUString::createFromAscii("vertical"); // horizontal ??? + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-random-bars")); + m_aSubType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vertical")); // horizontal ??? break; case 0x1: - //eRetval = ::com::sun::star::presentation::AnimationEffect_VERTICAL_LINES; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-random-bars"); - m_aSubType = rtl::OUString::createFromAscii("horizontal"); // vertical ??? + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-random-bars")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("horizontal")); // vertical ??? break; } } @@ -367,24 +358,20 @@ void Ppt97Animation::UpdateCacheData() const switch ( m_aAtom.nFlyDirection ) { case 0x4: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_LOWERRIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-diagonal-squares"); - m_aSubType = rtl::OUString::createFromAscii("left-to-top"); // to left top + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-diagonal-squares")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("left-to-top")); // to left top break; case 0x5: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_LOWERLEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-diagonal-squares"); - m_aSubType = rtl::OUString::createFromAscii("right-to-top"); // to right top + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-diagonal-squares")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("right-to-top")); // to right top break; case 0x6: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_UPPERRIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-diagonal-squares"); - m_aSubType = rtl::OUString::createFromAscii("left-to-bottom"); // to left bottom + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-diagonal-squares")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("left-to-bottom")); // to left bottom break; case 0x7: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_UPPERLEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-diagonal-squares"); - m_aSubType = rtl::OUString::createFromAscii("right-to-bottom"); // to right bottom + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-diagonal-squares")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("right-to-bottom")); // to right bottom break; } } @@ -394,24 +381,20 @@ void Ppt97Animation::UpdateCacheData() const switch ( m_aAtom.nFlyDirection ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_RIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-wipe"); - m_aSubType = rtl::OUString::createFromAscii("from-right"); // from right + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-wipe")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-right")); // from right break; case 0x1: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_BOTTOM; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-wipe"); - m_aSubType = rtl::OUString::createFromAscii("from-bottom"); // from bottom + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-wipe")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-bottom")); // from bottom break; case 0x2: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_LEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-wipe"); - m_aSubType = rtl::OUString::createFromAscii("from-left"); // from left + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-wipe")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-left")); // from left break; case 0x3: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_TOP; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-wipe"); - m_aSubType = rtl::OUString::createFromAscii("from-top"); // from top + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-wipe")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-top")); // from top break; } } @@ -421,14 +404,12 @@ void Ppt97Animation::UpdateCacheData() const switch ( m_aAtom.nFlyDirection ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-box"); - m_aSubType = rtl::OUString::createFromAscii("out"); // from center + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-box")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out")); // from center break; case 0x1: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_TO_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-box"); - m_aSubType = rtl::OUString::createFromAscii("in"); // to center + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-box")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("in")); // to center break; } } @@ -438,161 +419,128 @@ void Ppt97Animation::UpdateCacheData() const switch ( m_aAtom.nFlyDirection ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_LEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-left"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-left")); break; case 0x1: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_TOP; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-top"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-top")); break; case 0x2: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_RIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-right"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-right")); break; case 0x3: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_BOTTOM; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-bottom"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-bottom")); break; case 0x4: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_UPPERLEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-top-left"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-top-left")); break; case 0x5: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_UPPERRIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-top-right"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-top-right")); break; case 0x6: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_LOWERLEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-bottom-left"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-bottom-left")); break; case 0x7: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_LOWERRIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in"); - m_aSubType = rtl::OUString::createFromAscii("from-bottom-right"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-bottom-right")); break; case 0x8: // -- short text effects -- - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_SHORT_FROM_LEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-peek-in"); - m_aSubType = rtl::OUString::createFromAscii("from-left"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-peek-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-left")); break; case 0x9: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_SHORT_FROM_BOTTOM; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-peek-in"); - m_aSubType = rtl::OUString::createFromAscii("from-bottom"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-peek-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-bottom")); break; case 0xa: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_SHORT_FROM_RIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-peek-in"); - m_aSubType = rtl::OUString::createFromAscii("from-right"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-peek-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-right")); break; case 0xb: - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_SHORT_FROM_TOP; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-peek-in"); - m_aSubType = rtl::OUString::createFromAscii("from-top"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-peek-in")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-top")); break; case 0xc: // -- slow text effects -- { - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_LEFT; - //rSpeed = ::com::sun::star::presentation::AnimationSpeed_SLOW; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in-slow"); - m_aSubType = rtl::OUString::createFromAscii("from-left"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in-slow")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-left")); } break; case 0xd: { - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_TOP; - //rSpeed = ::com::sun::star::presentation::AnimationSpeed_SLOW; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in-slow"); - m_aSubType = rtl::OUString::createFromAscii("from-top"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in-slow")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-top")); } break; case 0xe: { - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_RIGHT; - //rSpeed = ::com::sun::star::presentation::AnimationSpeed_SLOW; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in-slow"); - m_aSubType = rtl::OUString::createFromAscii("from-right"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in-slow")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-right")); } break; case 0xf: { - //eRetval = ::com::sun::star::presentation::AnimationEffect_MOVE_FROM_BOTTOM; - //rSpeed = ::com::sun::star::presentation::AnimationSpeed_SLOW; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-fly-in-slow"); - m_aSubType = rtl::OUString::createFromAscii("from-bottom"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-fly-in-slow")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-bottom")); } break; case 0x10: // --- zoom --- - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-zoom"); - m_aSubType = rtl::OUString::createFromAscii("in"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-zoom")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("in")); break; case 0x11: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-zoom"); - m_aSubType = rtl::OUString::createFromAscii("in-slightly"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-zoom")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("in-slightly")); break; case 0x12: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_TO_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-zoom"); - m_aSubType = rtl::OUString::createFromAscii("out"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-zoom")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out")); break; case 0x13: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_TO_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-zoom"); - m_aSubType = rtl::OUString::createFromAscii("out-slightly"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-zoom")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out-slightly")); break; case 0x14: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_FROM_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-zoom"); - m_aSubType = rtl::OUString::createFromAscii("in-from-screen-center"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-zoom")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("in-from-screen-center")); break; case 0x15: - //eRetval = ::com::sun::star::presentation::AnimationEffect_FADE_TO_CENTER; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-zoom"); - m_aSubType = rtl::OUString::createFromAscii("out-from-screen-center"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-zoom")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out-from-screen-center")); break; case 0x16: // --- stretch --- - //eRetval = ::com::sun::star::presentation::AnimationEffect_HORIZONTAL_STRETCH; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-stretchy"); - m_aSubType = rtl::OUString::createFromAscii("across"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-stretchy")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("across")); break; case 0x17: - //eRetval = ::com::sun::star::presentation::AnimationEffect_STRETCH_FROM_LEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-stretchy"); - m_aSubType = rtl::OUString::createFromAscii("from-left"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-stretchy")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-left")); break; case 0x18: - //eRetval = ::com::sun::star::presentation::AnimationEffect_STRETCH_FROM_TOP; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-stretchy"); - m_aSubType = rtl::OUString::createFromAscii("from-top"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-stretchy")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-top")); break; case 0x19: - //eRetval = ::com::sun::star::presentation::AnimationEffect_STRETCH_FROM_RIGHT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-stretchy"); - m_aSubType = rtl::OUString::createFromAscii("from-right"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-stretchy")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-right")); break; case 0x1a: - //eRetval = ::com::sun::star::presentation::AnimationEffect_STRETCH_FROM_BOTTOM; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-stretchy"); - m_aSubType = rtl::OUString::createFromAscii("from-bottom"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-stretchy")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("from-bottom")); break; case 0x1b: // --- rotate --- - //eRetval = ::com::sun::star::presentation::AnimationEffect_HORIZONTAL_ROTATE; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-swivel"); - m_aSubType = rtl::OUString::createFromAscii("vertical"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-swivel")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vertical")); break; case 0x1c: // --- spirale --- - //eRetval = ::com::sun::star::presentation::AnimationEffect_SPIRALOUT_LEFT; - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-spiral-in"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-spiral-in")); break; } } @@ -602,31 +550,27 @@ void Ppt97Animation::UpdateCacheData() const switch ( m_aAtom.nFlyDirection ) { case 0x0: - //eRetval = ::com::sun::star::presentation::AnimationEffect_OPEN_VERTICAL ; // ??? - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-split"); - m_aSubType = rtl::OUString::createFromAscii("horizontal-out"); //horizontal open + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-split")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("horizontal-out")); //horizontal open break; case 0x1: - //eRetval = ::com::sun::star::presentation::AnimationEffect_CLOSE_VERTICAL; // ??? - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-split"); - m_aSubType = rtl::OUString::createFromAscii("horizontal-in"); //horizontal close + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-split")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("horizontal-in")); //horizontal close break; case 0x2: - //eRetval = ::com::sun::star::presentation::AnimationEffect_OPEN_HORIZONTAL; // ??? - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-split"); - m_aSubType = rtl::OUString::createFromAscii("vertical-out"); // vertical open + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-split")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vertical-out")); // vertical open break; case 0x3: - //eRetval = ::com::sun::star::presentation::AnimationEffect_CLOSE_HORIZONTAL; // ??? - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-split"); - m_aSubType = rtl::OUString::createFromAscii("vertical-in"); // vertical close + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-split")); + m_aSubType = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vertical-in")); // vertical close break; } } break; case 0x0e: // --- blink --- { - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-flash-once"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-flash-once")); switch ( m_aAtom.nFlyDirection ) { case 0x0: //fast @@ -646,7 +590,7 @@ void Ppt97Animation::UpdateCacheData() const break; default: { - m_aPresetId = ::rtl::OUString::createFromAscii("ooo-entrance-appear"); + m_aPresetId = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-appear")); DBG_ERROR("no effect mapped"); } break; diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 2e0159a1fa13..f595f7c80d95 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -255,7 +255,7 @@ sal_Bool ImplSdPPTImport::Import() if ( !bOk ) return FALSE; - pSdrModel->setLock( sal_True ); + pSdrModel->setLock(true); pSdrModel->EnableUndo(false); SdrOutliner& rOutl = mpDoc->GetDrawOutliner(); @@ -389,7 +389,7 @@ sal_Bool ImplSdPPTImport::Import() Dictionary aDict; if ( pSection->GetDictionary( aDict ) ) { - UINT32 nPropId = aDict.GetProperty( rtl::OUString::createFromAscii("_PID_HLINKS" )); + UINT32 nPropId = aDict.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_HLINKS" ))); if ( nPropId ) { if ( pSection->GetProperty( nPropId, aPropItem ) ) @@ -430,6 +430,11 @@ sal_Bool ImplSdPPTImport::Import() aPropItem >> pHyperlink->nInfo; if ( !aPropItem.Read( pHyperlink->aTarget, VT_EMPTY ) ) break; + + // #n382718# (and #n261623#) Convert '\\' notation to 'smb://' + INetURLObject aUrl( pHyperlink->aTarget, INET_PROT_FILE ); + pHyperlink->aTarget = aUrl.GetMainURL( INetURLObject::NO_DECODE ); + if ( !aPropItem.Read( pHyperlink->aSubAdress, VT_EMPTY ) ) break; pHyperlink->nStartPos = pHyperlink->nEndPos = -1; @@ -648,12 +653,7 @@ sal_Bool ImplSdPPTImport::Import() { UINT32 nTitleInstance = TSS_TYPE_PAGETITLE; UINT32 nOutlinerInstance = TSS_TYPE_BODY; -// BOOL bSwapStyleSheet = pSlideLayout->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE; -// if ( bSwapStyleSheet ) -// { -// nTitleInstance = TSS_TYPE_TITLE; -// nOutlinerInstance = TSS_TYPE_SUBTITLE; -// } + ///////////////////// // titelstylesheet // ///////////////////// @@ -773,7 +773,7 @@ sal_Bool ImplSdPPTImport::Import() if ( SeekToAktPage( &aPageHd ) ) { if ( mbTracing ) - mpTracer->AddAttribute( rtl::OUString::createFromAscii( "MasterPage" ), rtl::OUString::valueOf( (sal_Int32) (nAktPageNum + 1) ) ); + mpTracer->AddAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MasterPage" )), rtl::OUString::valueOf( (sal_Int32) (nAktPageNum + 1) ) ); while( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) ) { @@ -851,7 +851,7 @@ sal_Bool ImplSdPPTImport::Import() aHd.SeekToEndOfRecord( rStCtrl ); } if ( mbTracing ) - mpTracer->RemoveAttribute( rtl::OUString::createFromAscii( "MasterPage" ) ); + mpTracer->RemoveAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MasterPage" )) ); } rStCtrl.Seek( nFPosMerk ); ImportPageEffect( (SdPage*)pMPage, bNewAnimationsUsed ); @@ -953,13 +953,6 @@ sal_Bool ImplSdPPTImport::Import() rStCtrl >> aProgTagContentHd; switch( aProgTagContentHd.nRecType ) { -/* - case PPT_PST_CommentContainer : - { - - } - break; -*/ case DFF_msofbtAnimGroup : { ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xPage( pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY ); @@ -1395,8 +1388,7 @@ sal_Bool ImplSdPPTImport::Import() rPresSettings.mbCustomShow = ( nFlags & 8 ) != 0; rPresSettings.mbEndless = ( nFlags & 0x80 ) != 0; rPresSettings.mbFullScreen = ( nFlags & 0x10 ) == 0; -// rPresSettings.mnPauseTimeout; -// rPresSettings.mbShowLogo; + if ( nStartSlide && ( nStartSlide <= GetPageCount() ) ) { SdPage* pPage = mpDoc->GetSdPage( nStartSlide - 1, PK_STANDARD ); @@ -1415,7 +1407,7 @@ sal_Bool ImplSdPPTImport::Import() sfx2::LoadOlePropertySet(xDocProps, &mrStorage); xDocProps->setTemplateName(::rtl::OUString()); - pSdrModel->setLock( sal_False ); + pSdrModel->setLock(false); pSdrModel->EnableUndo(true); return bOk; } @@ -1807,9 +1799,6 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat else pPage->SetPresChange( mePresChange ); -// if ( nBuildFlags & 1 ) // slidechange by mouseclick -// pPage->SetPresChange( mePresChange ); - if ( nBuildFlags & 4 ) pPage->SetExcluded( TRUE ); // Dia nicht anzeigen if ( nBuildFlags & 16 ) @@ -2089,18 +2078,10 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv pInfo->SetBookmark( ReadSound( pIAtom->nSoundRef ) ); // Pfad zum Soundfile in MSDOS-Notation pInfo->meClickAction = ::com::sun::star::presentation::ClickAction_SOUND; // RunProgramAction } -// if ( nFlags & 0x01 ) // koennen wir nicht ( beim Anklicken markieren ) + switch ( pIAtom->nAction ) { -// case 0x01 : // MacroAction -// { -// pInfo->meClickAction = ::com::sun::star::presentation::::com::sun::star::presentation::ClickAction_MACRO; -// // aMacro liegt in folgender Form vor: -// // "Macroname.Modulname.Libname.Dokumentname" oder -// // "Macroname.Modulname.Libname.Applikationsname" -// pInfo->maBookmark = aMacroName; -// } -// break; + case 0x02 : // RunProgramAction { pInfo->meClickAction = ::com::sun::star::presentation::ClickAction_PROGRAM; diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 21a776ef77c1..b6d5ec10831d 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -245,7 +245,6 @@ void AnimationImporter::import( const Reference< XDrawPage >& xPage, const DffRe { #ifdef DBG_ANIM_LOG mpFile = fopen( "c:\\output.xml", "w+" ); - //mpFile = stdout; #endif dump("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); @@ -301,10 +300,6 @@ Reference< XAnimationNode > AnimationImporter::createNode( const Atom* pAtom, co switch( rNode.mnNodeType ) { case mso_Anim_Behaviour_FILTER: -/* - pServiceName = "com.sun.star.animations.TransitionFilter"; - break; -*/ case mso_Anim_Behaviour_ANIMATION: if( pAtom->hasChildAtom( DFF_msofbtAnimateSet ) ) pServiceName = "com.sun.star.animations.AnimateSet"; @@ -1446,7 +1441,7 @@ void AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference< { if( pChildAtom->hasChildAtom( DFF_msofbtAnimCommand ) ) { - const OUString aServiceName( OUString::createFromAscii("com.sun.star.animations.Command") ); + const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.animations.Command")) ); Reference< XAnimationNode > xChildNode( ::comphelper::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY ); importAnimationNodeContainer( pChildAtom, xChildNode ); Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY ); @@ -3133,14 +3128,9 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An } -// dump( " ref=\"%s\"", nRefMode == 3 ? "source" : ( nRefMode == 0 ? "target" : "unknown" ) ); -// dump( " type=\"%s\"", nRefType == 1 ? "shape" : ( nRefType == 2 ? "sound": "unknown" ) ); -// dump( " id=\"%lu\"", (sal_Int32)nRefId ); #ifdef DBG_ANIM_LOG if((begin != -1) || (end != -1) ) { -// dump( " text_begin=\"%ld\"", begin ); -// dump( " text_end=\"%ld\"", end ); } #endif } @@ -3149,9 +3139,6 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An { sal_Int32 nU1; mrStCtrl >> nU1; - - // HINT: nU1 == 1 : target document. ? -// dump( " unknown_0x2b01=\"%#lx\"", nU1 ); } break; default: @@ -3203,8 +3190,6 @@ void AnimationImporter::dump_atom_header( const Atom* pAtom, bool bOpen, bool bA { const char* pTitle; - bool bUnknown = false; - switch( pAtom->getType() ) { case DFF_msofbtAnimEvent: pTitle = "AnimEvent"; break; @@ -3543,7 +3528,6 @@ void AnimationImporter::dump( const PropertySet& rSet ) break; case DFF_ANIM_DIRECTION: -// case DFF_ANIM_MASTERREL: { sal_Bool bDirection; if( aAny >>= bDirection ) @@ -3741,7 +3725,7 @@ void AnimationImporter::dump( const PropertySet& rSet ) case DFF_ANIM_VOLUME: { - double fVolume; + double fVolume(0.0); if( aAny >>= fVolume ) { fprintf( mpFile, " volume=\"%g%%\"", (double)(fVolume * 100.0) ); @@ -3771,7 +3755,7 @@ void AnimationImporter::dump( const PropertySet& rSet ) fprintf( mpFile, "\"" ); } - aIter++; + ++aIter; } } diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index 731ad5db0616..d43993fffd6c 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -108,28 +108,6 @@ void SdFilter::CreateStatusIndicator() if ( pStatusBarItem ) pStatusBarItem->GetValue() >>= mxStatusIndicator; -// try -// { -// if (mxModel.is()) -// { -// Reference< XController > xController( mxModel->getCurrentController()); -// if( xController.is()) -// { -// Reference< XFrame > xFrame( xController->getFrame()); -// if( xFrame.is()) -// { -// Reference< XStatusIndicatorFactory > xFactory( xFrame, UNO_QUERY ); -// if( xFactory.is()) -// { -// mxStatusIndicator = xFactory->createStatusIndicator(); -// } -// } -// } -// } -// } -// catch( Exception& ) -// { -// } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index a36441a0aee4..05024bb46680 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -144,12 +144,8 @@ sal_Bool SdPPTFilter::Export() if( mxModel.is() ) { SotStorageRef xStorRef = new SotStorage( mrMedium.GetOutStream(), FALSE ); - ExportPPT PPTExport = reinterpret_cast<ExportPPT>(pLibrary->getFunctionSymbol( ::rtl::OUString::createFromAscii("ExportPPT") )); + ExportPPT PPTExport = reinterpret_cast<ExportPPT>(pLibrary->getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExportPPT")) )); - /* !!! - if ( pViewShell && pViewShell->GetView() ) - pViewShell->GetView()->SdrEndTextEdit(); - */ if( PPTExport && xStorRef.Is() ) { sal_uInt32 nCnvrtFlags = 0; @@ -190,7 +186,7 @@ void SdPPTFilter::PreSaveBasic() ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); if( pLibrary ) { - SaveVBA pSaveVBA= reinterpret_cast<SaveVBA>(pLibrary->getFunctionSymbol( ::rtl::OUString::createFromAscii("SaveVBA") )); + SaveVBA pSaveVBA= reinterpret_cast<SaveVBA>(pLibrary->getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveVBA")) )); if( pSaveVBA ) { pSaveVBA( (SfxObjectShell&) mrDocShell, pBas ); diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx index ce40a88b0fc3..fbd8b2554cee 100644 --- a/sd/source/filter/xml/sdtransform.cxx +++ b/sd/source/filter/xml/sdtransform.cxx @@ -196,17 +196,6 @@ void SdTransformOOo2xDocument::transformShape( SdrObject& rObj ) void SdTransformOOo2xDocument::transformTextShape( SdrTextObj& rTextShape ) { -/* - const SfxItemSet& rSet = rTextShape.GetMergedItemSet(); - - if( (rSet.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_SET) && (rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET) ) - { - SvxLRSpaceItem aItem( *static_cast<const SvxLRSpaceItem*>(rSet.GetItem( EE_PARA_LRSPACE )) ); - aItem.SetLeftValue( 0 ); - aItem.SetTxtFirstLineOfst( 0 ); - rTextShape.SetMergedItem( aItem ); - } -*/ if(!rTextShape.IsEmptyPresObj()) { @@ -321,7 +310,7 @@ bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, sal_uInt1 bool SdTransformOOo2xDocument::transformItemSet( SfxItemSet& rSet, bool bNumbering ) { bool bRet = false; - if( bNumbering /* && (rSet.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_SET) && (rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET) */ ) + if( bNumbering ) { SvxLRSpaceItem aItem( *static_cast<const SvxLRSpaceItem*>(rSet.GetItem( EE_PARA_LRSPACE )) ); if( (aItem.GetLeft() != 0) || (aItem.GetTxtFirstLineOfst() != 0) ) diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 91560d821582..1bc5d0fa9ec8 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -101,7 +101,7 @@ extern void TransformOOo2xDocument( SdDrawDocument* pDocument ); #define MAP_LEN(x) x, sizeof(x) - 1 -#define XML_STRING(i, x) sal_Char __READONLY_DATA i[sizeof(x)] = x +#define XML_STRING(i, x) sal_Char const i[sizeof(x)] = x XML_STRING( sXML_metaStreamName, "meta.xml"); XML_STRING( sXML_styleStreamName, "styles.xml" ); @@ -232,7 +232,7 @@ sal_Int32 ReadThroughComponent( // get parser Reference< xml::sax::XParser > xParser( rFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ), UNO_QUERY ); DBG_ASSERT( xParser.is(), "Can't create parser" ); if( !xParser.is() ) @@ -518,7 +518,7 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError ) }; uno::Reference< beans::XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) ); - xInfoSet->setPropertyValue( OUString::createFromAscii( "Preview" ), uno::makeAny( mrDocShell.GetDoc()->IsStarDrawPreviewMode() ) ); + xInfoSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Preview" )), uno::makeAny( mrDocShell.GetDoc()->IsStarDrawPreviewMode() ) ); // ---- get BuildId from parent container if available @@ -622,7 +622,7 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError ) aName = pDocHierarchItem->GetValue(); } else - aName = ::rtl::OUString::createFromAscii( "dummyObjectName" ); + aName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "dummyObjectName" )); if( aName.getLength() ) { @@ -709,7 +709,6 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError ) switch( nRet ) { case 0: break; - // case ERRCODE_SFX_WRONGPASSWORD: break; case SD_XML_READERROR: break; case ERRCODE_IO_BROKENPACKAGE: if( xStorage.is() ) |