summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/calcmove.cxx7
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/layact.cxx2
-rw-r--r--sw/source/core/layout/laycache.cxx16
-rw-r--r--sw/source/core/layout/layhelp.hxx4
-rw-r--r--sw/source/core/layout/makefile.mk1
-rw-r--r--sw/source/core/layout/pagechg.cxx7
-rw-r--r--sw/source/core/layout/paintfrm.cxx28
-rw-r--r--sw/source/core/layout/trvlfrm.cxx6
-rw-r--r--sw/source/core/layout/unusedf.cxx4
10 files changed, 33 insertions, 44 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 28287c957ad1..5cd97d1a1d26 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1004,10 +1004,11 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
SwAnchoredObject* pObj = (*GetDrawObjs())[i];
const SwFrmFmt& rFmt = pObj->GetFrmFmt();
const BOOL bFly = pObj->ISA(SwFlyFrm);
- if ( bFly &&
- WEIT_WECH == pObj->GetObjRect().Width()||
- rFmt.GetFrmSize().GetWidthPercent() )
+ if ((bFly && (WEIT_WECH == pObj->GetObjRect().Width()))
+ || rFmt.GetFrmSize().GetWidthPercent())
+ {
continue;
+ }
if ( FLY_AS_CHAR == rFmt.GetAnchor().GetAnchorId() )
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 395009122063..661f68603603 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1738,7 +1738,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
// die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche,
// in denen die Fussnoten(Container) liegen.
// #109767# Table frame is in section, insert section in cell frame.
- if( pSct && ( pFtnFrm && !pSct->IsInFtn() ) || pUpper->IsCellFrm() )
+ if( pSct && ((pFtnFrm && !pSct->IsInFtn()) || pUpper->IsCellFrm()) )
pSct = NULL;
if( pSct )
{ // damit der SectionFrm nicht zerstoert wird durch pTmp->MoveFwd()
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index aec3fde909f1..ac20d8a4f86b 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2430,7 +2430,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
#endif
bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea());
}
- aBools.Insert( bVis, aBools.Count() );
+ aBools.push_back( bVis );
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != pImp->GetShell() );
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 39b8a60ef695..a85ee7091ff1 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -102,7 +102,7 @@ void SwLayCacheImpl::Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset )
{
aType.Insert( nType, aType.Count() );
SvULongs::Insert( nIndex, SvULongs::Count() );
- aOffset.Insert( nOffset, aOffset.Count() );
+ aOffset.push_back( nOffset );
}
BOOL SwLayCacheImpl::Read( SvStream& rStream )
@@ -1238,12 +1238,12 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) :
BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
{
BOOL bRes = TRUE;
- UINT16 nLvl = aRecTypes.Count();
+ size_t nLvl = aRecTypes.size();
ASSERT( nLvl == aRecSizes.Count(), "OpenRec: Level" );
UINT32 nPos = pStream->Tell();
if( bWriteMode )
{
- aRecTypes.Insert( cType, nLvl );
+ aRecTypes.push_back( cType );
aRecSizes.Insert( nPos, nLvl );
*pStream << (UINT32) 0;
}
@@ -1252,7 +1252,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
UINT32 nVal;
*pStream >> nVal;
BYTE cRecTyp = (BYTE)nVal;
- aRecTypes.Insert( cRecTyp, nLvl );
+ aRecTypes.push_back( cRecTyp );
sal_uInt32 nSize = nVal >> 8;
aRecSizes.Insert( nPos + nSize, nLvl );
if( !nVal || cRecTyp != cType ||
@@ -1261,7 +1261,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
ASSERT( nVal, "OpenRec: Record-Header is 0" );
ASSERT( cRecTyp == cType,
"OpenRec: Wrong Record Type" );
- aRecTypes[nLvl] = 0;
+ aRecTypes.back() = 0;
aRecSizes[nLvl] = pStream->Tell();
bRes = sal_False;
bError = TRUE;
@@ -1275,7 +1275,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
BOOL SwLayCacheIoImpl::CloseRec( BYTE )
{
BOOL bRes = TRUE;
- UINT16 nLvl = aRecTypes.Count();
+ size_t nLvl = aRecTypes.size();
ASSERT( nLvl == aRecSizes.Count(), "CloseRec: wrong Level" );
ASSERT( nLvl, "CloseRec: no levels" );
if( nLvl )
@@ -1287,7 +1287,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
UINT32 nBgn = aRecSizes[nLvl];
pStream->Seek( nBgn );
UINT32 nSize = nPos - nBgn;
- UINT32 nVal = ( nSize << 8 ) | aRecTypes[nLvl];
+ UINT32 nVal = ( nSize << 8 ) | aRecTypes.back();
*pStream << nVal;
pStream->Seek( nPos );
if( pStream->GetError() != SVSTREAM_OK )
@@ -1307,7 +1307,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
bRes = FALSE;
}
- aRecTypes.Remove( nLvl, 1 );
+ aRecTypes.pop_back();
aRecSizes.Remove( nLvl, 1 );
}
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 7e7fd96e8817..8eb958f5bfae 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -71,11 +71,11 @@ class SwLayCacheImpl : public SvULongs
void Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset );
public:
- SwLayCacheImpl() : SvULongs( 20, 10 ), aOffset( 20, 10 ), aType( 20, 10 ) {}
+ SwLayCacheImpl() : SvULongs( 20, 10 ), aType( 20, 10 ) {}
BOOL Read( SvStream& rStream );
ULONG GetBreakIndex( USHORT nIdx ) const { return GetObject( nIdx ); }
- xub_StrLen GetBreakOfst( USHORT nIdx ) const { return aOffset[ nIdx ]; }
+ xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; }
USHORT GetBreakType( USHORT nIdx ) const { return aType[ nIdx ]; }
USHORT GetFlyCount() const { return aFlyCache.Count(); }
diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk
index 7019203aa20f..076069b51339 100644
--- a/sw/source/core/layout/makefile.mk
+++ b/sw/source/core/layout/makefile.mk
@@ -49,6 +49,7 @@ CDEFS+=-DDEBUG
EXCEPTIONSFILES = \
$(SLO)$/anchoreddrawobject.obj \
$(SLO)$/flycnt.obj \
+ $(SLO)$/layact.obj \
$(SLO)$/laycache.obj \
$(SLO)$/layouter.obj \
$(SLO)$/movedfwdfrmsbyobjpos.obj \
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 01f09f2c41c3..626627a3c993 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1827,10 +1827,11 @@ void SwRootFrm::ImplCalcBrowseWidth()
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
const BOOL bFly = pAnchoredObj->ISA(SwFlyFrm);
- if ( bFly &&
- WEIT_WECH == pAnchoredObj->GetObjRect().Width()||
- rFmt.GetFrmSize().GetWidthPercent() )
+ if ((bFly && (WEIT_WECH == pAnchoredObj->GetObjRect().Width()))
+ || rFmt.GetFrmSize().GetWidthPercent())
+ {
continue;
+ }
long nWidth = 0;
switch ( rFmt.GetAnchor().GetAnchorId() )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 09fc6b00e03d..9f518285bd30 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -30,12 +30,7 @@
#include <com/sun/star/text/HoriOrientation.hpp>
-
-#include <hintids.hxx>
-
-#ifndef _SOUND_HXX //autogen
#include <vcl/sound.hxx>
-#endif
#include <tools/poly.hxx>
#define _SVSTDARR_LONGS
#include <svl/svstdarr.hxx>
@@ -49,19 +44,15 @@
// --> collapsing borders FME 2005-05-27 #i29550#
#include <svx/framelink.hxx>
// <--
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <svx/svdpagv.hxx>
-#include <tgrditem.hxx>
-
+#include <hintids.hxx>
+#include <tgrditem.hxx>
#include <fmtsrnd.hxx>
#include <fmtclds.hxx>
#include <tools/shl.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <swmodule.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
@@ -89,15 +80,11 @@
#include <ptqueue.hxx>
#include <noteurl.hxx>
#include <virtoutp.hxx>
-#ifndef _LINEINFO_HXX
#include <lineinfo.hxx>
-#endif
#include <dbg_lay.hxx>
#include <accessibilityoptions.hxx>
// OD 20.12.2002 #94627#
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
// OD 28.02.2003 #b4779636#, #107692#
#include <swtable.hxx>
// OD 02.07.2003 #108784#
@@ -2735,7 +2722,8 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
|*
|*************************************************************************/
-void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
+void
+SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
{
ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
@@ -3185,7 +3173,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
}
-void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ViewShell *pSh = GetShell();
@@ -3473,7 +3461,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
/*************************************************************************
|* SwCellFrm::Paint( const SwRect& ) const
|*************************************************************************/
-void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( GetLayoutRowSpan() >= 1 )
SwLayoutFrm::Paint( rRect );
@@ -3492,7 +3480,7 @@ void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay,
const SwRect &rRect, const SwPageFrm *pPage );
-void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
//wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die
//Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben.
@@ -3727,7 +3715,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
|*
|*************************************************************************/
-void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( pGlobalShell->GetViewOptions()->IsTable() )
{
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 018e48440b59..ff0c6ec8f48f 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1811,10 +1811,10 @@ USHORT SwFrm::GetVirtPageNum() const
const SwFrm *pFrm = 0;
const SfxItemPool &rPool = pPage->GetFmt()->GetDoc()->GetAttrPool();
const SfxPoolItem* pItem;
- USHORT nMaxItems = rPool.GetItemCount( RES_PAGEDESC );
- for( USHORT n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = rPool.GetItem( RES_PAGEDESC, n ) ))
+ if( 0 == (pItem = rPool.GetItem2( RES_PAGEDESC, n ) ))
continue;
const SwFmtPageDesc *pDesc = (SwFmtPageDesc*)pItem;
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index ea01592741ec..4b9a9417480a 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -28,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "rootfrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
@@ -41,7 +39,7 @@ void SwFrm::Format( const SwBorderAttrs * )
ASSERT( FALSE, "Format() der Basisklasse gerufen." );
}
-void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const
+void SwFrm::Paint(SwRect const&, SwPrintData const*const) const
{
ASSERT( FALSE, "Paint() der Basisklasse gerufen." );
}