summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/doclay.cxx5
-rw-r--r--sw/source/core/doc/doctxm.cxx3
-rw-r--r--sw/source/core/doc/tblrwcl.cxx8
-rw-r--r--sw/source/core/edit/edsect.cxx4
-rw-r--r--sw/source/core/frmedt/feshview.cxx6
-rw-r--r--sw/source/core/frmedt/tblsel.cxx4
-rw-r--r--sw/source/core/layout/layact.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx8
-rw-r--r--sw/source/core/layout/trvlfrm.cxx22
-rw-r--r--sw/source/core/layout/wsfrm.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx12
-rw-r--r--sw/source/core/unocore/unotbl.cxx12
14 files changed, 49 insertions, 43 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index ceb7d6e3463c..cc29cc8406d0 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1474,7 +1474,10 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
aTxt += ' ';
}
xub_StrLen nIdx = aTxt.Len();
- aTxt += rSeparator;
+ if( rTxt.Len() > 0 )
+ {
+ aTxt += rSeparator;
+ }
xub_StrLen nSepIdx = aTxt.Len();
aTxt += rTxt;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index e144c47ee9a1..b7395402d01d 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -2380,8 +2380,7 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
if( rIntl.IsEqual( sMyString, sMyStringReading, pBase->GetLocale(),
sToCompare, sToCompareReading, rNew.GetLocale() ) &&
- pBase->GetLevel() == nLevel &&
- pBase->GetType() == TOX_SORT_CUSTOM )
+ pBase->GetLevel() == nLevel )
break;
}
if(i == nMax)
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 6119184d3209..1b0cf4fdfa32 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -2924,10 +2924,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if(
rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
(TBLFIX_CHGABS != rParam.nMode ||
- n < rBoxes.Count() &&
+ (n < rBoxes.Count() &&
(nDist + nWidth + rBoxes[ n+1 ]->
GetFrmFmt()->GetFrmSize().GetWidth() / 2)
- > rParam.nSide ))
+ > rParam.nSide) ))
: (nDist + nWidth / 2 ) > rParam.nSide
)
{
@@ -2989,10 +2989,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( nLowerDiff ||
(rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
(TBLFIX_CHGABS != rParam.nMode ||
- n < rBoxes.Count() &&
+ (n < rBoxes.Count() &&
(nDist + nWidth + rBoxes[ n+1 ]->
GetFrmFmt()->GetFrmSize().GetWidth() / 2)
- > rParam.nSide ))
+ > rParam.nSide) ))
: (nDist + nWidth / 2 ) > rParam.nSide ))
{
if( !nLowerDiff )
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index ba3c2e9c7966..a936002df9a2 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -143,8 +143,8 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC
const SwSectionFmt* pFmt = rFmts[ n ];
if( pFmt->IsInNodesArr() &&
(bChkTOX ||
- (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
- && TOX_HEADER_SECTION != eTmpType ))
+ ( (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
+ && TOX_HEADER_SECTION != eTmpType ) ) )
{
const SwSection& rSect = *rFmts[ n ]->GetSection();
if( (!bChkReadOnly && !bChkHidden ) ||
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 17628252b5e3..0f8a61134595 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1477,10 +1477,12 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT
break;
}
- if( (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir
+ if( (
+ (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir
(aPos.Y() > aCurPos.Y())) && // " reverse
(bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter
- (aBestPos.Y() < aCurPos.Y())) || // " reverse
+ (aBestPos.Y() < aCurPos.Y()))
+ ) || // " reverse
(aBestPos.Y() == aCurPos.Y() &&
(bNext? (aBestPos.X() > aCurPos.X()) : // weiter links
(aBestPos.X() < aCurPos.X())))) // " reverse
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index af95f9e7b276..deefc2205b67 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1746,8 +1746,8 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart,
(!pTmp->IsCellFrm() ||
( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX &&
(pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) ||
- bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX &&
- (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) )
+ ( bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX &&
+ (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) )
pTmp = pTmp->GetNextLayoutLeaf();
if ( pTmp )
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index ac20d8a4f86b..589569b3fb6b 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1077,7 +1077,7 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
{
if (
!pFrm->IsValid() ||
- (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom)
+ (pFrm->IsCompletePaint() && ( pFrm->Frm().Top() < nBottom ) )
)
{
return true;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 9f518285bd30..6a6b0b9c9a0c 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -520,7 +520,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( rL2.GetTab() != rL1.GetTab() ||
rL2.IsPainted() ||
rL2.IsLocked() ||
- bVert == rL2.Height() > rL2.Width() )
+ (bVert == (rL2.Height() > rL2.Width())) )
continue;
long nL2a, nL2b, nL2c, nL2d;
@@ -694,7 +694,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
if ( rLine.IsLocked () )
continue;
- if ( !bVerticalSubs == rLine.Height() > rLine.Width() ) //gleiche Ausrichtung?
+ if ( (!bVerticalSubs == (rLine.Height() > rLine.Width())) ) //gleiche Ausrichtung?
continue;
if ( aSubsRect.IsOver( rLine ) )
@@ -899,7 +899,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
SwLineRect &rLk = operator[](k);
if ( rLi.SSize() == rLk.SSize() )
{
- if ( bVerticalSubs == rLk.Height() > rLk.Width() )
+ if ( (bVerticalSubs == (rLk.Height() > rLk.Width())) )
{
if ( bVerticalSubs )
{
@@ -6251,7 +6251,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const
{
const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo();
- BOOL bLineInFly = rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys()
+ BOOL bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys())
|| (sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE;
SwRect aRect( rRect );
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index ff0c6ec8f48f..8c54ed8623a6 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -581,8 +581,8 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
if ( !pCell ||
( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) &&
( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) &&
- ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) ) &&
- !pCell->IsCoveredCell() )
+ ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) &&
+ !pCell->IsCoveredCell() ) )
bProtect = FALSE;
else
pCnt = (*fnNxtPrv)( pCnt );
@@ -701,14 +701,14 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
const long nPrtLeft = bRTL ?
(pTable->*fnRect->fnGetPrtRight)() :
(pTable->*fnRect->fnGetPrtLeft)();
- if ( bRTL != nX < nPrtLeft )
+ if ( (bRTL != (nX < nPrtLeft)) )
nX = nPrtLeft;
else
{
const long nPrtRight = bRTL ?
(pTable->*fnRect->fnGetPrtLeft)() :
(pTable->*fnRect->fnGetPrtRight)();
- if ( bRTL != nX > nPrtRight )
+ if ( (bRTL != (nX > nPrtRight)) )
nX = nPrtRight;
}
}
@@ -2308,12 +2308,14 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
(aTmp.*fnRectX->fnSetTop)( nTmp );
if( (aEndRect.*fnRectX->fnGetTop)() !=
(pEnd2Pos->aPortion.*fnRectX->fnGetTop)() )
- if( bPorR2L )
- (aTmp.*fnRectX->fnSetLeft)(
- (pEnd2Pos->aPortion.*fnRectX->fnGetLeft)() );
- else
- (aTmp.*fnRectX->fnSetRight)(
- (pEnd2Pos->aPortion.*fnRectX->fnGetRight)() );
+ {
+ if( bPorR2L )
+ (aTmp.*fnRectX->fnSetLeft)(
+ (pEnd2Pos->aPortion.*fnRectX->fnGetLeft)() );
+ else
+ (aTmp.*fnRectX->fnSetRight)(
+ (pEnd2Pos->aPortion.*fnRectX->fnGetRight)() );
+ }
aTmp.Intersection( aEndFrm );
Sub( aRegion, aTmp );
}
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index ade3efd4e70d..31d27d0152a0 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -3125,7 +3125,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// Finally adjust the columns if width is set to auto
// Possible optimisation: execute this code earlier in this function and
// return???
- if ( ( bVert && bHeightChgd || ! bVert && bWidthChgd ) &&
+ if ( ( (bVert && bHeightChgd) || (! bVert && bWidthChgd) ) &&
Lower()->IsColumnFrm() )
{
// get column attribute
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 281aac016e43..48b3b5f335fb 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2410,7 +2410,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
BOOL bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) ||
NUMBERFORMAT_TEXT == nNewFmt;
- if( !bNewIsTxtFmt && nOldFmt != nNewFmt || pNewFml )
+ if( (!bNewIsTxtFmt && nOldFmt != nNewFmt) || pNewFml )
{
BOOL bChgTxt = TRUE;
double fVal = 0;
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 8f9d3fc77337..aeddb97d3f83 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -780,7 +780,7 @@ sal_Bool SwTxtFrm::RightMargin(SwPaM *pPam, sal_Bool bAPI) const
if( aLine.GetCurr()->GetLen() &&
CH_BREAK == aInf.GetTxt().GetChar( nRightMargin - 1 ) )
--nRightMargin;
- if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) )
+ else if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) )
{
while( nRightMargin > aLine.GetStart() &&
' ' == aInf.GetTxt().GetChar( nRightMargin - 1 ) )
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index ae23406c04ce..252be1efa9ba 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1894,8 +1894,8 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if(
pCharStyleNames[i] != SwXNumberingRules::GetInvalidStyle() &&
((pCharStyleNames[i].Len() && !pFmt->GetCharFmt()) ||
- pCharStyleNames[i].Len() &&
- pFmt->GetCharFmt()->GetName() != pCharStyleNames[i] ))
+ (pCharStyleNames[i].Len() &&
+ pFmt->GetCharFmt()->GetName() != pCharStyleNames[i]) ))
{
SwCharFmt* pCharFmt = 0;
@@ -1927,8 +1927,8 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
//jetzt nochmal fuer Fonts
if(pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() &&
((pBulletFontNames[i].Len() && !pFmt->GetBulletFont()) ||
- pBulletFontNames[i].Len() &&
- pFmt->GetBulletFont()->GetName() != pBulletFontNames[i] ))
+ (pBulletFontNames[i].Len() &&
+ pFmt->GetBulletFont()->GetName() != pBulletFontNames[i]) ))
{
const SvxFontListItem* pFontListItem =
(const SvxFontListItem* )pDoc->GetDocShell()
@@ -3609,8 +3609,8 @@ MakeObject:
{
const SwPageDesc& rDesc = aBase.GetOldPageDesc();
const SwFrmFmt* pFrmFmt = 0;
- sal_Bool bShare = bHeader && rDesc.IsHeaderShared()||
- !bHeader && rDesc.IsFooterShared();
+ sal_Bool bShare = (bHeader && rDesc.IsHeaderShared())||
+ (!bHeader && rDesc.IsFooterShared());
// TextLeft returns the left content if there is one,
// Text and TextRight return the master content.
// TextRight does the same as Text and is for
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 5669ec8e6b99..856d5e0b44bb 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -700,7 +700,7 @@ void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBo
{
aCols[i] = pArray[i].Position;
if(pArray[i].IsVisible == aCols.IsHidden(i) ||
- !bRow && aCols.IsHidden(i) ||
+ (!bRow && aCols.IsHidden(i)) ||
long(aCols[i] - long(nLastValue)) < 0 ||
UNO_TABLE_COLUMN_SUM < aCols[i] )
{
@@ -3428,10 +3428,10 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
const SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
const SvxBoxItem& rBox = pBoxFmt->GetBox();
if(
- aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT ) ||
- aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT ) ||
- aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP ) ||
- aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM ))
+ (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT )) ||
+ (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT )) ||
+ (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP )) ||
+ (aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM )))
{
SvxBoxItem aSetBox( rBox );
SwFrmFmt* pSetBoxFmt = pBox->ClaimFrmFmt();
@@ -3744,7 +3744,7 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException )
vos::OGuard aGuard(Application::GetSolarMutex());
SwFrmFmt* pFmt = GetFrmFmt();
String sNewTblName(rName);
- if(!pFmt && !bIsDescriptor ||
+ if((!pFmt && !bIsDescriptor) ||
!sNewTblName.Len() ||
STRING_NOTFOUND != sNewTblName.Search('.') ||
STRING_NOTFOUND != sNewTblName.Search(' ') )