diff options
68 files changed, 97 insertions, 301 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index f995d46017ce..a5344548e252 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -3463,10 +3463,10 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo bNeedsApply = true; } - catch ( uno::Exception& ) - { + catch ( uno::Exception& ) + { OSL_TRACE("Error restoring image"); - } + } break; } case ID_BEGIN_GROUP: diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index b423b1cc0627..57601d19cbfa 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -331,7 +331,7 @@ void SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT; else { - eProtocolTyp = INetProtocol::NotValid; + // not valid nPageId = GetCurPageId(); } break; diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 98064ce3ab95..2403bb9e5126 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -166,7 +166,7 @@ void SvBaseLinksDlg::dispose() *************************************************************************/ IMPL_LINK_TYPED( SvBaseLinksDlg, LinksSelectHdl, SvTreeListBox *, pSvTabListBox, void ) { - sal_uLong nSelectionCount = pSvTabListBox ? + const sal_uLong nSelectionCount = pSvTabListBox ? pSvTabListBox->GetSelectionCount() : 0; if(nSelectionCount > 1) { @@ -180,7 +180,6 @@ IMPL_LINK_TYPED( SvBaseLinksDlg, LinksSelectHdl, SvTreeListBox *, pSvTabListBox, { pSvTabListBox->SelectAll(false); pSvTabListBox->Select(pEntry); - nSelectionCount = 1; } else { @@ -277,9 +276,6 @@ IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, ManualClickHdl, Button*, void ) IMPL_LINK_NOARG_TYPED(SvBaseLinksDlg, UpdateNowClickHdl, Button*, void) { SvTabListBox& rListBox = *m_pTbLinks; - sal_uLong nSelCnt = rListBox.GetSelectionCount(); - if( 255 < nSelCnt ) - nSelCnt = 255; std::vector< SvBaseLink* > aLnkArr; std::vector< sal_Int16 > aPosArr; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index b954b3077708..fe08355c8e9d 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -667,13 +667,11 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ ) Sequence< OUString > aParamList = m_pParamDlg->GetParameters(); sal_Int32 i, nSize = aParamList.getLength(); rtl_uString** pParamArr = static_cast<rtl_uString**>(rtl_allocateMemory( sizeof(rtl_uString*) * nSize )); - rtl_uString** pParamArrIter = pParamArr; const OUString* pList = aParamList.getConstArray(); for ( i = 0; i < nSize; ++i ) pParamArr[i] = pList[i].pData; - eErr = jfw_setVMParameters( pParamArrIter, nSize ); + eErr = jfw_setVMParameters( pParamArr, nSize ); SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", "SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters"); (void)eErr; - pParamArrIter = pParamArr; rtl_freeMemory( pParamArr ); bModified = true; } diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 03155e4dfc7f..2b84c1f79346 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -490,7 +490,6 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder ) GetPathList( pPathImpl->nRealId, sInternal, sUser, sWritable, bReadOnly ); sUser = pPathImpl->sUserPath; sWritable = pPathImpl->sWritablePath; - sal_uInt16 nPos = pPathImpl->nRealId; // old path is an URL? INetURLObject aObj( sWritable ); @@ -512,7 +511,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder ) if ( bChanged ) { pPathBox->SetEntryText( Convert_Impl( sNewPathStr ), pEntry, 1 ); - nPos = (sal_uInt16)pPathBox->GetModel()->GetAbsPos( pEntry ); + sal_uInt16 nPos = (sal_uInt16)pPathBox->GetModel()->GetAbsPos( pEntry ); pPathImpl = static_cast<PathUserData_Impl*>(pPathBox->GetEntry(nPos)->GetUserData()); pPathImpl->eState = SfxItemState::SET; pPathImpl->sWritablePath = sNewPathStr; diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index d2e7fabda54e..d0d76c1be32a 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1587,8 +1587,8 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap ) sal::static_int_cast< sal_Int32 >( eCaseMap ) ); else { + // not mapped m_pEffectsLB->SetNoSelection(); - eCaseMap = SVX_CASEMAP_NOT_MAPPED; } UpdatePreview_Impl(); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 4af228b46e3d..30e1cd68fc5b 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -451,7 +451,6 @@ static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( return eStringId; } } - nIndex = 0; for(nIndex = 0; nIndex < SAL_N_ELEMENTS(aVertIds); ++nIndex) { if(aVertIds[nIndex].eHori == eStringId) @@ -1194,9 +1193,6 @@ IMPL_LINK_NOARG_TYPED(SvxSwPosSizeTabPage, RangeModifyHdl, Control&, void) m_aValidateLink.Call(aVal); - nWidth = aVal.nWidth; - nHeight = aVal.nHeight; - // minimum width also for style m_pHeightMF->SetMin(m_pHeightMF->Normalize(aVal.nMinHeight), FUNIT_TWIP); m_pWidthMF-> SetMin(m_pWidthMF->Normalize(aVal.nMinWidth), FUNIT_TWIP); diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 10dde93ce558..ac69822cac49 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -315,7 +315,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn { SvTreeListEntry* pFolder = GetEntryPosByName( *folder, pRootEntry ); if ( !pFolder ) - pFolder = InsertEntry( *folder, pRootEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderType ) ); + InsertEntry( *folder, pRootEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderType ) ); } } } diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 520d962d1d6f..aa7e3fdd1b47 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -336,7 +336,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath() DataSourceInfoConverter::convert(getORB(), m_pCollection,sOld,m_sURL,m_pImpl->getCurrentDataSource()); ::dbaccess::DATASOURCE_TYPE eType = VerifyDataSourceType(m_pCollection->determineType(m_sURL)); if (eType == ::dbaccess::DST_UNKNOWN) - eType = m_pCollection->determineType(m_sOldURL); + m_pCollection->determineType(m_sOldURL); activatePath( static_cast<PathId>(m_pCollection->getIndexOf(m_sURL) + 1), true); updateTypeDependentStates(); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 4db1645904ea..0278118472c9 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -830,19 +830,18 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R const OUString* pIter = aDestColumnNames.getConstArray(); ::std::vector< OUString> aInsertList; aInsertList.resize(aDestColumnNames.getLength()+1); - sal_Int32 i = 0; - for(size_t j=0; j < aInsertList.size() ;++i,++j) + for(size_t j=0; j < aInsertList.size(); ++j) { ODatabaseExport::TPositions::const_iterator aFind = ::std::find_if(_rvColumns.begin(),_rvColumns.end(), - [i] (const ODatabaseExport::TPositions::value_type& tPos) { return tPos.second == i+1; }); + [j] (const ODatabaseExport::TPositions::value_type& tPos) + { return tPos.second == (sal_Int32)(j+1); }); if ( _rvColumns.end() != aFind && aFind->second != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) && aFind->first != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) ) { OSL_ENSURE((aFind->first) < static_cast<sal_Int32>(aInsertList.size()),"aInsertList: Illegal index for vector"); - aInsertList[aFind->first] = ::dbtools::quoteName( aQuote,*(pIter+i)); + aInsertList[aFind->first] = ::dbtools::quoteName( aQuote,*(pIter+j)); } } - i = 1; // create the sql string ::std::vector< OUString>::const_iterator aInsertEnd = aInsertList.end(); for (::std::vector< OUString>::const_iterator aInsertIter = aInsertList.begin(); aInsertIter != aInsertEnd; ++aInsertIter) diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 3db08021bf1e..286ab7ee9aab 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -782,7 +782,6 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& ::connectivity::OSQLParseNode::absorptions(pNodeTmp); pNodeTmp = pTemp->getChild(1); OSQLParseNode::compress(pNodeTmp); - pNodeTmp = pTemp->getChild(1); } OUString sTemp; pNode->parseNodeToStr(sTemp,getConnection()); diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index a81b3767c012..33a8d33cd7b1 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -1380,15 +1380,14 @@ void annotateStyles( StatePool& rStatePoo const uno::Reference<xml::sax::XDocumentHandler>& xDocHdl, std::vector< uno::Reference<xml::dom::XElement> >& rUseElementVector ) { - bool maGradientNotFound = false; - AnnotatingVisitor aVisitor(rStatePool,rStateMap,rInitialState,xDocHdl,rUseElementVector, maGradientNotFound); + bool bGradientNotFound = false; + AnnotatingVisitor aVisitor(rStatePool, rStateMap, rInitialState, xDocHdl, rUseElementVector, bGradientNotFound); visitElements(aVisitor, rElem, STYLE_ANNOTATOR); //Sometimes, xlink:href in gradients refers to another gradient which hasn't been parsed yet. // if that happens, we'll need to parse the styles again, so everything gets referred. - if( maGradientNotFound ) + if( bGradientNotFound ) { - maGradientNotFound = false; visitElements(aVisitor, rElem, STYLE_ANNOTATOR); } } diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 6cc0ea141434..05486068bc1a 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -107,7 +107,6 @@ sal_Int32 OStartMarker::getMinHeight() const void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) { Size aSize(GetOutputSizePixel()); - long nSize = aSize.Width(); const long nCornerWidth = long(CORNER_SPACE * double(GetMapMode().GetScaleX())); if (isCollapsed()) @@ -117,7 +116,7 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* else { const long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); - nSize = aSize.Width() - nVRulerWidth; + long nSize = aSize.Width() - nVRulerWidth; aSize.Width() += nCornerWidth; rRenderContext.SetClipRegion(vcl::Region(rRenderContext.PixelToLogic(Rectangle(Point(), Size(nSize, aSize.Height()))))); diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index af2e5646adb4..4cd6bf28b3a5 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -3113,7 +3113,6 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 return false; bool bValid; - bool bFound; OUString aCellStr; SCSIZE nIndex = 0; SCROW nRow = nRow1; @@ -3149,7 +3148,7 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 // Second column field name if ((nIndex < 1) || bValid) { - bFound = false; + bool bFound = false; GetUpperCellString(nCol1 + 1, nRow, aCellStr); for (SCCOL i=rQueryParam.nCol1; (i <= nDBCol2) && (!bFound); i++) { @@ -3171,7 +3170,6 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 // Third column operator =<>... if (bValid) { - bFound = false; GetUpperCellString(nCol1 + 2, nRow, aCellStr); if (aCellStr.startsWith("<")) { diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index bf774147e2fa..1f6d896d6824 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -787,7 +787,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW bOk = false; else if ( nEndX == nCol2 ) // to up / down { - nEndX = nCol2 = nCol1; // use only first column + nCol2 = nCol1; // use only first column nSrcCount = nRow2 - nRow1 + 1; nIndex = ((long)nEndY) - nRow1; // can be negative if ( nEndY >= nRow1 ) diff --git a/sc/source/core/opencl/op_addin.cxx b/sc/source/core/opencl/op_addin.cxx index 76830c848616..21adfe3de934 100644 --- a/sc/source/core/opencl/op_addin.cxx +++ b/sc/source/core/opencl/op_addin.cxx @@ -204,9 +204,8 @@ void OpGestep::GenSlidingWindowFunction( ss << "{\n"; ss << " double tmp=0,tmp0 =0,tmp1 = 0;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx index e7fc6c1be0b9..e968deea2f09 100644 --- a/sc/source/core/opencl/op_financial.cxx +++ b/sc/source/core/opencl/op_financial.cxx @@ -2315,10 +2315,9 @@ void OpPMT::GenSlidingWindowFunction(std::stringstream &ss, ss<<" int gid0 = get_global_id(0);\n"; ss<<" double tmp0=0,tmp1=0,tmp2=0;\n"; ss<<" double tmp3=0,tmp4=0;\n"; - size_t i = vSubArguments.size(); ss <<"\n "; //while (i-- > 1) - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -2347,8 +2346,7 @@ void OpPMT::GenSlidingWindowFunction(std::stringstream &ss, } else { - ss <<" tmp"<<i<<"="<<vSubArguments[i]->GenSlidingWindowDeclRef( -); + ss <<" tmp"<<i<<"="<<vSubArguments[i]->GenSlidingWindowDeclRef(); ss <<";\n"; } } diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx index d9a16f7a7a13..b54330046365 100644 --- a/sc/source/core/opencl/op_statistical.cxx +++ b/sc/source/core/opencl/op_statistical.cxx @@ -1141,9 +1141,8 @@ void OpExponDist::GenSlidingWindowFunction(std::stringstream &ss, ss << " double tmp = 0,tmp0=0,tmp1=0,tmp2=0;\n"; ss << " int gid0 = get_global_id(0);\n"; ss << " double rx,rlambda,rkum;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -1231,9 +1230,8 @@ void OpFdist::GenSlidingWindowFunction(std::stringstream &ss, ss << " double tmp = 0,tmp0=0,tmp1=0,tmp2=0;\n"; ss << " int gid0 = get_global_id(0);\n"; ss << " double rF1,rF2,rX;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -3185,9 +3183,8 @@ void OpNegbinomdist::GenSlidingWindowFunction( ss << "{\n\t"; ss << "double f,s,p,tmp0,tmp1,tmp2;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -3683,9 +3680,8 @@ void OpConfidence::GenSlidingWindowFunction(std::stringstream& ss, ss << " double sigma = " << GetBottom() <<";\n"; ss << " double size = " << GetBottom() <<";\n"; ss << " double tmp0,tmp1,tmp2;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -3758,9 +3754,8 @@ void OpCritBinom::GenSlidingWindowFunction(std::stringstream& ss, ss << " double p = " << GetBottom() <<";\n"; ss << " double alpha = " << GetBottom() <<";\n"; ss << " double tmp0 = 0.0,tmp1 = 0.0,tmp2 = 0.0;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -3967,9 +3962,8 @@ void OpChiInv::GenSlidingWindowFunction( ss << "{\n"; ss << " double tmp0,tmp1,tmp;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n "; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -4052,9 +4046,8 @@ void OpNormdist::GenSlidingWindowFunction( ss << " double x,mue,sigma,c;\n"; ss << " int gid0=get_global_id(0);\n"; ss << " double tmp0,tmp1,tmp2,tmp3;\n"; - size_t i = vSubArguments.size(); ss <<"\n "; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -4129,9 +4122,8 @@ void OpNormsdist::GenSlidingWindowFunction( ss << "{\n"; ss << " double x = 0,tmp0 = 0;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n "; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -4189,9 +4181,8 @@ void OpPermut::GenSlidingWindowFunction( ss <<" double inB;\n"; ss <<" double tmp0,tmp1;\n"; ss <<" double tmp = 1 ;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -4301,9 +4292,8 @@ void OpPhi::GenSlidingWindowFunction( ss << "{\n"; ss << " double x,tmp0;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -4361,9 +4351,8 @@ void OpNorminv::GenSlidingWindowFunction( ss <<" double x,mue,sigma;\n"; ss <<" double tmp0,tmp1,tmp2;\n"; ss <<" int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -4574,9 +4563,8 @@ void OpNormsinv:: GenSlidingWindowFunction ss << "{\n"; ss << " double q,t,z,x,tmp0;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -5183,8 +5171,7 @@ void OpLogInv:: GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0=get_global_id(0);\n"; ss << " double tmp;\n"; ss << " double arg0,arg1,arg2,arg3;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -5540,8 +5527,7 @@ void OpLogNormDist::GenSlidingWindowFunction(std::stringstream &ss, ss << ") {\n"; ss << " int gid0=get_global_id(0);\n"; ss << " double arg0,arg1,arg2,arg3;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -5655,9 +5641,8 @@ void OpGammaDist::GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0=get_global_id(0);\n"; ss << " double tmp;\n"; ss << " double arg0,arg1,arg2,arg3;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -5751,9 +5736,8 @@ void OpChiDist::GenSlidingWindowFunction( ss << " double fx,fDF,tmp=0,tmp0=0,tmp1=0;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -5860,11 +5844,10 @@ void OpBinomdist::GenSlidingWindowFunction( ss << "{\n"; ss << " double tmp0,tmp1,tmp2,tmp3;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n "; //while (i-- > 1) - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -6028,9 +6011,8 @@ vSubArguments) ss << " int tmp2 = 1;\n"; } } - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -6116,9 +6098,8 @@ vSubArguments) { GenTmpVariables(ss,vSubArguments); CheckAllSubArgumentIsNan(ss,vSubArguments); - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -6191,9 +6172,8 @@ void OpGammaInv::GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0=get_global_id(0);\n"; ss << " double tmp;\n"; ss << " double arg0,arg1,arg2;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -6384,9 +6364,8 @@ void OpFInv::GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0=get_global_id(0);\n"; ss << " double tmp;\n"; ss << " double arg0,arg1,arg2;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -6670,8 +6649,7 @@ void OpB::GenSlidingWindowFunction(std::stringstream &ss, ss << " double min = 2.22507e-308;\n"; ss << " double tmp;\n"; ss << " double arg0,arg1,arg2,arg3;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -6826,9 +6804,8 @@ void OpPoisson::GenSlidingWindowFunction( ss << " double x,lambda,tmp,tmp0,tmp1,tmp2;\n"; ss << " int bCumulative;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n "; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -7219,9 +7196,8 @@ void OpBetaDist::GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0=get_global_id(0);\n"; ss << " double tmp;\n"; ss << " double arg0,arg1,arg2,arg3,arg4,arg5;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -7352,10 +7328,8 @@ void OpBetainv::GenSlidingWindowFunction( ss << "{\n"; ss << " double tmp0,tmp1,tmp2,tmp3,tmp4;\n"; ss << " int gid0=get_global_id(0);\n"; - size_t i = vSubArguments.size(); ss <<"\n "; - //while (i-- > 1) - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -7633,9 +7607,8 @@ void OpHypGeomDist::GenSlidingWindowFunction(std::stringstream &ss, ss << ") {\n"; ss << " int gid0=get_global_id(0);\n"; ss << " double arg0,arg1,arg2,arg3;\n"; - size_t i = vSubArguments.size(); - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -7759,9 +7732,8 @@ void OpMinA::GenSlidingWindowFunction( ss << "{\n"; ss << " int gid0=get_global_id(0);\n"; ss << " double tmp0 = 1.79769e+308;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -7909,10 +7881,9 @@ vSubArguments) ss << "{\n"; ss << " int gid0=get_global_id(0);\n"; ss << " double nCount = 0.0;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -8049,10 +8020,9 @@ vSubArguments) ss << "{\n"; ss << " int gid0=get_global_id(0);\n"; ss << " double tmp0 = 2.22507e-308;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); @@ -8201,9 +8171,8 @@ vSubArguments) ss << " int gid0=get_global_id(0);\n"; ss << " double tmp0 = 0.0;\n"; ss << " double nCount = 0.0;\n"; - size_t i = vSubArguments.size(); ss <<"\n"; - for (i = 0; i < vSubArguments.size(); i++) + for (size_t i = 0; i < vSubArguments.size(); i++) { FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 0c52378aae0b..69dfd23b3309 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -1055,8 +1055,6 @@ void ScAutoFormat::Load() insert(pData); } } - else - bRet = false; } } mbSaveLater = false; diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index c2b251c442f1..f55b6fe499dd 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -336,7 +336,6 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr) SCTAB nDBTab1 = s.Tab(); SCCOL nDBCol2 = e.Col(); - SCCOL nField = nDBCol1; bool bFound = false; OUString aCellStr; @@ -351,7 +350,7 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr) if (!bFound) aLook.IncCol(); } - nField = aLook.Col(); + SCCOL nField = aLook.Col(); return bFound ? nField : -1; } diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx index 6d98540d8d96..1849c4a897a6 100644 --- a/sc/source/filter/excel/exctools.cxx +++ b/sc/source/filter/excel/exctools.cxx @@ -213,8 +213,6 @@ ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR ) n--; } - n = nCref; - std::vector<ExcScenarioCell>::iterator iter; for (iter = aEntries.begin(); iter != aEntries.end(); ++iter) iter->SetValue(rIn.ReadUniString()); diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index 8deb70b32224..f7174e39ca9c 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -167,16 +167,12 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) { // setup new Format sal_uInt8 nL, nH; // Low-/High-Nibble - sal_uInt8 nForm = nFormat; - OUString aFormString; + OUString aFormString; sal_Int16 eType = css::util::NumberFormat::ALL; sal_uInt32 nIndex1; sal_uInt32 nHandle; NfIndexTableOffset eIndexTableOffset = NF_NUMERIC_START; - bool bDefault = false; - - if( nForm == 0xFF ) // Default-Format? - nForm = nDefaultFormat; + bool bDefault = false; // split into Low and High byte nL = nFormat & 0x0F; @@ -233,7 +229,6 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) css::util::NumberFormat::NUMBER, eLanguage ); aFormString = pFormTable->GenerateFormat(nIndex1, eLanguage, false, false, nL); - nIndex1 = 0; break; case 0x07: // Special format switch( nL ) diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index e6439c06d313..43731e0bd7df 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -1700,7 +1700,6 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) return; SCROW nStart; - SCROW nEnd; sal_uInt16 i; sal_uInt16 nLimit; sal_uInt16 nValue1; @@ -1708,12 +1707,11 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // Font (Name, Size) nStart = 0; - nEnd = 0; nLimit = aFont.Count; pColData = aFont.pData; for( i = 0 ; i < nLimit ; i++, pColData++ ) { - nEnd = static_cast<SCROW>(pColData->Row); + SCROW nEnd = static_cast<SCROW>(pColData->Row); if ((nStart <= nEnd) && (pColData->Value)) { FontFamily eFam = FAMILY_DONTKNOW; @@ -1742,12 +1740,11 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // Font color nStart = 0; - nEnd = 0; nLimit = aColor.Count; pColData = aColor.pData; for( i = 0 ; i < nLimit ; i++, pColData++ ) { - nEnd = static_cast<SCROW>(pColData->Row); + SCROW nEnd = static_cast<SCROW>(pColData->Row); if ((nStart <= nEnd) && (pColData->Value)) { Color TextColor(COL_BLACK); @@ -1761,12 +1758,11 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // Font attributes (Bold, Italic...) nStart = 0; - nEnd = 0; nLimit = aAttr.Count; pColData = aAttr.pData; for( i = 0 ; i < nLimit ; i++, pColData++ ) { - nEnd = static_cast<SCROW>(pColData->Row); + SCROW nEnd = static_cast<SCROW>(pColData->Row); nValue1 = pColData->Value; if ((nStart <= nEnd) && (nValue1)) { @@ -1786,12 +1782,11 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // Cell alignment nStart = 0; - nEnd = 0; nLimit = aJustify.Count; pColData = aJustify.pData; for( i = 0 ; i < nLimit ; i++, pColData++ ) { - nEnd = static_cast<SCROW>(pColData->Row); + SCROW nEnd = static_cast<SCROW>(pColData->Row); nValue1 = pColData->Value; if ((nStart <= nEnd) && (nValue1)) { @@ -1854,10 +1849,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) sal_uInt16 nColorIndexOld = nColorIndex; sal_uInt16 nFrameIndexOld = nColorIndex; - nEnd = 0; nStart = 0; while( !bEnd && nHelpMe ) { + SCROW nEnd = 0; pColData = &aFrame.pData[ nFrameIndex ]; sal_uInt16 nValue = pColData->Value; @@ -1973,7 +1968,6 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) sal_uInt16 nRasterIndex = 0; bEnd = false; nColorIndex = 0; - nEnd = 0; nStart = 0; // Special Fix... @@ -1982,6 +1976,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) while( !bEnd && nHelpMe ) { + SCROW nEnd = 0; sal_uInt16 nBColor = ( aColor.pData[ nColorIndex ].Value & 0x00F0 ) >> 4; sal_uInt16 nRColor = ( aColor.pData[ nColorIndex ].Value & 0x0F00 ) >> 8; Color aBColor( COL_BLACK ); @@ -2059,12 +2054,11 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // Number format nStart = 0; - nEnd = 0; nLimit = aValue.Count; pColData = aValue.pData; for (i=0; i<nLimit; i++, pColData++) { - nEnd = static_cast<SCROW>(pColData->Row); + SCROW nEnd = static_cast<SCROW>(pColData->Row); nValue1 = pColData->Value; if ((nStart <= nEnd) && (nValue1)) { @@ -2081,10 +2075,9 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // Cell attributes (protected, hidden...) nStart = 0; - nEnd = 0; for (i=0; i<aFlag.Count; i++) { - nEnd = static_cast<SCROW>(aFlag.pData[i].Row); + SCROW nEnd = static_cast<SCROW>(aFlag.pData[i].Row); if ((nStart <= nEnd) && (aFlag.pData[i].Value != 0)) { bool bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect); @@ -2100,11 +2093,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // Cell style nStart = 0; - nEnd = 0; ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); for (i=0; i<aPattern.Count; i++) { - nEnd = static_cast<SCROW>(aPattern.pData[i].Row); + SCROW nEnd = static_cast<SCROW>(aPattern.pData[i].Row); if ((nStart <= nEnd) && (aPattern.pData[i].Value != 0)) { sal_uInt16 nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 58464e015a78..bf7d87f22795 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -2931,7 +2931,6 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const Reference<sheet::XSpreadshe ExportFormatRanges(0, 0, pSharedData->GetLastColumn(nTable), pSharedData->GetLastRow(nTable), nTable); CloseRow(pSharedData->GetLastRow(nTable)); - nEqualCells = 0; if (pDoc) { diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index 6f9b95a47618..259ff2bad3c5 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -190,14 +190,13 @@ ScRange ScSamplingDialog::PerformPeriodicSampling(ScDocShell* pDocShell) ScAddress aEnd = mInputRange.aEnd; SCTAB outTab = mOutputAddress.Tab(); - SCCOL outCol = mOutputAddress.Col(); SCROW outRow = mOutputAddress.Row(); sal_Int64 aPeriod = mpPeriod->GetValue(); for (SCROW inTab = aStart.Tab(); inTab <= aEnd.Tab(); inTab++) { - outCol = mOutputAddress.Col(); + SCCOL outCol = mOutputAddress.Col(); for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++) { sal_Int64 i = 0; @@ -226,7 +225,6 @@ ScRange ScSamplingDialog::PerformRandomSampling(ScDocShell* pDocShell) ScAddress aEnd = mInputRange.aEnd; SCTAB outTab = mOutputAddress.Tab(); - SCCOL outCol = mOutputAddress.Col(); SCROW outRow = mOutputAddress.Row(); SCROW inRow; @@ -235,7 +233,7 @@ ScRange ScSamplingDialog::PerformRandomSampling(ScDocShell* pDocShell) for (SCROW inTab = aStart.Tab(); inTab <= aEnd.Tab(); inTab++) { - outCol = mOutputAddress.Col(); + SCCOL outCol = mOutputAddress.Col(); for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++) { SCROW aPopulationSize = (aEnd.Row() - aStart.Row()) + 1; diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index a97add2150b6..11af532458ab 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -1300,7 +1300,6 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) pAction = pAction->GetPrev(); } } - nEndOwn = pThisTrack->GetActionMax(); } else { diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 732cc2f1d70e..45562b8ce1ae 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -213,7 +213,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* OUString aIconMediaType; uno::Reference< io::XInputStream > xIconMetaFile; - sal_uInt16 nSlot = rReq.GetSlot(); + const sal_uInt16 nSlot = rReq.GetSlot(); const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT); if ( nSlot == SID_INSERT_OBJECT && pNameItem ) { @@ -224,7 +224,6 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* { if ( SvtModuleOptions().IsMath() ) { - nSlot = SID_INSERT_OBJECT; xObj = pViewShell->GetViewFrame()->GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( SvGlobalName( SO3_SM_CLASSID_60 ).GetByteSequence(), aName ); rReq.AppendItem( SfxGlobalNameItem( SID_INSERT_OBJECT, SvGlobalName( SO3_SM_CLASSID_60 ) ) ); } diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 6ce056b9cfcc..0b7414240f8a 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -347,7 +347,7 @@ private: void StartFormatArea(); bool TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bAttrChanged ); void DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, - bool bAttrChanged, bool bAddUndo ); + bool bAttrChanged ); void MarkAndJumpToRanges(const ScRangeList& rRanges); void CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartRow, diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index b69939b327b8..6abac7366c61 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -1339,11 +1339,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool ) SvTreeListEntry* pEntry=pTheView->GetHdlEntry(); if(pEntry!=nullptr) { - ScChangeAction* pScChangeAction=nullptr; - ScRedlinData *pEntryData=static_cast<ScRedlinData *>(pEntry->GetUserData()); - if(pEntryData!=nullptr) - pScChangeAction=static_cast<ScChangeAction*>(pEntryData->pData); if(pEntry->HasChildrenOnDemand()) { @@ -1355,7 +1351,7 @@ IMPL_LINK_TYPED( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool ) if(pEntryData!=nullptr) { - pScChangeAction=static_cast<ScChangeAction*>(pEntryData->pData); + ScChangeAction* pScChangeAction=static_cast<ScChangeAction*>(pEntryData->pData); GetDependents( pScChangeAction, aActionMap, pEntry ); @@ -1525,7 +1521,6 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartActi SvTreeListEntry* pEntry=pTheView->First(); - SvTreeListEntry* pNextEntry = (pEntry ? SvTreeListBox::NextSibling(pEntry) : nullptr); SvTreeListEntry* pLastEntry=nullptr; while(pEntry!=nullptr) { @@ -1541,6 +1536,7 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartActi if(nStartAction<=nAction && nAction<=nEndAction) bRemove=true; } + SvTreeListEntry* pNextEntry; if(bRemove) { nPos=pEntry->GetChildListPos(); diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 331870be1d15..ce339ccb5ef7 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -336,7 +336,7 @@ void CommandToolBox::Select( sal_uInt16 nSelId ) if ( nSelId == IID_ZOOMOUT || nSelId == IID_SCENARIOS ) { NavListMode eOldMode = rDlg.eListMode; - NavListMode eNewMode = eOldMode; + NavListMode eNewMode; if ( nSelId == IID_SCENARIOS ) { diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 9ad878153c41..42029fa47d5c 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3030,9 +3030,6 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un const SvxSearchItem& globalSearchOptions = ScGlobal::GetSearchItem(); SvxSearchItem newOptions( globalSearchOptions ); - sal_Int16 nLook = globalSearchOptions.GetWordOnly() ? excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole; - sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns; - uno::Reference< util::XReplaceable > xReplace( mxRange, uno::UNO_QUERY ); if ( xReplace.is() ) { @@ -3045,7 +3042,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un if ( LookAt.hasValue() ) { // sets SearchWords ( true is Cell match ) - nLook = ::comphelper::getINT16( LookAt ); + sal_Int16 nLook = ::comphelper::getINT16( LookAt ); bool bSearchWords = false; if ( nLook == excel::XlLookAt::xlPart ) bSearchWords = false; @@ -3061,7 +3058,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un // sets SearchByRow ( true for Rows ) if ( SearchOrder.hasValue() ) { - nSearchOrder = ::comphelper::getINT16( SearchOrder ); + sal_Int16 nSearchOrder = ::comphelper::getINT16( SearchOrder ); bool bSearchByRow = false; if ( nSearchOrder == excel::XlSearchOrder::xlByColumns ) bSearchByRow = false; @@ -3143,8 +3140,6 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L const SvxSearchItem& globalSearchOptions = ScGlobal::GetSearchItem(); SvxSearchItem newOptions( globalSearchOptions ); - sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns; - uno::Reference< util::XSearchable > xSearch( mxRange, uno::UNO_QUERY ); if( xSearch.is() ) { @@ -3209,7 +3204,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L // SearchOrder if ( SearchOrder.hasValue() ) { - nSearchOrder = ::comphelper::getINT16( SearchOrder ); + sal_Int16 nSearchOrder = ::comphelper::getINT16( SearchOrder ); bool bSearchByRow = false; if ( nSearchOrder == excel::XlSearchOrder::xlByColumns ) bSearchByRow = false; @@ -4359,7 +4354,7 @@ static void lcl_setTableFieldsFromCriteria( OUString& sCriteria1, uno::Reference } void SAL_CALL -ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const uno::Any& Operator, const uno::Any& Criteria2, const uno::Any& VisibleDropDown ) +ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const uno::Any& Operator, const uno::Any& Criteria2, const uno::Any& /*VisibleDropDown*/ ) throw (uno::RuntimeException, std::exception) { // Is there an existing autofilter @@ -4444,11 +4439,6 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const OUString sCriteria1; sal_Int32 nOperator = excel::XlAutoFilterOperator::xlAnd; - bool bVisible = true; - VisibleDropDown >>= bVisible; - - if ( bVisible == bHasAuto ) // dropdown is displayed/notdisplayed as required - bVisible = false; sheet::FilterConnection nConn = sheet::FilterConnection_AND; double nCriteria1 = 0; diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index a014832e15ce..797bf8667caf 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -568,8 +568,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) sal_uInt32 nKey; double fTmpVal; - bDoIt=false; - if( pReqArgs->HasItem( FID_FILL_SERIES, &pItem ) ) aFillDir = static_cast<const SfxStringItem*>(pItem)->GetValue(); if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) ) @@ -2244,7 +2242,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScViewData* pData = GetViewData(); ScDocument* pDoc = pData->GetDocument(); ScMarkData& rMark = pData->GetMarkData(); - bool bDone = false; if (!rMark.IsMarked() && !rMark.IsMultiMarked()) { @@ -2253,12 +2250,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if( pDoc->GetNote(aPos) ) { pData->GetDocShell()->GetDocFunc().ShowNote( aPos, bShowNote ); - bDone = true; } } else { // Check selection range + bool bDone = false; ScRangeListRef aRangesRef; pData->GetMultiArea(aRangesRef); ScRangeList aRanges = *aRangesRef; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 1a8ed514f6ec..e781d5acd462 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1787,7 +1787,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta pScMod->SetInputMode( SC_INPUT_TABLE ); bEEMouse = true; - bEditMode = pEditView->MouseButtonDown( rMEvt ); + pEditView->MouseButtonDown( rMEvt ); return; } } diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index a890c05e16bb..3dfb9e5efc5b 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -287,18 +287,14 @@ void ScPreviewShell::UpdateNeededScrollBars( bool bFromZoom ) aWindowSize.Height() += aWidthOffSet; } } - // recalculate any needed scrollbars - bHori = false; - bVert = false; + // recalculate any needed scrollbars long nMaxWidthPos = aPageSize.Width() - aWindowSize.Width(); if ( nMaxWidthPos<0 ) bHori = false; else bHori = true; - long nMaxHeightPos = aPageSize.Height() - aWindowSize.Height(); - if ( nMaxHeightPos < 0 ) bVert = false; else @@ -491,7 +487,7 @@ bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt ) if ( pData && pData->GetMode() == CommandWheelMode::ZOOM ) { long nOld = pPreview->GetZoom(); - long nNew = nOld; + long nNew; if ( pData->GetDelta() < 0 ) nNew = std::max( (long) MINZOOM, basegfx::zoomtools::zoomOut( nOld )); else diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index c10f41846538..9cd85e6028be 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -976,7 +976,7 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) const Fraction& rOldY = aViewData.GetZoomY(); long nOld = (long)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator()); - long nNew = nOld; + long nNew; if ( pData->GetMode() == CommandWheelMode::ZOOM_SCALE ) { nNew = 100 * (long) ((nOld / 100.0) * (pData->GetDelta() / 100.0)); diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index cca5f6ca1004..d5b151eca60a 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -951,7 +951,6 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, if (eActiveY == SC_SPLIT_BOTTOM && nCurY < (SCsROW)aViewData.GetFixPosY()) { ActivatePart( (eActiveX==SC_SPLIT_LEFT) ? SC_SPLIT_TOPLEFT : SC_SPLIT_TOPRIGHT ); - eActiveY = SC_SPLIT_TOP; } } diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 8a56bfd526b7..fa9ee6e5062d 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -698,8 +698,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) bool bDone = false; const SfxPoolItem* pItem; Color aColor; - if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) ) - nTabNr = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); if( pReqArgs->HasItem( nSlot, &pItem ) ) aColor = static_cast<const SvxColorItem*>(pItem)->GetValue(); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 18cccbf4123d..ed2414a2c516 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2587,8 +2587,6 @@ void ScViewFunc::MoveTable( pDestDoc = &pDestShell->GetDocument(); - SCTAB nTab = GetViewData().GetTabNo(); - if (pDestDoc != pDoc) { if (bNewDoc) @@ -2847,7 +2845,7 @@ void ScViewFunc::MoveTable( // No need to keep this around when we are not renaming. pTabNames.reset(); - nTab = GetViewData().GetTabNo(); + SCTAB nTab = GetViewData().GetTabNo(); if (bUndo) { diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 2e26c66afa5e..ead991170192 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -188,12 +188,10 @@ bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bAttrC } void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, - bool bAttrChanged, bool bAddUndo ) + bool bAttrChanged ) { ScDocShell* pDocSh = GetViewData().GetDocShell(); ScDocument& rDoc = pDocSh->GetDocument(); - if (bAddUndo && !rDoc.IsUndoEnabled()) - bAddUndo = false; const ScPatternAttr* pSource = rDoc.GetPattern( aFormatSource.Col(), aFormatSource.Row(), nTab ); @@ -555,7 +553,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged); if (bAutoFormat) - DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged, bRecord); + DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged); pDocSh->UpdateOle(&GetViewData()); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 148cd729ac8d..202a10faf212 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1169,36 +1169,6 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ ) { setDefaultOutlineNumberFormatBulletAndIndent(i, aNumberFormat); - - sal_uLong nFontSize = 20; - switch(i) - { - case 0: - { - nFontSize = 32; - } - break; - - case 1: - { - nFontSize = 32; - } - break; - - case 2: - { - nFontSize = 28; - } - break; - - case 3: - { - nFontSize = 24; - } - break; - } - - nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm rBulletFont.SetFontSize(Size(0,846)); // 24 pt aNumberFormat.SetBulletFont(&rBulletFont); aNumRule.SetLevel( i, aNumberFormat ); diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 757231d6fd87..45dff69dc894 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -1607,7 +1607,6 @@ void AnimationExporter::exportAnimate( SvStream& rStrm, const Reference< XAnimat sal_uInt32 nBits = 0x38; sal_Int16 nTmp = xAnimate->getCalcMode(); sal_uInt32 nCalcMode = /* (nTmp == AnimationCalcMode::FORMULA) ? 2 : */ (nTmp == AnimationCalcMode::LINEAR) ? 1 : 0; - nTmp = xAnimate->getValueType(); sal_uInt32 nValueType = GetValueTypeForAttributeName( xAnimate->getAttributeName() ); if ( aBy.hasValue() ) diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 956a6416dc6f..3f5369218e0b 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1843,7 +1843,7 @@ bool HtmlExport::CreateHtmlForPresPages() case presentation::ClickAction_NEXTPAGE: { - sal_uLong nPage = nSdPage; + sal_uLong nPage; if (nSdPage == mnSdPageCount - 1) nPage = mnSdPageCount - 1; else diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index b5f667e16bcb..4aca67629b21 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -757,7 +757,7 @@ bool Outliner::SearchAndReplaceOnce(std::vector<SearchSelection>* pSelections) } if (meMode == SEARCH) - nMatchCount = pOutlinerView->StartSearchAndReplace(*mpSearchItem); + pOutlinerView->StartSearchAndReplace(*mpSearchItem); } } } diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index ecac10c50861..ed686ee13472 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -92,8 +92,6 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( { SdDrawDocument* pDocument = mrViewShell.GetDoc(); SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false); SetOfByte aVisibleLayers; bool bHandoutMode = false; SdPage* pHandoutMPage = nullptr; @@ -197,8 +195,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( pCurrentPage->SetAutoLayout(aNewAutoLayout, true); - aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false); - aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false); + sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false); + sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false); aVisibleLayers.Set(aBckgrnd, bBVisible); aVisibleLayers.Set(aBckgrndObj, bBObjsVisible); pCurrentPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 52c7ffcbb09f..187cbf0879d7 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -412,8 +412,6 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) { rSet.DisableItem( SID_THES ); } - //! avoid putting the same item as SfxBoolItem at the end of this function - nSlotId = 0; } break; diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 40b1bf07d24b..b5a6927ee00a 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -644,10 +644,9 @@ void IndexTabPage_Impl::InitializeIndex() aIndex = aTempString; it = aInfo.insert(sfx2::KeywordInfo::value_type(aTempString, 0)).first; if ( (tmp = it->second++) != 0) - nPos = m_pIndexCB->InsertEntry(aTempString + OUString(append, tmp)); + m_pIndexCB->InsertEntry(aTempString + OUString(append, tmp)); else - nPos = m_pIndexCB->InsertEntry(aTempString); - } + m_pIndexCB->InsertEntry(aTempString); } } else aIndex.clear(); diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index e81cd61408b0..edeab91a3630 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -513,7 +513,6 @@ namespace svt // get the next state nCurrentState = nNextState; - nNextState = determineNextState(nCurrentState); // show the (n+1)th page if (!ShowPage(nCurrentState)) diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index e137bc612541..24f5c67881f7 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3466,20 +3466,11 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect ) nullptr != (pSmartTagList = pNode->GetSmartTags()) && !pNode->IsInProtectSect() ) { - sal_Int32 nCurrent = aPos.nContent.GetIndex(); - sal_Int32 nBegin = nCurrent; + sal_Int32 nBegin = aPos.nContent.GetIndex(); sal_Int32 nLen = 1; if( pSmartTagList->InWrongWord( nBegin, nLen ) && !pNode->IsSymbol(nBegin) ) { - const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin ); - const SwWrongList* pSubList = pSmartTagList->SubList( nIndex ); - if ( pSubList ) - { - pSmartTagList = pSubList; - nCurrent = eTmpState.m_pSpecialPos->nCharOfst; - } - // get smarttag word OUString aText( pNode->GetText().copy(nBegin, nLen) ); diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index ed6de582954b..685f2e58861a 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -815,8 +815,6 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes, SwTableNumFormatMerge aTNFM( *pCpyDoc, *pDoc ); - SwTableBox *pSttBox = rSelBoxes[0]; - _FndLine *pFLine, *pInsFLine = nullptr; _FndBox aFndBox( nullptr, nullptr ); // Find all Boxes/Lines @@ -858,7 +856,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes, // See if the Box count is high enough for the Lines SwTableLine* pLastLn = GetTabLines().back(); - pSttBox = pFLine->GetBoxes()[0]->GetBox(); + SwTableBox* pSttBox = pFLine->GetBoxes()[0]->GetBox(); const SwTableBoxes::size_type nSttBox = pFLine->GetLine()->GetTabBoxes().GetPos( pSttBox ); for( SwTableLines::size_type n = rCpyTable.GetTabLines().size() - nNewLns; n < rCpyTable.GetTabLines().size(); ++n ) @@ -902,7 +900,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const SwSelBoxes& rSelBoxes, // We have enough rows, so check the Boxes per row pFLine = aFndBox.GetLines()[ nLn % nFndCnt ].get(); SwTableLine* pLine = pFLine->GetLine(); - pSttBox = pFLine->GetBoxes()[0]->GetBox(); + SwTableBox* pSttBox = pFLine->GetBoxes()[0]->GetBox(); const SwTableBoxes::size_type nSttBox = pLine->GetTabBoxes().GetPos( pSttBox ); if( nLn >= nFndCnt ) { diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 703a3de9e519..7495094ec898 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -332,10 +332,9 @@ bool SwTextBlocks::Delete( sal_uInt16 n ) void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l ) { - sal_uInt16 nIdx = USHRT_MAX; if( pImp && !pImp->bInPutMuchBlocks ) { - pImp->nCur = nIdx; + pImp->nCur = USHRT_MAX; OUString aNew; OUString aLong; if( s ) @@ -367,8 +366,6 @@ void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l ) } pImp->CloseFile(); pImp->Touch(); - if( !nErr ) - nIdx = pImp->GetIndex( aNew ); } } diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 4acbda965b09..62abb301f07f 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -784,8 +784,6 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, { // the recursion may have damaged our font size SetPropFont( nOldProp ); - if ( !nOldProp ) - nOldProp = 100; GetInfo().GetFont()->SetProportion( 100 ); if ( m_pCurr == &static_cast<SwMultiPortion*>(pPor)->GetRoot() ) @@ -1715,8 +1713,6 @@ sal_Int32 SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoint, if( bChgNodeInner && pTmp->Frame().IsInside( aTmpPoint ) && !( pTmp->IsProtected() ) ) { - nLength = static_cast<SwFlyCntPortion*>(pPor)-> - GetFlyCursorOfst( nX, aTmpPoint, pPos, pCMS ); // After a change of the frame, our font must be still // available for/in the OutputDevice. // For comparison: Paint and new SwFlyCntPortion ! diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx index 3d355a0b2b3c..01e6f901cf1e 100644 --- a/sw/source/core/txtnode/ndhints.cxx +++ b/sw/source/core/txtnode/ndhints.cxx @@ -198,7 +198,6 @@ bool SwpHints::Check(bool bPortionsMerged) const // 3b) Stimmt die End-Sortierung? nIdx = *pHtEnd->GetAnyEnd(); CHECK_ERR( nIdx >= nLastEnd, "HintsCheck: ends are unsorted" ); - nLastEnd = nIdx; // 4b) IsLessEnd-Konsistenz if( pLastEnd ) diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index c2f4edd41b57..c6fe4d9d64bd 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -692,7 +692,6 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry nAttrEnd < nPaMEnd) { aCharStyles.realloc(0); - eNewState = PropertyState_AMBIGUOUS_VALUE; break; } else diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 1907c71adf7c..509c2e1be634 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -703,7 +703,6 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) } SwFormatCol aFormatCol; - nPrcWidth = 100; aFormatCol.Init( nCols, nGutter, USHRT_MAX ); aFrameItemSet.Put( aFormatCol ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 4649e0015b92..6cdca0372e8a 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2121,8 +2121,6 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts, // Ausserdem noch die Hoehe merken if( nCellHeight && 1==nRowSpan ) { - if( nCellHeight < MINLAY ) - nCellHeight = MINLAY; (*m_pRows)[nCurRow]->SetHeight(static_cast<sal_uInt16>(aTwipSz.Height())); } @@ -2666,8 +2664,6 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, sal_uInt16 nWidth2, nDummy; pLayoutInfo->GetAvail( nCol, nColSpan, nWidth2, nDummy ); - nWidth2 = nWidth2 - pLayoutInfo->GetLeftCellSpace( nCol, nColSpan ); - nWidth2 = nWidth2 - pLayoutInfo->GetRightCellSpace( nCol, nColSpan ); nWidth2 = static_cast< sal_uInt16 >(((long)nWidth * nPrcWidth) / 100); SwHTMLParser::ResizeDrawObject( pObj, nWidth2 ); diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 1773f8d6b42a..9be83bfda4b0 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -569,17 +569,6 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, const OUString *pCaption, bool bTopCaption, sal_uInt16 nHSpace, sal_uInt16 nVSpace ) const { - // Wert fuer FRAME bestimmen - sal_uInt16 nFrameMask = 15; - if( !(aRows.front())->bTopBorder ) - nFrameMask &= ~1; - if( !(aRows.back())->bBottomBorder ) - nFrameMask &= ~2; - if( !(aCols.front())->bLeftBorder ) - nFrameMask &= ~4; - if( !(aCols.back())->bRightBorder ) - nFrameMask &= ~8; - // Wert fur RULES bestimmen bool bRowsHaveBorder = false; bool bRowsHaveBorderOnly = true; diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index cfc0fada5d4e..870077a2dcfd 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -1279,8 +1279,6 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells(RowEndInners_t &rLastRowEnds) pRow->setTableBoxVector(pTableBoxes); pRow->setWidths(pWidths); - nShadows = 0; - ++aTopsIt; nRow++; } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 39b787907e99..0ca94150f4e1 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1957,7 +1957,6 @@ void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int rNearest = nNext; else rNearest = std::min( rNearest, nNext ); - bHasAnnotationMark = true; } } } diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 9d79e9e9fe8f..96e9c497c96d 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -194,13 +194,13 @@ void SwIndexMarkPane::InitControls() // read keywords primary std::vector<OUString> aArr; - nCount = pSh->GetTOIKeys( TOI_PRIMARY, aArr ); + pSh->GetTOIKeys( TOI_PRIMARY, aArr ); std::sort(aArr.begin(), aArr.end()); for (std::vector<OUString>::iterator it = aArr.begin(); it != aArr.end(); ++it) m_pKey1DCB->InsertEntry( *it ); // read keywords secondary - nCount = pSh->GetTOIKeys( TOI_SECONDARY, aArr ); + pSh->GetTOIKeys( TOI_SECONDARY, aArr ); std::sort(aArr.begin(), aArr.end()); for (std::vector<OUString>::iterator it = aArr.begin(); it != aArr.end(); ++it) m_pKey2DCB->InsertEntry( *it ); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index bc9da29d82d6..52e9380c2b49 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -893,7 +893,6 @@ OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) { aItemPresentation = SW_RESSTR(STR_WESTERN_FONT) + aItemPresentation; bHasWesternFontPrefix = true; - bIsDefault = true; } // no break; default: diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 6f2bf1a6497b..d664004075d4 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1771,8 +1771,6 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, { // it wasn't a storage, but maybe it's a useful stream } - - nFormat = nId; } if( pRead ) @@ -1801,7 +1799,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, } else { - if( rData.HasFormat( nFormat = SotClipboardFormatId::OBJECTDESCRIPTOR_OLE ) && rData.GetTransferableObjectDescriptor( nFormat, aObjDesc ) ) + if( rData.HasFormat( SotClipboardFormatId::OBJECTDESCRIPTOR_OLE ) && rData.GetTransferableObjectDescriptor( nFormat, aObjDesc ) ) { xStrm = rData.GetInputStream(SotClipboardFormatId::EMBED_SOURCE_OLE, OUString()); if (!xStrm.is()) diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 0c8e6367f0d0..7ceaf547d2aa 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -191,7 +191,6 @@ static void lcl_Highlight(const OUString& rSource, TextPortions& aPortionList) aTextPortion.eType = eFoundType; aPortionList.push_back( aTextPortion ); nInsert++; - eFoundType = svtools::HTMLUNKNOWN; } } diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 38b413ad1770..5d0571f4b054 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -1222,7 +1222,6 @@ bool SwFieldMgr::InsertField( SwSetExpField* pExpField = new SwSetExpField(pTyp, rData.m_sPar2, nFormatId); bExp = true; pField = pExpField; - nSubType = nsSwGetSetExpType::GSE_SEQ; break; } @@ -1649,7 +1648,6 @@ void SwFieldMgr::SetMacroPath(const OUString& rPath) sal_uLong SwFieldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter) { - double fValue; short nDefFormat; switch (nTypeId) @@ -1657,18 +1655,6 @@ sal_uLong SwFieldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumbe case TYP_TIMEFLD: case TYP_DATEFLD: { - Date aDate( Date::SYSTEM ); - Date* pNullDate = pFormatter->GetNullDate(); - - fValue = aDate - *pNullDate; - - tools::Time aTime( tools::Time::SYSTEM ); - - sal_uLong nNumFormatTime = (sal_uLong)aTime.GetSec() + (sal_uLong)aTime.GetMin() * 60L + - (sal_uLong)aTime.GetHour() * 3600L; - - fValue += (double)nNumFormatTime / 86400.0; - nDefFormat = (nTypeId == TYP_DATEFLD) ? css::util::NumberFormat::DATE : css::util::NumberFormat::TIME; } break; @@ -1676,12 +1662,10 @@ sal_uLong SwFieldMgr::GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumbe default: if (bIsText) { - fValue = 0.0; nDefFormat = css::util::NumberFormat::TEXT; } else { - fValue = 0.0; nDefFormat = css::util::NumberFormat::ALL; } break; diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index f6112005c3e0..c156d6e5bc47 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -754,7 +754,6 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) if( !pAdjust || IsInvalidItem( pAdjust )) { rSet.InvalidateItem( nSlotId ); - nSlotId = 0; } else { @@ -783,7 +782,6 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) if( !pLSpace || IsInvalidItem( pLSpace )) { rSet.InvalidateItem( nSlotId ); - nSlotId = 0; } else { diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 116d6644e3e4..f4428173b7f9 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -1703,7 +1703,6 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) bDisable |= bHtmlMode; //no contour available whenn no wrap or wrap through is set bDisable |= (nSurround == SURROUND_NONE || nSurround == SURROUND_THROUGHT); - bSet = rWrap.IsContour(); if( !bDisable ) { int nSel = rSh.GetSelectionType(); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index c848f3790f0b..624a13934810 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -300,7 +300,6 @@ void SwView::SelectShell() if ( !( m_nSelectionType & nsSelectionType::SEL_FOC_FRM_CTRL ) ) rDispatcher.Push( *m_pFormShell ); - eShellMode = SHELL_MODE_NAVIGATION; m_pShell = new SwNavigationShell( *this ); rDispatcher.Push( *m_pShell ); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index bce3daf1d48a..8c61c21a2163 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2152,7 +2152,6 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe default: OSL_ENSURE( false, "unknown SlotId!" ); bInsert = true; - nSlotId = SID_INSERTDOC; break; } diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 5ea4853e9b43..7e1dbc9bf935 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -806,7 +806,6 @@ void ServerFont::ApplyGlyphTransform( int nGlyphFlags, { // apply non-orthogonal or stretch transformations FT_Glyph_Transform( pGlyphFT, &aMatrix, nullptr ); - nAngle = 0; } } else |