diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-29 15:50:02 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-04-30 04:57:21 +0200 |
commit | 7334034ae93b49fc93b5859a3c047a319d138282 (patch) | |
tree | 6216d895de7ede63bd946a0e75913a3b07e4c2b6 /svtools/source | |
parent | c0ff8a24365456383900ed7958c8fb9ea68043e9 (diff) |
drop Graphic::operator bool
which tends to interact in very weird ways with other code, for example
it makes Graphic appear to have an operator<
Change-Id: I335fe8f3644b710bc61291e625cbca7334a37716
Reviewed-on: https://gerrit.libreoffice.org/71532
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/graphic/renderer.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/embedhlp.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index d8b971566980..602fbc16e1f8 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -281,7 +281,7 @@ void SAL_CALL GraphicRendererVCL::render( const uno::Reference< graphic::XGraphi if( mpOutDev && mxDevice.is() && rxGraphic.is() ) { Graphic aGraphic(rxGraphic); - if (aGraphic) + if (!aGraphic.IsNone()) { GraphicObject aGraphicObject(aGraphic); aGraphicObject.Draw( mpOutDev, maDestRect.TopLeft(), maDestRect.GetSize() ); diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 9d6622e5b0a5..55a65e513734 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -436,7 +436,7 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate ) // note that UpdateReplacementOnDemand which resets mpImpl->pGraphic to null may have been called // e.g. when exporting ooo58458-1.odt to doc - if (bUpdate && (!mpImpl->pGraphic || !*mpImpl->pGraphic) && aOldGraphic) + if (bUpdate && (!mpImpl->pGraphic || mpImpl->pGraphic->IsNone()) && !aOldGraphic.IsNone()) { // We used to have an old graphic, tried to update and the update // failed. Go back to the old graphic instead of having no graphic at |