diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-18 09:08:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-18 09:28:59 +0000 |
commit | c8204ba5b86d080aa5ac3ec71dc6aaea1384b9a0 (patch) | |
tree | c4ae951328f359fb4f6fdee62bb0f276a9034579 /sc/source/ui | |
parent | c722e9e728ec6c9df0285f5dd2041aa58f66f686 (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')
89 files changed, 384 insertions, 403 deletions
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index 3eb3ba010983..1a3420650edb 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -79,7 +79,7 @@ OUString lclCreateMultiParameterFormula( void lclMakeSubRangesList(ScRangeList& rRangeList, ScRange& rInputRange, ScStatisticsInputOutputDialog::GroupedBy aGroupedBy) { - boost::scoped_ptr<DataRangeIterator> pIterator; + std::unique_ptr<DataRangeIterator> pIterator; if (aGroupedBy == ScStatisticsInputOutputDialog::BY_COLUMN) pIterator.reset(new DataRangeByColumnIterator(rInputRange)); else diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx index 9acf9ed6f1d7..e023d45accf9 100644 --- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx @@ -78,7 +78,7 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell) // Exponential Smoothing output.push(); - boost::scoped_ptr<DataRangeIterator> pIterator; + std::unique_ptr<DataRangeIterator> pIterator; if (mGroupedBy == BY_COLUMN) pIterator.reset(new DataRangeByColumnIterator(mInputRange)); else diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx index 8514dfc1342b..4bebec6c547b 100644 --- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx @@ -63,7 +63,7 @@ ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell) formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv)); FormulaTemplate aTemplate(mDocument); - boost::scoped_ptr<DataRangeIterator> pIterator; + std::unique_ptr<DataRangeIterator> pIterator; if (mGroupedBy == BY_COLUMN) pIterator.reset(new DataRangeByColumnIterator(mInputRange)); else diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index b7128e277560..fe746d92c26d 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -8,7 +8,7 @@ * */ -#include <boost/scoped_ptr.hpp> +#include <memory> #include <editeng/editobj.hxx> #include <editeng/wghtitem.hxx> @@ -192,7 +192,7 @@ void AddressWalkerWriter::writeBoldString(const OUString& aString) SvxWeightItem aWeight(WEIGHT_BOLD, EE_CHAR_WEIGHT); aItemSet.Put(aWeight); rEngine.QuickSetAttribs(aItemSet, ESelection(0, 0, 0, aString.getLength()) ); - boost::scoped_ptr<EditTextObject> pEditText(rEngine.CreateTextObject()); + std::unique_ptr<EditTextObject> pEditText(rEngine.CreateTextObject()); mpDocShell->GetDocFunc().SetEditCell(mCurrentAddress, *pEditText, true); } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 6bb0d37b9fa4..9e4b8ac749ab 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1247,7 +1247,7 @@ static OUString lcl_Calculate( const OUString& rFormula, ScDocument* pDoc, const if(rFormula.isEmpty()) return OUString(); - boost::scoped_ptr<ScSimpleFormulaCalculator> pCalc( new ScSimpleFormulaCalculator( pDoc, rPos, rFormula ) ); + std::unique_ptr<ScSimpleFormulaCalculator> pCalc( new ScSimpleFormulaCalculator( pDoc, rPos, rFormula ) ); // FIXME: HACK! In order to not get a #REF! for ColRowNames, if a name is actually inserted as a Range // into the whole Formula, but is interpreted as a single cell reference when displaying it on its own diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index 08144fc4e857..a1c9b242fdae 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -50,8 +50,8 @@ ScInputStatusItem::ScInputStatusItem( aStartPos ( rStartPos ), aEndPos ( rEndPos ), aString ( rString ), - pEditData ( pData ? pData->Clone() : NULL ), - mpMisspellRanges(NULL) + pEditData ( pData ? pData->Clone() : nullptr ), + mpMisspellRanges(nullptr) { } @@ -61,7 +61,7 @@ ScInputStatusItem::ScInputStatusItem( const ScInputStatusItem& rItem ) : aStartPos ( rItem.aStartPos ), aEndPos ( rItem.aEndPos ), aString ( rItem.aString ), - pEditData ( rItem.pEditData ? rItem.pEditData->Clone() : NULL ), + pEditData ( rItem.pEditData ? rItem.pEditData->Clone() : nullptr ), mpMisspellRanges(rItem.mpMisspellRanges) { } @@ -146,7 +146,7 @@ ScSortItem::ScSortItem( sal_uInt16 nWhichP, ScSortItem::ScSortItem( sal_uInt16 nWhichP, const ScSortParam* pSortData ) : SfxPoolItem ( nWhichP ), - pViewData ( NULL ) + pViewData ( nullptr ) { if ( pSortData ) theSortData = *pSortData; } @@ -191,7 +191,7 @@ ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), - mpQueryData(NULL), + mpQueryData(nullptr), pViewData ( ptrViewData ), bIsAdvanced ( false ) { @@ -204,8 +204,8 @@ ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), - mpQueryData(NULL), - pViewData ( NULL ), + mpQueryData(nullptr), + pViewData ( nullptr ), bIsAdvanced ( false ) { if (pQueryData) @@ -281,7 +281,7 @@ ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), - pViewData ( NULL ) + pViewData ( nullptr ) { if ( pSubTotalData ) theSubTotalData = *pSubTotalData; } @@ -324,7 +324,7 @@ bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nM */ ScUserListItem::ScUserListItem( sal_uInt16 nWhichP ) : SfxPoolItem ( nWhichP ), - pUserList ( NULL ) + pUserList ( nullptr ) { } @@ -334,7 +334,7 @@ ScUserListItem::ScUserListItem( const ScUserListItem& rItem ) if ( rItem.pUserList ) pUserList = new ScUserList( *(rItem.pUserList) ); else - pUserList = NULL; + pUserList = nullptr; } ScUserListItem::~ScUserListItem() diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 9911d3b8c9ae..75daa6ab295e 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -43,13 +43,13 @@ using ::std::vector; ScMenuFloatingWindow::MenuItemData::MenuItemData() : mbEnabled(true), mbSeparator(false), - mpAction(static_cast<ScCheckListMenuWindow::Action*>(NULL)), - mpSubMenuWin(static_cast<ScMenuFloatingWindow*>(NULL)) + mpAction(static_cast<ScCheckListMenuWindow::Action*>(nullptr)), + mpSubMenuWin(static_cast<ScMenuFloatingWindow*>(nullptr)) { } ScMenuFloatingWindow::SubMenuItemData::SubMenuItemData(ScMenuFloatingWindow* pParent) : - mpSubMenu(NULL), + mpSubMenu(nullptr), mnMenuPos(MENU_NOT_SELECTED), mpParent(pParent) { @@ -59,7 +59,7 @@ ScMenuFloatingWindow::SubMenuItemData::SubMenuItemData(ScMenuFloatingWindow* pPa void ScMenuFloatingWindow::SubMenuItemData::reset() { - mpSubMenu = NULL; + mpSubMenu = nullptr; mnMenuPos = MENU_NOT_SELECTED; maTimer.Stop(); } @@ -491,7 +491,7 @@ void ScMenuFloatingWindow::handleMenuTimeout(SubMenuItemData* pTimer) if (maCloseTimer.mpSubMenu) { maCloseTimer.mpSubMenu->EndPopupMode(); - maCloseTimer.mpSubMenu = NULL; + maCloseTimer.mpSubMenu = nullptr; maCloseTimer.maTimer.Stop(); } @@ -502,10 +502,10 @@ void ScMenuFloatingWindow::handleMenuTimeout(SubMenuItemData* pTimer) // end submenu. if (maCloseTimer.mpSubMenu) { - maOpenTimer.mpSubMenu = NULL; + maOpenTimer.mpSubMenu = nullptr; maCloseTimer.mpSubMenu->EndPopupMode(); - maCloseTimer.mpSubMenu = NULL; + maCloseTimer.mpSubMenu = nullptr; Invalidate(); maOpenTimer.mnMenuPos = MENU_NOT_SELECTED; @@ -647,7 +647,7 @@ void ScMenuFloatingWindow::clearSelectedMenuItem() ScMenuFloatingWindow* ScMenuFloatingWindow::getSubMenuWindow(size_t nPos) const { if (maMenuItems.size() <= nPos) - return NULL; + return nullptr; return maMenuItems[nPos].mpSubMenuWin.get(); } @@ -849,7 +849,7 @@ ScCheckListMenuWindow::Member::Member() : mbVisible(true) , mbDate(false) , mbLeaf(false) - , mpParent(NULL) + , mpParent(nullptr) { } @@ -883,9 +883,9 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* p maBtnOk(VclPtr<OKButton>::Create(this)), maBtnCancel(VclPtr<CancelButton>::Create(this)), mnCurTabStop(0), - mpExtendedData(NULL), - mpOKAction(NULL), - mpPopupEndAction(NULL), + mpExtendedData(nullptr), + mpOKAction(nullptr), + mpPopupEndAction(nullptr), maWndSize(), mePrevToggleAllState(TRISTATE_INDET) { @@ -1397,17 +1397,17 @@ void ScCheckListMenuWindow::addDateMember(const OUString& rsName, double nVal, b maChecks->SetUpdateMode(false); - SvTreeListEntry* pYearEntry = maChecks->FindEntry(NULL, aYearName); + SvTreeListEntry* pYearEntry = maChecks->FindEntry(nullptr, aYearName); if (!pYearEntry) { - pYearEntry = maChecks->InsertEntry(aYearName, NULL, true); + pYearEntry = maChecks->InsertEntry(aYearName, nullptr, true); Member aMemYear; aMemYear.maName = aYearName; aMemYear.maRealName = rsName; aMemYear.mbDate = true; aMemYear.mbLeaf = false; aMemYear.mbVisible = bVisible; - aMemYear.mpParent = NULL; + aMemYear.mpParent = nullptr; maMembers.push_back(aMemYear); } @@ -1449,12 +1449,12 @@ void ScCheckListMenuWindow::addMember(const OUString& rName, bool bVisible) aMember.mbDate = false; aMember.mbLeaf = true; aMember.mbVisible = bVisible; - aMember.mpParent = NULL; + aMember.mpParent = nullptr; maMembers.push_back(aMember); } ScCheckListBox::ScCheckListBox( vcl::Window* pParent, WinBits nWinStyle ) - : SvTreeListBox( pParent, nWinStyle ), mpCheckButton( NULL ) + : SvTreeListBox( pParent, nWinStyle ), mpCheckButton( nullptr ) { Init(); } @@ -1470,7 +1470,7 @@ SvTreeListEntry* ScCheckListBox::FindEntry( SvTreeListEntry* pParent, const OUSt pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos ); } - return NULL; + return nullptr; } void ScCheckListBox::Init() @@ -1554,7 +1554,7 @@ void ScCheckListBox::ShowCheckEntry( const OUString& sName, SvTreeListEntry* pPa if ( !pEntry ) { pEntry = InsertEntry( - sName, NULL, false, TREELIST_APPEND, NULL, + sName, nullptr, false, TREELIST_APPEND, nullptr, SvLBoxButtonKind_enabledCheckbox); SetCheckButtonState( @@ -1578,13 +1578,13 @@ SvTreeListEntry* ScCheckListBox::CountCheckedEntries( SvTreeListEntry* pParent, CountCheckedEntries( pEntry, nCount ); pEntry = NextSibling( pEntry ); } - return NULL; + return nullptr; } sal_uInt16 ScCheckListBox::GetCheckedEntryCount() const { sal_uLong nCount = 0; - CountCheckedEntries( NULL, nCount ); + CountCheckedEntries( nullptr, nCount ); return nCount; } @@ -1636,7 +1636,7 @@ void ScCheckListMenuWindow::initMembers() // Expand first node of checked dates if (!maMembers[i].mpParent && maChecks->IsChecked(maMembers[i].maName, maMembers[i].mpParent)) { - SvTreeListEntry* pEntry = maChecks->FindEntry(NULL, maMembers[i].maName); + SvTreeListEntry* pEntry = maChecks->FindEntry(nullptr, maMembers[i].maName); if (pEntry) maChecks->Expand(pEntry); } @@ -1647,7 +1647,7 @@ void ScCheckListMenuWindow::initMembers() if (aLabel.isEmpty()) aLabel = ScGlobal::GetRscString(STR_EMPTYDATA); SvTreeListEntry* pEntry = maChecks->InsertEntry( - aLabel, NULL, false, TREELIST_APPEND, NULL, + aLabel, nullptr, false, TREELIST_APPEND, nullptr, SvLBoxButtonKind_enabledCheckbox); maChecks->SetCheckButtonState( diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 3d9d0b9428c1..46c764e5b209 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -308,7 +308,7 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit*, pEdit) ScCompiler aComp( mpDoc, maPos ); aComp.SetGrammar( mpDoc->GetGrammar() ); - boost::scoped_ptr<ScTokenArray> ta(aComp.CompileString(aFormula)); + std::unique_ptr<ScTokenArray> ta(aComp.CompileString(aFormula)); // Error, warn the user if( ta->GetCodeError() || ( ta->GetLen() == 0 ) ) diff --git a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx index 30c42c5c65b8..3b6dc553cf8f 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx @@ -56,7 +56,7 @@ bool ScPivotLayoutTreeList::DoubleClickHdl() vector<ScDPName> aDataFieldNames; mpParent->PushDataFieldNames(aDataFieldNames); - boost::scoped_ptr<AbstractScDPSubtotalDlg> pDialog( + std::unique_ptr<AbstractScDPSubtotalDlg> pDialog( pFactory->CreateScDPSubtotalDlg(this, mpParent->maPivotTableObject, rCurrentLabelData, rCurrentFunctionData, aDataFieldNames, true)); if (pDialog->Execute() == RET_OK) diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index a45b650135ef..5f9a2fb720c9 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx @@ -81,7 +81,7 @@ bool ScPivotLayoutTreeListData::DoubleClickHdl() ScAbstractDialogFactory* pFactory = ScAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractScDPFunctionDlg> pDialog( + std::unique_ptr<AbstractScDPFunctionDlg> pDialog( pFactory->CreateScDPFunctionDlg(this, mpParent->GetLabelDataVector(), rCurrentLabelData, rCurrentFunctionData)); if (pDialog->Execute() == RET_OK) diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 1df27049e7d1..e54cc5ce619b 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -39,7 +39,6 @@ #include "dputil.hxx" #include <vector> -#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star::sheet; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index e8d6a7832847..0ff11a59c12a 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -91,7 +91,7 @@ #include <memory> #include <utility> #include <basic/basmgr.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <set> #include <vector> @@ -618,7 +618,7 @@ bool ScDocFunc::DeleteContents( } // To keep track of all non-empty cells within the deleted area. - boost::shared_ptr<ScSimpleUndo::DataSpansType> pDataSpans; + std::shared_ptr<ScSimpleUndo::DataSpansType> pDataSpans; if ( bRecord ) { @@ -686,7 +686,7 @@ bool ScDocFunc::DeleteCell( rDoc.DeleteObjectsInArea(rPos.Col(), rPos.Row(), rPos.Col(), rPos.Row(), rMark); // To keep track of all non-empty cells within the deleted area. - boost::shared_ptr<ScSimpleUndo::DataSpansType> pDataSpans; + std::shared_ptr<ScSimpleUndo::DataSpansType> pDataSpans; ScDocument* pUndoDoc = NULL; if (bRecord) @@ -978,7 +978,7 @@ bool ScDocFunc::SetStringOrEditCell( const ScAddress& rPos, const OUString& rStr { ScFieldEditEngine& rEngine = rDoc.GetEditEngine(); rEngine.SetText(rStr); - boost::scoped_ptr<EditTextObject> pEditText(rEngine.CreateTextObject()); + std::unique_ptr<EditTextObject> pEditText(rEngine.CreateTextObject()); return SetEditCell(rPos, *pEditText, bInteraction); } else @@ -1106,7 +1106,7 @@ bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, } // A copy of pNewData will be stored in the cell. - boost::scoped_ptr<EditTextObject> pNewData(rEngine.CreateTextObject()); + std::unique_ptr<EditTextObject> pNewData(rEngine.CreateTextObject()); bRet = SetEditCell(rPos, *pNewData, !bApi); // Set the paragraph attributes back to the EditEngine. @@ -1177,7 +1177,7 @@ bool ScDocFunc::SetCellText( { ScDocument& rDoc = rDocShell.GetDocument(); - ::boost::scoped_ptr<ScExternalRefManager::ApiGuard> pExtRefGuard; + ::std::unique_ptr<ScExternalRefManager::ApiGuard> pExtRefGuard; if (bApi) pExtRefGuard.reset(new ScExternalRefManager::ApiGuard(&rDoc)); @@ -5320,7 +5320,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor IDF_ALL, false, pUndoDoc ); } - boost::scoped_ptr<ScRange> pRepaintRange; + std::unique_ptr<ScRange> pRepaintRange; if(nOldFormat) { ScConditionalFormat* pOldFormat = rDoc.GetCondFormList(nTab)->GetFormat(nOldFormat); diff --git a/sc/source/ui/docshell/docfuncutil.cxx b/sc/source/ui/docshell/docfuncutil.cxx index 1adb1355d556..63f1f1caca7f 100644 --- a/sc/source/ui/docshell/docfuncutil.cxx +++ b/sc/source/ui/docshell/docfuncutil.cxx @@ -74,7 +74,7 @@ ScDocument* DocFuncUtil::createDeleteContentsUndoDoc( void DocFuncUtil::addDeleteContentsUndo( svl::IUndoManager* pUndoMgr, ScDocShell* pDocSh, const ScMarkData& rMark, const ScRange& rRange, ScDocument* pUndoDoc, InsertDeleteFlags nFlags, - const boost::shared_ptr<ScSimpleUndo::DataSpansType>& pSpans, + const std::shared_ptr<ScSimpleUndo::DataSpansType>& pSpans, bool bMulti, bool bDrawUndo ) { std::unique_ptr<ScUndoDeleteContents> pUndo( diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 18add14fadfc..e724f6811ac3 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -129,14 +129,14 @@ #include "sccollaboration.hxx" #endif +#include <memory> #include <vector> -#include <boost/shared_ptr.hpp> using namespace com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::lang::XMultiServiceFactory; -using ::boost::shared_ptr; +using std::shared_ptr; using ::std::vector; // STATIC DATA ----------------------------------------------------------- diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 392435475f0c..0671e754a2fb 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -61,7 +61,7 @@ #include "conflictsdlg.hxx" #include "globstr.hrc" #include "markdata.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> // Redraw - Benachrichtigungen @@ -642,7 +642,7 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, vcl::Windo aSet.Put( SvxPostItAuthorItem( aAuthor, SID_ATTR_POSTIT_AUTHOR ) ); aSet.Put( SvxPostItDateItem ( aDate, SID_ATTR_POSTIT_DATE ) ); - boost::scoped_ptr<ScRedComDialog> pDlg(new ScRedComDialog( pParent, aSet,this,pAction,bPrevNext)); + std::unique_ptr<ScRedComDialog> pDlg(new ScRedComDialog( pParent, aSet,this,pAction,bPrevNext)); pDlg->Execute(); } diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index b422a5150163..1b74471c2cdc 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -98,7 +98,7 @@ using namespace ::com::sun::star; #include "conditio.hxx" #include "sheetevents.hxx" #include <documentlinkmgr.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #define IS_SHARE_HEADER(set) \ static_cast<const SfxBoolItem&>( \ @@ -326,7 +326,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - boost::scoped_ptr<AbstractScColRowLabelDlg> pDlg(pFact->CreateScColRowLabelDlg(pParent, bRowHeaders, bColHeaders)); + std::unique_ptr<AbstractScColRowLabelDlg> pDlg(pFact->CreateScColRowLabelDlg(pParent, bRowHeaders, bColHeaders)); OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { @@ -872,7 +872,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - boost::scoped_ptr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(GetActiveDialogParent(), aName, true, bSheetProtected)); + std::unique_ptr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(GetActiveDialogParent(), aName, true, bSheetProtected)); OSL_ENSURE(pNewDlg, "Dialog create fail!"); pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags ); if ( pNewDlg->Execute() == RET_OK ) @@ -1551,7 +1551,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScStyleDlg( GetActiveDialogParent(), *pStyleSheet, RID_SCDLG_STYLES_PAGE, RID_SCDLG_STYLES_PAGE )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScStyleDlg( GetActiveDialogParent(), *pStyleSheet, RID_SCDLG_STYLES_PAGE, RID_SCDLG_STYLES_PAGE )); OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) @@ -1706,7 +1706,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScHFEditDlg( SfxViewFrame::Current(), + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScHFEditDlg( SfxViewFrame::Current(), GetActiveDialogParent(), rStyleSet, aStr, diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx index 75c2da638bd3..19a8f0953768 100644 --- a/sc/source/ui/docshell/documentlinkmgr.cxx +++ b/sc/source/ui/docshell/documentlinkmgr.cxx @@ -27,7 +27,7 @@ #include <vcl/layout.hxx> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sc { @@ -35,11 +35,11 @@ struct DocumentLinkManagerImpl : boost::noncopyable { ScDocument& mrDoc; SfxObjectShell* mpShell; - boost::scoped_ptr<DataStream> mpDataStream; - boost::scoped_ptr<sfx2::LinkManager> mpLinkManager; + std::unique_ptr<DataStream> mpDataStream; + std::unique_ptr<sfx2::LinkManager> mpLinkManager; DocumentLinkManagerImpl( ScDocument& rDoc, SfxObjectShell* pShell ) : - mrDoc(rDoc), mpShell(pShell), mpDataStream(NULL), mpLinkManager(NULL) {} + mrDoc(rDoc), mpShell(pShell), mpDataStream(nullptr), mpLinkManager(nullptr) {} ~DocumentLinkManagerImpl() { diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 96d174308807..5b7dcb5a79c3 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -59,8 +59,6 @@ #include <memory> #include <algorithm> -#include <boost/scoped_ptr.hpp> - using ::std::unique_ptr; using ::com::sun::star::uno::Any; using ::std::vector; @@ -599,7 +597,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData( // Cache hit! return itrRange->second; - ::boost::scoped_ptr<ScRange> pNewRange; + std::unique_ptr<ScRange> pNewRange; TokenArrayRef pArray; bool bFirstTab = true; for (size_t nTab = nTabFirstId; nTab <= nTabLastId; ++nTab) @@ -1468,7 +1466,7 @@ static ScTokenArray* convertToTokenArray( // range to it. return NULL; - ::boost::scoped_ptr<ScRange> pUsedRange; + std::unique_ptr<ScRange> pUsedRange; unique_ptr<ScTokenArray> pArray(new ScTokenArray); bool bFirstTab = true; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index da82e0b5df16..4feaccc3af15 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -54,7 +54,7 @@ #include "globstr.hrc" #include <vcl/svapp.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> // We don't want to end up with 2GB read in one line just because of malformed // multiline fields, so chop it _somewhere_, which is twice supported columns @@ -1266,7 +1266,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) sal_uInt64 const nOldPos = rStrm.Tell(); sal_uInt64 const nRemaining = rStrm.remainingSize(); - boost::scoped_ptr<ScProgress> xProgress( new ScProgress( pDocSh, + std::unique_ptr<ScProgress> xProgress( new ScProgress( pDocSh, ScGlobal::GetRscString( STR_LOAD_DOC ), nRemaining )); rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() ); @@ -1295,8 +1295,8 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) CalendarWrapper aCalendar( comphelper::getProcessComponentContext() ); aCalendar.loadDefaultCalendar( LanguageTag::convertToLocale( eDocLang ) ); - boost::scoped_ptr< ::utl::TransliterationWrapper > pEnglishTransliteration; - boost::scoped_ptr< CalendarWrapper > pEnglishCalendar; + std::unique_ptr< ::utl::TransliterationWrapper > pEnglishTransliteration; + std::unique_ptr< CalendarWrapper > pEnglishCalendar; if ( eDocLang != LANGUAGE_ENGLISH_US ) { pEnglishTransliteration.reset(new ::utl::TransliterationWrapper ( diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 3958b3745709..dd8303e809e8 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -58,7 +58,7 @@ #include <sfx2/viewsh.hxx> #include <com/sun/star/util/XModifiable.hpp> #include <com/sun/star/frame/XFrame.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> TYPEINIT1( ScDrawShell, SfxShell ); @@ -263,7 +263,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog( pWin, pView )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog( pWin, pView )); const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange ); @@ -285,7 +285,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog( pWin, &aNewAttr,pView )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog( pWin, &aNewAttr,pView )); OSL_ENSURE(pDlg, "Dialog creation failed!"); if (pDlg->Execute() == RET_OK) { @@ -334,7 +334,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin ) } // create empty itemset for macro-dlg - boost::scoped_ptr<SfxItemSet> pItemSet(new SfxItemSet(SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 )); + std::unique_ptr<SfxItemSet> pItemSet(new SfxItemSet(SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 )); pItemSet->Put ( aItem, SID_ATTR_MACROITEM ); SfxEventNamesItem aNamesItem(SID_EVENTCONFIG); @@ -346,7 +346,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin ) xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( pWin, *pItemSet, xFrame, SID_EVENTCONFIG )); + std::unique_ptr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( pWin, *pItemSet, xFrame, SID_EVENTCONFIG )); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK ) { const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); @@ -391,7 +391,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(), + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(), &aNewAttr, pViewData->GetDocument()->GetDrawLayer(), pObj, @@ -422,7 +422,7 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) pView->MergeAttrFromMarked( aNewAttr, false ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( + std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( pViewData->GetDialogParent(), &aNewAttr, pViewData->GetDocument()->GetDrawLayer(), true)); @@ -451,7 +451,7 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 /* nTabPage * pView->MergeAttrFromMarked( aNewAttr, false ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView )); sal_uInt16 nResult = pDlg->Execute(); diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index 772dabbed720..d3f2dad76446 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -56,7 +56,7 @@ #include "userdat.hxx" #include "postit.hxx" #include "drtxtob.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include "sc.hrc" @@ -487,7 +487,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName)); + std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName)); OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetCheckNameHdl(LINK(this, ScDrawShell, NameObjectHdl)); @@ -556,7 +556,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription)); + std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index e74c17fca932..04b9d34dc68c 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -79,7 +79,7 @@ #define ScDrawTextObjectBar #include "scslots.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -876,7 +876,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) case SID_DRAWTEXT_ATTR_DLG: { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aEditAttr, pView )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aEditAttr, pView )); bDone = ( RET_OK == pDlg->Execute() ); diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 1c03ba30758d..1c066228c92b 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -39,7 +39,7 @@ #include <gridwin.hxx> #include "scabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet , sal_uInt16 nSlot) @@ -47,7 +47,7 @@ bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); assert(pFact && "ScAbstractFactory create fail!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg( + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg( pViewData->GetDialogParent(), &rArgs, pViewData->GetSfxDocShell())); assert(pDlg && "Dialog create fail!"); @@ -94,7 +94,7 @@ bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScParagraphDlg( + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr)); OSL_ENSURE(pDlg, "Dialog create fail!"); bool bRet = ( pDlg->Execute() == RET_OK ); @@ -114,7 +114,7 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ ) SdrView* pView = pViewData->GetScDrawView(); OutlinerView* pOutView = pView->GetTextEditOutlinerView(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() )); + std::unique_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() )); pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING ); pDlg->Insert( SotClipboardFormatId::RTF, EMPTY_OUSTRING ); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 03c8720b94e5..02c5ecca76fb 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -80,7 +80,7 @@ using namespace ::com::sun::star; #include "drawview.hxx" #include "markdata.hxx" #include "gridwin.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace { @@ -242,7 +242,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* case SID_INSERT_FLOATINGFRAME : { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractInsertObjectDialog> pDlg( + std::unique_ptr<SfxAbstractInsertObjectDialog> pDlg( pFact->CreateInsertObjectDialog( pViewShell->GetWindow(), SC_MOD()->GetSlotPool()->GetSlot(nSlot)->GetCommandString(), xStorage, &aServerLst )); if ( pDlg ) diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx index 13cd9597749e..17d3dd569e43 100644 --- a/sc/source/ui/drawfunc/mediash.cxx +++ b/sc/source/ui/drawfunc/mediash.cxx @@ -71,7 +71,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet ) { if( SID_AVMEDIA_TOOLBOX == nWhich ) { - boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() )); + std::unique_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() )); bool bDisable = true; if( 1 == pMarkList->GetMarkCount() ) @@ -111,7 +111,7 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq ) if( pItem ) { - boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() )); + std::unique_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() )); if( 1 == pMarkList->GetMarkCount() ) { diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index ba871d415bb3..b2ae1297d81e 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -308,7 +308,7 @@ bool ScFormulaDlg::Close() bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult ) { - boost::scoped_ptr<ScSimpleFormulaCalculator> pFCell( new ScSimpleFormulaCalculator( pDoc, aCursorPos, rStrExp ) ); + std::unique_ptr<ScSimpleFormulaCalculator> pFCell( new ScSimpleFormulaCalculator( pDoc, aCursorPos, rStrExp ) ); pFCell->SetLimitString(true); // HACK! to avoid neither #REF! from ColRowNames diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index f3289aa2e640..d7e5c798c916 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -17,7 +17,7 @@ #include <vcl/timer.hxx> #include <svx/checklbx.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <unordered_map> namespace com { namespace sun { namespace star { @@ -150,13 +150,13 @@ private: bool mbEnabled:1; bool mbSeparator:1; - ::boost::shared_ptr<Action> mpAction; + std::shared_ptr<Action> mpAction; VclPtr<ScMenuFloatingWindow> mpSubMenuWin; MenuItemData(); }; - ::std::vector<MenuItemData> maMenuItems; + std::vector<MenuItemData> maMenuItems; struct SubMenuItemData { @@ -345,13 +345,13 @@ private: VclPtr<OKButton> maBtnOk; VclPtr<CancelButton> maBtnCancel; - ::std::vector<VclPtr<vcl::Window> > maTabStopCtrls; + std::vector<VclPtr<vcl::Window> > maTabStopCtrls; size_t mnCurTabStop; - ::std::vector<Member> maMembers; - boost::scoped_ptr<ExtendedData> mpExtendedData; - boost::scoped_ptr<Action> mpOKAction; - boost::scoped_ptr<Action> mpPopupEndAction; + std::vector<Member> maMembers; + std::unique_ptr<ExtendedData> mpExtendedData; + std::unique_ptr<Action> mpOKAction; + std::unique_ptr<Action> mpPopupEndAction; Config maConfig; Size maWndSize; /// whole window size. diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index 814e366f9598..3fd588dee14f 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -235,7 +235,7 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry VclPtr<PushButton> maBtOptions; - boost::scoped_ptr<ScDataBarFormatData> mpDataBarData; + std::unique_ptr<ScDataBarFormatData> mpDataBarData; ScFormatEntry* createDatabarEntry() const; diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx index e962b61aa78c..48323642f207 100644 --- a/sc/source/ui/inc/datastream.hxx +++ b/sc/source/ui/inc/datastream.hxx @@ -18,7 +18,6 @@ #include <address.hxx> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> #include <vector> #include <documentstreamaccess.hxx> diff --git a/sc/source/ui/inc/docfuncutil.hxx b/sc/source/ui/inc/docfuncutil.hxx index 65bf820526be..e1db8ce58c35 100644 --- a/sc/source/ui/inc/docfuncutil.hxx +++ b/sc/source/ui/inc/docfuncutil.hxx @@ -10,7 +10,7 @@ #include <undobase.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> class ScDocument; class ScMarkData; @@ -32,7 +32,7 @@ public: static void addDeleteContentsUndo( svl::IUndoManager* pUndoMgr, ScDocShell* pDocSh, const ScMarkData& rMark, const ScRange& rRange, ScDocument* pUndoDoc, InsertDeleteFlags nFlags, - const boost::shared_ptr<ScSimpleUndo::DataSpansType>& pSpans, + const std::shared_ptr<ScSimpleUndo::DataSpansType>& pSpans, bool bMulti, bool bDrawUndo ); static ScSimpleUndo::DataSpansType* getNonEmptyCellSpans( diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 5d6b5b87d1bb..0b5fdcdecc95 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -35,8 +35,8 @@ #include "optutil.hxx" #include "docuno.hxx" -#include <boost/scoped_ptr.hpp> #include <config_telepathy.h> +#include <memory> #include <unordered_map> class ScRefreshTimerProtector; @@ -453,7 +453,7 @@ typedef tools::SvRef<ScDocShell> ScDocShellRef; class SC_DLLPUBLIC ScDocShellModificator { ScDocShell& rDocShell; - boost::scoped_ptr<ScRefreshTimerProtector> mpProtector; + std::unique_ptr<ScRefreshTimerProtector> mpProtector; bool bAutoCalcShellDisabled; bool bIdleEnabled; diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index 92ed9bba988e..f01e1feeda5a 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -36,7 +36,6 @@ #include <map> #include <boost/ptr_container/ptr_map.hpp> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> class ScFilterOptionsMgr; class ScViewData; diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index 83350a8fb948..ce2b8b6cbe68 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -35,7 +35,7 @@ #include <sfx2/itemconnect.hxx> #include "pivot.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include <unordered_map> typedef sfx::ListBoxWrapper< sal_Int32 > ScDPListBoxWrapper; @@ -90,7 +90,7 @@ private: NameMapType maBaseFieldNameMap; // cache for base field display -> original name. NameMapType maBaseItemNameMap; // cache for base item display -> original name. - boost::scoped_ptr<ScDPListBoxWrapper> mxLbTypeWrp; /// Wrapper for direct usage of API constants. + std::unique_ptr<ScDPListBoxWrapper> mxLbTypeWrp; /// Wrapper for direct usage of API constants. const ScDPLabelDataVector& mrLabelVec; /// Data of all labels. bool mbEmptyItem; /// true = Empty base item in listbox. @@ -176,8 +176,8 @@ private: VclPtr<FixedText> m_pFtHierarchy; VclPtr<ListBox> m_pLbHierarchy; - boost::scoped_ptr<ScDPListBoxWrapper> m_xLbLayoutWrp; /// Wrapper for direct usage of API constants. - boost::scoped_ptr<ScDPListBoxWrapper> m_xLbShowFromWrp; /// Wrapper for direct usage of API constants. + std::unique_ptr<ScDPListBoxWrapper> m_xLbLayoutWrp; /// Wrapper for direct usage of API constants. + std::unique_ptr<ScDPListBoxWrapper> m_xLbShowFromWrp; /// Wrapper for direct usage of API constants. ScDPObject& mrDPObj; /// The DataPilot object (for member names). ScDPLabelData maLabelData; /// Cache for members data. diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx index 19cc33ebec57..93a895c4c68f 100644 --- a/sc/source/ui/inc/retypepassdlg.hxx +++ b/sc/source/ui/inc/retypepassdlg.hxx @@ -31,7 +31,7 @@ #include "tabprotection.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> namespace vcl { class Window; } class ScDocProtection; @@ -41,8 +41,8 @@ class ScDocument; class ScRetypePassDlg : public ModalDialog { public: - typedef ::boost::shared_ptr<ScDocProtection> DocProtectionPtr; - typedef ::boost::shared_ptr<ScTableProtection> TabProtectionPtr; + typedef std::shared_ptr<ScDocProtection> DocProtectionPtr; + typedef std::shared_ptr<ScTableProtection> TabProtectionPtr; explicit ScRetypePassDlg(vcl::Window* pParent); virtual ~ScRetypePassDlg(); diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 5e3ea93c2cd5..e207569c49a0 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -30,7 +30,6 @@ #include "drawview.hxx" #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> namespace editeng { struct MisspellRanges; diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx index 779375140ce3..56b70aa13037 100644 --- a/sc/source/ui/inc/uiitems.hxx +++ b/sc/source/ui/inc/uiitems.hxx @@ -27,8 +27,8 @@ #include "paramisc.hxx" #include <svl/poolitem.hxx> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> namespace editeng { struct MisspellRanges; @@ -177,7 +177,7 @@ public: void SetAdvancedQuerySource(const ScRange* pSource); private: - boost::scoped_ptr<ScQueryParam> mpQueryData; + std::unique_ptr<ScQueryParam> mpQueryData; ScViewData* pViewData; ScRange aAdvSource; bool bIsAdvanced; diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index e19ade3db28c..53111f41f997 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -26,8 +26,7 @@ #include "cellmergeoption.hxx" #include "paramisc.hxx" -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> class ScDocShell; class ScDocument; @@ -267,10 +266,10 @@ public: virtual OUString GetComment() const SAL_OVERRIDE; - void SetDataSpans( const boost::shared_ptr<DataSpansType>& pSpans ); + void SetDataSpans( const std::shared_ptr<DataSpansType>& pSpans ); private: - boost::shared_ptr<DataSpansType> mpDataSpans; // Spans of non-empty cells. + std::shared_ptr<DataSpansType> mpDataSpans; // Spans of non-empty cells. ScRange aRange; ScMarkData aMarkData; @@ -346,7 +345,7 @@ public: private: ScMarkData aMarkData; ScRange aRange; - boost::scoped_ptr<ScEditDataArray> mpDataArray; + std::unique_ptr<ScEditDataArray> mpDataArray; ScDocument* pUndoDoc; bool bMulti; ScPatternAttr* pApplyPattern; @@ -641,8 +640,8 @@ public: private: void DoChange(ScDocument* pDoc); - boost::scoped_ptr<ScDocument> mpUndoDoc; - boost::scoped_ptr<ScDocument> mpRedoDoc; + std::unique_ptr<ScDocument> mpUndoDoc; + std::unique_ptr<ScDocument> mpRedoDoc; ScRange maRange; }; diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx index edce6bc1f22b..1f55708cbdfb 100644 --- a/sc/source/ui/inc/undocell.hxx +++ b/sc/source/ui/inc/undocell.hxx @@ -25,8 +25,7 @@ #include "cellvalue.hxx" #include <cellvalues.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> class ScDocShell; class ScPatternAttr; @@ -72,11 +71,11 @@ private: ScPatternAttr* pOldPattern; ScPatternAttr* pNewPattern; ScPatternAttr* pApplyPattern; - ::boost::shared_ptr<EditTextObject> pOldEditData; - ::boost::shared_ptr<EditTextObject> pNewEditData; + std::shared_ptr<EditTextObject> pOldEditData; + std::shared_ptr<EditTextObject> pNewEditData; bool bIsAutomatic; - void DoChange( const ScPatternAttr* pWhichPattern, const ::boost::shared_ptr<EditTextObject>& pEditData ) const; + void DoChange( const ScPatternAttr* pWhichPattern, const std::shared_ptr<EditTextObject>& pEditData ) const; }; class ScUndoEnterData: public ScSimpleUndo @@ -113,7 +112,7 @@ private: ValuesType maOldValues; OUString maNewString; - boost::scoped_ptr<EditTextObject> mpNewEditData; + std::unique_ptr<EditTextObject> mpNewEditData; sal_uLong mnEndChangeAction; ScAddress maPos; diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx index c9c3060afb0f..0bfa865a5707 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -28,7 +28,7 @@ #include "subtotalparam.hxx" #include "pivot.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> class ScDocShell; class ScDocument; @@ -469,7 +469,7 @@ public: virtual OUString GetComment() const SAL_OVERRIDE; private: - boost::scoped_ptr<ScMarkData> mpMarkData; + std::unique_ptr<ScMarkData> mpMarkData; ScDocument* pUndoDoc; ScDocument* pRedoDoc; InsertDeleteFlags nFlags; diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx index fe43d95b16e3..e5234961177e 100644 --- a/sc/source/ui/inc/undotab.hxx +++ b/sc/source/ui/inc/undotab.hxx @@ -27,8 +27,7 @@ #include <com/sun/star/uno/Sequence.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <memory> #include <vector> @@ -171,10 +170,10 @@ public: virtual OUString GetComment() const SAL_OVERRIDE; private: - ::boost::shared_ptr< ::std::vector<SCTAB> > mpOldTabs; - ::boost::shared_ptr< ::std::vector<SCTAB> > mpNewTabs; - ::boost::shared_ptr< ::std::vector< OUString> > mpOldNames; - ::boost::shared_ptr< ::std::vector< OUString> > mpNewNames; + std::shared_ptr< ::std::vector<SCTAB> > mpOldTabs; + std::shared_ptr< ::std::vector<SCTAB> > mpNewTabs; + std::shared_ptr< ::std::vector< OUString> > mpOldNames; + std::shared_ptr< ::std::vector< OUString> > mpNewNames; void DoChange( bool bUndo ) const; }; @@ -199,9 +198,9 @@ public: virtual OUString GetComment() const SAL_OVERRIDE; private: - ::boost::shared_ptr< ::std::vector<SCTAB> > mpOldTabs; - ::boost::shared_ptr< ::std::vector<SCTAB> > mpNewTabs; - ::boost::shared_ptr< ::std::vector< OUString> > mpNewNames; + std::shared_ptr< ::std::vector<SCTAB> > mpOldTabs; + std::shared_ptr< ::std::vector<SCTAB> > mpNewTabs; + std::shared_ptr< ::std::vector< OUString> > mpNewNames; SdrUndoAction* pDrawUndo; void DoChange() const; @@ -254,7 +253,7 @@ public: virtual OUString GetComment() const SAL_OVERRIDE; private: - boost::scoped_ptr<ScMarkData> mpMarkData; + std::unique_ptr<ScMarkData> mpMarkData; SCTAB nSrcTab; SCTAB nDestTab; OUString aName; diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 39fb5b2e151d..3cecc6eea274 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -25,7 +25,7 @@ #include "viewopti.hxx" #include "docsh.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #define SC_SIZE_NONE 65535 const SCCOL SC_TABSTART_NONE = SCCOL_MAX; @@ -157,7 +157,7 @@ private: double nPPTX, nPPTY; // Scaling factors ::std::vector<ScViewDataTable*> maTabData; - boost::scoped_ptr<ScMarkData> mpMarkData; + std::unique_ptr<ScMarkData> mpMarkData; ScViewDataTable* pThisTab; // Data of the displayed sheet ScDocShell* pDocShell; ScDocument* pDoc; diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx index 540c5a2ad49c..6c5e4f0aed33 100644 --- a/sc/source/ui/inc/xmlsourcedlg.hxx +++ b/sc/source/ui/inc/xmlsourcedlg.hxx @@ -19,8 +19,8 @@ #include "orcusxml.hxx" #include <set> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> class ScDocument; class ScRange; @@ -47,7 +47,7 @@ class ScXMLSourceDlg : public ScAnyRefDlg std::set<const SvTreeListEntry*> maRangeLinks; std::vector<SvTreeListEntry*> maHighlightedEntries; SvTreeListEntry* mpCurRefEntry; - boost::scoped_ptr<ScOrcusXMLContext> mpXMLContext; + std::unique_ptr<ScOrcusXMLContext> mpXMLContext; ScDocument* mpDoc; diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 28ec44d1b46d..93232fde5e22 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -42,7 +42,7 @@ #include "rangeutl.hxx" #include "tokenarray.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindings* _pBindings) : m_pDlg(_pDlg) @@ -200,7 +200,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference(const OUString& rStr) SCTAB nTab = pViewData->GetTabNo(); ScAddress aPos( nCol, nRow, nTab ); - boost::scoped_ptr<ScTokenArray> pScTokA(pRefComp->CompileString(rStr)); + std::unique_ptr<ScTokenArray> pScTokA(pRefComp->CompileString(rStr)); if (pTabViewShell && pScTokA) { diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 13e01eee1988..73ea8a542b18 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -47,7 +47,6 @@ #include "scuiautofmt.hxx" #include "scresid.hxx" #include "document.hxx" -#include <boost/scoped_ptr.hpp> // AutoFormat-Dialog: diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx index fc2373ed8675..60b1d6d9751d 100644 --- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx +++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx @@ -33,8 +33,6 @@ #include <editeng/eerdll.hxx> #include <vcl/builderfactory.hxx> -#include <boost/scoped_ptr.hpp> - #define HDL(hdl) LINK(this,ScTabBgColorDlg,hdl) ScTabBgColorDlg::ScTabBgColorDlg(vcl::Window* pParent, const OUString& rTitle, diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index ccd9167799ad..b043dc4ba9cd 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -47,7 +47,7 @@ #include "AccessibleEditObject.hxx" #include "scuitphfedit.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> // STATIC DATA ----------------------------------------------------------- @@ -327,9 +327,9 @@ void ScHFEditPage::SetSelectDefinedList() // default to customized ScHFEntryId eSelectEntry = eEntryCount; - boost::scoped_ptr< EditTextObject > pLeftObj; - boost::scoped_ptr< EditTextObject > pCenterObj; - boost::scoped_ptr< EditTextObject > pRightObj; + std::unique_ptr< EditTextObject > pLeftObj; + std::unique_ptr< EditTextObject > pCenterObj; + std::unique_ptr< EditTextObject > pRightObj; OUString aLeftEntry; OUString aCenterEntry; @@ -524,7 +524,7 @@ bool ScHFEditPage::IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj) { aSel.nStartPos = aSel.nEndPos; aSel.nEndPos++; - boost::scoped_ptr< EditTextObject > pPageObj; + std::unique_ptr< EditTextObject > pPageObj; pPageObj.reset(pEngine->CreateTextObject(aSel)); if(pPageObj.get() && pPageObj->IsFieldObject() ) { @@ -582,7 +582,7 @@ bool ScHFEditPage::IsExtFileNameEntry(EditTextObject* pTextObj) void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling) { SvtUserOptions aUserOpt; - boost::scoped_ptr< EditTextObject > pTextObj; + std::unique_ptr< EditTextObject > pTextObj; switch(eSel) { diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index f629e8bc5bc9..b8bb332aeee4 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -36,7 +36,7 @@ #include "styledlg.hxx" #include "scresid.hxx" #include "scuitphfedit.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> // class ScHFPage @@ -186,7 +186,7 @@ IMPL_LINK_NOARG_TYPED(ScHFPage, HFEditHdl, void*, void) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScHFEditDlg( + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScHFEditDlg( pViewSh->GetViewFrame(), this, aDataSet, aStrPageStyle, nResId)); OSL_ENSURE(pDlg, "Dialog create fail!"); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 4d907e0c2230..968886e1f1d7 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -45,7 +45,7 @@ #include "AccessibleEditObject.hxx" #include "scabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> // STATIC DATA ----------------------------------------------------------- static VclPtr<ScEditWindow> pActiveEdWnd = NULL; @@ -205,7 +205,7 @@ void ScEditWindow::SetCharAttributes() ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg( + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg( GetParent(), &aSet, pDocSh)); OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->SetText( ScGlobal::GetRscString( STR_TEXTATTRS ) ); diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx index fba7cc26c311..a8ccd98798d7 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx @@ -22,7 +22,7 @@ #include <sfx2/sidebar/ControllerItem.hxx> #include <sfx2/sidebar/IContextChangeReceiver.hxx> #include <svx/sidebar/PanelLayout.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> class FixedText; namespace svx { namespace sidebar { @@ -83,7 +83,7 @@ private: VclPtr<ToolBox> mpTBCellBorder; VclPtr<ToolBox> mpTBLineStyle; VclPtr<ToolBox> mpTBLineColor; - ::boost::scoped_ptr< CellBorderUpdater > mpCellBorderUpdater; + std::unique_ptr< CellBorderUpdater > mpCellBorderUpdater; ::sfx2::sidebar::ControllerItem maLineStyleControl; ::sfx2::sidebar::ControllerItem maBorderOuterControl; @@ -133,8 +133,8 @@ private: bool mbBLTR : 1; // popups - ::boost::scoped_ptr< CellLineStylePopup > mpCellLineStylePopup; - ::boost::scoped_ptr< CellBorderStylePopup > mpCellBorderStylePopup; + std::unique_ptr< CellLineStylePopup > mpCellLineStylePopup; + std::unique_ptr< CellBorderStylePopup > mpCellBorderStylePopup; css::uno::Reference<css::frame::XFrame> mxFrame; ::sfx2::sidebar::EnumContext maContext; diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx index 8a80d4086d3f..7bcb01f535fd 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx @@ -29,7 +29,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <editeng/lineitem.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sc { namespace sidebar { @@ -291,8 +291,8 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox, void) SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER ); SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER ); - boost::scoped_ptr<editeng::SvxBorderLine> pTop; - boost::scoped_ptr<editeng::SvxBorderLine> pBottom; + std::unique_ptr<editeng::SvxBorderLine> pTop; + std::unique_ptr<editeng::SvxBorderLine> pBottom; sal_uInt8 nValidFlags = 0; using namespace ::com::sun::star::table::BorderLineStyle; diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx index 0a9545936606..efda9627f322 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -22,7 +22,6 @@ #include <sfx2/sidebar/ControllerItem.hxx> #include <sfx2/sidebar/IContextChangeReceiver.hxx> #include <svx/sidebar/PanelLayout.hxx> -#include <boost/scoped_ptr.hpp> class FixedText; class ListBox; diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 8748a7b473c5..73346abf6ec2 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -55,8 +55,8 @@ #include <gridwin.hxx> #include <svl/listener.hxx> +#include <memory> #include <set> -#include <boost/scoped_ptr.hpp> // STATIC DATA ----------------------------------------------------------- @@ -1360,7 +1360,7 @@ void ScUndoDragDrop::Redo() BeginRedo(); ScDocument& rDoc = pDocShell->GetDocument(); - boost::scoped_ptr<ScDocument> pClipDoc(new ScDocument( SCDOCMODE_CLIP )); + std::unique_ptr<ScDocument> pClipDoc(new ScDocument( SCDOCMODE_CLIP )); EnableDrawAdjust( &rDoc, false ); //! include in ScBlockUndo? diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 3d84110e6ed1..b5cc16c67838 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -106,7 +106,7 @@ OUString ScUndoDeleteContents::GetComment() const return ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); // "Delete" } -void ScUndoDeleteContents::SetDataSpans( const boost::shared_ptr<DataSpansType>& pSpans ) +void ScUndoDeleteContents::SetDataSpans( const std::shared_ptr<DataSpansType>& pSpans ) { mpDataSpans = pSpans; } diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 0f260972908c..e90875be756c 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -45,7 +45,7 @@ #include "docuno.hxx" #include "stringutil.hxx" -using ::boost::shared_ptr; +using std::shared_ptr; namespace HelperNotifyChanges { diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index f18acd2af3e8..64dd3dd75632 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -47,9 +47,9 @@ #include "drwlayer.hxx" #include "scresid.hxx" +#include <memory> #include <utility> #include <vector> -#include <boost/scoped_ptr.hpp> extern bool bDrawIsInUndo; // somewhere as member! @@ -57,7 +57,7 @@ using namespace com::sun::star; using ::com::sun::star::uno::Sequence; using ::std::unique_ptr; using ::std::vector; -using ::boost::shared_ptr; +using std::shared_ptr; TYPEINIT1(ScUndoInsertTab, SfxUndoAction); TYPEINIT1(ScUndoInsertTables, SfxUndoAction); @@ -514,7 +514,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const if (bUndo) // UnDo { size_t i = mpNewTabs->size(); - boost::scoped_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), + std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), i * rDoc.GetCodeCount())); for (; i > 0; --i) { @@ -536,7 +536,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const else { size_t n = mpNewTabs->size(); - boost::scoped_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), + std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), n * rDoc.GetCodeCount())); for (size_t i = 0; i < n; ++i) { diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 02638438b5f5..527c7811ed2b 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -131,7 +131,6 @@ #include <list> #include <memory> -#include <boost/scoped_ptr.hpp> using namespace com::sun::star; @@ -1566,7 +1565,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) const ScUpdateRefHint& rRef = static_cast<const ScUpdateRefHint&>(rHint); ScDocument& rDoc = pDocShell->GetDocument(); - boost::scoped_ptr<ScRangeList> pUndoRanges; + std::unique_ptr<ScRangeList> pUndoRanges; if ( rDoc.HasUnoRefUndo() ) pUndoRanges.reset(new ScRangeList( aRanges )); @@ -2448,7 +2447,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE formula::FormulaGrammar::GRAM_UNSPECIFIED : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); - boost::scoped_ptr<ScValidationData> pNewData( + std::unique_ptr<ScValidationData> pNewData( pValidObj->CreateValidationData( &rDoc, eGrammar )); sal_uLong nIndex = rDoc.AddValidationEntry( *pNewData ); pNewData.reset(); @@ -2715,8 +2714,8 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< OUString } ScDocument& rDoc = pDocShell->GetDocument(); - boost::scoped_ptr<ScPatternAttr> pOldPattern; - boost::scoped_ptr<ScPatternAttr> pNewPattern; + std::unique_ptr<ScPatternAttr> pOldPattern; + std::unique_ptr<ScPatternAttr> pNewPattern; for(i = 0; i < nCount; i++) { @@ -2858,8 +2857,8 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set } ScDocument& rDoc = pDocShell->GetDocument(); - boost::scoped_ptr<ScPatternAttr> pOldPattern; - boost::scoped_ptr<ScPatternAttr> pNewPattern; + std::unique_ptr<ScPatternAttr> pOldPattern; + std::unique_ptr<ScPatternAttr> pNewPattern; sal_Int32 nFailed(0); for(i = 0; i < nCount; i++) @@ -3080,7 +3079,7 @@ uno::Sequence< uno::Sequence<double> > SAL_CALL ScCellRangesBase::getData() throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - boost::scoped_ptr<ScMemChart> pMemChart(CreateMemChart_Impl()); + std::unique_ptr<ScMemChart> pMemChart(CreateMemChart_Impl()); if ( pMemChart ) { sal_Int32 nColCount = pMemChart->GetColCount(); @@ -3194,7 +3193,7 @@ uno::Sequence<OUString> SAL_CALL ScCellRangesBase::getRowDescriptions() throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - boost::scoped_ptr<ScMemChart> pMemChart(CreateMemChart_Impl()); + std::unique_ptr<ScMemChart> pMemChart(CreateMemChart_Impl()); if ( pMemChart ) { sal_Int32 nRowCount = static_cast<sal_Int32>(pMemChart->GetRowCount()); @@ -3265,7 +3264,7 @@ uno::Sequence<OUString> SAL_CALL ScCellRangesBase::getColumnDescriptions() throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - boost::scoped_ptr<ScMemChart> pMemChart(CreateMemChart_Impl()); + std::unique_ptr<ScMemChart> pMemChart(CreateMemChart_Impl()); if ( pMemChart ) { sal_Int32 nColCount = pMemChart->GetColCount(); @@ -4088,7 +4087,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea for (; itr != itrEnd && *itr < nTabCount; ++itr) if ( *itr != nTab && bUndo) pUndoDoc->AddUndoTab( *itr, *itr ); - boost::scoped_ptr<ScMarkData> pUndoMark; + std::unique_ptr<ScMarkData> pUndoMark; if (bUndo) pUndoMark.reset(new ScMarkData(aMark)); diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index a2b870c3470f..6335ce6f362a 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -77,7 +77,7 @@ using ::std::vector; using ::std::list; using ::std::distance; using ::std::unary_function; -using ::boost::shared_ptr; +using ::std::shared_ptr; namespace { @@ -187,9 +187,9 @@ struct TokenTable : boost::noncopyable vector<ScTokenRef>* TokenTable::getColRanges(SCCOL nCol) const { if (nCol >= mnColCount) - return NULL; + return nullptr; if( mnRowCount<=0 ) - return NULL; + return nullptr; unique_ptr< vector<ScTokenRef> > pTokens(new vector<ScTokenRef>); sal_uInt32 nLast = getIndex(nCol, mnRowCount-1); @@ -208,9 +208,9 @@ vector<ScTokenRef>* TokenTable::getColRanges(SCCOL nCol) const vector<ScTokenRef>* TokenTable::getRowRanges(SCROW nRow) const { if (nRow >= mnRowCount) - return NULL; + return nullptr; if( mnColCount<=0 ) - return NULL; + return nullptr; unique_ptr< vector<ScTokenRef> > pTokens(new vector<ScTokenRef>); sal_uInt32 nLast = getIndex(mnColCount-1, nRow); @@ -367,7 +367,7 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount, SCROW nAllRowCount, FormulaTokenMap::const_iterator it2 = pCol->begin(); for (SCROW nRow = 0; nRow < nAllRowCount; ++nRow) { - FormulaToken* pToken = NULL; + FormulaToken* pToken = nullptr; if (it2 != pCol->end()) { pToken = it2->second; @@ -448,7 +448,7 @@ class Chart2Positioner : boost::noncopyable public: Chart2Positioner(ScDocument* pDoc, const vector<ScTokenRef>& rRefTokens) : mrRefTokens(rRefTokens), - mpPositionMap(NULL), + mpPositionMap(nullptr), meGlue(GLUETYPE_NA), mnStartCol(0), mnStartRow(0), @@ -483,7 +483,7 @@ private: private: const vector<ScTokenRef>& mrRefTokens; - boost::scoped_ptr<Chart2PositionMap> mpPositionMap; + std::unique_ptr<Chart2PositionMap> mpPositionMap; GlueType meGlue; SCCOL mnStartCol; SCROW mnStartRow; @@ -714,7 +714,7 @@ void Chart2Positioner::createPositionMap() bool bNoGlue = (meGlue == GLUETYPE_NONE); unique_ptr<FormulaTokenMapMap> pCols(new FormulaTokenMapMap); - FormulaTokenMap* pCol = NULL; + FormulaTokenMap* pCol = nullptr; SCROW nNoGlueRow = 0; for (vector<ScTokenRef>::const_iterator itr = mrRefTokens.begin(), itrEnd = mrRefTokens.end(); itr != itrEnd; ++itr) @@ -791,7 +791,7 @@ void Chart2Positioner::createPositionMap() pCol = pCols->begin()->second; if (mbDummyUpperLeft) if (pCol->find(0) == pCol->end()) - (*pCol)[ 0 ] = NULL; // Dummy fuer Beschriftung + (*pCol)[ 0 ] = nullptr; // Dummy fuer Beschriftung nAllRowCount = static_cast<SCSIZE>(pCol->size()); } @@ -807,7 +807,7 @@ void Chart2Positioner::createPositionMap() { pCol = it2->second; if (pCol->find(nKey) == pCol->end()) - (*pCol)[ nKey ] = NULL; + (*pCol)[ nKey ] = nullptr; } } } @@ -1020,7 +1020,7 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING ) { - m_pDocument = NULL; + m_pDocument = nullptr; } } @@ -1521,7 +1521,7 @@ ScChart2DataProvider::createDataSource( // No chart position map instance. Bail out. return xResult; - ScChart2DataSource* pDS = NULL; + ScChart2DataSource* pDS = nullptr; ::std::list< Reference< chart2::data::XLabeledDataSequence > > aSeqs; // Fill Categories @@ -2415,7 +2415,7 @@ void ScChart2DataSource::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint) const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING ) { - m_pDocument = NULL; + m_pDocument = nullptr; } } @@ -2475,12 +2475,12 @@ ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc, , m_nObjectId( 0 ) , m_pDocument( pDoc) , m_pTokens(pTokens) - , m_pRangeIndices(NULL) - , m_pExtRefListener(NULL) + , m_pRangeIndices(nullptr) + , m_pExtRefListener(nullptr) , m_xDataProvider( xDP) , m_aPropSet(lcl_GetDataSequencePropertyMap()) - , m_pHiddenListener(NULL) - , m_pValueListener( NULL ) + , m_pHiddenListener(nullptr) + , m_pValueListener( nullptr ) , m_bGotDataChangedHint(false) , m_bExtDataRebuildQueued(false) , mbTimeBased(false) @@ -2535,7 +2535,7 @@ void ScChart2DataSequence::RefChanged() if( m_pDocument ) { - ScChartListenerCollection* pCLC = NULL; + ScChartListenerCollection* pCLC = nullptr; if (m_pHiddenListener.get()) { pCLC = m_pDocument->GetChartListenerCollection(); @@ -2567,7 +2567,7 @@ void ScChart2DataSequence::BuildDataCache() if (!m_pTokens.get()) { - OSL_FAIL("m_pTokens == NULL! Something is wrong."); + OSL_FAIL("m_pTokens == nullptr! Something is wrong."); return; } @@ -2598,8 +2598,8 @@ void ScChart2DataSequence::BuildDataCache() { for (SCROW nRow = aRange.aStart.Row(); nRow <= aRange.aEnd.Row(); ++nRow) { - bool bColHidden = m_pDocument->ColHidden(nCol, nTab, NULL, &nLastCol); - bool bRowHidden = m_pDocument->RowHidden(nRow, nTab, NULL, &nLastRow); + bool bColHidden = m_pDocument->ColHidden(nCol, nTab, nullptr, &nLastCol); + bool bRowHidden = m_pDocument->RowHidden(nRow, nTab, nullptr, &nLastRow); if (bColHidden || bRowHidden) { @@ -2686,7 +2686,7 @@ sal_Int32 ScChart2DataSequence::FillCacheFromExternalRef(const ScTokenRef& pToke sal_uInt16 nFileId = pToken->GetIndex(); OUString aTabName = pToken->GetString().getString(); - ScExternalRefCache::TokenArrayRef pArray = pRefMgr->getDoubleRefTokens(nFileId, aTabName, aRange, NULL); + ScExternalRefCache::TokenArrayRef pArray = pRefMgr->getDoubleRefTokens(nFileId, aTabName, aRange, nullptr); if (!pArray) // no external data exists for this range. return 0; @@ -2696,7 +2696,7 @@ sal_Int32 ScChart2DataSequence::FillCacheFromExternalRef(const ScTokenRef& pToke pRefMgr->addLinkListener(nFileId, pExtRefListener); pExtRefListener->addFileId(nFileId); - ScExternalRefCache::TableTypeRef pTable = pRefMgr->getCacheTable(nFileId, aTabName, false, NULL); + ScExternalRefCache::TableTypeRef pTable = pRefMgr->getCacheTable(nFileId, aTabName, false, nullptr); sal_Int32 nDataCount = 0; for (FormulaToken* p = pArray->First(); p; p = pArray->Next()) { @@ -2729,7 +2729,7 @@ sal_Int32 ScChart2DataSequence::FillCacheFromExternalRef(const ScTokenRef& pToke if (pFormatter) { const double fVal = aItem.mfValue; - Color* pColor = NULL; + Color* pColor = nullptr; sal_uInt32 nFmt = 0; if (pTable) { @@ -2769,7 +2769,7 @@ void ScChart2DataSequence::UpdateTokensFromRanges(const ScRangeList& rRanges) { ScTokenRef pToken; const ScRange* pRange = rRanges[i]; - OSL_ENSURE(pRange, "range object is NULL."); + OSL_ENSURE(pRange, "range object is nullptr."); ScRefTokenHelper::getTokenFromRange(pToken, *pRange); sal_uInt32 nOrigPos = (*m_pRangeIndices)[i]; @@ -2809,7 +2809,7 @@ void ScChart2DataSequence::CopyData(const ScChart2DataSequence& r) { if (!m_pDocument) { - OSL_FAIL("document instance is NULL!?"); + OSL_FAIL("document instance is nullptr!?"); return; } @@ -2847,7 +2847,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint sal_uLong nId = pSimpleHint->GetId(); if ( nId ==SFX_HINT_DYING ) { - m_pDocument = NULL; + m_pDocument = nullptr; } else if ( nId == SFX_HINT_DATACHANGED ) { @@ -3179,7 +3179,7 @@ public: OUString aString = ScGlobal::GetRscString(STR_COLUMN); aString += " "; ScAddress aPos( nCol, 0, 0 ); - OUString aColStr(aPos.Format(SCA_VALID_COL, NULL)); + OUString aColStr(aPos.Format(SCA_VALID_COL, nullptr)); aString += aColStr; pArr[mnCount] = aString; } diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index da35ab69644b..2626c74c52ab 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -748,7 +748,7 @@ void SAL_CALL ScConditionEntryObj::setPropertyValue( if ((aValue >>= aFormula) && !aFormula.isEmpty()) { ScCompiler aComp(&mpDocShell->GetDocument(), getCoreObject()->GetSrcPos()); - boost::scoped_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula)); + std::unique_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula)); getCoreObject()->SetFormula1(*pArr); } } @@ -759,7 +759,7 @@ void SAL_CALL ScConditionEntryObj::setPropertyValue( if ((aValue >>= aFormula) && !aFormula.isEmpty()) { ScCompiler aComp(&mpDocShell->GetDocument(), getCoreObject()->GetSrcPos()); - boost::scoped_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula)); + std::unique_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula)); getCoreObject()->SetFormula2(*pArr); } } diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 94c29dcc50dd..a899d101cfc8 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -192,7 +192,7 @@ ScUnoEditEngine::ScUnoEditEngine(ScEditEngineDefaulter* pSource) , eMode(SC_UNO_COLLECT_NONE) , nFieldCount(0) , mnFieldType(text::textfield::Type::UNSPECIFIED) - , pFound(NULL) + , pFound(nullptr) , nFieldPar(0) , nFieldPos(0) , nFieldIndex(0) @@ -280,7 +280,7 @@ ScCellFieldsObj::ScCellFieldsObj( mxContent(xContent), pDocShell( pDocSh ), aCellPos( rPos ), - mpRefreshListeners( NULL ) + mpRefreshListeners( nullptr ) { pDocShell->GetDocument().AddUnoObject(*this); @@ -320,7 +320,7 @@ void ScCellFieldsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) && static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING ) { - pDocShell = NULL; // ungueltig geworden + pDocShell = nullptr; // ungueltig geworden } // EditSource hat sich selber als Listener angemeldet @@ -467,7 +467,7 @@ void SAL_CALL ScCellFieldsObj::removeRefreshListener( const uno::Reference<util: ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterTextData& rData) : mrData(rData), - mpRefreshListeners( NULL ) + mpRefreshListeners( nullptr ) { mpEditSource = new ScHeaderFooterEditSource(rData); } @@ -501,7 +501,7 @@ uno::Reference<text::XTextField> ScHeaderFieldsObj::GetObjectByIndex_Impl(sal_In SvxFieldData* pData = aTempEngine.FindByIndex(static_cast<sal_uInt16>(Index)); if (!pData) - return NULL; + return nullptr; // Get the parent text range instance. uno::Reference<text::XTextRange> xTextRange; @@ -855,7 +855,7 @@ uno::Any ScEditFieldObj::getPropertyValueFile(const OUString& rName) if (rName == SC_UNONAME_FILEFORM) { SvxFileFormat eFormat = SVXFILEFORMAT_NAME_EXT; - const SvxFieldData* pField = NULL; + const SvxFieldData* pField = nullptr; if (mpEditSource) { ScEditEngineDefaulter* pEditEngine = mpEditSource->GetEditEngine(); @@ -1134,10 +1134,10 @@ ScEditFieldObj::ScEditFieldObj( const uno::Reference<text::XTextRange>& rContent, ScEditSource* pEditSrc, sal_Int32 eType, const ESelection& rSel) : OComponentHelper(getMutex()), - pPropSet(NULL), + pPropSet(nullptr), mpEditSource(pEditSrc), aSelection(rSel), - meType(eType), mpData(NULL), mpContent(rContent), mnNumFormat(0), mbIsDate(false), mbIsFixed(false) + meType(eType), mpData(nullptr), mpContent(rContent), mnNumFormat(0), mbIsDate(false), mbIsFixed(false) { switch (meType) { @@ -1205,7 +1205,7 @@ void ScEditFieldObj::DeleteField() bool ScEditFieldObj::IsInserted() const { - return mpEditSource != NULL; + return mpEditSource != nullptr; } // XTextField @@ -1411,7 +1411,7 @@ const uno::Sequence<sal_Int8>& ScEditFieldObj::getUnoTunnelId() ScEditFieldObj* ScEditFieldObj::getImplementation(const uno::Reference<text::XTextContent>& xObj) { - ScEditFieldObj* pRet = NULL; + ScEditFieldObj* pRet = nullptr; uno::Reference<lang::XUnoTunnel> xUT( xObj, uno::UNO_QUERY ); if (xUT.is()) pRet = reinterpret_cast<ScEditFieldObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId()))); diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 2246df755328..69336affb287 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -39,7 +39,7 @@ #include <optutil.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; using namespace com::sun::star::uno; @@ -176,11 +176,11 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st INetURLObject aURL( aFileName ); OUString aPrivDatName(aURL.getName()); - boost::scoped_ptr<SvStream> pInStream; + std::unique_ptr<SvStream> pInStream; if ( xInputStream.is() ) pInStream.reset(utl::UcbStreamHelper::CreateStream( xInputStream )); - boost::scoped_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg( NULL, aPrivDatName, pInStream.get(), SC_IMPORTFILE)); + std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg( NULL, aPrivDatName, pInStream.get(), SC_IMPORTFILE)); OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { @@ -198,7 +198,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st else { // HTML import. - boost::scoped_ptr<AbstractScTextImportOptionsDlg> pDlg( + std::unique_ptr<AbstractScTextImportOptionsDlg> pDlg( pFact->CreateScTextImportOptionsDlg(NULL)); if (pDlg->Execute() == RET_OK) @@ -281,7 +281,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st ScImportOptions aOptions( cAsciiDel, cStrDel, eEncoding); - boost::scoped_ptr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg(NULL, + std::unique_ptr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg(NULL, bAscii, &aOptions, &aTitle, bMultiByte, bDBEnc, !bExport)); OSL_ENSURE(pDlg, "Dialog create fail!"); diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index 4b0531a2e70a..07aff0901ef2 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -34,7 +34,7 @@ #include "compiler.hxx" #include "tokenarray.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -130,7 +130,7 @@ void ScVbaName::setContent( const OUString& rContent, const formula::FormulaGra // Shorter way of doing this ? ScCompiler aComp( &rDoc, pOldData->GetPos() ); aComp.SetGrammar( eGrammar ); - boost::scoped_ptr<ScTokenArray> pArray(aComp.CompileString(sContent)); + std::unique_ptr<ScTokenArray> pArray(aComp.CompileString(sContent)); pOldData->SetCode(*pArray); } } diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 4d64a43bcf55..53faccf0becb 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -34,7 +34,7 @@ #include "tokenarray.hxx" #include "cellsuno.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -156,7 +156,7 @@ ScVbaNames::Add( const css::uno::Any& Name , ScAddress aBlank; ScCompiler aComp( getScDocument(), aBlank ); aComp.SetGrammar( eGram ); - boost::scoped_ptr<ScTokenArray> pTokens(aComp.CompileString(sFormula)); + std::unique_ptr<ScTokenArray> pTokens(aComp.CompileString(sFormula)); if ( pTokens ) { ScRange aRange; diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 004f0286aaab..913de30eb7d9 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -175,7 +175,7 @@ #include "tokenuno.hxx" #include <columnspanset.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -894,7 +894,7 @@ protected: ScCompiler aCompiler( m_pDoc, aCellRanges.front()->aStart ); aCompiler.SetGrammar(m_eGrammar); // compile the string in the format passed in - boost::scoped_ptr<ScTokenArray> pArray(aCompiler.CompileString(sFormula)); + std::unique_ptr<ScTokenArray> pArray(aCompiler.CompileString(sFormula)); // set desired convention to that of the document aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_PODF_A1 ); OUString sConverted; @@ -937,7 +937,7 @@ public: ScRangeList aCellRanges = pUnoRangesBase->GetRangeList(); ScCompiler aCompiler( m_pDoc, aCellRanges.front()->aStart ); aCompiler.SetGrammar(formula::FormulaGrammar::GRAM_DEFAULT); - boost::scoped_ptr<ScTokenArray> pArray(aCompiler.CompileString(sVal)); + std::unique_ptr<ScTokenArray> pArray(aCompiler.CompileString(sVal)); // set desired convention aCompiler.SetGrammar( m_eGrammar ); OUString sConverted; 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 ); |