[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Sep 17 00:07:53 PDT 2015


 sw/source/uibase/wrtsh/select.cxx |    6 +++---
 sw/source/uibase/wrtsh/wrtsh1.cxx |    5 ++---
 sw/source/uibase/wrtsh/wrtsh2.cxx |    8 ++++----
 3 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 935c228cde00da58a38666b4358d560235eb10de
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Sep 17 09:07:08 2015 +0200

    sw: use std::unique_ptr<> in wrtsh
    
    Change-Id: I3db550e0efa22eb4b497ad600e94ff77254bb62b

diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index b564332..ccd7fec 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -39,7 +39,7 @@
 #include <crsskip.hxx>
 #include <doc.hxx>
 #include <wordcountdialog.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 namespace com { namespace sun { namespace star { namespace util {
     struct SearchOptions;
@@ -129,8 +129,8 @@ long SwWrtShell::SelAll()
             LeaveBlockMode();
         SwMvContext aMvContext(this);
         bool bMoveTable = false;
-        boost::scoped_ptr<SwPosition> pStartPos;
-        boost::scoped_ptr<SwPosition> pEndPos;
+        std::unique_ptr<SwPosition> pStartPos;
+        std::unique_ptr<SwPosition> pEndPos;
         SwShellCrsr* pTmpCrsr = 0;
 
         // Query these early, before we move the cursor.
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 2213d68..c0cc481 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -105,7 +105,7 @@
 #include "FrameControlsManager.hxx"
 
 #include <sfx2/msgpool.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 using namespace sw::mark;
 using namespace com::sun::star;
@@ -375,8 +375,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
                     OString aCmd(".uno:");
                     aCmd += pSlot->GetUnoName();
                     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                    boost::scoped_ptr<SfxAbstractInsertObjectDialog> pDlg(
-                            pFact->CreateInsertObjectDialog( GetWin(), OUString::fromUtf8( aCmd ), xStor, &aServerList ));
+                    std::unique_ptr<SfxAbstractInsertObjectDialog> pDlg( pFact->CreateInsertObjectDialog( GetWin(), OUString::fromUtf8( aCmd ), xStor, &aServerList ));
                     if ( pDlg )
                     {
                         pDlg->Execute();
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 685fa8f..e303503 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -64,7 +64,7 @@
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 
 #include <xmloff/odffields.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 
@@ -81,7 +81,7 @@ void SwWrtShell::Insert(SwField &rField)
     StartUndo(UNDO_INSERT, &aRewriter);
 
     bool bDeleted = false;
-    boost::scoped_ptr<SwPaM> pAnnotationTextRange;
+    std::unique_ptr<SwPaM> pAnnotationTextRange;
     if ( HasSelection() )
     {
         if ( rField.GetTyp()->Which() == RES_POSTITFLD )
@@ -234,7 +234,7 @@ bool SwWrtShell::StartInputFieldDlg( SwField* pField, bool bNextButton,
 
     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
     OSL_ENSURE(pFact, "Dialog creation failed!");
-    boost::scoped_ptr<AbstractFieldInputDlg> pDlg(pFact->CreateFieldInputDlg(pParentWin, *this, pField, bNextButton));
+    std::unique_ptr<AbstractFieldInputDlg> pDlg(pFact->CreateFieldInputDlg(pParentWin, *this, pField, bNextButton));
     OSL_ENSURE(pDlg, "Dialog creation failed!");
     if(pWindowState && !pWindowState->isEmpty())
         pDlg->SetWindowState(*pWindowState);
@@ -259,7 +259,7 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bNextButton, OStrin
     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
     OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
 
-    boost::scoped_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(NULL, *this, pField, bNextButton));
+    std::unique_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(NULL, *this, pField, bNextButton));
     OSL_ENSURE(pDlg, "Dialog creation failed!");
     if(pWindowState && !pWindowState->isEmpty())
         pDlg->SetWindowState(*pWindowState);


More information about the Libreoffice-commits mailing list