Kaydet (Commit) 935c228c authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: use std::unique_ptr<> in wrtsh

Change-Id: I3db550e0efa22eb4b497ad600e94ff77254bb62b
üst cbf3fac0
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <crsskip.hxx> #include <crsskip.hxx>
#include <doc.hxx> #include <doc.hxx>
#include <wordcountdialog.hxx> #include <wordcountdialog.hxx>
#include <boost/scoped_ptr.hpp> #include <memory>
namespace com { namespace sun { namespace star { namespace util { namespace com { namespace sun { namespace star { namespace util {
struct SearchOptions; struct SearchOptions;
...@@ -129,8 +129,8 @@ long SwWrtShell::SelAll() ...@@ -129,8 +129,8 @@ long SwWrtShell::SelAll()
LeaveBlockMode(); LeaveBlockMode();
SwMvContext aMvContext(this); SwMvContext aMvContext(this);
bool bMoveTable = false; bool bMoveTable = false;
boost::scoped_ptr<SwPosition> pStartPos; std::unique_ptr<SwPosition> pStartPos;
boost::scoped_ptr<SwPosition> pEndPos; std::unique_ptr<SwPosition> pEndPos;
SwShellCrsr* pTmpCrsr = 0; SwShellCrsr* pTmpCrsr = 0;
// Query these early, before we move the cursor. // Query these early, before we move the cursor.
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
#include "FrameControlsManager.hxx" #include "FrameControlsManager.hxx"
#include <sfx2/msgpool.hxx> #include <sfx2/msgpool.hxx>
#include <boost/scoped_ptr.hpp> #include <memory>
using namespace sw::mark; using namespace sw::mark;
using namespace com::sun::star; using namespace com::sun::star;
...@@ -375,8 +375,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName ...@@ -375,8 +375,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
OString aCmd(".uno:"); OString aCmd(".uno:");
aCmd += pSlot->GetUnoName(); aCmd += pSlot->GetUnoName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
boost::scoped_ptr<SfxAbstractInsertObjectDialog> pDlg( std::unique_ptr<SfxAbstractInsertObjectDialog> pDlg( pFact->CreateInsertObjectDialog( GetWin(), OUString::fromUtf8( aCmd ), xStor, &aServerList ));
pFact->CreateInsertObjectDialog( GetWin(), OUString::fromUtf8( aCmd ), xStor, &aServerList ));
if ( pDlg ) if ( pDlg )
{ {
pDlg->Execute(); pDlg->Execute();
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <xmloff/odffields.hxx> #include <xmloff/odffields.hxx>
#include <boost/scoped_ptr.hpp> #include <memory>
#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <LibreOfficeKit/LibreOfficeKitEnums.h>
...@@ -81,7 +81,7 @@ void SwWrtShell::Insert(SwField &rField) ...@@ -81,7 +81,7 @@ void SwWrtShell::Insert(SwField &rField)
StartUndo(UNDO_INSERT, &aRewriter); StartUndo(UNDO_INSERT, &aRewriter);
bool bDeleted = false; bool bDeleted = false;
boost::scoped_ptr<SwPaM> pAnnotationTextRange; std::unique_ptr<SwPaM> pAnnotationTextRange;
if ( HasSelection() ) if ( HasSelection() )
{ {
if ( rField.GetTyp()->Which() == RES_POSTITFLD ) if ( rField.GetTyp()->Which() == RES_POSTITFLD )
...@@ -234,7 +234,7 @@ bool SwWrtShell::StartInputFieldDlg( SwField* pField, bool bNextButton, ...@@ -234,7 +234,7 @@ bool SwWrtShell::StartInputFieldDlg( SwField* pField, bool bNextButton,
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!"); 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!"); OSL_ENSURE(pDlg, "Dialog creation failed!");
if(pWindowState && !pWindowState->isEmpty()) if(pWindowState && !pWindowState->isEmpty())
pDlg->SetWindowState(*pWindowState); pDlg->SetWindowState(*pWindowState);
...@@ -259,7 +259,7 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bNextButton, OStrin ...@@ -259,7 +259,7 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bNextButton, OStrin
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); 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!"); OSL_ENSURE(pDlg, "Dialog creation failed!");
if(pWindowState && !pWindowState->isEmpty()) if(pWindowState && !pWindowState->isEmpty())
pDlg->SetWindowState(*pWindowState); pDlg->SetWindowState(*pWindowState);
......
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