diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-07-26 19:34:44 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-07-27 00:45:20 +0200 |
commit | 1ed9d506f8b0cc246c952673a2fff11e8314ba46 (patch) | |
tree | 57085fc2a5a2da3399624a2c56a914c2cfa3a4c3 /svl | |
parent | e039978b5256bfa0c42b1ce546c27326ef052412 (diff) |
SfxStyleSheetBasePool::Make: remove nPos parameter
The only caller who could have used a non-default value was
SfxObjectShell::Insert().
Change-Id: I18174a54a9c0246850dc6347d0147e8640ad101d
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/style.cxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 72519f5cbd1a..1c0465581b5a 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -627,27 +627,18 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create( const SfxStyleSheetBase& r ) return new SfxStyleSheetBase( r ); } -SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const OUString& rName, SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos) +SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const OUString& rName, SfxStyleFamily eFam, sal_uInt16 mask) { OSL_ENSURE( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" ); SfxStyleSheetIterator aIter(this, eFam, mask); rtl::Reference< SfxStyleSheetBase > xStyle( aIter.Find( rName ) ); OSL_ENSURE( !xStyle.is(), "svl::SfxStyleSheetBasePool::Make(), StyleSheet already exists" ); - SfxStyleSheetIterator& rIter = GetIterator_Impl(); if( !xStyle.is() ) { xStyle = Create( rName, eFam, mask ); - if(0xffff == nPos || nPos == aStyles.size() || nPos == rIter.Count()) - { - aStyles.push_back( xStyle ); - } - else - { - rIter[nPos]; - aStyles.insert( aStyles.begin() + rIter.GetPos(), xStyle ); - } + aStyles.push_back(xStyle); Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *xStyle.get() ) ); } return *xStyle.get(); |