filter/inc/filter/msfilter/escherex.hxx | 16 +++- filter/source/msfilter/escherex.cxx | 15 ++++ filter/source/msfilter/msdffimp.cxx | 52 +++++----------- filter/source/pdf/pdfexport.cxx | 6 + sc/source/filter/xcl97/xcl97esc.cxx | 2 sd/source/filter/eppt/eppt.cxx | 19 ++++- sd/source/filter/eppt/eppt.hxx | 4 - sd/source/filter/eppt/epptbase.hxx | 4 - sd/source/filter/eppt/epptso.cxx | 13 +++- sd/source/filter/eppt/escherex.cxx | 3 sd/source/filter/eppt/escherex.hxx | 2 sd/source/filter/eppt/pptx-epptbase.cxx | 4 - sd/source/filter/eppt/pptx-epptooxml.cxx | 9 ++ sd/source/filter/sdpptwrp.cxx | 11 ++- sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 2 sd/source/ui/animations/CustomAnimationCreateDialog.src | 2 sd/source/ui/unoidl/unomodel.cxx | 4 - svtools/source/filter/filter.cxx | 14 +--- svx/source/svdraw/svdograf.cxx | 27 +++----- vcl/inc/vcl/pdfextoutdevdata.hxx | 4 + vcl/source/gdi/pdfextoutdevdata.cxx | 9 ++ 21 files changed, 139 insertions(+), 83 deletions(-)
New commits: commit 825839b24d4ad04df17269ef407c844fd6b2cc81 Author: Thorsten Behrens <tbehr...@suse.com> Date: Wed Nov 23 23:23:23 2011 +0100 Fixup pptx export after impress212 merges. diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 71d4ac6..d81caf1 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1411,7 +1411,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( delete pIn; } } - if ( !aUniqueId.Len() ) + if ( !aUniqueId.getLength() ) { if ( pGraphicProvider ) { diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 26fcd2c..d76fb52 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -74,7 +74,7 @@ using ::com::sun::star::beans::XPropertySet; //============================ PPTWriter ================================== -PPTWriter::PPTWriter( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData, SvStorageRef& rSvStorage, +PPTWriter::PPTWriter( 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 ) : @@ -97,7 +97,7 @@ PPTWriter::PPTWriter( const std::vector< com::sun::star::beans::PropertyValue >& { } -void PPTWriter::exportPPTPre() +void PPTWriter::exportPPTPre( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData ) { if ( !mrStg.Is() ) return; @@ -132,7 +132,6 @@ void PPTWriter::exportPPTPre() { if ( (*aIter).Name.equals( sBaseURI ) ) { - rtl::OUString sBaseURI; (*aIter).Value >>= maBaseURI; break; } @@ -1498,10 +1497,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI ExportPPT( const std::v PPTWriter* pPPTWriter; sal_Bool bStatus = sal_False; - pPPTWriter = new PPTWriter( rMediaData, rSvStorage, rXModel, rXStatInd, pVBA, nCnvrtFlags ); + pPPTWriter = new PPTWriter( rSvStorage, rXModel, rXStatInd, pVBA, nCnvrtFlags ); if ( pPPTWriter ) { - pPPTWriter->exportPPT(); + pPPTWriter->exportPPT(rMediaData); bStatus = ( pPPTWriter->IsValid() == sal_True ); delete pPPTWriter; } diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 6096276..96f19c4 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -296,7 +296,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider sal_Bool IsValid() const { return mbStatus; }; - virtual void exportPPTPre(); + virtual void exportPPTPre( const std::vector< com::sun::star::beans::PropertyValue >& ); virtual void exportPPTPost( ); }; diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index f21db68..33a43d3 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -378,7 +378,7 @@ protected: 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 */ ) {} - virtual void exportPPTPre() {} + virtual void exportPPTPre( const std::vector< com::sun::star::beans::PropertyValue >& ) {} virtual void exportPPTPost() {} virtual sal_Bool ImplCreateDocument()=0; @@ -402,7 +402,7 @@ public: virtual ~PPTWriterBase(); - void exportPPT(); + void exportPPT(const std::vector< com::sun::star::beans::PropertyValue >&); sal_Bool InitSOIface(); sal_Bool GetPageByIndex( sal_uInt32 nIndex, PageType ); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index c310a5a..2191cbd 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -176,7 +176,7 @@ PPTWriterBase::~PPTWriterBase() // --------------------------------------------------------------------------------------------- -void PPTWriterBase::exportPPT() +void PPTWriterBase::exportPPT( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData ) { if ( !InitSOIface() ) return; @@ -211,7 +211,7 @@ void PPTWriterBase::exportPPT() maDestPageSize = MapSize( awt::Size( nWidth, nHeight ) ); DBG(printf( "call exportDocumentPre()\n")); - exportPPTPre(); + exportPPTPre(rMediaData); if ( !GetStyleSheets() ) return; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index b88fcc9..b0624b4 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -357,7 +357,14 @@ bool PowerPointExport::exportDocument() throw() mXModel.set( getModel(), UNO_QUERY ); mXStatusIndicator.set( getStatusIndicator(), UNO_QUERY ); - exportPPT(); + rtl::OUString sBaseURI( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); + std::vector< PropertyValue > aProperties; + PropertyValue aProperty; + aProperty.Name = sBaseURI; + aProperty.Value = makeAny( getFileUrl() ); + aProperties.push_back( aProperty ); + + exportPPT(aProperties); mPresentationFS->singleElementNS( XML_p, XML_sldSz, XML_cx, IS( PPTtoEMU( maDestPageSize.Width ) ), commit 5e68ba9322da2fcfec292239ef01726a64964945 Author: Thorsten Behrens <tbehr...@suse.com> Date: Wed Nov 23 23:21:38 2011 +0100 Removed, better fix just in via i#105675 diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index a398e76..0d3dc78 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -516,9 +516,7 @@ CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, Custo { mpTabControl = new TabControl( this, SdResId( 1 ) ); mpOKButton = new OKButton(this, SdResId( 1 ) ) ; - mpOKButton->SetStyle(WB_DEFBUTTON); mpCancelButton = new CancelButton(this, SdResId( 1 ) ); - mpCancelButton->SetStyle(WB_DEFBUTTON); mpHelpButton = new HelpButton(this, SdResId( 1 ) ); FreeResource(); commit 363868f040caab7b410ed480553855ffe42aa162 Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:49:30 2011 +0000 impress212: #i97241# fixed relative links * found as LGPLv3-only fix at svn rev 1167641 (http://svn.apache.org/viewvc?view=revision&revision=1167641) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 47077db..49b9589 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4174,7 +4174,7 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, const DffObjData& rObjData ) { SdrObject* pRet = NULL; - String aFilename; + String aFileName; String aLinkFileName, aLinkFilterName; Rectangle aVisArea; @@ -4187,7 +4187,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons { Graphic aGraf; // be sure this graphic is deleted before swapping out if( SeekToContent( DFF_Prop_pibName, rSt ) ) - MSDFFReadZString( rSt, aFilename, GetPropertyValue( DFF_Prop_pibName ), sal_True ); + MSDFFReadZString( rSt, aFileName, GetPropertyValue( DFF_Prop_pibName ), sal_True ); // UND, ODER folgendes: if( !( eFlags & mso_blipflagDoNotSave ) ) // Grafik embedded @@ -4362,30 +4362,22 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons if( bLinkGrf && !bGrfRead ) // sj: #i55484# if the graphic was embedded ( bGrfRead == true ) then { // we do not need to set a link. TODO: not to lose the information where the graphic is linked from - UniString aName( ::URIHelper::SmartRel2Abs( INetURLObject(maBaseURL), aFilename, URIHelper::GetMaybeFileHdl(), true, false, - INetURLObject::WAS_ENCODED, - INetURLObject::DECODE_UNAMBIGUOUS ) ); - - String aFilterName; - INetURLObject aURLObj( aName ); - - if( aURLObj.GetProtocol() == INET_PROT_NOT_VALID ) + INetURLObject aAbsURL; + if ( !INetURLObject( maBaseURL ).GetNewAbsURL( ByteString( aFileName, RTL_TEXTENCODING_UTF8 ), &aAbsURL ) ) { String aValidURL; - - if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aValidURL ) ) - aURLObj = INetURLObject( aValidURL ); + if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aFileName, aValidURL ) ) + aAbsURL = INetURLObject( aValidURL ); } - - if( aURLObj.GetProtocol() != INET_PROT_NOT_VALID ) + if( aAbsURL.GetProtocol() != INET_PROT_NOT_VALID ) { GraphicFilter &rGrfFilter = GraphicFilter::GetGraphicFilter(); - aFilterName = rGrfFilter.GetImportFormatName( - rGrfFilter.GetImportFormatNumberForShortName( aURLObj.getExtension() ) ); + aLinkFilterName = rGrfFilter.GetImportFormatName( + rGrfFilter.GetImportFormatNumberForShortName( aAbsURL.getExtension() ) ); + aLinkFileName = aAbsURL.GetMainURL( INetURLObject::DECODE_TO_IURI ); } - - aLinkFileName = aName; - aLinkFilterName = aFilterName; + else + aLinkFileName = aFileName; } } @@ -4399,11 +4391,11 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons if ( ( eFlags & mso_blipflagType ) != mso_blipflagComment ) { INetURLObject aURL; - aURL.SetSmartURL( aFilename ); + aURL.SetSmartURL( aFileName ); pRet->SetName( aURL.getBase() ); } else - pRet->SetName( aFilename ); + pRet->SetName( aFileName ); } } pRet->SetModel( pSdrModel ); // fuer GraphicLink erforderlich commit 70b02c18b95ef19bd224788efa491671e762ae23 Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:49:17 2011 +0000 impress212: #i114615# fixed hyperlink export (pdf) if exporting also notes pages * found as LGPLv3-only fix at svn rev 1167640 (http://svn.apache.org/viewvc?view=revision&revision=1167640) diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index fbbb52b..6bb561c 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -200,7 +200,7 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() ); if ( nPageCount ) { - pPDFExtOutDevData->SetIsExportNotes( bExportNotesPages ); + pPDFExtOutDevData->SetIsExportNotesPages( bExportNotesPages ); sal_Int32 nCurrentPage(0); StringRangeEnumerator::Iterator aIter = rRangeEnum.begin(); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index e21033e..146b93d 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1916,7 +1916,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r const rtl::OUString sIsBackgroundObjectsVisible( RTL_CONSTASCII_USTRINGPARAM( "IsBackgroundObjectsVisible" ) ); if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sIsBackgroundObjectsVisible ) ) xPagePropSet->getPropertyValue( sIsBackgroundObjectsVisible ) >>= bIsBackgroundObjectsVisible; - if ( mbImpressDoc && bIsBackgroundObjectsVisible ) + if ( mbImpressDoc && bIsBackgroundObjectsVisible && !pPDFExtOutDevData->GetIsExportNotesPages() ) { uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( xPage, uno::UNO_QUERY ); if ( xMasterPageTarget.is() ) @@ -1949,7 +1949,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r } // exporting transition effects to pdf - if ( mbImpressDoc && pPDFExtOutDevData->GetIsExportTransitionEffects() ) // #i39428# TransitionEffects not available for Draw + if ( mbImpressDoc && !pPDFExtOutDevData->GetIsExportNotesPages() && pPDFExtOutDevData->GetIsExportTransitionEffects() ) { const rtl::OUString sEffect( RTL_CONSTASCII_USTRINGPARAM( "Effect" ) ); const rtl::OUString sSpeed ( RTL_CONSTASCII_USTRINGPARAM( "Speed" ) ); diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx index 37dadb9..ab9f44e 100644 --- a/vcl/inc/vcl/pdfextoutdevdata.hxx +++ b/vcl/inc/vcl/pdfextoutdevdata.hxx @@ -86,6 +86,7 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData sal_Bool mbTaggedPDF; sal_Bool mbExportNotes; + sal_Bool mbExportNotesPages; sal_Bool mbTransitionEffects; sal_Bool mbUseLosslessCompression; sal_Bool mbReduceImageResolution; @@ -117,6 +118,9 @@ public : sal_Bool GetIsExportNotes() const; void SetIsExportNotes( const sal_Bool bExportNotes ); + sal_Bool GetIsExportNotesPages() const; + void SetIsExportNotesPages( const sal_Bool bExportNotesPages ); + sal_Bool GetIsExportTaggedPDF() const; void SetIsExportTaggedPDF( const sal_Bool bTaggedPDF ); diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 99326c2..bcbd9a5 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -509,6 +509,7 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) : mrOutDev ( rOutDev ), mbTaggedPDF ( sal_False ), mbExportNotes ( sal_True ), + mbExportNotesPages ( sal_False ), mbTransitionEffects ( sal_True ), mbUseLosslessCompression( sal_True ), mbReduceImageResolution ( sal_False ), @@ -567,6 +568,14 @@ void PDFExtOutDevData::SetIsExportNotes( const sal_Bool bExportNotes ) { mbExportNotes = bExportNotes; } +sal_Bool PDFExtOutDevData::GetIsExportNotesPages() const +{ + return mbExportNotesPages; +} +void PDFExtOutDevData::SetIsExportNotesPages( const sal_Bool bExportNotesPages ) +{ + mbExportNotesPages = bExportNotesPages; +} sal_Bool PDFExtOutDevData::GetIsExportTaggedPDF() const { return mbTaggedPDF; commit d0cfb996261be5b604742780a304b2ea31825723 Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:48:07 2011 +0000 impress212: #i114615# fixed hyperlinks if exporting impress notes pages to pdf * found as LGPLv3-only fix at svn rev 1167635 (http://svn.apache.org/viewvc?view=revision&revision=1167635) diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 466132e..fbbb52b 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -181,12 +181,16 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, Any* pFirstPage = NULL; Any* pLastPage = NULL; + sal_Bool bExportNotesPages = sal_False; + for( sal_Int32 nData = 0, nDataCount = rRenderOptions.getLength(); nData < nDataCount; ++nData ) { if( rRenderOptions[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFirstPage" ) ) ) pFirstPage = &rRenderOptions[ nData ].Value; else if( rRenderOptions[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsLastPage" ) ) ) pLastPage = &rRenderOptions[ nData ].Value; + else if( rRenderOptions[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ) ) + rRenderOptions[ nData ].Value >>= bExportNotesPages; } OutputDevice* pOut = rPDFWriter.GetReferenceDevice(); @@ -196,6 +200,8 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() ); if ( nPageCount ) { + pPDFExtOutDevData->SetIsExportNotes( bExportNotesPages ); + sal_Int32 nCurrentPage(0); StringRangeEnumerator::Iterator aIter = rRangeEnum.begin(); StringRangeEnumerator::Iterator aEnd = rRangeEnum.end(); commit ac0a752acdb8ce769f0830776209342f2ed3a68c Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:44:45 2011 +0000 impress212: export images with relative links # User Daniel Rentz [dr] <daniel.re...@oracle.com> * found as LGPLv3-only fix at svn rev 1167625 (http://svn.apache.org/viewvc?view=revision&revision=1167625) diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index cf60b12..9102025 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -46,6 +46,7 @@ #include <unotools/tempfile.hxx> #include <unotools/ucbstreamhelper.hxx> #include <svx/sdasitm.hxx> +#include <sfx2/docfile.hxx> #include <sot/exchange.hxx> #include "xeescher.hxx" @@ -81,6 +82,7 @@ using ::com::sun::star::script::XEventAttacherManager; XclEscherExGlobal::XclEscherExGlobal( const XclExpRoot& rRoot ) : XclExpRoot( rRoot ) { + SetBaseURI( GetMedium().GetBaseURL( true ) ); } SvStream* XclEscherExGlobal::ImplQueryPictureStream() commit 6ad3c553a9bd3b8fb91c45204f0c833f52c52431 Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:44:32 2011 +0000 impress212: #i97241# added relative links * found as LGPLv3-only fix at svn rev 1167624 (http://svn.apache.org/viewvc?view=revision&revision=1167624) diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx index 5a03167..94f700f 100644 --- a/filter/inc/filter/msfilter/escherex.hxx +++ b/filter/inc/filter/msfilter/escherex.hxx @@ -42,6 +42,7 @@ #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyState.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/drawing/BitmapMode.hpp> #include <com/sun/star/drawing/Hatch.hpp> #include <svx/msdffdef.hxx> @@ -1086,6 +1087,8 @@ class MSFILTER_DLLPUBLIC EscherGraphicProvider sal_uInt32 mnBlibBufSize; sal_uInt32 mnBlibEntrys; + rtl::OUString maBaseURI; + protected: sal_uInt32 ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry ); @@ -1109,6 +1112,9 @@ public: sal_Bool GetPrefSize( const sal_uInt32 nBlibId, Size& rSize, MapMode& rMapMode ); + void SetBaseURI( const rtl::OUString& rBaseURI ) { maBaseURI = rBaseURI; }; + const rtl::OUString& GetBaseURI() { return maBaseURI; }; + EscherGraphicProvider( sal_uInt32 nFlags = _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES ); ~EscherGraphicProvider(); @@ -1551,12 +1557,12 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable protected: typedef ::std::auto_ptr< ImplEscherExSdr > ImplEscherExSdrPtr; - EscherExGlobalRef mxGlobal; - ImplEscherExSdrPtr mpImplEscherExSdr; - SvStream* mpOutStrm; + EscherExGlobalRef mxGlobal; + ImplEscherExSdrPtr mpImplEscherExSdr; + SvStream* mpOutStrm; sal_uInt32 mnStrmStartOfs; - std::vector< sal_uInt32 > mOffsets; - std::vector< sal_uInt16 > mRecTypes; + std::vector< sal_uInt32 > mOffsets; + std::vector< sal_uInt16 > mRecTypes; sal_uInt32 mnCurrentDg; sal_uInt32 mnCountOfs; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 21e6f2d..71d4ac6 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1411,6 +1411,21 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( delete pIn; } } + if ( !aUniqueId.Len() ) + { + if ( pGraphicProvider ) + { + const rtl::OUString& rBaseURI( pGraphicProvider->GetBaseURI() ); + INetURLObject aBaseURI( rBaseURI ); + if( aBaseURI.GetProtocol() == aTmp.GetProtocol() ) + { + rtl::OUString aRelUrl( INetURLObject::GetRelURL( rBaseURI, aGraphicUrl, + INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DETECT ) ); + if ( aRelUrl.getLength() ) + aGraphicUrl = aRelUrl; + } + } + } } } diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 832e7b0..26fcd2c 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -74,7 +74,7 @@ using ::com::sun::star::beans::XPropertySet; //============================ PPTWriter ================================== -PPTWriter::PPTWriter( SvStorageRef& rSvStorage, +PPTWriter::PPTWriter( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData, 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 ) : @@ -126,7 +126,19 @@ void PPTWriter::exportPPTPre() if ( !mpPicStrm ) mpPicStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Pictures" ) ) ); - mpPptEscherEx = new PptEscherEx( *mpStrm ); + const String sBaseURI( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ); + std::vector< com::sun::star::beans::PropertyValue >::const_iterator aIter( rMediaData.begin() ); + while( aIter != rMediaData.end() ) + { + if ( (*aIter).Name.equals( sBaseURI ) ) + { + rtl::OUString sBaseURI; + (*aIter).Value >>= maBaseURI; + break; + } + aIter++; + } + mpPptEscherEx = new PptEscherEx( *mpStrm, maBaseURI ); } void PPTWriter::exportPPTPost( ) @@ -1478,7 +1490,7 @@ sal_Bool PPTWriter::ImplWriteAtomEnding() // - exported function - // --------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI ExportPPT( SvStorageRef& rSvStorage, +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData, 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 ) @@ -1486,7 +1498,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI ExportPPT( SvStorageRef PPTWriter* pPPTWriter; sal_Bool bStatus = sal_False; - pPPTWriter = new PPTWriter( rSvStorage, rXModel, rXStatInd, pVBA, nCnvrtFlags ); + pPPTWriter = new PPTWriter( rMediaData, rSvStorage, rXModel, rXStatInd, pVBA, nCnvrtFlags ); if ( pPPTWriter ) { pPPTWriter->exportPPT(); diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 5695aa5..6096276 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -177,8 +177,8 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider sal_uInt32 mnStatMaxValue; sal_uInt32 mnLatestStatValue; - EscherGraphicProvider* mpGraphicProvider; std::vector<rtl::OUString> maSlideNameList; + rtl::OUString maBaseURI; ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText > mXText; // TextRef des globalen Text ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > mXCursor; diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 10932ac..45d2abe 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -405,7 +405,18 @@ sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const String& rBookmarkURL, const s const String& rStringVer0, const String& rStringVer1, const String& rStringVer2, const String& rStringVer3 ) { sal_uInt32 nHyperId = ++mnExEmbed; - maHyperlink.Insert( new EPPTHyperlink( rBookmarkURL, nType ), LIST_APPEND ); + + rtl::OUString sBookmarkURL( rBookmarkURL ); + INetURLObject aBaseURI( maBaseURI ); + INetURLObject aBookmarkURI( rBookmarkURL ); + if( aBaseURI.GetProtocol() == aBookmarkURI.GetProtocol() ) + { + rtl::OUString aRelUrl( INetURLObject::GetRelURL( maBaseURI, rBookmarkURL, + INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DETECT ) ); + if ( aRelUrl.getLength() ) + sBookmarkURL = aRelUrl; + } + maHyperlink.Insert( new EPPTHyperlink( sBookmarkURL, nType ), LIST_APPEND ); *mpExEmbed << (sal_uInt16)0xf << (sal_uInt16)EPP_ExHyperlink diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index 7714ca4..70e1b06 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -36,9 +36,10 @@ // --------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------- -PptEscherEx::PptEscherEx( SvStream& rOutStrm ) : +PptEscherEx::PptEscherEx( SvStream& rOutStrm, const rtl::OUString& rBaseURI ) : EscherEx( EscherExGlobalRef( new EscherExGlobal ), rOutStrm ) { + mxGlobal->SetBaseURI( rBaseURI ); mnCurrentDg = 0; } diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx index 4b77a1a..1d053af 100644 --- a/sd/source/filter/eppt/escherex.hxx +++ b/sd/source/filter/eppt/escherex.hxx @@ -60,7 +60,7 @@ class PptEscherEx : public EscherEx public: - PptEscherEx( SvStream& rOut ); + PptEscherEx( SvStream& rOut, const rtl::OUString& ); ~PptEscherEx(); void OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance = 0 ); diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 62ddab2..8a60567 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; -typedef sal_Bool ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&, +typedef sal_Bool ( __LOADONCALLAPI *ExportPPT )( const std::vector< com::sun::star::beans::PropertyValue >&, SvStorageRef&, Reference< XModel > &, Reference< XStatusIndicator > &, SvMemoryStream*, sal_uInt32 nCnvrtFlags ); @@ -166,7 +166,14 @@ sal_Bool SdPPTFilter::Export() if( mbShowProgress ) CreateStatusIndicator(); - bRet = PPTExport( xStorRef, mxModel, mxStatusIndicator, pBas, nCnvrtFlags ); + rtl::OUString sBaseURI( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); + std::vector< PropertyValue > aProperties; + PropertyValue aProperty; + aProperty.Name = sBaseURI; + aProperty.Value = makeAny( mrMedium.GetBaseURL( true ) ); + aProperties.push_back( aProperty ); + + bRet = PPTExport( aProperties, xStorRef, mxModel, mxStatusIndicator, pBas, nCnvrtFlags ); xStorRef->Commit(); } } commit 619ea0c6d3b8fb4390bf5e82f1b44608c3cd878d Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:44:11 2011 +0000 impress212: #i71731# fixed fill bitmap - pattern import # User sj <s...@openoffice.org> * found as LGPLv3-only fix at svn rev 1167623 (http://svn.apache.org/viewvc?view=revision&revision=1167623) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index c26f214..47077db 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1737,8 +1737,6 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co aCol2 = rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor ), DFF_Prop_fillBackColor ); XOBitmap aXOBitmap; - - // Bitmap einsetzen aXOBitmap.SetBitmap( aBmp ); aXOBitmap.SetBitmapType( XBITMAP_IMPORT ); @@ -1747,17 +1745,9 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co aXOBitmap.Bitmap2Array(); aXOBitmap.SetBitmapType( XBITMAP_8X8 ); aXOBitmap.SetPixelSize( aBmp.GetSizePixel() ); - - if( aXOBitmap.GetBackgroundColor() == COL_BLACK ) - { - aXOBitmap.SetPixelColor( aCol1 ); - aXOBitmap.SetBackgroundColor( aCol2 ); - } - else - { - aXOBitmap.SetPixelColor( aCol2 ); - aXOBitmap.SetBackgroundColor( aCol1 ); - } + aXOBitmap.SetPixelColor( aCol1 ); + aXOBitmap.SetBackgroundColor( aCol2 ); + aXOBitmap.Array2Bitmap(); } rSet.Put( XFillBitmapItem( String(), aXOBitmap ) ); } commit 246c64c6a4375ab22dc8baa70093d373bea64ff2 Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:43:48 2011 +0000 impress212: #i117042# added fix for i_updt1.bas testcase * found as LGPLv3-only fix at svn rev 1167621 (http://svn.apache.org/viewvc?view=revision&revision=1167621) diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 342cbf3..ffeee13 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -89,11 +89,11 @@ using namespace ::com::sun::star::io; // ------------------ -const Graphic ImpLoadLinkedGraphic( const String& rFileName, const String& rFilterName ) +const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilterName ) { Graphic aGraphic; - SfxMedium xMed( rFileName, STREAM_STD_READ, sal_True ); + SfxMedium xMed( aFileName, STREAM_STD_READ, sal_True ); xMed.DownLoad(); SvStream* pInStrm = xMed.GetInStream(); @@ -102,9 +102,9 @@ const Graphic ImpLoadLinkedGraphic( const String& rFileName, const String& rFilt pInStrm->Seek( STREAM_SEEK_TO_BEGIN ); GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); - const sal_uInt16 nFilter = rFilterName.Len() && rGF.GetImportFormatCount() - ? rGF.GetImportFormatNumber( rFilterName ) - : GRFILTER_FORMAT_DONTKNOW; + const sal_uInt16 nFilter = aFilterName.Len() && rGF.GetImportFormatCount() + ? rGF.GetImportFormatNumber( aFilterName ) + : GRFILTER_FORMAT_DONTKNOW; String aEmptyStr; com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aFilterData( 1 ); @@ -149,7 +149,7 @@ public: void SAL_CALL Terminate( void ); - sal_Bool GraphicLinkChanged( const String& rFileName ){ return mrFileName != rFileName; }; + sal_Bool GraphicLinkChanged( const String& rFileName ){ return maFileName != rFileName; }; protected: @@ -165,17 +165,16 @@ protected: private: - ::osl::Mutex maMutex; - const String& mrFileName; - const String& mrFilterName; + const String maFileName; + const String maFilterName; SdrGraphicLink& mrGraphicLink; - volatile bool mbIsTerminated; + volatile bool mbIsTerminated; }; SdrGraphicUpdater::SdrGraphicUpdater( const String& rFileName, const String& rFilterName, SdrGraphicLink& rGraphicLink ) -: mrFileName( rFileName ) -, mrFilterName( rFilterName ) +: maFileName( rFileName ) +, maFilterName( rFilterName ) , mrGraphicLink( rGraphicLink ) , mbIsTerminated( sal_False ) { @@ -188,7 +187,6 @@ SdrGraphicUpdater::~SdrGraphicUpdater( void ) void SdrGraphicUpdater::Terminate() { - ::osl::MutexGuard aGuard( maMutex ); mbIsTerminated = sal_True; } @@ -199,8 +197,7 @@ void SAL_CALL SdrGraphicUpdater::onTerminated(void) void SAL_CALL SdrGraphicUpdater::run(void) { - Graphic aGraphic( ImpLoadLinkedGraphic( mrFileName, mrFilterName ) ); - ::osl::MutexGuard aGuard(maMutex); + Graphic aGraphic( ImpLoadLinkedGraphic( maFileName, maFilterName ) ); SolarMutexGuard aSolarGuard; if ( !mbIsTerminated ) { commit 9f62089d7228f71fd532dc6ca00f2fd70c976199 Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:43:35 2011 +0000 impress212: #i81610# fixed animation export # User sj <s...@openoffice.org> * found as LGPLv3-only fix at svn rev 1167620 (http://svn.apache.org/viewvc?view=revision&revision=1167620) diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx index a6385a9..4cdd34d 100644 --- a/svtools/source/filter/filter.cxx +++ b/svtools/source/filter/filter.cxx @@ -835,19 +835,17 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r aMap.SetScaleY( aFrac ); Size aOldSize = aBitmap.GetSizePixel(); - aBitmap.SetPrefMapMode( aMap ); - aBitmap.SetPrefSize( Size( aOldSize.Width() * 100, + aGraphic = rGraphic; + aGraphic.SetPrefMapMode( aMap ); + aGraphic.SetPrefSize( Size( aOldSize.Width() * 100, aOldSize.Height() * 100 ) ); - - aGraphic = Graphic( aBitmap ); } // Groesse wird eingestellt else if( nMode == 2 ) { - BitmapEx aBitmapEx( rGraphic.GetBitmapEx() ); - aBitmapEx.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); - aBitmapEx.SetPrefSize( Size( nLogicalWidth, nLogicalHeight ) ); - aGraphic = Graphic( aBitmapEx ); + aGraphic = rGraphic; + aGraphic.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); + aGraphic.SetPrefSize( Size( nLogicalWidth, nLogicalHeight ) ); } else aGraphic = rGraphic; commit 2663cd34e34d4cf7796b328b7679426fb960cc07 Author: erack <e...@openoffice.org> Date: Sat Sep 10 22:43:10 2011 +0000 impress212: #i105675# better keyboard handling in animation create dialog * found as LGPLv3-only fix at svn rev 1167618 (http://svn.apache.org/viewvc?view=revision&revision=1167618) diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.src b/sd/source/ui/animations/CustomAnimationCreateDialog.src index 62abf70..b30c1fa 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.src +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.src @@ -81,12 +81,14 @@ TabDialog DLG_CUSTOMANIMATION_CREATE Pos = MAP_APPFONT ( 3 , 223 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; + DefButton = TRUE; }; CancelButton 1 { Pos = MAP_APPFONT ( 56 , 223 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; + DefButton = TRUE; }; HelpButton 1 { _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits