summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svl/style.hxx2
-rw-r--r--sc/source/core/data/patattr.cxx2
-rw-r--r--sc/source/core/data/stlsheet.cxx2
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx2
-rw-r--r--svl/source/items/style.cxx4
-rw-r--r--sw/inc/docstyle.hxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx5
8 files changed, 11 insertions, 10 deletions
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 6f328a2b7143..4bf91c357765 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -255,7 +255,7 @@ public:
SfxItemPool& GetPool() { return rPool;}
const SfxItemPool& GetPool() const { return rPool;}
- virtual std::shared_ptr<SfxStyleSheetIterator> CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask);
+ virtual std::unique_ptr<SfxStyleSheetIterator> CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask);
sal_uInt16 Count();
SfxStyleSheetBase* operator[](sal_uInt16 nIdx);
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 70070fa52ac4..9dbf1bf83773 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -1173,7 +1173,7 @@ void ScPatternAttr::UpdateStyleSheet(const ScDocument* pDoc)
// Assumes that "Standard" is always the 1st entry!
if (!pStyle)
{
- std::shared_ptr<SfxStyleSheetIterator> pIter = pDoc->GetStyleSheetPool()->CreateIterator( SfxStyleFamily::Para, SfxStyleSearchBits::All );
+ std::unique_ptr<SfxStyleSheetIterator> pIter = pDoc->GetStyleSheetPool()->CreateIterator( SfxStyleFamily::Para, SfxStyleSearchBits::All );
pStyle = dynamic_cast< ScStyleSheet* >(pIter->First());
}
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index d9a42eb06778..21c24e4ec913 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -97,7 +97,7 @@ bool ScStyleSheet::SetParent( const OUString& rParentName )
SfxStyleSheetBase* pStyle = m_pPool->Find( aEffName, nFamily );
if (!pStyle)
{
- std::shared_ptr<SfxStyleSheetIterator> pIter = m_pPool->CreateIterator( nFamily, SfxStyleSearchBits::All );
+ std::unique_ptr<SfxStyleSheetIterator> pIter = m_pPool->CreateIterator( nFamily, SfxStyleSearchBits::All );
pStyle = pIter->First();
if (pStyle)
aEffName = pStyle->GetName();
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index b4c7e7a8808c..eeb50130fbbc 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -86,7 +86,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP,
const SfxItemPool* pEditPool(rExportP.GetDocument()->GetEditPool());
AddFontItems(aEditWhichIds, 3, pEditPool, false);
- std::shared_ptr<SfxStyleSheetIterator> pItr = rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SfxStyleFamily::Page, SfxStyleSearchBits::All);
+ std::unique_ptr<SfxStyleSheetIterator> pItr = rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SfxStyleFamily::Page, SfxStyleSearchBits::All);
m_bEmbedUsedOnly = rExportP.GetDocument()->IsEmbedUsedFontsOnly();
m_bEmbedLatinScript = rExportP.GetDocument()->IsEmbedFontScriptLatin();
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 01873c282455..5856393f57e9 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -613,13 +613,13 @@ void SfxStyleSheetBasePool::SetSearchMask(SfxStyleFamily eFam, SfxStyleSearchBit
}
-std::shared_ptr<SfxStyleSheetIterator> SfxStyleSheetBasePool::CreateIterator
+std::unique_ptr<SfxStyleSheetIterator> SfxStyleSheetBasePool::CreateIterator
(
SfxStyleFamily eFam,
SfxStyleSearchBits mask
)
{
- return std::make_shared<SfxStyleSheetIterator>(this,eFam,mask);
+ return o3tl::make_unique<SfxStyleSheetIterator>(this,eFam,mask);
}
SfxStyleSheetBase* SfxStyleSheetBasePool::Create
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 85c7fa4ea558..0e159ac881ca 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -216,7 +216,7 @@ public:
bool IsOrganizerMode() const { return bOrganizer; }
- virtual std::shared_ptr<SfxStyleSheetIterator> CreateIterator( SfxStyleFamily, SfxStyleSearchBits nMask ) override;
+ virtual std::unique_ptr<SfxStyleSheetIterator> CreateIterator( SfxStyleFamily, SfxStyleSearchBits nMask ) override;
SwDoc& GetDoc() const { return rDoc; }
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index e126864d756d..1f341cad9b35 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -863,7 +863,7 @@ uno::Sequence<OUString> XStyleFamily::getElementNames()
if(!m_pBasePool)
throw uno::RuntimeException();
std::vector<OUString> vRet;
- std::shared_ptr<SfxStyleSheetIterator> pIt = m_pBasePool->CreateIterator(m_rEntry.m_eFamily, SfxStyleSearchBits::All);
+ std::unique_ptr<SfxStyleSheetIterator> pIt = m_pBasePool->CreateIterator(m_rEntry.m_eFamily, SfxStyleSearchBits::All);
for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = pIt->Next())
{
OUString sName;
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 2dd0be561f25..0abb4e461d3e 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -68,6 +68,7 @@
#include <svx/xflftrit.hxx>
#include <svx/svdmodel.hxx>
#include <svx/drawitem.hxx>
+#include <o3tl/make_unique.hxx>
// The Format names in the list of all names have the
// following family as their first character:
@@ -2430,9 +2431,9 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const OUString &,
return nullptr;
}
-std::shared_ptr<SfxStyleSheetIterator> SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, SfxStyleSearchBits _nMask )
+std::unique_ptr<SfxStyleSheetIterator> SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, SfxStyleSearchBits _nMask )
{
- return std::shared_ptr<SfxStyleSheetIterator>(new SwStyleSheetIterator( this, eFam, _nMask ));
+ return o3tl::make_unique<SwStyleSheetIterator>( this, eFam, _nMask );
}
void SwDocStyleSheetPool::dispose()