[Libreoffice-commits] .: 2 commits - sc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jan 31 13:27:14 PST 2011
sc/source/core/data/table2.cxx | 5 -----
sc/source/core/tool/doubleref.cxx | 3 ---
sc/source/filter/excel/read.cxx | 4 ----
sc/source/filter/excel/xipivot.cxx | 1 -
sc/source/filter/html/htmlpars.cxx | 12 ++++++------
sc/source/filter/qpro/qprostyle.cxx | 4 ++--
sc/source/ui/docshell/dbdocimp.cxx | 2 +-
sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 2 --
sc/source/ui/view/formatsh.cxx | 3 ---
sc/source/ui/view/viewfun3.cxx | 11 ++---------
10 files changed, 11 insertions(+), 36 deletions(-)
New commits:
commit 355de7dc39478b617109b5a593320b32d6e9092e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 31 21:22:32 2011 +0000
WaE: various new gcc 4.6.0 warnings
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 486ce95..f0a1526 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -98,8 +98,6 @@ void ScTabBgColorDlg::FillColorValueSets_Impl()
::boost::scoped_ptr<XColorTable> pOwnColorTable; // locally instantiated in case the doc shell doesn't have one.
const Size aSize15x15 = Size( 15, 15 );
- const Size aSize10x10 = Size( 10, 10 );
- const Size aSize5x5 = Size( 5, 5 );
USHORT nSelectedItem = 0;
DBG_ASSERT( pDocSh, "DocShell not found!" );
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 88f08a9..69ff3e7 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1785,7 +1785,6 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
const SvxHorJustifyItem* pHorJustify = NULL;
const SvxVerJustifyItem* pVerJustify = NULL;
- SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
USHORT nWhich = 0;
BOOL bJustifyStd = FALSE;
@@ -1797,8 +1796,6 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
{
case SFX_ITEM_SET:
{
- eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() );
-
switch ( SvxCellHorJustify( pHorJustify->GetValue() ) )
{
case SVX_HOR_JUSTIFY_STANDARD:
commit 49341212a7137c2427891c2ea7f91b1b2fc855a6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 31 11:14:16 2011 +0000
WaE: various new gcc 4.6.0 warnings
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 9ea76b0..ebe1683 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2829,7 +2829,6 @@ short DiffSign( T a, T b )
void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
{
BOOL bSizeChanged = FALSE;
- BOOL bMissed = FALSE;
SCCOL nCol;
SCROW nRow;
@@ -2872,8 +2871,6 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
bFound = TRUE;
}
- else
- bMissed = TRUE;
}
}
}
@@ -2902,8 +2899,6 @@ void ScTable::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC
{
bFound = TRUE;
}
- else
- bMissed = TRUE;
}
}
}
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index b36d038..fa06748 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -67,7 +67,6 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
return false;
BOOL bValid;
- BOOL bFound;
OUString aCellStr;
SCSIZE nIndex = 0;
SCROW nRow = 0;
@@ -101,7 +100,6 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
if ((nIndex < 1) || bValid)
{
// field name in the 2nd column.
- bFound = FALSE;
aCellStr = pQueryRef->getString(1, nRow);
SCCOL nField = pDBRef->findFieldColumn(aCellStr); // TODO: must be case insensitive comparison.
if (ValidCol(nField))
@@ -116,7 +114,6 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef,
if (bValid)
{
// equality, non-equality operator in the 3rd column.
- bFound = FALSE;
aCellStr = pQueryRef->getString(2, nRow);
lcl_toUpper(aCellStr);
const sal_Unicode* p = aCellStr.getStr();
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 1ed46a3..cdd7d2a 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -92,7 +92,6 @@ FltError ImportExcel::Read( void )
FltError eLastErr = eERR_OK;
UINT16 nOpcode;
UINT16 nBofLevel = 0;
- BOOL bBiff4Workbook = FALSE;
DBG_ASSERT( &aIn != NULL, "-ImportExcel::Read(): Kein Stream - wie dass?!" );
@@ -188,10 +187,7 @@ FltError ImportExcel::Read( void )
NeueTabelle();
}
else if( pExcRoot->eDateiTyp == Biff4W )
- {
eAkt = Z_Biff4W;
- bBiff4Workbook = TRUE;
- }
break;
case EXC_BIFF5:
Bof5();
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index a860353..957a947 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -424,7 +424,6 @@ void XclImpPCField::ConvertStdGroupField( ScDPSaveData& rSaveData, const ScfStri
if( rBaseFieldName.Len() > 0 )
{
// *** create a ScDPSaveGroupItem for each own item, they collect base item names ***
- typedef ::std::vector< ScDPSaveGroupItem > ScDPSaveGroupItemVec;
ScDPSaveGroupItemVec aGroupItems;
aGroupItems.reserve( maItems.size() );
// initialize with own item names
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 3085aee..bdb3e60 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1131,9 +1131,9 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
ULONG nRowKey = nRow + j;
SCROW nR = (SCROW)(ULONG)pTab1->Get( nRowKey );
if ( !nR )
- pTab1->Insert( nRowKey, (void*) nRowsPerRow1 );
+ pTab1->Insert( nRowKey, (void*)(sal_IntPtr)nRowsPerRow1 );
else if ( nRowsPerRow1 > nR )
- pTab1->Replace( nRowKey, (void*) nRowsPerRow1 );
+ pTab1->Replace( nRowKey, (void*)(sal_IntPtr)nRowsPerRow1 );
//2do: wie geht das noch besser?
else if ( nRowsPerRow1 < nR && nRowSpan == 1
&& nTable == nMaxTable )
@@ -1145,8 +1145,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
SCROW nR2 = (SCROW)(ULONG)pTab1->Get( nRowKey+1 );
if ( nR2 > nAdd )
{ // nur wenn wirklich Platz
- pTab1->Replace( nRowKey, (void*) nR );
- pTab1->Replace( nRowKey+1, (void*) (nR2 - nAdd) );
+ pTab1->Replace( nRowKey, (void*)(sal_IntPtr)nR );
+ pTab1->Replace( nRowKey+1, (void*)(sal_IntPtr)(nR2 - nAdd) );
nRowsPerRow2 = nR / nRows;
}
}
@@ -1165,9 +1165,9 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
ULONG nRowKey = nRow + j;
SCROW nR = (SCROW)(ULONG)pTab2->Get( nRowKey );
if ( !nR )
- pTab2->Insert( nRowKey, (void*) nRowsPerRow2 );
+ pTab2->Insert( nRowKey, (void*)(sal_IntPtr)nRowsPerRow2 );
else if ( nRowsPerRow2 > nR )
- pTab2->Replace( nRowKey, (void*) nRowsPerRow2 );
+ pTab2->Replace( nRowKey, (void*)(sal_IntPtr)nRowsPerRow2 );
}
}
}
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index 3096d2a..002881a 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -145,12 +145,12 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow,
// Font Attributes
sal_uInt16 nTmpFnt = maFontRecord[ maFont[ nStyle ] ];
- BOOL bIsBold, bIsItalic, bIsUnderLine, bIsStrikeThrough;
+ BOOL bIsBold, bIsItalic, bIsUnderLine;
bIsBold = ( nTmpFnt & 0x0001 ) != 0;
bIsItalic = ( nTmpFnt & 0x0002 ) != 0;
bIsUnderLine = ( nTmpFnt & 0x0004 ) != 0;
- bIsStrikeThrough = (nTmpFnt & 0x0020 ) != 0;
+ //(nTmpFnt & 0x0020 ) for StrikeThrough
if( bIsBold )
rItemSet.Put( SvxWeightItem( WEIGHT_BOLD,ATTR_FONT_WEIGHT) );
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index ecce501..c17df41 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -177,7 +177,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
{
sal_Int32 nEntry = 0;
if ( aSelection[i] >>= nEntry )
- aList.Insert( (void*)nEntry, LIST_APPEND );
+ aList.Insert( (void*)(sal_IntPtr)nEntry, LIST_APPEND );
}
BOOL bAddrInsert = FALSE; //!???
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 22a978e..f0e6621 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1112,9 +1112,6 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
#endif
}
- SCCOL nMarkAddX = 0;
- SCROW nMarkAddY = 0;
-
// Also for a filtered selection the area is used, for undo et al.
if ( aFilteredMark.IsMarked() || bMarkIsFiltered )
{
@@ -1140,14 +1137,10 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
}
}
- if (nBlockAddX > nDestSizeX)
- nMarkAddX = nBlockAddX - nDestSizeX; // fuer Merge-Test
- else
+ if (nBlockAddX <= nDestSizeX)
nEndCol = nStartCol + nDestSizeX;
- if (nBlockAddY > nDestSizeY)
- nMarkAddY = nBlockAddY - nDestSizeY; // fuer Merge-Test
- else
+ if (nBlockAddY <= nDestSizeY)
{
nEndRow = nStartRow + nDestSizeY;
if (bMarkIsFiltered || nEndRow > aMarkRange.aEnd.Row())
More information about the Libreoffice-commits
mailing list