diff options
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/xeescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xichart.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/xeescher.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlbodyi.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlnexpi.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlnexpi.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmltabi.cxx | 2 |
7 files changed, 12 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 2882cbaece72..b4a41c8a06b1 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1560,7 +1560,7 @@ void XclExpObjectManager::InitStream( bool bTempFile ) } if( !mxDffStrm.get() ) - mxDffStrm = std::make_shared<SvMemoryStream>(); + mxDffStrm = std::make_unique<SvMemoryStream>(); mxDffStrm->SetEndian( SvStreamEndian::LITTLE ); } diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 2dbc8802b627..38a1f84d173b 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -1371,7 +1371,11 @@ XclImpChTextRef XclImpChAttachedLabel::CreateDataLabel( const XclImpChText* pPar const sal_uInt16 EXC_CHATTLABEL_SHOWANYPERCENT = EXC_CHATTLABEL_SHOWPERCENT | EXC_CHATTLABEL_SHOWCATEGPERC; const sal_uInt16 EXC_CHATTLABEL_SHOWANYCATEG = EXC_CHATTLABEL_SHOWCATEG | EXC_CHATTLABEL_SHOWCATEGPERC; - XclImpChTextRef xLabel( pParent ? new XclImpChText( *pParent ) : new XclImpChText( GetChRoot() ) ); + XclImpChTextRef xLabel; + if ( pParent ) + xLabel = std::make_shared<XclImpChText>( *pParent ); + else + xLabel = std::make_shared<XclImpChText>( GetChRoot() ); xLabel->UpdateDataLabel( ::get_flag( mnFlags, EXC_CHATTLABEL_SHOWANYCATEG ), ::get_flag( mnFlags, EXC_CHATTLABEL_SHOWANYVALUE ), diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index b1b61a5feab1..3d5e43a50d69 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -420,7 +420,7 @@ private: private: std::shared_ptr< ::utl::TempFile > mxTempFile; - std::shared_ptr< SvStream > mxDffStrm; + std::unique_ptr< SvStream > mxDffStrm; std::shared_ptr< XclEscherEx > mxEscherEx; rtl::Reference< XclExpObjList > mxObjList; }; diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx index b1c687d0befa..81bf3e95124f 100644 --- a/sc/source/filter/xml/xmlbodyi.cxx +++ b/sc/source/filter/xml/xmlbodyi.cxx @@ -165,7 +165,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL case XML_ELEMENT( TABLE, XML_NAMED_EXPRESSIONS ): pContext = new ScXMLNamedExpressionsContext ( GetScImport(), - new ScXMLNamedExpressionsContext::GlobalInserter(GetScImport()) ); + std::make_shared<ScXMLNamedExpressionsContext::GlobalInserter>(GetScImport()) ); break; case XML_ELEMENT( TABLE, XML_DATABASE_RANGES ): pContext = new ScXMLDatabaseRangesContext ( GetScImport() ); diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx index d4a37757aa06..91f705b84625 100644 --- a/sc/source/filter/xml/xmlnexpi.cxx +++ b/sc/source/filter/xml/xmlnexpi.cxx @@ -44,9 +44,9 @@ void ScXMLNamedExpressionsContext::SheetLocalInserter::insert(ScMyNamedExpressio ScXMLNamedExpressionsContext::ScXMLNamedExpressionsContext( ScXMLImport& rImport, - Inserter* pInserter ) : + std::shared_ptr<Inserter> pInserter ) : ScXMLImportContext( rImport ), - mpInserter(pInserter) + mpInserter(std::move(pInserter)) { rImport.LockSolarMutex(); } diff --git a/sc/source/filter/xml/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx index 7dc5f138e24f..c0d00826a7a0 100644 --- a/sc/source/filter/xml/xmlnexpi.hxx +++ b/sc/source/filter/xml/xmlnexpi.hxx @@ -69,7 +69,7 @@ public: ScXMLNamedExpressionsContext( ScXMLImport& rImport, - Inserter* pInserter ); + std::shared_ptr<Inserter> pInserter ); virtual ~ScXMLNamedExpressionsContext() override; diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index fe7e0ad392e1..25600dbfc62b 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -279,7 +279,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SCTAB nTab = GetScImport().GetTables().GetCurrentSheet(); pContext = new ScXMLNamedExpressionsContext( GetScImport(), - new ScXMLNamedExpressionsContext::SheetLocalInserter(GetScImport(), nTab)); + std::make_shared<ScXMLNamedExpressionsContext::SheetLocalInserter>(GetScImport(), nTab)); } break; case XML_ELEMENT( TABLE, XML_TABLE_COLUMN_GROUP ): |