editeng/source/misc/svxacorr.cxx | 56 ++++------ filter/source/svg/gfxtypes.hxx | 2 qadevOOo/tests/java/ifc/configuration/backend/_XSchemaSupplier.java | 6 - qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java | 8 - qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java | 2 qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java | 1 swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java | 2 wizards/com/sun/star/wizards/db/TableDescriptor.java | 8 - 8 files changed, 43 insertions(+), 42 deletions(-)
New commits: commit d86963b5e84eebf102676efeb718b5bd05515f31 Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:23:01 2016 +0000 coverity#1326294 Dereference after null check Change-Id: I057b9ef27bd84ac9875fa6ce8321ff03e0f879e6 diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XSchemaSupplier.java b/qadevOOo/tests/java/ifc/configuration/backend/_XSchemaSupplier.java index d273877..aee858b 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XSchemaSupplier.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XSchemaSupplier.java @@ -36,9 +36,9 @@ public class _XSchemaSupplier extends MultiMethodTest { if (aSchema == null) { log.println("\treturned Layer is NULL -- FAILED"); + } else { + res &= checkSchema(aSchema); } - - res &= checkSchema(aSchema); } catch (com.sun.star.configuration.backend.BackendAccessException e) { log.println("Unexpected Exception (" + e + ") -- FAILED"); res &= false; @@ -106,4 +106,4 @@ public class _XSchemaSupplier extends MultiMethodTest { return res; } -} \ No newline at end of file +} diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java index 3ead3c9..33eb0cf 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java @@ -50,8 +50,7 @@ public class _XSingleLayerStratum extends MultiMethodTest { if (aLayer == null) { log.println("\treturned Layer is NULL -- FAILED"); - } - else { + } else { res &= checkLayer(aLayer); } } catch (com.sun.star.configuration.backend.BackendAccessException e) { @@ -89,8 +88,7 @@ public class _XSingleLayerStratum extends MultiMethodTest { if (aLayer == null) { log.println("\treturned Layer is NULL -- FAILED"); - } - else { + } else { res &= checkLayer(aLayer); } } catch (com.sun.star.configuration.backend.BackendAccessException e) { commit ba05bd50ffe87550e40c39b0ebd0443692f876a9 Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:21:43 2016 +0000 coverity#1326291 Dereference after null check Change-Id: Ie5e3d749284514649edbb7e8dfd753a112feeb31 diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java index abb2089..3ead3c9 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java @@ -90,8 +90,9 @@ public class _XSingleLayerStratum extends MultiMethodTest { if (aLayer == null) { log.println("\treturned Layer is NULL -- FAILED"); } - - res &= checkLayer(aLayer); + else { + res &= checkLayer(aLayer); + } } catch (com.sun.star.configuration.backend.BackendAccessException e) { log.println("unexpected Exception -- FAILED"); res = false; commit 0189c1c34816d3b168f109f7af2596e447902b19 Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:21:08 2016 +0000 coverity#1326290 Dereference after null check Change-Id: I4a028603cbc413ecb670a39da49538819cd15242 diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java index 31fbdc1..abb2089 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XSingleLayerStratum.java @@ -51,8 +51,9 @@ public class _XSingleLayerStratum extends MultiMethodTest { if (aLayer == null) { log.println("\treturned Layer is NULL -- FAILED"); } - - res &= checkLayer(aLayer); + else { + res &= checkLayer(aLayer); + } } catch (com.sun.star.configuration.backend.BackendAccessException e) { log.println("unexpected Exception -- FAILED"); res = false; commit a62d8270c91c8fc6c05cf277e14def7f385fd783 Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:19:10 2016 +0000 coverity#1326302 Explicit null dereferenced Change-Id: I4d7e7791bc9e7338b7db495da4b5c57a2566b280 diff --git a/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java b/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java index d141a3c..3906e7b 100644 --- a/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java +++ b/qadevOOo/tests/java/ifc/system/_XSystemShellExecute.java @@ -78,6 +78,7 @@ public class _XSystemShellExecute extends MultiMethodTest { } catch (com.sun.star.uno.Exception e) { log.println("Couldn't create SimpleFileAccess:" + e); tRes.tested("execute()", false); + return; } log.println("Waiting while the file will be created or timeout "+ commit 20156f4ab2962e25f71903c0b0903c3a954eb320 Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:16:58 2016 +0000 coverity#1326423 Dereference null return value Change-Id: Ic9f10dbae01e432bd1029c091b20187b8cf939ec diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index c2ce80c..e83ea5b 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -235,12 +235,12 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen for (int i = 0; i < columncontainer.size(); i++) { XPropertySet xColPropertySet = getByIndex(i); - if (!isColunnNameDuplicate(xNameAccessColumns, xColPropertySet)) + if (xColPropertySet != null && !isColunnNameDuplicate(xNameAccessColumns, xColPropertySet)) { xAppendColumns.appendByDescriptor(xColPropertySet); //xColPropertySet.setPropertyValue("Type", 32423) - } - else - { + } + else + { breturn = false; } } commit 506d18aa3bfc966b79f447dfc850c547568be7cd Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:14:59 2016 +0000 coverity#1326416 Dereference null return value Change-Id: I8c215da294d6c48d37849c25c40d8632f1949fba diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java index 72f3cea..92f9d2c 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java +++ b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java @@ -471,7 +471,7 @@ public class _XDataPilotTable2 extends MultiMethodTest private boolean checkDrillDownSheetContent(XSpreadsheet xSheet, Object[][] data) { CellAddress lastCell = getLastUsedCellAddress(xSheet, 0, 0); - if (data.length <= 0 || lastCell.Row == 0 || lastCell.Column == 0) + if (data.length <= 0 || lastCell == null || lastCell.Row == 0 || lastCell.Column == 0) { log.println("empty data condition"); return false; commit 65abc5e30181d68baf47e18d2b7b0292be7f92f1 Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:13:19 2016 +0000 coverity#1326413 Dereference null return value Change-Id: Icd3728ca151ede50ab41ad7fbb150a3054df6739 diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java index 0ff4cfa..9ac41d4 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java @@ -318,7 +318,7 @@ public class WikiPropDialog extends WikiDialog{ { try { - if ( m_aWikiEditor != null ) + if (m_aWikiEditor != null && aWikiSettings != null) { m_bAction = m_aWikiEditor.SendArticleImpl( WikiPropDialog.this, aWikiSettings); commit 570087e762613d83a40943244ddf2951d63c3375 Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 10:07:17 2016 +0000 coverity#3148472 Unused value Change-Id: I9acdfe0edf8468c6efb708ca13109abe2be0b826 diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index cbebcf4..5f46cf4 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1210,7 +1210,6 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, sal_Int32 nInsPos, sal_Unicode cChar, bool bInsert, vcl::Window* pFrameWin ) { - sal_uLong nRet = 0; bool bIsNextRun = bRunNext; bRunNext = false; // if it was set, then it has to be turned off @@ -1222,7 +1221,6 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, IsAutoCorrFlag( IgnoreDoubleSpace ) && ' ' == rTxt[ nInsPos - 1 ]) { - nRet = IgnoreDoubleSpace; break; } @@ -1240,7 +1238,6 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, ( cEnDash && cEnDash == cPrev ); InsertQuote( rDoc, nInsPos, cChar, bSttQuote, bInsert ); - nRet = bSingle ? ChgSglQuotes : ChgQuotes; break; } @@ -1255,7 +1252,7 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, if ( NeedsHardspaceAutocorr( cChar ) && FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos ) ) ) { - nRet = AddNonBrkSpace; + ; } else if ( bIsNextRun && !IsAutoCorrectChar( cChar ) ) { @@ -1272,7 +1269,6 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, if ( cTmpChar == cNonBreakingSpace ) { rDoc.Delete( nPos, nPos + 1 ); - nRet = AddNonBrkSpace; bContinue = false; } else if ( !NeedsHardspaceAutocorr( cTmpChar ) || nPos == 0 ) @@ -1295,9 +1291,10 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, // Set bold or underline automatically? if (('*' == cChar || '_' == cChar) && (nPos+1 < rTxt.getLength())) { - if( IsAutoCorrFlag( ChgWeightUnderl ) && - FnChgWeightUnderl( rDoc, rTxt, 0, nPos+1 ) ) - nRet = ChgWeightUnderl; + if( IsAutoCorrFlag( ChgWeightUnderl ) ) + { + FnChgWeightUnderl( rDoc, rTxt, 0, nPos+1 ); + } break; } @@ -1353,7 +1350,6 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, if( bChgWord ) { - nRet = Autocorrect; if( !aPara.isEmpty() ) { sal_Int32 nEnd = nCapLttrPos; @@ -1362,24 +1358,26 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, ++nEnd; // Capital letter at beginning of paragraph? - if( IsAutoCorrFlag( CapitalStartSentence ) && + if( IsAutoCorrFlag( CapitalStartSentence ) ) + { FnCapitalStartSentence( rDoc, aPara, false, - nCapLttrPos, nEnd, eLang ) ) - nRet |= CapitalStartSentence; + nCapLttrPos, nEnd, eLang ); + } - if( IsAutoCorrFlag( ChgToEnEmDash ) && - FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nEnd, eLang ) ) - nRet |= ChgToEnEmDash; + if( IsAutoCorrFlag( ChgToEnEmDash ) ) + { + FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nEnd, eLang ); + } } break; } } - if( ( IsAutoCorrFlag( nRet = ChgOrdinalNumber ) && + if( ( IsAutoCorrFlag( ChgOrdinalNumber ) && (nInsPos >= 2 ) && // fdo#69762 avoid autocorrect for 2e-3 ( '-' != cChar || 'E' != toupper(rTxt[nInsPos-1]) || '0' > rTxt[nInsPos-2] || '9' < rTxt[nInsPos-2] ) && FnChgOrdinalNumber( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) || - ( IsAutoCorrFlag( nRet = SetINetAttr ) && + ( IsAutoCorrFlag( SetINetAttr ) && ( ' ' == cChar || '\t' == cChar || 0x0a == cChar || !cChar ) && FnSetINetAttr( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) ) ; @@ -1388,36 +1386,36 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, bool bLockKeyOn = pFrameWin && (pFrameWin->GetIndicatorState() & KeyIndicatorState::CAPSLOCK); bool bUnsupported = lcl_IsUnsupportedUnicodeChar( rCC, rTxt, nCapLttrPos, nInsPos ); - nRet = 0; if ( bLockKeyOn && IsAutoCorrFlag( CorrectCapsLock ) && FnCorrectCapsLock( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) { // Correct accidental use of cAPS LOCK key (do this only when // the caps or shift lock key is pressed). Turn off the caps // lock afterwords. - nRet |= CorrectCapsLock; pFrameWin->SimulateKeyPress( KEY_CAPSLOCK ); } // Capital letter at beginning of paragraph ? if( !bUnsupported && - IsAutoCorrFlag( CapitalStartSentence ) && - FnCapitalStartSentence( rDoc, rTxt, true, nCapLttrPos, nInsPos, eLang ) ) - nRet |= CapitalStartSentence; + IsAutoCorrFlag( CapitalStartSentence ) ) + { + FnCapitalStartSentence( rDoc, rTxt, true, nCapLttrPos, nInsPos, eLang ); + } // Two capital letters at beginning of word ?? if( !bUnsupported && - IsAutoCorrFlag( CapitalStartWord ) && - FnCapitalStartWord( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) - nRet |= CapitalStartWord; + IsAutoCorrFlag( CapitalStartWord ) ) + { + FnCapitalStartWord( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ); + } - if( IsAutoCorrFlag( ChgToEnEmDash ) && - FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) - nRet |= ChgToEnEmDash; + if( IsAutoCorrFlag( ChgToEnEmDash ) ) + { + FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ); + } } } while( false ); - SAL_INFO_IF(nRet != 0, "editeng", "DoAutoCorrect: did " << nRet); } SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList( commit d4b403c37fc46592c5d768127f440ba4e170504b Author: Caolán McNamara <[email protected]> Date: Fri Jan 15 09:37:10 2016 +0000 coverity#1348471 related Unitialized scalar field add mnParentFontSize to same places that use mnFontSize Change-Id: I4cf1e7439361b65de0f12028b819a4d7c8124ca2 diff --git a/filter/source/svg/gfxtypes.hxx b/filter/source/svg/gfxtypes.hxx index 6de5e9e..ff09189 100644 --- a/filter/source/svg/gfxtypes.hxx +++ b/filter/source/svg/gfxtypes.hxx @@ -244,6 +244,7 @@ inline bool operator==(const State& rLHS, const State& rRHS ) rLHS.mbIsText==rRHS.mbIsText && rLHS.maFontFamily==rRHS.maFontFamily && rLHS.mnFontSize==rRHS.mnFontSize && + rLHS.mnParentFontSize==rRHS.mnParentFontSize && rLHS.maFontStyle==rRHS.maFontStyle && rLHS.maFontVariant==rRHS.maFontVariant && rLHS.mnFontWeight==rRHS.mnFontWeight && @@ -297,6 +298,7 @@ namespace std ^ size_t(rState.mbIsText) ^ size_t(rState.maFontFamily.hashCode()) ^ std::hash<double>()(rState.mnFontSize) + ^ std::hash<double>()(rState.mnParentFontSize) ^ size_t(rState.maFontStyle.hashCode()) ^ size_t(rState.maFontVariant.hashCode()) ^ std::hash<double>()(rState.mnFontWeight)
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
