summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docfmt.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-06-24 13:09:14 +0200
committerJan Holesovsky <kendy@collabora.com>2014-06-25 20:03:19 +0200
commitf246ac13bd1a12e11eba03cbe3c62ea77293e02e (patch)
tree3318aeeffb67eaf754b1011838140bcab66f8d27 /sw/source/core/doc/docfmt.cxx
parent211e07c0e02ebfe9cea4b5d97b614a23f8b2012c (diff)
pagedesc: It's better when MakePageDesc returns a pointer.
This removes many uses of GetPageDesc(sal_uInt16). Change-Id: I9660e30d7fccd4336422ba03b19087321a7ae973
Diffstat (limited to 'sw/source/core/doc/docfmt.cxx')
-rw-r--r--sw/source/core/doc/docfmt.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 39515aefa85f..312c6c50446f 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1982,7 +1982,7 @@ void SwDoc::CopyFmtArr( const SwFmtsBase& rSourceArr,
SwPageDesc* pPageDesc = ::lcl_FindPageDesc( maPageDescs, rNm );
if( !pPageDesc )
{
- pPageDesc = maPageDescs[ MakePageDesc( rNm ) ];
+ pPageDesc = MakePageDesc(rNm);
}
aPageDesc.RegisterToPageDesc( *pPageDesc );
SwAttrSet aTmpAttrSet( pSrc->GetAttrSet() );
@@ -2111,8 +2111,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
if( !pFollow )
{
// copy
- sal_uInt16 nPos = MakePageDesc( rSrcDesc.GetFollow()->GetName() );
- pFollow = maPageDescs[ nPos ];
+ pFollow = MakePageDesc(rSrcDesc.GetFollow()->GetName());
CopyPageDesc( *rSrcDesc.GetFollow(), *pFollow );
}
rDstDesc.SetFollow( pFollow );