summaryrefslogtreecommitdiff
path: root/filter/source/msfilter/escherex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/msfilter/escherex.cxx')
-rw-r--r--filter/source/msfilter/escherex.cxx62
1 files changed, 31 insertions, 31 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index d6edcb772a28..b8df2b08b1a8 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1279,8 +1279,8 @@ sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties(
const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pSdrOLE2)->GetGraphic();
if ( pGraphic )
{
- GraphicObject aGraphicObject( *pGraphic );
- bRetValue = CreateGraphicProperties( rXShape,aGraphicObject );
+ rtl::Reference< GraphicObject > xGraphicObject( GraphicObject::Create( *pGraphic ) );
+ bRetValue = CreateGraphicProperties( rXShape, xGraphicObject );
}
}
}
@@ -1328,8 +1328,8 @@ sal_Bool EscherPropertyContainer::CreateMediaGraphicProperties(
SdrObject* pSdrMedia( GetSdrObjectFromXShape( rXShape ) ); // SJ: leaving unoapi, because currently there is
if ( pSdrMedia && pSdrMedia->ISA( SdrMediaObj ) ) // no access to the native graphic object
{
- GraphicObject aGraphicObject( ((SdrMediaObj*)pSdrMedia)->getSnapshot() );
- bRetValue = CreateGraphicProperties( rXShape, aGraphicObject );
+ rtl::Reference< GraphicObject > xGraphicObject( GraphicObject::Create( ((SdrMediaObj*)pSdrMedia)->getSnapshot() ) );
+ bRetValue = CreateGraphicProperties( rXShape, xGraphicObject );
}
}
return bRetValue;
@@ -1385,7 +1385,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedBitmapProperties(
namespace {
-GraphicObject lclDrawHatch( const ::com::sun::star::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground, const Rectangle& rRect )
+rtl::Reference< GraphicObject > lclDrawHatch( const ::com::sun::star::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground, const Rectangle& rRect )
{
// #i121183# For hatch, do no longer create a bitmap with the fixed size of 28x28 pixels. Also
// do not create a bitmap in page size, that would explode file sizes (and have no good quality).
@@ -1408,7 +1408,7 @@ GraphicObject lclDrawHatch( const ::com::sun::star::drawing::Hatch& rHatch, cons
aMtf.SetPrefMapMode(MapMode(MAP_100TH_MM));
aMtf.SetPrefSize(rRect.GetSize());
- return GraphicObject(Graphic(aMtf));
+ return GraphicObject::Create(Graphic(aMtf));
}
} // namespace
@@ -1417,8 +1417,8 @@ GraphicObject lclDrawHatch( const ::com::sun::star::drawing::Hatch& rHatch, cons
sal_Bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const ::com::sun::star::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground )
{
const Rectangle aRect(pShapeBoundRect ? *pShapeBoundRect : Rectangle(Point(0,0), Size(28000, 21000)));
- GraphicObject aGraphicObject = lclDrawHatch( rHatch, rBackColor, bFillBackground, aRect );
- OString aUniqueId = aGraphicObject.GetUniqueID();
+ rtl::Reference< GraphicObject > xGraphicObject( lclDrawHatch( rHatch, rBackColor, bFillBackground, aRect ) );
+ OString aUniqueId = xGraphicObject->GetUniqueID();
sal_Bool bRetValue = ImplCreateEmbeddedBmp( aUniqueId );
if ( bRetValue )
AddOpt( ESCHER_Prop_fillType, ESCHER_FillTexture );
@@ -1437,7 +1437,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
sal_Bool bMirrored = sal_False;
sal_Bool bRotate = sal_True;
GraphicAttr* pGraphicAttr = NULL;
- GraphicObject aGraphicObject;
+ rtl::Reference< GraphicObject > mxGraphicObject;
OUString aGraphicUrl;
OString aUniqueId;
bool bIsGraphicMtf(false);
@@ -1470,9 +1470,9 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
sal_uInt32 nErrCode = GraphicConverter::Import( aTemp, aGraphic, CVT_WMF );
if ( nErrCode == ERRCODE_NONE )
{
- aGraphicObject = aGraphic;
- aUniqueId = aGraphicObject.GetUniqueID();
- bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+ mxGraphicObject = GraphicObject::Create( aGraphic );
+ aUniqueId = mxGraphicObject->GetUniqueID();
+ bIsGraphicMtf = mxGraphicObject->GetType() == GRAPHIC_GDIMETAFILE;
}
}
}
@@ -1486,9 +1486,9 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
{
BitmapEx aBitmapEx( VCLUnoHelper::GetBitmap( xBmp ) );
Graphic aGraphic( aBitmapEx );
- aGraphicObject = aGraphic;
- aUniqueId = aGraphicObject.GetUniqueID();
- bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+ mxGraphicObject = GraphicObject::Create( aGraphic );
+ aUniqueId = mxGraphicObject->GetUniqueID();
+ bIsGraphicMtf = mxGraphicObject->GetType() == GRAPHIC_GDIMETAFILE;
}
}
}
@@ -1518,10 +1518,10 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
}
const Rectangle aRect(Point(0, 0), pShapeBoundRect ? pShapeBoundRect->GetSize() : Size(28000, 21000));
- aGraphicObject = lclDrawHatch( aHatch, aBackColor, bFillBackground, aRect );
- aUniqueId = aGraphicObject.GetUniqueID();
+ mxGraphicObject = lclDrawHatch( aHatch, aBackColor, bFillBackground, aRect );
+ aUniqueId = mxGraphicObject->GetUniqueID();
eBitmapMode = ::com::sun::star::drawing::BitmapMode_REPEAT;
- bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+ bIsGraphicMtf = mxGraphicObject->GetType() == GRAPHIC_GDIMETAFILE;
}
}
@@ -1611,8 +1611,8 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
if ( nErrCode == ERRCODE_NONE )
{
// no.
- aGraphicObject = aGraphic;
- aUniqueId = aGraphicObject.GetUniqueID();
+ mxGraphicObject = GraphicObject::Create(aGraphic);
+ aUniqueId = mxGraphicObject->GetUniqueID();
}
// else: simply keep the graphic link
delete pIn;
@@ -3813,8 +3813,8 @@ MSO_SPT EscherPropertyContainer::GetCustomShapeType( const uno::Reference< drawi
return GetCustomShapeType( rXShape, nMirrorFlags, aShapeType );
}
-//Implement for form control export
-sal_Bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape)
+// Implement for form control export
+sal_Bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape)
{
SdrObject* pShape = GetSdrObjectFromXShape( rXShape );
if ( pShape )
@@ -3822,8 +3822,8 @@ sal_Bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const ::co
SdrModel* pMod = pShape->GetModel();
Graphic aGraphic(SdrExchangeView::GetObjGraphic( pMod, pShape));
- GraphicObject aGraphicObject = aGraphic;
- OString aUniqueId = aGraphicObject.GetUniqueID();
+ rtl::Reference< GraphicObject > xGraphicObject( GraphicObject::Create( aGraphic ) );
+ OString aUniqueId = xGraphicObject->GetUniqueID();
if ( aUniqueId.getLength() )
{
if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect )
@@ -3979,13 +3979,13 @@ sal_Bool EscherPropertyValueHelper::GetPropertyValue(
return eRetValue;
}
-EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject& rObject, const OString& rId,
+EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const rtl::Reference< GraphicObject > &xObject, const OString& rId,
const GraphicAttr* pGraphicAttr ) :
mnPictureOffset ( nPictureOffset ),
mnRefCount ( 1 ),
mnSizeExtra ( 0 ),
- maPrefSize ( rObject.GetPrefSize() ),
- maPrefMapMode ( rObject.GetPrefMapMode() ),
+ maPrefSize ( xObject->GetPrefSize() ),
+ maPrefMapMode ( xObject->GetPrefMapMode() ),
mbIsEmpty ( sal_True )
{
mbIsNativeGraphicPossible = ( pGraphicAttr == NULL );
@@ -3994,7 +3994,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
sal_uInt32 nLen = static_cast<sal_uInt32>(rId.getLength());
const sal_Char* pData = rId.getStr();
- GraphicType eType( rObject.GetType() );
+ GraphicType eType( xObject->GetType() );
if ( nLen && pData && ( eType != GRAPHIC_NONE ) )
{
mnIdentifier[ 0 ] = rtl_crc32( 0,pData, nLen );
@@ -4221,9 +4221,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
const Rectangle& /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr )
{
sal_uInt32 nBlibId = 0;
- GraphicObject aGraphicObject( rId );
+ rtl::Reference< GraphicObject > xGraphicObject = GraphicObject::Create( rId );
- EscherBlibEntry* p_EscherBlibEntry = new EscherBlibEntry( rPicOutStrm.Tell(), aGraphicObject, rId, pGraphicAttr );
+ EscherBlibEntry* p_EscherBlibEntry = new EscherBlibEntry( rPicOutStrm.Tell(), xGraphicObject, rId, pGraphicAttr );
if ( !p_EscherBlibEntry->IsEmpty() )
{
for ( sal_uInt32 i = 0; i < mnBlibEntrys; i++ )
@@ -4238,7 +4238,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
sal_Bool bUseNativeGraphic( sal_False );
- Graphic aGraphic( aGraphicObject.GetTransformedGraphic( pGraphicAttr ) );
+ Graphic aGraphic( mxGraphicObject->GetTransformedGraphic( pGraphicAttr ) );
GfxLink aGraphicLink;
SvMemoryStream aStream;