summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 14:13:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 11:31:40 +0000
commit70fed865df7655a7ee65fa6cde51bbf93182dbbb (patch)
tree00c77d8ba47be246cd247697045fdcfe6df3ad9e /fpicker
parentfb4b59f9370167696d1a67beb16b593ba86971a8 (diff)
new loplugin: useuniqueptr: forms..framework
Change-Id: I4300a13f455148b7156ac3f444c7102d63ae6db3 Reviewed-on: https://gerrit.libreoffice.org/33164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx5
-rw-r--r--fpicker/source/office/fpsmartcontent.hxx3
2 files changed, 4 insertions, 4 deletions
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index fc5af8d4af06..7e068be975ac 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -76,7 +76,6 @@ namespace svt
TODO: If there is real need for caching the content, it must
be done here.
*/
- delete m_pContent;
}
@@ -145,7 +144,7 @@ namespace svt
// nothing to do, regardless of the state
return;
- DELETEZ( m_pContent );
+ m_pContent.reset();
m_eState = INVALID; // default to INVALID
m_sURL = _rURL;
@@ -153,7 +152,7 @@ namespace svt
{
try
{
- m_pContent = new ::ucbhelper::Content( _rURL, m_xCmdEnv, comphelper::getProcessComponentContext() );
+ m_pContent.reset( new ::ucbhelper::Content( _rURL, m_xCmdEnv, comphelper::getProcessComponentContext() ) );
m_eState = UNKNOWN;
// from now on, the state is unknown -> we cannot know for sure if the content
// is really valid (some UCP's only tell this when asking for properties, not upon
diff --git a/fpicker/source/office/fpsmartcontent.hxx b/fpicker/source/office/fpsmartcontent.hxx
index e20acb0089fa..9606e1166f3c 100644
--- a/fpicker/source/office/fpsmartcontent.hxx
+++ b/fpicker/source/office/fpsmartcontent.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <ucbhelper/content.hxx>
+#include <memory>
namespace svt
@@ -49,7 +50,7 @@ namespace svt
private:
OUString m_sURL;
- ::ucbhelper::Content* m_pContent;
+ std::unique_ptr<::ucbhelper::Content> m_pContent;
State m_eState;
css::uno::Reference < css::ucb::XCommandEnvironment > m_xCmdEnv;
css::uno::Reference < css::task::XInteractionHandler > m_xOwnInteraction;