summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-12-03 11:31:00 +0100
committerIvo Hinkelmann <ihi@openoffice.org>2010-12-03 11:31:00 +0100
commitad336d156b4b27471896e31fb911808790007531 (patch)
tree41592722d28ca3cf8ff8052c92b68e027b15d8a2 /sw
parent6bcbe6006dcf6853cd315c3167b2e5b6efa5b6f9 (diff)
parent6ad930a9e6a25ec36f4672bf833cffa7371d6f9a (diff)
CWS-TOOLING: integrate CWS os144
Diffstat (limited to 'sw')
-rw-r--r--sw/prj/d.lst1
-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
-rw-r--r--sw/source/filter/ascii/ascatr.cxx4
-rw-r--r--sw/source/filter/html/htmlctxt.cxx2
-rw-r--r--sw/source/filter/html/htmltabw.cxx12
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx36
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx2
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx40
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx26
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx38
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/xml/xmltble.cxx34
-rw-r--r--sw/source/ui/chrdlg/break.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx25
-rw-r--r--sw/source/ui/frmdlg/cption.cxx8
-rw-r--r--sw/source/ui/index/cnttab.cxx12
-rw-r--r--sw/source/ui/misc/docfnote.cxx2
-rw-r--r--sw/source/ui/misc/glosdoc.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx4
-rw-r--r--sw/source/ui/shells/frmsh.cxx6
-rw-r--r--sw/source/ui/shells/tabsh.cxx16
-rw-r--r--sw/source/ui/shells/textsh.cxx24
-rw-r--r--sw/source/ui/shells/textsh1.cxx4
-rw-r--r--sw/source/ui/shells/txtattr.cxx4
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/ui/uiview/view.cxx4
-rw-r--r--sw/source/ui/uiview/viewtab.cxx22
-rw-r--r--sw/source/ui/utlui/content.cxx10
-rw-r--r--sw/util/makefile.mk8
-rw-r--r--sw/util/msword.component37
-rw-r--r--sw/util/msword.map1
45 files changed, 269 insertions, 223 deletions
diff --git a/sw/prj/d.lst b/sw/prj/d.lst
index 0cb261c5f0f1..38c4f5046fc8 100644
--- a/sw/prj/d.lst
+++ b/sw/prj/d.lst
@@ -37,6 +37,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar
..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res
..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
..\%__SRC%\misc\swd.component %_DEST%\xml%_EXT%\swd.component
+..\%__SRC%\misc\msword.component %_DEST%\xml%_EXT%\msword.component
..\uiconfig\swriter\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar\*.xml
..\uiconfig\swxform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar\*.xml
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(' ') )
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index f2a8229c3092..68e6525d991d 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -205,8 +205,8 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
} while( nStrPos < nEnde );
if( !bLastNd ||
- ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
- && !nStrPos && nEnde == nNodeEnde )
+ ( ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
+ && !nStrPos && nEnde == nNodeEnde ) )
rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd());
return rWrt;
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 485ac5dd2a2b..b3a62fe4d189 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -192,7 +192,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
nOldEndCnt = pPam->GetPoint()->nContent.GetIndex();
}
- if( RES_PARATR_BEGIN <= nWhich && bMoveBack ||
+ if( (RES_PARATR_BEGIN <= nWhich && bMoveBack) ||
pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() ||
(pAttr->GetSttPara() == *pOldEndPara &&
pAttr->GetSttCnt() != nOldEndCnt) )
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 43b83557a149..91b026ca6770 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -98,7 +98,7 @@ class SwHTMLWrtTable : public SwWriteTable
sal_Bool bTop, sal_Bool bBottom, sal_Bool bLeft, sal_Bool bRight );
public:
- SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt16 nBWidth,
+ SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
sal_Bool bRel, USHORT nNumOfRowsToRepeat,
sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0 );
SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo );
@@ -111,7 +111,7 @@ public:
SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth,
- sal_uInt16 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat,
+ sal_uInt32 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat,
sal_uInt16 nLSub, sal_uInt16 nRSub )
: SwWriteTable( rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat )
{
@@ -337,7 +337,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
#ifndef PURE_HTML
long nWidth = 0;
- sal_uInt16 nPrcWidth = USHRT_MAX;
+ sal_uInt32 nPrcWidth = ULONG_MAX;
if( bOutWidth )
{
if( bLayoutExport )
@@ -471,7 +471,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
}
else
{
- sal_uInt16 nTWidth, nBWidth, nLSub, nRSub;
+ sal_uInt16 nTWidth;
+ sal_uInt32 nBWidth;
+ sal_uInt16 nLSub, nRSub;
if( HasRelWidths() )
{
nTWidth = 100;
@@ -845,7 +847,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
ByteString sOutStr( '<' );
sOutStr += OOO_STRING_SVTOOLS_HTML_col;
- sal_uInt16 nWidth;
+ sal_uInt32 nWidth;
sal_Bool bRel;
if( bLayoutExport )
{
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index 5bbf776351a1..c47ac7809bd0 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -61,7 +61,7 @@ class SwWriteTableCell
long nHeight; // fixe/Mindest-Hoehe der Zeile
- USHORT nWidthOpt; // Breite aus Option;
+ sal_uInt32 nWidthOpt; // Breite aus Option;
USHORT nRow; // Start-Zeile
USHORT nCol; // Start-Spalte
@@ -99,7 +99,7 @@ public:
nWidthOpt = nWidth; bPrcWidthOpt = bPrc;
}
- USHORT GetWidthOpt() const { return nWidthOpt; }
+ sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
BOOL HasPrcWidthOpt() const { return bPrcWidthOpt; }
};
@@ -180,9 +180,9 @@ SV_DECL_PTRARR_SORT_DEL( SwWriteTableRows, SwWriteTableRowPtr, 5, 5 )
class SwWriteTableCol
{
- USHORT nPos; // End Position der Spalte
+ sal_uInt32 nPos; // End Position der Spalte
- USHORT nWidthOpt;
+ sal_uInt32 nWidthOpt;
BOOL bRelWidthOpt : 1;
BOOL bOutWidth : 1; // Spaltenbreite ausgeben?
@@ -191,9 +191,9 @@ public:
BOOL bLeftBorder : 1; // Welche Umrandungen sind da?
BOOL bRightBorder : 1;
- SwWriteTableCol( USHORT nPosition );
+ SwWriteTableCol( sal_uInt32 nPosition );
- USHORT GetPos() const { return nPos; }
+ sal_uInt32 GetPos() const { return nPos; }
void SetLeftBorder( BOOL bBorder ) { bLeftBorder = bBorder; }
BOOL HasLeftBorder() const { return bLeftBorder; }
@@ -207,11 +207,11 @@ public:
inline int operator==( const SwWriteTableCol& rCol ) const;
inline int operator<( const SwWriteTableCol& rCol ) const;
- void SetWidthOpt( USHORT nWidth, BOOL bRel )
+ void SetWidthOpt( sal_uInt32 nWidth, BOOL bRel )
{
nWidthOpt = nWidth; bRelWidthOpt = bRel;
}
- USHORT GetWidthOpt() const { return nWidthOpt; }
+ sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
BOOL HasRelWidthOpt() const { return bRelWidthOpt; }
};
@@ -248,14 +248,14 @@ protected:
USHORT nBorder; // Dicke der ausseren Umrandung
USHORT nInnerBorder; // Dicke der inneren Umrandung
- USHORT nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize
+ sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize
USHORT nHeadEndRow; // letzte Zeile des Tabellen-Kopfes
USHORT nLeftSub;
USHORT nRightSub;
- long nTabWidth; // Absolute/Relative Breite der Tabelle
+ sal_uInt32 nTabWidth; // Absolute/Relative Breite der Tabelle
BOOL bRelWidths : 1; // Breiten relativ ausgeben?
BOOL bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
@@ -271,16 +271,16 @@ protected:
virtual BOOL ShouldExpandSub( const SwTableBox *pBox,
BOOL bExpandedBefore, USHORT nDepth ) const;
- void CollectTableRowsCols( long nStartRPos, USHORT nStartCPos,
+ void CollectTableRowsCols( long nStartRPos, sal_uInt32 nStartCPos,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
USHORT nDepth );
void FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- USHORT nStartCPos, USHORT nStartCol,
+ sal_uInt32 nStartCPos, USHORT nStartCol,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pLineBrush,
USHORT nDepth,
@@ -292,14 +292,14 @@ protected:
USHORT nRowSpan, USHORT nColSpan,
USHORT &rTopBorder, USHORT &rBottomBorder );
- USHORT GetBaseWidth() const { return nBaseWidth; }
+ sal_uInt32 GetBaseWidth() const { return nBaseWidth; }
BOOL HasRelWidths() const { return bRelWidths; }
public:
- static long GetBoxWidth( const SwTableBox *pBox );
+ static sal_uInt32 GetBoxWidth( const SwTableBox *pBox );
- USHORT GetRawWidth( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt32 GetRawWidth( USHORT nCol, USHORT nColSpan ) const;
USHORT GetAbsWidth( USHORT nCol, USHORT nColSpan ) const;
USHORT GetRelWidth( USHORT nCol, USHORT nColSpan ) const;
USHORT GetPrcWidth( USHORT nCol, USHORT nColSpan ) const;
@@ -317,7 +317,7 @@ protected:
public:
- SwWriteTable( const SwTableLines& rLines, long nWidth, USHORT nBWidth,
+ SwWriteTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
BOOL bRel, USHORT nMaxDepth = USHRT_MAX,
USHORT nLeftSub=0, USHORT nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 );
SwWriteTable( const SwHTMLTableLayout *pLayoutInfo );
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index a4f3063ea05a..0c23218092d5 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -3641,7 +3641,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
// wurde an der Position ein Escapement aufgespannt, so entferne
// das jetzt. Fussnoten sind bei uns immer hochgestellt.
- SvxRTFItemStackTypePtr pTmp = aSaveStack.back();
+ SvxRTFItemStackTypePtr pTmp = aSaveStack.empty() ? 0 : aSaveStack.back();
if( pTmp && pTmp->GetSttNodeIdx() ==
pPam->GetPoint()->nNode.GetIndex() &&
pTmp->GetSttCnt() == nPos )
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 9c889fd2519b..9fd6bd3804b5 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -92,7 +92,7 @@ SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
//-----------------------------------------------------------------------
-SwWriteTableCol::SwWriteTableCol(USHORT nPosition)
+SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition)
: nPos(nPosition), nWidthOpt(0), bRelWidthOpt(false), bOutWidth(true),
bLeftBorder(true), bRightBorder(true)
{
@@ -100,13 +100,13 @@ SwWriteTableCol::SwWriteTableCol(USHORT nPosition)
//-----------------------------------------------------------------------
-long SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
+sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
{
const SwFrmFmt *pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& aFrmSize=
(const SwFmtFrmSize&)pFmt->GetFmtAttr( RES_FRM_SIZE );
- return aFrmSize.GetSize().Width();
+ return sal::static_int_cast<sal_uInt32>(aFrmSize.GetSize().Width());
}
long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
@@ -306,9 +306,9 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
}
-USHORT SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt32 SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const
{
- USHORT nWidth = aCols[nCol+nColSpan-1]->GetPos();
+ sal_uInt32 nWidth = aCols[nCol+nColSpan-1]->GetPos();
if( nCol > 0 )
nWidth = nWidth - aCols[nCol-1]->GetPos();
@@ -352,7 +352,7 @@ USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const
USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const
{
- long nWidth = GetRawWidth( nCol, nColSpan );
+ sal_uInt32 nWidth = GetRawWidth( nCol, nColSpan );
if( nBaseWidth != nTabWidth )
{
nWidth *= nTabWidth;
@@ -419,9 +419,9 @@ BOOL SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, BOOL /*bExpandedBefor
}
void SwWriteTable::CollectTableRowsCols( long nStartRPos,
- USHORT nStartCPos,
+ sal_uInt32 nStartCPos,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
USHORT nDepth )
{
@@ -429,7 +429,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
USHORT nLines = rLines.Count();
#ifdef DBG_UTIL
- USHORT nEndCPos = 0;
+ sal_uInt32 nEndCPos = 0;
#endif
long nRPos = nStartRPos;
@@ -484,16 +484,16 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
USHORT nBoxes = rBoxes.Count();
- USHORT nCPos = nStartCPos;
+ sal_uInt32 nCPos = nStartCPos;
for( USHORT nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
- USHORT nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) )
{
- nCPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ nCPos = nCPos + GetBoxWidth( pBox );
SwWriteTableCol *pCol = new SwWriteTableCol( nCPos );
USHORT nCol;
@@ -512,7 +512,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
else
{
#ifdef DBG_UTIL
- USHORT nCheckPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ sal_uInt32 nCheckPos = nCPos + GetBoxWidth( pBox );
if( !nEndCPos )
{
nEndCPos = nCheckPos;
@@ -550,9 +550,9 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- USHORT nStartCPos, USHORT nStartCol,
+ sal_uInt32 nStartCPos, USHORT nStartCol,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pParentBrush,
USHORT nDepth,
@@ -655,7 +655,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
}
USHORT nBoxes = rBoxes.Count();
- USHORT nCPos = nStartCPos;
+ sal_uInt32 nCPos = nStartCPos;
USHORT nCol = nStartCol;
for( USHORT nBox=0; nBox<nBoxes; nBox++ )
@@ -663,10 +663,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
const SwTableBox *pBox = rBoxes[nBox];
// Position der letzten ueberdeckten Spalte ermitteln
- USHORT nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) )
{
- nCPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ nCPos = nCPos + GetBoxWidth( pBox );
if( nBox==nBoxes-1 )
nParentLineWidth = nCPos - nStartCPos;
}
@@ -768,7 +768,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
}
SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
- USHORT nBWidth, BOOL bRel, USHORT nMaxDepth, USHORT nLSub, USHORT nRSub, sal_uInt32 nNumOfRowsToRepeat)
+ sal_uInt32 nBWidth, BOOL bRel, USHORT nMaxDepth, USHORT nLSub, USHORT nRSub, sal_uInt32 nNumOfRowsToRepeat)
: nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX),
nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel),
@@ -779,7 +779,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
bColsOption(false), bColTags(true), bLayoutExport(false),
bCollectBorderWidth(true)
{
- USHORT nParentWidth = nBaseWidth + nLeftSub + nRightSub;
+ sal_uInt32 nParentWidth = nBaseWidth + nLeftSub + nRightSub;
// Erstmal die Tabellen-Struktur festlegen. Hinter der Tabelle ist in
// jedem Fall eine Spalte zu Ende
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index f4f3f7166fe0..f899d2160e86 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -525,8 +525,8 @@ void RtfExport::ExportDocument_Impl()
// protected section in the document.
{
const SfxItemPool& rPool = pDoc->GetAttrPool();
- USHORT nMaxItem = rPool.GetItemCount2(RES_PROTECT);
- for( USHORT n = 0; n < nMaxItem; ++n )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2(RES_PROTECT);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem2(RES_PROTECT, n);
if (pProtect && pProtect->IsCntntProtected())
@@ -997,7 +997,7 @@ void RtfExport::OutColorTable()
{
// Build the table from rPool since the colors provided to
// RtfAttributeOutput callbacks are too late.
- USHORT n, nMaxItem;
+ sal_uInt32 nMaxItem;
const SfxItemPool& rPool = pDoc->GetAttrPool();
// char color
@@ -1009,7 +1009,7 @@ void RtfExport::OutColorTable()
RES_CHRATR_COLOR ) ))
InsColor( pCol->GetValue() );
nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR);
- for( n = 0; n < nMaxItem; ++n )
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2(
RES_CHRATR_COLOR, n ) ) )
@@ -1019,7 +1019,7 @@ void RtfExport::OutColorTable()
const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE );
InsColor( pUnder->GetColor() );
nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE);
- for( n = 0; n < nMaxItem;n++)
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) )
InsColor( pUnder->GetColor() );
@@ -1029,7 +1029,7 @@ void RtfExport::OutColorTable()
const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE );
InsColor( pOver->GetColor() );
nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE);
- for( n = 0; n < nMaxItem;n++)
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) )
InsColor( pOver->GetColor() );
@@ -1052,12 +1052,14 @@ void RtfExport::OutColorTable()
InsColor( pBkgrd->GetColor() );
}
nMaxItem = rPool.GetItemCount2( *pIds );
- for( n = 0; n < nMaxItem; ++n )
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2(
*pIds , n ) ))
{
InsColor( pBkgrd->GetColor() );
}
+ }
}
// shadow color
@@ -1071,12 +1073,14 @@ void RtfExport::OutColorTable()
InsColor( pShadow->GetColor() );
}
nMaxItem = rPool.GetItemCount2(RES_SHADOW);
- for( n = 0; n < nMaxItem; ++n )
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2(
RES_SHADOW, n ) ) )
{
InsColor( pShadow->GetColor() );
}
+ }
}
// frame border color
@@ -1086,12 +1090,14 @@ void RtfExport::OutColorTable()
RES_BOX ) ))
InsColorLine( *pBox );
nMaxItem = rPool.GetItemCount2(RES_BOX);
- for( n = 0; n < nMaxItem; ++n )
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) ))
InsColorLine( *pBox );
+ }
}
- for( n = 0; n < m_aColTbl.size(); n++ )
+ for (size_t n = 0; n < m_aColTbl.size(); ++n)
{
const Color& rCol = m_aColTbl[ n ];
if( n || COL_AUTO != rCol.GetColor() )
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 8fe2dd5edea8..31b298a06017 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -143,44 +143,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
-{
- sal_Bool bRet = sal_False;
-
- if( pRegistryKey )
- {
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString::createFromAscii( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" ) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" );
- }
-
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 4d16a5646536..ab7a8c4e3a0e 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -784,14 +784,16 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc)
const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
for (const USHORT* pId = aTypes; *pId; ++pId)
{
- USHORT nMaxItem = rPool.GetItemCount2( *pId );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2(
- *pId, nGet )) )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2( *pId );
+ for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet)
+ {
+ pFont = (const SvxFontItem*)rPool.GetItem2( *pId, nGet );
+ if (0 != pFont)
{
GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(),
pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8));
}
+ }
}
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b5ceebcb1ba6..21804b38dca9 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3580,7 +3580,7 @@ void wwSectionManager::InsertSegments()
bool bThisAndNextAreCompatible = (aNext != aEnd) ? ((aIter->GetPageWidth() == aNext->GetPageWidth()) &&
(aIter->GetPageHeight() == aNext->GetPageHeight()) && (aIter->IsLandScape() == aNext->IsLandScape())) : true;
- if ((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected)
+ if (((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected))
{
bIgnoreCols = true;
if ((aIter->NoCols() > 1) || bProtected)
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index d2be01eba5b1..3b55e6f81697 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -82,7 +82,7 @@ class SwXMLTableColumn_Impl : public SwWriteTableCol
public:
- SwXMLTableColumn_Impl( sal_uInt16 nPosition ) :
+ SwXMLTableColumn_Impl( sal_uInt32 nPosition ) :
SwWriteTableCol( nPosition ),
nRelWidth( 0UL )
{};
@@ -137,7 +137,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
nWidth( 0UL )
{
#ifdef DBG_UTIL
- sal_uInt16 nEndCPos = 0U;
+ sal_uInt32 nEndCPos = 0U;
#endif
sal_uInt16 nLines = rLines.Count();
sal_uInt16 nLine;
@@ -147,14 +147,14 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
if( nBox < nBoxes-1U || nWidth==0UL )
{
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
SwXMLTableColumn_Impl *pCol =
new SwXMLTableColumn_Impl( nCPos );
@@ -171,8 +171,8 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
else
{
#ifdef DBG_UTIL
- sal_uInt16 nCheckPos =
- nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ sal_uInt32 nCheckPos =
+ nCPos + SwWriteTable::GetBoxWidth( pBox );
if( !nEndCPos )
{
nEndCPos = nCheckPos;
@@ -186,9 +186,9 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
*/
}
#endif
- nCPos = (sal_uInt16)nWidth;
+ nCPos = nWidth;
#ifdef DBG_UTIL
- SwXMLTableColumn_Impl aCol( (sal_uInt16)nWidth );
+ SwXMLTableColumn_Impl aCol( nWidth );
ASSERT( aCols.Seek_Entry(&aCol), "couldn't find last column" );
ASSERT( SwXMLTableColumn_Impl(nCheckPos) ==
SwXMLTableColumn_Impl(nCPos),
@@ -602,13 +602,13 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
// pass 2: export column styles
{
const SwXMLTableColumns_Impl& rCols = pLines->GetColumns();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nColumns = rCols.Count();
for( sal_uInt16 nColumn=0U; nColumn<nColumns; nColumn++ )
{
SwXMLTableColumn_Impl *pColumn = rCols[nColumn];
- sal_uInt16 nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
nCPos = pColumn->GetPos();
sal_uInt32 nWidth = nCPos - nOldCPos;
@@ -634,7 +634,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
nColAbsWidth += (nBaseWidth/2UL);
nColAbsWidth /= nBaseWidth;
}
- pColumn->SetWidthOpt( (sal_uInt16)nColAbsWidth, sal_False );
+ pColumn->SetWidthOpt( nColAbsWidth, sal_False );
}
ULONG nExpPos = 0;
@@ -678,16 +678,16 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nCol = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
SwTableBox *pBox = rBoxes[nBox];
if( nBox < nBoxes-1U )
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
else
- nCPos = (sal_uInt16)pLines->GetWidth();
+ nCPos = pLines->GetWidth();
// Und ihren Index
@@ -959,7 +959,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
const SwTableBoxes& rBoxes = rLine.GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nCol = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
@@ -975,9 +975,9 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
}
if( nBox < nBoxes-1U )
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
else
- nCPos = (sal_uInt16)rLines.GetWidth();
+ nCPos = rLines.GetWidth();
// Und ihren Index
const sal_uInt16 nOldCol = nCol;
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index cc1f208950dc..63d878006f7e 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -200,7 +200,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
}
String aFmtName;
- for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i)
+ for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i)
if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName =
SwStyleNameMapper::GetUIName( i, aFmtName )))
::InsertStringSorted(aFmtName, aPageCollBox, 1 );
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 0fe1a3717ca1..ee2803e73aad 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -1106,8 +1106,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(nRet != RET_OK && nRet != RET_YES)
return 0;
}
- //create the send dialog
- SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem );
//add the documents
sal_uInt32 nBegin = 0;
sal_uInt32 nEnd = 0;
@@ -1133,7 +1131,26 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
switch( nDocType )
{
case MM_DOCTYPE_OOO : break;
- case MM_DOCTYPE_PDF : bIsPDF = true; break;
+ case MM_DOCTYPE_PDF : bIsPDF = true;
+ {
+ //the method SwIOSystemGetFilterOfFormat( ) returns the template filter
+ //because it uses the same user data :-(
+ SfxFilterMatcher aMatcher( pFilterContainer->GetName() );
+ SfxFilterMatcherIter aIter( &aMatcher );
+ const SfxFilter* pFilter = aIter.First();
+ String sFilterMime( String::CreateFromAscii( "application/pdf" ));
+ while ( pFilter )
+ {
+ if( pFilter->GetMimeType() == sFilterMime && pFilter->CanExport() )
+ {
+ pSfxFlt = pFilter;
+ break;
+ }
+ pFilter = aIter.Next();
+ }
+
+ }
+ break;
case MM_DOCTYPE_WORD:
{
//the method SwIOSystemGetFilterOfFormat( ) returns the template filter
@@ -1239,6 +1256,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY);
xStore->storeToURL( sTargetTempURL, aValues );
+ //create the send dialog
+ SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem );
pDlg->SetDocumentCount( nEnd );
pDlg->ShowDialog();
//help to force painting the dialog
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 5e620ce6955c..e92cd4e0ae81 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -382,6 +382,7 @@ IMPL_LINK(SwCaptionDialog, CaptionHdl, PushButton*, EMPTYARG)
void SwCaptionDialog::DrawSample()
{
String aStr;
+ String sCaption = aTextEdit.GetText();
// Nummer
String sFldTypeName = aCategoryBox.GetText();
@@ -436,9 +437,12 @@ void SwCaptionDialog::DrawSample()
}
}
- aStr += aSepEdit.GetText();
+ if( sCaption.Len() > 0 )
+ {
+ aStr += aSepEdit.GetText();
+ }
}
- aStr += aTextEdit.GetText();
+ aStr += sCaption;
// do preview!
aPrevWin.SetPreviewText( aStr );
}
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 852bc6b2a5e0..a453a46988ee 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1838,8 +1838,8 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt )
{
const Selection& rSel = GetSelection();
sal_uInt16 nTextLen = GetText().Len();
- if(rSel.A() == rSel.B() &&
- !rSel.A() || rSel.A() == nTextLen )
+ if( (rSel.A() == rSel.B() &&
+ !rSel.A() ) || rSel.A() == nTextLen )
{
sal_Bool bCall = sal_False;
KeyCode aCode = rKEvt.GetKeyCode();
@@ -3816,8 +3816,8 @@ IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit)
IMPL_LINK(SwTokenWindow, NextItemHdl, SwTOXEdit*, pEdit)
{
sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pEdit);
- if(nPos && !pEdit->IsNextControl() ||
- nPos < aControlList.Count() - 1 && pEdit->IsNextControl())
+ if( (nPos && !pEdit->IsNextControl()) ||
+ (nPos < aControlList.Count() - 1 && pEdit->IsNextControl()))
{
aControlList.Seek(nPos);
Control* pNextPrev = pEdit->IsNextControl() ? aControlList.Next() : aControlList.Prev();
@@ -3852,8 +3852,8 @@ IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit)
IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn )
{
sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pBtn);
- if(nPos && !pBtn->IsNextControl() ||
- nPos < aControlList.Count() - 1 && pBtn->IsNextControl())
+ if( (nPos && !pBtn->IsNextControl()) ||
+ (nPos < aControlList.Count() - 1 && pBtn->IsNextControl()))
{
aControlList.Seek(nPos);
sal_Bool bNext = pBtn->IsNextControl();
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 06a2e1ae69f4..67fc32bcf1c9 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -265,7 +265,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
}
// Seite
- for( i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_LANDSCAPE; ++i )
+ for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i )
aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr ));
USHORT nCount = pSh->GetPageDescCnt();
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 9ce1038eb898..6ed886fb3974 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -523,7 +523,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
aDirArr.DeleteAndDestroy(0, aDirArr.Count());
if(!nTokenCount ||
- m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath) )
+ (m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath)) )
{
m_sOldErrPath = m_sErrPath;
// Falscher Pfad, d.h. AutoText-Verzeichnis existiert nicht
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index e733aa0389c2..5380a00afbaf 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -617,8 +617,8 @@ void SwOutlineSettingsTabPage::Update()
bSameSuffix &= aNumFmtArr[i]->GetSuffix() == aNumFmtArr[0]->GetSuffix();
bSameComplete &= aNumFmtArr[i]->GetIncludeUpperLevels() == aNumFmtArr[0]->GetIncludeUpperLevels();
const SwCharFmt* pFmt = aNumFmtArr[i]->GetCharFmt();
- bSameCharFmt &= !pFirstFmt && !pFmt
- || pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName();
+ bSameCharFmt &= (!pFirstFmt && !pFmt)
+ || (pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName());
}
}
CheckForStartValue_Impl(aNumFmtArr[0]->GetNumberingType());
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index d8f6afd98347..1bb2ae01ba6e 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -717,7 +717,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case FN_FRAME_ALIGN_HORZ_LEFT:
if ( (eFrmType & FRMTYPE_FLY_INCNT) ||
bProtect ||
- (nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode )
+ ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode) )
rSet.DisableItem( nWhich );
break;
case FN_FRAME_ALIGN_VERT_ROW_TOP:
@@ -727,7 +727,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case FN_FRAME_ALIGN_VERT_CHAR_CENTER:
case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM:
if ( !(eFrmType & FRMTYPE_FLY_INCNT) || bProtect
- || bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich )
+ || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) )
rSet.DisableItem( nWhich );
break;
@@ -738,7 +738,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case FN_FRAME_ALIGN_VERT_TOP:
case FN_FRAME_ALIGN_VERT_CENTER:
case FN_FRAME_ALIGN_VERT_BOTTOM:
- if ( bProtect || bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT)
+ if ( bProtect || (bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) )
rSet.DisableItem( nWhich );
else
{
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index f87bc0d41208..bb4f1c7fb609 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -220,7 +220,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
// Tabellenvariante, wenn mehrere Tabellenzellen selektiert
rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert
- aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1 ||
+ aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) ||
!bTableSel);
// Abstandsfeld immer anzeigen
aBoxInfo.SetDist ((BOOL) TRUE);
@@ -663,7 +663,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
else
aCoreSet.InvalidateItem( RES_BACKGROUND );
- if ( !pDlg && rReq.GetArgs() || pDlg->Execute() == RET_OK )
+ if ( (!pDlg && rReq.GetArgs()) || pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pDlg ? pDlg->GetOutputItemSet() : rReq.GetArgs();
if ( pDlg )
@@ -1330,9 +1330,9 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_VERT_BOTTOM:
{
USHORT nAlign = rSh.GetBoxAlign();
- BOOL bSet = nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE||
- nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER ||
- nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM;
+ BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
+ (nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
+ (nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
rSet.Put(SfxBoolItem(nSlot, bSet));
}
break;
@@ -1342,9 +1342,9 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_MODE_VARIABLE :
{
TblChgMode nMode = rSh.GetTblChgMode();
- BOOL bSet = nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS ||
- nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP ||
- nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS;
+ BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
+ (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) ||
+ (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS);
rSet.Put(SfxBoolItem(nSlot, bSet));
}
break;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 52b60c66d178..0d217532e32a 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -627,16 +627,18 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(pDlg->Execute() && pDlg->GetOutputItemSet())
{
- GetShell().LockPaint();
- GetShell().StartAllAction();
- GetShell().StartUndo(UNDO_INSERT);
+ //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point
+ SwWrtShell& rShell = GetShell();
+ rShell.LockPaint();
+ rShell.StartAllAction();
+ rShell.StartUndo(UNDO_INSERT);
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
aMgr.SetAttrSet(*pOutSet);
// beim ClickToEditFeld erst die Selektion loeschen
- if( GetShell().IsInClickToEdit() )
- GetShell().DelRight();
+ if( rShell.IsInClickToEdit() )
+ rShell.DelRight();
aMgr.InsertFlyFrm();
@@ -647,8 +649,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
//FN_INSERT_FRAME
USHORT nAnchor = (USHORT)aMgr.GetAnchor();
rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor));
- rReq.AppendItem(SfxPointItem(FN_PARAM_1, GetShell().GetObjAbsPos()));
- rReq.AppendItem(SvxSizeItem(FN_PARAM_2, GetShell().GetObjSize()));
+ rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos()));
+ rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize()));
rReq.Done();
}
@@ -659,10 +661,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME));
- GetShell().EndUndo(UNDO_INSERT, &aRewriter);
+ rShell.EndUndo(UNDO_INSERT, &aRewriter);
}
- GetShell().EndAllAction();
- GetShell().UnlockPaint();
+ rShell.EndAllAction();
+ rShell.UnlockPaint();
}
DELETEZ(pDlg);
@@ -900,7 +902,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
}
break;
case FN_INSERT_HRULER :
- if(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() || bCrsrInHidden )
+ if((rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden )
rSet.DisableItem(nWhich);
break;
case FN_FORMAT_COLUMN :
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 2dff1eddc4b4..e084c539da19 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1743,8 +1743,8 @@ void SwTextShell::ChangeHeaderOrFooter(
if( !rStyleName.Len() || rStyleName == sTmp )
{
if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
- (bHeader && aDesc.GetMaster().GetHeader().IsActive() ||
- !bHeader && aDesc.GetMaster().GetFooter().IsActive()))
+ ((bHeader && aDesc.GetMaster().GetHeader().IsActive()) ||
+ (!bHeader && aDesc.GetMaster().GetFooter().IsActive())))
{
bShowWarning = FALSE;
//Actions have to be closed while the dialog is showing
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 9e89620bed28..9d90ac5d5b26 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -119,8 +119,8 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
eEscape = nWhich == FN_SET_SUPER_SCRIPT ?
SVX_ESCAPEMENT_SUPERSCRIPT:
SVX_ESCAPEMENT_SUBSCRIPT;
- if( nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0 ||
- nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0 )
+ if( (nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0) ||
+ (nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0) )
eEscape = SVX_ESCAPEMENT_OFF;
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index d8e1eed0f3fc..5b26b99d012f 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1643,7 +1643,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
}
String aFmtName;
- for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i)
+ for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i)
if( LISTBOX_ENTRY_NOTFOUND == aPageCollLB.GetEntryPos(
aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) ))
aPageCollLB.InsertEntry( aFmtName );
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index b1fd76c63aff..5abe83c3a53d 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1179,8 +1179,8 @@ bool lcl_IsOwnDocument( SwView& rView )
String Created = xDocProps->getAuthor();
String Changed = xDocProps->getModifiedBy();
String FullName = SW_MOD()->GetUserOptions().GetFullName();
- return FullName.Len() &&
- (Changed.Len() && Changed == FullName ) ||
+ return (FullName.Len() &&
+ (Changed.Len() && Changed == FullName )) ||
(!Changed.Len() && Created.Len() && Created == FullName );
}
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 44e314a7475b..ca65184c74e6 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -529,7 +529,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
aUL.SetLower( (USHORT)aLongULSpace.GetLower() );
aDesc.GetMaster().SetFmtAttr( aUL );
- if( bHead && pHeaderFmt || !bHead && pFooterFmt )
+ if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) )
{
SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() :
pFooterFmt->GetFrmSize() );
@@ -694,7 +694,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SvxColumnItem aColItem((const SvxColumnItem&)rReq.
GetArgs()->Get(nSlot));
- if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() )
+ if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) )
{
ASSERT(aColItem.Count(), "ColDesc ist leer!!");
@@ -826,7 +826,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SvxColumnItem aColItem((const SvxColumnItem&)rReq.
GetArgs()->Get(nSlot));
- if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() )
+ if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) )
{
ASSERT(aColItem.Count(), "ColDesc ist leer!!");
@@ -1078,8 +1078,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
(nSelType & nsSelectionType::SEL_FRM) ||
(nSelType & nsSelectionType::SEL_OLE) ||
SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE)||
- !bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich)||
- bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)
+ (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich))||
+ (bVerticalWriting && (RES_PARATR_TABSTOP == nWhich))
)
rSet.DisableItem( nWhich );
else
@@ -1106,8 +1106,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nSelType & nsSelectionType::SEL_FRM ||
nSelType & nsSelectionType::SEL_OLE ||
nFrmType == FRMTYPE_DRAWOBJ ||
- !bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)||
- bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)
+ (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich))||
+ (bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich))
)
{
rSet.DisableItem(nWhich);
@@ -1282,9 +1282,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
BOOL bTableVertical = bHasTable && rSh.IsTableVertical();
- if((SID_RULER_BORDERS_VERTICAL == nWhich) &&
+ if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) &&
((bHasTable && !bTableVertical)||
- (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) ||
+ (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
((SID_RULER_BORDERS == nWhich) &&
((bHasTable && bTableVertical)||
(bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns)))
@@ -1501,8 +1501,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
BOOL bFrameRTL;
BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
- if((SID_RULER_ROWS == nWhich) &&
- ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ||
+ if( ( (SID_RULER_ROWS == nWhich) &&
+ ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
((SID_RULER_ROWS_VERTICAL == nWhich) &&
((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns)))
rSet.DisableItem(nWhich);
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 38ecb34051e5..6eab64f68a60 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -2071,7 +2071,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier)
SvLBoxEntry* pFirstEntry = FirstSelected();
if (pFirstEntry && lcl_IsContent(pFirstEntry))
{
- if(bIsRoot && nRootType == CONTENT_TYPE_OUTLINE ||
+ if((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) ||
((SwContent*)pFirstEntry->GetUserData())->GetParent()->GetType()
== CONTENT_TYPE_OUTLINE)
{
@@ -2089,8 +2089,8 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier)
if( nMove )
{
short nDir = nCmd == FN_ITEM_UP ? -1 : 1;
- if( !bModifier && (nDir == -1 && nActPos > 0 ||
- nDir == 1 && nActPos < GetEntryCount() - 2 ) )
+ if( !bModifier && ((nDir == -1 && nActPos > 0) ||
+ (nDir == 1 && nActPos < GetEntryCount() - 2 )) )
{
pShell->MoveOutlinePara( nDir );
//Cursor wieder an die aktuelle Position setzen
@@ -2762,8 +2762,8 @@ sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
sal_Bool bEnable = sal_False;
SvLBoxEntry* pParentEntry = GetParent(pEntry);
if(!bIsLastReadOnly && (!IsVisible() ||
- (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry ||
- lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE)))
+ ((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) ||
+ (lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE))))
bEnable = sal_True;
SwNavigationPI* pNavi = GetParentWindow();
pNavi->aContentToolBox.EnableItem(FN_ITEM_UP , bEnable);
diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk
index 6fa4bd5432e2..98c616b7036d 100644
--- a/sw/util/makefile.mk
+++ b/sw/util/makefile.mk
@@ -375,7 +375,7 @@ SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib
.INCLUDE : target.mk
-ALLTAR : $(MISC)/sw.component $(MISC)/swd.component $(MISC)/vbaswobj.component
+ALLTAR : $(MISC)/sw.component $(MISC)/swd.component $(MISC)/vbaswobj.component $(MISC)/msword.component
$(MISC)/sw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
sw.component
@@ -394,3 +394,9 @@ $(MISC)/vbaswobj.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL5TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt vbaswobj.component
+
+$(MISC)/msword.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ msword.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt msword.component
diff --git a/sw/util/msword.component b/sw/util/msword.component
new file mode 100644
index 000000000000..84ae7aaf965f
--- /dev/null
+++ b/sw/util/msword.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Writer.RtfExport">
+ <service name="com.sun.star.comp.Writer.RtfExport"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.RtfImport">
+ <service name="com.sun.star.comp.Writer.RtfImport"/>
+ </implementation>
+</component>
diff --git a/sw/util/msword.map b/sw/util/msword.map
index d2a9d9b4f7e1..6a4f01ffa7f7 100644
--- a/sw/util/msword.map
+++ b/sw/util/msword.map
@@ -7,7 +7,6 @@ UDK_3_0_0 {
SaveOrDelMSVBAStorage_ww8;
GetSaveWarningOfMSVBAStorage_ww8;
component_getImplementationEnvironment;
- component_writeInfo;
component_getFactory;
local:
*;