summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-18 09:08:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-18 09:28:59 +0000
commitc8204ba5b86d080aa5ac3ec71dc6aaea1384b9a0 (patch)
treec4ae951328f359fb4f6fdee62bb0f276a9034579 /sc/source/ui/view
parentc722e9e728ec6c9df0285f5dd2041aa58f66f686 (diff)
boost->std
Change-Id: I7f3bb094f116103c1146a7d60e3af94c0b37d9ea Reviewed-on: https://gerrit.libreoffice.org/18677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/cellsh1.cxx98
-rw-r--r--sc/source/ui/view/cellsh2.cxx10
-rw-r--r--sc/source/ui/view/cellsh3.cxx20
-rw-r--r--sc/source/ui/view/dbfunc3.cxx10
-rw-r--r--sc/source/ui/view/editsh.cxx8
-rw-r--r--sc/source/ui/view/formatsh.cxx14
-rw-r--r--sc/source/ui/view/gridwin.cxx10
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
-rw-r--r--sc/source/ui/view/output.cxx8
-rw-r--r--sc/source/ui/view/output2.cxx8
-rw-r--r--sc/source/ui/view/pivotsh.cxx4
-rw-r--r--sc/source/ui/view/preview.cxx4
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/printfun.cxx8
-rw-r--r--sc/source/ui/view/scextopt.cxx6
-rw-r--r--sc/source/ui/view/spelleng.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx6
-rw-r--r--sc/source/ui/view/tabvwsha.cxx10
-rw-r--r--sc/source/ui/view/tabvwshf.cxx20
-rw-r--r--sc/source/ui/view/tabvwshh.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx11
-rw-r--r--sc/source/ui/view/viewfun3.cxx8
-rw-r--r--sc/source/ui/view/viewfun4.cxx18
-rw-r--r--sc/source/ui/view/viewfun5.cxx10
-rw-r--r--sc/source/ui/view/viewfunc.cxx6
-rw-r--r--sc/source/ui/view/viewutil.cxx4
26 files changed, 155 insertions, 160 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 64aa830826e3..b0484f9c77c8 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -97,7 +97,7 @@
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -215,12 +215,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
else
{
ScDocument* pDoc = GetViewData()->GetDocument();
- bool bTheFlag=(pDoc->GetChangeTrack()!=NULL);
+ bool bTheFlag=(pDoc->GetChangeTrack()!=nullptr);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScInsertCellDlg> pDlg(pFact->CreateScInsertCellDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_INSCELL, bTheFlag));
+ std::unique_ptr<AbstractScInsertCellDlg> pDlg(pFact->CreateScInsertCellDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_INSCELL, bTheFlag));
OSL_ENSURE(pDlg, "Dialog create fail!");
if (pDlg->Execute() == RET_OK)
eCmd = pDlg->GetInsCellCmd();
@@ -287,12 +287,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScDocument* pDoc = GetViewData()->GetDocument();
bool bTheFlag=GetViewData()->IsMultiMarked() ||
(GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE_FILTERED) ||
- (pDoc->GetChangeTrack() != NULL);
+ (pDoc->GetChangeTrack() != nullptr);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScDeleteCellDlg> pDlg(pFact->CreateScDeleteCellDlg( pTabViewShell->GetDialogParent(), bTheFlag ));
+ std::unique_ptr<AbstractScDeleteCellDlg> pDlg(pFact->CreateScDeleteCellDlg( pTabViewShell->GetDialogParent(), bTheFlag ));
OSL_ENSURE(pDlg, "Dialog create fail!");
if (pDlg->Execute() == RET_OK)
@@ -337,7 +337,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
InsertDeleteFlags nFlags = IDF_NONE;
- if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
+ if ( pReqArgs!=nullptr && pTabViewShell->SelectionEditable() )
{
const SfxPoolItem* pItem;
OUString aFlags('A');
@@ -374,7 +374,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScDeleteContentsDlg> pDlg(pFact->CreateScDeleteContentsDlg(pTabViewShell->GetDialogParent()));
+ std::unique_ptr<AbstractScDeleteContentsDlg> pDlg(pFact->CreateScDeleteContentsDlg(pTabViewShell->GetDialogParent()));
OSL_ENSURE(pDlg, "Dialog create fail!");
ScDocument* pDoc = GetViewData()->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -448,7 +448,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
bool bSkipEmpty = false;
bool bAsLink = false;
- if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
+ if ( pReqArgs!=nullptr && pTabViewShell->SelectionEditable() )
{
const SfxPoolItem* pItem;
OUString aFlags('A');
@@ -481,7 +481,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(),
+ std::unique_ptr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(),
IDF_NONE, /* nCheckDefaults */
&ScGlobal::GetRscString(STR_FILL_TAB)));
OSL_ENSURE(pDlg, "Dialog create fail!");
@@ -627,7 +627,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
bDoIt = true;
}
- else // (pReqArgs == NULL) => raise Dialog
+ else // (pReqArgs == nullptr) => raise Dialog
{
sal_uInt32 nPrivFormat;
CellType eCellType;
@@ -711,7 +711,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScFillSeriesDlg> pDlg(pFact->CreateScFillSeriesDlg( pTabViewShell->GetDialogParent(),
+ std::unique_ptr<AbstractScFillSeriesDlg> pDlg(pFact->CreateScFillSeriesDlg( pTabViewShell->GetDialogParent(),
*pDoc,
eFillDir, eFillCmd, eFillDateCmd,
aStartStr, fIncVal, fMaxVal,
@@ -814,7 +814,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SCROW nFillRow = GetViewData()->GetRefEndY();
ScDocument* pDoc = GetViewData()->GetDocument();
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
@@ -1028,7 +1028,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_SEARCH_RESULTS_DIALOG:
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if (pReqArgs && pReqArgs->HasItem(SID_SEARCH_RESULTS_DIALOG, &pItem))
{
bool bVisible = static_cast<const SfxBoolItem*>(pItem)->GetValue();
@@ -1132,7 +1132,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
bOk = false;
}
- else if( pReqArgs != NULL )
+ else if( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
bOk = false;
@@ -1160,7 +1160,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScGroupDlg> pDlg(pFact->CreateAbstractScGroupDlg(pTabViewShell->GetDialogParent(), false));
+ std::unique_ptr<AbstractScGroupDlg> pDlg(pFact->CreateAbstractScGroupDlg(pTabViewShell->GetDialogParent(), false));
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
@@ -1193,7 +1193,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pTabViewShell->UngroupDataPilot();
bOk = false;
}
- else if( pReqArgs != NULL )
+ else if( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
bOk = false;
@@ -1219,7 +1219,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScGroupDlg> pDlg(pFact->CreateAbstractScGroupDlg(pTabViewShell->GetDialogParent(), true));
+ std::unique_ptr<AbstractScGroupDlg> pDlg(pFact->CreateAbstractScGroupDlg(pTabViewShell->GetDialogParent(), true));
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
@@ -1252,7 +1252,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_COPY: // for graphs in DrawShell
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- pTabViewShell->CopyToClip( NULL, false, false, true );
+ pTabViewShell->CopyToClip( nullptr, false, false, true );
rReq.Done();
GetViewData()->SetPasteMode( (ScPasteFlags) (SC_PASTE_MODE | SC_PASTE_BORDER) );
pTabViewShell->ShowCursor();
@@ -1263,7 +1263,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_CUT: // for graphs in DrawShell
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- pTabViewShell->CutToClip( NULL, true );
+ pTabViewShell->CutToClip( nullptr, true );
rReq.Done();
GetViewData()->SetPasteMode( (ScPasteFlags)(SC_PASTE_MODE | SC_PASTE_BORDER));
pTabViewShell->ShowCursor();
@@ -1294,8 +1294,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( nFormat != SotClipboardFormatId::NONE )
{
vcl::Window* pWin = GetViewData()->GetActiveWin();
- bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL );
- bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != nullptr );
+ bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != nullptr );
bool bOle = ( nFormat == SotClipboardFormatId::EMBED_SOURCE );
if ( bCells && bOle )
@@ -1331,7 +1331,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
// keep a reference in case the clipboard is changed during dialog or PasteFromClip
uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
- if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
+ if ( pReqArgs!=nullptr && pTabViewShell->SelectionEditable() )
{
const SfxPoolItem* pItem;
OUString aFlags('A');
@@ -1383,11 +1383,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg(pTabViewShell->GetDialogParent()));
+ std::unique_ptr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg(pTabViewShell->GetDialogParent()));
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetOtherDoc( bOtherDoc );
// if ChangeTrack MoveMode disable
- pDlg->SetChangeTrack( pDoc->GetChangeTrack() != NULL );
+ pDlg->SetChangeTrack( pDoc->GetChangeTrack() != nullptr );
// fdo#56098 disable shift if necessary
if ( !bOtherDoc && pOwnClip )
{
@@ -1538,7 +1538,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
vcl::Window* pWin = GetViewData()->GetActiveWin();
// Clipboard-ID given as parameter? Basic "PasteSpecial(Format)"
- const SfxPoolItem* pItem=NULL;
+ const SfxPoolItem* pItem=nullptr;
if ( pReqArgs &&
pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET &&
pItem->ISA(SfxUInt32Item) )
@@ -1547,7 +1547,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
bool bRet=true;
{
WaitObject aWait( GetViewData()->GetDialogParent() );
- bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != nullptr );
if ( bDraw && nFormat == SotClipboardFormatId::EMBED_SOURCE )
pTabViewShell->PasteDraw();
else
@@ -1561,7 +1561,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else
// if format is not available -> fallback to request without parameters
- pItem = NULL;
+ pItem = nullptr;
}
if ( !pItem )
@@ -1574,7 +1574,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else // draw objects or external data
{
- bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != nullptr );
SvxClipboardFormatItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS );
GetPossibleClipboardFormats( aFormats );
@@ -1583,7 +1583,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( nFormatCount )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pTabViewShell->GetDialogParent() ));
+ std::unique_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pTabViewShell->GetDialogParent() ));
if ( pDlg )
{
for (sal_uInt16 i=0; i<nFormatCount; i++)
@@ -1817,7 +1817,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScNameCreateDlg> pDlg(pFact->CreateScNameCreateDlg(pTabViewShell->GetDialogParent(), nFlags));
+ std::unique_ptr<AbstractScNameCreateDlg> pDlg(pFact->CreateScNameCreateDlg(pTabViewShell->GetDialogParent(), nFlags));
OSL_ENSURE(pDlg, "Dialog create fail!");
if( pDlg->Execute() )
@@ -1865,7 +1865,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else // CANCEL
{
- pScMod->ActivateInputWindow( NULL );
+ pScMod->ActivateInputWindow( nullptr );
}
rReq.Ignore(); // only SID_ENTER_STRING is recorded
}
@@ -1926,11 +1926,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
bool bManaged = false;
// Get the pool item stored it by Conditional Format Manager Dialog.
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt32 nItems(pTabViewShell->GetPool().GetItemCount2( SCITEM_STRING ));
for( sal_uInt32 nIter = 0; nIter < nItems; ++nIter )
{
- if( NULL != (pItem = pTabViewShell->GetPool().GetItem2( SCITEM_STRING, nIter ) ) )
+ if( nullptr != (pItem = pTabViewShell->GetPool().GetItem2( SCITEM_STRING, nIter ) ) )
{
if ( ScCondFormatDlg::ParseXmlString(
static_cast<const SfxStringItem*>(pItem)->GetValue(),
@@ -1969,7 +1969,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aRangeList.push_back(pRange);
}
- const ScConditionalFormat* pCondFormat = NULL;
+ const ScConditionalFormat* pCondFormat = nullptr;
const ScPatternAttr* pPattern = pDoc->GetPattern(aPos.Col(), aPos.Row(), aPos.Tab());
const std::vector<sal_uInt32>& rCondFormats = static_cast<const ScCondFormatItem&>(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData();
bool bContainsCondFormat = !rCondFormats.empty();
@@ -2139,7 +2139,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScNamePasteDlg> pDlg(pFact->CreateScNamePasteDlg( pTabViewShell->GetDialogParent(), GetViewData()->GetDocShell() ));
+ std::unique_ptr<AbstractScNamePasteDlg> pDlg(pFact->CreateScNamePasteDlg( pTabViewShell->GetDialogParent(), GetViewData()->GetDocShell() ));
OSL_ENSURE(pDlg, "Dialog create fail!");
switch( pDlg->Execute() )
{
@@ -2300,7 +2300,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_CHARMAP:
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
OUString aChars, aFontName;
const SfxItemSet *pArgs = rReq.GetArgs();
@@ -2312,7 +2312,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, pItem );
if ( pStringItem )
aChars = pStringItem->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
@@ -2322,7 +2322,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( !aChars.isEmpty() )
{
vcl::Font aFont;
- pTabViewShell->GetSelectionPattern()->GetFont( aFont, SC_AUTOCOL_BLACK, NULL, NULL, NULL,
+ pTabViewShell->GetSelectionPattern()->GetFont( aFont, SC_AUTOCOL_BLACK, nullptr, nullptr, nullptr,
pTabViewShell->GetSelectionScriptType() );
if ( !aFontName.isEmpty() )
aFont = vcl::Font( aFontName, Size(1,1) );
@@ -2337,14 +2337,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
// font color doesn't matter here
vcl::Font aCurFont;
- pTabViewShell->GetSelectionPattern()->GetFont( aCurFont, SC_AUTOCOL_BLACK, NULL, NULL, NULL,
+ pTabViewShell->GetSelectionPattern()->GetFont( aCurFont, SC_AUTOCOL_BLACK, nullptr, nullptr, nullptr,
pTabViewShell->GetSelectionScriptType() );
SfxAllItemSet aSet( GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
- boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
+ std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
pTabViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
if ( pDlg->Execute() == RET_OK )
@@ -2384,7 +2384,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else
{
- OSL_FAIL("NULL");
+ OSL_FAIL("nullptr");
}
}
}
@@ -2427,7 +2427,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAddress aPos(pData->GetCurX(), pData->GetCurY(), pData->GetTabNo());
ScConditionalFormatList* pList = pDoc->GetCondFormList( aPos.Tab() );
- boost::scoped_ptr<AbstractScCondFormatManagerDlg> pDlg(pFact->CreateScCondFormatMgrDlg(
+ std::unique_ptr<AbstractScCondFormatManagerDlg> pDlg(pFact->CreateScCondFormatMgrDlg(
pTabViewShell->GetDialogParent(), pDoc, pList, aPos, RID_SCDLG_COND_FORMAT_MANAGER));
short nRet = pDlg->Execute();
if(nRet == RET_OK && pDlg->CondFormatsChanged())
@@ -2572,7 +2572,7 @@ bool isDPSourceValid(const ScDPObject& rDPObj)
return false;
const ScDPSaveData* pSaveData = rDPObj.GetSaveData();
- const ScDPDimensionSaveData* pDimData = NULL;
+ const ScDPDimensionSaveData* pDimData = nullptr;
if (pSaveData)
pDimData = pSaveData->GetExistingDimensionData();
@@ -2593,7 +2593,7 @@ void ScCellShell::ExecuteDataPilotDialog()
ScViewData* pData = GetViewData();
ScDocument* pDoc = pData->GetDocument();
- ::boost::scoped_ptr<ScDPObject> pNewDPObject(NULL);
+ std::unique_ptr<ScDPObject> pNewDPObject(nullptr);
// ScPivot is no longer used...
ScDPObject* pDPObj = pDoc->GetDPAtCursor(
@@ -2625,7 +2625,7 @@ void ScCellShell::ExecuteDataPilotDialog()
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- ::boost::scoped_ptr<AbstractScDataPilotSourceTypeDlg> pTypeDlg(
+ std::unique_ptr<AbstractScDataPilotSourceTypeDlg> pTypeDlg(
pFact->CreateScDataPilotSourceTypeDlg(
pTabViewShell->GetDialogParent(), bEnableExt));
@@ -2644,7 +2644,7 @@ void ScCellShell::ExecuteDataPilotDialog()
if ( pTypeDlg->IsExternal() )
{
uno::Sequence<OUString> aSources = ScDPObject::GetRegisteredSources();
- ::boost::scoped_ptr<AbstractScDataPilotServiceDlg> pServDlg(
+ std::unique_ptr<AbstractScDataPilotServiceDlg> pServDlg(
pFact->CreateScDataPilotServiceDlg(
pTabViewShell->GetDialogParent(), aSources, RID_SCDLG_DAPISERVICE));
@@ -2665,7 +2665,7 @@ void ScCellShell::ExecuteDataPilotDialog()
{
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- ::boost::scoped_ptr<AbstractScDataPilotDatabaseDlg> pDataDlg(
+ std::unique_ptr<AbstractScDataPilotDatabaseDlg> pDataDlg(
pFact->CreateScDataPilotDatabaseDlg(
pTabViewShell->GetDialogParent()));
@@ -2796,7 +2796,7 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
return;
}
- boost::scoped_ptr<SfxAbstractTabDialog> pDlg;
+ std::unique_ptr<SfxAbstractTabDialog> pDlg;
ScSubTotalParam aSubTotalParam;
SfxItemSet aArgSet( GetPool(), SCITEM_SUBTDATA, SCITEM_SUBTDATA );
@@ -2827,7 +2827,7 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
if ( (bResult == RET_OK) || (bResult == SCRET_REMOVE) )
{
- const SfxItemSet* pOutSet = NULL;
+ const SfxItemSet* pOutSet = nullptr;
if ( bResult == RET_OK )
{
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 2e0f7f2f604a..fb3e6b796292 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -66,7 +66,7 @@
#include <config_orcus.h>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -162,7 +162,7 @@ static bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScSortWarningDlg> pWarningDlg(pFact->CreateScSortWarningDlg( pTabViewShell->GetDialogParent(), aExtendStr, aCurrentStr ));
+ std::unique_ptr<AbstractScSortWarningDlg> pWarningDlg(pFact->CreateScSortWarningDlg( pTabViewShell->GetDialogParent(), aExtendStr, aCurrentStr ));
OSL_ENSURE(pWarningDlg, "Dialog create fail!");
short bResult = pWarningDlg->Execute();
if( bResult == BTN_EXTEND_RANGE || bResult == BTN_CURRENT_SELECTION )
@@ -482,7 +482,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
assert(pFact); //ScAbstractFactory create fail!
- boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScSortDlg(pTabViewShell->GetDialogParent(), &aArgSet));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScSortDlg(pTabViewShell->GetDialogParent(), &aArgSet));
assert(pDlg); //Dialog create fail!
pDlg->SetCurPageId("criteria"); // 1=sort field tab 2=sort options tab
@@ -723,7 +723,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScSelEntryDlg> pDlg(pFact->CreateScSelEntryDlg( pTabViewShell->GetDialogParent(),
+ std::unique_ptr<AbstractScSelEntryDlg> pDlg(pFact->CreateScSelEntryDlg( pTabViewShell->GetDialogParent(),
aList ));
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
@@ -975,7 +975,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
- boost::scoped_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(
+ std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(
NULL, OUString(), &aStream, SC_TEXTTOCOLUMNS));
OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 0df3ad943b1f..b5667e6ac3d9 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -48,7 +48,7 @@
#include "sccollaboration.hxx"
#endif
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() )
@@ -321,12 +321,12 @@ void ScCellShell::Execute( SfxRequest& rReq )
// set cell attribute without dialog:
- boost::scoped_ptr<SfxItemSet> pEmptySet(
+ std::unique_ptr<SfxItemSet> pEmptySet(
new SfxItemSet( *pReqArgs->GetPool(),
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
- boost::scoped_ptr<SfxItemSet> pNewSet(
+ std::unique_ptr<SfxItemSet> pNewSet(
new SfxItemSet( *pReqArgs->GetPool(),
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
@@ -489,7 +489,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(pTabViewShell->GetDialogParent(), aName, false, bSheetProtected));
+ std::unique_ptr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(pTabViewShell->GetDialogParent(), aName, false, bSheetProtected));
OSL_ENSURE(pNewDlg, "Dialog create fail!");
if ( pNewDlg->Execute() == RET_OK )
{
@@ -539,7 +539,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
assert(pFact); //ScAbstractFactory create fail!
- boost::scoped_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
+ std::unique_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetDialogParent(), "RowHeightDialog",
nCurHeight, ScGlobal::nStdRowHeight,
eMetric, 2, MAX_ROW_HEIGHT));
@@ -580,7 +580,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
assert(pFact); //ScAbstractFactory create fail!
- boost::scoped_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
+ std::unique_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetDialogParent(), "OptimalRowHeightDialog",
ScGlobal::nLastRowHeightExtra, 0, eMetric, 1, MAX_EXTRA_HEIGHT));
assert(pDlg); //Dialog create fail!
@@ -622,7 +622,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
assert(pFact); //ScAbstractFactory create fail!
- boost::scoped_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
+ std::unique_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetDialogParent(), "ColWidthDialog", nCurHeight,
STD_COL_WIDTH, eMetric, 2, MAX_COL_WIDTH));
assert(pDlg); //Dialog create fail!
@@ -662,7 +662,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
assert(pFact); //ScAbstractFactory create fail!
- boost::scoped_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
+ std::unique_ptr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
pTabViewShell->GetDialogParent(), "OptimalColWidthDialog",
ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, eMetric, 1, MAX_EXTRA_WIDTH));
assert(pDlg); //Dialog create fail!
@@ -809,11 +809,11 @@ void ScCellShell::Execute( SfxRequest& rReq )
else
{
ScGlobal::ClearAutoFormat();
- boost::scoped_ptr<ScAutoFormatData> pNewEntry(pTabViewShell->CreateAutoFormatData());
+ std::unique_ptr<ScAutoFormatData> pNewEntry(pTabViewShell->CreateAutoFormatData());
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScAutoFormatDlg> pDlg(pFact->CreateScAutoFormatDlg(pDlgParent, ScGlobal::GetOrCreateAutoFormat(), pNewEntry.get(), GetViewData()));
+ std::unique_ptr<AbstractScAutoFormatDlg> pDlg(pFact->CreateScAutoFormatDlg(pDlgParent, ScGlobal::GetOrCreateAutoFormat(), pNewEntry.get(), GetViewData()));
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 367b5caf668b..268c2168413e 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -67,8 +67,8 @@
#include "markdata.hxx"
#include "stringutil.hxx"
-#include <boost/scoped_ptr.hpp>
#include <list>
+#include <memory>
#include <unordered_set>
#include <unordered_map>
#include <vector>
@@ -1744,7 +1744,7 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
// Update the datapilot with the newly sorted field members.
- boost::scoped_ptr<ScDPObject> pNewObj(new ScDPObject(*pDPObj));
+ std::unique_ptr<ScDPObject> pNewObj(new ScDPObject(*pDPObj));
pNewObj->SetSaveData(aNewSaveData);
ScDBDocFunc aFunc(*GetViewData().GetDocShell());
@@ -1832,7 +1832,7 @@ bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
// apply changes
ScDBDocFunc aFunc( *GetViewData().GetDocShell() );
- boost::scoped_ptr<ScDPObject> pNewObj(new ScDPObject( *pDPObj ));
+ std::unique_ptr<ScDPObject> pNewObj(new ScDPObject( *pDPObj ));
pNewObj->SetSaveData( aData );
aFunc.DataPilotUpdate( pDPObj, pNewObj.get(), true, false ); //! bApi for drag&drop?
pNewObj.reset();
@@ -1961,7 +1961,7 @@ void ScDBFunc::SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName
// apply changes
ScDBDocFunc aFunc( *GetViewData().GetDocShell() );
- boost::scoped_ptr<ScDPObject> pNewObj(new ScDPObject( *pDPObj ));
+ std::unique_ptr<ScDPObject> pNewObj(new ScDPObject( *pDPObj ));
pNewObj->SetSaveData( aData );
aFunc.DataPilotUpdate( pDPObj, pNewObj.get(), true, false );
pNewObj.reset();
@@ -1998,7 +1998,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
SCTAB nNewTab = GetViewData().GetTabNo();
- boost::scoped_ptr<ScDocument> pInsDoc(new ScDocument(SCDOCMODE_CLIP));
+ std::unique_ptr<ScDocument> pInsDoc(new ScDocument(SCDOCMODE_CLIP));
pInsDoc->ResetClip( pDoc, nNewTab );
for (SCROW nRow = 0; nRow < nRowSize; ++nRow)
{
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index c95251e0d115..9b1d2b0aaa5c 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -78,7 +78,7 @@
#include "scui_def.hxx"
#include "scabstdlg.hxx"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -274,7 +274,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_PASTE_SPECIAL:
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() ));
+ std::unique_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() ));
SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
if ( pDlg )
{
@@ -455,7 +455,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScNamePasteDlg> pDlg(pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pViewData->GetDocShell(), false ));
+ std::unique_ptr<AbstractScNamePasteDlg> pDlg(pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pViewData->GetDocShell(), false ));
OSL_ENSURE(pDlg, "Dialog create fail!");
short nRet = pDlg->Execute();
// pDlg is needed below
@@ -497,7 +497,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg(
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg(
pViewData->GetDialogParent(), &aAttrs, pObjSh));
OSL_ENSURE(pDlg, "Dialog create fail!");
if (nSlot == SID_CHAR_DLG_EFFECT)
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 3fdbf69520d8..f3f735127da9 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -82,7 +82,7 @@
#include "scabstdlg.hxx"
#include <editeng/fontitem.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -779,7 +779,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if ( pStyleSheet )
{
SfxStyleFamily eFam = pStyleSheet->GetFamily();
- boost::scoped_ptr<SfxAbstractTabDialog> pDlg;
+ std::unique_ptr<SfxAbstractTabDialog> pDlg;
sal_uInt16 nRsc = 0;
// Store old Items from the style
@@ -819,7 +819,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
}
}
- boost::scoped_ptr<SvxNumberInfoItem> pNumberInfoItem(
+ std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem(
ScTabViewShell::MakeNumberInfoItem(&rDoc, GetViewData()));
pDocSh->PutItem( *pNumberInfoItem );
@@ -1792,12 +1792,12 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
{
::editeng::SvxBorderLine* pDefLine = pTabViewShell->GetDefaultFrameLine();
const ScPatternAttr* pOldAttrs = pTabViewShell->GetSelectionPattern();
- boost::scoped_ptr<SfxItemSet> pOldSet(
+ std::unique_ptr<SfxItemSet> pOldSet(
new SfxItemSet(
*(pDoc->GetPool()),
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
- boost::scoped_ptr<SfxItemSet> pNewSet(
+ std::unique_ptr<SfxItemSet> pNewSet(
new SfxItemSet(
*(pDoc->GetPool()),
ATTR_PATTERN_START,
@@ -1858,8 +1858,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_ATTR_BORDER_DIAG_BLTR:
{
const ScPatternAttr* pOldAttrs = pTabViewShell->GetSelectionPattern();
- boost::scoped_ptr<SfxItemSet> pOldSet(new SfxItemSet(pOldAttrs->GetItemSet()));
- boost::scoped_ptr<SfxItemSet> pNewSet(new SfxItemSet(pOldAttrs->GetItemSet()));
+ std::unique_ptr<SfxItemSet> pOldSet(new SfxItemSet(pOldAttrs->GetItemSet()));
+ std::unique_ptr<SfxItemSet> pNewSet(new SfxItemSet(pOldAttrs->GetItemSet()));
const SfxPoolItem* pItem = 0;
if(SID_ATTR_BORDER_DIAG_TLBR == nSlot)
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 006c00c2a385..5200b85eb0be 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -138,8 +138,8 @@
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <memory>
#include <vector>
-#include <boost/shared_ptr.hpp>
using namespace css;
using namespace css::uno;
@@ -5292,11 +5292,11 @@ SvxAdjust toSvxAdjust( const ScPatternAttr& rPat )
return eSvxAdjust;
}
-boost::shared_ptr<ScFieldEditEngine> createEditEngine( ScDocShell* pDocSh, const ScPatternAttr& rPat )
+std::shared_ptr<ScFieldEditEngine> createEditEngine( ScDocShell* pDocSh, const ScPatternAttr& rPat )
{
ScDocument& rDoc = pDocSh->GetDocument();
- boost::shared_ptr<ScFieldEditEngine> pEngine(new ScFieldEditEngine(&rDoc, rDoc.GetEditPool()));
+ std::shared_ptr<ScFieldEditEngine> pEngine(new ScFieldEditEngine(&rDoc, rDoc.GetEditPool()));
ScSizeDeviceProvider aProv(pDocSh);
pEngine->SetRefDevice(aProv.GetDevice());
pEngine->SetRefMapMode(MAP_100TH_MM);
@@ -5375,7 +5375,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
// EditEngine
- boost::shared_ptr<ScFieldEditEngine> pEngine = createEditEngine(pDocSh, *pPattern);
+ std::shared_ptr<ScFieldEditEngine> pEngine = createEditEngine(pDocSh, *pPattern);
MapMode aEditMode = pViewData->GetLogicMode(eWhich); // without draw scaleing
Rectangle aLogicEdit = PixelToLogic( aEditRect, aEditMode );
@@ -5481,7 +5481,7 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow
if (rPos.Y() < aEditRect.Top())
return false;
- boost::shared_ptr<ScFieldEditEngine> pEngine = createEditEngine(pDocSh, *pPattern);
+ std::shared_ptr<ScFieldEditEngine> pEngine = createEditEngine(pDocSh, *pPattern);
Size aPaperSize = Size(1000000, 1000000);
pEngine->SetPaperSize(aPaperSize);
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index f82668a4058d..6faf516234ff 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -983,7 +983,7 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
// setup the SdrPage so that drawinglayer works correctly
ScDrawLayer* pModel = pDoc->GetDrawLayer();
- boost::scoped_ptr<FmFormView> pDrawView;
+ std::unique_ptr<FmFormView> pDrawView;
if (pModel)
{
pDrawView.reset(new FmFormView(pModel, &rDevice));
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index f1432c4fdf0e..0668a5f1cf65 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -66,10 +66,10 @@
#include "colorscale.hxx"
#include <math.h>
+#include <iostream>
#include <map>
+#include <memory>
#include <utility>
-#include <iostream>
-#include <boost/scoped_ptr.hpp>
using namespace com::sun::star;
@@ -1424,7 +1424,7 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
// draw only rows with set RowInfo::bChanged flag
size_t nRow1 = nFirstRow;
- boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(CreateProcessor2D());
+ std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(CreateProcessor2D());
if (!pProcessor)
return;
@@ -1546,7 +1546,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext, const Co
rRenderContext.SetClipRegion( vcl::Region( aClipRect ) );
svx::frame::Array& rArray = mrTabInfo.maArray;
- boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(CreateProcessor2D( ));
+ std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(CreateProcessor2D( ));
long nPosY = nScrY;
for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++)
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index bbdd147350ab..b2e04d01f53e 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -67,7 +67,7 @@
#include <comphelper/string.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <math.h>
@@ -4442,7 +4442,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
void ScOutputData::DrawEdit(bool bPixelToLogic)
{
- boost::scoped_ptr<ScFieldEditEngine> pEngine;
+ std::unique_ptr<ScFieldEditEngine> pEngine;
bool bHyphenatorSet = false;
const ScPatternAttr* pOldPattern = NULL;
const SfxItemSet* pOldCondSet = NULL;
@@ -4474,7 +4474,7 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
long nPosX = 0;
for (SCCOL nX=0; nX<=nX2; nX++) // due to overflow
{
- boost::scoped_ptr< ScPatternAttr > pPreviewPattr;
+ std::unique_ptr< ScPatternAttr > pPreviewPattr;
if (nX==nX1) nPosX = nInitPosX; // positions before nX1 are calculated individually
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
@@ -4644,7 +4644,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
bool bCellContrast = mbUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
- boost::scoped_ptr<ScFieldEditEngine> pEngine;
+ std::unique_ptr<ScFieldEditEngine> pEngine;
bool bHyphenatorSet = false;
const ScPatternAttr* pPattern;
const SfxItemSet* pCondSet;
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index 613484adea69..55ade8b614ab 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -41,7 +41,7 @@
#define ScPivotShell
#include "scslots.hxx"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
TYPEINIT1( ScPivotShell, SfxShell );
@@ -108,7 +108,7 @@ void ScPivotShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScPivotFilterDlg> pDlg(pFact->CreateScPivotFilterDlg(
+ std::unique_ptr<AbstractScPivotFilterDlg> pDlg(pFact->CreateScPivotFilterDlg(
pViewShell->GetDialogParent(), aArgSet, nSrcTab));
OSL_ENSURE(pDlg, "Dialog create fail!");
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 9d4b150ffd2a..6bf5469e81a4 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -64,7 +64,7 @@
#include <docpool.hxx>
#include <patattr.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
// STATIC DATA -----------------------------------------------------------
@@ -507,7 +507,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
static_cast<const ScPatternAttr&>(
rDoc.GetPool()->GetDefaultItem(ATTR_PATTERN));
- boost::scoped_ptr<ScEditEngineDefaulter> pEditEng(
+ std::unique_ptr<ScEditEngineDefaulter> pEditEng(
new ScEditEngineDefaulter(EditEngine::CreatePool(), true));
pEditEng->SetRefMapMode(aMMMode);
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 47abf1b8740e..f9a0c9b3f80c 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -81,7 +81,7 @@ using namespace com::sun::star;
#define ScPreviewShell
#include "scslots.hxx"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
TYPEINIT1( ScPreviewShell, SfxViewShell );
@@ -645,7 +645,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- boost::scoped_ptr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(NULL, aSet));
+ std::unique_ptr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(NULL, aSet));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetLimits( 20, 400 );
pDlg->HideButton( ZoomButtonId::OPTIMAL );
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index e6e6f7b3160c..02a9d5d2351f 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -70,7 +70,7 @@
#include <vcl/lineinfo.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <com/sun/star/document/XDocumentProperties.hpp>
#define ZOOM_MIN 10
@@ -517,7 +517,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
// #114135#
ScDrawLayer* pModel = pDoc->GetDrawLayer();
- boost::scoped_ptr<FmFormView> pDrawView;
+ std::unique_ptr<FmFormView> pDrawView;
if( pModel )
{
@@ -1330,7 +1330,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
if (pBorderData)
{
- boost::scoped_ptr<ScDocument> pBorderDoc(new ScDocument( SCDOCMODE_UNDO ));
+ std::unique_ptr<ScDocument> pBorderDoc(new ScDocument( SCDOCMODE_UNDO ));
pBorderDoc->InitUndo( pDoc, 0,0, true,true );
if (pBorderData)
pBorderDoc->ApplyAttr( 0,0,0, *pBorderData );
@@ -3028,7 +3028,7 @@ void ScPrintFunc::CalcPages() // calculates aPageRect and pages fr
SCROW nPageStartRow = nStartRow;
SCROW nLastVisibleRow = -1;
- ::boost::scoped_ptr<ScRowBreakIterator> pRowBreakIter(pDoc->GetRowBreakIterator(nPrintTab));
+ std::unique_ptr<ScRowBreakIterator> pRowBreakIter(pDoc->GetRowBreakIterator(nPrintTab));
SCROW nNextPageBreak = pRowBreakIter->first();
while (nNextPageBreak != ScRowBreakIterator::NOT_FOUND && nNextPageBreak < nStartRow)
// Skip until the page break position is at the start row or greater.
diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx
index 47be2d29991a..dea6e14a6d1b 100644
--- a/sc/source/ui/view/scextopt.cxx
+++ b/sc/source/ui/view/scextopt.cxx
@@ -21,9 +21,9 @@
#include <osl/diagnose.h>
-#include <vector>
#include <map>
-#include <boost/shared_ptr.hpp>
+#include <memory>
+#include <vector>
ScExtDocSettings::ScExtDocSettings() :
mfTabBarWidth( -1.0 ),
@@ -67,7 +67,7 @@ public:
SCTAB GetLastTab() const;
private:
- typedef ::boost::shared_ptr< ScExtTabSettings > ScExtTabSettingsRef;
+ typedef std::shared_ptr< ScExtTabSettings > ScExtTabSettingsRef;
typedef ::std::map< SCTAB, ScExtTabSettingsRef > ScExtTabSettingsMap;
/** Makes a deep copy of all objects in the passed map. */
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 4621b6984deb..dc838e234db5 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -40,7 +40,7 @@
#include "globstr.hrc"
#include "markdata.hxx"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -82,7 +82,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
const ScPatternAttr* pPattern = NULL;
const ScPatternAttr* pLastPattern = NULL;
- boost::scoped_ptr<SfxItemSet> pEditDefaults(new SfxItemSet(GetEmptyItemSet()));
+ std::unique_ptr<SfxItemSet> pEditDefaults(new SfxItemSet(GetEmptyItemSet()));
if( IsModified() )
{
@@ -112,7 +112,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
if (eCellType == CELLTYPE_EDIT)
{
- boost::scoped_ptr<EditTextObject> pEditObj(CreateTextObject());
+ std::unique_ptr<EditTextObject> pEditObj(CreateTextObject());
mrDoc.SetEditText(aPos, *pEditObj, GetEditTextObjectPool());
}
else
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 436f569414ed..569f578cbdb9 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -67,7 +67,7 @@
#include <comphelper/string.hxx>
#include "scabstdlg.hxx"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
static sal_uInt16 lcl_ParseRange(ScRange& rScRange, const OUString& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */)
{
@@ -659,7 +659,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
SfxItemSet aSet ( GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM );
SvxZoomItem aZoomItem( eOldZoomType, nOldZoom, SID_ATTR_ZOOM );
- boost::scoped_ptr<AbstractSvxZoomDialog> pDlg;
+ std::unique_ptr<AbstractSvxZoomDialog> pDlg;
ScMarkData& rMark = GetViewData().GetMarkData();
SvxZoomEnableFlags nBtnFlags = SvxZoomEnableFlags::N50
| SvxZoomEnableFlags::N75
@@ -802,7 +802,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetDialogParent()));
+ std::unique_ptr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetDialogParent()));
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetDescription(
OUString( ScResId( STR_DLG_SELECTTABLES_TITLE ) ),
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index e8e7ca5d2587..f6ac626e1679 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -57,7 +57,7 @@
#include <com/sun/star/table/BorderLineStyle.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -457,9 +457,9 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
const ScPatternAttr* pOldAttrs = GetSelectionPattern();
- boost::scoped_ptr<SfxAbstractTabDialog> pDlg;
- boost::scoped_ptr<SfxItemSet> pOldSet(new SfxItemSet(pOldAttrs->GetItemSet()));
- boost::scoped_ptr<SvxNumberInfoItem> pNumberInfoItem;
+ std::unique_ptr<SfxAbstractTabDialog> pDlg;
+ std::unique_ptr<SfxItemSet> pOldSet(new SfxItemSet(pOldAttrs->GetItemSet()));
+ std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem;
pOldSet->MergeRange(SID_ATTR_BORDER_STYLES, SID_ATTR_BORDER_DEFAULT_WIDTH);
@@ -565,7 +565,7 @@ bool ScTabViewShell::IsRefInputMode() const
ScCompiler aComp( pDoc, aPos );
aComp.SetGrammar(pDoc->GetGrammar());
aComp.SetCloseBrackets( false );
- boost::scoped_ptr<ScTokenArray> pArr(aComp.CompileString(aString));
+ std::unique_ptr<ScTokenArray> pArr(aComp.CompileString(aString));
if ( pArr && pArr->MayReferenceFollow() )
{
return true;
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 337531d58077..c3959c606434 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -19,7 +19,7 @@
#include <config_features.h>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "scitems.hxx"
#include <sfx2/request.hxx>
@@ -53,7 +53,7 @@
#include <vector>
-using ::boost::scoped_ptr;
+using std::unique_ptr;
using namespace com::sun::star;
void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
@@ -132,7 +132,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetDialogParent()));
+ std::unique_ptr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetDialogParent()));
OSL_ENSURE(pDlg, "Dialog create fail!");
OUString aTabName;
@@ -200,7 +200,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScInsertTableDlg> pDlg(pFact->CreateScInsertTableDlg(GetDialogParent(), rViewData,
+ std::unique_ptr<AbstractScInsertTableDlg> pDlg(pFact->CreateScInsertTableDlg(GetDialogParent(), rViewData,
nTabSelCount, nSlot == FID_INS_TABLE_EXT));
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( RET_OK == pDlg->Execute() )
@@ -372,7 +372,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScStringInputDlg> pDlg(pFact->CreateScStringInputDlg(
+ std::unique_ptr<AbstractScStringInputDlg> pDlg(pFact->CreateScStringInputDlg(
GetDialogParent(), aDlgTitle, OUString(ScResId(SCSTR_NAME)),
aName, GetStaticInterface()->GetSlot(nSlot)->GetCommand(),
pHelpId));
@@ -497,7 +497,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScMoveTableDlg> pDlg(pFact->CreateScMoveTableDlg(GetDialogParent(),
+ std::unique_ptr<AbstractScMoveTableDlg> pDlg(pFact->CreateScMoveTableDlg(GetDialogParent(),
aDefaultName));
OSL_ENSURE(pDlg, "Dialog create fail!");
@@ -664,7 +664,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( nTabSelCount > 1 )
{
- scoped_ptr<ScUndoTabColorInfo::List>
+ std::unique_ptr<ScUndoTabColorInfo::List>
pTabColorList(new ScUndoTabColorInfo::List);
ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd; ++itr)
@@ -696,7 +696,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
aTabBgColor = pDoc->GetTabBgColor( nCurrentTab );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- boost::scoped_ptr<AbstractScTabBgColorDlg> pDlg(pFact->CreateScTabBgColorDlg(
+ std::unique_ptr<AbstractScTabBgColorDlg> pDlg(pFact->CreateScTabBgColorDlg(
GetDialogParent(),
OUString(ScResId(SCSTR_SET_TAB_BG_COLOR)),
OUString(ScResId(SCSTR_NO_TAB_BG_COLOR)),
@@ -709,7 +709,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
Color aSelectedColor;
pDlg->GetSelectedColor(aSelectedColor);
- scoped_ptr<ScUndoTabColorInfo::List>
+ std::unique_ptr<ScUndoTabColorInfo::List>
pTabColorList(new ScUndoTabColorInfo::List);
if ( nTabSelCount > 1 )
{
@@ -757,7 +757,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create();
if (pDlgFactory)
{
- boost::scoped_ptr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
+ std::unique_ptr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
GetDialogParent(), xFrame, false, xEvents, 0 ) );
if ( pDialog.get() && pDialog->Execute() == RET_OK )
{
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 4d32414b5db1..a2ca96ec6883 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -38,8 +38,6 @@
#include "retypepassdlg.hxx"
#include "tabprotection.hxx"
-#include <boost/scoped_ptr.hpp>
-
using namespace com::sun::star;
void ScTabViewShell::ExecuteSbx( SfxRequest& /* rReq */ )
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 8aa822e0a3d4..bc1488f8aed2 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -86,7 +86,6 @@
#include <rowheightcontext.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-#include <boost/scoped_ptr.hpp>
#include <vector>
#include <memory>
@@ -689,7 +688,7 @@ OUString ScViewFunc::GetAutoSumFormula( const ScRangeList& rRangeList, bool bSub
{
ScViewData& rViewData = GetViewData();
ScDocument* pDoc = rViewData.GetDocument();
- ::boost::scoped_ptr<ScTokenArray> pArray(new ScTokenArray);
+ std::unique_ptr<ScTokenArray> pArray(new ScTokenArray);
pArray->AddOpCode(bSubTotal ? ocSubTotal : ocSum);
pArray->AddOpCode(ocOpen);
@@ -774,7 +773,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
ScAddress aPos( nCol, nRow, nTab );
- boost::scoped_ptr<ScDocument> pInsDoc(new ScDocument( SCDOCMODE_CLIP ));
+ std::unique_ptr<ScDocument> pInsDoc(new ScDocument( SCDOCMODE_CLIP ));
pInsDoc->ResetClip( pDoc, nTab );
if (aNewStr[0] == '=') // Formula ?
@@ -802,7 +801,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
// MarkData was already MarkToSimple'ed in PasteFromClip
ScRange aRange;
rMark.GetMarkArea( aRange );
- boost::scoped_ptr<ScPatternAttr> pPattern(new ScPatternAttr( pDoc->GetPool() ));
+ std::unique_ptr<ScPatternAttr> pPattern(new ScPatternAttr( pDoc->GetPool() ));
pPattern->GetItemSet().Put( *pItem );
short nNewType = pDoc->GetFormatTable()->GetType( pItem->GetValue() );
pDoc->ApplyPatternIfNumberformatIncompatible( aRange, rMark,
@@ -3044,11 +3043,11 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
// none of the lines don't care?
if( (eItemState != SfxItemState::DONTCARE) && (eTLBRState != SfxItemState::DONTCARE) && (eBLTRState != SfxItemState::DONTCARE) )
{
- boost::scoped_ptr<SfxItemSet> pOldSet(new SfxItemSet(
+ std::unique_ptr<SfxItemSet> pOldSet(new SfxItemSet(
*(pDoc->GetPool()),
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
- boost::scoped_ptr<SfxItemSet> pNewSet(new SfxItemSet(
+ std::unique_ptr<SfxItemSet> pNewSet(new SfxItemSet(
*(pDoc->GetPool()),
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index e6227831651b..1ffe6ca227e6 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -67,7 +67,7 @@
#include "drawview.hxx"
#include "cliputil.hxx"
#include <gridwin.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -1246,7 +1246,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
// copy from clipboard
// save original data in case of calculation
- boost::scoped_ptr<ScDocument> pMixDoc;
+ std::unique_ptr<ScDocument> pMixDoc;
if (nFunction)
{
bSkipEmpty = false;
@@ -1666,7 +1666,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
}
}
- boost::scoped_ptr<ScDocument> pMixDoc;
+ std::unique_ptr<ScDocument> pMixDoc;
if (bSkipEmpty || nFunction)
{
if (nFlags & IDF_CONTENTS)
@@ -1886,7 +1886,7 @@ bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, b
// run with paste
ScDocument* pDoc = GetViewData().GetDocument();
- boost::scoped_ptr<ScDocument> pClipDoc(new ScDocument( SCDOCMODE_CLIP ));
+ std::unique_ptr<ScDocument> pClipDoc(new ScDocument( SCDOCMODE_CLIP ));
pDoc->CopyTabToClip( rSource.aStart.Col(), rSource.aStart.Row(),
rSource.aEnd.Col(), rSource.aEnd.Row(),
rSource.aStart.Tab(), pClipDoc.get() );
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index c071a8c2c0a1..31c17f968a61 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -70,8 +70,6 @@
#include <refupdatecontext.hxx>
#include <gridwin.hxx>
-#include <boost/scoped_ptr.hpp>
-
using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
@@ -93,7 +91,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
const bool bRecord (rDoc.IsUndoEnabled());
const ScPatternAttr* pPattern = rDoc.GetPattern( nStartCol, nStartRow, nTab );
- boost::scoped_ptr<ScTabEditEngine> pEngine(new ScTabEditEngine( *pPattern, rDoc.GetEnginePool() ));
+ std::unique_ptr<ScTabEditEngine> pEngine(new ScTabEditEngine( *pPattern, rDoc.GetEnginePool() ));
pEngine->EnableUndo( false );
vcl::Window* pActWin = GetActiveWin();
@@ -131,7 +129,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
rDoc.EnableUndo( false );
for( sal_Int32 n = 0; n < nParCnt; n++ )
{
- boost::scoped_ptr<EditTextObject> pObject(pEngine->CreateTextObject(n));
+ std::unique_ptr<EditTextObject> pObject(pEngine->CreateTextObject(n));
EnterData(nStartCol, nRow, nTab, *pObject, true);
if( ++nRow > MAXROW )
break;
@@ -259,7 +257,7 @@ void ScViewFunc::DoRefConversion( bool bRecord )
OUString aNew = aFinder.GetText();
ScCompiler aComp( pDoc, aPos);
aComp.SetGrammar(pDoc->GetGrammar());
- boost::scoped_ptr<ScTokenArray> pArr(aComp.CompileString(aNew));
+ std::unique_ptr<ScTokenArray> pArr(aComp.CompileString(aNew));
ScFormulaCell* pNewCell =
new ScFormulaCell(
pDoc, aPos, *pArr, formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE);
@@ -313,8 +311,8 @@ void ScViewFunc::DoThesaurus( bool bRecord )
ScSplitPos eWhich = GetViewData().GetActivePart();
EESpellState eState;
EditView* pEditView = NULL;
- boost::scoped_ptr<ESelection> pEditSel;
- boost::scoped_ptr<ScEditEngineDefaulter> pThesaurusEngine;
+ std::unique_ptr<ESelection> pEditSel;
+ std::unique_ptr<ScEditEngineDefaulter> pThesaurusEngine;
bool bIsEditMode = GetViewData().HasEditView(eWhich);
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
@@ -356,7 +354,7 @@ void ScViewFunc::DoThesaurus( bool bRecord )
pThesaurusEngine->SetSpeller(xSpeller);
MakeEditView(pThesaurusEngine.get(), nCol, nRow );
const ScPatternAttr* pPattern = NULL;
- boost::scoped_ptr<SfxItemSet> pEditDefaults(
+ std::unique_ptr<SfxItemSet> pEditDefaults(
new SfxItemSet(pThesaurusEngine->GetEmptyItemSet()));
pPattern = rDoc.GetPattern(nCol, nRow, nTab);
if (pPattern)
@@ -496,7 +494,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR
// *** create and init the edit engine *** --------------------------------
- boost::scoped_ptr<ScConversionEngineBase> pEngine;
+ std::unique_ptr<ScConversionEngineBase> pEngine;
switch( rConvParam.GetType() )
{
case SC_CONVERSION_SPELLCHECK:
@@ -739,7 +737,7 @@ void ScViewFunc::InsertBookmark( const OUString& rDescription, const OUString& r
aField.SetTargetFrame(*pTarget);
aEngine.QuickInsertField( SvxFieldItem( aField, EE_FEATURE_FIELD ), aInsSel );
- boost::scoped_ptr<EditTextObject> pData(aEngine.CreateTextObject());
+ std::unique_ptr<EditTextObject> pData(aEngine.CreateTextObject());
EnterData(nPosX, nPosY, nTab, *pData);
}
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index cfd2dc0ae653..edd2dd67adae 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -67,7 +67,7 @@
#include <vcl/msgbox.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/dbaexchange.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -140,7 +140,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
ScMarkData aSrcMark;
aSrcMark.SelectOneTable( nSrcTab ); // for CopyToClip
- boost::scoped_ptr<ScDocument> pClipDoc(new ScDocument( SCDOCMODE_CLIP ));
+ std::unique_ptr<ScDocument> pClipDoc(new ScDocument( SCDOCMODE_CLIP ));
SCCOL nFirstCol, nLastCol;
SCROW nFirstRow, nLastRow;
@@ -306,7 +306,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
// this for html pasting only, but in the future it may
// make sense to do it for other data types too.
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- boost::scoped_ptr<AbstractScTextImportOptionsDlg> pDlg(
+ std::unique_ptr<AbstractScTextImportOptionsDlg> pDlg(
pFact->CreateScTextImportOptionsDlg(NULL));
if (pDlg->Execute() == RET_OK)
@@ -335,7 +335,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
ScImportStringStream aStrm( aStr);
ScAbstractDialogFactory* pFact =
ScAbstractDialogFactory::Create();
- boost::scoped_ptr<AbstractScImportAsciiDlg> pDlg(
+ std::unique_ptr<AbstractScImportAsciiDlg> pDlg(
pFact->CreateScImportAsciiDlg( NULL, OUString(), &aStrm,
SC_PASTETEXT));
@@ -492,7 +492,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
ScDocShellRef aDragShellRef( new ScDocShell );
aDragShellRef->DoInitNew(NULL);
- boost::scoped_ptr<FmFormModel> pModel(new FmFormModel( aPath, NULL, aDragShellRef ));
+ std::unique_ptr<FmFormModel> pModel(new FmFormModel( aPath, NULL, aDragShellRef ));
pModel->GetItemPool().FreezeIdRanges();
xStm->Seek(0);
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 7375f184e4a3..1dd1cb45b0dc 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -78,7 +78,7 @@
#include <rowheightcontext.hxx>
#include <docfuncutil.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
static void lcl_PostRepaintCondFormat( const ScConditionalFormat *pCondFmt, ScDocShell *pDocSh )
{
@@ -626,7 +626,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
bool bSimple = false;
bool bCommon = false;
- boost::scoped_ptr<ScPatternAttr> pCellAttrs;
+ std::unique_ptr<ScPatternAttr> pCellAttrs;
OUString aString;
const ScPatternAttr* pOldPattern = rDoc.GetPattern( nCol, nRow, nTab );
@@ -1201,7 +1201,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
}
aChangeRanges.Append(aPos);
- boost::scoped_ptr<ScPatternAttr> pOldPat(new ScPatternAttr(*rDoc.GetPattern( nCol, nRow, nTab )));
+ std::unique_ptr<ScPatternAttr> pOldPat(new ScPatternAttr(*rDoc.GetPattern( nCol, nRow, nTab )));
rDoc.ApplyPattern( nCol, nRow, nTab, rAttr );
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index b70211e40395..5747d0592e13 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -49,7 +49,7 @@
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet,
sal_uInt16 nWhichId, SvtScriptType nScript )
@@ -350,7 +350,7 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
- boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+ std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
if ( pDlg->Execute() == RET_OK )
{
SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, false );