You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2023/02/28 14:16:45 UTC
[openoffice] 02/02: #127044# - Defects in the code
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 441693ebd5224cbcf861f80a400de51a591b769d
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Thu Nov 9 05:54:17 2017 +0000
#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
git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1814705 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit f1d3244ef953db9afc1728bb7d37a8d1a9c2d8bc)
---
main/binaryurp/source/lessoperators.cxx | 2 +-
main/editeng/source/accessibility/AccessibleStaticTextBase.cxx | 2 +-
main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java | 2 +-
main/svtools/source/dialogs/addresstemplate.cxx | 3 ++-
.../xmerge/converter/xml/sxc/pexcel/records/FontDescription.java | 2 +-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/main/binaryurp/source/lessoperators.cxx b/main/binaryurp/source/lessoperators.cxx
index 1ac542b6cf..c6337c52dd 100644
--- a/main/binaryurp/source/lessoperators.cxx
+++ b/main/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/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index fe02f258e3..31b5e1b80b 100644
--- a/main/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/main/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/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java b/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java
index 52dd0fac38..a3b4b7f1cf 100644
--- a/main/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java
+++ b/main/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/main/svtools/source/dialogs/addresstemplate.cxx b/main/svtools/source/dialogs/addresstemplate.cxx
index 8e7095454e..92e3938b15 100644
--- a/main/svtools/source/dialogs/addresstemplate.cxx
+++ b/main/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/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java b/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java
index bced43bb2d..4a67218dc2 100644
--- a/main/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java
+++ b/main/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())