summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-06-24 17:32:28 +0200
committerJan Holesovsky <kendy@collabora.com>2014-06-25 20:03:19 +0200
commitc1be76ec98cb465e07df961843134147100beaa9 (patch)
tree3fafb3d147e4ab48d0cc814804bba3f36140ce62 /sw/source/uibase
parentpagedesc: It's better when MakePageDesc returns a pointer. (diff)
downloadcore-c1be76ec98cb465e07df961843134147100beaa9.tar.gz
core-c1be76ec98cb465e07df961843134147100beaa9.zip
pagedesc: Consolidate FindPageDescByName() and FindPageDesc().
Change-Id: I18d570509cd3f3b65a19a12a9df0b1d5db901d04
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docstyle.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 4caf10bda244..fa169f2026a0 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -232,7 +232,7 @@ static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
if (!rName.isEmpty())
{
- pDesc = rDoc.FindPageDescByName( rName );
+ pDesc = rDoc.FindPageDesc(rName);
if( !pDesc && bCreate )
{
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
@@ -528,7 +528,7 @@ void SwDocStyleSheet::SetHidden( bool bValue )
case SFX_STYLE_FAMILY_PAGE:
{
- SwPageDesc* pPgDesc = rDoc.FindPageDescByName( aName );
+ SwPageDesc* pPgDesc = rDoc.FindPageDesc(aName);
if ( pPgDesc )
{
pPgDesc->SetHidden( bValue );
@@ -584,7 +584,7 @@ bool SwDocStyleSheet::IsHidden( ) const
case SFX_STYLE_FAMILY_PAGE:
{
- SwPageDesc* pPgDesc = rDoc.FindPageDescByName( aName );
+ SwPageDesc* pPgDesc = rDoc.FindPageDesc(aName);
bRet = pPgDesc && pPgDesc->IsHidden( );
}
break;
@@ -1074,8 +1074,7 @@ bool SwDocStyleSheet::SetFollow( const OUString& rStr)
? lcl_FindPageDesc(rDoc, rStr)
: 0;
sal_uInt16 nId = 0;
- if( pFollowDesc != pDesc->GetFollow() &&
- rDoc.FindPageDescByName( pDesc->GetName(), &nId ) )
+ if (pFollowDesc != pDesc->GetFollow() && rDoc.FindPageDesc(pDesc->GetName(), &nId))
{
SwPageDesc aDesc( *pDesc );
aDesc.SetFollow( pFollowDesc );
@@ -1390,7 +1389,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
OSL_ENSURE(pDesc, "Where's PageDescriptor");
- if( rDoc.FindPageDescByName( pDesc->GetName(), &nPgDscPos ))
+ if (rDoc.FindPageDesc(pDesc->GetName(), &nPgDscPos))
{
pNewDsc = new SwPageDesc( *pDesc );
// #i48949# - no undo actions for the
@@ -2225,7 +2224,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
break;
case SFX_STYLE_FAMILY_PAGE:
{
- SwPageDesc *pDesc = rDoc.FindPageDescByName(
+ SwPageDesc *pDesc = rDoc.FindPageDesc(
((SwDocStyleSheet&)rTarget).GetPageDesc()->GetName(),
&nPgDscPos );
@@ -2303,8 +2302,8 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
case SFX_STYLE_FAMILY_PAGE :
{
sal_uInt16 nPos;
- if( rDoc.FindPageDescByName( sName, &nPos ))
- rDoc.DelPageDesc( nPos );
+ if (rDoc.FindPageDesc(sName, &nPos))
+ rDoc.DelPageDesc(nPos);
}
break;
@@ -2925,7 +2924,7 @@ void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList,
case nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC:
{
bUsed = rDoc.IsPoolPageDescUsed( nId );
- SwPageDesc* pPgDesc = rDoc.FindPageDescByName( rList[i] );
+ SwPageDesc* pPgDesc = rDoc.FindPageDesc(rList[i]);
bHidden = pPgDesc && pPgDesc->IsHidden( );
}
break;