[Libreoffice-commits] .: 2 commits - sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jan 25 06:48:51 PST 2011
sw/source/core/docnode/ndtbl.cxx | 2 --
sw/source/core/text/pormulti.cxx | 8 --------
sw/source/core/txtnode/thints.cxx | 1 +
sw/source/core/undo/unnum.cxx | 10 ----------
sw/source/ui/dialog/ascfldlg.cxx | 7 ++-----
sw/source/ui/shells/textsh.cxx | 2 --
sw/source/ui/uiview/pview.cxx | 1 -
sw/source/ui/uiview/view2.cxx | 4 ++--
sw/source/ui/uiview/viewtab.cxx | 4 ----
9 files changed, 5 insertions(+), 34 deletions(-)
New commits:
commit 271285f023d88f5e269b6b40ab1a2ca3aca42ef5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 25 12:34:36 2011 +0000
WaE: gcc 4.6.0 various warnings
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 41d152d..c9b442f 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1204,12 +1204,10 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
OSL_ENSURE( pNdTbl, "kein Tabellen-Node angelegt." );
pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
- BOOL bUseBoxFmt = FALSE;
if( !pBoxFmt->GetDepends() )
{
// die Formate an den Boxen haben schon die richtige Size, es darf
// also nur noch die richtige Umrandung/AutoFmt gesetzt werden.
- bUseBoxFmt = TRUE;
pTableFmt->SetFmtAttr( pBoxFmt->GetFrmSize() );
delete pBoxFmt;
}
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 8255e3d..277d21c 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1367,13 +1367,11 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
- USHORT nGridWidth = 0;
USHORT nRubyHeight = 0;
sal_Bool bRubyTop = sal_False;
if ( bHasGrid )
{
- nGridWidth = pGrid->GetBaseHeight();
nRubyHeight = pGrid->GetRubyHeight();
bRubyTop = ! pGrid->GetRubyTextBelow();
}
@@ -1874,16 +1872,10 @@ BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType();
- USHORT nGridWidth = 0;
- USHORT nRubyHeight = 0;
sal_Bool bRubyTop = sal_False;
if ( bHasGrid )
- {
- nGridWidth = pGrid->GetBaseHeight();
- nRubyHeight = pGrid->GetRubyHeight();
bRubyTop = ! pGrid->GetRubyTextBelow();
- }
do
{
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index f26aa35..0506964 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -572,6 +572,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
rNode, **itOther, nNewEnd, nOtherEnd ) );
bSuccess = TryInsertNesting(rNode, *pOtherRight);
OSL_ENSURE(bSuccess, "recursive call 2 failed?");
+ (void)bSuccess;
}
}
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 4e6d2ce..cd9c8dd 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -120,8 +120,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
aBuffer[ nBytesRead + 2 ] = '0';
}
- BOOL bCR = FALSE, bLF = FALSE, bNoNormalChar = FALSE,
- bNullChar = FALSE;
+ BOOL bCR = FALSE, bLF = FALSE, bNullChar = FALSE;
for( USHORT nCnt = 0; nCnt < nBytesRead; ++nCnt )
switch( aBuffer[ nCnt ] )
{
@@ -131,9 +130,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
case 0xC:
case 0x1A:
case 0x9: break;
- default:
- if( 0x20 > aBuffer[ nCnt ] )
- bNoNormalChar = TRUE;
+ default: break;
}
if( !bNullChar )
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 34ac457..d768df8 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -1130,7 +1130,6 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
delete pDlg;
}
- BOOL bFontChanged = FALSE;
if( aChars.Len() )
{
rSh.StartAllAction();
@@ -1163,7 +1162,6 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
// #108876# a font attribute has to be set always due to a guessed script type
if( aNewFont.GetName().Len() )
{
- bFontChanged = TRUE;
SvxFontItem aNewFontItem( aFont );
aNewFontItem.GetFamilyName() = aNewFont.GetName();
aNewFontItem.GetFamily() = aNewFont.GetFamily();
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 8fe9743..a3a02a8 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -1515,7 +1515,6 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
Point aPos = pScrollbar->GetParent()->OutputToScreenPixel(
pScrollbar->GetPosPixel());
aPos.Y() = pScrollbar->OutputToScreenPixel(pScrollbar->GetPointerPosPixel()).Y();
- Size aSize = pScrollbar->GetSizePixel();
Rectangle aRect;
aRect.Left() = aPos.X() -8;
aRect.Right() = aRect.Left();
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 401017b..e0e38c7 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1972,13 +1972,13 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
{
- BOOL bInsert = FALSE, bCompare = FALSE, bMerge = FALSE;
+ BOOL bInsert = FALSE, bCompare = FALSE;
long nFound = 0;
SwDocShell* pDocSh = GetDocShell();
switch( nSlotId )
{
- case SID_DOCUMENT_MERGE: bMerge = TRUE; break;
+ case SID_DOCUMENT_MERGE: break;
case SID_DOCUMENT_COMPARE: bCompare = TRUE; break;
case SID_INSERTDOC: bInsert = TRUE; break;
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 319f605..592fb0f 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -586,17 +586,13 @@ void SwView::ExecTabWin( SfxRequest& rReq )
GetArgs()->Get(nSlot));
if(nFrmType & FRMTYPE_FLY_ANY)
{
- sal_Bool bFirstColumn = sal_True;
- sal_Bool bLastColumn = sal_True;
if(nFrmType & FRMTYPE_COLUMN)
{
USHORT nCurFrameCol = rSh.GetCurColNum() - 1;
- bFirstColumn = !nCurFrameCol;
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
const SwFmtCol* pCols = &pFmt->GetCol();
const SwColumns& rCols = pCols->GetColumns();
USHORT nColumnCount = rCols.Count();
- bLastColumn = nColumnCount == nCurFrameCol + 1;
}
}
aParaMargin.SetRight( aParaMargin.GetRight() - nRightBorderDistance );
commit 836c838aa8e2d4948d30fe468e6c3f80b2348b66
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 25 10:56:50 2011 +0000
#i83806# these methods don't change anything and we don't use their results
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 1d058fb..bc2be15 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -118,16 +118,6 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter )
if( !pNd && nSttNode )
pNd = rDoc.GetNodes()[ nSttNode ]->GetTxtNode();
- // This code seems to be superfluous because the methods
- // don't have any known side effects.
- // ToDo: iasue i83806 should be used to remove this code
- const SwNumRule* pNdRule;
- if( pNd )
- pNdRule = pNd->GetNumRule();
- else
- pNdRule = rDoc.FindNumRulePtr( aNumRule.GetName() );
- // End of ToDo for issue i83806
-
pHistory->TmpRollback( &rDoc, nLRSavePos );
}
More information about the Libreoffice-commits
mailing list