summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-17 18:59:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-17 18:59:32 +0100
commitd030c4a2a54418b17e87f837092a33eae21f0588 (patch)
treedd80ff3ba78eaa03e98efeb87e9160c6cd7524c5 /sc/source/core/data
parent558b08d55f69b04eea42a37abd97fbb4dbe3602f (diff)
revert for mac and win unit case crashes after boost->std
Change-Id: I82c7084f203a834c2d42f9527705288e6036019b
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/attarray.cxx16
-rw-r--r--sc/source/core/data/clipcontext.cxx2
-rw-r--r--sc/source/core/data/column.cxx14
-rw-r--r--sc/source/core/data/column2.cxx6
-rw-r--r--sc/source/core/data/column3.cxx4
-rw-r--r--sc/source/core/data/column4.cxx2
-rw-r--r--sc/source/core/data/conditio.cxx6
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/documen3.cxx4
-rw-r--r--sc/source/core/data/documen4.cxx2
-rw-r--r--sc/source/core/data/documen8.cxx8
-rw-r--r--sc/source/core/data/document.cxx10
-rw-r--r--sc/source/core/data/document10.cxx6
-rw-r--r--sc/source/core/data/documentimport.cxx6
-rw-r--r--sc/source/core/data/dpgroup.cxx2
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/data/dpsave.cxx72
-rw-r--r--sc/source/core/data/dptabres.cxx6
-rw-r--r--sc/source/core/data/dptabsrc.cxx70
-rw-r--r--sc/source/core/data/formulacell.cxx8
-rw-r--r--sc/source/core/data/funcdesc.cxx6
-rw-r--r--sc/source/core/data/listenercontext.cxx4
-rw-r--r--sc/source/core/data/table1.cxx60
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/data/table3.cxx15
-rw-r--r--sc/source/core/data/table4.cxx4
-rw-r--r--sc/source/core/data/validat.cxx6
27 files changed, 174 insertions, 171 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 4c120dfadcb1..65c2331eb00b 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -45,7 +45,7 @@
#include "cellvalue.hxx"
#include "editutil.hxx"
#include <rtl/strbuf.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
// STATIC DATA -----------------------------------------------------------
@@ -243,7 +243,7 @@ void ScAttrArray::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nInd
{
const ScPatternAttr* pPattern = GetPattern(nTempStartRow);
- std::unique_ptr<ScPatternAttr> pNewPattern;
+ boost::scoped_ptr<ScPatternAttr> pNewPattern;
if(pPattern)
{
pNewPattern.reset( new ScPatternAttr(*pPattern) );
@@ -581,7 +581,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
do
{
const ScPatternAttr* pOldPattern = pData[nPos].pPattern;
- std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pOldPattern));
+ boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pOldPattern));
pNewPattern->SetStyleSheet(pStyle);
SCROW nY1 = nStart;
SCROW nY2 = pData[nPos].nRow;
@@ -680,7 +680,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
if ( (SfxItemState::SET == eState) || (SfxItemState::SET == eTLBRState) || (SfxItemState::SET == eBLTRState) )
{
- std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pOldPattern));
+ boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pOldPattern));
SfxItemSet& rNewSet = pNewPattern->GetItemSet();
SCROW nY1 = nStart;
SCROW nY2 = pData[nPos].nRow;
@@ -1449,7 +1449,7 @@ bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
for (SCROW nThisRow = nThisStart; nThisRow <= nThisEnd; nThisRow++)
pDocument->ApplyAttr( nThisCol, nThisRow, nTab, *pAttr );
- std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr( pDocument->GetPool() ));
+ boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr( pDocument->GetPool() ));
SfxItemSet* pSet = &pNewPattern->GetItemSet();
pSet->Put( *pFlagAttr );
pDocument->ApplyPatternAreaTab( nThisCol, nThisStart, nMergeEndCol, nMergeEndRow,
@@ -1506,7 +1506,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
// because it would have no cell style information.
// Instead, the document's GetDefPattern is copied. Since it is passed as
// pWantedPattern, no special treatment of default is needed here anymore.
- std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr( *pWantedPattern ));
+ boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr( *pWantedPattern ));
SfxItemSet* pSet = &pNewPattern->GetItemSet();
pSet->Put( *pItem );
SetPatternArea( nThisRow, nAttrRow, pNewPattern.get(), true );
@@ -1736,7 +1736,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
if (bReset)
{
- std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pData[nPos].pPattern));
+ boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pData[nPos].pPattern));
pDocument->GetPool()->Remove(*pData[nPos].pPattern);
pNewPattern->SetStyleSheet( static_cast<ScStyleSheet*>(
pDocument->GetStyleSheetPool()->
@@ -2233,7 +2233,7 @@ void ScAttrArray::CopyArea(
}
else if ( nStripFlags )
{
- std::unique_ptr<ScPatternAttr> pTmpPattern(new ScPatternAttr( *pOldPattern ));
+ boost::scoped_ptr<ScPatternAttr> pTmpPattern(new ScPatternAttr( *pOldPattern ));
sal_Int16 nNewFlags = 0;
if ( nStripFlags != SC_MF_ALL )
nNewFlags = static_cast<const ScMergeFlagAttr&>(pTmpPattern->GetItem(ATTR_MERGE_FLAG)).
diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx
index 4bdb0e766687..ac78dbd6941b 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -241,7 +241,7 @@ void CopyFromClipContext::setSingleCell( const ScAddress& rSrcPos, const ScColum
// make this process simpler.
ScFieldEditEngine& rEngine = mrDestDoc.GetEditEngine();
rEngine.SetText(rSrcCell.mpFormula->GetString().getString());
- std::unique_ptr<EditTextObject> pObj(rEngine.CreateTextObject());
+ boost::scoped_ptr<EditTextObject> pObj(rEngine.CreateTextObject());
pObj->NormalizeString(mrDestDoc.GetSharedStringPool());
rSrcCell.set(*pObj);
}
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 04eedf75b24b..7b1e410e17a8 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -57,7 +57,7 @@
#include <map>
#include <cstdio>
#include <boost/checked_delete.hpp>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
using ::editeng::SvxBorderLine;
using namespace formula;
@@ -549,7 +549,7 @@ void ScColumn::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nInd
void ScColumn::ApplyStyle( SCROW nRow, const ScStyleSheet& rStyle )
{
const ScPatternAttr* pPattern = pAttrArray->GetPattern(nRow);
- std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pPattern));
+ boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pPattern));
if (pNewPattern)
{
pNewPattern->SetStyleSheet(const_cast<ScStyleSheet*>(&rStyle));
@@ -702,7 +702,7 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
ScDocumentPool* pDocPool = pDocument->GetPool();
const ScPatternAttr* pOldPattern = pAttrArray->GetPattern( nRow );
- std::unique_ptr<ScPatternAttr> pTemp(new ScPatternAttr(*pOldPattern));
+ boost::scoped_ptr<ScPatternAttr> pTemp(new ScPatternAttr(*pOldPattern));
pTemp->GetItemSet().Put(rAttr);
const ScPatternAttr* pNewPattern = static_cast<const ScPatternAttr*>( &pDocPool->Put( *pTemp ) );
@@ -1657,7 +1657,7 @@ void ScColumn::CopyToColumn(
const ScStyleSheet* pStyle =
rColumn.pAttrArray->GetPattern( nRow )->GetStyleSheet();
const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
- std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr( *pPattern ));
+ boost::scoped_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr( *pPattern ));
pNewPattern->SetStyleSheet( const_cast<ScStyleSheet*>(pStyle) );
rColumn.pAttrArray->SetPattern( nRow, pNewPattern.get(), true );
}
@@ -2058,7 +2058,7 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
ScFormulaCell** ppEnd = pp + rGroup.mnLength;
ScFormulaCell* pTop = *pp;
ScTokenArray* pCode = pTop->GetCode();
- std::unique_ptr<ScTokenArray> pOldCode(pCode->Clone());
+ boost::scoped_ptr<ScTokenArray> pOldCode(pCode->Clone());
ScAddress aOldPos = pTop->aPos;
// Run this before the position gets updated.
@@ -2128,7 +2128,7 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
ScFormulaCell** ppEnd = pp + rGroup.mnLength;
ScFormulaCell* pTop = *pp;
ScTokenArray* pCode = pTop->GetCode();
- std::unique_ptr<ScTokenArray> pOldCode(pCode->Clone());
+ boost::scoped_ptr<ScTokenArray> pOldCode(pCode->Clone());
ScAddress aPos = pTop->aPos;
ScAddress aOldPos = aPos;
@@ -2164,7 +2164,7 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
// Make sure that the start and end listening contexts share the
// same block position set, else an invalid iterator may ensue.
- std::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(
+ boost::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(
new sc::ColumnBlockPositionSet(mpCxt->mrDoc));
sc::StartListeningContext aStartCxt(mpCxt->mrDoc, pPosSet);
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 5118e568c712..534708289918 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -67,8 +67,8 @@
#include <formula/errorcodes.hxx>
#include <formula/vectortoken.hxx>
+#include <boost/scoped_ptr.hpp>
#include <algorithm>
-#include <memory>
// factor from font size to optimal cell height (text width)
#define SC_ROT_BREAK_FACTOR 6
@@ -368,7 +368,7 @@ long ScColumn::GetNeededSize(
SfxItemSet* pSet = new SfxItemSet( pEngine->GetEmptyItemSet() );
if ( ScStyleSheet* pPreviewStyle = pDocument->GetPreviewCellStyle( nCol, nRow, nTab ) )
{
- std::unique_ptr<ScPatternAttr> pPreviewPattern(new ScPatternAttr( *pPattern ));
+ boost::scoped_ptr<ScPatternAttr> pPreviewPattern(new ScPatternAttr( *pPattern ));
pPreviewPattern->SetStyleSheet(pPreviewStyle);
pPreviewPattern->FillEditItemSet( pSet, pCondSet );
}
@@ -1054,7 +1054,7 @@ public:
class RemoveEditAttribsHandler : public StrEntries
{
- std::unique_ptr<ScFieldEditEngine> mpEngine;
+ boost::scoped_ptr<ScFieldEditEngine> mpEngine;
public:
RemoveEditAttribsHandler(sc::CellStoreType& rCells, ScDocument* pDoc) : StrEntries(rCells, pDoc) {}
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 138b0f52e879..c39c295eae06 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -50,7 +50,7 @@
#include <com/sun/star/i18n/LocaleDataItem.hpp>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
#include <mdds/flat_segment_tree.hpp>
@@ -423,7 +423,7 @@ void ScColumn::AttachNewFormulaCell(
{
case sc::ConvertToGroupListening:
{
- std::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(new sc::ColumnBlockPositionSet(*pDocument));
+ boost::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(new sc::ColumnBlockPositionSet(*pDocument));
sc::StartListeningContext aStartCxt(*pDocument, pPosSet);
sc::EndListeningContext aEndCxt(*pDocument, pPosSet);
SCROW nRow = aPos.first->position + aPos.second;
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index bd7c60bf7d4d..ac09eac472ce 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -34,6 +34,8 @@
#include <vector>
#include <cassert>
+#include <boost/shared_ptr.hpp>
+
bool ScColumn::IsMerged( SCROW nRow ) const
{
return pAttrArray->IsMerged(nRow);
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index b72a5adf83e6..192611851b41 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -42,7 +42,7 @@
#include "refupdatecontext.hxx"
#include <svl/sharedstring.hxx>
#include <svl/sharedstringpool.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
using namespace formula;
@@ -653,7 +653,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
// Evaluate formulas
bool bDirty = false; // 1 and 2 separate?
- std::unique_ptr<ScFormulaCell> pTemp1;
+ boost::scoped_ptr<ScFormulaCell> pTemp1;
ScFormulaCell* pEff1 = pFCell1;
if ( bRelRef1 )
{
@@ -683,7 +683,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos )
}
pTemp1.reset();
- std::unique_ptr<ScFormulaCell> pTemp2;
+ boost::scoped_ptr<ScFormulaCell> pTemp2;
ScFormulaCell* pEff2 = pFCell2; //@ 1!=2
if ( bRelRef2 )
{
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 3b96fb4e6b9f..a38f7121bb86 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -131,7 +131,7 @@ private:
ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
mpCellStringPool(new svl::SharedStringPool(ScGlobal::pCharClass)),
- mpFormulaGroupCxt(nullptr),
+ mpFormulaGroupCxt(NULL),
maCalcConfig( ScInterpreter::GetGlobalConfig()),
mpUndoManager( NULL ),
pEditEngine( NULL ),
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 15d407a9f324..0e6998a07caf 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -73,8 +73,8 @@
#include "scopetools.hxx"
#include "globalnames.hxx"
+#include <boost/scoped_ptr.hpp>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-#include <memory>
using namespace com::sun::star;
@@ -974,7 +974,7 @@ void ScDocument::UpdateReference(
if (!ValidRange(rCxt.maRange))
return;
- std::unique_ptr<sc::ExpandRefsSwitch> pExpandRefsSwitch;
+ boost::scoped_ptr<sc::ExpandRefsSwitch> pExpandRefsSwitch;
if (rCxt.isInserted())
pExpandRefsSwitch.reset(new sc::ExpandRefsSwitch(*this, SC_MOD()->GetInputOptions().GetExpandRefs()));
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 48319bad94a8..4d93eca06538 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -339,7 +339,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
// Reference in each cell must point to the origin cell relative to the current cell.
aRefData.SetAddress(aBasePos, aPos);
*t->GetSingleRef() = aRefData;
- std::unique_ptr<ScTokenArray> pTokArr(aArr.Clone());
+ boost::scoped_ptr<ScTokenArray> pTokArr(aArr.Clone());
pCell = new ScFormulaCell(this, aPos, *pTokArr, eGram, MM_REFERENCE);
pTab->SetFormulaCell(nCol, nRow, pCell);
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index d9e9bd376ebd..c51ca60dab64 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -89,7 +89,7 @@
#include <documentlinkmgr.hxx>
#include <scopetools.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
using namespace com::sun::star;
@@ -571,7 +571,7 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again
// Start at specified cell position (nCol, nRow, nTab).
ScColumn* pCol = &pTab->aCol[aScope.Col()];
- std::unique_ptr<ScColumnTextWidthIterator> pColIter(new ScColumnTextWidthIterator(*pCol, aScope.Row(), MAXROW));
+ boost::scoped_ptr<ScColumnTextWidthIterator> pColIter(new ScColumnTextWidthIterator(*pCol, aScope.Row(), MAXROW));
OutputDevice* pDev = NULL;
sal_uInt16 nRestart = 0;
@@ -1205,7 +1205,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
bool bConsiderLanguage = aTransliterationWrapper.needLanguageForTheMode();
sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
- std::unique_ptr<ScEditEngineDefaulter> pEngine; // not using pEditEngine member because of defaults
+ boost::scoped_ptr<ScEditEngineDefaulter> pEngine; // not using pEditEngine member because of defaults
SCTAB nCount = GetTableCount();
ScMarkData::const_iterator itr = rMultiMark.begin(), itrEnd = rMultiMark.end();
@@ -1240,7 +1240,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
SfxItemSet* pDefaults = new SfxItemSet( pEngine->GetEmptyItemSet() );
if ( ScStyleSheet* pPreviewStyle = GetPreviewCellStyle( nCol, nRow, nTab ) )
{
- std::unique_ptr<ScPatternAttr> pPreviewPattern(new ScPatternAttr( *pPattern ));
+ boost::scoped_ptr<ScPatternAttr> pPreviewPattern(new ScPatternAttr( *pPattern ));
pPreviewPattern->SetStyleSheet(pPreviewStyle);
pPreviewPattern->FillEditItemSet( pDefaults );
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index a362a24f82dc..f4aacca7caaf 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -100,10 +100,10 @@
#include <formula/vectortoken.hxx>
-#include <limits>
#include <map>
-#include <memory>
+#include <limits>
#include <boost/checked_delete.hpp>
+#include <boost/scoped_ptr.hpp>
#include "mtvelements.hxx"
@@ -2468,7 +2468,7 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
{
if (nInsFlag & IDF_CONTENTS)
{
- std::shared_ptr<sc::ColumnBlockPositionSet> pSet(
+ boost::shared_ptr<sc::ColumnBlockPositionSet> pSet(
new sc::ColumnBlockPositionSet(*this));
sc::StartListeningContext aStartCxt(*this, pSet);
@@ -3118,7 +3118,7 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
SCROW nStartRow = rSrcArea.aStart.Row();
SCCOL nEndCol = rSrcArea.aEnd.Col();
SCROW nEndRow = rSrcArea.aEnd.Row();
- std::unique_ptr<ScDocument> pMixDoc;
+ boost::scoped_ptr<ScDocument> pMixDoc;
bool bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
bool bOldAutoCalc = GetAutoCalc();
@@ -3175,7 +3175,7 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
if (ValidTab(nSrcTab) && nSrcTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nSrcTab])
{
- std::unique_ptr<ScDocument> pMixDoc;
+ boost::scoped_ptr<ScDocument> pMixDoc;
bool bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
bool bOldAutoCalc = GetAutoCalc();
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index dd3572ca1ef2..46825d25f5f9 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -207,7 +207,7 @@ void ScDocument::SwapNonEmpty( sc::TableValues& rValues )
if (!rRange.IsValid())
return;
- std::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(new sc::ColumnBlockPositionSet(*this));
+ boost::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(new sc::ColumnBlockPositionSet(*this));
sc::StartListeningContext aStartCxt(*this, pPosSet);
sc::EndListeningContext aEndCxt(*this, pPosSet);
@@ -393,7 +393,7 @@ namespace {
class StartNeededListenersHandler : std::unary_function<ScTable*, void>
{
- std::shared_ptr<sc::StartListeningContext> mpCxt;
+ boost::shared_ptr<sc::StartListeningContext> mpCxt;
public:
StartNeededListenersHandler( ScDocument& rDoc ) : mpCxt(new sc::StartListeningContext(rDoc)) {}
@@ -413,7 +413,7 @@ void ScDocument::StartNeededListeners()
void ScDocument::StartAllListeners( const ScRange& rRange )
{
- std::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(new sc::ColumnBlockPositionSet(*this));
+ boost::shared_ptr<sc::ColumnBlockPositionSet> pPosSet(new sc::ColumnBlockPositionSet(*this));
sc::StartListeningContext aStartCxt(*this, pPosSet);
sc::EndListeningContext aEndCxt(*this, pPosSet);
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index 543181cacbf1..642bbc2df3d4 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -330,7 +330,7 @@ void ScDocumentImport::setMatrixCells(
// Reference in each cell must point to the origin cell relative to the current cell.
aRefData.SetAddress(rBasePos, aPos);
*t->GetSingleRef() = aRefData;
- std::unique_ptr<ScTokenArray> pTokArr(aArr.Clone());
+ boost::scoped_ptr<ScTokenArray> pTokArr(aArr.Clone());
pCell = new ScFormulaCell(&mpImpl->mrDoc, aPos, *pTokArr, eGram, MM_REFERENCE);
pBlockPos->miCellPos =
rCells.set(pBlockPos->miCellPos, aPos.Row(), pCell);
@@ -350,7 +350,7 @@ void ScDocumentImport::setMatrixCells(
aPos.SetRow(nRow);
aRefData.SetAddress(rBasePos, aPos);
*t->GetSingleRef() = aRefData;
- std::unique_ptr<ScTokenArray> pTokArr(aArr.Clone());
+ boost::scoped_ptr<ScTokenArray> pTokArr(aArr.Clone());
pCell = new ScFormulaCell(&mpImpl->mrDoc, aPos, *pTokArr, eGram, MM_REFERENCE);
pBlockPos->miCellPos =
rColCells.set(pBlockPos->miCellPos, aPos.Row(), pCell);
@@ -503,7 +503,7 @@ public:
mpImpl(new Impl(MAXROWCOUNT, mrDocImpl.mnDefaultScriptNumeric))
{}
- std::shared_ptr<Impl> mpImpl;
+ boost::shared_ptr<Impl> mpImpl;
void operator() (const sc::CellStoreType::value_type& node)
{
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 96b47b089f34..b9c557233826 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -49,7 +49,7 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::std::vector;
-using ::std::shared_ptr;
+using ::boost::shared_ptr;
const sal_uInt16 SC_DP_LEAPYEAR = 1648; // arbitrary leap year for date calculations
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 757f274956ff..db4ccd294fe2 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -83,7 +83,7 @@
using namespace com::sun::star;
using ::std::vector;
using ::std::unary_function;
-using ::std::shared_ptr;
+using ::boost::shared_ptr;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::UNO_QUERY;
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 2e97565dc54f..fc8651536825 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -68,7 +68,7 @@ static void lcl_SetBoolProperty( const uno::Reference<beans::XPropertySet>& xPro
ScDPSaveMember::ScDPSaveMember(const OUString& rName) :
aName( rName ),
- mpLayoutName(nullptr),
+ mpLayoutName(NULL),
nVisibleMode( SC_DPSAVEMODE_DONTKNOW ),
nShowDetailsMode( SC_DPSAVEMODE_DONTKNOW )
{
@@ -76,7 +76,7 @@ ScDPSaveMember::ScDPSaveMember(const OUString& rName) :
ScDPSaveMember::ScDPSaveMember(const ScDPSaveMember& r) :
aName( r.aName ),
- mpLayoutName(nullptr),
+ mpLayoutName(NULL),
nVisibleMode( r.nVisibleMode ),
nShowDetailsMode( r.nShowDetailsMode )
{
@@ -191,8 +191,8 @@ void ScDPSaveMember::Dump(int nIndent) const
ScDPSaveDimension::ScDPSaveDimension(const OUString& rName, bool bDataLayout) :
aName( rName ),
- mpLayoutName(nullptr),
- mpSubtotalName(nullptr),
+ mpLayoutName(NULL),
+ mpSubtotalName(NULL),
bIsDataLayout( bDataLayout ),
bDupFlag( false ),
nOrientation( sheet::DataPilotFieldOrientation_HIDDEN ),
@@ -202,18 +202,18 @@ ScDPSaveDimension::ScDPSaveDimension(const OUString& rName, bool bDataLayout) :
bRepeatItemLabels( false ),
bSubTotalDefault( true ),
nSubTotalCount( 0 ),
- pSubTotalFuncs( nullptr ),
- pReferenceValue( nullptr ),
- pSortInfo( nullptr ),
- pAutoShowInfo( nullptr ),
- pLayoutInfo( nullptr )
+ pSubTotalFuncs( NULL ),
+ pReferenceValue( NULL ),
+ pSortInfo( NULL ),
+ pAutoShowInfo( NULL ),
+ pLayoutInfo( NULL )
{
}
ScDPSaveDimension::ScDPSaveDimension(const ScDPSaveDimension& r) :
aName( r.aName ),
- mpLayoutName(nullptr),
- mpSubtotalName(nullptr),
+ mpLayoutName(NULL),
+ mpSubtotalName(NULL),
bIsDataLayout( r.bIsDataLayout ),
bDupFlag( r.bDupFlag ),
nOrientation( r.nOrientation ),
@@ -223,7 +223,7 @@ ScDPSaveDimension::ScDPSaveDimension(const ScDPSaveDimension& r) :
bRepeatItemLabels( r.bRepeatItemLabels ),
bSubTotalDefault( r.bSubTotalDefault ),
nSubTotalCount( r.nSubTotalCount ),
- pSubTotalFuncs( nullptr )
+ pSubTotalFuncs( NULL )
{
if ( nSubTotalCount && r.pSubTotalFuncs )
{
@@ -242,19 +242,19 @@ ScDPSaveDimension::ScDPSaveDimension(const ScDPSaveDimension& r) :
if (r.pReferenceValue)
pReferenceValue = new sheet::DataPilotFieldReference( *(r.pReferenceValue) );
else
- pReferenceValue = nullptr;
+ pReferenceValue = NULL;
if (r.pSortInfo)
pSortInfo = new sheet::DataPilotFieldSortInfo( *(r.pSortInfo) );
else
- pSortInfo = nullptr;
+ pSortInfo = NULL;
if (r.pAutoShowInfo)
pAutoShowInfo = new sheet::DataPilotFieldAutoShowInfo( *(r.pAutoShowInfo) );
else
- pAutoShowInfo = nullptr;
+ pAutoShowInfo = NULL;
if (r.pLayoutInfo)
pLayoutInfo = new sheet::DataPilotFieldLayoutInfo( *(r.pLayoutInfo) );
else
- pLayoutInfo = nullptr;
+ pLayoutInfo = NULL;
if (r.mpLayoutName)
mpLayoutName.reset(new OUString(*r.mpLayoutName));
if (r.mpSubtotalName)
@@ -383,7 +383,7 @@ void ScDPSaveDimension::SetSubTotals(long nCount, const sal_uInt16* pFuncs)
pSubTotalFuncs[i] = pFuncs[i];
}
else
- pSubTotalFuncs = nullptr;
+ pSubTotalFuncs = NULL;
bSubTotalDefault = false;
}
@@ -465,7 +465,7 @@ void ScDPSaveDimension::SetReferenceValue(const sheet::DataPilotFieldReference*
if (pNew)
pReferenceValue = new sheet::DataPilotFieldReference(*pNew);
else
- pReferenceValue = nullptr;
+ pReferenceValue = NULL;
}
void ScDPSaveDimension::SetSortInfo(const sheet::DataPilotFieldSortInfo* pNew)
@@ -474,7 +474,7 @@ void ScDPSaveDimension::SetSortInfo(const sheet::DataPilotFieldSortInfo* pNew)
if (pNew)
pSortInfo = new sheet::DataPilotFieldSortInfo(*pNew);
else
- pSortInfo = nullptr;
+ pSortInfo = NULL;
}
void ScDPSaveDimension::SetAutoShowInfo(const sheet::DataPilotFieldAutoShowInfo* pNew)
@@ -483,7 +483,7 @@ void ScDPSaveDimension::SetAutoShowInfo(const sheet::DataPilotFieldAutoShowInfo*
if (pNew)
pAutoShowInfo = new sheet::DataPilotFieldAutoShowInfo(*pNew);
else
- pAutoShowInfo = nullptr;
+ pAutoShowInfo = NULL;
}
void ScDPSaveDimension::SetLayoutInfo(const sheet::DataPilotFieldLayoutInfo* pNew)
@@ -492,14 +492,14 @@ void ScDPSaveDimension::SetLayoutInfo(const sheet::DataPilotFieldLayoutInfo* pNe
if (pNew)
pLayoutInfo = new sheet::DataPilotFieldLayoutInfo(*pNew);
else
- pLayoutInfo = nullptr;
+ pLayoutInfo = NULL;
}
void ScDPSaveDimension::SetCurrentPage( const OUString* pPage )
{
// We use member's visibility attribute to filter by page dimension.
- // pPage == nullptr -> all members visible.
+ // pPage == NULL -> all members visible.
MemberList::iterator it = maMemberList.begin(), itEnd = maMemberList.end();
for (; it != itEnd; ++it)
{
@@ -527,7 +527,7 @@ ScDPSaveMember* ScDPSaveDimension::GetExistingMemberByName(const OUString& rName
MemberHash::const_iterator res = maMemberHash.find (rName);
if (res != maMemberHash.end())
return res->second;
- return nullptr;
+ return NULL;
}
ScDPSaveMember* ScDPSaveDimension::GetMemberByName(const OUString& rName)
@@ -797,7 +797,7 @@ void ScDPSaveDimension::Dump(int nIndent) const
#endif
ScDPSaveData::ScDPSaveData() :
- pDimensionData( nullptr ),
+ pDimensionData( NULL ),
nColumnGrandMode( SC_DPSAVEMODE_DONTKNOW ),
nRowGrandMode( SC_DPSAVEMODE_DONTKNOW ),
nIgnoreEmptyMode( SC_DPSAVEMODE_DONTKNOW ),
@@ -805,7 +805,7 @@ ScDPSaveData::ScDPSaveData() :
bFilterButton( true ),
bDrillDown( true ),
mbDimensionMembersBuilt(false),
- mpGrandTotalName(nullptr)
+ mpGrandTotalName(NULL)
{
}
@@ -817,13 +817,13 @@ ScDPSaveData::ScDPSaveData(const ScDPSaveData& r) :
bFilterButton( r.bFilterButton ),
bDrillDown( r.bDrillDown ),
mbDimensionMembersBuilt(r.mbDimensionMembersBuilt),
- mpGrandTotalName(nullptr),
- mpDimOrder(nullptr)
+ mpGrandTotalName(NULL),
+ mpDimOrder(NULL)
{
if ( r.pDimensionData )
pDimensionData = new ScDPDimensionSaveData( *r.pDimensionData );
else
- pDimensionData = nullptr;
+ pDimensionData = NULL;
aDimList = r.aDimList.clone();
@@ -971,7 +971,7 @@ ScDPSaveDimension* ScDPSaveData::GetExistingDimensionByName(const OUString& rNam
if (iter->GetName() == rName && !iter->IsDataLayout() )
return const_cast<ScDPSaveDimension*>(&(*iter));
}
- return nullptr; // don't create new
+ return NULL; // don't create new
}
ScDPSaveDimension* ScDPSaveData::GetNewDimensionByName(const OUString& rName)
@@ -1003,7 +1003,7 @@ ScDPSaveDimension* ScDPSaveData::GetExistingDataLayoutDimension() const
if ( iter->IsDataLayout() )
return const_cast<ScDPSaveDimension*>(&(*iter));
}
- return nullptr;
+ return NULL;
}
ScDPSaveDimension* ScDPSaveData::DuplicateDimension(const OUString& rName)
@@ -1012,7 +1012,7 @@ ScDPSaveDimension* ScDPSaveData::DuplicateDimension(const OUString& rName)
ScDPSaveDimension* pOld = GetExistingDimensionByName(rName);
if (!pOld)
- return nullptr;
+ return NULL;
ScDPSaveDimension* pNew = new ScDPSaveDimension( *pOld );
AddDimension(pNew);
@@ -1053,7 +1053,7 @@ ScDPSaveDimension* ScDPSaveData::GetInnermostDimension(sal_uInt16 nOrientation)
return const_cast<ScDPSaveDimension*>(&(*iter));
}
- return nullptr;
+ return NULL;
}
ScDPSaveDimension* ScDPSaveData::GetFirstDimension(sheet::DataPilotFieldOrientation eOrientation)
@@ -1064,7 +1064,7 @@ ScDPSaveDimension* ScDPSaveData::GetFirstDimension(sheet::DataPilotFieldOrientat
if (iter->GetOrientation() == eOrientation && !iter->IsDataLayout())
return const_cast<ScDPSaveDimension*>(&(*iter));
}
- return nullptr;
+ return NULL;
}
long ScDPSaveData::GetDataDimensionCount() const
@@ -1326,7 +1326,7 @@ void ScDPSaveData::RemoveAllGroupDimensions( const OUString& rSrcDimName, std::v
{
// still get the same group dimension?
OSL_FAIL("couldn't remove group dimension");
- pExistingGroup = nullptr; // avoid endless loop
+ pExistingGroup = NULL; // avoid endless loop
}
}
}
@@ -1344,7 +1344,7 @@ void ScDPSaveData::SetDimensionData( const ScDPDimensionSaveData* pNew )
if ( pNew )
pDimensionData = new ScDPDimensionSaveData( *pNew );
else
- pDimensionData = nullptr;
+ pDimensionData = NULL;
}
void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData)
@@ -1495,7 +1495,7 @@ ScDPSaveDimension* ScDPSaveData::AppendNewDimension(const OUString& rName, bool
{
if (ScDPUtil::isDuplicateDimension(rName))
// This call is for original dimensions only.
- return nullptr;
+ return NULL;
ScDPSaveDimension* pNew = new ScDPSaveDimension(rName, bDataLayout);
aDimList.push_back(pNew);
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 28667b54d920..7ccaa7300021 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -37,9 +37,9 @@
#include <math.h>
#include <float.h>
#include <algorithm>
-#include <memory>
#include <unordered_map>
#include <boost/checked_delete.hpp>
+#include <boost/scoped_ptr.hpp>
#include <com/sun/star/sheet/DataResultFlags.hpp>
#include <com/sun/star/sheet/MemberResultFlags.hpp>
@@ -1505,7 +1505,7 @@ void ScDPResultMember::FillDataResults(
ScDPResultFilterContext& rFilterCxt, uno::Sequence<uno::Sequence<sheet::DataResult> >& rSequence,
long nMeasure) const
{
- std::unique_ptr<FilterStack> pFilterStack;
+ boost::scoped_ptr<FilterStack> pFilterStack;
const ScDPMember* pDPMember = GetDPMember();
if (pDPMember)
{
@@ -2009,7 +2009,7 @@ void ScDPDataMember::FillDataRow(
uno::Sequence<sheet::DataResult>& rSequence, long nMeasure, bool bIsSubTotalRow,
const ScDPSubTotalState& rSubState) const
{
- std::unique_ptr<FilterStack> pFilterStack;
+ boost::scoped_ptr<FilterStack> pFilterStack;
if (pResultMember)
{
// Topmost data member (pResultMember=NULL) doesn't need to be handled
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index bd9950bb6552..5a14a6f23e53 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -98,17 +98,17 @@ static void lcl_SetBoolInAny( uno::Any& rAny, bool bValue )
ScDPSource::ScDPSource( ScDPTableData* pD ) :
pData( pD ),
- pDimensions( nullptr ),
+ pDimensions( NULL ),
bColumnGrand( true ), // default is true
bRowGrand( true ),
bIgnoreEmptyRows( false ),
bRepeatIfEmpty( false ),
nDupCount( 0 ),
- pResData( nullptr ),
- pColResRoot( nullptr ),
- pRowResRoot( nullptr ),
- pColResults( nullptr ),
- pRowResults( nullptr ),
+ pResData( NULL ),
+ pColResRoot( NULL ),
+ pRowResRoot( NULL ),
+ pColResults( NULL ),
+ pRowResults( NULL ),
bResultOverflow( false ),
bPageFiltered( false )
{
@@ -160,7 +160,7 @@ long ScDPSource::GetDataDimensionCount()
ScDPDimension* ScDPSource::GetDataDimension(long nIndex)
{
if (nIndex < 0 || static_cast<size_t>(nIndex) >= maDataDims.size())
- return nullptr;
+ return NULL;
long nDimIndex = maDataDims[nIndex];
return GetDimensionsObject()->getByIndex(nDimIndex);
@@ -539,8 +539,8 @@ void ScDPSource::disposeData()
DELETEZ(pResData);
delete[] pColResults;
delete[] pRowResults;
- pColResults = nullptr;
- pRowResults = nullptr;
+ pColResults = NULL;
+ pRowResults = NULL;
aColLevelList.clear();
aRowLevelList.clear();
}
@@ -548,7 +548,7 @@ void ScDPSource::disposeData()
if ( pDimensions )
{
pDimensions->release(); // ref-counted
- pDimensions = nullptr; // settings have to be applied (from SaveData) again!
+ pDimensions = NULL; // settings have to be applied (from SaveData) again!
}
SetDupCount( 0 );
@@ -999,7 +999,7 @@ void ScDPSource::FillLevelList( sal_uInt16 nOrientation, std::vector<ScDPLevel*>
{
rList.clear();
- std::vector<long>* pDimIndex = nullptr;
+ std::vector<long>* pDimIndex = NULL;
switch (nOrientation)
{
case sheet::DataPilotFieldOrientation_COLUMN:
@@ -1070,7 +1070,7 @@ void ScDPSource::FillMemberResults()
long nPos = 0;
pColResRoot->FillMemberResults( pColResults, nPos, pResData->GetColStartMeasure(),
- true, nullptr, nullptr );
+ true, NULL, NULL );
}
FillLevelList( sheet::DataPilotFieldOrientation_ROW, aRowLevelList );
@@ -1084,7 +1084,7 @@ void ScDPSource::FillMemberResults()
long nPos = 0;
pRowResRoot->FillMemberResults( pRowResults, nPos, pResData->GetRowStartMeasure(),
- true, nullptr, nullptr );
+ true, NULL, NULL );
}
}
}
@@ -1108,7 +1108,7 @@ const uno::Sequence<sheet::MemberResult>* ScDPSource::GetMemberResults( ScDPLeve
if ( pRowLevel == pLevel )
return pRowResults+i;
}
- return nullptr;
+ return NULL;
}
// XPropertySet
@@ -1211,7 +1211,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDPSource )
ScDPDimensions::ScDPDimensions( ScDPSource* pSrc ) :
pSource( pSrc ),
- ppDims( nullptr )
+ ppDims( NULL )
{
//TODO: hold pSource
@@ -1245,7 +1245,7 @@ void ScDPDimensions::CountChanged()
for (i=0; i<nCopy; i++) // copy existing dims
ppNew[i] = ppDims[i];
for (i=nCopy; i<nNewCount; i++) // clear additional pointers
- ppNew[i] = nullptr;
+ ppNew[i] = NULL;
for (i=nCopy; i<nDimCount; i++) // delete old dims if count is decreased
if ( ppDims[i] )
ppDims[i]->release(); // ref-counted
@@ -1322,7 +1322,7 @@ ScDPDimension* ScDPDimensions::getByIndex(long nIndex) const
{
const_cast<ScDPDimensions*>(this)->ppDims = new ScDPDimension*[nDimCount];
for (long i=0; i<nDimCount; i++)
- ppDims[i] = nullptr;
+ ppDims[i] = NULL;
}
if ( !ppDims[nIndex] )
{
@@ -1333,20 +1333,20 @@ ScDPDimension* ScDPDimensions::getByIndex(long nIndex) const
return ppDims[nIndex];
}
- return nullptr; //TODO: exception?
+ return NULL; //TODO: exception?
}
ScDPDimension::ScDPDimension( ScDPSource* pSrc, long nD ) :
pSource( pSrc ),
nDim( nD ),
- pHierarchies( nullptr ),
+ pHierarchies( NULL ),
nUsedHier( 0 ),
nFunction( SUBTOTAL_FUNC_SUM ), // sum is default
- mpLayoutName(nullptr),
- mpSubtotalName(nullptr),
+ mpLayoutName(NULL),
+ mpSubtotalName(NULL),
nSourceDim( -1 ),
bHasSelectedPage( false ),
- pSelectedData( nullptr ),
+ pSelectedData( NULL ),
mbHasHiddenMember(false)
{
//TODO: hold pSource
@@ -1690,7 +1690,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDPDimension )
ScDPHierarchies::ScDPHierarchies( ScDPSource* pSrc, long nD ) :
pSource( pSrc ),
nDim( nD ),
- ppHiers( nullptr )
+ ppHiers( NULL )
{
//TODO: hold pSource
@@ -1779,7 +1779,7 @@ ScDPHierarchy* ScDPHierarchies::getByIndex(long nIndex) const
{
const_cast<ScDPHierarchies*>(this)->ppHiers = new ScDPHierarchy*[nHierCount];
for (long i=0; i<nHierCount; i++)
- ppHiers[i] = nullptr;
+ ppHiers[i] = NULL;
}
if ( !ppHiers[nIndex] )
{
@@ -1790,14 +1790,14 @@ ScDPHierarchy* ScDPHierarchies::getByIndex(long nIndex) const
return ppHiers[nIndex];
}
- return nullptr; //TODO: exception?
+ return NULL; //TODO: exception?
}
ScDPHierarchy::ScDPHierarchy( ScDPSource* pSrc, long nD, long nH ) :
pSource( pSrc ),
nDim( nD ),
nHier( nH ),
- pLevels( nullptr )
+ pLevels( NULL )
{
//TODO: hold pSource
}
@@ -1856,7 +1856,7 @@ ScDPLevels::ScDPLevels( ScDPSource* pSrc, long nD, long nH ) :
pSource( pSrc ),
nDim( nD ),
nHier( nH ),
- ppLevs( nullptr )
+ ppLevs( NULL )
{
//TODO: hold pSource
@@ -1955,7 +1955,7 @@ ScDPLevel* ScDPLevels::getByIndex(long nIndex) const
{
const_cast<ScDPLevels*>(this)->ppLevs = new ScDPLevel*[nLevCount];
for (long i=0; i<nLevCount; i++)
- ppLevs[i] = nullptr;
+ ppLevs[i] = NULL;
}
if ( !ppLevs[nIndex] )
{
@@ -1966,7 +1966,7 @@ ScDPLevel* ScDPLevels::getByIndex(long nIndex) const
return ppLevs[nIndex];
}
- return nullptr; //TODO: exception?
+ return NULL; //TODO: exception?
}
class ScDPGlobalMembersOrder
@@ -2003,7 +2003,7 @@ ScDPLevel::ScDPLevel( ScDPSource* pSrc, long nD, long nH, long nL ) :
nDim( nD ),
nHier( nH ),
nLev( nL ),
- pMembers( nullptr ),
+ pMembers( NULL ),
aSortInfo( EMPTY_OUSTRING, sal_True, sheet::DataPilotFieldSortMode::NAME ), // default: sort by name
nSortMeasure( 0 ),
nAutoMeasure( 0 ),
@@ -2291,7 +2291,7 @@ ScDPMembers::ScDPMembers( ScDPSource* pSrc, long nD, long nH, long nL ) :
{
case SC_DAPI_LEVEL_YEAR:
{
- const ScDPItemData* pLastNumData = nullptr;
+ const ScDPItemData* pLastNumData = NULL;
for ( SCROW n = 0 ;n <GetSrcItemsCount() ; n-- )
{
const ScDPItemData* pData = GetSrcItemDataByIndex( n );
@@ -2534,7 +2534,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
return maMembers[nIndex].get();
}
- return nullptr; //TODO: exception?
+ return NULL; //TODO: exception?
}
ScDPMember::ScDPMember(
@@ -2544,7 +2544,7 @@ ScDPMember::ScDPMember(
nHier( nH ),
nLev( nL ),
mnDataId( nIndex ),
- mpLayoutName(nullptr),
+ mpLayoutName(NULL),
nPosition( -1 ),
bVisible( true ),
bShowDet( true )
@@ -2701,7 +2701,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDPMember )
const ScDPCache* ScDPSource::GetCache()
{
OSL_ENSURE( GetData() , "empty ScDPTableData pointer");
- return ( GetData()!=nullptr ) ? &GetData()->GetCacheTable().getCache() : nullptr ;
+ return ( GetData()!=NULL ) ? &GetData()->GetCacheTable().getCache() : NULL ;
}
const ScDPItemData* ScDPMember::GetItemData() const
@@ -2725,7 +2725,7 @@ const ScDPItemData* ScDPMembers::GetSrcItemDataByIndex(SCROW nIndex)
{
const std::vector< SCROW >& memberIds = pSource->GetData()->GetColumnEntries( nDim );
if ( nIndex >= (long )(memberIds.size()) || nIndex < 0 )
- return nullptr;
+ return NULL;
SCROW nId = memberIds[ nIndex ];
return pSource->GetItemDataById( nDim, nId );
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index cb3764b9577b..07d19a394387 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -62,7 +62,7 @@
#include <grouparealistener.hxx>
#include <officecfg/Office/Common.hxx>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
#include <boost/ptr_container/ptr_map.hpp>
using namespace formula;
@@ -2985,7 +2985,7 @@ bool ScFormulaCell::UpdateReferenceOnShift(
// on reference update. Bail out.
return bCellStateChanged;
- std::unique_ptr<ScTokenArray> pOldCode;
+ boost::scoped_ptr<ScTokenArray> pOldCode;
if (pUndoDoc)
pOldCode.reset(pCode->Clone());
@@ -3107,7 +3107,7 @@ bool ScFormulaCell::UpdateReferenceOnMove(
return false;
bool bCellStateChanged = false;
- std::unique_ptr<ScTokenArray> pOldCode;
+ boost::scoped_ptr<ScTokenArray> pOldCode;
if (pUndoDoc)
pOldCode.reset(pCode->Clone());
@@ -3230,7 +3230,7 @@ bool ScFormulaCell::UpdateReferenceOnCopy(
// on reference update. Bail out.
return false;
- std::unique_ptr<ScTokenArray> pOldCode;
+ boost::scoped_ptr<ScTokenArray> pOldCode;
if (pUndoDoc)
pOldCode.reset(pCode->Clone());
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 6a4ac4773533..39d983c3e316 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -34,8 +34,8 @@
#include <tools/resid.hxx>
#include <unotools/collatorwrapper.hxx>
-#include <memory>
#include <numeric>
+#include <boost/scoped_ptr.hpp>
class ScFuncRes : public Resource
{
@@ -395,7 +395,7 @@ ScFunctionList::ScFunctionList() :
for (sal_uInt16 k = 0; k < SAL_N_ELEMENTS(nDescBlock); ++k)
{
- std::unique_ptr<ScResourcePublisher> pBlock( new ScResourcePublisher( ScResId( nDescBlock[k] ) ) );
+ boost::scoped_ptr<ScResourcePublisher> pBlock( new ScResourcePublisher( ScResId( nDescBlock[k] ) ) );
// Browse for all possible OpCodes. This is not the fastest method, but
// otherwise the sub resources within the resource blocks and the
// resource blocks themselves would had to be ordered according to
@@ -767,7 +767,7 @@ OUString ScFunctionMgr::GetCategoryName(sal_uInt32 _nCategoryNumber )
return OUString();
}
- std::unique_ptr<ScResourcePublisher> pCategories( new ScResourcePublisher( ScResId( RID_FUNCTION_CATEGORIES ) ) );
+ boost::scoped_ptr<ScResourcePublisher> pCategories( new ScResourcePublisher( ScResId( RID_FUNCTION_CATEGORIES ) ) );
return SC_RESSTR(static_cast<sal_uInt16>(_nCategoryNumber));
}
diff --git a/sc/source/core/data/listenercontext.cxx b/sc/source/core/data/listenercontext.cxx
index 75010007d506..2745749e18c4 100644
--- a/sc/source/core/data/listenercontext.cxx
+++ b/sc/source/core/data/listenercontext.cxx
@@ -17,7 +17,7 @@ StartListeningContext::StartListeningContext(ScDocument& rDoc) :
mrDoc(rDoc), mpSet(new ColumnBlockPositionSet(rDoc)) {}
StartListeningContext::StartListeningContext(
- ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet) :
+ ScDocument& rDoc, const boost::shared_ptr<ColumnBlockPositionSet>& pSet) :
mrDoc(rDoc), mpSet(pSet) {}
ColumnBlockPosition* StartListeningContext::getBlockPosition(SCTAB nTab, SCCOL nCol)
@@ -30,7 +30,7 @@ EndListeningContext::EndListeningContext(ScDocument& rDoc, ScTokenArray* pOldCod
mpOldCode(pOldCode), maPosDelta(0,0,0) {}
EndListeningContext::EndListeningContext(
- ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet, ScTokenArray* pOldCode) :
+ ScDocument& rDoc, const boost::shared_ptr<ColumnBlockPositionSet>& pSet, ScTokenArray* pOldCode) :
mrDoc(rDoc), maSet(false), mpPosSet(pSet),
mpOldCode(pOldCode), maPosDelta(0,0,0) {}
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 9ddf3b598b57..8c0916563c22 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -67,7 +67,7 @@ ScProgress* GetProgressBar(
// if the total number of rows is less than 1000, don't even bother
// with the progress bar because drawing progress bar can be very
// expensive especially in GTK.
- return nullptr;
+ return NULL;
}
if (pOuterProgress)
@@ -77,7 +77,7 @@ ScProgress* GetProgressBar(
return new ScProgress(
pDoc->GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nTotalCount);
- return nullptr;
+ return NULL;
}
void GetOptimalHeightsInColumn(
@@ -236,32 +236,32 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const OUString& rNewName,
nRepeatEndX( SCCOL_REPEAT_NONE ),
nRepeatStartY( SCROW_REPEAT_NONE ),
nRepeatEndY( SCROW_REPEAT_NONE ),
- pTabProtection( nullptr ),
- pColWidth( nullptr ),
- mpRowHeights( static_cast<ScFlatUInt16RowSegments*>(nullptr) ),
- pColFlags( nullptr ),
- pRowFlags( nullptr ),
+ pTabProtection( NULL ),
+ pColWidth( NULL ),
+ mpRowHeights( static_cast<ScFlatUInt16RowSegments*>(NULL) ),
+ pColFlags( NULL ),
+ pRowFlags( NULL ),
mpHiddenCols(new ScFlatBoolColSegments),
mpHiddenRows(new ScFlatBoolRowSegments),
mpFilteredCols(new ScFlatBoolColSegments),
mpFilteredRows(new ScFlatBoolRowSegments),
- pOutlineTable( nullptr ),
- pSheetEvents( nullptr ),
+ pOutlineTable( NULL ),
+ pSheetEvents( NULL ),
nTableAreaX( 0 ),
nTableAreaY( 0 ),
nTab( nNewTab ),
pDocument( pDoc ),
- pSearchText ( nullptr ),
- pSortCollator( nullptr ),
- pRepeatColRange( nullptr ),
- pRepeatRowRange( nullptr ),
+ pSearchText ( NULL ),
+ pSortCollator( NULL ),
+ pRepeatColRange( NULL ),
+ pRepeatRowRange( NULL ),
nLockCount( 0 ),
- pScenarioRanges( nullptr ),
+ pScenarioRanges( NULL ),
aScenarioColor( COL_LIGHTGRAY ),
aTabBgColor( COL_AUTO ),
nScenarioFlags( 0 ),
- pDBDataNoName(nullptr),
- mpRangeName(nullptr),
+ pDBDataNoName(NULL),
+ mpRangeName(NULL),
mpCondFormatList( new ScConditionalFormatList() ),
bScenario(false),
bLayoutRTL(false),
@@ -455,7 +455,7 @@ long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow,
aOptions.bTotalSize = bTotalSize;
return aCol[nCol].GetNeededSize
- ( nRow, pDev, nPPTX, nPPTY, rZoomX, rZoomY, bWidth, aOptions, nullptr );
+ ( nRow, pDev, nPPTX, nPPTY, rZoomX, rZoomY, bWidth, aOptions, NULL );
}
bool ScTable::SetOptimalHeight(
@@ -1071,7 +1071,7 @@ SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight ) const
{
nCol++;
SCCOL nEnd = 0;
- bool bHidden = pDocument->ColHidden(nCol, nTab, nullptr, &nEnd);
+ bool bHidden = pDocument->ColHidden(nCol, nTab, NULL, &nEnd);
if(bHidden)
nCol = nEnd +1;
@@ -1081,7 +1081,7 @@ SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight ) const
{
nCol--;
SCCOL nStart = MAXCOL;
- bool bHidden = pDocument->ColHidden(nCol, nTab, &nStart, nullptr);
+ bool bHidden = pDocument->ColHidden(nCol, nTab, &nStart, NULL);
if(bHidden)
nCol = nStart - 1;
@@ -1100,7 +1100,7 @@ SCCOL ScTable::FindNextVisibleColWithContent( SCCOL nCol, bool bRight, SCROW nRo
{
nCol++;
SCCOL nEndCol = 0;
- bool bHidden = pDocument->ColHidden( nCol, nTab, nullptr, &nEndCol );
+ bool bHidden = pDocument->ColHidden( nCol, nTab, NULL, &nEndCol );
if(bHidden)
{
nCol = nEndCol +1;
@@ -1124,7 +1124,7 @@ SCCOL ScTable::FindNextVisibleColWithContent( SCCOL nCol, bool bRight, SCROW nRo
{
nCol--;
SCCOL nStartCol = MAXCOL;
- bool bHidden = pDocument->ColHidden( nCol, nTab, &nStartCol, nullptr );
+ bool bHidden = pDocument->ColHidden( nCol, nTab, &nStartCol, NULL );
if(bHidden)
{
nCol = nStartCol -1;
@@ -1571,7 +1571,7 @@ void ScTable::UpdateReference(
// updating print ranges is not necessary with multiple print ranges
if ( bRecalcPages && GetPrintRangeCount() <= 1 )
{
- UpdatePageBreaks(nullptr);
+ UpdatePageBreaks(NULL);
pDocument->RepaintRange( ScRange(0,0,nTab,MAXCOL,MAXROW,nTab) );
}
@@ -1730,7 +1730,7 @@ void ScTable::ExtendPrintArea( OutputDevice* pDev,
for (SCCOL i = 0; i <= MAXCOL; ++i)
{
SCCOL nLastCol = i;
- if (ColHidden(i, nullptr, &nLastCol))
+ if (ColHidden(i, NULL, &nLastCol))
{
// Columns are hidden in this range.
aSkipCols.setTrue(i, nLastCol);
@@ -1813,7 +1813,7 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d
Fraction aZoom(1,1);
nPixel = aCol[rCol].GetNeededSize(
- nRow, pDev, nPPTX, nPPTY, aZoom, aZoom, true, aOptions, nullptr );
+ nRow, pDev, nPPTX, nPPTY, aZoom, aZoom, true, aOptions, NULL );
aCol[rCol].SetTextWidth(nRow, static_cast<sal_uInt16>(nPixel));
}
@@ -1898,7 +1898,7 @@ void ScTable::CopyPrintRange(const ScTable& rTable)
bPrintEntireSheet = rTable.bPrintEntireSheet;
delete pRepeatColRange;
- pRepeatColRange = nullptr;
+ pRepeatColRange = NULL;
if (rTable.pRepeatColRange)
{
pRepeatColRange = new ScRange(*rTable.pRepeatColRange);
@@ -1907,7 +1907,7 @@ void ScTable::CopyPrintRange(const ScTable& rTable)
}
delete pRepeatRowRange;
- pRepeatRowRange = nullptr;
+ pRepeatRowRange = NULL;
if (rTable.pRepeatRowRange)
{
pRepeatRowRange = new ScRange(*rTable.pRepeatRowRange);
@@ -1970,7 +1970,7 @@ void ScTable::SetPrintEntireSheet()
const ScRange* ScTable::GetPrintRange(sal_uInt16 nPos) const
{
- return (nPos < GetPrintRangeCount()) ? &aPrintRanges[ nPos ] : nullptr;
+ return (nPos < GetPrintRangeCount()) ? &aPrintRanges[ nPos ] : NULL;
}
void ScTable::FillPrintSaver( ScPrintSaverTab& rSaveTab ) const
@@ -1987,7 +1987,7 @@ void ScTable::RestorePrintRanges( const ScPrintSaverTab& rSaveTab )
SetRepeatRowRange( rSaveTab.GetRepeatRow() );
InvalidatePageBreaks(); // #i117952# forget page breaks for an old print range
- UpdatePageBreaks(nullptr);
+ UpdatePageBreaks(NULL);
}
SCROW ScTable::VisibleDataCellIterator::ROW_NOT_FOUND = -1;
@@ -2203,7 +2203,7 @@ ScRefCellValue ScTable::GetRefCellValue( SCCOL nCol, SCROW nRow )
SvtBroadcaster* ScTable::GetBroadcaster( SCCOL nCol, SCROW nRow )
{
if (!ValidColRow(nCol, nRow))
- return nullptr;
+ return NULL;
return aCol[nCol].GetBroadcaster(nRow);
}
@@ -2268,7 +2268,7 @@ void ScTable::DumpFormulaGroups( SCCOL nCol ) const
const SvtBroadcaster* ScTable::GetBroadcaster( SCCOL nCol, SCROW nRow ) const
{
if (!ValidColRow(nCol, nRow))
- return nullptr;
+ return NULL;
return aCol[nCol].GetBroadcaster(nRow);
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3b9c02a71d54..f28be30d1d6d 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -863,7 +863,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCROW nAttrRow1;
SCROW nAttrRow2;
const ScPatternAttr* pPattern;
- std::unique_ptr<ScAttrIterator> pAttrIter(aCol[nCol].CreateAttrIterator( nRow1, nRow2 ));
+ boost::scoped_ptr<ScAttrIterator> pAttrIter(aCol[nCol].CreateAttrIterator( nRow1, nRow2 ));
while ( (pPattern = pAttrIter->Next( nAttrRow1, nAttrRow2 )) != 0 )
{
if ( !IsDefaultItem( pPattern ) )
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 706e0e593ab5..9775e14ab9f7 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -67,10 +67,11 @@
#include <svl/sharedstringpool.hxx>
-#include <memory>
#include <unordered_set>
#include <vector>
#include <boost/checked_delete.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <boost/noncopyable.hpp>
#include <mdds/flat_segment_tree.hpp>
@@ -251,7 +252,7 @@ public:
typedef std::vector<Row*> RowsType;
private:
- std::unique_ptr<RowsType> mpRows; /// row-wise data table for sort by row operation.
+ boost::scoped_ptr<RowsType> mpRows; /// row-wise data table for sort by row operation.
ScSortInfo*** pppInfo;
SCSIZE nCount;
@@ -868,7 +869,7 @@ class ListenerStartAction : public sc::ColumnSpanSet::ColumnAction
{
ScColumn* mpCol;
- std::shared_ptr<sc::ColumnBlockPositionSet> mpPosSet;
+ boost::shared_ptr<sc::ColumnBlockPositionSet> mpPosSet;
sc::StartListeningContext maStartCxt;
sc::EndListeningContext maEndCxt;
@@ -1707,7 +1708,7 @@ void ScTable::Sort(
if(pProgress)
pProgress->SetState( 0, nLastRow-nRow1 );
- std::unique_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, nLastRow, bKeepQuery, bUpdateRefs));
+ boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, nLastRow, bKeepQuery, bUpdateRefs));
if ( nLastRow - nRow1 > 255 )
DecoladeRow(pArray.get(), nRow1, nLastRow);
@@ -1734,7 +1735,7 @@ void ScTable::Sort(
if(pProgress)
pProgress->SetState( 0, nLastCol-nCol1 );
- std::unique_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nCol1, nLastCol, bKeepQuery, bUpdateRefs));
+ boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nCol1, nLastCol, bKeepQuery, bUpdateRefs));
QuickSort(pArray.get(), nCol1, nLastCol);
SortReorderByColumn(pArray.get(), aSortParam.nRow1, aSortParam.nRow2, aSortParam.bIncludePattern, pProgress);
@@ -1754,7 +1755,7 @@ void ScTable::Reorder( const sc::ReorderParam& rParam, ScProgress* pProgress )
if (rParam.maOrderIndices.empty())
return;
- std::unique_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(rParam));
+ boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(rParam));
if (!pArray)
return;
@@ -2736,7 +2737,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
bSortCollatorInitialized = true;
InitSortCollator( aLocalSortParam );
}
- std::unique_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, rParam.nRow2, bGlobalKeepQuery, false));
+ boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(aSortParam, nRow1, rParam.nRow2, bGlobalKeepQuery, false));
DecoladeRow( pArray.get(), nRow1, rParam.nRow2 );
QuickSort( pArray.get(), nRow1, rParam.nRow2 );
ScSortInfo** ppInfo = pArray->GetFirstArray();
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index ee1a29a99f72..5b6479cb95be 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -64,7 +64,7 @@
#include <listenercontext.hxx>
#include <math.h>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
// STATIC DATA -----------------------------------------------------------
@@ -1178,7 +1178,7 @@ void ScTable::FillFormulaVertical(
aCol[nCol].DeleteRanges(aSpans, IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_FORMULA | IDF_OUTLINE, false);
aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans, NULL);
- std::shared_ptr<sc::ColumnBlockPositionSet> pSet(new sc::ColumnBlockPositionSet(*pDocument));
+ boost::shared_ptr<sc::ColumnBlockPositionSet> pSet(new sc::ColumnBlockPositionSet(*pDocument));
sc::StartListeningContext aStartCxt(*pDocument, pSet);
sc::EndListeningContext aEndCxt(*pDocument, pSet);
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index e168ec6110f1..42d06a623edf 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -51,7 +51,7 @@
#include "scmatrix.hxx"
#include <math.h>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
using namespace formula;
@@ -812,7 +812,7 @@ bool ScValidationData::FillSelectionList(std::vector<ScTypedStrData>& rStrColl,
if( HasSelectionList() )
{
- std::unique_ptr<ScTokenArray> pTokArr( CreateTokenArry(0) );
+ boost::scoped_ptr<ScTokenArray> pTokArr( CreateTokenArry(0) );
// *** try if formula is a string list ***
@@ -865,7 +865,7 @@ bool ScValidationData::IsListValid( ScRefCellValue& rCell, const ScAddress& rPos
5) A formula resulting in a cell/range reference or matrix/array.
*/
- std::unique_ptr< ScTokenArray > pTokArr( CreateTokenArry( 0 ) );
+ boost::scoped_ptr< ScTokenArray > pTokArr( CreateTokenArry( 0 ) );
// *** try if formula is a string list ***