diff options
author | Damjan Jovanovic <damjan@apache.org> | 2017-11-09 05:54:17 +0000 |
---|---|---|
committer | Damjan Jovanovic <damjan@apache.org> | 2017-11-09 05:54:17 +0000 |
commit | 0bce5770176d642c311faf54f6fc5719ad713b23 (patch) | |
tree | 4e358743a6da30790fed38273dd39dfd8d362e1e | |
parent | 4ec4c84d175c5ede2a8b5f387c5639a1498917af (diff) |
#127044# - Defects in the code
Commit fixes for sub-issues 1, 2, 5, 9 and 10.
Found by: AppChecker <appchecker at cnpo.ru>
Patch by: me
Notes
Notes:
prefer: 12dc490c3af9ec0f34b513609f3b14effd5a2906
5 files changed, 6 insertions, 5 deletions
diff --git a/binaryurp/source/lessoperators.cxx b/binaryurp/source/lessoperators.cxx index b4fb149f80de..80945f13975c 100644 --- a/binaryurp/source/lessoperators.cxx +++ b/binaryurp/source/lessoperators.cxx @@ -40,7 +40,7 @@ bool operator<( const TypeDescription& rLeft, const TypeDescription& rRight) { OSL_ASSERT( rLeft.is() && rRight.is()); const typelib_TypeDescription& rA = *rLeft.get(); const typelib_TypeDescription& rB = *rRight.get(); - if( rA.eTypeClass != rA.eTypeClass) + if( rA.eTypeClass != rB.eTypeClass) return (rA.eTypeClass < rB.eTypeClass); const sal_Int32 nCmp = rtl_ustr_compare_WithLength( rA.pTypeName->buffer, rA.pTypeName->length, diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index a2ea3248f0b6..85288a2cfdff 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -360,7 +360,7 @@ sal_Unicode cNewLine(0x0a); { // Keep 'invalid' values at the TextSegment if( aTextSegment.SegmentStart != -1 && - aTextSegment.SegmentStart != -1 ) + aTextSegment.SegmentEnd != -1 ) { // #112814# Correct TextSegment by paragraph offset sal_Int32 nOffset(0); diff --git a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java b/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java index 02b4a03ab0f0..95f5e54948b9 100644 --- a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java +++ b/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java @@ -91,7 +91,7 @@ public class ConfigurePanel extends JPanel { this.classpath = classpath; if (descriptor != null) { - descriptor = descriptor; + this.descriptor = descriptor; } methodPanel.reload(this.basedir, this.classpath, diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 8f9e66a1f487..0b73ed8120fc 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -184,7 +184,8 @@ public: // loop throuzh the given names const AliasProgrammaticPair* pFields = _rFields.getConstArray(); - for (;pFields != pFields; ++pFields) + const AliasProgrammaticPair* pEnd = pFields + _rFields.getLength(); + for (;pFields != pEnd; ++pFields) { StringBagIterator aKnownPos = aKnownNames.find( pFields->ProgrammaticName ); if ( aKnownNames.end() != aKnownPos ) diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java index c7b036323e39..52cbb62de0dc 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java @@ -159,7 +159,7 @@ public class FontDescription implements BIFFRecord { return false; if (EndianConverter.readShort(dwHeight) != - EndianConverter.readShort(dwHeight)) + EndianConverter.readShort(rhs.dwHeight)) return false; if (this.getFont() != rhs.getFont()) |