summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx5
-rw-r--r--basic/source/runtime/methods.cxx4
-rw-r--r--chart2/qa/extras/chart2import.cxx3
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx5
-rw-r--r--cui/source/dialogs/SpellDialog.cxx6
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx7
-rw-r--r--extensions/source/update/check/updatecheck.cxx5
m---------helpcontent20
-rw-r--r--jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx14
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx4
-rw-r--r--sal/osl/w32/file_dirvol.cxx8
-rw-r--r--sal/osl/w32/profile.cxx13
-rw-r--r--sal/qa/osl/file/osl_File.cxx20
-rw-r--r--sal/qa/osl/security/osl_Security.cxx1
-rw-r--r--sax/source/tools/converter.cxx3
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/ftools/ftools.cxx4
-rw-r--r--sc/source/filter/qpro/qproform.cxx3
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx1
-rw-r--r--scripting/source/stringresource/stringresource.cxx5
-rw-r--r--sfx2/source/dialog/versdlg.cxx4
-rw-r--r--stoc/test/testintrosp.cxx4
-rw-r--r--svtools/source/contnr/svimpbox.cxx3
-rw-r--r--sw/qa/core/uwriter.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx7
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx2
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx2
-rw-r--r--vcl/osx/saldata.cxx3
-rw-r--r--vcl/quartz/salgdi.cxx4
-rw-r--r--vcl/source/gdi/animate.cxx6
-rw-r--r--vcl/source/window/taskpanelist.cxx2
-rw-r--r--vcl/win/source/app/salinst.cxx2
-rw-r--r--winaccessibility/source/UAccCOM/AccTextBase.cxx3
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx1
38 files changed, 65 insertions, 107 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 29630dc2003c..0b60a6f397a2 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -746,12 +746,9 @@ void EditorWindow::HandleProcedureCompletion()
sal_uLong nLine = aSel.GetStart().GetPara();
OUString aLine( pEditEngine->GetText( nLine ) );
- bool bFoundName = false;
OUString sProcType;
OUString sProcName;
-
- bFoundName = GetProcedureName(aLine, sProcType, sProcName);
-
+ bool bFoundName = GetProcedureName(aLine, sProcType, sProcName);
if (!bFoundName)
return;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 6ecdf30e1361..48e9d871202a 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -726,9 +726,9 @@ void implRemoveDirRecursive( const OUString& aDirPath )
File::remove( aPath );
}
}
- nRet = aDir.close();
+ aDir.close();
- nRet = Directory::remove( aDirPath );
+ Directory::remove( aDirPath );
}
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 7082077c4097..9d3d891c3b1d 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -765,7 +765,6 @@ void Chart2ImportTest::testNumberFormatsXLSX()
chart2::DataPointLabel aLabel;
sal_Int32 nNumberFormat;
bool bLinkNumberFormatToSource = false;
- bool bSuccess = false;
const sal_Int32 nChartDataNumberFormat = getNumberFormat(
xChartDoc, "_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"??_);_(@_)");
@@ -775,7 +774,7 @@ void Chart2ImportTest::testNumberFormatsXLSX()
CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent);
xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat);
- bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
+ bool bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat;
CPPUNIT_ASSERT_EQUAL(false, bSuccess);
bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource;
CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource);
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index a49be4491672..44377b08f22a 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -492,11 +492,10 @@ IMPL_LINK( ErrorBarResources, RangeChanged, Edit *, pEdit )
void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
{
const SfxPoolItem *pPoolItem = NULL;
- SfxItemState aState = SfxItemState::UNKNOWN;
// category
- m_eErrorKind = CHERROR_NONE;
- aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem );
+ m_eErrorKind = CHERROR_NONE;
+ SfxItemState aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem );
m_bErrorKindUnique = ( aState != SfxItemState::DONTCARE );
if( aState == SfxItemState::SET )
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index f8952df4c2ba..778a69aac695 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1313,8 +1313,6 @@ bool SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
TextView* pTextView = pTextEngine->GetActiveView();
const TextSelection& rCurrentSelection = pTextView->GetSelection();
//determine if the selection contains a field
- bool bHasField = false;
- bool bHasError = false;
bool bHasFieldLeft = false;
bool bHasErrorLeft = false;
@@ -1327,8 +1325,8 @@ bool SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
const TextCharAttrib* pBackAttrLeft = 0;
const TextCharAttrib* pErrorAttrLeft = 0;
- bHasField = pBackAttr != 0 && (bHasRange || pBackAttr->GetEnd() > aCursor.GetIndex());
- bHasError = pErrorAttr != 0 && (bHasRange || pErrorAttr->GetEnd() > aCursor.GetIndex());
+ bool bHasField = pBackAttr != 0 && (bHasRange || pBackAttr->GetEnd() > aCursor.GetIndex());
+ bool bHasError = pErrorAttr != 0 && (bHasRange || pErrorAttr->GetEnd() > aCursor.GetIndex());
if(bHasRange)
{
if(pBackAttr &&
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index a2490f3e4829..409469f82c26 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -420,10 +420,9 @@ sal_Int16 ODatabaseExport::CheckString(const OUString& aCheckToken, sal_Int16 _n
ensureFormatter();
if ( m_pFormatter && !m_sNumToken.isEmpty() )
{
- double fOutNumber = 0.0;
LanguageType eNumLang;
sal_uInt32 nFormatKey(0);
- fOutNumber = SfxHTMLParser::GetTableDataOptionsValNum(nFormatKey,eNumLang,m_sTextToken,m_sNumToken,*m_pFormatter);
+ double fOutNumber = SfxHTMLParser::GetTableDataOptionsValNum(nFormatKey,eNumLang,m_sTextToken,m_sNumToken,*m_pFormatter);
if ( eNumLang != LANGUAGE_NONE )
{
nFormatKey = m_pFormatter->GetFormatForLanguageIfBuiltIn( nFormatKey, eNumLang );
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 153579fdab2d..4c687b06bca0 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1347,8 +1347,11 @@ namespace
{
_pSelectionBrw->DuplicateConditionLevel( nLevel);
eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSearchCondition->getChild(0), nLevel,bHaving,bMustAddOrOnOneLine );
- ++nLevel;
- eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSearchCondition->getChild(2), nLevel,bHaving,bMustAddOrOnOneLine );
+ if ( eErrorCode == eOk )
+ {
+ ++nLevel;
+ eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSearchCondition->getChild(2), nLevel,bHaving,bMustAddOrOnOneLine );
+ }
}
else
eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSearchCondition, nLevel,bHaving,bMustAddOrOnOneLine );
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index ff448c2e881c..5ed8a941acc0 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -1487,7 +1487,7 @@ UpdateCheck::storeReleaseNote(sal_Int8 nNum, const OUString &rURL)
osl::FileBase::RC rc;
OUString aTargetDir( UpdateCheckConfig::getAllUsersDirectory() + "/sun" );
- rc = osl::Directory::createPath( aTargetDir );
+ osl::Directory::createPath( aTargetDir );
OUString aFileName = "releasenote" +
OUString::number( nNum ) +
@@ -1497,7 +1497,7 @@ UpdateCheck::storeReleaseNote(sal_Int8 nNum, const OUString &rURL)
rc = osl::FileBase::getAbsoluteFileURL( aTargetDir, aFileName, aFilePath );
if ( rc != osl::FileBase::E_None ) return false;
- rc = osl::File::remove( aFilePath );
+ osl::File::remove( aFilePath );
// don't store empty release notes, but delete old ones
if ( rURL.isEmpty() )
@@ -1505,7 +1505,6 @@ UpdateCheck::storeReleaseNote(sal_Int8 nNum, const OUString &rURL)
osl::File aFile( aFilePath );
rc = aFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
-
if ( rc != osl::FileBase::E_None ) return false;
OString aLineBuf("[InternetShortcut]\r\n");
diff --git a/helpcontent2 b/helpcontent2
-Subproject b340cfa8193a9b070e7ff2142764b4cf3c0ff7f
+Subproject f5fa46ed8626910d710fd535518ddf9e756f935
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index 5513d569fb6d..f1ef2cd38aff 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -51,9 +51,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fprintf(stdout, HELP_TEXT);// default
return 0;
}
- javaFrameworkError errcode = JFW_E_NONE;
sal_Bool bEnabled = sal_False;
- errcode = jfw_getEnabled( & bEnabled);
+ javaFrameworkError errcode = jfw_getEnabled( & bEnabled);
if (errcode == JFW_E_NONE && bEnabled == sal_False)
{
//Do not do any preparation because that may only slow startup time.
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index c72668d78070..66bfde5f02e6 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -441,11 +441,16 @@ bool getJavaProps(const OUString & exePath,
sClassPath += "/../Resources/java";
#endif
+#ifdef UNX
+ // Java is no longer required for a11y - we use atk directly.
+ bool bNoAccessibility = !isEnvVarSetToOne("JFW_PLUGIN_FORCE_ACCESSIBILITY");
+#else
//check if we shall examine a Java for accessibility support
//If the bootstrap variable is "1" then we pass the argument
//"noaccessibility" to JREProperties.class. This will prevent
//that it calls java.awt.Toolkit.getDefaultToolkit();
bool bNoAccessibility = isEnvVarSetToOne("JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY");
+#endif
//prepare the arguments
sal_Int32 cArgs = 3;
@@ -454,12 +459,6 @@ bool getJavaProps(const OUString & exePath,
OUString arg3("JREProperties");
OUString arg4 = "noaccessibility";
rtl_uString *args[4] = {arg1.pData, arg2.pData, arg3.pData};
-
-#ifdef UNX
- // Java is no longer required for a11y - we use atk directly.
- bNoAccessibility = !isEnvVarSetToOne("JFW_PLUGIN_FORCE_ACCESSIBILITY");
-#endif
-
// Only add the fourth param if the bootstrap parameter is set.
if (bNoAccessibility)
{
@@ -624,9 +623,8 @@ bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
DWORD dwIndex = 0;
const DWORD BUFFSIZE = 1024;
wchar_t bufVersion[BUFFSIZE];
- DWORD nNameLen = BUFFSIZE;
FILETIME fileTime;
- nNameLen = sizeof(bufVersion);
+ DWORD nNameLen = sizeof(bufVersion);
// Iterate over all subkeys of HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment
while (RegEnumKeyExW(hRoot, dwIndex, bufVersion, &nNameLen, NULL, NULL, NULL, &fileTime) != ERROR_NO_MORE_ITEMS)
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 38634586e8ea..0ca02f540cc6 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -1607,13 +1607,11 @@ XFColumns* LwpLayout::GetXFColumns()
for(sal_uInt16 nIndex = 0; nIndex<nCols; nIndex++)
{
XFColumn aColumn;
- sal_Int32 nWidth = static_cast<sal_Int32>(GetColWidth(nIndex));
- nWidth=8305/nCols; //relative width
+ sal_Int32 nWidth = 8305/nCols; //relative width
aColumn.SetRelWidth(nWidth);
//the left and right margins is 0;
double nGap = GetColGap(nIndex)/2;
- //nGap=0;
aColumn.SetMargins(nGap,nGap);
if(nIndex==0)
{
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index a5d060509463..d882c3d9962f 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -600,9 +600,7 @@ static DWORD create_dir_with_callback(
// user specified callback function. On success
// the function returns ERROR_SUCCESS else a Win32 error code.
- BOOL bCreated = FALSE;
-
- bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( dir_path )), NULL );
+ BOOL bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( dir_path )), NULL );
if ( bCreated )
{
@@ -702,9 +700,7 @@ oslFileError osl_createDirectoryWithFlags(rtl_uString * strPath, sal_uInt32)
if ( osl_File_E_None == error )
{
- BOOL bCreated = FALSE;
-
- bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( strSysPath )), NULL );
+ BOOL bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( strSysPath )), NULL );
if ( !bCreated )
{
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index eb9b779b14d0..0f51db39f032 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -1925,19 +1925,16 @@ static sal_Bool osl_ProfileSwapProfileNames(osl_TProfileImpl* pProfile)
static rtl_uString* osl_ProfileGenerateExtension(rtl_uString* ustrFileName, rtl_uString* ustrExtension)
{
- rtl_uString* ustrNewFileName=0;
+ rtl_uString* ustrNewFileName = 0;
rtl_uString* ustrOldExtension = 0;
- sal_Unicode* pExtensionBuf = 0;
- sal_Unicode* pFileNameBuf = 0;
- sal_Int32 nIndex = -1;
- pFileNameBuf = rtl_uString_getStr(ustrFileName);
+ sal_Unicode* pFileNameBuf = rtl_uString_getStr(ustrFileName);
- rtl_uString_newFromAscii(&ustrOldExtension,".");
+ rtl_uString_newFromAscii(&ustrOldExtension, ".");
- pExtensionBuf = rtl_uString_getStr(ustrOldExtension);
+ sal_Unicode* pExtensionBuf = rtl_uString_getStr(ustrOldExtension);
- nIndex = rtl_ustr_lastIndexOfChar(pFileNameBuf,*pExtensionBuf);
+ sal_Int32 nIndex = rtl_ustr_lastIndexOfChar(pFileNameBuf, *pExtensionBuf);
rtl_uString_newReplaceStrAt(&ustrNewFileName,
ustrFileName,
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 60ed44ac839d..eb3159bf68c7 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -313,9 +313,9 @@ inline bool ifFileExist( const ::rtl::OUString & str )
//check if the file can be written
inline bool ifFileCanWrite( const ::rtl::OUString & str )
{
- bool bCheckResult = false;
//on Windows, the file has no write right, but can be written
#ifdef WNT
+ bool bCheckResult = false;
::rtl::OUString aUStr = str.copy( 0 );
if ( isURL( str ) )
::osl::FileBase::getSystemPathFromFileURL( str, aUStr );
@@ -327,7 +327,7 @@ inline bool ifFileCanWrite( const ::rtl::OUString & str )
//on UNX, just test if open success with osl_File_OpenFlag_Write
#else
::osl::File testFile( str );
- bCheckResult = (osl::FileBase::E_None == testFile.open( osl_File_OpenFlag_Write ));
+ bool bCheckResult = (osl::FileBase::E_None == testFile.open( osl_File_OpenFlag_Write ));
#endif
return bCheckResult;
}
@@ -1397,13 +1397,13 @@ namespace osl_FileStatus
void isValid_002()
{
createTestFile( aTmpName6 );
- sal_uInt32 mask_file = ( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_Attributes |
+ sal_uInt32 mask_file = osl_FileStatus_Mask_Type | osl_FileStatus_Mask_Attributes |
osl_FileStatus_Mask_CreationTime | osl_FileStatus_Mask_AccessTime |
osl_FileStatus_Mask_ModifyTime | osl_FileStatus_Mask_FileSize |
- osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_FileURL) ;
- ::osl::FileStatus rFileStatus( mask_file );
- ::osl::FileBase::RC nError1 = ::osl::DirectoryItem::get( aTmpName6, rItem_file );
- nError1 = rItem_file.getFileStatus( rFileStatus );
+ osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_FileURL;
+ ::osl::FileStatus rFileStatus( mask_file );
+ ::osl::DirectoryItem::get( aTmpName6, rItem_file );
+ ::osl::FileBase::RC nError1 = rItem_file.getFileStatus( rFileStatus );
CPPUNIT_ASSERT_MESSAGE( errorToStr(nError1).getStr(), ::osl::FileBase::E_None == nError1 );
@@ -1413,7 +1413,7 @@ namespace osl_FileStatus
// sal_Bool bOk = rFileStatus.isValid( mask_file );
- check_FileStatus(rFileStatus);
+ check_FileStatus(rFileStatus);
deleteTestFile( aTmpName6 );
// CPPUNIT_ASSERT_MESSAGE( "test for isValid function: regular file mask fields test, #osl_FileStatus_Mask_CreationTime# should be valid field for regular file, but feedback is invalid",
@@ -2232,8 +2232,8 @@ namespace osl_File
nError1 = testFile.open( osl_File_OpenFlag_Create );
bool bOK = ( File::E_ACCES == nError1 );
-#if defined (WNT )
- bOK = sal_True; /// in Windows, you can create file in c:/ any way.
+#ifdef WNT
+ bOK = true; /// in Windows, you can create file in c:/ any way.
testFile.close();
deleteTestFile( aTestFile);
#endif
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index adba5867725c..46b884a3b9ed 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -359,7 +359,6 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
TCHAR tchBuffer[BUFSIZE]; // buffer for string
lpszSystemInfo = tchBuffer;
- cchBuff = BUFSIZE;
if( GetUserNameA(lpszSystemInfo, &cchBuff) )
strUserName = ::rtl::OUString::createFromAscii( lpszSystemInfo );
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 3ef609e2f288..8b077f11360d 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -818,12 +818,11 @@ bool Converter::convertDuration(double& rfTime,
{
if ( nDays )
nHours += nDays * 24; // add the days to the hours part
- double fTempTime = 0.0;
double fHour = nHours;
double fMin = nMins;
double fSec = nSecs;
double fFraction = sDoubleStr.toDouble();
- fTempTime = fHour / 24;
+ double fTempTime = fHour / 24;
fTempTime += fMin / (24 * 60);
fTempTime += fSec / (24 * 60 * 60);
fTempTime += fFraction / (24 * 60 * 60);
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index be2989021deb..b7c276781096 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5170,7 +5170,7 @@ void Test::testAreasWithNotes()
SCCOL col;
SCROW row;
- bool dataFound = false;
+ bool dataFound;
// only cell notes (empty content)
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 051cad915764..b636aff4ba2f 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -872,8 +872,6 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
rNoRotatedAnchor.maStartOffset = rData.maStartOffset;
rNoRotatedAnchor.maEndOffset = rData.maEndOffset;
- Rectangle aRect = pObj->GetLogicRect();
-
// get bounding rectangle of shape ( include any hidden row/columns ), <sigh> we need to do this
// because if the shape is rotated the anchor from xml is in terms of the unrotated shape, if
// the shape is hidden ( by the rows that contain the shape being hidden ) then our hack of
@@ -893,8 +891,6 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
// resize/position the shape to *full* size e.g. how it would be ( if no hidden rows/cols affected things )
pObj->SetLogicRect(aFullRect);
- // capture rotated shape ( if relevant )
- aRect = pObj->GetSnapRect();
// Ok, here is more nastyness, from xml the Anchor is in terms of the LogicRect which is the
// untransformed unrotated shape, here we swap out that initial anchor and from now on use
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 3d166cb1a89d..b473982b3cb6 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -280,7 +280,6 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm )
nStrLen = rStrm.ReaduInt32();
if( nStrLen )
{
- nStrLen = 0;
nStrLen = rStrm.ReaduInt32();
nStrLen /= 2; // it's byte count here...
rStrm.Ignore( 2 );
@@ -780,7 +779,6 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
// second formula
::std::unique_ptr< ScTokenArray > xTokArr2;
- nLen = 0;
nLen = rStrm.ReaduInt16();
rStrm.Ignore( 2 );
if( nLen > 0 )
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 698dc1425804..324c0e34c9fd 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -58,7 +58,7 @@ double ScfTools::ReadLongDouble( SvStream& rStrm )
{
/*
-" M a p p i n g - G u i d e " 10-Byte Intel
+"Mapping - Guide" 10-Byte Intel
77777777 77666666 66665555 55555544 44444444 33333333 33222222 22221111 11111100 00000000 x10
98765432 10987654 32109876 54321098 76543210 98765432 10987654 32109876 54321098 76543210 Bit-# total
@@ -69,7 +69,7 @@ SEEEEEEE EEEEEEEE IMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM
14321098 76543210 02109876 54321098 76543210 98765432 10987654 32109876 54321098 76543210 Bit in Group
*/
- long double lfDouble = 0.0;
+ long double lfDouble;
long double lfFakt = 256.0;
sal_uInt8 pDouble10[ 10 ];
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 21249ea28bc1..4a70e875e254 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -43,8 +43,7 @@ void QProToSc::ReadSRD( ScSingleRefData& rSRD, sal_Int8 nPage, sal_Int8 nCol, sa
if( nRelBit & 0x2000 )
{
- SCROW nRelRow = (~nTmp + 1);
- nRelRow = (sal_Int16)(nTmp << 3); // This looks weird... Mistake?
+ SCROW nRelRow = (sal_Int16)(nTmp << 3); // This looks weird... Mistake?
nRelRow /= 8;
rSRD.SetRelRow(nRelRow);
}
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index f3f2c70c9be6..693c7d9de4c9 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -304,7 +304,6 @@ void ScSheetLinkObj::setFileName(const OUString& rNewName)
// Links updaten
//! Undo !!!
- pLink = NULL; // wird bei UpdateLinks ungueltig
pDocShell->UpdateLinks(); // alter Link raus, evtl. neuen Link anlegen
// Daten kopieren
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 2b7fafe9d460..542f33188111 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1977,11 +1977,8 @@ bool StringResourcePersistenceImpl::implReadPropertiesFile
if( !xInputStream.is() || pLocaleItem == NULL )
return false;
- bool bSuccess = false;
Reference< io::XTextInputStream2 > xTextInputStream = io::TextInputStream::create( m_xContext );
- bSuccess = true;
-
xTextInputStream->setInputStream( xInputStream );
OUString aEncodingStr = OUString::createFromAscii
@@ -2092,7 +2089,7 @@ bool StringResourcePersistenceImpl::implReadPropertiesFile
rIndexMap[ aResourceID ] = pLocaleItem->m_nNextIndex++;
}
- return bSuccess;
+ return true;
}
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 47ec3a6c6f0b..46f18b97e16e 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -387,8 +387,8 @@ IMPL_LINK_NOARG(SfxVersionDialog, SelectHdl_Impl)
m_pViewButton->Enable(bEnable);
const SfxPoolItem *pDummy=NULL;
- SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy );
- eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy );
+ pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy );
+ SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy );
m_pCompareButton->Enable(bEnable && eState >= SfxItemState::DEFAULT);
return 0L;
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index b8ae54460a8c..43ea55c1cc76 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -850,9 +850,9 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
Any aObjAny = getIntrospectionTestObject( xMgr );
// inspect introspection service
+ xIntrospection->inspect( aObjAny );
+ xIntrospection->inspect( aObjAny );
Reference< XIntrospectionAccess > xAccess = xIntrospection->inspect( aObjAny );
- xAccess = xIntrospection->inspect( aObjAny );
- xAccess = xIntrospection->inspect( aObjAny );
OSL_ENSURE( xAccess.is(), "introspection failed, no XIntrospectionAccess returned" );
if( !xAccess.is() )
return sal_False;
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 8771f040b965..f4a1deebd2e2 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -420,9 +420,8 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta )
}
else
{
- long nScroll = nRealDelta * (-1);
Rectangle aArea( GetVisibleArea() );
- nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta);
+ long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta);
nScroll = -nScroll;
pView->Update();
pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index d1e74600fb58..f4e03a060feb 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -320,7 +320,7 @@ SwTextNode* getModelToViewTestDocument(SwDoc *pDoc)
SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc)
{
- SwTextNode* pTextNode = getModelToViewTestDocument(pDoc);
+ getModelToViewTestDocument(pDoc);
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
@@ -336,7 +336,7 @@ SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc)
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries);
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(sal_Int32(0));
pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("CCCCC"));
- pTextNode = aPaM.GetNode().GetTextNode();
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11),
pTextNode->GetText().getLength());
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 21140f319830..cfeea16433b8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -662,11 +662,8 @@ DECLARE_OOXMLEXPORT_TEST(testParagraphWithComments, "paragraphWithComments.docx"
if(!pXmlDoc)
return;
- sal_Int32 idInDocXml = 0;
- sal_Int32 idInCommentXml = -1; //intentionally assigning -1 so that it differs from idInDocXml
- //and also because getXpath does not assert.
- idInDocXml = getXPath(pXmlDoc,"/w:document/w:body/w:p[3]/w:commentRangeEnd[1]","id").toInt32();
- idInCommentXml = getXPath(pXmlComm,"/w:comments/w:comment[1]","id").toInt32();
+ sal_Int32 idInDocXml = getXPath(pXmlDoc,"/w:document/w:body/w:p[3]/w:commentRangeEnd[1]","id").toInt32();
+ sal_Int32 idInCommentXml = getXPath(pXmlComm,"/w:comments/w:comment[1]","id").toInt32();
CPPUNIT_ASSERT_EQUAL( idInDocXml, idInCommentXml );
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 21c559d58edc..8d87dea14a5f 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -1031,8 +1031,6 @@ void ControlModelContainerBase::implUpdateGroupStructure()
// it's a radio button, but on a different page
// -> we open a new group for it
- // close the old group
- aCurrentGroup = maGroups.end();
#if OSL_DEBUG_LEVEL > 1
aCurrentGroupLabels.clear();
#endif
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 3569638d3b2a..a4efa32dd943 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -36,7 +36,7 @@ namespace skeletonmaker {
void printLicenseHeader(std::ostream& o, rtl::OString const & filename)
{
- sal_Int32 index = -1;
+ sal_Int32 index;
#ifdef SAL_UNX
index = filename.lastIndexOf('/');
#else
diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx
index 7008011d4df8..1dff45e2aee5 100644
--- a/vcl/osx/saldata.cxx
+++ b/vcl/osx/saldata.cxx
@@ -71,8 +71,7 @@ SalData::~SalData()
if( s_aAutoReleaseKey )
{
// release the last pool
- NSAutoreleasePool* pPool = nil;
- pPool = reinterpret_cast<NSAutoreleasePool*>( osl_getThreadKeyData( s_aAutoReleaseKey ) );
+ NSAutoreleasePool* pPool = reinterpret_cast<NSAutoreleasePool*>( osl_getThreadKeyData( s_aAutoReleaseKey ) );
if( pPool )
{
osl_setThreadKeyData( s_aAutoReleaseKey, NULL );
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 025d873c2f98..f900bfa949aa 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -323,10 +323,8 @@ static bool AddTempDevFont(const OUString& rFontFileURL)
CFStringRef rFontPath = CFStringCreateWithCString(NULL, aCFileName.getStr(), kCFStringEncodingUTF8);
CFURLRef rFontURL = CFURLCreateWithFileSystemPath(NULL, rFontPath, kCFURLPOSIXPathStyle, true);
- bool success = false;
-
CFErrorRef error;
- success = CTFontManagerRegisterFontsForURL(rFontURL, kCTFontManagerScopeProcess, &error);
+ bool success = CTFontManagerRegisterFontsForURL(rFontURL, kCTFontManagerScopeProcess, &error);
if (!success)
{
CFRelease(error);
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 4dd37f8381e2..5578cf6ffb3f 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -733,11 +733,11 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation )
SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
{
- Bitmap aBmp;
- sal_uLong nStmPos = rIStm.Tell();
+ Bitmap aBmp;
+ sal_uLong nStmPos;
sal_uInt32 nAnimMagic1, nAnimMagic2;
SvStreamEndian nOldFormat = rIStm.GetEndian();
- bool bReadAnimations = false;
+ bool bReadAnimations = false;
rIStm.SetEndian( SvStreamEndian::LITTLE );
nStmPos = rIStm.Tell();
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 9b4767e59430..cf2a0cb51520 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -161,7 +161,7 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent)
bool bForward = !aKeyCode.IsShift();
if( aKeyCode.GetCode() == KEY_F6 && ! aKeyCode.IsMod2() ) // F6
{
- bool bSplitterOnly = false;
+ bool bSplitterOnly;
bool bFocusInList = false;
bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift();
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 3fb511a810d0..eb39ad32725e 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -313,7 +313,7 @@ bool WinSalInstance::CheckYieldMutex()
void SalData::initKeyCodeMap()
{
- UINT nKey = 0xffffffff;
+ UINT nKey;
#define initKey( a, b )\
nKey = LOWORD( VkKeyScan( a ) );\
if( nKey < 0xffff )\
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index 156ef30c21eb..597aeceb2b40 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -938,8 +938,7 @@ STDMETHODIMP CAccTextBase::put_XInterface(hyper pXInterface)
static OUString ReplaceOneChar(OUString oldOUString, OUString replacedChar, OUString replaceStr)
{
- int iReplace = -1;
- iReplace = oldOUString.lastIndexOf(replacedChar);
+ int iReplace = oldOUString.lastIndexOf(replacedChar);
if (iReplace > -1)
{
for(;iReplace>-1;)
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index e05f25f2b287..746dae311a7f 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -431,7 +431,6 @@ int AccObjectWinManager::UpdateAccSelection(XAccessible* pXAcc)
continue;
}
- pAccChildObj = NULL;
pAccChildObj = GetAccObjByXAcc(pRChild.get());
if(!pAccChildObj)
{