summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtparaimphint.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/txtparaimphint.hxx')
-rw-r--r--xmloff/source/text/txtparaimphint.hxx17
1 files changed, 4 insertions, 13 deletions
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index 84da197cde13..c2eeaee3f984 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -106,22 +106,15 @@ class XMLHyperlinkHint_Impl : public XMLHint_Impl
OUString sTargetFrameName;
OUString sStyleName;
OUString sVisitedStyleName;
- XMLEventsImportContext* pEvents;
+ css::uno::Reference<XMLEventsImportContext> mxEvents;
public:
XMLHyperlinkHint_Impl( const css::uno::Reference < css::text::XTextRange > & rPos ) :
- XMLHint_Impl( XML_HINT_HYPERLINK, rPos, rPos ),
- pEvents( nullptr )
+ XMLHint_Impl( XML_HINT_HYPERLINK, rPos, rPos )
{
}
- virtual ~XMLHyperlinkHint_Impl()
- {
- if (nullptr != pEvents)
- pEvents->ReleaseRef();
- }
-
void SetHRef( const OUString& s ) { sHRef = s; }
const OUString& GetHRef() const { return sHRef; }
void SetName( const OUString& s ) { sName = s; }
@@ -134,13 +127,11 @@ public:
const OUString& GetVisitedStyleName() const { return sVisitedStyleName; }
XMLEventsImportContext* GetEventsContext() const
{
- return pEvents;
+ return mxEvents.get();
}
void SetEventsContext( XMLEventsImportContext* pCtxt )
{
- pEvents = pCtxt;
- if (pEvents != nullptr)
- pEvents->AddFirstRef();
+ mxEvents.set(pCtxt);
}
};