Author: damjan Date: Thu Nov 9 05:54:17 2017 New Revision: 1814705 URL: http://svn.apache.org/viewvc?rev=1814705&view=rev Log: #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 Modified: openoffice/trunk/main/binaryurp/source/lessoperators.cxx openoffice/trunk/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx openoffice/trunk/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java openoffice/trunk/main/svtools/source/dialogs/addresstemplate.cxx openoffice/trunk/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java Modified: openoffice/trunk/main/binaryurp/source/lessoperators.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/binaryurp/source/lessoperators.cxx?rev=1814705&r1=1814704&r2=1814705&view=diff ============================================================================== --- openoffice/trunk/main/binaryurp/source/lessoperators.cxx (original) +++ openoffice/trunk/main/binaryurp/source/lessoperators.cxx Thu Nov 9 05:54:17 2017 @@ -40,7 +40,7 @@ bool operator<( const TypeDescription& r 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, Modified: openoffice/trunk/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx?rev=1814705&r1=1814704&r2=1814705&view=diff ============================================================================== --- openoffice/trunk/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx (original) +++ openoffice/trunk/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx Thu Nov 9 05:54:17 2017 @@ -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); Modified: openoffice/trunk/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java URL: http://svn.apache.org/viewvc/openoffice/trunk/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java?rev=1814705&r1=1814704&r2=1814705&view=diff ============================================================================== --- openoffice/trunk/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java (original) +++ openoffice/trunk/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java Thu Nov 9 05:54:17 2017 @@ -91,7 +91,7 @@ public class ConfigurePanel extends JPan this.classpath = classpath; if (descriptor != null) { - descriptor = descriptor; + this.descriptor = descriptor; } methodPanel.reload(this.basedir, this.classpath, Modified: openoffice/trunk/main/svtools/source/dialogs/addresstemplate.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/dialogs/addresstemplate.cxx?rev=1814705&r1=1814704&r2=1814705&view=diff ============================================================================== --- openoffice/trunk/main/svtools/source/dialogs/addresstemplate.cxx (original) +++ openoffice/trunk/main/svtools/source/dialogs/addresstemplate.cxx Thu Nov 9 05:54:17 2017 @@ -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 ) Modified: openoffice/trunk/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java?rev=1814705&r1=1814704&r2=1814705&view=diff ============================================================================== --- openoffice/trunk/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java (original) +++ openoffice/trunk/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java Thu Nov 9 05:54:17 2017 @@ -159,7 +159,7 @@ public class FontDescription implements return false; if (EndianConverter.readShort(dwHeight) != - EndianConverter.readShort(dwHeight)) + EndianConverter.readShort(rhs.dwHeight)) return false; if (this.getFont() != rhs.getFont())