summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-07-15 19:28:17 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2014-09-30 09:56:32 +0200
commit234fbca684c4e355908cfa083eddf2be3d081cd1 (patch)
tree3cc5269e0d67d0ce6c2428f2542679df9d5aa4db
parent2a23c8d4366b9f4560c9b14c8ec562d8b5c4aa2c (diff)
Rename SwDoc::FindPageDesc to FindPageDescByName
Both functions were consolidated in commit c1be76ec98cb465e07df961843134147100beaa9 Now re-rename it to introduce FindPageDescByPoolId later. (cherry picked from commit 3a696e7af2ed8bef1cc2be9a731fe2bd92e87aa7) Conflicts: sw/source/core/layout/pagedesc.cxx sw/source/core/unocore/unostyle.cxx sw/source/filter/ww8/rtfexport.cxx sw/source/uibase/app/docstyle.cxx Change-Id: I6b96b322eb133615e3a2c692fb7f655d6f22fc8f
-rw-r--r--sw/inc/doc.hxx4
-rw-r--r--sw/source/core/attr/swatrset.cxx2
-rw-r--r--sw/source/core/doc/docdesc.cxx14
-rw-r--r--sw/source/core/doc/docnew.cxx2
-rw-r--r--sw/source/core/frmedt/fedesc.cxx2
-rw-r--r--sw/source/core/layout/pagedesc.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx4
-rw-r--r--sw/source/core/view/vprint.cxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx2
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx2
-rw-r--r--sw/source/ui/app/docstyle.cxx16
11 files changed, 26 insertions, 26 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index d74de8974d70..d9628a93abc2 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1352,8 +1352,8 @@ public:
sal_uInt16 GetPageDescCnt() const { return maPageDescs.size(); }
const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *maPageDescs[i]; }
SwPageDesc& GetPageDesc( sal_uInt16 i ) { return *maPageDescs[i]; }
- SwPageDesc* FindPageDesc( const OUString& rName, sal_uInt16* pPos = 0 ) const;
- SwPageDesc* FindPageDesc( const OUString& rName, sal_uInt16* pPos = 0 );
+ SwPageDesc* FindPageDescByName( const OUString& rName, sal_uInt16* pPos = 0 ) const;
+ SwPageDesc* FindPageDescByName( const OUString& rName, sal_uInt16* pPos = 0 );
/** Copy the complete PageDesc - beyond document and "deep"!
Optionally copying of PoolFmtId, -HlpId can be prevented. */
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index dbb28e700267..aa7ba15cff3b 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -307,7 +307,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
{
SfxItemSet aTmpSet( *this );
- SwPageDesc* pDstPgDesc = pDstDoc->FindPageDesc(pPgDesc->GetName());
+ SwPageDesc* pDstPgDesc = pDstDoc->FindPageDescByName(pPgDesc->GetName());
if( !pDstPgDesc )
{
pDstPgDesc = pDstDoc->MakePageDesc(pPgDesc->GetName());
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index c0cae8e809c3..184ae52cc8a7 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -824,7 +824,7 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
return 0;
}
-static SwPageDesc* lcl_FindPageDesc( SwPageDescs *maPageDescs, const OUString & rName, sal_uInt16* pPos )
+static SwPageDesc* lcl_FindPageDescByName( SwPageDescs *maPageDescs, const OUString & rName, sal_uInt16* pPos )
{
SwPageDescs::const_iterator it = maPageDescs->find( rName );
SwPageDesc* res = NULL;
@@ -838,21 +838,21 @@ static SwPageDesc* lcl_FindPageDesc( SwPageDescs *maPageDescs, const OUString &
return res;
}
-SwPageDesc* SwDoc::FindPageDesc( const OUString & rName, sal_uInt16* pPos )
+SwPageDesc* SwDoc::FindPageDescByName( const OUString & rName, sal_uInt16* pPos )
{
- return lcl_FindPageDesc( &maPageDescs, rName, pPos );
+ return lcl_FindPageDescByName( &maPageDescs, rName, pPos );
}
-SwPageDesc* SwDoc::FindPageDesc( const OUString & rName, sal_uInt16* pPos ) const
+SwPageDesc* SwDoc::FindPageDescByName( const OUString & rName, sal_uInt16* pPos ) const
{
- return lcl_FindPageDesc( const_cast <SwPageDescs *>( &maPageDescs ), rName, pPos );
+ return lcl_FindPageDescByName( const_cast <SwPageDescs *>( &maPageDescs ), rName, pPos );
}
void SwDoc::DelPageDesc( const String & rName, bool bBroadcast )
{
sal_uInt16 nI;
- if (FindPageDesc(rName, &nI))
+ if (FindPageDescByName(rName, &nI))
DelPageDesc(nI, bBroadcast);
}
@@ -860,7 +860,7 @@ void SwDoc::ChgPageDesc( const String & rName, const SwPageDesc & rDesc)
{
sal_uInt16 nI;
- if (FindPageDesc(rName, &nI))
+ if (FindPageDescByName(rName, &nI))
ChgPageDesc(nI, rDesc);
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 6fee0c3f2587..d5841dd1c259 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -853,7 +853,7 @@ void SwDoc::ClearDoc()
// remove the dummy pagedesc from the array and delete all the old ones
sal_uInt16 nDummyPgDsc = 0;
- if (FindPageDesc(pDummyPgDsc->GetName(), &nDummyPgDsc))
+ if (FindPageDescByName(pDummyPgDsc->GetName(), &nDummyPgDsc))
maPageDescs.erase(maPageDescs.begin() + nDummyPgDsc);
// remove the dummy pagedec from the array and delete all the old ones
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index 4993336c2862..0dee36fef7a4 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -149,7 +149,7 @@ SwPageDesc* SwFEShell::FindPageDescByName( const String& rName,
sal_Bool bGetFromPool,
sal_uInt16* pPos )
{
- SwPageDesc* pDesc = GetDoc()->FindPageDesc(rName, pPos);
+ SwPageDesc* pDesc = GetDoc()->FindPageDescByName(rName, pPos);
if( !pDesc && bGetFromPool )
{
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 7f46874c736d..61d3d1af24d9 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -534,7 +534,7 @@ SwPageDescExt::operator SwPageDesc() const
{
SwPageDesc aResult(aPageDesc);
- SwPageDesc * pPageDesc = pDoc->FindPageDesc(sFollow);
+ SwPageDesc * pPageDesc = pDoc->FindPageDescByName(sFollow);
if ( 0 != pPageDesc )
aResult.SetFollow(pPageDesc);
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 0411ec675eb0..4aad9b32adfa 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2659,7 +2659,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
case SFX_STYLE_FAMILY_FRAME: pTargetFmt = xStyle->GetFrmFmt(); break;
case SFX_STYLE_FAMILY_PAGE:
{
- SwPageDesc *pDesc = m_pDoc->FindPageDesc(xStyle->GetPageDesc()->GetName());
+ SwPageDesc *pDesc = m_pDoc->FindPageDescByName(xStyle->GetPageDesc()->GetName());
if( pDesc )
pTargetFmt = &pDesc->GetMaster();
}
@@ -2744,7 +2744,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
break;
case SFX_STYLE_FAMILY_PAGE:
{
- SwPageDesc *pDesc = m_pDoc->FindPageDesc(xStyle->GetPageDesc()->GetName(), &nPgDscPos);
+ SwPageDesc *pDesc = m_pDoc->FindPageDescByName(xStyle->GetPageDesc()->GetName(), &nPgDscPos);
if( pDesc )
{
pTargetFmt = &pDesc->GetMaster();
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index d582d1044815..6cea260e3b43 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -372,7 +372,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
OSL_ENSURE( pPage, "no page found!" );
// get page descriptor - fall back to the first one if pPage could not be found
- const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDesc(
+ const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
pPage->GetPageDesc()->GetName() ) : &pPrtDoc->GetPageDesc( (sal_uInt16)0 );
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index ac20270adec1..c98b78020505 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -564,7 +564,7 @@ void RtfExport::ExportDocument_Impl()
pSttPgDsc = (SwFmtPageDesc*)&pSet->Get( RES_PAGEDESC );
if( !pSttPgDsc->GetPageDesc() )
pSttPgDsc = 0;
- else if( pDoc->FindPageDesc( pSttPgDsc->
+ else if( pDoc->FindPageDescByName( pSttPgDsc->
GetPageDesc()->GetName(), &nPosInDoc ))
{
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCNO;
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index ee7dfccd778b..7eb47f1d4cf0 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -647,7 +647,7 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc()
sName,
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC,
true);
- SwPageDesc *pPageDesc = pDoc->FindPageDesc(sName);
+ SwPageDesc *pPageDesc = pDoc->FindPageDescByName(sName);
if( !pPageDesc )
{
// If the page style is a pool style, then we maybe have to create it
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 6053d644832d..1c6528ef201b 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -229,7 +229,7 @@ static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
if( rName.Len() )
{
- pDesc = rDoc.FindPageDesc(rName);
+ pDesc = rDoc.FindPageDescByName(rName);
if( !pDesc && bCreate )
{
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
@@ -453,7 +453,7 @@ void SwDocStyleSheet::SetHidden( sal_Bool bValue )
case SFX_STYLE_FAMILY_PAGE:
{
- SwPageDesc* pPgDesc = rDoc.FindPageDesc(aName);
+ SwPageDesc* pPgDesc = rDoc.FindPageDescByName(aName);
if ( pPgDesc )
{
pPgDesc->SetHidden( bValue );
@@ -509,7 +509,7 @@ sal_Bool SwDocStyleSheet::IsHidden( ) const
case SFX_STYLE_FAMILY_PAGE:
{
- SwPageDesc* pPgDesc = rDoc.FindPageDesc(aName);
+ SwPageDesc* pPgDesc = rDoc.FindPageDescByName(aName);
bRet = pPgDesc && pPgDesc->IsHidden( );
}
break;
@@ -1004,7 +1004,7 @@ bool SwDocStyleSheet::SetFollow( const String& rStr)
? lcl_FindPageDesc(rDoc, rStr)
: 0;
sal_uInt16 nId;
- if (pFollowDesc != pDesc->GetFollow() && rDoc.FindPageDesc(pDesc->GetName(), &nId))
+ if (pFollowDesc != pDesc->GetFollow() && rDoc.FindPageDescByName(pDesc->GetName(), &nId))
{
SwPageDesc aDesc( *pDesc );
aDesc.SetFollow( pFollowDesc );
@@ -1303,7 +1303,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
OSL_ENSURE(pDesc, "Where's PageDescriptor");
- if (rDoc.FindPageDesc(pDesc->GetName(), &nPgDscPos))
+ if (rDoc.FindPageDescByName(pDesc->GetName(), &nPgDscPos))
{
pNewDsc = new SwPageDesc( *pDesc );
// #i48949# - no undo actions for the
@@ -2144,7 +2144,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
pSourceFmt = &((SwDocStyleSheet&)rSource).GetPageDesc()
->GetMaster();
{
- SwPageDesc *pDesc = rDoc.FindPageDesc(
+ SwPageDesc *pDesc = rDoc.FindPageDescByName(
((SwDocStyleSheet&)rTarget).GetPageDesc()->GetName(),
&nPgDscPos );
@@ -2222,7 +2222,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
case SFX_STYLE_FAMILY_PAGE :
{
sal_uInt16 nPos;
- if (rDoc.FindPageDesc(rName, &nPos))
+ if (rDoc.FindPageDescByName(rName, &nPos))
rDoc.DelPageDesc(nPos);
}
break;
@@ -2845,7 +2845,7 @@ void SwStyleSheetIterator::AppendStyleList(const boost::ptr_vector<String>& rLis
case nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC:
{
bUsed = rDoc.IsPoolPageDescUsed( nId );
- SwPageDesc* pPgDesc = rDoc.FindPageDesc(rList[i]);
+ SwPageDesc* pPgDesc = rDoc.FindPageDescByName(rList[i]);
bHidden = pPgDesc && pPgDesc->IsHidden( );
}
break;