summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/appenv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/appenv.cxx')
-rw-r--r--sw/source/uibase/app/appenv.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 3f0e1731708a..feca3d5c8e3a 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -135,10 +135,12 @@ OUString InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const OUString& r
static void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId)
{
sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount();
- SwTxtFmtColl* pColl;
for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt )
- if(nCollId == (pColl = &pOldSh->GetTxtFmtColl(nCnt))->GetPoolFmtId())
+ {
+ SwTxtFmtColl* pColl = &pOldSh->GetTxtFmtColl(nCnt);
+ if(nCollId == pColl->GetPoolFmtId())
pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet());
+ }
}
void SwModule::InsertEnv( SfxRequest& rReq )