summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-02-22 07:10:02 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-02-25 11:15:05 +0100
commitc8b1432e8fd2c6a7d3d0039816884f33dafb97cb (patch)
treed0fd4a6ecdc94617c5a045ae29966ec0da222a79 /svx
parentab3890b5f4ff4654eae7360d0cf34f3e26a1026f (diff)
remove "FillBitmapURL" property
Change-Id: Icac13a412ae16e4b367362ca85a37fa29802c68b Reviewed-on: https://gerrit.libreoffice.org/50169 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx34
1 files changed, 5 insertions, 29 deletions
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 8e28d1ab2646..fa318829e613 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -252,7 +252,6 @@ bool XFillBitmapItem::QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId) const
// needed for complete item (MID 0)
OUString aInternalName;
- OUString aURL;
css::uno::Reference< css::awt::XBitmap > xBmp;
if( nMemberId == MID_NAME )
@@ -264,23 +263,14 @@ bool XFillBitmapItem::QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId) const
aInternalName = GetName();
}
- if (nMemberId == MID_GRAFURL)
- {
- aURL = UNO_NAME_GRAPHOBJ_URLPREFIX;
- aURL += OStringToOUString(
- GetGraphicObject().GetUniqueID(),
- RTL_TEXTENCODING_ASCII_US);
- }
if( nMemberId == MID_BITMAP ||
nMemberId == 0 )
{
- xBmp.set(VCLUnoHelper::CreateBitmap(GetGraphicObject().GetGraphic().GetBitmapEx()));
+ xBmp.set(GetGraphicObject().GetGraphic().GetXGraphic(), uno::UNO_QUERY);
}
if( nMemberId == MID_NAME )
rVal <<= aApiName;
- else if( nMemberId == MID_GRAFURL )
- rVal <<= aURL;
else if( nMemberId == MID_BITMAP )
rVal <<= xBmp;
else
@@ -305,12 +295,10 @@ bool XFillBitmapItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
nMemberId &= ~CONVERT_TWIPS;
OUString aName;
- OUString aURL;
css::uno::Reference< css::awt::XBitmap > xBmp;
css::uno::Reference< css::graphic::XGraphic > xGraphic;
bool bSetName = false;
- bool bSetURL = false;
bool bSetBitmap = false;
if( nMemberId == MID_NAME )
@@ -341,31 +329,19 @@ bool XFillBitmapItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
{
SetName( aName );
}
- if( bSetURL )
- {
- GraphicObject aGraphicObject = GraphicObject::CreateGraphicObjectFromURL(aURL);
- if( aGraphicObject.GetType() != GraphicType::NONE )
- maGraphicObject = aGraphicObject;
-
- // #121194# Prefer GraphicObject over bitmap object if both are provided
- if(bSetBitmap && GraphicType::NONE != maGraphicObject.GetType())
- {
- bSetBitmap = false;
- }
- }
if( bSetBitmap )
{
- if(xBmp.is())
+ if (xBmp.is())
{
- maGraphicObject.SetGraphic(VCLUnoHelper::GetBitmap(xBmp));
+ xGraphic.set(xBmp, uno::UNO_QUERY);
}
- else if(xGraphic.is())
+ if (xGraphic.is())
{
maGraphicObject.SetGraphic(xGraphic);
}
}
- return (bSetName || bSetURL || bSetBitmap);
+ return (bSetName || bSetBitmap);
}
bool XFillBitmapItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )