View | Details | Raw Unified | Return to issue 119753
Collapse All | Expand All

(-)filter/inc/filter/msfilter/escherex.hxx (+3 lines)
Lines 1202-1207 Link Here
1202
		sal_Bool	CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape );
1202
		sal_Bool	CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape );
1203
        sal_Bool    CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject );
1203
        sal_Bool    CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject );
1204
1204
1205
		sal_Bool    CreateGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape,
1206
			const GraphicObject& rGraphicObj );
1207
        sal_Bool    CreateMediaGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXMediaObject );
1205
        /** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */
1208
        /** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */
1206
        sal_Bool    CreateEmbeddedBitmapProperties( const ::rtl::OUString& rBitmapUrl,
1209
        sal_Bool    CreateEmbeddedBitmapProperties( const ::rtl::OUString& rBitmapUrl,
1207
                        ::com::sun::star::drawing::BitmapMode eBitmapMode );
1210
                        ::com::sun::star::drawing::BitmapMode eBitmapMode );
(-)filter/source/msfilter/escherex.cxx (-25 / +49 lines)
Lines 24-29 Link Here
24
// MARKER(update_precomp.py): autogen include statement, do not remove
24
// MARKER(update_precomp.py): autogen include statement, do not remove
25
#include "precompiled_filter.hxx"
25
#include "precompiled_filter.hxx"
26
#include "eschesdo.hxx"
26
#include "eschesdo.hxx"
27
#include <svx/svdomedia.hxx>
27
#include <svx/xflftrit.hxx>
28
#include <svx/xflftrit.hxx>
28
#include <filter/msfilter/escherex.hxx>
29
#include <filter/msfilter/escherex.hxx>
29
#include <svx/unoapi.hxx>
30
#include <svx/unoapi.hxx>
Lines 1324-1361 Link Here
1324
			if ( pGraphic )
1325
			if ( pGraphic )
1325
			{
1326
			{
1326
				GraphicObject aGraphicObject( *pGraphic );
1327
				GraphicObject aGraphicObject( *pGraphic );
1327
                ByteString aUniqueId( aGraphicObject.GetUniqueID() );
1328
                bRetValue = CreateGraphicProperties( rXShape,aGraphicObject );
1328
				if ( aUniqueId.Len() )
1329
				// End
1329
				{
1330
			}
1330
					AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture );
1331
		}
1331
					uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
1332
	}
1333
	return bRetValue;
1334
}
1332
1335
1333
					if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect && aXPropSet.is() )
1336
sal_Bool EscherPropertyContainer::CreateGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape ,const GraphicObject& rGraphicObj )
1334
					{
1337
{
1335
						::com::sun::star::uno::Any aAny;
1338
	sal_Bool	bRetValue = sal_False;
1336
						::com::sun::star::awt::Rectangle* pVisArea = NULL;
1339
	ByteString aUniqueId( rGraphicObj.GetUniqueID() );
1337
						if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ) ) )
1340
	if ( aUniqueId.Len() )
1338
						{
1341
	{
1339
							pVisArea = new ::com::sun::star::awt::Rectangle;
1342
		AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture );
1340
							aAny >>= (*pVisArea);
1343
		uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
1341
						}
1344
1342
						Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
1345
		if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect && aXPropSet.is() )
1343
						sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, pVisArea, NULL );
1346
		{
1344
						if ( nBlibId )
1347
			::com::sun::star::uno::Any aAny;
1345
						{
1348
			::com::sun::star::awt::Rectangle* pVisArea = NULL;
1346
							AddOpt( ESCHER_Prop_pib, nBlibId, sal_True );
1349
			if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ) ) )
1347
							ImplCreateGraphicAttributes( aXPropSet, nBlibId, sal_False );
1350
			{
1348
							bRetValue = sal_True;
1351
				pVisArea = new ::com::sun::star::awt::Rectangle;
1349
						}
1352
				aAny >>= (*pVisArea);
1350
						delete pVisArea;
1351
					}
1352
				}
1353
			}
1353
			}
1354
			Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
1355
			sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, pVisArea, NULL );
1356
			if ( nBlibId )
1357
			{
1358
				AddOpt( ESCHER_Prop_pib, nBlibId, sal_True );
1359
				ImplCreateGraphicAttributes( aXPropSet, nBlibId, sal_False );
1360
				bRetValue = sal_True;
1361
			}
1362
			delete pVisArea;
1354
		}
1363
		}
1355
	}
1364
	}
1356
	return bRetValue;
1365
	return bRetValue;
1357
}
1366
}
1358
1367
1368
sal_Bool EscherPropertyContainer::CreateMediaGraphicProperties(
1369
	const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
1370
{
1371
	sal_Bool	bRetValue = sal_False;
1372
	if ( rXShape.is() )
1373
	{
1374
		SdrObject* pSdrMedia( GetSdrObjectFromXShape( rXShape ) );	// SJ: leaving unoapi, because currently there is
1375
		if ( pSdrMedia && pSdrMedia->ISA( SdrMediaObj ) )				// no access to the native graphic object
1376
		{			
1377
			GraphicObject aGraphicObject( ((SdrMediaObj*)pSdrMedia)->getGraphic() );
1378
			bRetValue = CreateGraphicProperties( rXShape, aGraphicObject );
1379
		}
1380
	}
1381
	return bRetValue;
1382
}
1359
1383
1360
sal_Bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const ByteString& rUniqueId )
1384
sal_Bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const ByteString& rUniqueId )
1361
{
1385
{
(-)sd/source/filter/eppt/epptso.cxx (-1 / +14 lines)
Lines 5195-5201 Link Here
5195
				mnAngle = 0;
5195
				mnAngle = 0;
5196
                mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
5196
                mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
5197
                ImplCreateShape( ESCHER_ShpInst_PictureFrame, 0xa00, aSolverContainer );
5197
                ImplCreateShape( ESCHER_ShpInst_PictureFrame, 0xa00, aSolverContainer );
5198
5198
				if ( aPropOpt.CreateMediaGraphicProperties( mXShape ) )
5199
					aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
5199
				::com::sun::star::uno::Any aAny;
5200
				::com::sun::star::uno::Any aAny;
5200
				if ( PropValue::GetPropertyValue( aAny, mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "MediaURL" ) ), sal_True ) )
5201
				if ( PropValue::GetPropertyValue( aAny, mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "MediaURL" ) ), sal_True ) )
5201
				{
5202
				{
Lines 5246-5251 Link Here
5246
									 << (sal_uInt16)EPP_ExObjRefAtom
5247
									 << (sal_uInt16)EPP_ExObjRefAtom
5247
									 << (sal_uInt32)4
5248
									 << (sal_uInt32)4
5248
									 << nRefId;
5249
									 << nRefId;
5250
						// write EPP_InteractiveInfo container for no_action
5251
						*pClientData << (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) << (sal_uInt32)24;
5252
						*pClientData << (sal_uInt16)0
5253
									 << (sal_uInt16)EPP_InteractiveInfoAtom
5254
									 << (sal_uInt32)16
5255
									 << (sal_uInt32) 0
5256
									 << (sal_uInt32) 0
5257
									 << (sal_uInt8) 6
5258
									 << (sal_uInt8) 0
5259
									 << (sal_uInt8) 0
5260
									 << (sal_uInt8) 0
5261
									 << (sal_uInt32) 0;
5249
					}
5262
					}
5250
				}
5263
				}
5251
			}
5264
			}
(-)sd/source/filter/ppt/pptin.cxx (+2 lines)
Lines 2051-2056 Link Here
2051
												if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aStr, aRetVal ) )
2051
												if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aStr, aRetVal ) )
2052
												{
2052
												{
2053
													aRetVal = INetURLObject( aRetVal ).GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
2053
													aRetVal = INetURLObject( aRetVal ).GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
2054
												}else{ 
2055
													aRetVal = aStr;
2054
												}
2056
												}
2055
											}
2057
											}
2056
										}
2058
										}

Return to issue 119753