summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-26 15:46:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-26 15:47:03 +0200
commit1df1c5eed9d44130fee818745cbb3d5ee59b7c3f (patch)
treeed60ffbc022965f2b2e712bb188e46b64880a1da
parent296371d5d8f58c46e976f66b11599410d97dc472 (diff)
formula: std::auto_ptr -> std::unique_ptr
Change-Id: I7b4784abf5177e22a9df33c5d4faccfd39801b11
-rw-r--r--formula/source/core/api/FormulaOpCodeMapperObj.cxx18
-rw-r--r--formula/source/ui/dlg/formula.cxx2
-rw-r--r--include/formula/FormulaOpCodeMapperObj.hxx8
-rw-r--r--include/formula/IFunctionDescription.hxx2
-rw-r--r--include/formula/formula.hxx8
-rw-r--r--include/formula/formulahelper.hxx2
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx11
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx2
-rw-r--r--sc/inc/tokenuno.hxx4
-rw-r--r--sc/source/ui/formdlg/formula.cxx10
-rw-r--r--sc/source/ui/inc/formula.hxx2
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx6
12 files changed, 24 insertions, 51 deletions
diff --git a/formula/source/core/api/FormulaOpCodeMapperObj.cxx b/formula/source/core/api/FormulaOpCodeMapperObj.cxx
index f57114e51d49..21b0f2261c44 100644
--- a/formula/source/core/api/FormulaOpCodeMapperObj.cxx
+++ b/formula/source/core/api/FormulaOpCodeMapperObj.cxx
@@ -16,6 +16,11 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <sal/config.h>
+
+#include <utility>
+
#include "formula/FormulaOpCodeMapperObj.hxx"
#include "formula/opcode.hxx"
#include <comphelper/sequence.hxx>
@@ -30,12 +35,10 @@ sal_Bool SAL_CALL FormulaOpCodeMapperObj::supportsService( const OUString& _rSer
return cppu::supportsService(this, _rServiceName);
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-FormulaOpCodeMapperObj::FormulaOpCodeMapperObj(::std::auto_ptr<FormulaCompiler> _pCompiler)
-: m_pCompiler(_pCompiler)
+FormulaOpCodeMapperObj::FormulaOpCodeMapperObj(::std::unique_ptr<FormulaCompiler> && _pCompiler)
+: m_pCompiler(std::move(_pCompiler))
{
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
FormulaOpCodeMapperObj::~FormulaOpCodeMapperObj()
{
@@ -102,16 +105,11 @@ uno::Sequence< OUString > SAL_CALL FormulaOpCodeMapperObj::getSupportedServiceNa
return aSeq;
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
uno::Reference< uno::XInterface > SAL_CALL FormulaOpCodeMapperObj::create(
uno::Reference< uno::XComponentContext > const & /*_xContext*/)
{
- return static_cast<sheet::XFormulaOpCodeMapper*>(new FormulaOpCodeMapperObj(::std::auto_ptr<FormulaCompiler>(new FormulaCompiler())));
+ return static_cast<sheet::XFormulaOpCodeMapper*>(new FormulaOpCodeMapperObj(::std::unique_ptr<FormulaCompiler>(new FormulaCompiler())));
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
-
-
-
} // formula
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index c8489ceb7abf..5573f72f152f 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -133,7 +133,7 @@ namespace formula
public:
mutable uno::Reference< sheet::XFormulaOpCodeMapper> m_xOpCodeMapper;
uno::Sequence< sheet::FormulaToken > m_aTokenList;
- ::std::auto_ptr<FormulaTokenArray> m_pTokenArray;
+ ::std::unique_ptr<FormulaTokenArray> m_pTokenArray;
mutable uno::Sequence< sheet::FormulaOpCodeMapEntry > m_aSpecialOpCodes;
mutable const sheet::FormulaOpCodeMapEntry* m_pSpecialOpCodesEnd;
mutable uno::Sequence< sheet::FormulaToken > m_aSeparatorsOpCodes;
diff --git a/include/formula/FormulaOpCodeMapperObj.hxx b/include/formula/FormulaOpCodeMapperObj.hxx
index f863697ab514..d04112ed0246 100644
--- a/include/formula/FormulaOpCodeMapperObj.hxx
+++ b/include/formula/FormulaOpCodeMapperObj.hxx
@@ -36,18 +36,14 @@ class FORMULA_DLLPUBLIC FormulaOpCodeMapperObj : public ::cppu::WeakImplHelper2<
::com::sun::star::sheet::XFormulaOpCodeMapper,
::com::sun::star::lang::XServiceInfo >
{
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr<FormulaCompiler> m_pCompiler;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ ::std::unique_ptr<FormulaCompiler> m_pCompiler;
public:
static OUString getImplementationName_Static();
static ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_Static();
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xContext);
protected:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- FormulaOpCodeMapperObj(::std::auto_ptr<FormulaCompiler> _pCompiler);
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ FormulaOpCodeMapperObj(::std::unique_ptr<FormulaCompiler> && _pCompiler);
virtual ~FormulaOpCodeMapperObj();
private:
diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx
index 579d36b3bc49..1b37d5128244 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -147,7 +147,7 @@ namespace formula
virtual void setReferenceInput(const FormEditData* _pData) = 0;
virtual IFunctionManager* getFunctionManager() = 0;
- virtual ::std::auto_ptr<FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList) = 0;
+ virtual ::std::unique_ptr<FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaParser> getFormulaParser() const = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const = 0;
diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx
index ed412c58ac64..cfa13a21d086 100644
--- a/include/formula/formula.hxx
+++ b/include/formula/formula.hxx
@@ -59,9 +59,7 @@ public:
virtual ~FormulaModalDialog();
private:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr<FormulaDlg_Impl> m_pImpl;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ ::std::unique_ptr<FormulaDlg_Impl> m_pImpl;
protected:
@@ -99,9 +97,7 @@ public:
, IControlReferenceHandler* _pDlg = NULL );
virtual ~FormulaDlg();
private:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ::std::auto_ptr<FormulaDlg_Impl> m_pImpl;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ ::std::unique_ptr<FormulaDlg_Impl> m_pImpl;
DECL_LINK( UpdateFocusHdl, void*);
protected:
diff --git a/include/formula/formulahelper.hxx b/include/formula/formulahelper.hxx
index 4bcd8645a2e2..22316bb4beeb 100644
--- a/include/formula/formulahelper.hxx
+++ b/include/formula/formulahelper.hxx
@@ -33,7 +33,7 @@ namespace formula
{
class FORMULA_DLLPUBLIC FormulaHelper
{
- ::std::auto_ptr<SvtSysLocale> m_pSysLocale;
+ ::std::unique_ptr<SvtSysLocale> m_pSysLocale;
const CharClass* m_pCharClass;
const IFunctionManager* m_pFunctionManager;
const sal_Unicode open;
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 5fd26171884f..bb6047d5b891 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -253,20 +253,13 @@ table::CellAddress FormulaDialog::getReferencePosition() const
return table::CellAddress();
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-::std::auto_ptr<formula::FormulaTokenArray> FormulaDialog::convertToTokenArray(const uno::Sequence< sheet::FormulaToken >& _aTokenList)
+::std::unique_ptr<formula::FormulaTokenArray> FormulaDialog::convertToTokenArray(const uno::Sequence< sheet::FormulaToken >& _aTokenList)
{
- ::std::auto_ptr<formula::FormulaTokenArray> pArray(new FormulaTokenArray());
+ ::std::unique_ptr<formula::FormulaTokenArray> pArray(new FormulaTokenArray());
pArray->Fill(_aTokenList, mrStringPool, NULL);
return pArray;
}
} // rptui
-// for mysterious reasons Apple llvm-g++ 4.2.1 needs these explicit
-// template instantiations; otherwise linking fails with unresolved symbols
-template class ::std::auto_ptr<formula::FormulaTokenArray>;
-template std::auto_ptr<formula::FormulaTokenArray>::operator std::auto_ptr_ref<formula::FormulaTokenArray>();
-SAL_WNODEPRECATED_DECLARATIONS_POP
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index 46036de6107a..f6d686747f1e 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -93,7 +93,7 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const SAL_OVERRIDE;
virtual ::com::sun::star::table::CellAddress getReferencePosition() const SAL_OVERRIDE;
- virtual ::std::auto_ptr<formula::FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList) SAL_OVERRIDE;
+ virtual ::std::unique_ptr<formula::FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList) SAL_OVERRIDE;
// IControlReferenceHandler
virtual void ShowReference(const OUString& _sRef) SAL_OVERRIDE;
diff --git a/sc/inc/tokenuno.hxx b/sc/inc/tokenuno.hxx
index 3ca6ec56b050..6c1009ff897d 100644
--- a/sc/inc/tokenuno.hxx
+++ b/sc/inc/tokenuno.hxx
@@ -136,9 +136,7 @@ public:
class ScFormulaOpCodeMapperObj : public formula::FormulaOpCodeMapperObj
{
public:
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- ScFormulaOpCodeMapperObj(::std::auto_ptr<formula::FormulaCompiler> _pCompiler);
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ ScFormulaOpCodeMapperObj(::std::unique_ptr<formula::FormulaCompiler> && _pCompiler);
};
#endif
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index aca2b706c5d7..ea837d460543 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -645,17 +645,11 @@ table::CellAddress ScFormulaDlg::getReferencePosition() const
return table::CellAddress(aCursorPos.Tab(),aCursorPos.Col(),aCursorPos.Row());
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-::std::auto_ptr<formula::FormulaTokenArray> ScFormulaDlg::convertToTokenArray(const uno::Sequence< sheet::FormulaToken >& _aTokenList)
+::std::unique_ptr<formula::FormulaTokenArray> ScFormulaDlg::convertToTokenArray(const uno::Sequence< sheet::FormulaToken >& _aTokenList)
{
- ::std::auto_ptr<formula::FormulaTokenArray> pArray(new ScTokenArray());
+ ::std::unique_ptr<formula::FormulaTokenArray> pArray(new ScTokenArray());
pArray->Fill(_aTokenList, pDoc->GetSharedStringPool(), pDoc->GetExternalRefManager());
return pArray;
}
-// for mysterious reasons Apple llvm-g++ 4.2.1 needs these explicit
-// template instantiations; otherwise linking fails with unresolved symbols
-template class ::std::auto_ptr<formula::FormulaTokenArray>;
-template std::auto_ptr<formula::FormulaTokenArray>::operator std::auto_ptr_ref<formula::FormulaTokenArray>();
-SAL_WNODEPRECATED_DECLARATIONS_POP
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 62d4ebd572d0..66db8807c815 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -76,7 +76,7 @@ public:
virtual OUString getCurrentFormula() const SAL_OVERRIDE;
virtual formula::IFunctionManager* getFunctionManager() SAL_OVERRIDE;
- virtual ::std::auto_ptr<formula::FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList) SAL_OVERRIDE;
+ virtual ::std::unique_ptr<formula::FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaParser> getFormulaParser() const SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const SAL_OVERRIDE;
virtual ::com::sun::star::table::CellAddress getReferencePosition() const SAL_OVERRIDE;
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 74396315a16c..47738aaf2a28 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -491,11 +491,9 @@ bool ScTokenConversion::ConvertToTokenSequence( const ScDocument& rDoc,
return !bError;
}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-ScFormulaOpCodeMapperObj::ScFormulaOpCodeMapperObj(::std::auto_ptr<formula::FormulaCompiler> _pCompiler)
-: formula::FormulaOpCodeMapperObj(_pCompiler)
+ScFormulaOpCodeMapperObj::ScFormulaOpCodeMapperObj(::std::unique_ptr<formula::FormulaCompiler> && _pCompiler)
+: formula::FormulaOpCodeMapperObj(std::move(_pCompiler))
{
}
-SAL_WNODEPRECATED_DECLARATIONS_POP
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */