diff options
-rw-r--r-- | include/vcl/graph.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index 2ec7a7e14706..4915fa0e347a 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -129,6 +129,8 @@ public: bool operator!=( const Graphic& rGraphic ) const; bool operator!() const; + operator bool() const; + void Clear(); GraphicType GetType() const; diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index b1e5f40335ea..1b753414b60e 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -288,6 +288,11 @@ bool Graphic::operator!() const return (GraphicType::NONE == mxImpGraphic->ImplGetType()); } +Graphic::operator bool() const +{ + return GraphicType::NONE != mxImpGraphic->ImplGetType(); +} + void Graphic::Clear() { ImplTestRefCount(); |