diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-06 09:11:44 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-06 13:14:08 +0000 |
commit | 032c0ec6b18718dc2bde580ced9781048a2fdbb9 (patch) | |
tree | 4079ce5acbfe57705195d9531cb81b816e4ee3a9 /sw | |
parent | 593206bda7ae6b522a5f29aef25445722aedeb4c (diff) |
loplugin:unusedmethods svl
Change-Id: Ic136cce6abef44291b7236a6d709f0eee391f311
Reviewed-on: https://gerrit.libreoffice.org/16784
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/docstyle.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 99 |
2 files changed, 0 insertions, 102 deletions
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 1298cc618467..05076412653c 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -122,7 +122,6 @@ public: virtual bool HasFollowSupport() const SAL_OVERRIDE; virtual bool HasParentSupport() const SAL_OVERRIDE; virtual bool HasClearParentSupport() const SAL_OVERRIDE; - virtual OUString GetDescription() SAL_OVERRIDE; virtual OUString GetDescription(SfxMapUnit eUnit) SAL_OVERRIDE; SwCharFormat* GetCharFormat(); @@ -199,8 +198,6 @@ class SwDocStyleSheetPool : public SfxStyleSheetBasePool public: SwDocStyleSheetPool( SwDoc&, bool bOrganizer = false ); - virtual void Replace( SfxStyleSheetBase& rSource, - SfxStyleSheetBase& rTarget ) SAL_OVERRIDE; virtual SfxStyleSheetBase& Make(const OUString&, SfxStyleFamily, sal_uInt16 nMask) SAL_OVERRIDE; diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 6aeb0fbfb5f5..6c1411a0f4ea 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -935,11 +935,6 @@ OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) return SfxStyleSheetBase::GetDescription(eUnit); } -OUString SwDocStyleSheet::GetDescription() -{ - return GetDescription(SFX_MAPUNIT_CM); -} - // Set names bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow) { @@ -2239,100 +2234,6 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const OUString &, return NULL; } -void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, - SfxStyleSheetBase& rTarget ) -{ - SfxStyleFamily eFamily( rSource.GetFamily() ); - if( rSource.HasParentSupport()) - { - const OUString sParentName = rSource.GetParent(); - if (!sParentName.isEmpty()) - { - SfxStyleSheetBase* pParentOfNew = Find( sParentName, eFamily ); - if( pParentOfNew ) - rTarget.SetParent( sParentName ); - } - } - if( rSource.HasFollowSupport()) - { - const OUString sFollowName = rSource.GetFollow(); - if (!sFollowName.isEmpty()) - { - SfxStyleSheetBase* pFollowOfNew = Find( sFollowName, eFamily ); - if( pFollowOfNew ) - rTarget.SetFollow( sFollowName ); - } - } - - SwImplShellAction aTmpSh( rDoc ); - - bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName(); - if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool ) - { - // deal with separately! - SwPageDesc* pDestDsc = - const_cast<SwPageDesc*>(static_cast<SwDocStyleSheet&>(rTarget).GetPageDesc()); - SwPageDesc* pCpyDsc = - const_cast<SwPageDesc*>(static_cast<SwDocStyleSheet&>(rSource).GetPageDesc()); - rDoc.CopyPageDesc( *pCpyDsc, *pDestDsc ); - } - else - { - const SwFormat *pSourceFormat = 0; - SwFormat *pTargetFormat = 0; - size_t nPgDscPos = SIZE_MAX; - switch( eFamily ) - { - case SFX_STYLE_FAMILY_CHAR : - if( bSwSrcPool ) - pSourceFormat = static_cast<SwDocStyleSheet&>(rSource).GetCharFormat(); - pTargetFormat = static_cast<SwDocStyleSheet&>(rTarget).GetCharFormat(); - break; - case SFX_STYLE_FAMILY_PARA : - if( bSwSrcPool ) - pSourceFormat = static_cast<SwDocStyleSheet&>(rSource).GetCollection(); - pTargetFormat = static_cast<SwDocStyleSheet&>(rTarget).GetCollection(); - break; - case SFX_STYLE_FAMILY_FRAME: - if( bSwSrcPool ) - pSourceFormat = static_cast<SwDocStyleSheet&>(rSource).GetFrameFormat(); - pTargetFormat = static_cast<SwDocStyleSheet&>(rTarget).GetFrameFormat(); - break; - case SFX_STYLE_FAMILY_PAGE: - { - SwPageDesc *pDesc = rDoc.FindPageDesc( - static_cast<SwDocStyleSheet&>(rTarget).GetPageDesc()->GetName(), - &nPgDscPos ); - - if( pDesc ) - pTargetFormat = &pDesc->GetMaster(); - } - break; - case SFX_STYLE_FAMILY_PSEUDO: - // A NumRule only consists of one Item, so nothing has - // to be deleted here. - break; - default:; //prevent warning - } - if( pTargetFormat ) - { - if( pSourceFormat ) - pTargetFormat->DelDiffs( *pSourceFormat ); - else if( SIZE_MAX != nPgDscPos ) - pTargetFormat->ResetFormatAttr( RES_PAGEDESC, RES_FRMATR_END-1 ); - else - { - // #i73790# - method renamed - pTargetFormat->ResetAllFormatAttr(); - } - if( SIZE_MAX != nPgDscPos ) - rDoc.ChgPageDesc( nPgDscPos, - rDoc.GetPageDesc(nPgDscPos) ); - } - static_cast<SwDocStyleSheet&>(rTarget).SetItemSet( rSource.GetItemSet() ); - } -} - SfxStyleSheetIteratorPtr SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, sal_uInt16 _nMask ) { return SfxStyleSheetIteratorPtr(new SwStyleSheetIterator( this, eFam, _nMask )); |