diff options
-rw-r--r-- | include/svl/style.hxx | 5 | ||||
-rw-r--r-- | sc/inc/stlpool.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/stlpool.cxx | 6 | ||||
-rw-r--r-- | svl/source/items/style.cxx | 13 | ||||
-rw-r--r-- | sw/inc/docstyle.hxx | 3 | ||||
-rw-r--r-- | sw/source/ui/app/docstyle.cxx | 3 |
6 files changed, 11 insertions, 21 deletions
diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 9671bcf67918..9d4b3be2596e 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -61,7 +61,7 @@ SfxSimpleHint(SFX_HINT_DYING) from: SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) from: SfxStyleSheetBasePool::Make( const String& rName, - SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos) + SfxStyleFamily eFam, sal_uInt16 mask) SfxStyleSheetHint( SFX_STYLESHEET_CHANGED, *pNew ) from: SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet ) @@ -234,8 +234,7 @@ public: virtual SfxStyleSheetBase& Make(const OUString&, SfxStyleFamily eFam, - sal_uInt16 nMask = SFXSTYLEBIT_ALL , - sal_uInt16 nPos = 0xffff); + sal_uInt16 nMask = SFXSTYLEBIT_ALL); virtual void Replace( SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget ); diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx index f3abe11b0924..c17b5a69fb9e 100644 --- a/sc/inc/stlpool.hxx +++ b/sc/inc/stlpool.hxx @@ -54,7 +54,7 @@ public: const OUString* GetForceStdName() const { return pForceStdName; } virtual SfxStyleSheetBase& Make( const OUString&, SfxStyleFamily eFam, - sal_uInt16 nMask = SFXSTYLEBIT_ALL, sal_uInt16 nPos = 0xffff ); + sal_uInt16 nMask = SFXSTYLEBIT_ALL) SAL_OVERRIDE; protected: virtual ~ScStyleSheetPool(); diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index da1ddb364d19..3d4cb2c63021 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -81,7 +81,7 @@ void ScStyleSheetPool::SetDocument( ScDocument* pDocument ) //------------------------------------------------------------------------ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName, - SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos ) + SfxStyleFamily eFam, sal_uInt16 mask) { // When updating styles from a template, Office 5.1 sometimes created // files with multiple default styles. @@ -98,11 +98,11 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName, OUString aNewName = ScGlobal::GetRscString(STR_STYLENAME_STANDARD); aNewName += OUString::number( nAdd ); if ( Find( aNewName, eFam ) == NULL ) - return SfxStyleSheetPool::Make( aNewName, eFam, mask, nPos ); + return SfxStyleSheetPool::Make(aNewName, eFam, mask); } } - return SfxStyleSheetPool::Make( rName, eFam, mask, nPos ); + return SfxStyleSheetPool::Make(rName, eFam, mask); } //------------------------------------------------------------------------ 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(); diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 14a7891a8b30..900bbbc596ec 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -197,7 +197,8 @@ public: virtual void Replace( SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget ); - virtual SfxStyleSheetBase& Make(const OUString&, SfxStyleFamily, sal_uInt16 nMask, sal_uInt16 nPos = 0xffff); + virtual SfxStyleSheetBase& Make(const OUString&, SfxStyleFamily, + sal_uInt16 nMask) SAL_OVERRIDE; virtual SfxStyleSheetBase* Find( const OUString&, SfxStyleFamily eFam, sal_uInt16 n=SFXSTYLEBIT_ALL ); diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index 4e55b76a9bb1..dc78296ca79e 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -2053,8 +2053,7 @@ void SAL_CALL SwDocStyleSheetPool::release( ) throw () SfxStyleSheetBase& SwDocStyleSheetPool::Make( const OUString& rName, SfxStyleFamily eFam, - sal_uInt16 _nMask, - sal_uInt16 /*nPos*/ ) + sal_uInt16 _nMask) { mxStyleSheet->PresetName(rName); mxStyleSheet->PresetParent(aEmptyStr); |