summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-07-02 22:30:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-07-02 22:30:54 +0200
commitcc7fd44822441c676864a8774994ce7093a4f197 (patch)
treef91a85e8a1f277ffc7b2af2edfae4b600cf5e139 /sc
parentf6abc3f97e74df0c4ae05abf4075085a9b9c1cc4 (diff)
loplugin:casttovoid: sc
Change-Id: I1dddf4431ccbcea8a5d89d2849307efba592cae9
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/opencl-test.cxx6
-rw-r--r--sc/source/core/data/dpobject.cxx1
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xestream.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx1
-rw-r--r--sc/source/filter/inc/worksheetsettings.hxx2
-rw-r--r--sc/source/filter/oox/formulabase.cxx1
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx4
-rw-r--r--sc/source/filter/oox/worksheetsettings.cxx5
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx1
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx1
-rw-r--r--sc/source/ui/Accessibility/DrawModelBroadcaster.cxx1
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx4
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx10
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx10
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx10
-rw-r--r--sc/source/ui/undo/undoutil.cxx1
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx1
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx1
-rw-r--r--sc/source/ui/vba/vbarange.cxx5
-rw-r--r--sc/source/ui/view/drawview.cxx1
22 files changed, 18 insertions, 56 deletions
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index 8ce1ca18577d..b5138a5ff068 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -920,11 +920,9 @@ void ScOpenCLTest::testMathFormulaRandom()
for (SCROW i = 0; i <= 15; ++i)
{
- double fLibre = rDoc.GetValue(ScAddress(0,i,0));
- double fExcel = rDocRes.GetValue(ScAddress(0,i,0));
+ rDoc.GetValue(ScAddress(0,i,0)); // LO
+ rDocRes.GetValue(ScAddress(0,i,0)); // Excel
//because the random numbers will always change,so give the test "true"
- (void) fLibre;
- (void) fExcel;
CPPUNIT_ASSERT(true);
}
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 050cb6639773..baddcf5e9e5b 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2075,7 +2075,6 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
}
OSL_ENSURE( bFound, "member not found" );
- (void)bFound;
//TODO: use Hierarchy and Level in SaveData !!!!
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index ea430a54f962..4b8928dd3b38 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -2190,7 +2190,6 @@ void XclExpLinkManagerImpl5::FindExtSheet(
FindInternal( nDummyExtSheet, rnLastXclTab, nLastScTab );
}
- (void)pRefLogEntry; // avoid compiler warning
OSL_ENSURE( !pRefLogEntry, "XclExpLinkManagerImpl5::FindExtSheet - fill reflog entry not implemented" );
}
@@ -2375,7 +2374,6 @@ void XclExpLinkManagerImpl8::FindExtSheet(
sal_uInt16 XclExpLinkManagerImpl8::FindExtSheet( sal_Unicode cCode )
{
- (void)cCode; // avoid compiler warning
OSL_ENSURE( (cCode == EXC_EXTSH_OWNDOC) || (cCode == EXC_EXTSH_ADDIN),
"XclExpLinkManagerImpl8::FindExtSheet - unknown externsheet code" );
return InsertXti( maSBBuffer.GetXti( EXC_TAB_EXTERNAL, EXC_TAB_EXTERNAL ) );
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 222e4aa18300..1037dd1ca57b 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -620,11 +620,9 @@ void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBy
bool bRet = maCodec.Encode(&aBytes[nPos], nEncBytes, &aBytes[nPos], nEncBytes);
OSL_ENSURE(bRet, "XclExpBiff8Encrypter::EncryptBytes: encryption failed!!");
- (void) bRet; // to remove a silly compiler warning.
std::size_t nRet = rStrm.WriteBytes(&aBytes[nPos], nEncBytes);
OSL_ENSURE(nRet == nEncBytes, "XclExpBiff8Encrypter::EncryptBytes: fail to write to stream!!");
- (void) nRet; // to remove a silly compiler warning.
nStrmPos = rStrm.Tell();
nBlockOffset = GetOffsetInBlock(nStrmPos);
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 3926429a7b1f..4a0fe79b7063 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -169,7 +169,6 @@ void XclImpPCItem::ReadSxdatetime( XclImpStream& rStrm )
void XclImpPCItem::ReadSxempty( XclImpStream& rStrm )
{
- (void)rStrm; // avoid compiler warning
OSL_ENSURE( rStrm.GetRecSize() == 0, "XclImpPCItem::ReadSxempty - wrong record size" );
SetEmpty();
}
diff --git a/sc/source/filter/inc/worksheetsettings.hxx b/sc/source/filter/inc/worksheetsettings.hxx
index 5a8d9a47e627..7a23e7017f1f 100644
--- a/sc/source/filter/inc/worksheetsettings.hxx
+++ b/sc/source/filter/inc/worksheetsettings.hxx
@@ -81,8 +81,6 @@ public:
void importOutlinePr( const AttributeList& rAttribs );
/** Imports protection settings from the sheetProtection element. */
void importSheetProtection( const AttributeList& rAttribs );
- /** Imports enhanced protection settings from the protectedRanges element. */
- static void importProtectedRanges( const AttributeList& rAttribs );
/** Imports enhanced protection settings from the protectedRange element. */
void importProtectedRange( const AttributeList& rAttribs );
/** Imports protection settings from the sheetProtection element of a chart sheet. */
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index bb3cd8839c2d..1887efcd99ed 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1207,7 +1207,6 @@ OpCodeProviderImpl::OpCodeProviderImpl( const FunctionInfoVector& rFuncInfos,
initOpCode( OPCODE_DDE, aTokenMap, "DDE", nullptr );
OSL_ENSURE( bIsValid, "OpCodeProviderImpl::OpCodeProviderImpl - opcodes not initialized" );
- (void)bIsValid;
// OPCODE_PLUS_SIGN and OPCODE_ADD should be equal, otherwise "+" has to be passed above
OSL_ENSURE( OPCODE_PLUS_SIGN == OPCODE_ADD, "OpCodeProviderImpl::OpCodeProviderImpl - need opcode mapping for OPCODE_PLUS_SIGN" );
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index a91b17aef35b..703593747c22 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -389,7 +389,9 @@ ContextHandlerRef WorksheetFragment::onCreateContext( sal_Int32 nElement, const
case XLS_TOKEN( dimension ): importDimension( rAttribs ); break;
case XLS_TOKEN( sheetFormatPr ): importSheetFormatPr( rAttribs ); break;
case XLS_TOKEN( sheetProtection ): getWorksheetSettings().importSheetProtection( rAttribs ); break;
- case XLS_TOKEN( protectedRanges ): WorksheetSettings::importProtectedRanges( rAttribs ); return this;
+ case XLS_TOKEN( protectedRanges ):
+ // no attribs known (yet?)
+ return this;
case XLS_TOKEN( phoneticPr ): getWorksheetSettings().importPhoneticPr( rAttribs ); break;
case XLS_TOKEN( printOptions ): getPageSettings().importPrintOptions( rAttribs ); break;
case XLS_TOKEN( pageMargins ): getPageSettings().importPageMargins( rAttribs ); break;
diff --git a/sc/source/filter/oox/worksheetsettings.cxx b/sc/source/filter/oox/worksheetsettings.cxx
index 896df326e39c..74c6760a2db5 100644
--- a/sc/source/filter/oox/worksheetsettings.cxx
+++ b/sc/source/filter/oox/worksheetsettings.cxx
@@ -126,11 +126,6 @@ void WorksheetSettings::importSheetProtection( const AttributeList& rAttribs )
maSheetProt.mbSelectUnlocked = rAttribs.getBool( XML_selectUnlockedCells, false );
}
-void WorksheetSettings::importProtectedRanges( const AttributeList& rAttribs )
-{
- (void)rAttribs; // no attribs known (yet?)
-}
-
void WorksheetSettings::importProtectedRange( const AttributeList& rAttribs )
{
ScEnhancedProtection aProt;
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 2840bf46bfe2..a1f1b08eff6e 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -367,7 +367,6 @@ void ScMyStylesImportHelper::AddRange()
void ScMyStylesImportHelper::AddColumnStyle(const OUString& sStyleName, const sal_Int32 nColumn, const sal_Int32 nRepeat)
{
- (void)nColumn; // avoid warning in product version
OSL_ENSURE(static_cast<sal_uInt32>(nColumn) == aColDefaultStyles.size(), "some columns are absent");
ScMyStylesSet::iterator aItr(GetIterator(&sStyleName));
OSL_ENSURE(aItr != aCellStyles.end(), "no column default style");
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 481bd976b3f8..f6fb88942fc8 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -1660,12 +1660,10 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport,
{
OUString sAttrName = xAttrList->getNameByIndex( i );
OUString aLocalName;
- sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(
+ GetScImport().GetNamespaceMap().GetKeyByAttrName(
sAttrName, &aLocalName );
OUString sValue = xAttrList->getValueByIndex( i );
- (void)nPrefix; //! compare below!
-
if (IsXMLToken(aLocalName, XML_SOURCE_FIELD_NAME))
sGroupSource = sValue;
else if (IsXMLToken(aLocalName, XML_DATE_START))
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index aba3614f99cb..439a2d55838c 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2922,7 +2922,6 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
GetFormExport()->exportForms( xDrawPage );
bool bRet(GetFormExport()->seekPage( xDrawPage ));
OSL_ENSURE( bRet, "OFormLayerXMLExport::seekPage failed!" );
- (void)bRet; // avoid warning in product version
}
if (pSharedData->HasDrawPage())
{
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index 602b47fa2849..933190dd4069 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -69,7 +69,6 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&,
}
catch( const uno::RuntimeException& r )
{
- (void) r;
SAL_WARN("sc.ui", "Runtime exception caught while notifying shape. : " << r.Message);
}
}
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 080a8e2cc5d0..d2c0a234bb55 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -404,10 +404,8 @@ void ScDrawShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet )
}
}
-void ScDrawShell::Activate (const bool bMDI)
+void ScDrawShell::Activate (const bool)
{
- (void)bMDI;
-
ContextChangeEventMultiplexer::NotifyContextChange(
GetFrame()->GetFrame().GetController(),
vcl::EnumContext::GetContextEnum(
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 240434acd37c..98069a6a7080 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -241,10 +241,8 @@ VclPtr<vcl::Window> AlignmentPropertyPanel::Create (
}
void AlignmentPropertyPanel::DataChanged(
- const DataChangedEvent& rEvent)
-{
- (void)rEvent;
-}
+ const DataChangedEvent&)
+{}
void AlignmentPropertyPanel::HandleContextChange(
const vcl::EnumContext& rContext)
@@ -262,10 +260,8 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState,
- const bool bIsEnabled)
+ const bool)
{
- (void)bIsEnabled;
-
switch(nSID)
{
case SID_H_ALIGNCELL:
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index b50292dca6b5..f629d7b3e574 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -190,10 +190,8 @@ VclPtr<vcl::Window> CellAppearancePropertyPanel::Create (
}
void CellAppearancePropertyPanel::DataChanged(
- const DataChangedEvent& rEvent)
-{
- (void)rEvent;
-}
+ const DataChangedEvent&)
+{}
void CellAppearancePropertyPanel::HandleContextChange(const vcl::EnumContext& rContext)
{
@@ -210,10 +208,8 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState,
- const bool bIsEnabled)
+ const bool)
{
- (void)bIsEnabled;
-
switch(nSID)
{
case SID_FRAME_LINESTYLE:
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 937387ec2ece..e39d6f74431d 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -170,10 +170,8 @@ VclPtr<vcl::Window> NumberFormatPropertyPanel::Create (
}
void NumberFormatPropertyPanel::DataChanged(
- const DataChangedEvent& rEvent)
-{
- (void)rEvent;
-}
+ const DataChangedEvent&)
+{}
void NumberFormatPropertyPanel::HandleContextChange(
const vcl::EnumContext& rContext)
@@ -191,10 +189,8 @@ void NumberFormatPropertyPanel::NotifyItemUpdate(
sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState,
- const bool bIsEnabled)
+ const bool)
{
- (void)bIsEnabled;
-
switch(nSID)
{
case SID_NUMBER_TYPE_FORMAT:
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index 2a871058e5dd..7aba46f07e3a 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -81,7 +81,6 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB
bWasTemp = true;
}
OSL_ENSURE(bWasTemp, "Undo: didn't find database range");
- (void)bWasTemp;
pRet = pDoc->GetAnonymousDBData(nTab);
if (!pRet)
{
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index 15f324d98fc2..6d3cdc49c5c9 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -115,7 +115,6 @@ namespace calc
{
OSL_ENSURE( _nHandle == PROP_HANDLE_RANGE_ADDRESS, "OCellListSource::getFastPropertyValue: invalid handle!" );
// we only have this one property ....
- (void)_nHandle; // avoid warning in product version
_rValue <<= getRangeAddress( );
}
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 8a93c3c9206e..dc010291fa64 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -117,7 +117,6 @@ namespace calc
{
OSL_ENSURE( _nHandle == PROP_HANDLE_BOUND_CELL, "OCellValueBinding::getFastPropertyValue: invalid handle!" );
// we only have this one property ....
- (void)_nHandle; // avoid warning in product version
_rValue.clear();
Reference< XCellAddressable > xCellAddress( m_xCell, UNO_QUERY );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 01bd01c4ffc1..b1305add00f1 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1195,9 +1195,8 @@ bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, ScRang
ScRangeName* pRangeName = rDoc.GetRangeName(nCurTab);
if (pRangeName)
{
- bool bLocalName = pRangeName->findByUpperName(ScGlobal::pCharClass->uppercase(sAddress)) != nullptr;
- // TODO: Handle local names correctly.
- (void)bLocalName;
+ // TODO: Handle local names correctly:
+ // bool bLocalName = pRangeName->findByUpperName(ScGlobal::pCharClass->uppercase(sAddress)) != nullptr;
}
}
char aChar = 0;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 6a6f03e7a086..9a603cb37058 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -855,7 +855,6 @@ void ScDrawView::DeleteMarked()
ScDrawObjData* pCaptData = nullptr;
if( SdrObject* pCaptObj = GetMarkedNoteCaption( &pCaptData ) )
{
- (void)pCaptObj; // prevent 'unused variable' compiler warning in pro builds
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : nullptr;
::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : nullptr;