diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-03-15 21:14:29 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-03-16 00:24:16 +0100 |
commit | 4bbf37b7ed83491efdfa9cb12cd434f67a1764ae (patch) | |
tree | a5c797615235cc88e543334de8540b25d3cae3ee /toolkit | |
parent | 167fb3f7800e342b2009b98579a1d42d528b9b5a (diff) |
drop support for GraphicObject URLs in toolkit
Change-Id: I86d18232b8fcb34272d3cc04f65a7dc72248591a
Reviewed-on: https://gerrit.libreoffice.org/51328
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 13 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 10 |
2 files changed, 3 insertions, 20 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 8f32a6fcd9b0..a20b22ad81c9 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -413,11 +413,7 @@ void UnoDialogControl::PrepareWindowDescriptor( css::awt::WindowDescriptor& rDes if (( ImplGetPropertyValue( PROPERTY_IMAGEURL ) >>= aImageURL ) && ( !aImageURL.isEmpty() )) { - OUString absoluteUrl = aImageURL; - if ( !aImageURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) - absoluteUrl = getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ), - uno::makeAny( aImageURL ) ); - + OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(PROPERTY_DIALOGSOURCEURL), uno::makeAny(aImageURL)); xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl ); ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::makeAny( xGraphic ), true ); } @@ -632,12 +628,7 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang if (( ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_IMAGEURL ) ) >>= aImageURL ) && ( !aImageURL.isEmpty() )) { - OUString absoluteUrl = aImageURL; - if ( !aImageURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) - - absoluteUrl = getPhysicalLocation( ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_DIALOGSOURCEURL )), - uno::makeAny(aImageURL)); - + OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(GetPropertyName(BASEPROPERTY_DIALOGSOURCEURL)), uno::makeAny(aImageURL)); xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl ); } ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC), uno::makeAny( xGraphic ), true ); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 98b4b8c0b52a..ea98a4d4512d 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -74,15 +74,7 @@ using namespace ::toolkit; uno::Reference< graphic::XGraphic > ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( uno::Reference< graphic::XGraphicObject >& xOutGraphicObj, const OUString& _rURL ) { - if ( _rURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) - { - // graphic manager uniqueid - OUString sID = _rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ); - xOutGraphicObj = graphic::GraphicObject::createWithId( ::comphelper::getProcessComponentContext(), sID ); - } - else // linked - xOutGraphicObj = nullptr; // release the GraphicObject - + xOutGraphicObj = nullptr; return ImageHelper::getGraphicFromURL_nothrow( _rURL ); } |