summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/graph.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-03-17 23:23:41 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-03-23 03:06:18 +0100
commite83f7b7c84d5345879c5543b78ce6ad2b32dc2bc (patch)
treebac93d795c1fd601ac3f17549e38133ed1bb0a60 /vcl/source/gdi/graph.cxx
parentb38974391e8d4bf0d450abfaa86bbccbe1022995 (diff)
vcl: set "default" type only thorugh a ImpGraphic constructor
and do some more clean-up. Change-Id: I28c33887226444046d21076118fd066eb3a231d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164947 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/gdi/graph.cxx')
-rw-r--r--vcl/source/gdi/graph.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 4c0efa56beba..252ee189b892 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -287,8 +287,7 @@ bool Graphic::IsNone() const
void Graphic::Clear()
{
- ImplTestRefCount();
- mxImpGraphic->clear();
+ mxImpGraphic = std::make_shared<ImpGraphic>();
}
GraphicType Graphic::GetType() const
@@ -298,8 +297,7 @@ GraphicType Graphic::GetType() const
void Graphic::SetDefaultType()
{
- ImplTestRefCount();
- mxImpGraphic->setDefaultType();
+ mxImpGraphic = std::make_shared<ImpGraphic>(true);
}
bool Graphic::IsSupportedGraphic() const