diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-01 12:26:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-02 15:53:15 +0200 |
commit | 51f00abe7a17c91476375babaa69f4c7b1883c09 (patch) | |
tree | a327834dfa25e31425e58b657e9b8d887acee74e /include/svl | |
parent | 2024780f9e169a6c1d167e494d37f46f7640dc97 (diff) |
no need to allocate return val on heap for GetItemSetForPreview
Change-Id: I261182ec2348df045171c5e1beb33579e2c0c766
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118284
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svl')
-rw-r--r-- | include/svl/style.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 735e3607242d..b3db632c4841 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -37,6 +37,7 @@ #include <tools/solar.h> #include <memory> +#include <optional> // This is used as a flags enum in sw/, but only there, // so I don't pull in o3tl::typed_flags here @@ -178,7 +179,7 @@ public: /// preview only; it shall not create the style in case it does not exist. /// If the style has parents, it is _not_ required that the returned item /// set has parents (i.e. use it for display purposes only). - virtual std::unique_ptr<SfxItemSet> GetItemSetForPreview(); + virtual std::optional<SfxItemSet> GetItemSetForPreview(); /// Fix for expensive dynamic_cast virtual bool isScStyleSheet() const { return false; } |