Kaydet (Commit) b1b490ee authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in ScAccessiblePreviewCell

Change-Id: I99b9809b3924285b4f0d58905352777b948ee592
Reviewed-on: https://gerrit.libreoffice.org/56546
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ceff8f73
...@@ -74,8 +74,7 @@ void SAL_CALL ScAccessiblePreviewCell::disposing() ...@@ -74,8 +74,7 @@ void SAL_CALL ScAccessiblePreviewCell::disposing()
mpViewShell = nullptr; mpViewShell = nullptr;
} }
if (mpTextHelper) mpTextHelper.reset();
DELETEZ(mpTextHelper);
ScAccessibleCellBase::disposing(); ScAccessibleCellBase::disposing();
} }
...@@ -271,10 +270,10 @@ void ScAccessiblePreviewCell::CreateTextHelper() ...@@ -271,10 +270,10 @@ void ScAccessiblePreviewCell::CreateTextHelper()
{ {
if (!mpTextHelper) if (!mpTextHelper)
{ {
mpTextHelper = new ::accessibility::AccessibleTextHelper( mpTextHelper.reset( new ::accessibility::AccessibleTextHelper(
o3tl::make_unique<ScAccessibilityEditSource>( o3tl::make_unique<ScAccessibilityEditSource>(
o3tl::make_unique<ScAccessiblePreviewCellTextData>( o3tl::make_unique<ScAccessiblePreviewCellTextData>(
mpViewShell, maCellAddress))); mpViewShell, maCellAddress))) );
mpTextHelper->SetEventSource( this ); mpTextHelper->SetEventSource( this );
// paragraphs in preview are transient // paragraphs in preview are transient
......
...@@ -85,7 +85,7 @@ protected: ...@@ -85,7 +85,7 @@ protected:
private: private:
ScPreviewShell* mpViewShell; ScPreviewShell* mpViewShell;
accessibility::AccessibleTextHelper* mpTextHelper; std::unique_ptr<accessibility::AccessibleTextHelper> mpTextHelper;
bool IsDefunc( bool IsDefunc(
const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates); const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment