diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index c279deb63993..32a0cb1e6392 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -110,7 +110,7 @@ using namespace xmloff::token; ScXMLTableRowCellContext::ParaFormat::ParaFormat(ScEditEngineDefaulter& rEditEngine) : maItemSet(rEditEngine.GetEmptyItemSet()) {} -ScXMLTableRowCellContext::Field::Field(SvxFieldData* pData) : mpData(pData) {} +ScXMLTableRowCellContext::Field::Field(std::unique_ptr<SvxFieldData> pData) : mpData(std::move(pData)) {} ScXMLTableRowCellContext::Field::~Field() { @@ -325,10 +325,10 @@ void ScXMLTableRowCellContext::PushParagraphSpan(const OUString& rSpan, const OU PushFormat(nBegin, nEnd, rStyleName); } -void ScXMLTableRowCellContext::PushParagraphField(SvxFieldData* pData, const OUString& rStyleName) +void ScXMLTableRowCellContext::PushParagraphField(std::unique_ptr<SvxFieldData> pData, const OUString& rStyleName) { mbHasFormatRuns = true; - maFields.push_back(o3tl::make_unique<Field>(pData)); + maFields.push_back(o3tl::make_unique<Field>(std::move(pData))); Field& rField = *maFields.back().get(); sal_Int32 nPos = maParagraph.getLength(); @@ -583,27 +583,27 @@ OUString ScXMLTableRowCellContext::GetFirstParagraph() const void ScXMLTableRowCellContext::PushParagraphFieldDate(const OUString& rStyleName) { - PushParagraphField(new SvxDateField, rStyleName); + PushParagraphField(o3tl::make_unique<SvxDateField>(), rStyleName); } void ScXMLTableRowCellContext::PushParagraphFieldSheetName(const OUString& rStyleName) { SCTAB nTab = GetScImport().GetTables().GetCurrentCellPos().Tab(); - PushParagraphField(new SvxTableField(nTab), rStyleName); + PushParagraphField(o3tl::make_unique<SvxTableField>(nTab), rStyleName); } void ScXMLTableRowCellContext::PushParagraphFieldDocTitle(const OUString& rStyleName) { - PushParagraphField(new SvxFileField, rStyleName); + PushParagraphField(o3tl::make_unique<SvxFileField>(), rStyleName); } void ScXMLTableRowCellContext::PushParagraphFieldURL( const OUString& rURL, const OUString& rRep, const OUString& rStyleName, const OUString& rTargetFrame) { OUString aAbsURL = GetScImport().GetAbsoluteReference(rURL); - SvxURLField* pURLField = new SvxURLField(aAbsURL, rRep, SvxURLFormat::Repr); + std::unique_ptr<SvxURLField> pURLField(new SvxURLField(aAbsURL, rRep, SvxURLFormat::Repr)); pURLField->SetTargetFrame(rTargetFrame); - PushParagraphField(pURLField, rStyleName); + PushParagraphField(std::move(pURLField), rStyleName); } void ScXMLTableRowCellContext::PushParagraphEnd() diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index 0e567e051910..00f4122cdf3a 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -48,13 +48,13 @@ class ScXMLTableRowCellContext : public ScXMLImportContext struct Field { - tools::SvRef<SvxFieldData> mpData; + std::unique_ptr<SvxFieldData> mpData; ESelection maSelection; Field(const Field&) = delete; const Field& operator=(const Field&) = delete; - explicit Field(SvxFieldData* pData); + explicit Field(std::unique_ptr<SvxFieldData> pData); ~Field(); }; @@ -121,7 +121,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext bool IsPossibleErrorString() const; - void PushParagraphField(SvxFieldData* pData, const OUString& rStyleName); + void PushParagraphField(std::unique_ptr<SvxFieldData> pData, const OUString& rStyleName); void PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, const OUString& rStyleName); diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 77856751701d..c75f351b9641 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -167,7 +167,7 @@ class ScUnoEditEngine : public ScEditEngineDefaulter ScUnoCollectMode eMode; sal_uInt16 nFieldCount; sal_Int32 mnFieldType; - tools::SvRef<SvxFieldData> + std::unique_ptr<SvxFieldData> pFound; // local copy sal_Int32 nFieldPar; sal_Int32 nFieldPos; |