diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-03-10 19:16:38 +0530 |
---|---|---|
committer | pranavk <pranavk@collabora.co.uk> | 2017-03-14 04:58:47 +0000 |
commit | 41c7ee5f0a3d0e128134665d709fd46e663fd373 (patch) | |
tree | 0c0ed1df5740554d67b23557599289bddc61f957 /sw/source/uibase/uno/unotxdoc.cxx | |
parent | 4c4b2d98b22a7b0559ba822e998792a2185142b0 (diff) |
sw: Simplify - no need to create a pointer here
Change-Id: I5c7d1d47f347b3ce8de6e2e4995da8724a464941
Reviewed-on: https://gerrit.libreoffice.org/35045
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/uno/unotxdoc.cxx')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 66e26a137810..de8057e21640 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3199,14 +3199,14 @@ OUString SwXTextDocument::getTrackedChanges() SwView* pView = dynamic_cast<SwView*>(SfxViewShell::Current()); if (pView && pContentNd) { - std::unique_ptr<SwShellCursor> pCursor(new SwShellCursor(pView->GetWrtShell(), *(rRedlineTable[i]->Start()) )); - pCursor->SetMark(); - pCursor->GetMark()->nNode = *pContentNd; - pCursor->GetMark()->nContent.Assign(pContentNd, rRedlineTable[i]->End()->nContent.GetIndex()); + SwShellCursor aCursor(pView->GetWrtShell(), *(rRedlineTable[i]->Start())); + aCursor.SetMark(); + aCursor.GetMark()->nNode = *pContentNd; + aCursor.GetMark()->nContent.Assign(pContentNd, rRedlineTable[i]->End()->nContent.GetIndex()); - pCursor->FillRects(); + aCursor.FillRects(); - SwRects* pRects(pCursor.get()); + SwRects* pRects(&aCursor); std::vector<OString> aRects; for(SwRect& rNextRect : *pRects) aRects.push_back(rNextRect.SVRect().toString()); |