diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/cellvalues.cxx | 5 | ||||
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/dbdata.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/graphsh.cxx | 5 |
6 files changed, 12 insertions, 8 deletions
diff --git a/sc/source/core/data/cellvalues.cxx b/sc/source/core/data/cellvalues.cxx index d6536879c3e1..867bac4fca2a 100644 --- a/sc/source/core/data/cellvalues.cxx +++ b/sc/source/core/data/cellvalues.cxx @@ -10,6 +10,7 @@ #include <cellvalues.hxx> #include <column.hxx> #include <cellvalue.hxx> +#include <o3tl/make_unique.hxx> #include <cassert> @@ -265,10 +266,10 @@ struct TableValues::Impl for (size_t nTab = 0; nTab < nTabs; ++nTab) { - m_Tables.push_back(std::unique_ptr<TableType>(new TableType)); + m_Tables.push_back(o3tl::make_unique<TableType>()); std::unique_ptr<TableType>& rTab2 = m_Tables.back(); for (size_t nCol = 0; nCol < nCols; ++nCol) - rTab2.get()->push_back(std::unique_ptr<CellValues>(new CellValues)); + rTab2.get()->push_back(o3tl::make_unique<CellValues>()); } } diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index fd5c203701ef..0ef57f5990c4 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -320,7 +320,7 @@ ScColorScaleFormat::ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleForma { for(ScColorScaleEntries::const_iterator itr = rFormat.begin(); itr != rFormat.end(); ++itr) { - maColorScales.push_back(std::unique_ptr<ScColorScaleEntry>(new ScColorScaleEntry(pDoc, **itr))); + maColorScales.push_back(o3tl::make_unique<ScColorScaleEntry>(pDoc, **itr)); } } diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 64934400d6c9..7206a2e8a315 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -72,6 +72,7 @@ #include <vector> #include <boost/checked_delete.hpp> #include <mdds/flat_segment_tree.hpp> +#include <o3tl/make_unique.hxx> using namespace ::com::sun::star; @@ -722,7 +723,7 @@ void fillSortedColumnArray( // In the sorted column container, element positions and row // positions must match, else formula cells may mis-behave during // grouping. - aSortedCols.push_back(std::unique_ptr<SortedColumn>(new SortedColumn(nRow1))); + aSortedCols.push_back(o3tl::make_unique<SortedColumn>(nRow1)); } for (size_t i = 0; i < pRows->size(); ++i) diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index fcf56eaaffbd..1d62a479981b 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -35,6 +35,7 @@ #include "brdcst.hxx" #include <comphelper/stl_types.hxx> +#include <o3tl/make_unique.hxx> #include <memory> #include <utility> @@ -1279,7 +1280,7 @@ ScDBCollection::AnonDBs::AnonDBs(AnonDBs const& r) m_DBs.reserve(r.m_DBs.size()); for (auto const& it : r.m_DBs) { - m_DBs.push_back(std::unique_ptr<ScDBData>(new ScDBData(*it))); + m_DBs.push_back(o3tl::make_unique<ScDBData>(*it)); } } diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index c3970749c9f4..a094f04512f6 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -2356,7 +2356,7 @@ bool ScHTMLTable::IsSpaceCharInfo( const ImportInfo& rInfo ) ScHTMLTable::ScHTMLEntryPtr ScHTMLTable::CreateEntry() const { - return ScHTMLEntryPtr( new ScHTMLEntry( GetCurrItemSet() ) ); + return o3tl::make_unique<ScHTMLEntry>( GetCurrItemSet() ); } void ScHTMLTable::CreateNewEntry( const ImportInfo& rInfo ) diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index c3242c53bdac..1632fd067d81 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <o3tl/make_unique.hxx> #include <sfx2/app.hxx> #include <sfx2/objface.hxx> #include <sfx2/request.hxx> @@ -164,8 +165,8 @@ void ScGraphicShell::ExecuteExternalEdit( SfxRequest& ) if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { GraphicObject aGraphicObject( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() ); - m_ExternalEdits.push_back( std::unique_ptr<SdrExternalToolEdit>( - new SdrExternalToolEdit(pView, pObj))); + m_ExternalEdits.push_back( o3tl::make_unique<SdrExternalToolEdit>( + pView, pObj)); m_ExternalEdits.back()->Edit( &aGraphicObject ); } } |