summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
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;