(openoffice) 01/04: #i122754# Base does not properly parse CSV files as per RFC-4180 (while Calc does)

2024-07-22 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 6c882b5c20df170aa3c6a6f38eba607112d35db7
Author: damjan 
AuthorDate: Sun Apr 3 15:02:59 2016 +

#i122754# Base does not properly parse CSV files as per RFC-4180 (while
Calc does)

The flat file driver, in file
main/connectivity/source/drivers/flat/ETable.cxx, method
OFlatTable::fillColumns(), which reads lines to initialize columns,
assumes fields in the header and the first few lines never continue onto
the next line(s). This causes truncation of columns when they do.

Read all lines using the readLine() method instead of
SvStream::ReadByteStringLine(), which takes overflow onto next lines into
account. Also implement a new version of readLine() which allows reading
into an arbitrary string, as opposed to m_aCurrentLine only.

Patch by: me

git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1737591 
13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 6b41ff7abde450fb0368489eb47c02e30b544097)
---
 main/connectivity/source/drivers/flat/ETable.cxx | 30 ++--
 main/connectivity/source/inc/flat/ETable.hxx |  1 +
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/main/connectivity/source/drivers/flat/ETable.cxx 
b/main/connectivity/source/drivers/flat/ETable.cxx
index 478e86efae..396d9df6d7 100644
--- a/main/connectivity/source/drivers/flat/ETable.cxx
+++ b/main/connectivity/source/drivers/flat/ETable.cxx
@@ -72,26 +72,26 @@ void OFlatTable::fillColumns(const 
::com::sun::star::lang::Locale& _aLocale)
 
QuotedTokenizedString aHeaderLine;
OFlatConnection* pConnection = (OFlatConnection*)m_pConnection;
-const rtl_TextEncoding nEncoding = m_pConnection->getTextEncoding();
 const sal_Bool bHasHeaderLine = pConnection->isHeaderLine();
+sal_Int32 nCurPos;
if ( bHasHeaderLine )
{
while(bRead && !aHeaderLine.Len())
{
-   bRead = 
m_pFileStream->ReadByteStringLine(aHeaderLine,nEncoding);
+   bRead = readLine(aHeaderLine, nCurPos);
}
 m_nStartRowFilePos = m_pFileStream->Tell();
}
 
// read first row
QuotedTokenizedString aFirstLine;
-   bRead = m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding);
+   bRead = readLine(aFirstLine, nCurPos);
 
if ( !bHasHeaderLine || !aHeaderLine.Len())
{
while(bRead && !aFirstLine.Len())
{
-   bRead = 
m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding);
+   bRead = readLine(aFirstLine, nCurPos);
}
// use first row as headerline because we need the number of 
columns
aHeaderLine = aFirstLine;
@@ -155,7 +155,7 @@ void OFlatTable::fillColumns(const 
::com::sun::star::lang::Locale& _aLocale)
}
 ++nRowCount;
 }
-while(nRowCount < nMaxRowsToScan && 
m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding) && 
!m_pFileStream->IsEof());
+while(nRowCount < nMaxRowsToScan && readLine(aFirstLine,nCurPos) && 
!m_pFileStream->IsEof());
 
 for (xub_StrLen i = 0; i < nFieldCount; i++)
 {
@@ -894,22 +894,27 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement 
eCursorPosition, sal_Int
 }
 // 
-
 sal_Bool OFlatTable::readLine(sal_Int32& _rnCurrentPos)
+{
+return readLine(m_aCurrentLine, _rnCurrentPos);
+}
+// 
-
+sal_Bool OFlatTable::readLine(QuotedTokenizedString& line, sal_Int32& 
_rnCurrentPos)
 {
 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "ocke.jans...@sun.com", 
"OFlatTable::readLine" );
 const rtl_TextEncoding nEncoding = m_pConnection->getTextEncoding();
-m_pFileStream->ReadByteStringLine(m_aCurrentLine,nEncoding);
-   if (m_pFileStream->IsEof())
-   return sal_False;
+m_pFileStream->ReadByteStringLine(line,nEncoding);
+if (m_pFileStream->IsEof())
+return sal_False;
 
-QuotedTokenizedString sLine = m_aCurrentLine; // check if the string 
continues on next line
+QuotedTokenizedString sLine = line; // check if the string continues on 
next line
 while( (sLine.GetString().GetTokenCount(m_cStringDelimiter) % 2) != 1 )
 {
 m_pFileStream->ReadByteStringLine(sLine,nEncoding);
 if ( !m_pFileStream->IsEof() )
 {
-m_aCurrentLine.GetString().Append('\n');
-m_aCurrentLine.GetString() += sLine.GetStr

(openoffice) 03/04: Fix a string limit error in my previous patch.

2024-07-22 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit dd133a3a6af1f5f887e98c0f25e106c82e84178d
Author: damjan 
AuthorDate: Sun Apr 17 16:56:00 2016 +

Fix a string limit error in my previous patch.

Patch by: me

git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1739631 
13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit ab01ac79e0467416147c6ad674c82b0a44adb5a3)
---
 main/connectivity/source/drivers/flat/ETable.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/connectivity/source/drivers/flat/ETable.cxx 
b/main/connectivity/source/drivers/flat/ETable.cxx
index af28717c07..0f0e576b3d 100644
--- a/main/connectivity/source/drivers/flat/ETable.cxx
+++ b/main/connectivity/source/drivers/flat/ETable.cxx
@@ -910,7 +910,7 @@ sal_Bool OFlatTable::readLine(QuotedTokenizedString& line, 
sal_Int32& _rnCurrent
 xub_StrLen nLastOffset = 0;
 bool isQuoted = false;
 bool isFieldStarting = true;
-while (true)
+while (sLine.Len() < STRING_MAXLEN)
 {
 bool wasQuote = false;
 const sal_Unicode *p;



(openoffice) 02/04: Make CSV line parsers consistent with CSV field parsers.

2024-07-22 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 2cbc43e98ea7b5f261a50824b6707a1bf176f0b7
Author: damjan 
AuthorDate: Sun Apr 17 16:44:43 2016 +

Make CSV line parsers consistent with CSV field parsers.

Our CSV field parsing algorithms treats fields starting with a quote
(immediately at the beginning of the row, or after the field delimiter) as
quoted. A quoted field ends at the corresponding closing quote, and any
remaining text between the closing quote and the next field delimeter or end
of line is appended to the text already extracted from the field, but not
processed further. Any quotes in this extra text are taken verbatim - they
do not quote anything.

Our CSV line parsers were big hacks - they essentially read and concatenate
lines until an even number of quote characters is found, and then feed this
through the CSV field parsers.

This patch rewrites the line parsers to work exactly how the field parsers
work. Text such as:
"another" ",something else
is now correctly parsed by both Calc and Base as:
[another "],[something else]
instead of breaking all further parsing.

Patch by: me

git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1739628 
13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit bc1fc15f4dddfc075a011a1203c162b446e72868)
---
 main/connectivity/source/drivers/flat/ETable.cxx | 62 +---
 main/tools/source/stream/stream.cxx  | 59 +++---
 2 files changed, 97 insertions(+), 24 deletions(-)

diff --git a/main/connectivity/source/drivers/flat/ETable.cxx 
b/main/connectivity/source/drivers/flat/ETable.cxx
index 396d9df6d7..af28717c07 100644
--- a/main/connectivity/source/drivers/flat/ETable.cxx
+++ b/main/connectivity/source/drivers/flat/ETable.cxx
@@ -907,14 +907,64 @@ sal_Bool OFlatTable::readLine(QuotedTokenizedString& 
line, sal_Int32& _rnCurrent
 return sal_False;
 
 QuotedTokenizedString sLine = line; // check if the string continues on 
next line
-while( (sLine.GetString().GetTokenCount(m_cStringDelimiter) % 2) != 1 )
+xub_StrLen nLastOffset = 0;
+bool isQuoted = false;
+bool isFieldStarting = true;
+while (true)
 {
-m_pFileStream->ReadByteStringLine(sLine,nEncoding);
-if ( !m_pFileStream->IsEof() )
+bool wasQuote = false;
+const sal_Unicode *p;
+p = sLine.GetString().GetBuffer();
+p += nLastOffset;
+
+while (*p)
 {
-line.GetString().Append('\n');
-line.GetString() += sLine.GetString();
-sLine = line;
+if (isQuoted)
+{
+if (*p == m_cStringDelimiter)
+wasQuote = !wasQuote;
+else
+{
+if (wasQuote)
+{
+wasQuote = false;
+isQuoted = false;
+if (*p == m_cFieldDelimiter)
+isFieldStarting = true;
+}
+}
+}
+else
+{
+if (isFieldStarting)
+{
+isFieldStarting = false;
+if (*p == m_cStringDelimiter)
+isQuoted = true;
+else if (*p == m_cFieldDelimiter)
+isFieldStarting = true;
+}
+else if (*p == m_cFieldDelimiter)
+isFieldStarting = true;
+}
+++p;
+}
+
+if (wasQuote)
+isQuoted = false;
+
+if (isQuoted)
+{
+nLastOffset = sLine.Len();
+m_pFileStream->ReadByteStringLine(sLine,nEncoding);
+if ( !m_pFileStream->IsEof() )
+{
+line.GetString().Append('\n');
+line.GetString() += sLine.GetString();
+sLine = line;
+}
+else
+break;
 }
 else
 break;
diff --git a/main/tools/source/stream/stream.cxx 
b/main/tools/source/stream/stream.cxx
index 67e5b370d0..8de4768ceb 100644
--- a/main/tools/source/stream/stream.cxx
+++ b/main/tools/source/stream/stream.cxx
@@ -1128,38 +1128,59 @@ sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool 
bEmbeddedLineBreak,
 {
 const sal_Unicode* pSeps = rFieldSeparators.GetBuffer();
 xub_StrLen nLastOffset = 0;
-xub_StrLen nQuotes = 0;
+bool isQuoted = false;
+bool isFieldStarting = true;
 while (!IsEof() && rStr.Len() < STRING_MAXLEN)
 {
+bool wasQuote = false;

(openoffice) 04/04: Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now limited to ~2 GiB).

2024-07-22 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit f13410cf5cd4d68144c38af7cf9e805599c0d5cf
Author: Damjan Jovanovic 
AuthorDate: Mon Jul 22 08:06:52 2024 +0200

Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and
cells longer than 64 KiB in OpenOffice Base. (They are now limited to
~2 GiB).

- New member functions were added to the main/tools SvStream class to work
  with 32 bit ::rtl::OUString and ::rtl::OStringBuilder when reading lines.
- The helper class QuotedString had to be upgraded from using the 16 bit
  String to the 32 bit ::rtl::OUString.
- The CSV database driver was patched to use ::rtl::OUString and 32 bit
  indexes in various places.
- Luckily, little other work was needed, as the ORowSetValue class already
  uses 32 bit ::rtl::OUString, and was previously converting 16 bit String
  to 32 bit ::rtl::OUString internally anyway.

Also simplified some of the line parsing logic, and translated some
German comments to English.

Patch by: me

(cherry picked from commit 7b2bc0e6bba2fbc38d078306fe10d875115d6c86)
---
 .../source/drivers/file/quotedstring.cxx   |  48 +++---
 main/connectivity/source/drivers/flat/ETable.cxx   | 192 ++---
 main/connectivity/source/inc/file/quotedstring.hxx |  18 +-
 main/connectivity/source/inc/flat/ETable.hxx   |   2 +-
 main/tools/inc/tools/stream.hxx|   4 +
 main/tools/source/stream/stream.cxx|  83 +
 6 files changed, 210 insertions(+), 137 deletions(-)

diff --git a/main/connectivity/source/drivers/file/quotedstring.cxx 
b/main/connectivity/source/drivers/file/quotedstring.cxx
index 4ea452613b..366036b6f7 100644
--- a/main/connectivity/source/drivers/file/quotedstring.cxx
+++ b/main/connectivity/source/drivers/file/quotedstring.cxx
@@ -25,6 +25,7 @@
 #include "precompiled_connectivity.hxx"
 #include "file/quotedstring.hxx"
 #include 
+#include 
 
 namespace connectivity
 {
@@ -32,21 +33,21 @@ namespace connectivity
 //= QuotedTokenizedString
 //==
 //--
-xub_StrLen QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, 
sal_Unicode cStrDel ) const
+sal_Int32 QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, 
sal_Unicode cStrDel ) const
 {
 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "ocke.jans...@sun.com", 
"QuotedTokenizedString::GetTokenCount" );
-const xub_StrLen nLen = m_sString.Len();
+const sal_Int32 nLen = m_sString.getLength();
if ( !nLen )
return 0;
 
-   xub_StrLen nTokCount = 1;
+   sal_Int32 nTokCount = 1;
sal_Bool bStart = sal_True; // Stehen wir auf dem ersten 
Zeichen im Token?
sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB 
eines (cStrDel delimited) String?
 
// Suche bis Stringende nach dem ersten nicht uebereinstimmenden 
Zeichen
-   for( xub_StrLen i = 0; i < nLen; ++i )
+   for( sal_Int32 i = 0; i < nLen; ++i )
{
-const sal_Unicode cChar = m_sString.GetChar(i);
+const sal_Unicode cChar = m_sString[ i ];
if (bStart)
{
bStart = sal_False;
@@ -63,7 +64,7 @@ namespace connectivity
// Wenn jetzt das String-Delimiter-Zeichen auftritt 
...
if ( cChar == cStrDel )
{
-   if ((i+1 < nLen) && (m_sString.GetChar(i+1) 
== cStrDel))
+   if ((i+1 < nLen) && (m_sString[ i+1 ] == 
cStrDel))
{
// Verdoppeltes 
String-Delimiter-Zeichen:
++i;// kein String-Ende, 
naechstes Zeichen ueberlesen.
@@ -91,49 +92,47 @@ namespace connectivity
 }
 
 //--
-void QuotedTokenizedString::GetTokenSpecial( String& _rStr,xub_StrLen& 
nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
+void QuotedTokenizedString::GetTokenSpecial( ::rtl::OUString* 
_rStr,sal_Int32& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
 {
 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "ocke.jans...@sun.com", 
"QuotedTokenizedString::GetTokenCount" );
-   _rStr.Erase();
-   const xub_StrLen nLen = m_sString.Len();
+   *_rStr = ::rtl::OUString();
+   const sal_Int32

(openoffice) branch AOO41X updated (82556f7d16 -> f13410cf5c)

2024-07-22 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from 82556f7d16 Re-add space for continuation line in package description
 new 6c882b5c20 #i122754# Base does not properly parse CSV files as per 
RFC-4180 (while Calc does)
 new 2cbc43e98e Make CSV line parsers consistent with CSV field parsers.
 new dd133a3a6a Fix a string limit error in my previous patch.
 new f13410cf5c Allow reading lines longer than 64 KiB in SvStream, and 
reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now 
limited to ~2 GiB).

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../source/drivers/file/quotedstring.cxx   |  48 +++---
 main/connectivity/source/drivers/flat/ETable.cxx   | 180 +
 main/connectivity/source/inc/file/quotedstring.hxx |  18 +--
 main/connectivity/source/inc/flat/ETable.hxx   |   3 +-
 main/tools/inc/tools/stream.hxx|   4 +
 main/tools/source/stream/stream.cxx| 142 +---
 6 files changed, 273 insertions(+), 122 deletions(-)



(openoffice) branch AOO42X updated: Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now limited to ~2 GiB).

2024-07-22 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 556cbcf7b9 Allow reading lines longer than 64 KiB in SvStream, and 
reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now 
limited to ~2 GiB).
556cbcf7b9 is described below

commit 556cbcf7b90911f7cbf5dcdaffd2767ad2b2e230
Author: Damjan Jovanovic 
AuthorDate: Mon Jul 22 08:06:52 2024 +0200

Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and
cells longer than 64 KiB in OpenOffice Base. (They are now limited to
~2 GiB).

- New member functions were added to the main/tools SvStream class to work
  with 32 bit ::rtl::OUString and ::rtl::OStringBuilder when reading lines.
- The helper class QuotedString had to be upgraded from using the 16 bit
  String to the 32 bit ::rtl::OUString.
- The CSV database driver was patched to use ::rtl::OUString and 32 bit
  indexes in various places.
- Luckily, little other work was needed, as the ORowSetValue class already
  uses 32 bit ::rtl::OUString, and was previously converting 16 bit String
  to 32 bit ::rtl::OUString internally anyway.

Also simplified some of the line parsing logic, and translated some
German comments to English.

Patch by: me

(cherry picked from commit 7b2bc0e6bba2fbc38d078306fe10d875115d6c86)
---
 .../source/drivers/file/quotedstring.cxx   |  48 +++---
 main/connectivity/source/drivers/flat/ETable.cxx   | 192 ++---
 main/connectivity/source/inc/file/quotedstring.hxx |  18 +-
 main/connectivity/source/inc/flat/ETable.hxx   |   2 +-
 main/tools/inc/tools/stream.hxx|   4 +
 main/tools/source/stream/stream.cxx|  83 +
 6 files changed, 210 insertions(+), 137 deletions(-)

diff --git a/main/connectivity/source/drivers/file/quotedstring.cxx 
b/main/connectivity/source/drivers/file/quotedstring.cxx
index 4ea452613b..366036b6f7 100644
--- a/main/connectivity/source/drivers/file/quotedstring.cxx
+++ b/main/connectivity/source/drivers/file/quotedstring.cxx
@@ -25,6 +25,7 @@
 #include "precompiled_connectivity.hxx"
 #include "file/quotedstring.hxx"
 #include 
+#include 
 
 namespace connectivity
 {
@@ -32,21 +33,21 @@ namespace connectivity
 //= QuotedTokenizedString
 //==
 //--
-xub_StrLen QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, 
sal_Unicode cStrDel ) const
+sal_Int32 QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, 
sal_Unicode cStrDel ) const
 {
 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "ocke.jans...@sun.com", 
"QuotedTokenizedString::GetTokenCount" );
-const xub_StrLen nLen = m_sString.Len();
+const sal_Int32 nLen = m_sString.getLength();
if ( !nLen )
return 0;
 
-   xub_StrLen nTokCount = 1;
+   sal_Int32 nTokCount = 1;
sal_Bool bStart = sal_True; // Stehen wir auf dem ersten 
Zeichen im Token?
sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB 
eines (cStrDel delimited) String?
 
// Suche bis Stringende nach dem ersten nicht uebereinstimmenden 
Zeichen
-   for( xub_StrLen i = 0; i < nLen; ++i )
+   for( sal_Int32 i = 0; i < nLen; ++i )
{
-const sal_Unicode cChar = m_sString.GetChar(i);
+const sal_Unicode cChar = m_sString[ i ];
if (bStart)
{
bStart = sal_False;
@@ -63,7 +64,7 @@ namespace connectivity
// Wenn jetzt das String-Delimiter-Zeichen auftritt 
...
if ( cChar == cStrDel )
{
-   if ((i+1 < nLen) && (m_sString.GetChar(i+1) 
== cStrDel))
+   if ((i+1 < nLen) && (m_sString[ i+1 ] == 
cStrDel))
{
// Verdoppeltes 
String-Delimiter-Zeichen:
++i;// kein String-Ende, 
naechstes Zeichen ueberlesen.
@@ -91,49 +92,47 @@ namespace connectivity
 }
 
 //--
-void QuotedTokenizedString::GetTokenSpecial( String& _rStr,xub_StrLen& 
nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
+void QuotedTokenizedString::GetTokenSpecial( ::rtl::OUString* 
_rStr,sal_Int32& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
 {
 RT

(openoffice) branch trunk updated: Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now limited to ~2 GiB).

2024-07-22 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 7b2bc0e6bb Allow reading lines longer than 64 KiB in SvStream, and 
reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now 
limited to ~2 GiB).
7b2bc0e6bb is described below

commit 7b2bc0e6bba2fbc38d078306fe10d875115d6c86
Author: Damjan Jovanovic 
AuthorDate: Mon Jul 22 08:06:52 2024 +0200

Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and
cells longer than 64 KiB in OpenOffice Base. (They are now limited to
~2 GiB).

- New member functions were added to the main/tools SvStream class to work
  with 32 bit ::rtl::OUString and ::rtl::OStringBuilder when reading lines.
- The helper class QuotedString had to be upgraded from using the 16 bit
  String to the 32 bit ::rtl::OUString.
- The CSV database driver was patched to use ::rtl::OUString and 32 bit
  indexes in various places.
- Luckily, little other work was needed, as the ORowSetValue class already
  uses 32 bit ::rtl::OUString, and was previously converting 16 bit String
  to 32 bit ::rtl::OUString internally anyway.

Also simplified some of the line parsing logic, and translated some
German comments to English.

Patch by: me
---
 .../source/drivers/file/quotedstring.cxx   |  48 +++---
 main/connectivity/source/drivers/flat/ETable.cxx   | 192 ++---
 main/connectivity/source/inc/file/quotedstring.hxx |  18 +-
 main/connectivity/source/inc/flat/ETable.hxx   |   2 +-
 main/tools/inc/tools/stream.hxx|   4 +
 main/tools/source/stream/stream.cxx|  83 +
 6 files changed, 210 insertions(+), 137 deletions(-)

diff --git a/main/connectivity/source/drivers/file/quotedstring.cxx 
b/main/connectivity/source/drivers/file/quotedstring.cxx
index 4ea452613b..366036b6f7 100644
--- a/main/connectivity/source/drivers/file/quotedstring.cxx
+++ b/main/connectivity/source/drivers/file/quotedstring.cxx
@@ -25,6 +25,7 @@
 #include "precompiled_connectivity.hxx"
 #include "file/quotedstring.hxx"
 #include 
+#include 
 
 namespace connectivity
 {
@@ -32,21 +33,21 @@ namespace connectivity
 //= QuotedTokenizedString
 //==
 //--
-xub_StrLen QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, 
sal_Unicode cStrDel ) const
+sal_Int32 QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, 
sal_Unicode cStrDel ) const
 {
 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "ocke.jans...@sun.com", 
"QuotedTokenizedString::GetTokenCount" );
-const xub_StrLen nLen = m_sString.Len();
+const sal_Int32 nLen = m_sString.getLength();
if ( !nLen )
return 0;
 
-   xub_StrLen nTokCount = 1;
+   sal_Int32 nTokCount = 1;
sal_Bool bStart = sal_True; // Stehen wir auf dem ersten 
Zeichen im Token?
sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB 
eines (cStrDel delimited) String?
 
// Suche bis Stringende nach dem ersten nicht uebereinstimmenden 
Zeichen
-   for( xub_StrLen i = 0; i < nLen; ++i )
+   for( sal_Int32 i = 0; i < nLen; ++i )
{
-const sal_Unicode cChar = m_sString.GetChar(i);
+const sal_Unicode cChar = m_sString[ i ];
if (bStart)
{
bStart = sal_False;
@@ -63,7 +64,7 @@ namespace connectivity
// Wenn jetzt das String-Delimiter-Zeichen auftritt 
...
if ( cChar == cStrDel )
{
-   if ((i+1 < nLen) && (m_sString.GetChar(i+1) 
== cStrDel))
+   if ((i+1 < nLen) && (m_sString[ i+1 ] == 
cStrDel))
{
// Verdoppeltes 
String-Delimiter-Zeichen:
++i;// kein String-Ende, 
naechstes Zeichen ueberlesen.
@@ -91,49 +92,47 @@ namespace connectivity
 }
 
 //--
-void QuotedTokenizedString::GetTokenSpecial( String& _rStr,xub_StrLen& 
nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
+void QuotedTokenizedString::GetTokenSpecial( ::rtl::OUString* 
_rStr,sal_Int32& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
 {
 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "ocke.jans...@sun.com&

(openoffice) branch trunk updated (870c37922c -> d435d9a535)

2024-07-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from 870c37922c Fixed typo (completly -> completely) and many more
 new efc1756a58 Fix a typo in a dmake variable name. It's called 
PATH_SEPERATOR, not PATH_SEPARATOR.
 new eeb47f1ede Add $(HAMCREST_CORE_JAR) to other dmake makefiles where it 
was missing.
 new fd6e8d9f7a Fix the installation path for OpenOffice used by dmake when 
running JUnit tests.
 new 7ee8c2c6cd Fix the unoapi tests in qadevOOo.
 new 8561b591b8 Fix the unoapi tests in configmgr.
 new 6795508b2d Fix the main/sc unoapi tests, and add them to the build.
 new f525edebf3 comphelper's JunitTest doesn't need OOoRunner.jar.
 new 0ced32bd95 Add the complex unit test to the bean module.
 new 895285e1a6 The linguistic module's complex JunitTest doesn't need 
OOoRunner.
 new 9386131068 sot module doesn't need OOoRunner.jar as a complex test 
dependency.
 new 6a86ac4b38 svl module doesn't need OOoRunner.jar as a complex test 
dependency.
 new 0b2ceee159 Delete unused import.
 new 3855178bf8 Run the test in debug mode too, it no longer seems to crash.
 new f107c74e14 Port sw's LoadSaveTest to JUnit, and fix the paths, and add 
it to the list of other complex tests.
 new 5c06146fab Add vcl's memCheck complex test to the build, which was 
left out by Oracle/Sun when they ported it to gbuild. Also fix some errors and 
get it fully working without the qaooDev helper classes. Pass the documents 
path from the Makefile as the one from the code will be wrong for gbuild.
 new 48d1b9e1ba Add vcl's persistent_window_states complex test to the 
build, which was also left out during the gbuild port, and clean it up a bit.
 new 5f3440664a Clean up unotools complex tests.
 new 9e73885b79 Clean up ucb complex tests.
 new 60509b5aad Add package's complex tests to the build, and update them 
to use JUnit.
 new 100f033136 Clean up the bean complex tests.
 new 2062e9d75b Clean up the comphelper complex tests.
 new d096138d63 Make the exception message more descriptive: if possible, 
describe why the document could not be loaded.
 new 02a76d915a dbaccess complex tests cleanup.
 new 8b4dc8f1d4 Clean up the complex tests in the filter module.
 new 2e1a4f9348 Clean up forms complex tests.
 new 64ded1b7a0 Clean up sfx2 complex tests.
 new 5971bc35dc Clean up the sc complex tests.
 new a427578287 Clean up reportdesign complex tests.
 new c944cacc40 Clean up sot complex tests.
 new 19ee18fdf9 Port the main/test module to gbuild and Ant. Also make it 
use Google Test instead of cppunit, and delete the unoexceptionprotector 
library which was cppunit-specific and completely unused.
 new 81731658b3 Preliminary compiling port of type detection test to junit.
 new 69dd60afa2 Further fixes.
 new 3bede71e50 We no longer get files from the class path.
 new 83f0ba4128 Make some helper method private and/or static.
 new 939b47ecd6 Fix the bad spacing in the Java files.
 new b338ff5915 Some modernization. Use ArrayList instead of Vector, 
String.split() instead of StringTokenizer.
 new ec1247ae83 Finish Vector -> ArrayList conversion. Other minor fixes.
 new 30b4355987 Fix the exception handling.
 new d6a8792126 Use "TypeName" instead of "MediaType" to specify the type, 
it seems to work, and "MediaType" is barely used in the code.
 new 0ee15d0c3b Start rebuilding the lost document repository.
 new 35bb7f26b0 Remove the unused properties.
 new 69ed17bae8 Add more test documents.
 new 1e3c8e5ef0 Also needs juh.jar to run.
 new 1f8c860bc5 Port the chart2 complex test to JUnit, and enable it in the 
build.
 new fcc38b588f Port the main/connectivity complex tests to JUnit, and 
clean them up. Also stop packaging them into a JAR file, and delivering this 
JAR file to solver, because nothing else uses it, it's just superfluous build 
code probably wrongly copied from the unoapi tests.
 new 05ff667498 Port main/embeddedobj complex tests to JUnit, and clean up 
the code a bit.
 new e8581bfad8 Port the remainder of the framework complex tests to JUnit, 
although they fail, so keep them disabled.
 new 2c0cd9c88c Add a missing slash.
 new 6e91df0b47 Fix the paths for main/embeddedobj.
 new af60b7be7b Fix typo.
 new b49a7c134b chart2's unoapi test also needs juh.jar.
 new d55f601a1b Port testtools to JUnit.
 new b12c4ec078 Port the cli_ure test to JUnit.
 new f04976d9fc Remove unused ComplexTestCase imports.
 new 666fd4a9c9 Port the extensions integeration test to JUnit.
 new 6181058df1 Allow Java unit tests to exist in subdirectories.
 new cf2d78d1c2 Port the forms integration test to J

(openoffice) branch AOO42X updated: Fix exception specification in a few places where they were missing, and causing AOO to crash when compiled with Clang.

2024-07-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 51be0a98fe Fix exception specification in a few places where they were 
missing, and causing AOO to crash when compiled with Clang.
51be0a98fe is described below

commit 51be0a98fead28b15570c923f30b8423deec75ce
Author: Damjan Jovanovic 
AuthorDate: Sun Jul 7 20:14:26 2024 +0200

Fix exception specification in a few places where they were missing,
and causing AOO to crash when compiled with Clang.

Also fix formatting of some writerfilter code.

Partially fixes: https://bz.apache.org/ooo/show_bug.cgi?id=127252
Patch by: me

(cherry picked from commit ab0bad1672c1433536a0fd2143f31efcc5754d80)
---
 main/oox/source/docprop/ooxmldocpropimport.cxx |  2 +-
 main/writerfilter/source/filter/ImportFilter.cxx   | 74 --
 main/writerfilter/source/ooxml/OOXMLStreamImpl.cxx |  5 +-
 main/writerfilter/source/ooxml/OOXMLStreamImpl.hxx | 13 ++--
 4 files changed, 55 insertions(+), 39 deletions(-)

diff --git a/main/oox/source/docprop/ooxmldocpropimport.cxx 
b/main/oox/source/docprop/ooxmldocpropimport.cxx
index b2814e48c9..ddc8fc1f6d 100644
--- a/main/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/main/oox/source/docprop/ooxmldocpropimport.cxx
@@ -72,7 +72,7 @@ Reference< XInterface > SAL_CALL 
DocumentPropertiesImport_createInstance( const
 
 namespace {
 
-Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException)
+Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException, Exception)
 {
 Reference< XRelationshipAccess > xRelation( rxStorage, UNO_QUERY_THROW );
 Reference< XHierarchicalStorageAccess > xHierarchy( rxStorage, 
UNO_QUERY_THROW );
diff --git a/main/writerfilter/source/filter/ImportFilter.cxx 
b/main/writerfilter/source/filter/ImportFilter.cxx
index eb7c3a833a..0197f9e75a 100644
--- a/main/writerfilter/source/filter/ImportFilter.cxx
+++ b/main/writerfilter/source/filter/ImportFilter.cxx
@@ -97,44 +97,52 @@ sal_Bool WriterFilter::filter( const uno::Sequence< 
beans::PropertyValue >& aDes
 dmapperLogger->startDocument();
 #endif
 
-writerfilter::dmapper::SourceDocumentType eType =
-(m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007" ) ) ||
- m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007_Template" ) )) ?
-writerfilter::dmapper::DOCUMENT_OOXML : 
writerfilter::dmapper::DOCUMENT_DOC;
-writerfilter::Stream::Pointer_t pStream(new 
writerfilter::dmapper::DomainMapper(m_xContext, xInputStream, m_xDstDoc, 
eType));
-//create the tokenizer and domain mapper
-if( eType == writerfilter::dmapper::DOCUMENT_OOXML )
-{
-writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream = 
writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, 
xInputStream);
-writerfilter::ooxml::OOXMLDocument::Pointer_t 
pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream));
-
-uno::Reference xModel(m_xDstDoc, uno::UNO_QUERY_THROW);
-pDocument->setModel(xModel);
-
-uno::Reference xDrawings
-(m_xDstDoc, uno::UNO_QUERY_THROW);
-uno::Reference xDrawPage
-(xDrawings->getDrawPage(), uno::UNO_SET_THROW);
-pDocument->setDrawPage(xDrawPage);
-
-pDocument->resolve(*pStream);
-}
-else
-{
-writerfilter::doctok::WW8Stream::Pointer_t pDocStream = 
writerfilter::doctok::WW8DocumentFactory::createStream(m_xContext, 
xInputStream);
-writerfilter::doctok::WW8Document::Pointer_t 
pDocument(writerfilter::doctok::WW8DocumentFactory::createDocument(pDocStream));
+writerfilter::dmapper::SourceDocumentType eType =
+(m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007" ) ) ||
+ m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007_Template" ) )) ?
+writerfilter::dmapper::DOCUMENT_OOXML : 
writerfilter::dmapper::DOCUMENT_DOC;
+writerfilter::Stream::Pointer_t pStream(new 
writerfilter::dmapper::DomainMapper(m_xContext, xInputStream, m_xDstDoc, 
eType));
+//create the tokenizer and domain mapper
+if( eType == writerfilter::dmapper::DOCUMENT_OOXML )
+{
+writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream;
+try
+{
+pDocStream = 
writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, 
xInputStream);
+

(openoffice) branch trunk updated: Fix exception specification in a few places where they were missing, and causing AOO to crash when compiled with Clang.

2024-07-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new ab0bad1672 Fix exception specification in a few places where they were 
missing, and causing AOO to crash when compiled with Clang.
ab0bad1672 is described below

commit ab0bad1672c1433536a0fd2143f31efcc5754d80
Author: Damjan Jovanovic 
AuthorDate: Sun Jul 7 20:14:26 2024 +0200

Fix exception specification in a few places where they were missing,
and causing AOO to crash when compiled with Clang.

Also fix formatting of some writerfilter code.

Partially fixes: https://bz.apache.org/ooo/show_bug.cgi?id=127252
Patch by: me
---
 main/oox/source/docprop/ooxmldocpropimport.cxx |  2 +-
 main/writerfilter/source/filter/ImportFilter.cxx   | 74 --
 main/writerfilter/source/ooxml/OOXMLStreamImpl.cxx |  5 +-
 main/writerfilter/source/ooxml/OOXMLStreamImpl.hxx | 13 ++--
 4 files changed, 55 insertions(+), 39 deletions(-)

diff --git a/main/oox/source/docprop/ooxmldocpropimport.cxx 
b/main/oox/source/docprop/ooxmldocpropimport.cxx
index b2814e48c9..ddc8fc1f6d 100644
--- a/main/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/main/oox/source/docprop/ooxmldocpropimport.cxx
@@ -72,7 +72,7 @@ Reference< XInterface > SAL_CALL 
DocumentPropertiesImport_createInstance( const
 
 namespace {
 
-Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException)
+Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException, Exception)
 {
 Reference< XRelationshipAccess > xRelation( rxStorage, UNO_QUERY_THROW );
 Reference< XHierarchicalStorageAccess > xHierarchy( rxStorage, 
UNO_QUERY_THROW );
diff --git a/main/writerfilter/source/filter/ImportFilter.cxx 
b/main/writerfilter/source/filter/ImportFilter.cxx
index eb7c3a833a..0197f9e75a 100644
--- a/main/writerfilter/source/filter/ImportFilter.cxx
+++ b/main/writerfilter/source/filter/ImportFilter.cxx
@@ -97,44 +97,52 @@ sal_Bool WriterFilter::filter( const uno::Sequence< 
beans::PropertyValue >& aDes
 dmapperLogger->startDocument();
 #endif
 
-writerfilter::dmapper::SourceDocumentType eType =
-(m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007" ) ) ||
- m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007_Template" ) )) ?
-writerfilter::dmapper::DOCUMENT_OOXML : 
writerfilter::dmapper::DOCUMENT_DOC;
-writerfilter::Stream::Pointer_t pStream(new 
writerfilter::dmapper::DomainMapper(m_xContext, xInputStream, m_xDstDoc, 
eType));
-//create the tokenizer and domain mapper
-if( eType == writerfilter::dmapper::DOCUMENT_OOXML )
-{
-writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream = 
writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, 
xInputStream);
-writerfilter::ooxml::OOXMLDocument::Pointer_t 
pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream));
-
-uno::Reference xModel(m_xDstDoc, uno::UNO_QUERY_THROW);
-pDocument->setModel(xModel);
-
-uno::Reference xDrawings
-(m_xDstDoc, uno::UNO_QUERY_THROW);
-uno::Reference xDrawPage
-(xDrawings->getDrawPage(), uno::UNO_SET_THROW);
-pDocument->setDrawPage(xDrawPage);
-
-pDocument->resolve(*pStream);
-}
-else
-{
-writerfilter::doctok::WW8Stream::Pointer_t pDocStream = 
writerfilter::doctok::WW8DocumentFactory::createStream(m_xContext, 
xInputStream);
-writerfilter::doctok::WW8Document::Pointer_t 
pDocument(writerfilter::doctok::WW8DocumentFactory::createDocument(pDocStream));
+writerfilter::dmapper::SourceDocumentType eType =
+(m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007" ) ) ||
+ m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( 
"writer_MS_Word_2007_Template" ) )) ?
+writerfilter::dmapper::DOCUMENT_OOXML : 
writerfilter::dmapper::DOCUMENT_DOC;
+writerfilter::Stream::Pointer_t pStream(new 
writerfilter::dmapper::DomainMapper(m_xContext, xInputStream, m_xDstDoc, 
eType));
+//create the tokenizer and domain mapper
+if( eType == writerfilter::dmapper::DOCUMENT_OOXML )
+{
+writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream;
+try
+{
+pDocStream = 
writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, 
xInputStream);
+}
+catch (uno::Exception &e)
+{
+   

(openoffice) branch AOO42X updated: Just like we check for an initial decimal separator in ScanStartString() when the string doesn't start with a currency symbol, check for an initial decimal separato

2024-06-12 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 529e2ed379 Just like we check for an initial decimal separator in 
ScanStartString() when the string doesn't start with a currency symbol, check 
for an initial decimal separator after the currency symbol too. Without this, 
"$.nn" gets parsed as a text field with "$.nn" instead of a numeric field with 
$0.nn.
529e2ed379 is described below

commit 529e2ed3790cc917d723356b2d814f437d1054a3
Author: Damjan Jovanovic 
AuthorDate: Wed Jun 12 17:39:30 2024 +0200

Just like we check for an initial decimal separator in ScanStartString()
when the string doesn't start with a currency symbol, check for an
initial decimal separator after the currency symbol too. Without this,
"$.nn" gets parsed as a text field with "$.nn" instead of a numeric field
with $0.nn.

Add a subsequent JUnit test for this too.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=82687
-  Text entry or CSV import treats $.nn as text
Patch by: me

(cherry picked from commit 96178715f486e8815def398176cafa748d3cbb73)
---
 main/svl/JunitTest_svl_complex.mk  |  2 +
 .../numberformatter/NumberFormatterUnitTest.java   | 92 ++
 main/svl/source/numbers/zforfind.cxx   |  5 ++
 3 files changed, 99 insertions(+)

diff --git a/main/svl/JunitTest_svl_complex.mk 
b/main/svl/JunitTest_svl_complex.mk
index f9af4aea1a..0c6393f105 100644
--- a/main/svl/JunitTest_svl_complex.mk
+++ b/main/svl/JunitTest_svl_complex.mk
@@ -46,10 +46,12 @@ $(eval $(call gb_JunitTest_add_sourcefiles,svl_complex,\
svl/qa/complex/passwordcontainer/Test01 \
svl/qa/complex/passwordcontainer/PasswordContainerTest \
svl/qa/complex/passwordcontainer/MasterPasswdHandler \
+   svl/qa/complex/numberformatter/NumberFormatterUnitTest \
 ))
 
 $(eval $(call gb_JunitTest_add_classes,svl_complex,\
complex.passwordcontainer.PasswordContainerUnitTest \
+   complex.numberformatter.NumberFormatterUnitTest \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/main/svl/qa/complex/numberformatter/NumberFormatterUnitTest.java 
b/main/svl/qa/complex/numberformatter/NumberFormatterUnitTest.java
new file mode 100644
index 00..3a47cf3d0f
--- /dev/null
+++ b/main/svl/qa/complex/numberformatter/NumberFormatterUnitTest.java
@@ -0,0 +1,92 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+
+
+package complex.numberformatter;
+
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.XNumberFormatsSupplier;
+import com.sun.star.util.XNumberFormatter;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+public class NumberFormatterUnitTest {
+private XMultiServiceFactory m_xMSF = null;
+
+@Before public void before() {
+try {
+m_xMSF = getMSF();
+} catch (Exception e) {
+fail ("Cannot create service factory!");
+}
+if (m_xMSF == null) {
+fail ("Cannot create service factory!");
+}
+}
+
+@After public void after() {
+m_xMSF = null;
+}
+
+@Test
+public void testDollarDotNumberFormat() throws Exception
+{
+Object numberFormatterService = m_xMSF.createInstance( 
"com.sun.star.util.NumberFormatter" );
+XNumberFormatter numberFormatter = UnoRuntime.queryInterface( 
XNumberFormatter.class, numberFormatterService );
+Object numberFormatsSupplierService = m_xMSF.createInstance( 
"com.sun.star.util.NumberFormatsSupplier" );
+XNumberFormatsSupplier n

(openoffice) branch trunk updated: Just like we check for an initial decimal separator in ScanStartString() when the string doesn't start with a currency symbol, check for an initial decimal separator

2024-06-12 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 96178715f4 Just like we check for an initial decimal separator in 
ScanStartString() when the string doesn't start with a currency symbol, check 
for an initial decimal separator after the currency symbol too. Without this, 
"$.nn" gets parsed as a text field with "$.nn" instead of a numeric field with 
$0.nn.
96178715f4 is described below

commit 96178715f486e8815def398176cafa748d3cbb73
Author: Damjan Jovanovic 
AuthorDate: Wed Jun 12 17:39:30 2024 +0200

Just like we check for an initial decimal separator in ScanStartString()
when the string doesn't start with a currency symbol, check for an
initial decimal separator after the currency symbol too. Without this,
"$.nn" gets parsed as a text field with "$.nn" instead of a numeric field
with $0.nn.

Add a subsequent JUnit test for this too.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=82687
-  Text entry or CSV import treats $.nn as text
Patch by: me
---
 main/svl/JunitTest_svl_complex.mk  |  2 +
 .../numberformatter/NumberFormatterUnitTest.java   | 92 ++
 main/svl/source/numbers/zforfind.cxx   |  5 ++
 3 files changed, 99 insertions(+)

diff --git a/main/svl/JunitTest_svl_complex.mk 
b/main/svl/JunitTest_svl_complex.mk
index f9af4aea1a..0c6393f105 100644
--- a/main/svl/JunitTest_svl_complex.mk
+++ b/main/svl/JunitTest_svl_complex.mk
@@ -46,10 +46,12 @@ $(eval $(call gb_JunitTest_add_sourcefiles,svl_complex,\
svl/qa/complex/passwordcontainer/Test01 \
svl/qa/complex/passwordcontainer/PasswordContainerTest \
svl/qa/complex/passwordcontainer/MasterPasswdHandler \
+   svl/qa/complex/numberformatter/NumberFormatterUnitTest \
 ))
 
 $(eval $(call gb_JunitTest_add_classes,svl_complex,\
complex.passwordcontainer.PasswordContainerUnitTest \
+   complex.numberformatter.NumberFormatterUnitTest \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/main/svl/qa/complex/numberformatter/NumberFormatterUnitTest.java 
b/main/svl/qa/complex/numberformatter/NumberFormatterUnitTest.java
new file mode 100644
index 00..3a47cf3d0f
--- /dev/null
+++ b/main/svl/qa/complex/numberformatter/NumberFormatterUnitTest.java
@@ -0,0 +1,92 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+
+
+package complex.numberformatter;
+
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.XNumberFormatsSupplier;
+import com.sun.star.util.XNumberFormatter;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+public class NumberFormatterUnitTest {
+private XMultiServiceFactory m_xMSF = null;
+
+@Before public void before() {
+try {
+m_xMSF = getMSF();
+} catch (Exception e) {
+fail ("Cannot create service factory!");
+}
+if (m_xMSF == null) {
+fail ("Cannot create service factory!");
+}
+}
+
+@After public void after() {
+m_xMSF = null;
+}
+
+@Test
+public void testDollarDotNumberFormat() throws Exception
+{
+Object numberFormatterService = m_xMSF.createInstance( 
"com.sun.star.util.NumberFormatter" );
+XNumberFormatter numberFormatter = UnoRuntime.queryInterface( 
XNumberFormatter.class, numberFormatterService );
+Object numberFormatsSupplierService = m_xMSF.createInstance( 
"com.sun.star.util.NumberFormatsSupplier" );
+XNumberFormatsSupplier numberFormatsSupplier = 
UnoRuntime.queryInterface( XNumberFormatsSupplier.class

(openoffice) branch trunk updated: Translate some German comments to English.

2024-06-11 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 91d859a211 Translate some German comments to English.
91d859a211 is described below

commit 91d859a2118191e83256fdfd048d65ca60769e24
Author: Damjan Jovanovic 
AuthorDate: Mon Jun 10 19:40:22 2024 +0200

Translate some German comments to English.

Patch by: me
---
 main/svl/source/numbers/zforfind.cxx | 56 ++--
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/main/svl/source/numbers/zforfind.cxx 
b/main/svl/source/numbers/zforfind.cxx
index f70c72a4ce..0bf7c6a7c0 100644
--- a/main/svl/source/numbers/zforfind.cxx
+++ b/main/svl/source/numbers/zforfind.cxx
@@ -217,24 +217,24 @@ double ImpSvNumberInputScan::StringToDouble( const 
String& rStr, sal_Bool bForce
 //---
 //   NextNumberStringSymbol
 //
-// Zerlegt die Eingabe in Zahlen und Strings fuer die weitere
-// Verarbeitung (Turing-Maschine).
+// Splits the input into numbers and strings for further processing
+// (Turing-Machine).
 //---
-// Ausgangs Zustand = GetChar
-//---+---+---+---
-// Alter Zustand | gelesenes Zeichen | Aktion| Neuer Zustand
-//---+---+---+---
-// GetChar   | Ziffer| Symbol=Zeichen| GetValue
-//   | Sonst | Symbol=Zeichen| GetString
-//---|---+---+---
-// GetValue  | Ziffer| Symbol=Symbol+Zeichen | GetValue
-//   | Sonst | Dec(CharPos)  | Stop
-//---+---+---+---
-// GetString | Ziffer| Dec(CharPos)  | Stop
-//   | Sonst | Symbol=Symbol+Zeichen | GetString
-//---+---+---+---
-
-enum ScanState  // States der Turing-Maschine
+// Initial State = GetChar
+//---+---+-+-
+// Former State  | Read Character| Action  | New State
+//---+---+-+-
+// GetChar   | Digit | Symbol=Character| GetValue
+//   | Else  | Symbol=Character| GetString
+//---|---+-+-
+// GetValue  | Digit | Symbol=Symbol+Character | GetValue
+//   | Else  | Dec(CharPos)| Stop
+//---+---+-+-
+// GetString | Digit | Dec(CharPos)| Stop
+//   | Else  | Symbol=Symbol+Character | GetString
+//---+---+-+-
+
+enum ScanState  // States of the Turing-Maschine
 {
 SsStop  = 0,
 SsStart = 1,
@@ -637,9 +637,9 @@ int ImpSvNumberInputScan::GetDayOfWeek( const String& 
rString, xub_StrLen& nPos
 //---
 //  GetCurrency
 //
-// Lesen eines Waehrungssysmbols
+// Reading a currency symbol
 // '$'   => sal_True
-// sonst => sal_False
+// else  => sal_False
 
 sal_Bool ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& 
nPos,
 const SvNumberformat* pFormat )
@@ -1458,9 +1458,9 @@ input for the following reasons:
 //---
 //  ScanStartString
 //
-// ersten String analysieren
-// Alles weg => sal_True
-// sonst => sal_False
+// Analyze the beginning of the string
+// Everything gone => sal_True
+// else=> sal_False
 
 sal_Bool ImpSvNumberInputScan::ScanStartString( const String& rString,
 const SvNumberformat* pFormat )
@@ -1561,9 +1561,9 @@ sal_Bool ImpSvNumberInputScan::ScanStartString( const 
String& rString,
 //---
 //  ScanMidString
 //
-// String in der Mitte analysieren
-// Alles weg => sal_True
-// sonst => sal_False
+// Analyze the middle of the string
+// Everything gone => sal_True
+// else=> sal_False
 
 sal_Bool ImpSvNumberInputScan::ScanMidString( const String& rString,
 sal_uInt16 nStringPos, const SvNumberformat* pFormat )
@@ -1806,9 +180

(openoffice) branch trunk updated (0dfdc53f91 -> f7b97bf7d9)

2024-04-23 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from 0dfdc53f91 Cleaned up resource files
 new e469ab6aed Upgrade Curl to version 8.7.1.
 new f7b97bf7d9 Override OpenSSL's certificate verification with our own, 
instead of using its verification and selectively overriding the result. - A 
nonsense self-signed expired certificate is fed into Curl to get it   to 
initialize even when the certificates in its expected system path   are missing 
or elsewhere. - In Curl's CURLOPT_SSL_CTX_FUNCTION, our 
Curl_SSLContextCallback, we   then completely override OpenSSL's verification 
process with ours,   using SSL_CTX_set_cert_verify_ [...]

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 main/curl/curl-bundled_openssl.patch   |  35 ++---
 main/curl/curl-wnt.patch   |  26 +---
 main/curl/makefile.mk  |  17 ++-
 main/curl/prj/d.lst|  10 +-
 main/external_deps.lst |   4 +-
 main/ucb/source/ucp/webdav/CurlSession.cxx | 197 ++---
 main/ucb/source/ucp/webdav/CurlSession.hxx |  14 +-
 7 files changed, 138 insertions(+), 165 deletions(-)



(openoffice) 01/02: Upgrade Curl to version 8.7.1.

2024-04-23 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit e469ab6aed23a1b38f105a944997af16e61071d0
Author: Damjan Jovanovic 
AuthorDate: Mon Apr 22 19:23:06 2024 +0200

Upgrade Curl to version 8.7.1.

Patch by: me
---
 main/curl/curl-bundled_openssl.patch | 35 ++-
 main/curl/curl-wnt.patch | 26 --
 main/curl/makefile.mk| 17 ++---
 main/curl/prj/d.lst  | 10 +-
 main/external_deps.lst   |  4 ++--
 5 files changed, 35 insertions(+), 57 deletions(-)

diff --git a/main/curl/curl-bundled_openssl.patch 
b/main/curl/curl-bundled_openssl.patch
index a3599097ac..02398175f9 100644
--- a/main/curl/curl-bundled_openssl.patch
+++ b/main/curl/curl-bundled_openssl.patch
@@ -1,28 +1,29 @@
 misc/curl-7.72.0/configure 2020-08-17 00:34:29.0 +0200
-+++ misc/build/curl-7.72.0/configure   2022-05-05 19:03:39.766880970 +0200
-@@ -23617,14 +23617,14 @@
-   { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set 
to \"$OPENSSL_PCDIR\"" >&5
- $as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
-   PKGTEST="yes"
--elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
-+elif test ! -f "$PREFIX_OPENSSL/inc/external/openssl/ssl.h"; then
-   as_fn_error $? "$PREFIX_OPENSSL is a bad --with-ssl prefix!" "$LINENO" 5
+--- misc/build/curl-8.7.1/configure2024-04-21 19:20:02.487331000 +0200
 misc/build/curl-8.7.1/configure2024-04-21 19:20:26.529989000 +0200
+@@ -26416,7 +26416,7 @@
  fi
  
+ if test "$PKGTEST" != "yes"; then
+-  if test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
++  if test ! -f "$PREFIX_OPENSSL/inc/external/openssl/ssl.h"; then
+ as_fn_error $? "$PREFIX_OPENSSL is a bad --with-openssl prefix!" 
"$LINENO" 5
+   fi
+ fi
+@@ -26424,7 +26424,7 @@
  LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
  if test "$PREFIX_OPENSSL" != "/usr" ; then
SSL_LDFLAGS="-L$LIB_OPENSSL"
 -  SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
 +  SSL_CPPFLAGS="-I$PREFIX_OPENSSL/inc/external"
  fi
- SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
  ;;
-@@ -23841,7 +23841,7 @@
-  LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
-  if test "$PKGCONFIG" = "no" ; then
+   esac
+@@ -26655,7 +26655,7 @@
+  fi
+  if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
 # only set this if pkg-config wasn't used
--   CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl 
-I$PREFIX_OPENSSL/include"
-+   CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/inc/external/openssl 
-I$PREFIX_OPENSSL/inc/external"
+-   CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
++   CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/inc/external"
   fi
-  # Linking previously failed, try extra paths from --with-ssl or 
pkg-config.
-  # Use a different function name to avoid reusing the earlier cached 
result.
+  # Linking previously failed, try extra paths from --with-openssl or
+  # pkg-config.  Use a different function name to avoid reusing the earlier
diff --git a/main/curl/curl-wnt.patch b/main/curl/curl-wnt.patch
index b38ad3c4c0..e54176f2ef 100644
--- a/main/curl/curl-wnt.patch
+++ b/main/curl/curl-wnt.patch
@@ -1,6 +1,6 @@
 misc/build/curl-7.72.0/winbuild/MakefileBuild.vc   2020-08-17 
00:28:40.0 +0200
-+++ misc/build/curl-7.72.0/winbuild/MakefileBuild.vc   2022-04-23 
19:57:39.594763000 +0200
-@@ -115,7 +115,7 @@
+--- misc/build/curl-8.7.1/winbuild/MakefileBuild.vc2024-03-06 
23:16:03.0 +0200
 misc/build/curl-8.7.1/winbuild/MakefileBuild.vc2024-04-21 
19:13:08.380236000 +0200
+@@ -102,7 +102,7 @@
  !IFNDEF WITH_DEVEL
  WITH_DEVEL   = ../../deps
  !ENDIF
@@ -9,7 +9,7 @@
  DEVEL_LIB= $(WITH_DEVEL)/lib
  
  !IF EXISTS("$(DEVEL_INCLUDE)")
-@@ -233,7 +233,7 @@
+@@ -241,7 +241,7 @@
  ZLIB_LIB_DIR = $(ZLIB_PATH)\lib
  ZLIB_LFLAGS  = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
  !ELSE
@@ -18,21 +18,3 @@
  ZLIB_LIB_DIR = $(DEVEL_LIB)
  !ENDIF
  
-@@ -568,6 +568,7 @@
-   @if not exist "$(LIB_DIROBJ)\vtls" mkdir $(LIB_DIROBJ)\vtls
-   @if not exist "$(LIB_DIROBJ)\vssh" mkdir $(LIB_DIROBJ)\vssh
-   @if not exist "$(LIB_DIROBJ)\vquic" mkdir $(LIB_DIROBJ)\vquic
-+  @if not exist "$(LIB_DIROBJ)\vssh" mkdir $(LIB_DIROBJ)\vssh
- 
- $(CURL_DIROBJ):
-   @if not exist &

(openoffice) 02/02: Override OpenSSL's certificate verification with our own, instead of using its verification and selectively overriding the result. - A nonsense self-signed expired certificate is f

2024-04-23 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit f7b97bf7d9139c8b602d3da3aadbeef0631e39c1
Author: Damjan Jovanovic 
AuthorDate: Sun Apr 21 17:07:24 2024 +0200

Override OpenSSL's certificate verification with our own, instead of
using its verification and selectively overriding the result.
- A nonsense self-signed expired certificate is fed into Curl to get it
  to initialize even when the certificates in its expected system path
  are missing or elsewhere.
- In Curl's CURLOPT_SSL_CTX_FUNCTION, our Curl_SSLContextCallback, we
  then completely override OpenSSL's verification process with ours,
  using SSL_CTX_set_cert_verify_callback() (instead of the previous
  SSL_CTX_set_verify() which just allows us to override OpenSSL's
  verification result).
- The verification is largely the same as before, we just have to call
  slightly different functions to retrieve the certificate to verify and
  the untrusted chain.
- Create components using the component context, not the legacy multi
  service factory.
- Various other cleanups, better logging, etc. were made in the process.

Patch by: me
---
 main/ucb/source/ucp/webdav/CurlSession.cxx | 197 ++---
 main/ucb/source/ucp/webdav/CurlSession.hxx |  14 +-
 2 files changed, 103 insertions(+), 108 deletions(-)

diff --git a/main/ucb/source/ucp/webdav/CurlSession.cxx 
b/main/ucb/source/ucp/webdav/CurlSession.cxx
index 73328b78d5..55c654ffc2 100644
--- a/main/ucb/source/ucp/webdav/CurlSession.cxx
+++ b/main/ucb/source/ucp/webdav/CurlSession.cxx
@@ -47,13 +47,10 @@
 #include "webdavprovider.hxx"
 
 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -130,6 +127,48 @@ CurlSession::CurlSession(
 curl_easy_setopt( m_pCurl, CURLOPT_DEBUGDATA, this );
 curl_easy_setopt( m_pCurl, CURLOPT_VERBOSE, 1L);
 }
+
+// Create a certificate container.
+if( !m_aContext.createComponent( 
"com.sun.star.security.CertificateContainer", m_xCertificateContainer ) )
+throw DAVException( DAVException::DAV_SESSION_CREATE, 
rtl::OUString::createFromAscii( "Failed to create 
com.sun.star.security.CertificateContainer" ) );
+uno::Reference< xml::crypto::XSEInitializer > xSEInitializer;
+if( !m_aContext.createComponent( "com.sun.star.xml.crypto.SEInitializer", 
xSEInitializer ) )
+throw DAVException( DAVException::DAV_SESSION_CREATE, 
rtl::OUString::createFromAscii( "Failed to create 
com.sun.star.xml.crypto.SEInitializer" ) );
+m_xSecurityContext = xSEInitializer->createSecurityContext( 
rtl::OUString() );
+if( m_xSecurityContext.is() )
+m_xSecurityEnv = m_xSecurityContext->getSecurityEnvironment();
+if ( ! m_xSecurityContext.is() || ! m_xSecurityEnv.is())
+throw DAVException( DAVException::DAV_SESSION_CREATE, 
rtl::OUString::createFromAscii( "Failure creating security services for 
certificate verification" ) );
+
+// Populate one nonsense certificate, which we won't ever really use, just 
to get Curl to initialize:
+struct curl_blob blob;
+blob.data = (void*)
+"-BEGIN CERTIFICATE-\n"
+"MIIC/zCCAeegAwIBAgIUQYFHL3Bv7alQBtXQWy9SXGusm5YwDQYJKoZIhvcNAQEL\n"
+"BQAwDzENMAsGA1UEAwwEVEVTVDAeFw0yNDA0MjExNzU3MzdaFw0yNDA0MjIxNzU3\n"
+"MzdaMA8xDTALBgNVBAMMBFRFU1QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n"
+"AoIBAQCZSXla2TE7GU6xOfie5uilpRf7KQflWcQRgwTCFhk0yzbsSPJYdqbuUqfx\n"
+"k0pV9Sx8GIkvc7jKQBwS79T15qn6dAZOF40x/k2jEMq150oc/80+dqeNP2jWvxv7\n"
+"FjgBKSiuGUaHldy6XU3NhrA9G1Ys2/yHQRXER1NTeknEzPiPlobRUk1sNR2Prc5r\n"
+"0u6cdUWGhbDOKDV9jjvA/14jmaAK+vUqrzzAdiOHVrkglA5oyBKX0BUokRCa8jID\n"
+"34tH9zeuvozA3xXCi8l9to+HOgT/n7LAGeOSnNPeSHC/xkwumt/rJ05tL9DXg6Ud\n"
+"3Pjf8KZM+FWJsjoJkcwBR0P2Qh3FAgMBAAGjUzBRMB0GA1UdDgQWBBR7pCl5msAz\n"
+"rGApirAQ+/tFuHl5kDAfBgNVHSMEGDAWgBR7pCl5msAzrGApirAQ+/tFuHl5kDAP\n"
+"BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBDJ1S51MKlafDAfFbU\n"
+"DJcxw3JNHn+VxQuaQQpeeqLIn3rgKHRBV9eOTYHf8AMoCYdQfPs1z45vqBmcyrDw\n"
+"LoXL6vlUbSLUuYFyfCaFup3bbh2lLozsLcD6bcvV07amX6V3u0ZOKpwqhg+k/IJd\n"
+"cPVM8jYAnNZZYD6rMHWnW5ZgMFSzSj3Jyyaov/3zwixvFZdViBG+R2RmJZVgMiFP\n"
+"PNxY3USKiHqdwZIszf3G63Ku0EYtFf3KN8YpoqSMDCDfjL0NhJOtkBUs5HL+4XfK\n"
+"hToBqJojDMLFRdVIhPQX1LoPd92CUwhueIrYTikScAqY2TIwXpPH0kBjfrVDus8s\n"
+"vPAk\n"
+"-END CERTIFICATE-";
+blob.len = strlen( (char*) blob.d

(openoffice) branch trunk updated: Fix a regression in 8eb9a7e66a3128669216ddb884f844d50ac59fb9, which broke delivering libcrypto.lib and libssl.lib on Windows.

2024-04-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 9b51720274 Fix a regression in 
8eb9a7e66a3128669216ddb884f844d50ac59fb9, which broke delivering libcrypto.lib 
and libssl.lib on Windows.
9b51720274 is described below

commit 9b51720274ee0b7c1ade0e9b4cd4b8417efd1b6c
Author: Damjan Jovanovic 
AuthorDate: Thu Apr 18 03:38:14 2024 +0200

Fix a regression in 8eb9a7e66a3128669216ddb884f844d50ac59fb9, which broke
delivering libcrypto.lib and libssl.lib on Windows.

Patch by: me
---
 main/openssl/prj/d.lst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/openssl/prj/d.lst b/main/openssl/prj/d.lst
index cac50416cf..f6a43b0e90 100644
--- a/main/openssl/prj/d.lst
+++ b/main/openssl/prj/d.lst
@@ -1,8 +1,8 @@
 mkdir: %_DEST%\inc%_EXT%\external
 mkdir: %_DEST%\inc%_EXT%\external\openssl
 ..\%__SRC%\inc\*.h %_DEST%\inc%_EXT%\external\openssl
-..\%__SRC%\lib\libcrypto.*.* %_DEST%\lib%_EXT%\*
-..\%__SRC%\lib\libssl.*.* %_DEST%\lib%_EXT%\*
+..\%__SRC%\lib\libcrypto.* %_DEST%\lib%_EXT%\*
+..\%__SRC%\lib\libssl.* %_DEST%\lib%_EXT%\*
 ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
 
 linklib: libcrypto.*.*



(openoffice) 02/02: Build OpenSSL as a dynamic link library, instead of a static library. Patch its users to use an RPATH of $ORIGIN, so they use the correct copy. This reduces the size of the build b

2024-04-15 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 8eb9a7e66a3128669216ddb884f844d50ac59fb9
Author: Damjan Jovanovic 
AuthorDate: Sun Apr 7 10:41:42 2024 +0200

Build OpenSSL as a dynamic link library, instead of a static library.
Patch its users to use an RPATH of $ORIGIN, so they use the correct copy.
This reduces the size of the build by about 4615 KiB, or 3.78%.

Patch by: me
---
 main/RepositoryExternal.mk| 18 ++
 main/curl/makefile.mk |  2 ++
 main/openssl/opensslunx.patch | 17 -
 main/openssl/prj/d.lst|  7 +--
 main/scp2/source/ooo/file_library_ooo.scp |  4 ++--
 5 files changed, 23 insertions(+), 25 deletions(-)

diff --git a/main/RepositoryExternal.mk b/main/RepositoryExternal.mk
index 25e30fb7f1..5a8503056e 100644
--- a/main/RepositoryExternal.mk
+++ b/main/RepositoryExternal.mk
@@ -361,29 +361,16 @@ endef
 
 else # !SYSTEM_OPENSSL
 
-ifeq ($(OS),WNT)
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
crypto \
ssl \
 ))
-else
-$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
-   crypto \
-   ssl \
-))
-endif
 
 define gb_LinkTarget__use_openssl
-ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_linked_libs,$(1),\
crypto \
ssl \
 )
-else
-$(call gb_LinkTarget_add_linked_static_libs,$(1),\
-   crypto \
-   ssl \
-)
 ifeq ($(OS),SOLARIS)
 $(call gb_LinkTarget_add_libs,$(1),\
-lnsl \
@@ -391,11 +378,10 @@ $(call gb_LinkTarget_add_libs,$(1),\
 )
 endif
 ifeq ($(OS),LINUX)
-$(call gb_LinkTarget_add_linked_libs,$(1),\
-   pthread \
+$(call gb_LinkTarget_add_libs,$(1),\
+   -lpthread \
 )
 endif
-endif
 endef
 
 endif # SYSTEM_OPENSSL
diff --git a/main/curl/makefile.mk b/main/curl/makefile.mk
index 044bf4d8c9..b801cb75bf 100644
--- a/main/curl/makefile.mk
+++ b/main/curl/makefile.mk
@@ -59,6 +59,8 @@ curl_LDFLAGS+:=$(ARCH_FLAGS)
 ssl_param=--with-ssl
 .ELSE
 ssl_param=--with-ssl=$(OUTDIR)
+curl_CFLAGS+=-I$(SOLARINCDIR)$/external
+curl_LDFLAGS+=-L$(SOLARLIBDIR) -Wl,-z,origin -Wl,-rpath,\\\$$\$$ORIGIN
 PATCH_FILES+= curl-bundled_openssl.patch
 .ENDIF
 
diff --git a/main/openssl/opensslunx.patch b/main/openssl/opensslunx.patch
index 7177a1c740..5ceac19471 100644
--- a/main/openssl/opensslunx.patch
+++ b/main/openssl/opensslunx.patch
@@ -1,10 +1,17 @@
 misc/build/openssl-3.0.13/Configurations/00-base-templates.conf
2024-01-30 15:28:16.0 +0200
-+++ misc/build/openssl-3.0.13/Configurations/00-base-templates.conf
2024-03-18 02:55:09.593025000 +0200
-@@ -67,6 +67,7 @@
+--- misc/build/openssl-3.0.13/Configurations/00-base-templates.conf
2024-04-14 20:51:59.953276000 +0200
 misc/build/openssl-3.0.13/Configurations/00-base-templates.conf
2024-04-15 04:41:41.558374000 +0200
+@@ -67,9 +67,13 @@
  
  AR  => "ar",
  ARFLAGS => "qc",
-+ASFLAGS  => "-Wa,--noexecstack",
++ASFLAGS => "-Wa,--noexecstack",
  CC  => "cc",
  lflags  =>
- sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
+-sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
++sub {
++my $s = '-Wl,-z,origin -Wl,-rpath,\$$ORIGIN';
++return $withargs{zlib_lib} ? $s." -L".$withargs{zlib_lib} : 
$s;
++},
+ ex_libs =>
+ sub { !defined($disabled{zlib})
+   && defined($disabled{"zlib-dynamic"})
diff --git a/main/openssl/prj/d.lst b/main/openssl/prj/d.lst
index f381599703..cac50416cf 100644
--- a/main/openssl/prj/d.lst
+++ b/main/openssl/prj/d.lst
@@ -1,6 +1,9 @@
 mkdir: %_DEST%\inc%_EXT%\external
 mkdir: %_DEST%\inc%_EXT%\external\openssl
 ..\%__SRC%\inc\*.h %_DEST%\inc%_EXT%\external\openssl
-..\%__SRC%\lib\libcrypto.* %_DEST%\lib%_EXT%\libcrypto.*
-..\%__SRC%\lib\libssl.* %_DEST%\lib%_EXT%\libssl.*
+..\%__SRC%\lib\libcrypto.*.* %_DEST%\lib%_EXT%\*
+..\%__SRC%\lib\libssl.*.* %_DEST%\lib%_EXT%\*
 ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
+
+linklib: libcrypto.*.*
+linklib: libssl.*.*
diff --git a/main/scp2/source/ooo/file_library_ooo.scp 
b/main/scp2/source/ooo/file_library_ooo.scp
index fb82de45e6..ca9dadba1e 100644
--- a/main/scp2/source/ooo/file_library_ooo.scp
+++ b/main/scp2/source/ooo/file_library_ooo.scp
@@ -1777,7 +1777,7 @@ File gid_File_Lib_Openssl
   #ifdef WNT
 Name = "libssl-3.dll";
   #else
-Name = "libssl.so";
+Name = SCP2_URE_DL_VER("ssl", "3");
   #endif
 End
 #endif
@@ -1790,7 +1790,7 @@ File gid_File_Lib_Crypto
   #ifdef WNT
 Name = "libcrypto-3.dll";
   #else
-Name = "libcrypto.so";
+Name = SCP2_URE_DL_VER("crypto", "3");
   #endif
 End
 #endif



(openoffice) 01/02: Get redland building with Clang >= 15, libxml2 >= 2.11.0, and/or FreeBSD >= 14.

2024-04-15 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit a5818cd95c110439abf147eeb958d5e23c748a99
Author: Damjan Jovanovic 
AuthorDate: Mon Apr 15 05:11:27 2024 +0200

Get redland building with Clang >= 15, libxml2 >= 2.11.0, and/or FreeBSD >= 
14.

Patch by: me
---
 main/redland/raptor/makefile.mk  |  1 +
 main/redland/raptor/raptor2-2.0.15.patch | 65 
 2 files changed, 66 insertions(+)

diff --git a/main/redland/raptor/makefile.mk b/main/redland/raptor/makefile.mk
index c7a4f7d2d9..47efbc38e6 100644
--- a/main/redland/raptor/makefile.mk
+++ b/main/redland/raptor/makefile.mk
@@ -94,6 +94,7 @@ BUILD_DIR=$(CONFIGURE_DIR)$/src
 
 .ELSE # "WNT"
 
+OOO_PATCH_FILES+=$(TARFILE_NAME).patch
 .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
 LDFLAGS:=-Wl,-rpath,'ORIGIN:ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
 .ENDIF  # "$(OS)$(COM)"=="LINUXGCC"
diff --git a/main/redland/raptor/raptor2-2.0.15.patch 
b/main/redland/raptor/raptor2-2.0.15.patch
new file mode 100644
index 00..f756224824
--- /dev/null
+++ b/main/redland/raptor/raptor2-2.0.15.patch
@@ -0,0 +1,65 @@
+diff -Nur misc/build/raptor2-2.0.15/src/raptor_libxml.c 
misc/build/raptor2-2.0.15/src/raptor_libxml.c
+--- misc/build/raptor2-2.0.15/src/raptor_libxml.c  2024-04-14 
16:02:17.001795000 +0200
 misc/build/raptor2-2.0.15/src/raptor_libxml.c  2024-04-14 
17:33:11.733451000 +0200
+@@ -246,10 +246,10 @@
+ 
+ ret->owner = 1;
+ 
+-#if LIBXML_VERSION >= 20627
++#if LIBXML_VERSION >= 20627 && LIBXML_VERSION < 21100
+ /* Checked field was released in 2.6.27 on 2006-10-25
+  * 
http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6
+- *
++ * and removed in version 2.11.0...
+  */
+ 
+ /* Mark this entity as having been checked - never do this again */
+diff -Nur misc/build/raptor2-2.0.15/src/raptor_parse.c 
misc/build/raptor2-2.0.15/src/raptor_parse.c
+--- misc/build/raptor2-2.0.15/src/raptor_parse.c   2024-04-14 
16:02:17.005682000 +0200
 misc/build/raptor2-2.0.15/src/raptor_parse.c   2024-04-14 
16:01:17.838736000 +0200
+@@ -257,7 +257,7 @@
+ int
+ raptor_world_get_parsers_count(raptor_world* world)
+ {
+-  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
++  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, (int)NULL);
+ 
+   raptor_world_open(world);
+ 
+diff -Nur misc/build/raptor2-2.0.15/src/raptor_serialize.c 
misc/build/raptor2-2.0.15/src/raptor_serialize.c
+--- misc/build/raptor2-2.0.15/src/raptor_serialize.c   2024-04-14 
16:02:17.76000 +0200
 misc/build/raptor2-2.0.15/src/raptor_serialize.c   2024-04-14 
16:03:45.44705 +0200
+@@ -240,7 +240,7 @@
+ int
+ raptor_world_get_serializers_count(raptor_world* world)
+ {
+-  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
++  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, (int)NULL);
+ 
+   raptor_world_open(world);
+ 
+diff -Nur misc/build/raptor2-2.0.15/src/sort_r.h 
misc/build/raptor2-2.0.15/src/sort_r.h
+--- misc/build/raptor2-2.0.15/src/sort_r.h 2024-04-14 16:02:17.006876000 
+0200
 misc/build/raptor2-2.0.15/src/sort_r.h 2024-04-14 17:12:40.890101000 
+0200
+@@ -24,10 +24,10 @@
+  defined OpenBSD3_1 || defined OpenBSD3_9 || defined __OpenBSD__ || \
+  defined __NetBSD__ || \
+  defined __DragonFly__ || \
+- defined AMIGA)
++ defined AMIGA) && !defined(qsort_r)
+ #  define _SORT_R_BSD
+ #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
+-   defined __linux__ || defined __MINGW32__ || defined __GLIBC__)
++   defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || 
defined(qsort_r))
+ #  define _SORT_R_LINUX
+ #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
+ #  define _SORT_R_WINDOWS
+@@ -82,7 +82,7 @@
+   #elif defined _SORT_R_LINUX
+ 
+ typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
+-extern void qsort_r(void *base, size_t nel, size_t width,
++extern void (qsort_r)(void *base, size_t nel, size_t width,
+ __compar_d_fn_t __compar, void *arg)
+   __attribute__((nonnull (1, 4)));
+ 



(openoffice) branch trunk updated (2331699343 -> 8eb9a7e66a)

2024-04-15 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from 2331699343 Updated download numbers
 new a5818cd95c Get redland building with Clang >= 15, libxml2 >= 2.11.0, 
and/or FreeBSD >= 14.
 new 8eb9a7e66a Build OpenSSL as a dynamic link library, instead of a 
static library. Patch its users to use an RPATH of $ORIGIN, so they use the 
correct copy. This reduces the size of the build by about 4615 KiB, or 3.78%.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 main/RepositoryExternal.mk| 18 +
 main/curl/makefile.mk |  2 +
 main/openssl/opensslunx.patch | 17 +---
 main/openssl/prj/d.lst|  7 +++-
 main/redland/raptor/makefile.mk   |  1 +
 main/redland/raptor/raptor2-2.0.15.patch  | 65 +++
 main/scp2/source/ooo/file_library_ooo.scp |  4 +-
 7 files changed, 89 insertions(+), 25 deletions(-)
 create mode 100644 main/redland/raptor/raptor2-2.0.15.patch



(openoffice) branch trunk updated: Fix typos: mehtod -> method, mehtods -> methods.

2024-04-06 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new a4b70a5c0d Fix typos: mehtod -> method, mehtods -> methods.
a4b70a5c0d is described below

commit a4b70a5c0dc286fe80079976f51a3b5d7c08957d
Author: Damjan Jovanovic 
AuthorDate: Sat Apr 6 18:10:07 2024 +0200

Fix typos: mehtod -> method, mehtods -> methods.

Patch by: me
---
 main/dbaccess/source/core/api/RowSetBase.hxx  | 2 +-
 .../src/main/java/com/sun/star/lib/util/AsynchronousFinalizer.java| 2 +-
 main/registry/inc/registry/reflwrit.hxx   | 2 +-
 .../source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx | 4 ++--
 .../source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx  | 2 +-
 main/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx| 4 ++--
 main/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/main/dbaccess/source/core/api/RowSetBase.hxx 
b/main/dbaccess/source/core/api/RowSetBase.hxx
index 1c0be36610..ef078336b3 100644
--- a/main/dbaccess/source/core/api/RowSetBase.hxx
+++ b/main/dbaccess/source/core/api/RowSetBase.hxx
@@ -240,7 +240,7 @@ namespace dbaccess
@param  _aCheckFunctor
Return  when we already stand on the row 
we want to.
@param  _aMovementFunctor
-   The mehtod used to move.
+   The method used to move.
@return
 if movement was successful.
*/
diff --git 
a/main/jurt/java/jurt/src/main/java/com/sun/star/lib/util/AsynchronousFinalizer.java
 
b/main/jurt/java/jurt/src/main/java/com/sun/star/lib/util/AsynchronousFinalizer.java
index 0c5aa6ac74..a0843a04da 100644
--- 
a/main/jurt/java/jurt/src/main/java/com/sun/star/lib/util/AsynchronousFinalizer.java
+++ 
b/main/jurt/java/jurt/src/main/java/com/sun/star/lib/util/AsynchronousFinalizer.java
@@ -37,7 +37,7 @@ import java.util.LinkedList;
in both cases finalizers lead to synchronous UNO release calls).
 
If JVMs are getting more mature and should no longer have problems with
-   long-running finalize mehtods, this class could be removed again.
+   long-running finalize methods, this class could be removed again.
 */
 public final class AsynchronousFinalizer {
 /**
diff --git a/main/registry/inc/registry/reflwrit.hxx 
b/main/registry/inc/registry/reflwrit.hxx
index e6698c111a..f98fa08f37 100644
--- a/main/registry/inc/registry/reflwrit.hxx
+++ b/main/registry/inc/registry/reflwrit.hxx
@@ -187,7 +187,7 @@ public:
 const ::rtl::OUString& 
name,
 RTParamMode
mode);
 
-/** sets the data for the specified exception of a mehtod.
+/** sets the data for the specified exception of a method.
 
 @param index indicates the index of the method.
 @param excIndex specifies the index of the exception.
diff --git 
a/main/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx 
b/main/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
index 5d537e1425..c716f11299 100644
--- a/main/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
+++ b/main/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
@@ -151,7 +151,7 @@ class SecurityEnvironment_MSCryptImpl : public 
::cppu::WeakImplHelper4<
static const ::com::sun::star::uno::Sequence< sal_Int8 >& 
getUnoTunnelId() ;
static SecurityEnvironment_MSCryptImpl* getImplementation( 
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > 
xObj ) ;
 
-   //Native mehtods
+   //Native methods
virtual HCRYPTPROV getCryptoProvider() throw( 
::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
 
virtual void setCryptoProvider( HCRYPTPROV aProv ) throw( 
::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
@@ -190,7 +190,7 @@ class SecurityEnvironment_MSCryptImpl : public 
::cppu::WeakImplHelper4<
 
virtual sal_Bool defaultEnabled() throw( 
::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
 
-   //Native mehtods
+   //Native methods
virtual xmlSecKeysMngrPtr createKeysManager() throw( 
::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
 
virtual void destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr) 
throw( ::com::sun::star::u

(openoffice) branch trunk updated: Upgrade OpenSSL to version 3.0.13.

2024-03-29 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 4c5b548fb6 Upgrade OpenSSL to version 3.0.13.
4c5b548fb6 is described below

commit 4c5b548fb6ece87dd30bbf720aca0d994a749167
Author: Damjan Jovanovic 
AuthorDate: Mon Mar 18 17:20:28 2024 +0200

Upgrade OpenSSL to version 3.0.13.

LICENSE and NOTICE files now reflect its new license.
The obsolete "DISABLE_OPENSSL" setting has been removed.
Patch Python 2 to support OpenSSL 3.0.x.
Support old versions of Windows.
Uses Strawberry Perl on Windows to build, fetched as a dependency.
Workarounds for missing integer limit constants in the old version of MSVC 
we use.
NASM now works when it's in the PATH, instead of needing --with-nasm-path 
to ./configure.

Patch by: me
---
 main/LICENSE  | 125 ---
 main/NOTICE   |  10 +-
 main/RepositoryFixes.mk   |   4 +-
 main/external_deps.lst|  15 +-
 main/openssl/makefile.mk  |  94 ++---
 main/openssl/openssl.patch| 214 +++
 main/openssl/openssllnx.patch |  25 --
 main/openssl/opensslunx.patch |  10 +
 main/openssl/prj/d.lst|   6 +-
 main/python/python-2.7.18-msvs9.patch | 579 +++---
 main/scp2/source/ooo/file_library_ooo.scp |   4 +-
 11 files changed, 427 insertions(+), 659 deletions(-)

diff --git a/main/LICENSE b/main/LICENSE
index aa6d1e0b1e..9cf79ea9fb 100644
--- a/main/LICENSE
+++ b/main/LICENSE
@@ -1210,131 +1210,6 @@ ings in this Software without prior written 
authorization from him.
 
 
 
-For OpenSSL - built in main/openssl/:
-- BSD-style license with advertising clause
-
-The OpenSSL toolkit stays under a double license, i.e. both the conditions of
-the OpenSSL License and the original SSLeay license apply to the toolkit.
-See below for the actual license texts. Actually both licenses are BSD-style
-Open Source licenses. In case of any license issues related to OpenSSL
-please contact openssl-c...@openssl.org.
-
-OpenSSL License

-
-===
-Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the
-   distribution.
-
-3. All advertising materials mentioning features or use of this
-   software must display the following acknowledgment:
-   "This product includes software developed by the OpenSSL Project
-   for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
-
-4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
-   endorse or promote products derived from this software without
-   prior written permission. For written permission, please contact
-   openssl-c...@openssl.org.
-
-5. Products derived from this software may not be called "OpenSSL"
-   nor may "OpenSSL" appear in their names without prior written
-   permission of the OpenSSL Project.
-
-6. Redistributions of any form whatsoever must retain the following
-   acknowledgment:
-   "This product includes software developed by the OpenSSL Project
-   for use in the OpenSSL Toolkit (http://www.openssl.org/)"
-
-THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
-EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
-ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-===
-
-This product includes cryptographic software written by Eric Young
-(e...@cryptsoft.com).  This product includes software written by Tim
-Hudson (t...@cryptsoft.com).
-
-Original SSLeay License
---

(openoffice) branch trunk updated: Don't allow calls to OpenSSLCipher::blockSize() before the cipher is initialized.

2024-03-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 244f2bcc92 Don't allow calls to OpenSSLCipher::blockSize() before the 
cipher is initialized.
244f2bcc92 is described below

commit 244f2bcc921bc5dc45e6c1970e27ac2409c44e17
Author: Damjan Jovanovic 
AuthorDate: Sun Mar 17 15:56:38 2024 +0200

Don't allow calls to OpenSSLCipher::blockSize() before the cipher
is initialized.

Patch by: me
---
 main/oox/inc/oox/helper/openssl_wrapper.hxx | 5 -
 main/oox/source/core/encryption.cxx | 4 ++--
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/main/oox/inc/oox/helper/openssl_wrapper.hxx 
b/main/oox/inc/oox/helper/openssl_wrapper.hxx
index 88d6bf2143..8124dc1e04 100644
--- a/main/oox/inc/oox/helper/openssl_wrapper.hxx
+++ b/main/oox/inc/oox/helper/openssl_wrapper.hxx
@@ -142,11 +142,6 @@ public:
 throwOpenSSLException( "EVP_CipherFinal failed" );
 }
 
-int blockSize()
-{
-return blockSize( cipher );
-}
-
 static int blockSize( const EVP_CIPHER *cipherAlgorithm )
 {
 return EVP_CIPHER_block_size( cipherAlgorithm );
diff --git a/main/oox/source/core/encryption.cxx 
b/main/oox/source/core/encryption.cxx
index 2bdfa8e794..46ecf49d6d 100644
--- a/main/oox/source/core/encryption.cxx
+++ b/main/oox/source/core/encryption.cxx
@@ -802,7 +802,7 @@ static vector< sal_uInt8 > decryptAll( const EVP_CIPHER* 
cipherAlgorithm,
 OpenSSLCipher cipher;
 cipher.initialize( cipherAlgorithm, key, iv, 0 );
 cipher.setPadding( 0 );
-const int blockSize = cipher.blockSize();
+const int blockSize = OpenSSLCipher::blockSize( cipherAlgorithm );
 vector< sal_uInt8 > decryptedData( encryptedDataLength + 2*blockSize );
 
 int decryptedDataLength;
@@ -917,7 +917,7 @@ void AgileEncryptionInfo::decryptStream( BinaryXInputStream 
&aEncryptedPackage,
 const sal_uInt64 decryptedSize = aEncryptedPackage.readuInt64();
 
 sal_uInt8 inputBuffer[ 4096 ];
-vector< sal_uInt8 > outputBuffer( 4096 + 2*cipher.blockSize() );
+vector< sal_uInt8 > outputBuffer( 4096 + 2*OpenSSLCipher::blockSize( 
cipherAlgorithm ) );
 sal_Int32 bytesIn;
 int bytesOut;
 int finalBytesOut;



(openoffice) 03/03: getFlag() isn't happy on Visual Studio 2008, hack it to work.

2024-03-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 42c0a318a970f6f7f43d26a8397448d5d5b8bd36
Author: Damjan Jovanovic 
AuthorDate: Sun Mar 17 09:41:22 2024 +0200

getFlag() isn't happy on Visual Studio 2008, hack it to work.

Patch by: me
---
 main/oox/source/core/encryption.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main/oox/source/core/encryption.cxx 
b/main/oox/source/core/encryption.cxx
index a94cd095fc..2bdfa8e794 100644
--- a/main/oox/source/core/encryption.cxx
+++ b/main/oox/source/core/encryption.cxx
@@ -97,7 +97,7 @@ StandardEncryptionInfo::StandardEncryptionInfo( 
BinaryInputStream& rStrm ) throw
 {
 char msg[ 1024 ];
 rStrm >> mnFlags;
-if( getFlag( mnFlags, ENCRYPTINFO_EXTERNAL ) )
+if( getFlag( mnFlags, (sal_uInt32) ENCRYPTINFO_EXTERNAL ) )
 throw Exception( OUString::createFromAscii( 
"EncryptionInfo::readEncryptionInfo() error: \"Extensible encryption\" is not 
currently supported, please report" ), Reference< XInterface >() );
 
 sal_uInt32 nHeaderSize, nRepeatedFlags;
@@ -130,8 +130,8 @@ StandardEncryptionInfo::StandardEncryptionInfo( 
BinaryInputStream& rStrm ) throw
 
 bool StandardEncryptionInfo::isImplemented()
 {
-return getFlag( mnFlags, ENCRYPTINFO_CRYPTOAPI ) &&
-getFlag( mnFlags, ENCRYPTINFO_AES ) &&
+return getFlag( mnFlags, (sal_uInt32) ENCRYPTINFO_CRYPTOAPI ) &&
+getFlag( mnFlags, (sal_uInt32) ENCRYPTINFO_AES ) &&
 // algorithm ID 0 defaults to AES128 too, if ENCRYPTINFO_AES flag is 
set
( ( mnAlgorithmId == 0 ) || ( mnAlgorithmId == ENCRYPT_ALGO_AES128 ) ) 
&&
// hash algorithm ID 0 defaults to SHA-1 too



(openoffice) 02/03: Add compatibility with OpenSSL 1.0.x.

2024-03-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit f3025b08c40161265442c34e2b50bc05aa5388c6
Author: Damjan Jovanovic 
AuthorDate: Sun Mar 17 09:36:50 2024 +0200

Add compatibility with OpenSSL 1.0.x.

Patch by: me
---
 main/oox/inc/oox/helper/openssl_wrapper.hxx | 9 +
 1 file changed, 9 insertions(+)

diff --git a/main/oox/inc/oox/helper/openssl_wrapper.hxx 
b/main/oox/inc/oox/helper/openssl_wrapper.hxx
index fdb2c690c0..88d6bf2143 100644
--- a/main/oox/inc/oox/helper/openssl_wrapper.hxx
+++ b/main/oox/inc/oox/helper/openssl_wrapper.hxx
@@ -28,6 +28,7 @@
 #include "com/sun/star/uno/Exception.hpp"
 
 #include 
+#include 
 
 namespace oox {
 
@@ -41,14 +42,22 @@ class OpenSSLDigest
 public:
 OpenSSLDigest() throw ( ::com::sun::star::uno::Exception )
 {
+#if OPENSSL_VERSION_NUMBER >= 0x1010
 digest_ctx = EVP_MD_CTX_new();
+#else
+digest_ctx = EVP_MD_CTX_create();
+#endif
 if( digest_ctx == NULL )
 throwOpenSSLException( "Failed to create digest context" );
 }
 
 ~OpenSSLDigest()
 {
+#if OPENSSL_VERSION_NUMBER >= 0x1010
 EVP_MD_CTX_free( digest_ctx );
+#else
+EVP_MD_CTX_destroy( digest_ctx );
+#endif
 }
 
 void initialize( const EVP_MD* aDigest ) throw ( 
::com::sun::star::uno::Exception )



(openoffice) branch trunk updated (f4568fcafb -> 42c0a318a9)

2024-03-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from f4568fcafb Use correct icons in Help
 new f65b4e326d Use &v[0] instead of v.data() for "::std::vector v", 
because Visual Studio 2008 doesn't have the ::std::vector::data() method in its 
broken/incomplete STL.
 new f3025b08c4 Add compatibility with OpenSSL 1.0.x.
 new 42c0a318a9 getFlag() isn't happy on Visual Studio 2008, hack it to 
work.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 main/oox/inc/oox/helper/openssl_wrapper.hxx |  9 +
 main/oox/source/core/encryption.cxx | 58 ++---
 2 files changed, 38 insertions(+), 29 deletions(-)



(openoffice) 01/03: Use &v[0] instead of v.data() for "::std::vector v", because Visual Studio 2008 doesn't have the ::std::vector::data() method in its broken/incomplete STL.

2024-03-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit f65b4e326d91bfe900dc1dd22ece69e3ddd8444a
Author: Damjan Jovanovic 
AuthorDate: Sun Mar 17 09:13:42 2024 +0200

Use &v[0] instead of v.data() for "::std::vector v", because Visual Studio 
2008
doesn't have the ::std::vector::data() method in its broken/incomplete STL.

Patch by: me
---
 main/oox/source/core/encryption.cxx | 52 ++---
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/main/oox/source/core/encryption.cxx 
b/main/oox/source/core/encryption.cxx
index 729a7701bd..a94cd095fc 100644
--- a/main/oox/source/core/encryption.cxx
+++ b/main/oox/source/core/encryption.cxx
@@ -207,14 +207,14 @@ Sequence< NamedValue > 
StandardEncryptionInfo::verifyPassword( const OUString& r
 rtl_digest_destroy( aDigest );
 
 vector< sal_uInt8 > key( mnKeySize / 8 );
-deriveKey( pnHash, RTL_DIGEST_LENGTH_SHA1, key.data(), key.size() );
+deriveKey( pnHash, RTL_DIGEST_LENGTH_SHA1, &key[ 0 ], key.size() );
 delete[] pnHash;
 
 Sequence< NamedValue > aResult;
-if( checkEncryptionData( key.data(), key.size(), mpnEncrVerifier, sizeof( 
mpnEncrVerifier ), mpnEncrVerifierHash, sizeof( mpnEncrVerifierHash ) ) )
+if( checkEncryptionData( &key[ 0 ], key.size(), mpnEncrVerifier, sizeof( 
mpnEncrVerifier ), mpnEncrVerifierHash, sizeof( mpnEncrVerifierHash ) ) )
 {
 SequenceAsHashMap aEncryptionData;
-aEncryptionData[ CREATE_OUSTRING( "AES128EncryptionKey" ) ] <<= 
Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( key.data() ), 
key.size() );
+aEncryptionData[ CREATE_OUSTRING( "AES128EncryptionKey" ) ] <<= 
Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( &key[ 0 ] ), 
key.size() );
 aEncryptionData[ CREATE_OUSTRING( "AES128EncryptionSalt" ) ] <<= 
Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( mpnSalt ), 
mnSaltSize );
 aEncryptionData[ CREATE_OUSTRING( "AES128EncryptionVerifier" ) ] <<= 
Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( mpnEncrVerifier ), 
sizeof( mpnEncrVerifier ) );
 aEncryptionData[ CREATE_OUSTRING( "AES128EncryptionVerifierHash" ) ] 
<<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( 
mpnEncrVerifierHash ), sizeof( mpnEncrVerifierHash ) );
@@ -296,7 +296,7 @@ void StandardEncryptionInfo::decryptStream( 
BinaryXInputStream &aEncryptedPackag
 aes_ctx = EVP_CIPHER_CTX_new();
 if ( aes_ctx == NULL )
 throw Exception();
-EVP_DecryptInit_ex( aes_ctx, EVP_aes_128_ecb(), 0, encryptionKey.data(), 0 
);
+EVP_DecryptInit_ex( aes_ctx, EVP_aes_128_ecb(), 0, &encryptionKey[ 0 ], 0 
);
 EVP_CIPHER_CTX_set_padding( aes_ctx, 0 );
 
 sal_uInt8 pnInBuffer[ 1024 ];
@@ -359,7 +359,7 @@ static bool decodeBase64( OUString& base64, vector< 
sal_uInt8 >& bytes )
 ::rtl::OString base64Ascii = ::rtl::OUStringToOString( base64, 
RTL_TEXTENCODING_UTF8 );
 const sal_uInt32 len = base64Ascii.getLength();
 bytes.resize( (len + 3) / 4 * 3 );
-int decodedSize = EVP_DecodeBlock( bytes.data(), reinterpret_cast< 
sal_uInt8 const * >( base64Ascii.getStr() ), len );
+int decodedSize = EVP_DecodeBlock( &bytes[ 0 ], reinterpret_cast< 
sal_uInt8 const * >( base64Ascii.getStr() ), len );
 if ( decodedSize < 0 )
 return false;
 if ( len >= 2 && base64Ascii[ len-1 ] == '=' && base64Ascii[ len-2 ] == 
'=' )
@@ -697,9 +697,9 @@ static vector< sal_uInt8 > hashPassword( const OUString& 
password, const EVP_MD
 ByteOrderConverter::writeLittleEndian( &passwordLE[ 2 * i ], 
static_cast< sal_uInt16 >( password[ i ] ) );
 
 vector< sal_uInt8> digestBuffer( digestSize );
-digest.update( salt.data(), salt.size() );
-digest.update( passwordLE.data(), passwordLE.size() );
-digest.final( digestBuffer.data(), NULL );
+digest.update( &salt[ 0 ], salt.size() );
+digest.update( &passwordLE[ 0 ], passwordLE.size() );
+digest.final( &digestBuffer[ 0 ], NULL );
 
 char iteratorBuffer[ 4 ];
 for (sal_uInt32 i = 0; i < spinCount; i++)
@@ -707,8 +707,8 @@ static vector< sal_uInt8 > hashPassword( const OUString& 
password, const EVP_MD
 digest.initialize( digestAlgorithm );
 ByteOrderConverter::writeLittleEndian( &iteratorBuffer, i );
 digest.update( iteratorBuffer, sizeof( iteratorBuffer ) );
-digest.update( digestBuffer.data(), digestSize );
-digest.final( digestBuffer.data(), NULL );
+digest.update( &digestBuffer[ 0 ], dige

(openoffice) branch trunk updated: Implement the (MS Office 2010+) OOXML "Agile encryption" support, so that we can open such password-protected OOXML files.

2024-03-15 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 506fa58b19 Implement the (MS Office 2010+) OOXML "Agile encryption" 
support, so that we can open such password-protected OOXML files.
506fa58b19 is described below

commit 506fa58b1970084a0caacb50b3a805e469be4756
Author: Damjan Jovanovic 
AuthorDate: Sat Mar 2 18:47:05 2024 +0200

Implement the (MS Office 2010+) OOXML "Agile encryption" support, so that we
can open such password-protected OOXML files.

Adds all the Agile encryption XML tokens and namespaces, and parses the XML
from EncryptionInfo stream, gets OpenOffice to recognize the file is 
encrypted
and ask for a password, and successfully decrypts the file if password is
correct.

Also a number of other fixes and improvements:
- Sorted main/oox/source/token/tokens.txt so it's in alphabetical order
  (wrong order might have broken certain tokens?).
- Refactored how OOXML encryption is generally handled. It's now in its
  own file.
- Added logging to the FilterDetect class. It logs to the office-wide 
default
  logger.
- Added a flush() method to the BinaryXOutputStream class.
- Changed FilterDetect to use XMultiComponentFactory and XComponentContext
  instead of the deprecated XMultiServiceFactory.
- Error handling was generally improved.
- Exception safety and some memory safety (::std::vector instead of new[])
  in all the new code. Memory leaks should not be possible.

Much of the code involved in the decryption was ported from the excellent
Apache POI project, so it's been credited in our NOTICE file.

Patch by: me
---
 main/NOTICE|  39 +
 main/oox/Library_oox.mk|   2 +
 main/oox/inc/oox/core/encryption.hxx   |  66 ++
 main/oox/inc/oox/core/filterdetect.hxx |   2 +
 main/oox/inc/oox/helper/binaryoutputstream.hxx |   3 +
 main/oox/inc/oox/helper/openssl_wrapper.hxx| 158 
 main/oox/source/core/encryption.cxx| 985 +
 main/oox/source/core/filterdetect.cxx  | 316 ++--
 main/oox/source/helper/binaryoutputstream.cxx  |  12 +
 main/oox/source/helper/openssl_wrapper.cxx |  63 ++
 main/oox/source/token/namespaces.hxx.tail  |   2 +
 main/oox/source/token/namespaces.txt   |   5 +
 main/oox/source/token/tokens.txt   |  29 +-
 13 files changed, 1422 insertions(+), 260 deletions(-)

diff --git a/main/NOTICE b/main/NOTICE
index e17cedc56f..43d0de4cc7 100644
--- a/main/NOTICE
+++ b/main/NOTICE
@@ -21,6 +21,7 @@ Apache projects:
 - Apache Portable Runtime Utility Library
 - Apache Commons - used by MediaWiki Publisher extension
 - Apache Jakarta HttpClient - used by MediaWiki Publisher extension
+- Apache POI - OOXML encryption code from Apache POI was ported to our 
main/oox/source/core/encryption.cxx
 - Apache Tomcat - used by MediaWiki Publisher extension
 
 The notices from these projects are following:
@@ -107,6 +108,44 @@ This product includes software developed by
 The Apache Software Foundation (https://www.apache.org/).
 
 
+Apache POI
+Copyright 2003-2024 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (https://www.apache.org/).
+
+This product contains parts that were originally based on software from BEA.
+Copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/> (dead link),
+which was acquired by Oracle Corporation in 2008.
+<http://www.oracle.com/us/corporate/Acquisitions/bea/index.html>
+<https://en.wikipedia.org/wiki/BEA_Systems>
+Note: The ASF Secretary has on hand a Software Grant Agreement (SGA) from
+BEA Systems, Inc. dated 9 Sep 2003 for XMLBeans signed by their EVP/CFO.
+
+This product contains W3C XML Schema documents. Copyright 2001-2003 (c)
+World Wide Web Consortium (Massachusetts Institute of Technology, European
+Research Consortium for Informatics and Mathematics, Keio University)
+
+This product contains the chunks_parse_cmds.tbl file from the vsdump program.
+Copyright (C) 2006-2007 Valek Filippov (f...@df.ru)
+
+This product contains parts of the eID Applet project
+<http://eid-applet.googlecode.com> and 
<https://github.com/e-Contract/eid-applet>.
+Copyright (c) 2009-2018
+FedICT (federal ICT department of Belgium), e-Contract.be BVBA 
(https://www.e-contract.be),
+Bart Hanssens from FedICT
+
+ExceptionUtils is derived from `scala.util.control.NonFatal` in scala-library
+which was released under the Apache 2.0 license.
+
+Copyright (c) 2002-2023 EPFL
+Copyright (c) 2011-2023 Lightbend, Inc.
+
+Scala includes software developed at
+LAMP/EPFL (https://lamp.epfl.ch/) and
+Lightbend, Inc. (https:/

(openoffice) branch AOO42X updated: Allow pasting SVG graphics into OpenOffice.

2024-02-23 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 8809675e41 Allow pasting SVG graphics into OpenOffice.
8809675e41 is described below

commit 8809675e418555082e24d8d46f876db1e912250e
Author: Damjan Jovanovic 
AuthorDate: Fri Feb 23 20:46:47 2024 +0200

Allow pasting SVG graphics into OpenOffice.

Patch by: me

(cherry picked from commit dbea4404ca2c86a3a74294e262e6584c3e450818)
---
 main/svtools/source/misc/transfer.cxx | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/main/svtools/source/misc/transfer.cxx 
b/main/svtools/source/misc/transfer.cxx
index 5f83b0527b..e10123880e 100644
--- a/main/svtools/source/misc/transfer.cxx
+++ b/main/svtools/source/misc/transfer.cxx
@@ -1970,6 +1970,20 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const 
DataFlavor& rFlavor, GDIM
}
}
 
+   if( !bRet &&
+   HasFormat( SOT_FORMATSTR_ID_SVG ) &&
+   SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_SVG, 
aSubstFlavor ) &&
+   GetSotStorageStream( aSubstFlavor, xStm ) )
+   {
+   Graphic aGraphic;
+
+   if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE 
)
+   {
+   rMtf = aGraphic.GetGDIMetaFile();
+   bRet = sal_True;
+   }
+   }
+
return bRet;
 }
 



(openoffice) branch trunk updated: Allow pasting SVG graphics into OpenOffice.

2024-02-23 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new dbea4404ca Allow pasting SVG graphics into OpenOffice.
dbea4404ca is described below

commit dbea4404ca2c86a3a74294e262e6584c3e450818
Author: Damjan Jovanovic 
AuthorDate: Fri Feb 23 20:46:47 2024 +0200

Allow pasting SVG graphics into OpenOffice.

Patch by: me
---
 main/svtools/source/misc/transfer.cxx | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/main/svtools/source/misc/transfer.cxx 
b/main/svtools/source/misc/transfer.cxx
index 5f83b0527b..e10123880e 100644
--- a/main/svtools/source/misc/transfer.cxx
+++ b/main/svtools/source/misc/transfer.cxx
@@ -1970,6 +1970,20 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const 
DataFlavor& rFlavor, GDIM
}
}
 
+   if( !bRet &&
+   HasFormat( SOT_FORMATSTR_ID_SVG ) &&
+   SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_SVG, 
aSubstFlavor ) &&
+   GetSotStorageStream( aSubstFlavor, xStm ) )
+   {
+   Graphic aGraphic;
+
+   if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE 
)
+   {
+   rMtf = aGraphic.GetGDIMetaFile();
+   bRet = sal_True;
+   }
+   }
+
return bRet;
 }
 



(openoffice) branch AOO42X updated: When copying charts, shapes, etc. out of OpenOffice, export them to the clipboard in the (lossless) SVG graphics format as well.

2024-02-13 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new ad6faf9749 When copying charts, shapes, etc. out of OpenOffice, export 
them to the clipboard in the (lossless) SVG graphics format as well.
ad6faf9749 is described below

commit ad6faf9749cad74c167c20bfc434a305f8fb5e15
Author: Damjan Jovanovic 
AuthorDate: Tue Feb 13 05:52:00 2024 +0200

When copying charts, shapes, etc. out of OpenOffice, export them to the
clipboard in the (lossless) SVG graphics format as well.

This can be pasted into GIMP, Inkscape, and other apps, unlike our
current WMF/EMF clipboard formats which use private MIME types that
nothing supports.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=112829 - Copy & paste of 
OLE object
   to Gimp fails with error message
Patch by: me

(cherry picked from commit 61aee323790d0a1ed0745ee5a84b8885bcd0a559)
---
 main/sfx2/source/doc/sfxbasemodel.cxx | 50 +--
 main/sot/inc/sot/formats.hxx  |  3 ++-
 main/sot/source/base/exchange.cxx |  1 +
 main/svtools/source/misc/transfer.cxx | 33 ++-
 4 files changed, 77 insertions(+), 10 deletions(-)

diff --git a/main/sfx2/source/doc/sfxbasemodel.cxx 
b/main/sfx2/source/doc/sfxbasemodel.cxx
index e8967d0580..57df31017f 100644
--- a/main/sfx2/source/doc/sfxbasemodel.cxx
+++ b/main/sfx2/source/doc/sfxbasemodel.cxx
@@ -2175,6 +2175,30 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const 
DATAFLAVOR& aFlavor )
else
 throw datatransfer::UnsupportedFlavorException();
}
+else if ( aFlavor.MimeType.equalsAscii( "image/svg+xml" ) )
+{
+if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 
>*) 0 ) )
+{
+::boost::shared_ptr pMetaFile =
+m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True );
+
+if ( pMetaFile )
+{
+::boost::shared_ptr pStream(
+GraphicHelper::getFormatStrFromGDI_Impl(
+pMetaFile.get(), CVT_SVG ) );
+
+if ( pStream )
+{
+pStream->SetVersion( SOFFICE_FILEFORMAT_CURRENT );
+aAny <<= Sequence< sal_Int8 >( reinterpret_cast< const 
sal_Int8* >( pStream->GetData() ),
+   pStream->Seek( 
STREAM_SEEK_TO_END ) );
+}
+}
+}
+else
+throw datatransfer::UnsupportedFlavorException();
+}
 else if ( aFlavor.MimeType.equalsAscii( 
"application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ) )
{
if ( aFlavor.DataType == getCppuType( (const Sequence< 
sal_Int8 >*) 0 ) )
@@ -2240,7 +2264,7 @@ uno::Sequence< DATAFLAVOR > SAL_CALL 
SfxBaseModel::getTransferDataFlavors()
 {
 SfxModelGuard aGuard( *this );
 
-sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 10 
: 8;
+sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 11 
: 9;
 uno::Sequence< DATAFLAVOR > aFlavorSeq( nSuppFlavors );
 
aFlavorSeq[0].MimeType =
@@ -2283,17 +2307,22 @@ uno::Sequence< DATAFLAVOR > SAL_CALL 
SfxBaseModel::getTransferDataFlavors()
 aFlavorSeq[7].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "PNG" ) );
 aFlavorSeq[7].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
 
-if ( nSuppFlavors == 10 )
+aFlavorSeq[8].MimeType =
+::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/svg+xml" ) );
+aFlavorSeq[8].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "SVG" ) );
+aFlavorSeq[8].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
+
+if ( nSuppFlavors == 11 )
{
-aFlavorSeq[8].MimeType =
+aFlavorSeq[9].MimeType =
 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"application/x-openoffice-emf;windows_formatname=\"Image EMF\"" ) );
-aFlavorSeq[8].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Enhanced Windows MetaFile" ) );
-aFlavorSeq[8].DataType = getCppuType( (const sal_uInt64*) 0 );
+aFlavorSeq[9].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Enhanced Windows MetaFile" ) );
+aFlavorSeq[9].DataType = getCppuType( (const sal_uInt64*) 0 );
 
-aFlavorSeq[9].MimeType =
+aFlavorSeq[10].MimeType =
   

(openoffice) branch trunk updated: When copying charts, shapes, etc. out of OpenOffice, export them to the clipboard in the (lossless) SVG graphics format as well.

2024-02-13 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 61aee32379 When copying charts, shapes, etc. out of OpenOffice, export 
them to the clipboard in the (lossless) SVG graphics format as well.
61aee32379 is described below

commit 61aee323790d0a1ed0745ee5a84b8885bcd0a559
Author: Damjan Jovanovic 
AuthorDate: Tue Feb 13 05:52:00 2024 +0200

When copying charts, shapes, etc. out of OpenOffice, export them to the
clipboard in the (lossless) SVG graphics format as well.

This can be pasted into GIMP, Inkscape, and other apps, unlike our
current WMF/EMF clipboard formats which use private MIME types that
nothing supports.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=112829 - Copy & paste of 
OLE object
   to Gimp fails with error message
Patch by: me
---
 main/sfx2/source/doc/sfxbasemodel.cxx | 50 +--
 main/sot/inc/sot/formats.hxx  |  3 ++-
 main/sot/source/base/exchange.cxx |  1 +
 main/svtools/source/misc/transfer.cxx | 33 ++-
 4 files changed, 77 insertions(+), 10 deletions(-)

diff --git a/main/sfx2/source/doc/sfxbasemodel.cxx 
b/main/sfx2/source/doc/sfxbasemodel.cxx
index e8967d0580..57df31017f 100644
--- a/main/sfx2/source/doc/sfxbasemodel.cxx
+++ b/main/sfx2/source/doc/sfxbasemodel.cxx
@@ -2175,6 +2175,30 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const 
DATAFLAVOR& aFlavor )
else
 throw datatransfer::UnsupportedFlavorException();
}
+else if ( aFlavor.MimeType.equalsAscii( "image/svg+xml" ) )
+{
+if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 
>*) 0 ) )
+{
+::boost::shared_ptr pMetaFile =
+m_pData->m_pObjectShell->GetPreviewMetaFile( sal_True );
+
+if ( pMetaFile )
+{
+::boost::shared_ptr pStream(
+GraphicHelper::getFormatStrFromGDI_Impl(
+pMetaFile.get(), CVT_SVG ) );
+
+if ( pStream )
+{
+pStream->SetVersion( SOFFICE_FILEFORMAT_CURRENT );
+aAny <<= Sequence< sal_Int8 >( reinterpret_cast< const 
sal_Int8* >( pStream->GetData() ),
+   pStream->Seek( 
STREAM_SEEK_TO_END ) );
+}
+}
+}
+else
+throw datatransfer::UnsupportedFlavorException();
+}
 else if ( aFlavor.MimeType.equalsAscii( 
"application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ) )
{
if ( aFlavor.DataType == getCppuType( (const Sequence< 
sal_Int8 >*) 0 ) )
@@ -2240,7 +2264,7 @@ uno::Sequence< DATAFLAVOR > SAL_CALL 
SfxBaseModel::getTransferDataFlavors()
 {
 SfxModelGuard aGuard( *this );
 
-sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 10 
: 8;
+sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 11 
: 9;
 uno::Sequence< DATAFLAVOR > aFlavorSeq( nSuppFlavors );
 
aFlavorSeq[0].MimeType =
@@ -2283,17 +2307,22 @@ uno::Sequence< DATAFLAVOR > SAL_CALL 
SfxBaseModel::getTransferDataFlavors()
 aFlavorSeq[7].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "PNG" ) );
 aFlavorSeq[7].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
 
-if ( nSuppFlavors == 10 )
+aFlavorSeq[8].MimeType =
+::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/svg+xml" ) );
+aFlavorSeq[8].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "SVG" ) );
+aFlavorSeq[8].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
+
+if ( nSuppFlavors == 11 )
{
-aFlavorSeq[8].MimeType =
+aFlavorSeq[9].MimeType =
 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"application/x-openoffice-emf;windows_formatname=\"Image EMF\"" ) );
-aFlavorSeq[8].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Enhanced Windows MetaFile" ) );
-aFlavorSeq[8].DataType = getCppuType( (const sal_uInt64*) 0 );
+aFlavorSeq[9].HumanPresentableName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Enhanced Windows MetaFile" ) );
+aFlavorSeq[9].DataType = getCppuType( (const sal_uInt64*) 0 );
 
-aFlavorSeq[9].MimeType =
+aFlavorSeq[10].MimeType =
 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"application/x-open

(openoffice) branch AOO42X updated: Add FreeBSD to the top level .gitignore. Sort the operating systems in alphabetical order.

2024-02-10 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 8299709708 Add FreeBSD to the top level .gitignore. Sort the operating 
systems in alphabetical order.
8299709708 is described below

commit 82997097082eed4d58dae8a833549ad11b435225
Author: Damjan Jovanovic 
AuthorDate: Sat Feb 10 21:10:26 2024 +0200

Add FreeBSD to the top level .gitignore. Sort the operating systems
in alphabetical order.

Patch by: me

(cherry picked from commit 42752da2f4a4fff9aa4dc456864324e632a4185a)
---
 .gitignore | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index f541c96e3d..84c7c4c422 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,16 +68,18 @@ TAGS
 /main/external/vcredist/*
 
 # $INPATH output directories
+/*/*/unxfbsd?
+/*/*/unxfbsd?.pro
 /*/*/unxlng??
 /*/*/unxlng??.pro
+/*/*/unxmac??
+/*/*/unxmac??.pro
+/*/*/unxso???
+/*/*/unxso???.pro
 /*/*/wntmsc???
 /*/*/wntmsc???.pro
 /*/*/wntgcc?
 /*/*/wntgcc?.pro
-/*/*/unxso???
-/*/*/unxso???.pro
-/*/*/unxmac??
-/*/*/unxmac??.pro
 
 # Windows Accessibility Bridge
 main/winaccessibility/source/UAccCOMIDL/dlldata.c



(openoffice) branch trunk updated: Add FreeBSD to the top level .gitignore. Sort the operating systems in alphabetical order.

2024-02-10 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 42752da2f4 Add FreeBSD to the top level .gitignore. Sort the operating 
systems in alphabetical order.
42752da2f4 is described below

commit 42752da2f4a4fff9aa4dc456864324e632a4185a
Author: Damjan Jovanovic 
AuthorDate: Sat Feb 10 21:10:26 2024 +0200

Add FreeBSD to the top level .gitignore. Sort the operating systems
in alphabetical order.

Patch by: me
---
 .gitignore | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index f541c96e3d..84c7c4c422 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,16 +68,18 @@ TAGS
 /main/external/vcredist/*
 
 # $INPATH output directories
+/*/*/unxfbsd?
+/*/*/unxfbsd?.pro
 /*/*/unxlng??
 /*/*/unxlng??.pro
+/*/*/unxmac??
+/*/*/unxmac??.pro
+/*/*/unxso???
+/*/*/unxso???.pro
 /*/*/wntmsc???
 /*/*/wntmsc???.pro
 /*/*/wntgcc?
 /*/*/wntgcc?.pro
-/*/*/unxso???
-/*/*/unxso???.pro
-/*/*/unxmac??
-/*/*/unxmac??.pro
 
 # Windows Accessibility Bridge
 main/winaccessibility/source/UAccCOMIDL/dlldata.c



(openoffice) branch AOO42X updated: Merge main/cosv and main/udm into main/autodoc.

2024-02-10 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 8a1069585a Merge main/cosv and main/udm into main/autodoc.
8a1069585a is described below

commit 8a1069585a3edf3284cdfd14d00e69a710125cb7
Author: Damjan Jovanovic 
AuthorDate: Sat Feb 10 17:49:34 2024 +0200

Merge main/cosv and main/udm into main/autodoc.

main/autodoc depends on main/cosv and main/udm.
main/udm depends on main/cosv.
No other module depends on main/cosv or main/udm.
The only deliverable from main/autodoc is the autodoc executable -
there are no libraries, and all headers remain private and undelivered.

We might even be able to use some third-party documentation generator
instead of autodoc, perhaps Doxygen. Whether we should go that way is 
debatable,
but there is no point in littering main/ with 2 modules and littering 
solver/
with many headers and 2 static libraries just so autodoc can consume them.
Rather make their code internal to autodoc.

Patch by: me

(cherry picked from commit 11c03c6d381fea19f0fea13ae5a371ba50bad241)
---
 main/Module_ooo.mk |  2 -
 main/Repository.mk |  2 -
 main/autodoc/Executable_autodoc.mk | 25 +++--
 main/{cosv => autodoc}/inc/cosv/bstream.hxx|  0
 main/{cosv => autodoc}/inc/cosv/comdline.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/comfunc.hxx|  0
 main/{cosv => autodoc}/inc/cosv/commandline.hxx|  0
 main/{cosv => autodoc}/inc/cosv/csv_env.hxx|  0
 main/{cosv => autodoc}/inc/cosv/csv_ostream.hxx|  0
 main/{cosv => autodoc}/inc/cosv/csv_precomp.h  |  0
 main/{cosv => autodoc}/inc/cosv/datetime.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/dirchain.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/file.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/mbstream.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/openclose.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/persist.hxx|  0
 main/{cosv => autodoc}/inc/cosv/ploc.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/ploc_dir.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/plocroot.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/std_outp.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/str_types.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/streamstr.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/string.hxx |  0
 main/{cosv => autodoc}/inc/cosv/stringdata.hxx |  0
 main/{cosv => autodoc}/inc/cosv/tpl/dyn.hxx|  0
 main/{cosv => autodoc}/inc/cosv/tpl/funcall.hxx|  0
 main/{cosv => autodoc}/inc/cosv/tpl/processor.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/tpl/range.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/tpl/swelist.hxx|  0
 main/{cosv => autodoc}/inc/cosv/tpl/tpltools.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/tpl/vvector.hxx|  0
 main/{cosv => autodoc}/inc/cosv/x.hxx  |  0
 main/{udm => autodoc}/inc/udm/html/htmlitem.hxx|  0
 main/{udm => autodoc}/inc/udm/xml/xmlitem.hxx  |  0
 main/autodoc/prj/build.lst |  2 +-
 .../source/cosv}/comphelp/badcast.cxx  |  0
 .../source => autodoc/source/cosv}/fullcpp.mk  |  0
 .../source => autodoc/source/cosv}/inc/precomp.h   |  0
 .../source/cosv}/service/comdline.cxx  |  0
 .../source/cosv}/service/comfunc.cxx   |  0
 .../source/cosv}/service/commandline.cxx   |  0
 .../source/cosv}/service/csv_ostream.cxx   |  0
 .../source/cosv}/service/datetime.cxx  |  0
 .../source/cosv}/service/std_outp.cxx  |  0
 .../source/cosv}/storage/dirchain.cxx  |  0
 .../source/cosv}/storage/file.cxx  |  0
 .../source/cosv}/storage/mbstream.cxx  |  0
 .../source/cosv}/storage/persist.cxx   |  0
 .../source/cosv}/storage/ploc.cxx  |  0
 .../source/cosv}/storage/ploc_dir.cxx  |  0
 .../source/cosv}/storage/plocroot.cxx  |  0
 .../source/cosv}/strings/str_types.cxx |  0
 .../source/cosv}/strings/streamstr.cxx |  0
 .../source/cosv}/strings/string.cxx|  0
 .../source/cosv}/unittest/file_ut.cxx  |  0
 .../source/cosv}/unittest/makefile.mk  |  0
 .../source/cosv}/unittest/string_ut.cxx|  0
 .../source => autodoc/source/cosv}/unittest/ut.hxx |  0
 .../source/cosv}/unittest/ut_main.cxx  |  0
 .../source/udm}/html/htmlitem.cxx  |  0
 .../source => autodoc/source/udm}/inc/precomp.h|  0
 .../source/udm}/unittest/makefile.mk   |  0
 .../source/udm}/unittest/te

(openoffice) branch trunk updated: Merge main/cosv and main/udm into main/autodoc.

2024-02-10 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 11c03c6d38 Merge main/cosv and main/udm into main/autodoc.
11c03c6d38 is described below

commit 11c03c6d381fea19f0fea13ae5a371ba50bad241
Author: Damjan Jovanovic 
AuthorDate: Sat Feb 10 17:49:34 2024 +0200

Merge main/cosv and main/udm into main/autodoc.

main/autodoc depends on main/cosv and main/udm.
main/udm depends on main/cosv.
No other module depends on main/cosv or main/udm.
The only deliverable from main/autodoc is the autodoc executable -
there are no libraries, and all headers remain private and undelivered.

We might even be able to use some third-party documentation generator
instead of autodoc, perhaps Doxygen. Whether we should go that way is 
debatable,
but there is no point in littering main/ with 2 modules and littering 
solver/
with many headers and 2 static libraries just so autodoc can consume them.
Rather make their code internal to autodoc.

Patch by: me
---
 main/Module_ooo.mk |  2 -
 main/Repository.mk |  2 -
 main/autodoc/Executable_autodoc.mk | 25 +++--
 main/{cosv => autodoc}/inc/cosv/bstream.hxx|  0
 main/{cosv => autodoc}/inc/cosv/comdline.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/comfunc.hxx|  0
 main/{cosv => autodoc}/inc/cosv/commandline.hxx|  0
 main/{cosv => autodoc}/inc/cosv/csv_env.hxx|  0
 main/{cosv => autodoc}/inc/cosv/csv_ostream.hxx|  0
 main/{cosv => autodoc}/inc/cosv/csv_precomp.h  |  0
 main/{cosv => autodoc}/inc/cosv/datetime.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/dirchain.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/file.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/mbstream.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/openclose.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/persist.hxx|  0
 main/{cosv => autodoc}/inc/cosv/ploc.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/ploc_dir.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/plocroot.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/std_outp.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/str_types.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/streamstr.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/string.hxx |  0
 main/{cosv => autodoc}/inc/cosv/stringdata.hxx |  0
 main/{cosv => autodoc}/inc/cosv/tpl/dyn.hxx|  0
 main/{cosv => autodoc}/inc/cosv/tpl/funcall.hxx|  0
 main/{cosv => autodoc}/inc/cosv/tpl/processor.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/tpl/range.hxx  |  0
 main/{cosv => autodoc}/inc/cosv/tpl/swelist.hxx|  0
 main/{cosv => autodoc}/inc/cosv/tpl/tpltools.hxx   |  0
 main/{cosv => autodoc}/inc/cosv/tpl/vvector.hxx|  0
 main/{cosv => autodoc}/inc/cosv/x.hxx  |  0
 main/{udm => autodoc}/inc/udm/html/htmlitem.hxx|  0
 main/{udm => autodoc}/inc/udm/xml/xmlitem.hxx  |  0
 main/autodoc/prj/build.lst |  2 +-
 .../source/cosv}/comphelp/badcast.cxx  |  0
 .../source => autodoc/source/cosv}/fullcpp.mk  |  0
 .../source => autodoc/source/cosv}/inc/precomp.h   |  0
 .../source/cosv}/service/comdline.cxx  |  0
 .../source/cosv}/service/comfunc.cxx   |  0
 .../source/cosv}/service/commandline.cxx   |  0
 .../source/cosv}/service/csv_ostream.cxx   |  0
 .../source/cosv}/service/datetime.cxx  |  0
 .../source/cosv}/service/std_outp.cxx  |  0
 .../source/cosv}/storage/dirchain.cxx  |  0
 .../source/cosv}/storage/file.cxx  |  0
 .../source/cosv}/storage/mbstream.cxx  |  0
 .../source/cosv}/storage/persist.cxx   |  0
 .../source/cosv}/storage/ploc.cxx  |  0
 .../source/cosv}/storage/ploc_dir.cxx  |  0
 .../source/cosv}/storage/plocroot.cxx  |  0
 .../source/cosv}/strings/str_types.cxx |  0
 .../source/cosv}/strings/streamstr.cxx |  0
 .../source/cosv}/strings/string.cxx|  0
 .../source/cosv}/unittest/file_ut.cxx  |  0
 .../source/cosv}/unittest/makefile.mk  |  0
 .../source/cosv}/unittest/string_ut.cxx|  0
 .../source => autodoc/source/cosv}/unittest/ut.hxx |  0
 .../source/cosv}/unittest/ut_main.cxx  |  0
 .../source/udm}/html/htmlitem.cxx  |  0
 .../source => autodoc/source/udm}/inc/precomp.h|  0
 .../source/udm}/unittest/makefile.mk   |  0
 .../source/udm}/unittest/test.cxx  |  0
 .../source => autodoc/source/udm}/xml/xmlitem.cxx  |  0
 main/cosv/Makefi

(openoffice) branch trunk updated: Allow our WebDAV content provider to connect when the TLS certificate name doesn't match the server's host name.

2024-02-05 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 88ba7bc95f Allow our WebDAV content provider to connect when the TLS 
certificate name doesn't match the server's host name.
88ba7bc95f is described below

commit 88ba7bc95f387996e4041aab9f586786362ea8da
Author: Damjan Jovanovic 
AuthorDate: Tue Feb 6 07:29:29 2024 +0200

Allow our WebDAV content provider to connect when the TLS certificate name
doesn't match the server's host name.

Currently in such cases the connection always fails, and the user isn't even
given a chance to allow it. This is because Curl does the server name
validation itself. However we already have code to validate server names,
and we prompt the user for what to do, unlike Curl which always fails.
Therefore disable Curl's verification and use ours.

Patch by: me
---
 main/ucb/source/ucp/webdav/CurlSession.cxx | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/main/ucb/source/ucp/webdav/CurlSession.cxx 
b/main/ucb/source/ucp/webdav/CurlSession.cxx
index bf6494233f..73328b78d5 100644
--- a/main/ucb/source/ucp/webdav/CurlSession.cxx
+++ b/main/ucb/source/ucp/webdav/CurlSession.cxx
@@ -113,6 +113,17 @@ CurlSession::CurlSession(
 curl_easy_setopt( m_pCurl, CURLOPT_SSL_CTX_FUNCTION, 
Curl_SSLContextCallback );
 curl_easy_setopt( m_pCurl, CURLOPT_SSL_CTX_DATA, this );
 
+// If a certificate's commmon name / alt name doesn't match the hostname 
we are
+// connecting to, Curl will refuse to connect. Disable this, as we do that 
check
+// ourselves, and give the user the option of connecting anyway.
+//
+// Note also, how "man CURLOPT_SSL_VERIFYHOST" tells us that setting 0 here
+// disables SNI, which is bad news, some servers require SNI. However 
reading Curl
+// 8.6.0's Curl_ssl_peer_init() in file lib/vtls/vtls.c shows that SNI is 
sent
+// regardless, as long as we are connecting to a domain name, NOT an IP 
address.
+// Tests confirm this. For OpenSSL anyway - other Curl crypto providers 
are stricter...
+curl_easy_setopt( m_pCurl, CURLOPT_SSL_VERIFYHOST, 0 );
+
 if ( m_aLogger.getLogLevel() == LogLevel::FINEST )
 {
 curl_easy_setopt( m_pCurl, CURLOPT_DEBUGFUNCTION, Curl_DebugCallback );



(openoffice) branch odf-1.3 updated: Change the parameter types of HLOOKUP, MATCH, VLOOKUP, LINEST and LOGEST to ForceArray, or "ForceArray Reference|Array", as needed by ODF 1.3.

2024-01-27 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch odf-1.3
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/odf-1.3 by this push:
 new 07b7105f20 Change the parameter types of HLOOKUP, MATCH, VLOOKUP, 
LINEST and LOGEST to ForceArray, or "ForceArray Reference|Array", as needed by 
ODF 1.3.
07b7105f20 is described below

commit 07b7105f20776a1b6f4e27351365759551337431
Author: Damjan Jovanovic 
AuthorDate: Sun Jan 28 06:10:31 2024 +0200

Change the parameter types of HLOOKUP, MATCH, VLOOKUP, LINEST and LOGEST
to ForceArray, or "ForceArray Reference|Array", as needed by ODF 1.3.

Patch by: me
---
 main/sc/source/core/tool/parclass.cxx | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/main/sc/source/core/tool/parclass.cxx 
b/main/sc/source/core/tool/parclass.cxx
index c833322cf3..c18734b2c8 100644
--- a/main/sc/source/core/tool/parclass.cxx
+++ b/main/sc/source/core/tool/parclass.cxx
@@ -118,7 +118,7 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
 { ocGreaterEqual,{{ Array, Array   
  }, 0 }},
 { ocGrowth,  {{ Reference, Reference, Reference, Value 
  }, 0 }},
 { ocHarMean, {{ Reference  
  }, 1 }},
-{ ocHLookup, {{ Value, Reference, Value, Value 
  }, 0 }},
+{ ocHLookup, {{ Value, ReferenceOrForceArray, Value, Value 
  }, 0 }},
 { ocIRR, {{ Reference, Value   
  }, 0 }},
 { ocIndex,   {{ Reference, Value, Value, Value 
  }, 0 }},
 { ocIntercept,   {{ ForceArray, ForceArray 
  }, 0 }},
@@ -130,7 +130,7 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
 { ocLess,{{ Array, Array   
  }, 0 }},
 { ocLessEqual,   {{ Array, Array   
  }, 0 }},
 { ocLookup,  {{ Value, ReferenceOrForceArray, 
ReferenceOrForceArray  }, 0 }},
-{ ocMatch,   {{ Value, Reference, Reference
  }, 0 }},
+{ ocMatch,   {{ Value, ReferenceOrForceArray, Reference
  }, 0 }},
 { ocMatDet,  {{ ForceArray 
  }, 0 }},
 { ocMatInv,  {{ ForceArray 
  }, 0 }},
 { ocMatMult, {{ ForceArray, ForceArray 
  }, 0 }},
@@ -162,8 +162,8 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
 { ocProduct, {{ Reference  
  }, 1 }},
 { ocQuartile,{{ Reference, Value   
  }, 0 }},
 { ocRank,{{ Value, Reference, Value
  }, 0 }},
-{ ocRGP, {{ Reference, Reference, Value, Value 
  }, 0 }},
-{ ocRKP, {{ Reference, Reference, Value, Value 
  }, 0 }},
+{ ocRGP, {{ ForceArray, ForceArray, Value, Value   
  }, 0 }},
+{ ocRKP, {{ ForceArray, ForceArray, Value, Value   
  }, 0 }},
 { ocRow, {{ Reference  
  }, 0 }},
 { ocRows,{{ Reference  
  }, 1 }},
 { ocRSQ, {{ ForceArray, ForceArray 
  }, 0 }},
@@ -194,7 +194,7 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
 { ocVarA,{{ Reference  
  }, 1 }},
 { ocVarP,{{ Reference  
  }, 1 }},
 { ocVarPA,   {{ Reference  
  }, 1 }},
-{ ocVLookup, {{ Value, Reference, Value, Value 
  }, 0 }},
+{ ocVLookup, {{ Value, ReferenceOrForceArray, Value, Value 
  }, 0 }},
 { ocXor, {{ Reference  
  }, 1 }},
 { ocZTest,   {{ Reference, Value, Value
  }, 0 }},
 // Excel doubts:



(openoffice) branch odf-1.3 updated: Allow the DatabaseField parameter to DCOUNT and DCOUNTA functions to be optional. This is required in ODF 1.3

2024-01-21 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch odf-1.3
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/odf-1.3 by this push:
 new 561c6157b8 Allow the DatabaseField parameter to DCOUNT and DCOUNTA 
functions to be optional. This is required in ODF 1.3
561c6157b8 is described below

commit 561c6157b86908803ccecf18699e7b5dfaba10b2
Author: Damjan Jovanovic 
AuthorDate: Mon Jan 22 07:31:44 2024 +0200

Allow the DatabaseField parameter to DCOUNT and DCOUNTA functions to be 
optional.
This is required in ODF 1.3

Patch by: me
---
 .../helpcontent2/source/text/scalc/01/04060101.xhp |  9 ++-
 main/sc/source/core/tool/interpr1.cxx  | 90 --
 2 files changed, 53 insertions(+), 46 deletions(-)

diff --git a/main/helpcontent2/source/text/scalc/01/04060101.xhp 
b/main/helpcontent2/source/text/scalc/01/04060101.xhp
index df2b00e89f..7245002845 100644
--- a/main/helpcontent2/source/text/scalc/01/04060101.xhp
+++ b/main/helpcontent2/source/text/scalc/01/04060101.xhp
@@ -505,7 +505,7 @@ oldref="88">DCOUNT
 Syntax
 DCOUNT(Database; DatabaseField; SearchCriteria)
-For the DatabaseField parameter you can enter a cell to specify 
the column, or enter the number 0 for the entire database. The parameter cannot 
be empty. 
+If the DatabaseField parameter is present, it should specify the 
column in which to count the numerical values. If it is absent or set to the 
number 0, it doesn't count any column's values, and just returns the number of 
rows matching the criteria. 
 
 Example
@@ -528,10 +528,11 @@ oldref="97">DCOUNTA
 Syntax
 DCOUNTA(Database; DatabaseField; SearchCriteria)
-
+If the DatabaseField parameter is present, it should specify the 
column in which to count the alphanumerical values. If it is absent or set to 
the number 0, it doesn't count any column's values, and just returns the number 
of rows matching the criteria. 
+
 Example
-In the example above (scroll up, please), you can search for the 
number of children whose name starts with an E or a subsequent letter. Edit the 
formula in B16 to read =DCOUNTA(A1:E10;"Name";A13:E14). Delete the old search 
criteria and enter >=E under Name in field A14. 
The result is 5. If you now delete all number values for Greta in row 8, the r 
[...]
+oldref="102">Example
+In the example above (scroll up, please), you can search for the 
number of children whose name starts with an E or a subsequent letter. Edit the 
formula in B16 to read =DCOUNTA(A1:E10;"Name";A13:E14). Delete the old search 
criteria and enter >=E under Name in field A14. 
The result is 5. If you now delete all number values for Greta in row 8, the r 
[...]
 
 
 
diff --git a/main/sc/source/core/tool/interpr1.cxx 
b/main/sc/source/core/tool/interpr1.cxx
index e3fe37449f..f1e058c93d 100644
--- a/main/sc/source/core/tool/interpr1.cxx
+++ b/main/sc/source/core/tool/interpr1.cxx
@@ -6521,7 +6521,8 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& 
rMissingField )
 bAllowMissingField = sal_True;
 rMissingField = sal_False;
 }
-if ( GetByte() == 3 )
+sal_uInt8 nParamCount = GetByte();
+if ( (bAllowMissingField && nParamCount == 2) || nParamCount == 3 )
 {
 // First, get the query criteria range.
 ::std::auto_ptr pQueryRef( PopDoubleRef() );
@@ -6533,54 +6534,59 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( 
sal_Bool& rMissingField )
 String  aStr;
 ScRange aMissingRange;
 sal_Bool bRangeFake = sal_False;
-switch (GetStackType())
+if (nParamCount == 3)
 {
-case svDouble :
-nVal = ::rtl::math::approxFloor( GetDouble() );
-if ( bAllowMissingField && nVal == 0.0 )
-rMissingField = sal_True;   // fake missing parameter
-break;
-case svString :
-bByVal = sal_False;
-aStr = GetString();
-break;
-case svSingleRef :
-{
-ScAddress aAdr;
-PopSingleRef( aAdr );
-ScBaseCell* pCell = GetCell( aAdr );
-if (HasCellValueData(pCell))
-nVal = GetCellValue( aAdr, pCell );
+switch (GetStackType())
+{
+case svDouble :
+nVal = ::rtl::math::approxFloor( GetDouble() );
+if ( bAllowMissingField && nVal == 0.0 )
+rMissingField = sal_True;   // fake missing parameter
+break;
+case svString :
+bByVal = sal_False;
+aStr = GetString();
+break;
+case svSi

(openoffice) branch odf-1.3 updated: Translate comments for ScCompiler::NextSymbol() from German to English.

2024-01-18 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch odf-1.3
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/odf-1.3 by this push:
 new 2f2b5ee066 Translate comments for ScCompiler::NextSymbol() from German 
to English.
2f2b5ee066 is described below

commit 2f2b5ee0660524dba845a90c8ef13eae43ad1117
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 19 05:20:04 2024 +0200

Translate comments for ScCompiler::NextSymbol() from German to English.

Patch by: me
---
 main/sc/source/core/tool/compiler.cxx | 62 +--
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/main/sc/source/core/tool/compiler.cxx 
b/main/sc/source/core/tool/compiler.cxx
index 1be443de46..2e740236df 100644
--- a/main/sc/source/core/tool/compiler.cxx
+++ b/main/sc/source/core/tool/compiler.cxx
@@ -1919,38 +1919,38 @@ sal_Unicode* lcl_UnicodeStrNCpy( sal_Unicode* pDst, 
const sal_Unicode* pSrc, xub
 //---
 // NextSymbol
 //---
-// Zerlegt die Formel in einzelne Symbole fuer die weitere
-// Verarbeitung (Turing-Maschine).
+// Breaks down the Formula into individual Symbols for further processing
+// (Turing-Machine).
 //---
-// Ausgangs Zustand = GetChar
-//---+---+---+---
-// Alter Zustand | gelesenes Zeichen | Aktion| Neuer Zustand
-//---+---+---+---
-// GetChar   | ;()+-*/^=&| Symbol=Zeichen| Stop
-//   | <>| Symbol=Zeichen| GetBool
-//   | $ Buchstabe   | Symbol=Zeichen| GetWord
-//   | Ziffer| Symbol=Zeichen| GetValue
-//   | " | Keine | GetString
-//   | Sonst | Keine | GetChar
-//---+---+---+---
-// GetBool   | =>| Symbol=Symbol+Zeichen | Stop
-//   | Sonst | Dec(CharPos)  | Stop
-//---+---+---+---
-// GetWord   | SepSymbol | Dec(CharPos)  | Stop
-//   | ()+-*/^=<>&~  |   |
-//   | Leerzeichen   | Dec(CharPos)  | Stop
-//   | $_:.  |   |
-//   | Buchstabe,Ziffer  | Symbol=Symbol+Zeichen | GetWord
-//   | Sonst | Fehler| Stop
-//---|---+---+---
-// GetValue  | ;()*/^=<>&|   |
-//   | Leerzeichen   | Dec(CharPos)  | Stop
-//   | Ziffer E+-%,. | Symbol=Symbol+Zeichen | GetValue
-//   | Sonst | Fehler| Stop
-//---+---+---+---
-// GetString | " | Keine | Stop
-//   | Sonst | Symbol=Symbol+Zeichen | GetString
-//---+---+---+---
+// Initial State = GetChar
+//---+---+-+-
+// Former State  | read Character| Action  | New State
+//---+---+-+-
+// GetChar   | ;()+-*/^=&| Symbol=Character| Stop
+//   | <>| Symbol=Character| GetBool
+//   | $ Letter  | Symbol=Character| GetWord
+//   | Digit | Symbol=Character| GetValue
+//   | " | None| GetString
+//   | Otherwise | None| GetChar
+//---+---+-+-
+// GetBool   | =>| Symbol=Symbol+Character | Stop
+//   | Otherwise | Dec(CharPos)| Stop
+//---+---+-+-
+// GetWord   | SepSymbol | Dec(CharPos)| Stop
+//   | ()+-*/^=<>&~  | |
+//   | Space | Dec(CharPos)| Stop
+//   | $_:.  | |
+//   | Letter,Digit  | Symbol=Symbol+Character | GetWord

(openoffice) branch odf-1.3 updated: Add support for weekday types 11-17 to the WEEKDAY function, as required by ODF 1.3.

2024-01-16 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch odf-1.3
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/odf-1.3 by this push:
 new b19cfbb97e Add support for weekday types 11-17 to the WEEKDAY 
function, as required by ODF 1.3.
b19cfbb97e is described below

commit b19cfbb97e8a126fb5034f0ea11b69365cb8e0ae
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 17 04:12:39 2024 +0200

Add support for weekday types 11-17 to the WEEKDAY function,
as required by ODF 1.3.

Patch by: me
---
 main/sc/source/core/tool/interpr2.cxx | 23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/main/sc/source/core/tool/interpr2.cxx 
b/main/sc/source/core/tool/interpr2.cxx
index 2d8dfcd2d9..0cf58ef3f8 100644
--- a/main/sc/source/core/tool/interpr2.cxx
+++ b/main/sc/source/core/tool/interpr2.cxx
@@ -212,16 +212,37 @@ void ScInterpreter::ScGetDayOfWeek()
 Date aDate = *(pFormatter->GetNullDate());
 aDate += (long)::rtl::math::approxFloor(GetDouble());
 int nVal = (int) aDate.GetDayOfWeek();
+// Weekday Type1   2   3   11  12  13  14  15  16  17
+// --
+// Sunday  1   7   6   7   6   5   4   3   2   1
+// Monday  2   1   0   1   7   6   5   4   3   2
+// Tuesday 3   2   1   2   1   7   6   5   4   3
+// Wednesday   4   3   2   3   2   1   7   6   5   4
+// Thursday5   4   3   4   3   2   1   7   6   5
+// Friday  6   5   4   5   4   3   2   1   7   6
+// Saturday7   6   5   6   5   4   3   2   1   7
 if (nFlag == 1)
 {
 if (nVal == 6)
 nVal = 1;
 else
 nVal += 2;
+PushInt(nVal);
 }
 else if (nFlag == 2)
+{
 nVal += 1;
-PushInt( nVal );
+PushInt(nVal);
+}
+else if (nFlag == 3)
+PushInt(nVal);
+else if (11 <= nFlag && nFlag <= 17)
+{
+nVal = ((nVal + (18 - nFlag)) % 7) + 1;
+PushInt(nVal);
+}
+else
+PushIllegalArgument();
 }
 }
 



(openoffice) branch odf-1.3 created (now e172229456)

2024-01-16 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch odf-1.3
in repository https://gitbox.apache.org/repos/asf/openoffice.git


  at e172229456 In ODF 1.3, the RECEIVED function has a new constraint: 
Settlement < Maturity.

This branch includes the following new commits:

 new 027efe2b90 Check for ODF > 1.3 when bringing up the version upgrade 
dialog.
 new e172229456 In ODF 1.3, the RECEIVED function has a new constraint: 
Settlement < Maturity.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(openoffice) 02/02: In ODF 1.3, the RECEIVED function has a new constraint: Settlement < Maturity.

2024-01-16 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch odf-1.3
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit e172229456487b113132e6d03d331cba42792c7f
Author: Damjan Jovanovic 
AuthorDate: Tue Jan 16 18:08:18 2024 +0200

In ODF 1.3, the RECEIVED function has a new constraint: Settlement < 
Maturity.

Implement this constraint on our RECEIVED function.

Patch by: me
---
 main/scaddins/source/analysis/financial.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/scaddins/source/analysis/financial.cxx 
b/main/scaddins/source/analysis/financial.cxx
index 00d2cc111d..be13bf5210 100644
--- a/main/scaddins/source/analysis/financial.cxx
+++ b/main/scaddins/source/analysis/financial.cxx
@@ -81,7 +81,7 @@ double SAL_CALL AnalysisAddIn::getAccrintm( constREFXPS& xOpt,
 double SAL_CALL AnalysisAddIn::getReceived( constREFXPS& xOpt,
sal_Int32 nSettle, sal_Int32 nMat, double fInvest, double fDisc, const 
ANY& rOB ) THROWDEF_RTE_IAE
 {
-   if( fInvest <= 0.0 || fDisc <= 0.0 )
+   if( fInvest <= 0.0 || fDisc <= 0.0 || nSettle >= nMat )
THROW_IAE;
 
 double fRet = fInvest / ( 1.0 - ( fDisc * GetYearDiff( GetNullDate( xOpt 
), nSettle, nMat, getDateMode( xOpt, rOB ) ) ) );



(openoffice) 01/02: Check for ODF > 1.3 when bringing up the version upgrade dialog.

2024-01-16 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch odf-1.3
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 027efe2b90273f4a4cf9d56c1206949f42548304
Author: Damjan Jovanovic 
AuthorDate: Mon Jan 8 21:29:11 2024 +0200

Check for ODF > 1.3 when bringing up the version upgrade dialog.

Patch by: me
---
 main/sfx2/source/doc/objstor.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/sfx2/source/doc/objstor.cxx b/main/sfx2/source/doc/objstor.cxx
index d794747b60..89ab8e1ca3 100644
--- a/main/sfx2/source/doc/objstor.cxx
+++ b/main/sfx2/source/doc/objstor.cxx
@@ -856,8 +856,8 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
 if ( sVersion.getLength() )
 {
 double nVersion = sVersion.toDouble();
-if ( nVersion > 1.20001  && 
SfxObjectShell_Impl::NeedsOfficeUpdateDialog() )
-// ODF version greater than 1.2 - added some decimal 
places to be safe against floating point conversion errors (hack)
+if ( nVersion > 1.30001  && 
SfxObjectShell_Impl::NeedsOfficeUpdateDialog() )
+// ODF version greater than 1.3 - added some decimal 
places to be safe against floating point conversion errors (hack)
 {
 ::rtl::OUString sDocumentURL( pMedium->GetOrigURL() );
 ::rtl::OUString aSystemFileURL;



(openoffice) branch AOO41X updated: cairo should depend on libpng, as it sometimes breaks the build by trying to compile before libpng is delivered.

2024-01-03 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
 new dd430d8a95 cairo should depend on libpng, as it sometimes breaks the 
build by trying to compile before libpng is delivered.
dd430d8a95 is described below

commit dd430d8a95b23212145c5ad757a178045c52f383
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 3 17:24:28 2024 +0200

cairo should depend on libpng, as it sometimes breaks the build by
trying to compile before libpng is delivered.

Fixes: #117726 - cairo fails to build, lacking dependency on libpng
Patch by: me

(cherry picked from commit ffe480edf9795ab6c9560d4de9cc8f7274b56bc1)
---
 main/cairo/prj/build.lst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/cairo/prj/build.lst b/main/cairo/prj/build.lst
index c59a5c4bbd..b34bcb0fb2 100644
--- a/main/cairo/prj/build.lst
+++ b/main/cairo/prj/build.lst
@@ -1,4 +1,4 @@
-lcairo cairo   : ZLIB:zlib soltools stlport NULL
+lcairo cairo   : LIBPNG:libpng ZLIB:zlib soltools stlport NULL
 lcairo cairo   usr1-   all lcairo_mkout 
NULL
 lcairo cairo\pixmannmake   -   all lcairo_pixman 
NULL
 lcairo cairo\cairo nmake   -   all lcairo_cairo 
lcairo_pixman NULL



(openoffice) branch AOO42X updated: cairo should depend on libpng, as it sometimes breaks the build by trying to compile before libpng is delivered.

2024-01-03 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new c9c32730cd cairo should depend on libpng, as it sometimes breaks the 
build by trying to compile before libpng is delivered.
c9c32730cd is described below

commit c9c32730cd140d9f09f80e3a8c0fc2550d53e3d3
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 3 17:24:28 2024 +0200

cairo should depend on libpng, as it sometimes breaks the build by
trying to compile before libpng is delivered.

Fixes: #117726 - cairo fails to build, lacking dependency on libpng
Patch by: me

(cherry picked from commit ffe480edf9795ab6c9560d4de9cc8f7274b56bc1)
---
 main/cairo/prj/build.lst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/cairo/prj/build.lst b/main/cairo/prj/build.lst
index c59a5c4bbd..b34bcb0fb2 100644
--- a/main/cairo/prj/build.lst
+++ b/main/cairo/prj/build.lst
@@ -1,4 +1,4 @@
-lcairo cairo   : ZLIB:zlib soltools stlport NULL
+lcairo cairo   : LIBPNG:libpng ZLIB:zlib soltools stlport NULL
 lcairo cairo   usr1-   all lcairo_mkout 
NULL
 lcairo cairo\pixmannmake   -   all lcairo_pixman 
NULL
 lcairo cairo\cairo nmake   -   all lcairo_cairo 
lcairo_pixman NULL



(openoffice) branch trunk updated: cairo should depend on libpng, as it sometimes breaks the build by trying to compile before libpng is delivered.

2024-01-03 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new ffe480edf9 cairo should depend on libpng, as it sometimes breaks the 
build by trying to compile before libpng is delivered.
ffe480edf9 is described below

commit ffe480edf9795ab6c9560d4de9cc8f7274b56bc1
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 3 17:24:28 2024 +0200

cairo should depend on libpng, as it sometimes breaks the build by
trying to compile before libpng is delivered.

Fixes: #117726 - cairo fails to build, lacking dependency on libpng
Patch by: me
---
 main/cairo/prj/build.lst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/cairo/prj/build.lst b/main/cairo/prj/build.lst
index c59a5c4bbd..b34bcb0fb2 100644
--- a/main/cairo/prj/build.lst
+++ b/main/cairo/prj/build.lst
@@ -1,4 +1,4 @@
-lcairo cairo   : ZLIB:zlib soltools stlport NULL
+lcairo cairo   : LIBPNG:libpng ZLIB:zlib soltools stlport NULL
 lcairo cairo   usr1-   all lcairo_mkout 
NULL
 lcairo cairo\pixmannmake   -   all lcairo_pixman 
NULL
 lcairo cairo\cairo nmake   -   all lcairo_cairo 
lcairo_pixman NULL



(openoffice) branch AOO42X updated: Fix a bug where an integer underflow causes a comparison to go wrong when the integer types are 32 bit, instead of the previous 16 bit which hid the bug, which caus

2024-01-02 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 93440cfe8c Fix a bug where an integer underflow causes a comparison to 
go wrong when the integer types are 32 bit, instead of the previous 16 bit 
which hid the bug, which causes valid elements to not get found like they 
should be, leading to NULL pointer access crashes.
93440cfe8c is described below

commit 93440cfe8c5159735f8bce693fbafd7479717510
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 3 07:43:52 2024 +0200

Fix a bug where an integer underflow causes a comparison to go wrong when 
the
integer types are 32 bit, instead of the previous 16 bit which hid the bug,
which causes valid elements to not get found like they should be, leading to
NULL pointer access crashes.

Fixes: #128579 - 32-bit editengine regression causes a crash when opening 
PPT files
Patch by: me

(cherry picked from commit 294ee1400602b0a60dabfaa12034b85c1df06f8f)
---
 main/editeng/source/editeng/editdoc2.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/editeng/source/editeng/editdoc2.cxx 
b/main/editeng/source/editeng/editdoc2.cxx
index 91f315ef05..c96fbdf64d 100644
--- a/main/editeng/source/editeng/editdoc2.cxx
+++ b/main/editeng/source/editeng/editdoc2.cxx
@@ -330,7 +330,7 @@ static sal_uInt32 FastGetPos( const VoidPtr *pPtrArray, 
sal_uInt32 nPtrArrayLen,
   if( rLastPos > 16 )
 {
   sal_uInt32 nEnd;
-  if (rLastPos > nPtrArrayLen - 2)
+  if (rLastPos + 2 > nPtrArrayLen)
nEnd = nPtrArrayLen;
   else
nEnd = rLastPos + 2;



(openoffice) branch trunk updated: Fix a bug where an integer underflow causes a comparison to go wrong when the integer types are 32 bit, instead of the previous 16 bit which hid the bug, which cause

2024-01-02 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 294ee14006 Fix a bug where an integer underflow causes a comparison to 
go wrong when the integer types are 32 bit, instead of the previous 16 bit 
which hid the bug, which causes valid elements to not get found like they 
should be, leading to NULL pointer access crashes.
294ee14006 is described below

commit 294ee1400602b0a60dabfaa12034b85c1df06f8f
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 3 07:43:52 2024 +0200

Fix a bug where an integer underflow causes a comparison to go wrong when 
the
integer types are 32 bit, instead of the previous 16 bit which hid the bug,
which causes valid elements to not get found like they should be, leading to
NULL pointer access crashes.

Fixes: #128579 - 32-bit editengine regression causes a crash when opening 
PPT files
Patch by: me
---
 main/editeng/source/editeng/editdoc2.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/editeng/source/editeng/editdoc2.cxx 
b/main/editeng/source/editeng/editdoc2.cxx
index 91f315ef05..c96fbdf64d 100644
--- a/main/editeng/source/editeng/editdoc2.cxx
+++ b/main/editeng/source/editeng/editdoc2.cxx
@@ -330,7 +330,7 @@ static sal_uInt32 FastGetPos( const VoidPtr *pPtrArray, 
sal_uInt32 nPtrArrayLen,
   if( rLastPos > 16 )
 {
   sal_uInt32 nEnd;
-  if (rLastPos > nPtrArrayLen - 2)
+  if (rLastPos + 2 > nPtrArrayLen)
nEnd = nPtrArrayLen;
   else
nEnd = rLastPos + 2;



(openoffice) branch trunk updated: Use the HTML tag instead of from commit 872b2513907e4389be70e2d9b563f47e0d2c5a9f, which breaks on some older Java versions.

2023-11-06 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 61a74f2854 Use the HTML  tag instead of  from commit 
872b2513907e4389be70e2d9b563f47e0d2c5a9f, which breaks on some older Java 
versions.
61a74f2854 is described below

commit 61a74f2854935294cdc5bceabf0de6a4347799ae
Author: Damjan Jovanovic 
AuthorDate: Mon Nov 6 19:46:52 2023 +0200

Use the HTML  tag instead of  from commit 
872b2513907e4389be70e2d9b563f47e0d2c5a9f,
which breaks on some older Java versions.

Reported by: mseidel
Patch by: me
---
 .../star/lib/uno/helper/InterfaceContainer.java| 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git 
a/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java 
b/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index 9f362fb013..b046348971 100644
--- a/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -127,9 +127,9 @@ public class InterfaceContainer implements Cloneable
 }
 
 /**
- * Trims the capacity of this ArrayList instance to be the
+ * Trims the capacity of this ArrayList instance to be the
  * list's current size.  An application can use this operation to minimize
- * the storage of an ArrayList instance.
+ * the storage of an ArrayList instance.
  */
 synchronized public void trimToSize()
 {
@@ -143,7 +143,7 @@ public class InterfaceContainer implements Cloneable
 }
 
 /**
- * Increases the capacity of this ArrayList instance, if
+ * Increases the capacity of this ArrayList instance, if
  * necessary, to ensure  that it can hold at least the number of elements
  * specified by the minimum capacity argument.
  *
@@ -167,7 +167,7 @@ public class InterfaceContainer implements Cloneable
  * Appends the specified element to the end of this list.
  *
  * @param o element to be appended to this list.
- * @return true (as per the general contract of Collection.add).
+ * @return true (as per the general contract of 
Collection.add).
  */
 synchronized public boolean add(Object o)
 {
@@ -189,7 +189,7 @@ public class InterfaceContainer implements Cloneable
  * @param index index at which the specified element is to be inserted.
  * @param element element to be inserted.
  * @throwsIndexOutOfBoundsException if index is out of range
- *   (index < 0 || index > size()).
+ *   (index < 0 || index > size()).
  */
 synchronized public void add(int index, Object element)
 {
@@ -218,8 +218,8 @@ public class InterfaceContainer implements Cloneable
  * list is nonempty.)
  *
  * @param c the elements to be inserted into this list.
- * @throwsIndexOutOfBoundsException if index out of range (index
- *   < 0 || index > size()).
+ * @throwsIndexOutOfBoundsException if index out of range (index
+ *   < 0 || index > size()).
  */
 synchronized public boolean addAll(Collection c)
 {
@@ -246,8 +246,8 @@ public class InterfaceContainer implements Cloneable
  * @param index index at which to insert first element
  * from the specified collection.
  * @param c elements to be inserted into this list.
- * @throwsIndexOutOfBoundsException if index out of range (index
- *   < 0 || index > size()).
+ * @throwsIndexOutOfBoundsException if index out of range (index
+ *   < 0 || index > size()).
  */
 synchronized public boolean addAll(int index, Collection c)
 {
@@ -302,7 +302,7 @@ public class InterfaceContainer implements Cloneable
 }
 }
 /**
- * Returns true if this list contains the specified element.
+ * Returns true if this list contains the specified element.
  *
  * @param elem element whose presence in this List is to be tested.
  */
@@ -334,8 +334,8 @@ public class InterfaceContainer implements Cloneable
  *
  * @param  index index of element to return.
  * @return the element at the specified position in this list.
- * @throwsIndexOutOfBoundsException if index is out of range 
(index
- *   < 0 || index >= size()).
+ * @throwsIndexOutOfBoundsException if index is out of range 
(index
+ *   < 0 || index >= size()).
  */
 synchronized public Object get(int index)
 {
@@ -349,11 +349,11 @@ public class InterfaceContainer implements Cloneable
 
 /**
  * Searches for the first occurrence of the given argument, testing
- * for equality using the equals

(openoffice) branch trunk updated: The HTML tag ended with HTML 4, and newer versions of javadoc (Java 17's at least) support HTML 5 tags only. Use instead.

2023-10-29 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 872b251390 The  HTML tag ended with HTML 4, and newer versions of 
javadoc (Java 17's at least) support HTML 5 tags only. Use  instead.
872b251390 is described below

commit 872b2513907e4389be70e2d9b563f47e0d2c5a9f
Author: Damjan Jovanovic 
AuthorDate: Sun Oct 29 17:42:38 2023 +0200

The  HTML tag ended with HTML 4, and newer versions of javadoc
(Java 17's at least) support HTML 5 tags only. Use  instead.

Patch by: me
---
 .../star/lib/uno/helper/InterfaceContainer.java| 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git 
a/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java 
b/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index 1fe5cb..9f362fb013 100644
--- a/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/main/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -127,9 +127,9 @@ public class InterfaceContainer implements Cloneable
 }
 
 /**
- * Trims the capacity of this ArrayList instance to be the
+ * Trims the capacity of this ArrayList instance to be the
  * list's current size.  An application can use this operation to minimize
- * the storage of an ArrayList instance.
+ * the storage of an ArrayList instance.
  */
 synchronized public void trimToSize()
 {
@@ -143,7 +143,7 @@ public class InterfaceContainer implements Cloneable
 }
 
 /**
- * Increases the capacity of this ArrayList instance, if
+ * Increases the capacity of this ArrayList instance, if
  * necessary, to ensure  that it can hold at least the number of elements
  * specified by the minimum capacity argument.
  *
@@ -167,7 +167,7 @@ public class InterfaceContainer implements Cloneable
  * Appends the specified element to the end of this list.
  *
  * @param o element to be appended to this list.
- * @return true (as per the general contract of Collection.add).
+ * @return true (as per the general contract of Collection.add).
  */
 synchronized public boolean add(Object o)
 {
@@ -189,7 +189,7 @@ public class InterfaceContainer implements Cloneable
  * @param index index at which the specified element is to be inserted.
  * @param element element to be inserted.
  * @throwsIndexOutOfBoundsException if index is out of range
- *   (index < 0 || index > size()).
+ *   (index < 0 || index > size()).
  */
 synchronized public void add(int index, Object element)
 {
@@ -218,8 +218,8 @@ public class InterfaceContainer implements Cloneable
  * list is nonempty.)
  *
  * @param c the elements to be inserted into this list.
- * @throwsIndexOutOfBoundsException if index out of range (index
- *   < 0 || index > size()).
+ * @throwsIndexOutOfBoundsException if index out of range (index
+ *   < 0 || index > size()).
  */
 synchronized public boolean addAll(Collection c)
 {
@@ -246,8 +246,8 @@ public class InterfaceContainer implements Cloneable
  * @param index index at which to insert first element
  * from the specified collection.
  * @param c elements to be inserted into this list.
- * @throwsIndexOutOfBoundsException if index out of range (index
- *   < 0 || index > size()).
+ * @throwsIndexOutOfBoundsException if index out of range (index
+ *   < 0 || index > size()).
  */
 synchronized public boolean addAll(int index, Collection c)
 {
@@ -302,7 +302,7 @@ public class InterfaceContainer implements Cloneable
 }
 }
 /**
- * Returns true if this list contains the specified element.
+ * Returns true if this list contains the specified element.
  *
  * @param elem element whose presence in this List is to be tested.
  */
@@ -334,8 +334,8 @@ public class InterfaceContainer implements Cloneable
  *
  * @param  index index of element to return.
  * @return the element at the specified position in this list.
- * @throwsIndexOutOfBoundsException if index is out of range (index
- *   < 0 || index >= size()).
+ * @throwsIndexOutOfBoundsException if index is out of range 
(index
+ *   < 0 || index >= size()).
  */
 synchronized public Object get(int index)
 {
@@ -349,11 +349,11 @@ public class InterfaceContainer implements Cloneable
 
 /**
  * Searches for the first occurrence of the given argument, testing
- * for equality using the equals method.
+ * for equality usi

[openoffice] branch AOO42X updated: Allow empty selection in PageSelector::UpdateCurrentPage(). This fixes a regression in Impress, where wrong slides are selected on a right-click between slides when

2023-10-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 0377632d55 Allow empty selection in PageSelector::UpdateCurrentPage(). 
This fixes a regression in Impress, where wrong slides are selected on a 
right-click between slides when scrolling down, and new slides are inserted in 
wrong places.
0377632d55 is described below

commit 0377632d55e2f6c71bc9597b5614b3773b09d374
Author: Damjan Jovanovic 
AuthorDate: Sun Oct 8 21:01:32 2023 +0200

Allow empty selection in PageSelector::UpdateCurrentPage().
This fixes a regression in Impress, where wrong slides are
selected on a right-click between slides when scrolling down,
and new slides are inserted in wrong places.

Patch by: Andre Fischer 
Reviewed by: me
Fixes: #124741 - Slide will be inserted in wrong place when try to
  insert it in latter slides(with vertical scrollbar)

(cherry picked from commit 2a12cc4fae255902f4870bfea0bfe724d9d4ddb8)
---
 main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx | 5 -
 1 file changed, 5 deletions(-)

diff --git a/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx 
b/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index d4d82b1dc4..0da93988ad 100644
--- a/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -406,11 +406,6 @@ void PageSelector::UpdateCurrentPage (const bool 
bUpdateOnlyWhenPending)
 break;
 }
 }
-if ( ! pCurrentPageDescriptor && nPageCount>0)
-{
-// No page is selected.  Make the first slide the current page.
-pCurrentPageDescriptor = mrModel.GetPageDescriptor(0);
-}
 
 if (pCurrentPageDescriptor)
 {



[openoffice] branch trunk updated: Allow empty selection in PageSelector::UpdateCurrentPage(). This fixes a regression in Impress, where wrong slides are selected on a right-click between slides when

2023-10-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 2a12cc4fae Allow empty selection in PageSelector::UpdateCurrentPage(). 
This fixes a regression in Impress, where wrong slides are selected on a 
right-click between slides when scrolling down, and new slides are inserted in 
wrong places.
2a12cc4fae is described below

commit 2a12cc4fae255902f4870bfea0bfe724d9d4ddb8
Author: Damjan Jovanovic 
AuthorDate: Sun Oct 8 21:01:32 2023 +0200

Allow empty selection in PageSelector::UpdateCurrentPage().
This fixes a regression in Impress, where wrong slides are
selected on a right-click between slides when scrolling down,
and new slides are inserted in wrong places.

Patch by: Andre Fischer 
Reviewed by: me
Fixes: #124741 - Slide will be inserted in wrong place when try to
  insert it in latter slides(with vertical scrollbar)
---
 main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx | 5 -
 1 file changed, 5 deletions(-)

diff --git a/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx 
b/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index d4d82b1dc4..0da93988ad 100644
--- a/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -406,11 +406,6 @@ void PageSelector::UpdateCurrentPage (const bool 
bUpdateOnlyWhenPending)
 break;
 }
 }
-if ( ! pCurrentPageDescriptor && nPageCount>0)
-{
-// No page is selected.  Make the first slide the current page.
-pCurrentPageDescriptor = mrModel.GetPageDescriptor(0);
-}
 
 if (pCurrentPageDescriptor)
 {



[openoffice] branch AOO42X updated: The bUserAllowsLinkUpdate variable was erroneously changed to false in commit eab2447c44324e4faff5275517dba43fafb93341, causing formulas inserted without linking to

2023-10-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 405ea29d30 The bUserAllowsLinkUpdate variable was erroneously changed 
to false in commit eab2447c44324e4faff5275517dba43fafb93341, causing formulas 
inserted without linking to the file to not display until double-clicked on. 
Change that variable to true like it always was in the AOO41X branch.
405ea29d30 is described below

commit 405ea29d30eefeab1cbcdbada03548845d83dbca
Author: Damjan Jovanovic 
AuthorDate: Sun Oct 8 18:51:45 2023 +0200

The bUserAllowsLinkUpdate variable was erroneously changed to false
in commit eab2447c44324e4faff5275517dba43fafb93341, causing formulas 
inserted
without linking to the file to not display until double-clicked on.
Change that variable to true like it always was in the AOO41X branch.

Patch by: me
Found by: Pedro Lino

(cherry picked from commit dc7ddb711f16837106137e3e2a512e9200048da7)
---
 main/svtools/source/misc/embedhlp.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/svtools/source/misc/embedhlp.cxx 
b/main/svtools/source/misc/embedhlp.cxx
index c82a8f9fa8..c08bb364ba 100644
--- a/main/svtools/source/misc/embedhlp.cxx
+++ b/main/svtools/source/misc/embedhlp.cxx
@@ -709,7 +709,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool 
bUpdate ) const
 if ( !xStream.is() )
 {
RTL_LOGFILE_CONTEXT_TRACE( aLog, "getting stream from object" );
-bool bUserAllowsLinkUpdate(false);
+bool bUserAllowsLinkUpdate(true);
 const comphelper::EmbeddedObjectContainer* pContainer = GetContainer();
 
 if(pContainer)



[openoffice] branch trunk updated: The bUserAllowsLinkUpdate variable was erroneously changed to false in commit eab2447c44324e4faff5275517dba43fafb93341, causing formulas inserted without linking to

2023-10-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new dc7ddb711f The bUserAllowsLinkUpdate variable was erroneously changed 
to false in commit eab2447c44324e4faff5275517dba43fafb93341, causing formulas 
inserted without linking to the file to not display until double-clicked on. 
Change that variable to true like it always was in the AOO41X branch.
dc7ddb711f is described below

commit dc7ddb711f16837106137e3e2a512e9200048da7
Author: Damjan Jovanovic 
AuthorDate: Sun Oct 8 18:51:45 2023 +0200

The bUserAllowsLinkUpdate variable was erroneously changed to false
in commit eab2447c44324e4faff5275517dba43fafb93341, causing formulas 
inserted
without linking to the file to not display until double-clicked on.
Change that variable to true like it always was in the AOO41X branch.

Patch by: me
Found by: Pedro Lino
---
 main/svtools/source/misc/embedhlp.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/svtools/source/misc/embedhlp.cxx 
b/main/svtools/source/misc/embedhlp.cxx
index c82a8f9fa8..c08bb364ba 100644
--- a/main/svtools/source/misc/embedhlp.cxx
+++ b/main/svtools/source/misc/embedhlp.cxx
@@ -709,7 +709,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool 
bUpdate ) const
 if ( !xStream.is() )
 {
RTL_LOGFILE_CONTEXT_TRACE( aLog, "getting stream from object" );
-bool bUserAllowsLinkUpdate(false);
+bool bUserAllowsLinkUpdate(true);
 const comphelper::EmbeddedObjectContainer* pContainer = GetContainer();
 
 if(pContainer)



[openoffice] branch trunk updated: For gbuild, when linking a binary on Windows produces a .manifest file, embed this manifest into the binary like dmake did.

2023-10-01 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 104751b68f For gbuild, when linking a binary on Windows produces a 
.manifest file, embed this manifest into the binary like dmake did.
104751b68f is described below

commit 104751b68faf29eef4f137251f7b9ecd22ed8074
Author: Damjan Jovanovic 
AuthorDate: Sun Oct 1 09:48:00 2023 +0200

For gbuild, when linking a binary on Windows produces a .manifest file,
embed this manifest into the binary like dmake did.

Unfortunately our old version of LINK.EXE doesn't have the /MANIFEST:EMBED
option, so the manifest has to be be embedded by calling MT.EXE in a
separate step.

Also, stop delivering the .manifest files to ${OUTDIR} now.

Patch by: me
Fixes: #127731 - AOO fails to open ODBC manager
---
 main/solenv/gbuild/platform/windows.mk | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/main/solenv/gbuild/platform/windows.mk 
b/main/solenv/gbuild/platform/windows.mk
index 1957e904f1..ad75301570 100644
--- a/main/solenv/gbuild/platform/windows.mk
+++ b/main/solenv/gbuild/platform/windows.mk
@@ -37,6 +37,7 @@ endif
 gb_CC := cl
 gb_CXX := cl
 gb_LINK := link
+gb_MT := mt
 gb_AWK := awk
 gb_CLASSPATHSEP := ;
 gb_RC := rc
@@ -453,6 +454,8 @@ gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , 
,$(SOLARINC)))
 
 gb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
 
+# Runs the linker command to generate the binary.
+# If a .manifest file is generated, embeds it into the binary.
 define gb_LinkTarget__command
 $(call gb_Output_announce,$(2),$(true),LNK,4)
 $(call gb_Helper_abbreviate_dirs_native,\
@@ -477,7 +480,14 @@ $(call gb_Helper_abbreviate_dirs_native,\
$(patsubst %,%.lib,$(EXTERNAL_LIBS)) \
$(foreach lib,$(LINKED_STATIC_LIBS),$(call 
gb_StaticLibrary_get_filename,$(lib))) \
$(LIBS) \
-   $(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); 
RC=$$?; rm $${RESPONSEFILE} \
+   $(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); \
+   RC=$$?; \
+   if [ -f $(if $(DLLTARGET),$(DLLTARGET),$(1)).manifest ]; then \
+   $(gb_MT) \
+   -manifest $(if $(DLLTARGET),$(DLLTARGET),$(1)).manifest 
\
+   -outputresource:$(if $(DLLTARGET),$(DLLTARGET),$(1)); \
+   fi; \
+   rm $${RESPONSEFILE} \
$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; 
fi) ; exit $$RC)
 endef
 
@@ -682,7 +692,6 @@ $(call gb_LinkTarget_set_auxtargets,$(2),\
 
 $(call gb_Executable_get_target,$(1)) \
 $(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call 
gb_Executable_get_target,$(1)).manifest
-$(call gb_Deliver_add_deliverable,$(call 
gb_Executable_get_target,$(1)).manifest,$(call 
gb_LinkTarget_get_target,$(2)).manifest,$(1))
 
 $(call gb_LinkTarget_get_target,$(2)) \
 $(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call 
gb_LinkTarget_get_pdbfile,$(2))



[openoffice] branch AOO42X updated: Also allow: pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 instead of only: pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID() in ScDocume

2023-04-10 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new da1c051b9b Also allow: 
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 instead of only: 
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID() in 
ScDocument::CopyBlockFromClip(), because that's what it is when cells are 
dragged and dropped instead of cut and pasted.
da1c051b9b is described below

commit da1c051b9b2cdc4ed9487c3658fa0f9c052ccabb
Author: Damjan Jovanovic 
AuthorDate: Mon Apr 10 09:25:01 2023 +0200

Also allow:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0
instead of only:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID()
in ScDocument::CopyBlockFromClip(), because that's what it is when
cells are dragged and dropped instead of cut and pasted.

Fixes: #128566 - cell displacement problem
Patch by: me

(cherry picked from commit 3accd9b1ca87d0b4656a691efa455d8f0a24bdc9)
---
 main/sc/source/core/data/document.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main/sc/source/core/data/document.cxx 
b/main/sc/source/core/data/document.cxx
index 250dab2bb2..ba0e58c6e6 100644
--- a/main/sc/source/core/data/document.cxx
+++ b/main/sc/source/core/data/document.cxx
@@ -1966,7 +1966,8 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW 
nRow1,
 }
 }
 if ( (pCBFCP->nInsFlag & IDF_CONTENTS) &&
-   (pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 
GetDocumentID()) ) // #118023# only update references for *intra-document* cut 
and paste
+(pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 ||
+ pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 
GetDocumentID()) ) // #118023# only update references for *intra-document* cut 
and paste
{
nClipTab = 0;
for (SCTAB i = pCBFCP->nTabStart; i <= nTabEnd; i++)



[openoffice] branch AOO41X updated: Also allow: pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 instead of only: pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID() in ScDocume

2023-04-10 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
 new 90c740b5bc Also allow: 
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 instead of only: 
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID() in 
ScDocument::CopyBlockFromClip(), because that's what it is when cells are 
dragged and dropped instead of cut and pasted.
90c740b5bc is described below

commit 90c740b5bc3772cd09423718c8d572588e4187c2
Author: Damjan Jovanovic 
AuthorDate: Mon Apr 10 09:25:01 2023 +0200

Also allow:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0
instead of only:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID()
in ScDocument::CopyBlockFromClip(), because that's what it is when
cells are dragged and dropped instead of cut and pasted.

Fixes: #128566 - cell displacement problem
Patch by: me

(cherry picked from commit 3accd9b1ca87d0b4656a691efa455d8f0a24bdc9)
---
 main/sc/source/core/data/document.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main/sc/source/core/data/document.cxx 
b/main/sc/source/core/data/document.cxx
index 250dab2bb2..ba0e58c6e6 100644
--- a/main/sc/source/core/data/document.cxx
+++ b/main/sc/source/core/data/document.cxx
@@ -1966,7 +1966,8 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW 
nRow1,
 }
 }
 if ( (pCBFCP->nInsFlag & IDF_CONTENTS) &&
-   (pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 
GetDocumentID()) ) // #118023# only update references for *intra-document* cut 
and paste
+(pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 ||
+ pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 
GetDocumentID()) ) // #118023# only update references for *intra-document* cut 
and paste
{
nClipTab = 0;
for (SCTAB i = pCBFCP->nTabStart; i <= nTabEnd; i++)



[openoffice] branch trunk updated: Also allow: pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 instead of only: pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID() in ScDocumen

2023-04-10 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 3accd9b1ca Also allow: 
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 instead of only: 
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID() in 
ScDocument::CopyBlockFromClip(), because that's what it is when cells are 
dragged and dropped instead of cut and pasted.
3accd9b1ca is described below

commit 3accd9b1ca87d0b4656a691efa455d8f0a24bdc9
Author: Damjan Jovanovic 
AuthorDate: Mon Apr 10 09:25:01 2023 +0200

Also allow:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0
instead of only:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID()
in ScDocument::CopyBlockFromClip(), because that's what it is when
cells are dragged and dropped instead of cut and pasted.

Fixes: #128566 - cell displacement problem
Patch by: me
---
 main/sc/source/core/data/document.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main/sc/source/core/data/document.cxx 
b/main/sc/source/core/data/document.cxx
index 250dab2bb2..ba0e58c6e6 100644
--- a/main/sc/source/core/data/document.cxx
+++ b/main/sc/source/core/data/document.cxx
@@ -1966,7 +1966,8 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW 
nRow1,
 }
 }
 if ( (pCBFCP->nInsFlag & IDF_CONTENTS) &&
-   (pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 
GetDocumentID()) ) // #118023# only update references for *intra-document* cut 
and paste
+(pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 ||
+ pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 
GetDocumentID()) ) // #118023# only update references for *intra-document* cut 
and paste
{
nClipTab = 0;
for (SCTAB i = pCBFCP->nTabStart; i <= nTabEnd; i++)



[openoffice] branch trunk updated: Make the message clearer.

2023-03-01 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 267f9b4a08 Make the message clearer.
267f9b4a08 is described below

commit 267f9b4a08a090db565bd709bc67041acb8ad9ad
Author: Damjan Jovanovic 
AuthorDate: Thu Mar 2 05:22:06 2023 +0200

Make the message clearer.

Patch by: me
---
 main/configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/configure.ac b/main/configure.ac
index 66dcce56dc..c041a98460 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -2983,7 +2983,7 @@ if test "$_os" = "WINNT"; then
   if test -d "$_jdk_home"; then
   with_jdk_home="$_jdk_home"
   else
-  AC_MSG_WARN([$_jdk_home is not a directory, ignoring it])
+  AC_MSG_WARN([$_jdk_home is not a JDK home directory, ignoring it])
   fi
else
   with_jdk_home=`cygpath -u "$with_jdk_home"`



[openoffice] branch trunk updated: Add some logging to oowintool's detection of JDK home.

2023-03-01 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 32177a518e Add some logging to oowintool's detection of JDK home.
32177a518e is described below

commit 32177a518e024b6ff7e614db10c630e0bcd600e6
Author: Damjan Jovanovic 
AuthorDate: Thu Mar 2 05:06:01 2023 +0200

Add some logging to oowintool's detection of JDK home.

Patch by: me
---
 main/configure.ac | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/main/configure.ac b/main/configure.ac
index 442c53f5d6..66dcce56dc 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -2977,10 +2977,14 @@ fi
 
 if test "$_os" = "WINNT"; then
if test -z "$with_jdk_home"; then
+  AC_MSG_CHECKING([for JDK home])
   _jdk_home=`$OOWINTOOL --jdk-home`
-   if test -d "$_jdk_home"; then
+  AC_MSG_RESULT([$_jdk_home])
+  if test -d "$_jdk_home"; then
   with_jdk_home="$_jdk_home"
-   fi
+  else
+  AC_MSG_WARN([$_jdk_home is not a directory, ignoring it])
+  fi
else
   with_jdk_home=`cygpath -u "$with_jdk_home"`
fi



[openoffice] branch trunk updated: Append ".exe" to "javac" and "javadoc" detection on Windows too, just like we do on OS/2.

2023-02-28 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new fa0b85184c Append ".exe" to "javac" and "javadoc" detection on Windows 
too, just like we do on OS/2.
fa0b85184c is described below

commit fa0b85184c7d01f9b385b47b3b7416bf2a03a533
Author: Damjan Jovanovic 
AuthorDate: Wed Mar 1 05:45:16 2023 +0200

Append ".exe" to "javac" and "javadoc" detection on Windows too,
just like we do on OS/2.

Patch by: me
---
 main/configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/configure.ac b/main/configure.ac
index 1b9c9c09e2..442c53f5d6 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -3126,7 +3126,7 @@ if test "$SOLAR_JAVA" != ""; then
 else
 javacompiler="javac"
 fi
-if test "$_os" = "OS2"; then
+if test "$_os" = "WNT" -o "$_os" = "OS2"; then
   if test x`echo "$javacompiler" | $GREP -i '\.exe$'` = x; then
   javacompiler="${javacompiler}.exe"
   fi
@@ -3185,7 +3185,7 @@ if test "$SOLAR_JAVA" != ""; then
 AC_PATH_PROG(JAVADOC, javadoc)
 else
 _javadoc_path="$with_jdk_home/bin/javadoc"
-if test "$_os" = "OS2"; then
+if test "$_os" = "WNT" -o "$_os" = "OS2"; then
   if test x`echo "$_javadoc_path" | $GREP -i '\.exe$'` = x; then
   _javadoc_path="${_javadoc_path}.exe"
   fi



[openoffice] branch trunk updated (05f6192c8a -> d5edfd0976)

2023-02-12 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from 05f6192c8a reorderd paragraphs
 new 765ae79b13 Stop using svl's "PTRARR" for the ContentList class, which 
is limited to 16-bit indices and 2^16 entries. For now, use our own 
std::vector-based compatible class.
 new a890f778ee Factor out common list APIs into a BaseList template class. 
Get the ParaPortionList to use 32 bit indices too.
 new 3228dc3342 Start changing some of the Count() and GetPos() callers to 
32 bit indices.
 new 8dc46c9824 Change more callers of ContentList::Count() to 32 bit 
indices. Change the public API of the EditEngine class to 32 bit paragraph 
indices.
 new a38ef00207 Update the ImpEditEngine, EPosition, ESelection, 
EFieldInfo, MoveParagraphsInfo, PasteOrDropInfos, EENotify, DeletedNodeInfo, 
EditUndoDelContent, EditUndoSplitPara, and EditUndoMoveParagraphs classes with 
32 bit paragraph indices.
 new 3155dbc2d6 Convert a few more EditEngine paragraph indices to 32 bit.
 new fffd1d5de1 Convert the paragraph indices in EditTextObject and 
BinTextObject to 32 bit integers. Factor out the BaseList class into a separate 
file and use it as the ContentInfoList.
 new 20e487bda9 Convert a few other EditTextObject and BinTextObject 
paragraph indices to 32 bit that were missed before.
 new 597c409aad Start converting paragraph indices in the EditView and 
ImpEditView classes to 32 bit.
 new bb99baf438 Convert more EditView and EditEngine code to 32 bit 
paragraph indices. Fix one wrong converted varible that should have been left 
as 16 bit.
 new 434f02cad7 Convert the EditUndo classes to 32 bit paragraph indices. 
Audit all usage of "node" (sometimes used as a name for variables storing 
paragraph indices) and start converting and fixing the problems.
 new 1e6c8db2b9 Convert the EditSpellWrapper classes to 32 bit paragraph 
indices.
 new 209925efc4 Use 32 bit paragraph indices in the EditHTMLParser class.
 new 3974c0663f Use 32 bit paragraph indices in the EditRTFParser class.
 new d8fd122573 ImpEditEngine::FindParaPortion() should use a 32 bit 
paragraph index.
 new 67866f572d Convert ParaRange to 32 bit paragraph indices.
 new 8f081814de OutlinerEditEng inherits from EditEngine, and also needs to 
be changed to use 32 bit paragraph indices, as per the compiler warnings.
 new 961599b3ba Change main/editeng/inc/editeng/outliner.hxx to use 32 bit 
paragraph indices, and update enough of the affected code to able to build 
editeng.
 new 87936a4407 Change OutlinerParaObject::GetDepth() to a 32 bit paragraph 
index.
 new fbcf52f4d5 Fix the paragraph index types in 
OutlinerView::SelectRange().
 new 86af277237 Use 32 bit paragraph indices when calling 
OutLiner::ImplCheckParagraphs().
 new ced59291f7 Audit and fix 16 bit index paragraph issues in Outliner, 
and convert OLUndoExpand to 32 bit indices.
 new 7a5aa0144b Audit and fix some 16 bit paragraph index issues in the 
OutlinerView class and its related code.
 new 79496c0e51 Convert the remaining outliner undo classes to 32 bit 
paragraph indices.
 new 5707f3c20a Fix the 16 bit paragraph issues in the remaining Outliner 
methods in outlin2.cxx.
 new 0f74efc0ec We sometimes need unsigned long paragraph indices to work 
with the tools module's 64 bit macros.
 new 9d9bf804fb Use a 32 bit paragraph index for GetAttributeRun() methods 
everywhere.
 new c2eaa082a2 Preliminary attempt to convert all instances of 
GetParagraphCount() to return a sal_uInt32 or sal_uLong, and fix any related 
problems in all their callers.
 new 2cdd1ab095 Change the CalcFieldValue() parameter to sal_uInt32 across 
the whole codebase.
 new 8ee1071cd1 Convert all instances of GetTextLen() to take a 32 bit 
paragraph index.
 new 9ec87cd3b3 Convert all instances of GetParaAttribs() to take a 32 bit 
paragraph index.
 new 36a4646216 Convert all instances of SetParaAttribs() to take a 32 bit 
paragraph index.
 new 936080f760 Convert all instances of GetPortions() to take a 32 bit 
paragraph index.
 new 5aceeead84 Use 32 bit paragraph indices in 
SvxAccessibleTextAdapter::CalcLogicalIndex() and 
SvxAccessibleTextAdapter::CalcEditEngineIndex(). Convert AccessibleHyperlink to 
use a 32 bit paragraph index.
 new 1fd8202176 Change GetItemState() methods in editeng to use a 32 bit 
paragraph index.
 new 4386a992dd Convert all instances of FieldClicked() to take a 32 bit 
paragraph index.
 new 7481e1df77 Change the paragraph index parameter of the GetLanguage() 
method to 32 bit in editeng only (too many unrelated GetLanguage() methods in 
other places).
 new 72cd434a50 Convert all instances of GetFieldCount() to take a 32 bit 
paragraph index.
 new c67fa79c68 Convert all instances of GetFieldInfo() to 

[openoffice] branch AOO42X updated: In ODF (19.679.2 of ODF 1.3), the element's table:number-columns-repeated attribute has a default value of 1, meaning the cell spans the

2023-02-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new b9aa0698b1 In ODF (19.679.2 of ODF 1.3), the 
 element's table:number-columns-repeated attribute 
has a default value of 1, meaning the cell spans the cell to its right. However 
when the XSLT import filter converts from SpreadsheetML's ss:MergeAcross to 
ODF's table:number-columns-repeated, it always inserts a 
 element, and then adds the 
table:number-columns-repeated attribute only if it is greater than 1. This 
breaks when ss:Merge [...]
b9aa0698b1 is described below

commit b9aa0698b102697d60533d02e6cbe50f52d1cb50
Author: Damjan Jovanovic 
AuthorDate: Thu Jan 12 03:02:18 2023 +0200

In ODF (19.679.2 of ODF 1.3), the  element's
table:number-columns-repeated attribute has a default value of 1,
meaning the cell spans the cell to its right. However when the XSLT import
filter converts from SpreadsheetML's ss:MergeAcross to ODF's
table:number-columns-repeated, it always inserts a 

element, and then adds the table:number-columns-repeated attribute only if
it is greater than 1. This breaks when ss:MergeAcross="0", because ODF's
defaulting to 1 ends up occupying an extra empty cell to the right when it
shouldn't.

Fix this by only inserting the  when
ss:MergeAcross > 0.

Add a test document to prove this.

Fixes #100989 - SpreadsheetML: cell with ss:MergeAcross="0" gets an extra 
empty cell to the right
Patch by: me

(cherry picked from commit a896732bfcd282115c06407a2f1da77694fa8d19)
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |  2 +-
 .../Bug100989MergeAcross0AddsExtraEmptyCell.xml| 79 ++
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java |  1 +
 3 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 635278609e..a11a9a816c 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6652,7 +6652,7 @@



-   
+   



diff --git 
a/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml 
b/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
new file mode 100644
index 00..2149ce52c8
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
@@ -0,0 +1,79 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#c0c0c0
+  
+  
+4
+#ff
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+  <NumberFormat ss:Format="Currency"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Horizontal="Center" ss:Rotate="90"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+
+
+
+
+  
+  
+
+  
+  
+  
+  
+
+  TestID
+
+
+  TestOK
+
+
+  
+  
+
+  A cell with ss:MergeAcross=”0”
+doesn't creates an empty column to the right
+
+
+  0
+
+
+  E2 with ss:MergeAcross="0"
+
+
+  F2
+
+  
+
+
+  
+
diff --git a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java 
b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
in

[openoffice] branch AOO42X updated: Our XSLT-based MS Office 2003 SpreadsheetML format import filter, when doing conversion from R1C1 style column references to our A1 style references, had a bug wher

2023-02-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 0f570a5492 Our XSLT-based MS Office 2003 SpreadsheetML format import 
filter, when doing conversion from R1C1 style column references to our A1 style 
references, had a bug where it was treating the column value as 0-based, and 
dividing by 26 to find the 1st letter and taking the remainder when divided by 
26 for the second letter. Those numbers are then each converted to a letter [0 
= nothing, 1 = "A", 2 = "B", ..., 26 = "Z"].
0f570a5492 is described below

commit 0f570a5492b9ec8bf48d122b191318403f88eed0
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 11 19:47:12 2023 +0200

Our XSLT-based MS Office 2003 SpreadsheetML format import filter, when doing
conversion from R1C1 style column references to our A1 style references, 
had a
bug where it was treating the column value as 0-based, and dividing by 26 to
find the 1st letter and taking the remainder when divided by 26 for the 
second
letter. Those numbers are then each converted to a letter [0 = nothing,
1 = "A", 2 = "B", ..., 26 = "Z"].

However since R1C1 is 1-based, and not 0-based, this breaks for column 
numbers
which are multiples of 26, as 26 mod 26 = 0, so the least significant digit 
is
converted to nothing while the most significant digit gets incremented too
early.

Fix this by converting the column number to 0-based by subtracting 1 before
calculation, then adding 1 to the least significant digit afterwards.

Also the fact we have 2 letters limited us to a maximum of 26^2 = 676 
columns,
after which column references would wrap around. Fix this too, by adding a 
3rd
letter, which lets us address a maximum of 17576 columns.

Add a sample file to our unit tests.

Found by: alex dot plantema at xs4all dot nl
Patch by: me

(cherry picked from commit 577fe17932e0dec38662067d1a86e7fd6ae525b6)
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |  25 -
 .../data/uno/sc/fvt/Bug81233ColumnZReference.xml   | 121 +
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java |   1 +
 3 files changed, 143 insertions(+), 4 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 767a2b66bf..635278609e 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -8215,11 +8215,23 @@



+   
+   
+   

-   
+   
+   
+   
+   


-   
+   
+   
+   
+   
+   
+   
+   



@@ -8231,13 +8243,18 @@



+   
+   
+   
+   
+   



-   
+   


-   
+   



diff --git a/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml 
b/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml
new file mode 100644
index 00..f37f9da884
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml
@@ -0,0 +1,121 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#c0c0c0
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold=&qu

[openoffice] branch AOO42X updated: Tab function test document and test (#156)

2023-02-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new a1409b3e46 Tab function test document and test (#156)
a1409b3e46 is described below

commit a1409b3e46fc2fc106591343fd49d8d080d5d5b1
Author: Carl Marcum 
AuthorDate: Sat Sep 24 18:16:14 2022 -0400

Tab function test document and test (#156)

Refs i19221 - added test and test document to test star basic Tab function 
in Calc.

Patch-By: Czesław Wolański
(cherry picked from commit 3b297b461537a449cdc46a885832873b48e62701)
---
 test/testuno/data/uno/sc/fvt/StarBasicTab.ods| Bin 0 -> 9851 bytes
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java   |   1 +
 2 files changed, 1 insertion(+)

diff --git a/test/testuno/data/uno/sc/fvt/StarBasicTab.ods 
b/test/testuno/data/uno/sc/fvt/StarBasicTab.ods
new file mode 100644
index 00..10696732af
Binary files /dev/null and b/test/testuno/data/uno/sc/fvt/StarBasicTab.ods 
differ
diff --git a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java 
b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
index 52bea4ca63..2df3c36520 100644
--- a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
+++ b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
@@ -70,6 +70,7 @@ public class TestFormulaDocs {
{"uno/sc/fvt/FormulaTest1.ods", 
"FormulaTest1.ods"},

{"uno/sc/fvt/StarBasicYearMonthDateHourMinuteSecondTests.ods", "Basic Year 
Month Date Hour Minute Second Test"},
{"uno/sc/fvt/StarBasicCLng.ods", "Basic Convert 
to Long Function Test"},
+   {"uno/sc/fvt/StarBasicTab.ods", "Basic Tab 
Function Test"},
{"uno/sc/fvt/DGET on formulas.ods", "DGET on 
formulas Test"},
{"uno/sc/fvt/Basic Line as variable and Line 
Input.ods", "Basic Line as variable and Line Input Test"},

{"uno/sc/fvt/comment-in-single-line-if-then-else.ods", "Basic comment after 
single line if statement Test"},



[openoffice] branch AOO42X updated: Refs i126272 - add test and test document for testing Basic comment in single-line if statements (#152)

2023-02-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
 new 3b5ec47b15 Refs i126272 - add test and test document for testing Basic 
comment in single-line if statements (#152)
3b5ec47b15 is described below

commit 3b5ec47b15ab141460e2a7c60e19e9a0616b9d3d
Author: Carl Marcum 
AuthorDate: Fri Jun 10 11:23:14 2022 -0400

Refs i126272 - add test and test document for testing Basic comment in 
single-line if statements (#152)

* Refs i126272 - added test and test document to test fix for comment in 
single line if statement.

(cherry picked from commit 07758af81c4094b8c020cf9852c971f9ff19be4f)
---
 .../uno/sc/fvt/comment-in-single-line-if-then-else.ods   | Bin 0 -> 9580 bytes
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java   |   1 +
 2 files changed, 1 insertion(+)

diff --git 
a/test/testuno/data/uno/sc/fvt/comment-in-single-line-if-then-else.ods 
b/test/testuno/data/uno/sc/fvt/comment-in-single-line-if-then-else.ods
new file mode 100644
index 00..081fee54e4
Binary files /dev/null and 
b/test/testuno/data/uno/sc/fvt/comment-in-single-line-if-then-else.ods differ
diff --git a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java 
b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
index 047f379bab..52bea4ca63 100644
--- a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
+++ b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
@@ -72,6 +72,7 @@ public class TestFormulaDocs {
{"uno/sc/fvt/StarBasicCLng.ods", "Basic Convert 
to Long Function Test"},
{"uno/sc/fvt/DGET on formulas.ods", "DGET on 
formulas Test"},
{"uno/sc/fvt/Basic Line as variable and Line 
Input.ods", "Basic Line as variable and Line Input Test"},
+   
{"uno/sc/fvt/comment-in-single-line-if-then-else.ods", "Basic comment after 
single line if statement Test"},

{"uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml", "Bug 100989 fractional 
seconds are silently ignored during import"}
});
}



[openoffice] 01/02: Fix TestFormulaDocs to run against AOO41X, make parameterized, and fix late screenshots (#149)

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit fcf28a0196ba194f5b6c803946707f88f610c27d
Author: Carl Marcum 
AuthorDate: Sun May 29 15:47:07 2022 -0400

Fix TestFormulaDocs to run against AOO41X, make parameterized, and fix late 
screenshots (#149)

updated TestFormulaDocs test to be a parameterized test to better see which 
document failed.
Fixed late screenshots on failures.
Added timeout for dialog hangs when running tests against AOO41X branch due 
to some BASIC bug fixes for i112383 [1] and it's commit [2] and i117960 [3] and 
it's commit [4] not being back-ported to AOO41X.

[1] https://bz.apache.org/ooo/show_bug.cgi?id=112383
[2] 323c350

[3] https://bz.apache.org/ooo/show_bug.cgi?id=117960
[4] 725d867

(cherry picked from commit 7d8592c79cfa104063570593e943fed55296950b)
---
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java | 70 ++
 1 file changed, 45 insertions(+), 25 deletions(-)

diff --git a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java 
b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
index b72624cdf0..ad14ba96a1 100644
--- a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
+++ b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
@@ -23,11 +23,18 @@ package fvt.uno.sc.formula;
 
 import static org.junit.Assert.*;
 
-import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import java.util.Arrays;
+import java.util.Collection;
+
 import org.openoffice.test.common.Testspace;
 import org.openoffice.test.common.Logger;
 
@@ -50,43 +57,57 @@ import com.sun.star.util.XModifiable;
 
 import java.util.logging.Level;
 
-
+@RunWith(Parameterized.class)
 public class TestFormulaDocs {
 
+   private String filename;
+   private String type;
+
+   @Parameters
+   public static Collection data() {
+   return Arrays.asList(new Object[][]{
+   // test documents
+   {"uno/sc/fvt/FormulaTest1.ods", 
"FormulaTest1.ods"},
+   
{"uno/sc/fvt/StarBasicYearMonthDateHourMinuteSecondTests.ods", 
"StarBasicYearMonthDateHourMinuteSecondTests.ods"},
+   {"uno/sc/fvt/StarBasicCLng.ods", 
"StarBasicCLng.ods"},
+   {"uno/sc/fvt/DGET on formulas.ods", "DGET on 
formulas.ods"},
+   {"uno/sc/fvt/Basic Line as variable and Line 
Input.ods", "Basic Line as variable and Line Input.ods"}
+   });
+   }
+
@Rule
public Logger log = Logger.getLogger(this);
 
-   UnoApp unoApp = new UnoApp();
+   static UnoApp unoApp = new UnoApp();
XComponent scComponent = null;
 
+   /**
+* Clean class after testing
+*
+* @throws Exception
+*/
+   @AfterClass
+   public static void afterClass() {
+   unoApp.close();
+   }
+
@Before
public void setUp() throws Exception {
+   unoApp.close(); // moved here from tearDown because stopping 
app there causes a late screenshot
unoApp.start();
}
 
-   @After
-   public void tearDown() throws Exception {
-   unoApp.close();
+   public TestFormulaDocs(String filename, String type) {
+   this.filename = filename;
+   this.type = type;
}
 
-   /**
-* Test evaluation of formulas in a sample document
-* 
-* @throws Exception
-*/
-
-   @Test
-   public void testFormulaDocs() throws Exception {
-   testOneDoc( "uno/sc/fvt/FormulaTest1.ods");
-   testOneDoc( 
"uno/sc/fvt/StarBasicYearMonthDateHourMinuteSecondTests.ods");
-   testOneDoc( "uno/sc/fvt/StarBasicCLng.ods");
-   testOneDoc( "uno/sc/fvt/DGET on formulas.ods");
-   testOneDoc( "uno/sc/fvt/Basic Line as variable and Line 
Input.ods");
-   }
-
-   public void testOneDoc( String filename) throws Exception {
+   // FIXME: only needs a timeout for running tests against AOO41X due to 
fixes for i112383 and i117960 present in trunk
+   // haven't been backported to AOO41X yet and causes these tests to hang 
on an error dialog.
+   @Test(timeout = 15000)
+   public void testOneDoc() throws Exception {
// open the spreadsheet document
-   String sample = Testspace.prepareData

[openoffice] 02/02: When importing SpreadsheetML ss:DateTime, import the entire value, not only the first 19 characters.

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 48b860b608609900a6c5e4cdcec7cd53e91e372e
Author: Damjan Jovanovic 
AuthorDate: Sat Jan 14 06:58:10 2023 +0200

When importing SpreadsheetML ss:DateTime, import the entire value, not only 
the
first 19 characters.

Add a test file for this bug.

Fixes: #128554 - Office 2003 SpreadsheetML: fractional seconds are silently
   ignored during import
Patch by: me

(cherry picked from commit 195282cf3d8bfaa9e1cec43b093251d9df87f4ba)
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |   2 +-
 .../sc/fvt/Bug128554FractionalSecondsIgnored.xml   | 108 +
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java |   9 +-
 3 files changed, 114 insertions(+), 5 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 10d2d1c622..767a2b66bf 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6868,7 +6868,7 @@

date

-   
+   



diff --git a/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml 
b/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
new file mode 100644
index 00..573cc4d284
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
@@ -0,0 +1,108 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#00
+  
+  
+4
+#c0c0c0
+  
+  
+5
+#ff
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+  <NumberFormat ss:Format="Currency"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Horizontal="Center" ss:Rotate="90"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Vertical="Bottom"/>
+  <Font ss:Color="#00" ss:FontName="Calibri" ss:Size="11"/>
+
+
+
+
+
+
+
+
+
+  <Font ss:Bold="1" ss:Color="#00" ss:FontName="Calibri" ss:Size="11"/>
+
+
+  <NumberFormat ss:Format="General Date"/>
+
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+
+  TestID
+
+
+  Date/Time
+
+
+  In numeric form
+
+
+  Should be
+
+
+  TestOK
+
+  
+  
+
+  Time
+
+
+  2023-01-14T04:05:06.78000
+
+
+  44940.1702173611
+
+
+  44940.1702173611
+
+
+  1
+
+  
+
+
+  
+
diff --git a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java 
b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
index ad14ba96a1..047f379bab 100644
--- a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
+++ b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
@@ -68,10 +68,11 @@ public class TestFormulaDocs {
return Arrays.asList(new Object[][]{
// test documents
{"uno/sc/fvt/FormulaTest1.ods", 
"FormulaTest1.ods"},
-   
{"uno/sc/fvt/StarBasicYearMonthDateHourMinuteSecondTests.ods", 
"StarBasicYearMonthDateHourMinuteSecondTests.ods"},
-   {"uno/sc/fvt/StarBasicCLng.ods", 
"St

[openoffice] branch AOO42X updated (3ffed7e587 -> 48b860b608)

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from 3ffed7e587 Add a "Referer" to toolbars
 new fcf28a0196 Fix TestFormulaDocs to run against AOO41X, make 
parameterized, and fix late screenshots (#149)
 new 48b860b608 When importing SpreadsheetML ss:DateTime, import the entire 
value, not only the first 19 characters.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |   2 +-
 .../sc/fvt/Bug128554FractionalSecondsIgnored.xml   | 108 +
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java |  71 +-
 3 files changed, 155 insertions(+), 26 deletions(-)
 create mode 100644 
test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml



[openoffice] branch AOO41X updated (1f71f1d8c3 -> d1836b6227)

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from 1f71f1d8c3 Add support for the new XLSX date type in cells, denoted 
with attribute t="d", used by Excel 2010.
 new 0285e67f3b Our XSLT-based MS Office 2003 SpreadsheetML format import 
filter, when doing conversion from R1C1 style column references to our A1 style 
references, had a bug where it was treating the column value as 0-based, and 
dividing by 26 to find the 1st letter and taking the remainder when divided by 
26 for the second letter. Those numbers are then each converted to a letter [0 
= nothing, 1 = "A", 2 = "B", ..., 26 = "Z"].
 new 4926b38203 Dates and times are loaded wrongly from SpreadsheetML 
files, because the filter loads only the date or time portion of the 
ss:DateTime based on the cell's style.
 new ffb2f9cdf2 When importing SpreadsheetML ss:DateTime, import the entire 
value, not only the first 19 characters.
 new d1836b6227 In ODF (19.679.2 of ODF 1.3), the 
 element's table:number-columns-repeated attribute 
has a default value of 1, meaning the cell spans the cell to its right. However 
when the XSLT import filter converts from SpreadsheetML's ss:MergeAcross to 
ODF's table:number-columns-repeated, it always inserts a 
 element, and then adds the 
table:number-columns-repeated attribute only if it is greater than 1. This 
breaks when ss:Merge [...]

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |  45 
 .../Bug100989MergeAcross0AddsExtraEmptyCell.xml|  79 ++
 .../sc/fvt/Bug128554FractionalSecondsIgnored.xml   | 108 ++
 .../data/uno/sc/fvt/Bug81233ColumnZReference.xml   | 121 +
 4 files changed, 334 insertions(+), 19 deletions(-)
 create mode 100644 
test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
 create mode 100644 
test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
 create mode 100644 test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml



[openoffice] 04/04: In ODF (19.679.2 of ODF 1.3), the element's table:number-columns-repeated attribute has a default value of 1, meaning the cell spans the cell to its righ

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit d1836b62275253243e873969ddd24d2e327afc76
Author: Damjan Jovanovic 
AuthorDate: Thu Jan 12 03:02:18 2023 +0200

In ODF (19.679.2 of ODF 1.3), the  element's
table:number-columns-repeated attribute has a default value of 1,
meaning the cell spans the cell to its right. However when the XSLT import
filter converts from SpreadsheetML's ss:MergeAcross to ODF's
table:number-columns-repeated, it always inserts a 

element, and then adds the table:number-columns-repeated attribute only if
it is greater than 1. This breaks when ss:MergeAcross="0", because ODF's
defaulting to 1 ends up occupying an extra empty cell to the right when it
shouldn't.

Fix this by only inserting the  when
ss:MergeAcross > 0.

Add a test document to prove this.

Fixes #100989 - SpreadsheetML: cell with ss:MergeAcross="0" gets an extra 
empty cell to the right
Patch by: me

(cherry picked from commit a896732bfcd282115c06407a2f1da77694fa8d19)
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |  2 +-
 .../Bug100989MergeAcross0AddsExtraEmptyCell.xml| 79 ++
 2 files changed, 80 insertions(+), 1 deletion(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index fdd38a0978..a395180667 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6652,7 +6652,7 @@



-   
+   



diff --git 
a/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml 
b/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
new file mode 100644
index 00..2149ce52c8
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
@@ -0,0 +1,79 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#c0c0c0
+  
+  
+4
+#ff
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+  <NumberFormat ss:Format="Currency"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Horizontal="Center" ss:Rotate="90"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+
+
+
+
+  
+  
+
+  
+  
+  
+  
+
+  TestID
+
+
+  TestOK
+
+
+  
+  
+
+  A cell with ss:MergeAcross=”0”
+doesn't creates an empty column to the right
+
+
+  0
+
+
+  E2 with ss:MergeAcross="0"
+
+
+  F2
+
+  
+
+
+  
+



[openoffice] 03/04: When importing SpreadsheetML ss:DateTime, import the entire value, not only the first 19 characters.

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit ffb2f9cdf269eb2185fa8deb2236b68a23ca6fb7
Author: Damjan Jovanovic 
AuthorDate: Sat Jan 14 06:58:10 2023 +0200

When importing SpreadsheetML ss:DateTime, import the entire value, not only 
the
first 19 characters.

Add a test file for this bug.

Fixes: #128554 - Office 2003 SpreadsheetML: fractional seconds are silently
   ignored during import
Patch by: me

(cherry picked from commit 195282cf3d8bfaa9e1cec43b093251d9df87f4ba)
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |   2 +-
 .../sc/fvt/Bug128554FractionalSecondsIgnored.xml   | 108 +
 2 files changed, 109 insertions(+), 1 deletion(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 63291ffa6d..fdd38a0978 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6868,7 +6868,7 @@

date

-   
+   



diff --git a/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml 
b/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
new file mode 100644
index 00..573cc4d284
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
@@ -0,0 +1,108 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#00
+  
+  
+4
+#c0c0c0
+  
+  
+5
+#ff
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+  <NumberFormat ss:Format="Currency"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Horizontal="Center" ss:Rotate="90"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Vertical="Bottom"/>
+  <Font ss:Color="#00" ss:FontName="Calibri" ss:Size="11"/>
+
+
+
+
+
+
+
+
+
+  <Font ss:Bold="1" ss:Color="#00" ss:FontName="Calibri" ss:Size="11"/>
+
+
+  <NumberFormat ss:Format="General Date"/>
+
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+
+  TestID
+
+
+  Date/Time
+
+
+  In numeric form
+
+
+  Should be
+
+
+  TestOK
+
+  
+  
+
+  Time
+
+
+  2023-01-14T04:05:06.78000
+
+
+  44940.1702173611
+
+
+  44940.1702173611
+
+
+  1
+
+  
+
+
+  
+



[openoffice] 02/04: Dates and times are loaded wrongly from SpreadsheetML files, because the filter loads only the date or time portion of the ss:DateTime based on the cell's style.

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 4926b38203718cd102f6233580cc93e8f867c7b4
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 13 18:27:50 2023 +0200

Dates and times are loaded wrongly from SpreadsheetML files, because the 
filter
loads only the date or time portion of the ss:DateTime based on the cell's
style.

Rather always load the ss:DateTime as our ODF office:date-value in the
XMLSchema-2 dateTime format, with both its date and time part, and then 
rely on
formatting to display only the date or time as desired.

Fixes: #82849 - SpreadsheetML ss:DateTime cell value is loaded as either 
only
a date or a time

Patch by: Philip J. Turmel 
Reviewed by: me

(cherry picked from commit 0db4a4f44da1c0fb06154ba61c960a18427e751b)
---
 .../xslt/import/spreadsheetml/spreadsheetml2ooo.xsl| 18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 3f93f105ae..63291ffa6d 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6866,20 +6866,10 @@



-   
-   
-   date
-   
-   
-   
-   
-   
-   time
-   
-   
-   
-   
-   
+   date
+   
+   
+   


boolean



[openoffice] 01/04: Our XSLT-based MS Office 2003 SpreadsheetML format import filter, when doing conversion from R1C1 style column references to our A1 style references, had a bug where it was treatin

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 0285e67f3b672422a011fcc082697d769fcf7d81
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 11 19:47:12 2023 +0200

Our XSLT-based MS Office 2003 SpreadsheetML format import filter, when doing
conversion from R1C1 style column references to our A1 style references, 
had a
bug where it was treating the column value as 0-based, and dividing by 26 to
find the 1st letter and taking the remainder when divided by 26 for the 
second
letter. Those numbers are then each converted to a letter [0 = nothing,
1 = "A", 2 = "B", ..., 26 = "Z"].

However since R1C1 is 1-based, and not 0-based, this breaks for column 
numbers
which are multiples of 26, as 26 mod 26 = 0, so the least significant digit 
is
converted to nothing while the most significant digit gets incremented too
early.

Fix this by converting the column number to 0-based by subtracting 1 before
calculation, then adding 1 to the least significant digit afterwards.

Also the fact we have 2 letters limited us to a maximum of 26^2 = 676 
columns,
after which column references would wrap around. Fix this too, by adding a 
3rd
letter, which lets us address a maximum of 17576 columns.

Add a sample file to our unit tests.

Found by: alex dot plantema at xs4all dot nl
Patch by: me

(cherry picked from commit 577fe17932e0dec38662067d1a86e7fd6ae525b6)
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |  25 -
 .../data/uno/sc/fvt/Bug81233ColumnZReference.xml   | 121 +
 2 files changed, 142 insertions(+), 4 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 934f0fa662..3f93f105ae 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -8225,11 +8225,23 @@



+   
+   
+   

-   
+   
+   
+   
+   


-   
+   
+   
+   
+   
+   
+   
+   



@@ -8241,13 +8253,18 @@



+   
+   
+   
+   
+   



-   
+   


-   
+   



diff --git a/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml 
b/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml
new file mode 100644
index 00..f37f9da884
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml
@@ -0,0 +1,121 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#c0c0c0
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Horizontal="Center" ss:Rotate="90"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+
+
+
+
+  <Font ss:VerticalAlign="Subscript"/>
+
+  
+  
+
+  
+  
+  
+
+  TestID
+
+
+  TestOK
+
+
+  wrapped!
+
+
+  Y test
+
+
+  Z test
+
+

[openoffice] 02/02: Add support for the new XLSX date type in cells, denoted with attribute t="d", used by Excel 2010.

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 1f71f1d8c317442f96cd6d435bb275ff6e97eccb
Author: Damjan Jovanovic 
AuthorDate: Sun Jan 8 10:24:33 2023 +0200

Add support for the new XLSX date type in cells, denoted with attribute 
t="d",
used by Excel 2010.

Also refactor the code so the datetime attribute in pivot tables is also 
parsed
by the same function, and increase the parsing accuracy to the maximum 
(HundredthSeconds,
instead of just Seconds).

Fixes: #127034 - xlsx file: imported DateTime cells are empty (Excel 2010 
compatible)
Patch by: me

(cherry picked from commit 9621e552cdf723df9a998b3af4218407d6c66e37)
---
 main/oox/inc/oox/helper/datetimehelper.hxx | 34 +++
 main/oox/source/helper/attributelist.cxx   | 13 ++-
 main/oox/source/helper/datetimehelper.cxx  | 54 ++
 main/oox/source/helper/makefile.mk |  1 +
 main/oox/source/xls/sheetdatacontext.cxx   | 12 +++
 main/oox/source/xls/unitconverter.cxx  |  2 +-
 6 files changed, 104 insertions(+), 12 deletions(-)

diff --git a/main/oox/inc/oox/helper/datetimehelper.hxx 
b/main/oox/inc/oox/helper/datetimehelper.hxx
new file mode 100644
index 00..dda5a1181d
--- /dev/null
+++ b/main/oox/inc/oox/helper/datetimehelper.hxx
@@ -0,0 +1,34 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+#ifndef OOX_HELPER_DATETIMEHELPER_HXX
+#define OOX_HELPER_DATETIMEHELPER_HXX
+
+#include 
+#include "oox/helper/helper.hxx"
+
+namespace oox {
+
+bool parseISO8601DateTime( ::rtl::OUString &aValue, 
::com::sun::star::util::DateTime &dateTime );
+
+} // namespace oox
+
+#endif /* OOX_HELPER_DATETIMEHELPER_HXX */
diff --git a/main/oox/source/helper/attributelist.cxx 
b/main/oox/source/helper/attributelist.cxx
index 30cf8babb1..686aeada05 100644
--- a/main/oox/source/helper/attributelist.cxx
+++ b/main/oox/source/helper/attributelist.cxx
@@ -22,6 +22,7 @@
 
 
 #include "oox/helper/attributelist.hxx"
+#include "oox/helper/datetimehelper.hxx"
 
 #include 
 #include 
@@ -233,17 +234,7 @@ OptValue< DateTime > AttributeList::getDateTime( sal_Int32 
nAttrToken ) const
 {
 OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
 DateTime aDateTime;
-bool bValid = (aValue.getLength() == 19) && (aValue[ 4 ] == '-') && 
(aValue[ 7 ] == '-') &&
-(aValue[ 10 ] == 'T') && (aValue[ 13 ] == ':') && (aValue[ 16 ] == 
':');
-if( bValid )
-{
-aDateTime.Year= static_cast< sal_uInt16 >( aValue.copy( 0, 4 
).toInt32() );
-aDateTime.Month   = static_cast< sal_uInt16 >( aValue.copy( 5, 2 
).toInt32() );
-aDateTime.Day = static_cast< sal_uInt16 >( aValue.copy( 8, 2 
).toInt32() );
-aDateTime.Hours   = static_cast< sal_uInt16 >( aValue.copy( 11, 2 
).toInt32() );
-aDateTime.Minutes = static_cast< sal_uInt16 >( aValue.copy( 14, 2 
).toInt32() );
-aDateTime.Seconds = static_cast< sal_uInt16 >( aValue.copy( 17, 2 
).toInt32() );
-}
+bool bValid = parseISO8601DateTime( aValue, aDateTime );
 return OptValue< DateTime >( bValid, aDateTime );
 }
 
diff --git a/main/oox/source/helper/datetimehelper.cxx 
b/main/oox/source/helper/datetimehelper.cxx
new file mode 100644
index 00..cf44aaa24a
--- /dev/null
+++ b/main/oox/source/helper/datetimehelper.cxx
@@ -0,0 +1,54 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "Licens

[openoffice] branch AOO41X updated (bd4036b4fc -> 1f71f1d8c3)

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a change to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


from bd4036b4fc Cleaned up resource file for Euro converter
 new 74eb9fee55 Allow the XLSX Relationship "Target" attribute in 
_rels/.rels to have superfluous slashes.
 new 1f71f1d8c3 Add support for the new XLSX date type in cells, denoted 
with attribute t="d", used by Excel 2010.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 main/oox/inc/oox/core/relationshandler.hxx |  4 ++
 .../oox/helper/datetimehelper.hxx} | 12 +++--
 main/oox/source/core/filterdetect.cxx  |  3 +-
 main/oox/source/core/relationshandler.cxx  | 26 +-
 main/oox/source/helper/attributelist.cxx   | 13 +
 .../modelbase.cxx => helper/datetimehelper.cxx}| 56 +++---
 main/oox/source/helper/makefile.mk |  1 +
 main/oox/source/xls/sheetdatacontext.cxx   | 12 +
 main/oox/source/xls/unitconverter.cxx  |  2 +-
 9 files changed, 74 insertions(+), 55 deletions(-)
 copy main/oox/{source/token/tokens.hxx.tail => 
inc/oox/helper/datetimehelper.hxx} (75%)
 copy main/oox/source/{drawingml/chart/modelbase.cxx => 
helper/datetimehelper.cxx} (54%)



[openoffice] 01/02: Allow the XLSX Relationship "Target" attribute in _rels/.rels to have superfluous slashes.

2023-02-07 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 74eb9fee553bfc2739c7523bac1b787b6ee509f7
Author: Damjan Jovanovic 
AuthorDate: Sat Jan 7 20:25:36 2023 +0200

Allow the XLSX Relationship "Target" attribute in _rels/.rels to have 
superfluous slashes.

Fixes: #117672 - Opening XLSX fails when the Relationship "Target" 
attribute in _rels/.rels
   has superfluous slashes
Patch by: me

(cherry picked from commit 3ff2b12a82734e8b46c6f7693a7e1b8eef8ada96)
---
 main/oox/inc/oox/core/relationshandler.hxx |  4 
 main/oox/source/core/filterdetect.cxx  |  3 ++-
 main/oox/source/core/relationshandler.cxx  | 26 +-
 3 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/main/oox/inc/oox/core/relationshandler.hxx 
b/main/oox/inc/oox/core/relationshandler.hxx
index 6affee9858..8ceee13276 100644
--- a/main/oox/inc/oox/core/relationshandler.hxx
+++ b/main/oox/inc/oox/core/relationshandler.hxx
@@ -44,6 +44,10 @@ public:
 const ::com::sun::star::uno::Reference< 
::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
 throw (::com::sun::star::xml::sax::SAXException, 
::com::sun::star::uno::RuntimeException);
 
+static ::rtl::OUString
+removeDuplicateSlashes(
+const ::rtl::OUString &path );
+
 private:
 RelationsRefmxRelations;
 };
diff --git a/main/oox/source/core/filterdetect.cxx 
b/main/oox/source/core/filterdetect.cxx
index 5b16df16f1..3c10e600c4 100644
--- a/main/oox/source/core/filterdetect.cxx
+++ b/main/oox/source/core/filterdetect.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include "oox/core/fastparser.hxx"
+#include "oox/core/relationshandler.hxx"
 #include "oox/helper/attributelist.hxx"
 #include "oox/helper/binaryinputstream.hxx"
 #include "oox/helper/binaryoutputstream.hxx"
@@ -158,7 +159,7 @@ void FilterDetectDocHandler::parseRelationship( const 
AttributeList& rAttribs )
 {
 OUString aType = rAttribs.getString( XML_Type, OUString() );
 if( aType.equalsAscii( 
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
 ) )
-maTargetPath = OUString( sal_Unicode( '/' ) ) + rAttribs.getString( 
XML_Target, OUString() );
+maTargetPath = RelationsFragment::removeDuplicateSlashes( OUString( 
sal_Unicode( '/' ) ) + rAttribs.getString( XML_Target, OUString() ) );
 }
 
 OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& 
rContentType ) const
diff --git a/main/oox/source/core/relationshandler.cxx 
b/main/oox/source/core/relationshandler.cxx
index 51a0afc12f..a8566b6f28 100644
--- a/main/oox/source/core/relationshandler.cxx
+++ b/main/oox/source/core/relationshandler.cxx
@@ -79,7 +79,7 @@ Reference< XFastContextHandler > 
RelationsFragment::createFastChildContext(
 Relation aRelation;
 aRelation.maId = aAttribs.getString( XML_Id, OUString() );
 aRelation.maType   = aAttribs.getString( XML_Type, OUString() );
-aRelation.maTarget = aAttribs.getString( XML_Target, OUString() );
+aRelation.maTarget = removeDuplicateSlashes( aAttribs.getString( 
XML_Target, OUString() ) );
 if( (aRelation.maId.getLength() > 0) && 
(aRelation.maType.getLength() > 0) && (aRelation.maTarget.getLength() > 0) )
 {
 sal_Int32 nTargetMode = aAttribs.getToken( XML_TargetMode, 
XML_Internal );
@@ -100,6 +100,30 @@ Reference< XFastContextHandler > 
RelationsFragment::createFastChildContext(
 return xRet;
 }
 
+OUString RelationsFragment::removeDuplicateSlashes( const OUString &path )
+{
+rtl::OUStringBuffer buffer;
+bool hadSlash = false;
+for ( sal_Int32 i = 0; i < path.getLength(); i++ )
+{
+sal_Unicode ch = path[i];
+if ( ch == '/' )
+{
+if ( !hadSlash )
+{
+hadSlash = true;
+buffer.append( sal_Unicode( '/' ) );
+}
+}
+else
+{
+hadSlash = false;
+buffer.append( ch );
+}
+}
+return buffer.makeStringAndClear();
+}
+
 // 
 
 } // namespace core



[openoffice] branch AOO41X updated: for #i124928, rich text portion could be converted several times, each time when it is converted, the string will be set once, but in the setString logic, the text

2023-01-30 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
 new 768bfd82c2 for #i124928, rich text portion could be converted several 
times, each time when it is converted, the string will be set once, but in the 
setString logic, the text is inserted instead of set. Repeated conversion is 
unnecessary, add a flag to avoid repeated conversion
768bfd82c2 is described below

commit 768bfd82c2396d947d0a3b8ab5aa44cfe31f4111
Author: Clarence Guo 
AuthorDate: Mon May 26 03:03:05 2014 +

for #i124928, rich text portion could be converted several times, each time 
when it is converted, the string will be set once, but in the setString logic, 
the text is inserted instead of set.
Repeated conversion is unnecessary, add a flag to avoid repeated conversion

git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1597503 
13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit c0670b14b16dba0137a280c9aabcadc554988f08)
---
 main/oox/inc/oox/xls/richstring.hxx |  1 +
 main/oox/source/xls/richstring.cxx  | 10 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/main/oox/inc/oox/xls/richstring.hxx 
b/main/oox/inc/oox/xls/richstring.hxx
index f97ab6d1c7..3e8c46b8ba 100644
--- a/main/oox/inc/oox/xls/richstring.hxx
+++ b/main/oox/inc/oox/xls/richstring.hxx
@@ -78,6 +78,7 @@ private:
 ::rtl::OUString maText; /// Portion text.
 FontRef mxFont; /// Embedded portion font, may be 
empty.
 sal_Int32   mnFontId;   /// Link to global font list.
+boolmbConverted;/// Without repeatly convert
 };
 
 typedef ::boost::shared_ptr< RichStringPortion > RichStringPortionRef;
diff --git a/main/oox/source/xls/richstring.cxx 
b/main/oox/source/xls/richstring.cxx
index 8c77746477..e0843350d4 100644
--- a/main/oox/source/xls/richstring.cxx
+++ b/main/oox/source/xls/richstring.cxx
@@ -19,8 +19,6 @@
  * 
  */
 
-
-
 #include "oox/xls/richstring.hxx"
 
 #include 
@@ -59,7 +57,8 @@ inline bool lclNeedsRichTextFormat( const Font* pFont )
 
 RichStringPortion::RichStringPortion( const WorkbookHelper& rHelper ) :
 WorkbookHelper( rHelper ),
-mnFontId( -1 )
+mnFontId( -1 ),
+mbConverted( false )
 {
 }
 
@@ -89,6 +88,9 @@ void RichStringPortion::finalizeImport()
 
 void RichStringPortion::convert( const Reference< XText >& rxText, const Font* 
pFont, bool bReplace )
 {
+if ( mbConverted )
+return;
+
 Reference< XTextRange > xRange;
 if( bReplace )
 xRange.set( rxText, UNO_QUERY );
@@ -113,6 +115,8 @@ void RichStringPortion::convert( const Reference< XText >& 
rxText, const Font* p
 pFont->writeToPropertySet( aPropSet, FONT_PROPTYPE_TEXT );
 }
 }
+
+mbConverted = true;
 }
 
 // 



[openoffice] branch trunk updated: With our "-std=gnu++98", building with Clang and internal Boost breaks in several places, because Clang doesn't expose the tuple type but Boost expects it.

2023-01-20 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 8ef8ad0624 With our "-std=gnu++98", building with Clang and internal 
Boost breaks in several places, because Clang doesn't expose the tuple type but 
Boost expects it.
8ef8ad0624 is described below

commit 8ef8ad062493ab86aa92fbefc05347f372e8d25c
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 20 20:33:01 2023 +0200

With our "-std=gnu++98", building with Clang and internal Boost breaks in
several places, because Clang doesn't expose the tuple type but Boost
expects it.

Define BOOST_NO_CXX11_HDR_TUPLE when using Clang and internal Boost so
that Boost uses its own tuple type.

Patch by: me
---
 main/boost/boost-clang.patch | 9 +
 main/boost/makefile.mk   | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/main/boost/boost-clang.patch b/main/boost/boost-clang.patch
new file mode 100644
index 00..1582a9e73f
--- /dev/null
+++ b/main/boost/boost-clang.patch
@@ -0,0 +1,9 @@
+--- misc/build/boost_1_55_0/boost/config/user.hpp  2023-01-20 
06:52:20.006784000 +0200
 misc/build/boost_1_55_0/boost/config/user.hpp  2023-01-20 
06:54:54.816087000 +0200
+@@ -122,3 +122,6 @@
+  
+ 
+ 
++#if defined(__clang__)
++#define BOOST_NO_CXX11_HDR_TUPLE
++#endif
diff --git a/main/boost/makefile.mk b/main/boost/makefile.mk
index ae402c982a..c6cd36e498 100644
--- a/main/boost/makefile.mk
+++ b/main/boost/makefile.mk
@@ -46,7 +46,7 @@ all:
 
 TARFILE_NAME=boost_1_55_0
 TARFILE_MD5=d6eef4b4cacb2183f2bf265a5a03a354
-PATCH_FILES= $(TARFILE_NAME).patch
+PATCH_FILES= $(TARFILE_NAME).patch boost-clang.patch
 .IF "$(GUI)"=="OS2"
 PATCH_FILES+=boost-os2.patch
 .ENDIF



[openoffice] branch trunk updated: Allow us to build against the C++14 standard, while not breaking compatibility with C++98.

2023-01-20 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new a72d41dcd0 Allow us to build against the C++14 standard, while not 
breaking compatibility with C++98.
a72d41dcd0 is described below

commit a72d41dcd002e8c9b3d75696f0625302690e2d65
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 20 05:27:59 2023 +0200

Allow us to build against the C++14 standard, while
not breaking compatibility with C++98.

Clang 13 and 15 on FreeBSD can successfully compile OpenOffice
when "-std=c++14" is set in gbuild and dmake, and Clang 15 can
still compile it with these changes and "-std=gnu++98".

Most of the changes involved fixing bad code, eg. NULL being
implicitly converted to sal_False, NULL being converted to typed
pointers using reinterpet_cast instead of static_cast, and integer
conversions to shorter integers.

Note that this does not change the currently targeted C++
standard on Linux and FreeBSD, which remains gnu++98.

Patch by: me
---
 .../source/cairo/cairo_spritecanvashelper.cxx  |  3 +-
 main/canvas/source/vcl/spritecanvashelper.cxx  |  7 ++-
 main/dbaccess/source/core/api/RowSet.cxx   | 64 +++---
 main/dbaccess/source/core/api/TableDeco.cxx|  2 +-
 main/dbaccess/source/ui/browser/sbagrid.cxx|  2 +-
 .../source/ui/tabledesign/TableController.cxx  |  3 +-
 main/forms/source/component/ComboBox.cxx   |  2 +-
 main/forms/source/component/ListBox.cxx|  6 +-
 main/forms/source/inc/property.hxx |  4 +-
 .../source/core/api/ReportDefinition.cxx   |  3 +-
 .../source/ui/report/ReportController.cxx  |  2 +-
 main/sc/source/ui/app/scdll.cxx|  2 +-
 main/sc/source/ui/pagedlg/scuitphfedit.cxx |  2 +-
 main/sd/source/ui/app/sddll2.cxx   |  2 +-
 .../source/engine/activities/activitybase.hxx  |  2 +-
 .../source/engine/rehearsetimingsactivity.cxx  |  3 +-
 .../slideshow/source/engine/shapes/appletshape.cxx |  6 +-
 main/slideshow/source/engine/shapes/drawshape.cxx  |  4 +-
 main/slideshow/source/engine/shapes/mediashape.cxx |  3 +-
 main/slideshow/source/engine/unoviewcontainer.cxx  |  3 +-
 main/sw/source/ui/app/swmodule.cxx |  4 +-
 main/vcl/unx/gtk/a11y/atkutil.cxx  |  4 +-
 main/vcl/unx/gtk/a11y/atkwindow.cxx|  4 +-
 23 files changed, 73 insertions(+), 64 deletions(-)

diff --git a/main/canvas/source/cairo/cairo_spritecanvashelper.cxx 
b/main/canvas/source/cairo/cairo_spritecanvashelper.cxx
index 63b7f775fb..573263b445 100644
--- a/main/canvas/source/cairo/cairo_spritecanvashelper.cxx
+++ b/main/canvas/source/cairo/cairo_spritecanvashelper.cxx
@@ -390,11 +390,12 @@ namespace cairocanvas
 ::basegfx::computeSetDifference( aUncoveredAreas,
  rUpdateArea.maTotalBounds,
  ::basegfx::B2DRange( rDestRect ) );
+SurfaceSharedPtr pBufferSurface = 
mpOwningSpriteCanvas->getBufferSurface();
 ::std::for_each( aUncoveredAreas.begin(),
  aUncoveredAreas.end(),
  ::boost::bind( &repaintBackground,
 boost::cref(pCompositingCairo),
-
boost::cref(mpOwningSpriteCanvas->getBufferSurface()),
+boost::cref(pBufferSurface),
 _1 ) );
 
 cairo_rectangle( pWindowCairo.get(), 0, 0, rSize.getX(), rSize.getY() 
);
diff --git a/main/canvas/source/vcl/spritecanvashelper.cxx 
b/main/canvas/source/vcl/spritecanvashelper.cxx
index a444e5bea7..3b1b75d158 100644
--- a/main/canvas/source/vcl/spritecanvashelper.cxx
+++ b/main/canvas/source/vcl/spritecanvashelper.cxx
@@ -463,10 +463,11 @@ namespace vclcanvas
 // clip here, since we're only repainting _parts_ of the
 // sprite
 rOutDev.Push( PUSH_CLIPREGION );
+const Sprite::Reference& rSprite = aFirst->second.getSprite();
 ::std::for_each( aUnscrollableAreas.begin(),
  aUnscrollableAreas.end(),
  ::boost::bind( &opaqueUpdateSpriteArea,
-
::boost::cref(aFirst->second.getSprite()),
+::boost::cref(rSprite),
 ::boost::ref(rOutDev),
 _1 ) );
 rOutDev.Pop();
@@ -584,12 +585,12 @@ namespace vclcanvas
 
 // repaint all affected sprites on top of background into
 // VDev.
+

[openoffice] branch trunk updated: Split up the checks for whether Cygwin's awk, tar, and gunzip are symlinks, so we can tell which of them is actually broken.

2023-01-19 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 6a118d531f Split up the checks for whether Cygwin's awk, tar, and 
gunzip are symlinks, so we can tell which of them is actually broken.
6a118d531f is described below

commit 6a118d531fc6c4cb8fe9ca6c16b0412adc9a9636
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 20 06:14:25 2023 +0200

Split up the checks for whether Cygwin's awk, tar, and gunzip are symlinks,
so we can tell which of them is actually broken.

Patch by: me
---
 main/configure.ac | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/main/configure.ac b/main/configure.ac
index 62cd7932f4..1b9c9c09e2 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -1644,8 +1644,18 @@ if test $_os = "WINNT"; then
dnl ===
dnl As long as awk instead of $AWK is used somewhere in the sources,
dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin.
-  if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` 
; then
- AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink!
+  if test -L $AWK -o -L `which awk` ; then
+ AC_MSG_ERROR([$AWK / awk is a cygwin symlink!
+Native Windows programs cannot use cygwin symlinks. Remove the symbolic
+link, and copy the program to the name of the link.])
+  fi
+  if test -L `which tar` ; then
+ AC_MSG_ERROR([tar is a cygwin symlink!
+Native Windows programs cannot use cygwin symlinks. Remove the symbolic
+link, and copy the program to the name of the link.])
+  fi
+  if test -L `which gunzip` ; then
+ AC_MSG_ERROR([gunzip is a cygwin symlink!
 Native Windows programs cannot use cygwin symlinks. Remove the symbolic
 link, and copy the program to the name of the link.])
   fi



[openoffice] branch trunk updated: Finish my previous commit, add a missing function to check hamcrest.

2023-01-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new f5cdefa498 Finish my previous commit, add a missing function to check 
hamcrest.
f5cdefa498 is described below

commit f5cdefa4988c79d1ddfbf62cd09e58e597a05105
Author: Damjan Jovanovic 
AuthorDate: Tue Jan 17 20:57:43 2023 +0200

Finish my previous commit, add a missing function to check hamcrest.

Patch by: me
---
 test/build.xml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/build.xml b/test/build.xml
index 9f73172286..f59027f629 100644
--- a/test/build.xml
+++ b/test/build.xml
@@ -52,13 +52,16 @@


 
+   
+   
+
+   






-   


 



[openoffice] branch trunk updated: When junit is absent, download only junit, and when hamcrest is absent, download only hamcrest.

2023-01-17 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new e2eb708dd6 When junit is absent, download only junit, and when 
hamcrest is absent, download only hamcrest.
e2eb708dd6 is described below

commit e2eb708dd61134c3ad4e7e55318ac802bf809846
Author: Damjan Jovanovic 
AuthorDate: Sun Jan 15 18:22:35 2023 +0200

When junit is absent, download only junit, and when hamcrest is absent,
download only hamcrest.

Patch by: me
---
 test/build.xml | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/test/build.xml b/test/build.xml
index ece910b287..9f73172286 100644
--- a/test/build.xml
+++ b/test/build.xml
@@ -62,12 +62,16 @@


 
-   
+   


+   
+
+   
+   


-   
+






[openoffice] branch trunk updated: rtl's round function is in the namespace ::rtl::math.

2023-01-14 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 01172de606 rtl's round function is in the namespace ::rtl::math.
01172de606 is described below

commit 01172de606a5490b5897365ac5c6e4c9140390bb
Author: Damjan Jovanovic 
AuthorDate: Sat Jan 14 16:55:54 2023 +0200

rtl's round function is in the namespace ::rtl::math.

Patch by: me
---
 main/oox/source/helper/datetimehelper.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/oox/source/helper/datetimehelper.cxx 
b/main/oox/source/helper/datetimehelper.cxx
index e220a03540..1fcdd8074c 100644
--- a/main/oox/source/helper/datetimehelper.cxx
+++ b/main/oox/source/helper/datetimehelper.cxx
@@ -46,7 +46,7 @@ bool parseISO8601DateTime( OUString &aValue, DateTime 
&dateTime )
 dateTime.Minutes = static_cast< sal_uInt16 >( aValue.copy( 14, 2 
).toInt32() );
 double seconds = aValue.copy( 17 ).toDouble();
 dateTime.Seconds = static_cast< sal_uInt16 >( floor( seconds ) );
-dateTime.HundredthSeconds = static_cast< sal_uInt16 >( round ( 100 * ( 
seconds - floor( seconds ) ) ) );
+dateTime.HundredthSeconds = static_cast< sal_uInt16 >( 
::rtl::math::round ( 100 * ( seconds - floor( seconds ) ) ) );
 }
 return bValid;
 }



[openoffice] branch trunk updated: UnoApp.close() was issuing XDesktop.terminate(), and then starting a timer that would kill OpenOffice 2 second seconds, while also killing it in the finally block, a

2023-01-13 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new ffd83a4cb7 UnoApp.close() was issuing XDesktop.terminate(), and then 
starting a timer that would kill OpenOffice 2 second seconds, while also 
killing it in the finally block, and not waiting for it to exit. This sometimes 
caused tests to start OpenOffice before the previous instance fully finished, 
especially in the fvt.uno.sc.formula.TestFormulaDocs test which starts up 
OpenOffice for each document, and then the new instance wouldn't start, causing 
test failures.
ffd83a4cb7 is described below

commit ffd83a4cb704a94fbafd9acb46745118915900f2
Author: Damjan Jovanovic 
AuthorDate: Sat Jan 14 08:36:47 2023 +0200

UnoApp.close() was issuing XDesktop.terminate(), and then starting a timer
that would kill OpenOffice 2 second seconds, while also killing it in the
finally block, and not waiting for it to exit. This sometimes caused tests
to start OpenOffice before the previous instance fully finished,
especially in the fvt.uno.sc.formula.TestFormulaDocs test which starts up
OpenOffice for each document, and then the new instance wouldn't start,
causing test failures.

Rather, after issuing XDesktop.terminate(), wait up to 5 seconds for
OpenOffice to exit. Only if it's still running, kill it. This is similar
to what VclApp already does.

Patch by: me
---
 .../source/org/openoffice/test/uno/UnoApp.java | 22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/test/testuno/source/org/openoffice/test/uno/UnoApp.java 
b/test/testuno/source/org/openoffice/test/uno/UnoApp.java
index 261f3f5505..e089b2e691 100644
--- a/test/testuno/source/org/openoffice/test/uno/UnoApp.java
+++ b/test/testuno/source/org/openoffice/test/uno/UnoApp.java
@@ -23,7 +23,6 @@ package org.openoffice.test.uno;
 
 import java.io.File;
 import java.util.Timer;
-import java.util.TimerTask;
 
 import org.openoffice.test.OpenOffice;
 import org.openoffice.test.common.FileUtil;
@@ -119,29 +118,26 @@ public class UnoApp {
 
private Timer timer = new Timer(true);
 
-   private TimerTask timerTask = null;
-
/**
 * Shut down the connection and close OpenOffice
 */
public void close() {
try {
-   timerTask = new TimerTask() {
-   public void run() {
-   if (openOffice != null)
-   openOffice.kill();
-   }
-   };
-   timer.schedule(timerTask, 1000 * 2);
desktop.terminate();
+   if (openOffice != null) {
+   // Wait 5 seconds for exit, checking every 500 
ms:
+   for (int i = 0; i < 10; i++) {
+   if (!openOffice.isRunning())
+   break;
+   Thread.sleep(500);
+   }
+   }
} catch (Exception e) {
// e.printStackTrace(); // for debugging
} finally {
-   if (openOffice != null)
+   if (openOffice != null && openOffice.isRunning())
openOffice.kill();
 
-   timerTask.cancel();
-   timerTask = null;
componentContext = null;
componentFactory = null;
serviceFactory = null;



[openoffice] branch trunk updated: When importing SpreadsheetML ss:DateTime, import the entire value, not only the first 19 characters.

2023-01-13 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 195282cf3d When importing SpreadsheetML ss:DateTime, import the entire 
value, not only the first 19 characters.
195282cf3d is described below

commit 195282cf3d8bfaa9e1cec43b093251d9df87f4ba
Author: Damjan Jovanovic 
AuthorDate: Sat Jan 14 06:58:10 2023 +0200

When importing SpreadsheetML ss:DateTime, import the entire value, not only 
the
first 19 characters.

Add a test file for this bug.

Fixes: #128554 - Office 2003 SpreadsheetML: fractional seconds are silently
   ignored during import
Patch by: me
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |   2 +-
 .../sc/fvt/Bug128554FractionalSecondsIgnored.xml   | 108 +
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java |   3 +-
 3 files changed, 111 insertions(+), 2 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index d09f67da24..a11a9a816c 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6868,7 +6868,7 @@

date

-   
+   



diff --git a/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml 
b/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
new file mode 100644
index 00..573cc4d284
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug128554FractionalSecondsIgnored.xml
@@ -0,0 +1,108 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#00
+  
+  
+4
+#c0c0c0
+  
+  
+5
+#ff
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+  <NumberFormat ss:Format="Currency"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Horizontal="Center" ss:Rotate="90"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Vertical="Bottom"/>
+  <Font ss:Color="#00" ss:FontName="Calibri" ss:Size="11"/>
+
+
+
+
+
+
+
+
+
+  <Font ss:Bold="1" ss:Color="#00" ss:FontName="Calibri" ss:Size="11"/>
+
+
+  <NumberFormat ss:Format="General Date"/>
+
+  
+  
+
+  
+  
+  
+  
+  
+  
+  
+
+  TestID
+
+
+  Date/Time
+
+
+  In numeric form
+
+
+  Should be
+
+
+  TestOK
+
+  
+  
+
+  Time
+
+
+  2023-01-14T04:05:06.78000
+
+
+  44940.1702173611
+
+
+  44940.1702173611
+
+
+  1
+
+  
+
+
+  
+
diff --git a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java 
b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
index 7e65a80569..56e2510900 100644
--- a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
+++ b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
@@ -75,7 +75,8 @@ public class TestFormulaDocs {
{"uno/sc/fvt/Basic Line as variable and Line 
Input.ods", "Basic Line as variable and Line Input Test"},

{"uno/sc/fvt/comment-in-single-line-if-then-else.ods", "Basic comment after 
single line if statement Test"},

[openoffice] branch trunk updated: Dates and times are loaded wrongly from SpreadsheetML files, because the filter loads only the date or time portion of the ss:DateTime based on the cell's style.

2023-01-13 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 0db4a4f44d Dates and times are loaded wrongly from SpreadsheetML 
files, because the filter loads only the date or time portion of the 
ss:DateTime based on the cell's style.
0db4a4f44d is described below

commit 0db4a4f44da1c0fb06154ba61c960a18427e751b
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 13 18:27:50 2023 +0200

Dates and times are loaded wrongly from SpreadsheetML files, because the 
filter
loads only the date or time portion of the ss:DateTime based on the cell's
style.

Rather always load the ss:DateTime as our ODF office:date-value in the
XMLSchema-2 dateTime format, with both its date and time part, and then 
rely on
formatting to display only the date or time as desired.

Fixes: #82849 - SpreadsheetML ss:DateTime cell value is loaded as either 
only
a date or a time

Patch by: Philip J. Turmel 
Reviewed by: me
---
 .../xslt/import/spreadsheetml/spreadsheetml2ooo.xsl| 18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 6b1531709f..d09f67da24 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6866,20 +6866,10 @@



-   
-   
-   date
-   
-   
-   
-   
-   
-   time
-   
-   
-   
-   
-   
+   date
+   
+   
+   


boolean



[openoffice] branch trunk updated: Use our own round() function declared in rtl's math.hxx, instead of the system round() function only available in C99 compilers.

2023-01-12 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 669616fc48 Use our own round() function declared in rtl's math.hxx, 
instead of the system round() function only available in C99 compilers.
669616fc48 is described below

commit 669616fc485e35d4547ab101a0da01ce61322f47
Author: Damjan Jovanovic 
AuthorDate: Thu Jan 12 17:25:21 2023 +0200

Use our own round() function declared in rtl's math.hxx, instead of the 
system
round() function only available in C99 compilers.

Patch by: me
---
 main/oox/source/helper/datetimehelper.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/oox/source/helper/datetimehelper.cxx 
b/main/oox/source/helper/datetimehelper.cxx
index f36c724062..e220a03540 100644
--- a/main/oox/source/helper/datetimehelper.cxx
+++ b/main/oox/source/helper/datetimehelper.cxx
@@ -21,7 +21,7 @@
 
 #include "oox/helper/datetimehelper.hxx"
 
-#include 
+#include 
 
 namespace oox {
 



[openoffice] branch trunk updated: Windows is missing the round() function, try include .

2023-01-11 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new a2fc620dde Windows is missing the round() function, try include 
.
a2fc620dde is described below

commit a2fc620dde92e6d35133f9ad89c5bd17ae686d7b
Author: Damjan Jovanovic 
AuthorDate: Thu Jan 12 03:27:35 2023 +0200

Windows is missing the round() function, try include .

Patch by: me
---
 main/oox/source/helper/datetimehelper.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/main/oox/source/helper/datetimehelper.cxx 
b/main/oox/source/helper/datetimehelper.cxx
index cf44aaa24a..f36c724062 100644
--- a/main/oox/source/helper/datetimehelper.cxx
+++ b/main/oox/source/helper/datetimehelper.cxx
@@ -21,6 +21,8 @@
 
 #include "oox/helper/datetimehelper.hxx"
 
+#include 
+
 namespace oox {
 
 // 



[openoffice] branch trunk updated: In ODF (19.679.2 of ODF 1.3), the element's table:number-columns-repeated attribute has a default value of 1, meaning the cell spans the c

2023-01-11 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new a896732bfc In ODF (19.679.2 of ODF 1.3), the 
 element's table:number-columns-repeated attribute 
has a default value of 1, meaning the cell spans the cell to its right. However 
when the XSLT import filter converts from SpreadsheetML's ss:MergeAcross to 
ODF's table:number-columns-repeated, it always inserts a 
 element, and then adds the 
table:number-columns-repeated attribute only if it is greater than 1. This 
breaks when ss:Merge [...]
a896732bfc is described below

commit a896732bfcd282115c06407a2f1da77694fa8d19
Author: Damjan Jovanovic 
AuthorDate: Thu Jan 12 03:02:18 2023 +0200

In ODF (19.679.2 of ODF 1.3), the  element's
table:number-columns-repeated attribute has a default value of 1,
meaning the cell spans the cell to its right. However when the XSLT import
filter converts from SpreadsheetML's ss:MergeAcross to ODF's
table:number-columns-repeated, it always inserts a 

element, and then adds the table:number-columns-repeated attribute only if
it is greater than 1. This breaks when ss:MergeAcross="0", because ODF's
defaulting to 1 ends up occupying an extra empty cell to the right when it
shouldn't.

Fix this by only inserting the  when
ss:MergeAcross > 0.

Add a test document to prove this.

Fixes #100989 - SpreadsheetML: cell with ss:MergeAcross="0" gets an extra 
empty cell to the right
Patch by: me
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |  2 +-
 .../Bug100989MergeAcross0AddsExtraEmptyCell.xml| 79 ++
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java |  3 +-
 3 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index 33b6317c2b..6b1531709f 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -6652,7 +6652,7 @@



-   
+   



diff --git 
a/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml 
b/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
new file mode 100644
index 00..2149ce52c8
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
@@ -0,0 +1,79 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#c0c0c0
+  
+  
+4
+#ff
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+  <NumberFormat ss:Format="Currency"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+  <Alignment ss:Horizontal="Center" ss:Rotate="90"/>
+  <Font ss:Bold="1" ss:Italic="1" ss:Size="16"/>
+
+
+
+
+
+
+  
+  
+
+  
+  
+  
+  
+
+  TestID
+
+
+  TestOK
+
+
+  
+  
+
+  A cell with ss:MergeAcross=”0”
+doesn't creates an empty column to the right
+
+
+  0
+
+
+  E2 with ss:MergeAcross="0"
+
+
+  F2
+
+  
+
+
+  
+
diff --git a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java 
b/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
index c8d2b7ad0e..7e65a80569 100644
--- a/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.

[openoffice] branch trunk updated: Our XSLT-based MS Office 2003 SpreadsheetML format import filter, when doing conversion from R1C1 style column references to our A1 style references, had a bug where

2023-01-11 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 577fe17932 Our XSLT-based MS Office 2003 SpreadsheetML format import 
filter, when doing conversion from R1C1 style column references to our A1 style 
references, had a bug where it was treating the column value as 0-based, and 
dividing by 26 to find the 1st letter and taking the remainder when divided by 
26 for the second letter. Those numbers are then each converted to a letter [0 
= nothing, 1 = "A", 2 = "B", ..., 26 = "Z"].
577fe17932 is described below

commit 577fe17932e0dec38662067d1a86e7fd6ae525b6
Author: Damjan Jovanovic 
AuthorDate: Wed Jan 11 19:47:12 2023 +0200

Our XSLT-based MS Office 2003 SpreadsheetML format import filter, when doing
conversion from R1C1 style column references to our A1 style references, 
had a
bug where it was treating the column value as 0-based, and dividing by 26 to
find the 1st letter and taking the remainder when divided by 26 for the 
second
letter. Those numbers are then each converted to a letter [0 = nothing,
1 = "A", 2 = "B", ..., 26 = "Z"].

However since R1C1 is 1-based, and not 0-based, this breaks for column 
numbers
which are multiples of 26, as 26 mod 26 = 0, so the least significant digit 
is
converted to nothing while the most significant digit gets incremented too
early.

Fix this by converting the column number to 0-based by subtracting 1 before
calculation, then adding 1 to the least significant digit afterwards.

Also the fact we have 2 letters limited us to a maximum of 26^2 = 676 
columns,
after which column references would wrap around. Fix this too, by adding a 
3rd
letter, which lets us address a maximum of 17576 columns.

Add a sample file to our unit tests.

Found by: alex dot plantema at xs4all dot nl
Patch by: me
---
 .../import/spreadsheetml/spreadsheetml2ooo.xsl |  25 -
 .../data/uno/sc/fvt/Bug81233ColumnZReference.xml   | 121 +
 .../source/fvt/uno/sc/formula/TestFormulaDocs.java |   3 +-
 3 files changed, 144 insertions(+), 5 deletions(-)

diff --git a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl 
b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
index e6e19d0900..33b6317c2b 100644
--- a/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
+++ b/main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl
@@ -8225,11 +8225,23 @@



+   
+   
+   

-   
+   
+   
+   
+   


-   
+   
+   
+   
+   
+   
+   
+   



@@ -8241,13 +8253,18 @@



+   
+   
+   
+   
+   



-   
+   


-   
+   



diff --git a/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml 
b/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml
new file mode 100644
index 00..f37f9da884
--- /dev/null
+++ b/test/testuno/data/uno/sc/fvt/Bug81233ColumnZReference.xml
@@ -0,0 +1,121 @@
+
+
+http://www.w3.org/TR/REC-html40"; 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"; 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x="urn:schemas-microsoft-com:office:excel">
+  
+
+  
+3
+#c0c0c0
+  
+
+  
+  
+9000
+13860
+240
+75
+False
+False
+  
+  
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/>
+
+
+  <Alignment ss:Horizontal="Center"/>
+  <Font ss:Bold="1" 

[openoffice] branch trunk updated: Allow the XLSX Relationship "Target" attribute in _rels/.rels to have superfluous slashes.

2023-01-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 3ff2b12a82 Allow the XLSX Relationship "Target" attribute in 
_rels/.rels to have superfluous slashes.
3ff2b12a82 is described below

commit 3ff2b12a82734e8b46c6f7693a7e1b8eef8ada96
Author: Damjan Jovanovic 
AuthorDate: Sat Jan 7 20:25:36 2023 +0200

Allow the XLSX Relationship "Target" attribute in _rels/.rels to have 
superfluous slashes.

Fixes: #117672 - Opening XLSX fails when the Relationship "Target" 
attribute in _rels/.rels
   has superfluous slashes
Patch by: me
---
 main/oox/inc/oox/core/relationshandler.hxx |  4 
 main/oox/source/core/filterdetect.cxx  |  3 ++-
 main/oox/source/core/relationshandler.cxx  | 26 +-
 3 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/main/oox/inc/oox/core/relationshandler.hxx 
b/main/oox/inc/oox/core/relationshandler.hxx
index 6affee9858..8ceee13276 100644
--- a/main/oox/inc/oox/core/relationshandler.hxx
+++ b/main/oox/inc/oox/core/relationshandler.hxx
@@ -44,6 +44,10 @@ public:
 const ::com::sun::star::uno::Reference< 
::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
 throw (::com::sun::star::xml::sax::SAXException, 
::com::sun::star::uno::RuntimeException);
 
+static ::rtl::OUString
+removeDuplicateSlashes(
+const ::rtl::OUString &path );
+
 private:
 RelationsRefmxRelations;
 };
diff --git a/main/oox/source/core/filterdetect.cxx 
b/main/oox/source/core/filterdetect.cxx
index 53b4e74461..f36aea307a 100644
--- a/main/oox/source/core/filterdetect.cxx
+++ b/main/oox/source/core/filterdetect.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include "oox/core/fastparser.hxx"
+#include "oox/core/relationshandler.hxx"
 #include "oox/helper/attributelist.hxx"
 #include "oox/helper/binaryinputstream.hxx"
 #include "oox/helper/binaryoutputstream.hxx"
@@ -158,7 +159,7 @@ void FilterDetectDocHandler::parseRelationship( const 
AttributeList& rAttribs )
 {
 OUString aType = rAttribs.getString( XML_Type, OUString() );
 if( aType.equalsAscii( 
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
 ) )
-maTargetPath = OUString( sal_Unicode( '/' ) ) + rAttribs.getString( 
XML_Target, OUString() );
+maTargetPath = RelationsFragment::removeDuplicateSlashes( OUString( 
sal_Unicode( '/' ) ) + rAttribs.getString( XML_Target, OUString() ) );
 }
 
 OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& 
rContentType ) const
diff --git a/main/oox/source/core/relationshandler.cxx 
b/main/oox/source/core/relationshandler.cxx
index 51a0afc12f..a8566b6f28 100644
--- a/main/oox/source/core/relationshandler.cxx
+++ b/main/oox/source/core/relationshandler.cxx
@@ -79,7 +79,7 @@ Reference< XFastContextHandler > 
RelationsFragment::createFastChildContext(
 Relation aRelation;
 aRelation.maId = aAttribs.getString( XML_Id, OUString() );
 aRelation.maType   = aAttribs.getString( XML_Type, OUString() );
-aRelation.maTarget = aAttribs.getString( XML_Target, OUString() );
+aRelation.maTarget = removeDuplicateSlashes( aAttribs.getString( 
XML_Target, OUString() ) );
 if( (aRelation.maId.getLength() > 0) && 
(aRelation.maType.getLength() > 0) && (aRelation.maTarget.getLength() > 0) )
 {
 sal_Int32 nTargetMode = aAttribs.getToken( XML_TargetMode, 
XML_Internal );
@@ -100,6 +100,30 @@ Reference< XFastContextHandler > 
RelationsFragment::createFastChildContext(
 return xRet;
 }
 
+OUString RelationsFragment::removeDuplicateSlashes( const OUString &path )
+{
+rtl::OUStringBuffer buffer;
+bool hadSlash = false;
+for ( sal_Int32 i = 0; i < path.getLength(); i++ )
+{
+sal_Unicode ch = path[i];
+if ( ch == '/' )
+{
+if ( !hadSlash )
+{
+hadSlash = true;
+buffer.append( sal_Unicode( '/' ) );
+}
+}
+else
+{
+hadSlash = false;
+buffer.append( ch );
+}
+}
+return buffer.makeStringAndClear();
+}
+
 // 
 
 } // namespace core



[openoffice] branch trunk updated: Add support for the new XLSX date type in cells, denoted with attribute t="d", used by Excel 2010.

2023-01-08 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 9621e552cd Add support for the new XLSX date type in cells, denoted 
with attribute t="d", used by Excel 2010.
9621e552cd is described below

commit 9621e552cdf723df9a998b3af4218407d6c66e37
Author: Damjan Jovanovic 
AuthorDate: Sun Jan 8 10:24:33 2023 +0200

Add support for the new XLSX date type in cells, denoted with attribute 
t="d",
used by Excel 2010.

Also refactor the code so the datetime attribute in pivot tables is also 
parsed
by the same function, and increase the parsing accuracy to the maximum 
(HundredthSeconds,
instead of just Seconds).

Fixes: #127034 - xlsx file: imported DateTime cells are empty (Excel 2010 
compatible)
Patch by: me
---
 main/oox/Library_oox.mk|  1 +
 main/oox/inc/oox/helper/datetimehelper.hxx | 34 +++
 main/oox/source/helper/attributelist.cxx   | 13 ++-
 main/oox/source/helper/datetimehelper.cxx  | 54 ++
 main/oox/source/xls/sheetdatacontext.cxx   | 12 +++
 main/oox/source/xls/unitconverter.cxx  |  2 +-
 6 files changed, 104 insertions(+), 12 deletions(-)

diff --git a/main/oox/Library_oox.mk b/main/oox/Library_oox.mk
index 7bd2cf91f3..7ebe4358ca 100644
--- a/main/oox/Library_oox.mk
+++ b/main/oox/Library_oox.mk
@@ -183,6 +183,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
oox/source/helper/binaryoutputstream \
oox/source/helper/binarystreambase \
oox/source/helper/containerhelper \
+   oox/source/helper/datetimehelper \
oox/source/helper/graphichelper \
oox/source/helper/modelobjecthelper \
oox/source/helper/progressbar \
diff --git a/main/oox/inc/oox/helper/datetimehelper.hxx 
b/main/oox/inc/oox/helper/datetimehelper.hxx
new file mode 100644
index 00..dda5a1181d
--- /dev/null
+++ b/main/oox/inc/oox/helper/datetimehelper.hxx
@@ -0,0 +1,34 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+#ifndef OOX_HELPER_DATETIMEHELPER_HXX
+#define OOX_HELPER_DATETIMEHELPER_HXX
+
+#include 
+#include "oox/helper/helper.hxx"
+
+namespace oox {
+
+bool parseISO8601DateTime( ::rtl::OUString &aValue, 
::com::sun::star::util::DateTime &dateTime );
+
+} // namespace oox
+
+#endif /* OOX_HELPER_DATETIMEHELPER_HXX */
diff --git a/main/oox/source/helper/attributelist.cxx 
b/main/oox/source/helper/attributelist.cxx
index 30cf8babb1..686aeada05 100644
--- a/main/oox/source/helper/attributelist.cxx
+++ b/main/oox/source/helper/attributelist.cxx
@@ -22,6 +22,7 @@
 
 
 #include "oox/helper/attributelist.hxx"
+#include "oox/helper/datetimehelper.hxx"
 
 #include 
 #include 
@@ -233,17 +234,7 @@ OptValue< DateTime > AttributeList::getDateTime( sal_Int32 
nAttrToken ) const
 {
 OUString aValue = mxAttribs->getOptionalValue( nAttrToken );
 DateTime aDateTime;
-bool bValid = (aValue.getLength() == 19) && (aValue[ 4 ] == '-') && 
(aValue[ 7 ] == '-') &&
-(aValue[ 10 ] == 'T') && (aValue[ 13 ] == ':') && (aValue[ 16 ] == 
':');
-if( bValid )
-{
-aDateTime.Year= static_cast< sal_uInt16 >( aValue.copy( 0, 4 
).toInt32() );
-aDateTime.Month   = static_cast< sal_uInt16 >( aValue.copy( 5, 2 
).toInt32() );
-aDateTime.Day = static_cast< sal_uInt16 >( aValue.copy( 8, 2 
).toInt32() );
-aDateTime.Hours   = static_cast< sal_uInt16 >( aValue.copy( 11, 2 
).toInt32() );
-aDateTime.Minutes = static_cast< sal_uInt16 >( aValue.copy( 14, 2 
).toInt32() );
-aDateTime.Seconds = static_cast< sal_uInt16 >( aValue.copy( 17, 2 
).toInt32() );
-}
+bool bValid = parseISO8601DateTime( aValue, aDateTime

[openoffice] branch trunk updated: When rows and cells lack the "r" attribute used to specify their location, use the location of the most recently added row or cell + 1.

2023-01-06 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 9c741048d2 When rows and cells lack the "r" attribute used to specify 
their location, use the location of the most recently added row or cell + 1.
9c741048d2 is described below

commit 9c741048d2a06db94d9507ba978d3aecd557e7e9
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 6 19:16:14 2023 +0200

When rows and cells lack the "r" attribute used to specify their location,
use the location of the most recently added row or cell + 1.

Fixes: #127672 - Xlsx with omitted cell references opens with empty cells
Patch by: me
---
 main/oox/inc/oox/xls/sheetdatacontext.hxx |  2 ++
 main/oox/source/xls/sheetdatacontext.cxx  | 22 +-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/main/oox/inc/oox/xls/sheetdatacontext.hxx 
b/main/oox/inc/oox/xls/sheetdatacontext.hxx
index c4d14b47c0..e2fc812551 100644
--- a/main/oox/inc/oox/xls/sheetdatacontext.hxx
+++ b/main/oox/inc/oox/xls/sheetdatacontext.hxx
@@ -44,6 +44,8 @@ struct SheetDataContextBase
 CellModel   maCellData; /// Position, contents, formatting 
of current imported cell.
 CellFormulaModelmaFmlaData; /// Settings for a cell formula.
 sal_Int16   mnSheet;/// Index of the current sheet.
+::com::sun::star::table::CellAddress
+maLastCellAddress;  /// The address of the most 
recently populated cell.
 
 explicitSheetDataContextBase( const WorksheetHelper& rHelper );
 virtual ~SheetDataContextBase();
diff --git a/main/oox/source/xls/sheetdatacontext.cxx 
b/main/oox/source/xls/sheetdatacontext.cxx
index 214f1c479a..f986992fd2 100644
--- a/main/oox/source/xls/sheetdatacontext.cxx
+++ b/main/oox/source/xls/sheetdatacontext.cxx
@@ -103,6 +103,8 @@ SheetDataContextBase::SheetDataContextBase( const 
WorksheetHelper& rHelper ) :
 mrSheetData( rHelper.getSheetData() ),
 mnSheet( rHelper.getSheetIndex() )
 {
+maLastCellAddress.Sheet = rHelper.getSheetIndex();
+maLastCellAddress.Row = SAL_MAX_UINT32; // wraps around to 0 when 
incremented
 }
 
 SheetDataContextBase::~SheetDataContextBase()
@@ -284,6 +286,11 @@ void SheetDataContext::importRow( const AttributeList& 
rAttribs )
 {
 RowModel aModel;
 aModel.mnRow  = rAttribs.getInteger( XML_r, -1 );
+if ( aModel.mnRow == -1 )
+aModel.mnRow = ++maLastCellAddress.Row;
+else
+maLastCellAddress.Row = aModel.mnRow - 1;
+maLastCellAddress.Column = SAL_MAX_UINT32; // wraps around to 0 when 
incremented
 aModel.mfHeight   = rAttribs.getDouble( XML_ht, -1.0 );
 aModel.mnXfId = rAttribs.getInteger( XML_s, -1 );
 aModel.mnLevel= rAttribs.getInteger( XML_outlineLevel, 0 );
@@ -317,9 +324,22 @@ void SheetDataContext::importRow( const AttributeList& 
rAttribs )
 
 bool SheetDataContext::importCell( const AttributeList& rAttribs )
 {
-bool bValidAddr = mrAddressConv.convertToCellAddress( 
maCellData.maCellAddr, rAttribs.getString( XML_r, OUString() ), mnSheet, true );
+OUString r = rAttribs.getString( XML_r, OUString() );
+bool bValidAddr;
+if ( r.getLength() > 0 )
+bValidAddr = mrAddressConv.convertToCellAddress( 
maCellData.maCellAddr, rAttribs.getString( XML_r, OUString() ), mnSheet, true );
+else
+{
+maCellData.maCellAddr.Column = ++maLastCellAddress.Column;
+maCellData.maCellAddr.Row = maLastCellAddress.Row;
+maCellData.maCellAddr.Sheet = maLastCellAddress.Sheet;
+bValidAddr = true;
+}
 if( bValidAddr )
 {
+maLastCellAddress.Column  = maCellData.maCellAddr.Column;
+maLastCellAddress.Row = maCellData.maCellAddr.Row;
+maLastCellAddress.Sheet   = maCellData.maCellAddr.Sheet;
 maCellData.mnCellType = rAttribs.getToken( XML_t, XML_n );
 maCellData.mnXfId = rAttribs.getInteger( XML_s, -1 );
 maCellData.mbShowPhonetic = rAttribs.getBool( XML_ph, false );



[openoffice] branch trunk updated: Some 3rd party applications write OOXML files whose ZIP entries have filenames in different casing than their XML files specify, eg. sharedStrings.xml is actually st

2023-01-06 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 0f42b9a04e Some 3rd party applications write OOXML files whose ZIP 
entries have filenames in different casing than their XML files specify, eg. 
sharedStrings.xml is actually stored in the ZIP file as SharedStrings.xml. 
Thus, when we can't find files with their intended casing, do a 
case-insensitive search within their ZIP directory instead.
0f42b9a04e is described below

commit 0f42b9a04e21324973f03349bb2929327cf84a20
Author: Damjan Jovanovic 
AuthorDate: Fri Jan 6 11:57:30 2023 +0200

Some 3rd party applications write OOXML files whose ZIP entries have 
filenames in
different casing than their XML files specify, eg. sharedStrings.xml is 
actually
stored in the ZIP file as SharedStrings.xml. Thus, when we can't find files 
with
their intended casing, do a case-insensitive search within their ZIP 
directory
instead.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=126720 - no text imported 
from xlsx
Patch by: me
---
 main/oox/source/helper/zipstorage.cxx | 17 +
 1 file changed, 17 insertions(+)

diff --git a/main/oox/source/helper/zipstorage.cxx 
b/main/oox/source/helper/zipstorage.cxx
index 2e35e5fa11..afc8e757f3 100644
--- a/main/oox/source/helper/zipstorage.cxx
+++ b/main/oox/source/helper/zipstorage.cxx
@@ -172,6 +172,23 @@ Reference< XInputStream > ZipStorage::implOpenInputStream( 
const OUString& rElem
 }
 catch( Exception& )
 {
+// Bug 126720 - sometimes the relationship says the file is 
"sharedStrings.xml" but the file is actually "SharedStrings.xml".
+// Do a case-insensitive search:
+::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = 
mxStorage->getElementNames( );
+for ( sal_Int32 i = 0; i < aNames.getLength(); i++ )
+{
+if ( aNames[i].equalsIgnoreAsciiCase( rElementName ) )
+{
+try
+{
+xInStream.set( mxStorage->openStreamElement( aNames[i], 
::com::sun::star::embed::ElementModes::READ ), UNO_QUERY );
+}
+catch( Exception& )
+{
+}
+break;
+}
+}
 }
 return xInStream;
 }



[openoffice] branch trunk updated: Add the "'" entity definition to our HTML parser, so that we can correctly read it and convert it a "'", but when writing to HTML write out the "'" directly for

2023-01-02 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 3304210c5c Add the "'" entity definition to our HTML parser, so 
that we can correctly read it and convert it a "'", but when writing to HTML 
write out the "'" directly for now.
3304210c5c is described below

commit 3304210c5c53f441cdb2c462fbbf6d8351380b01
Author: Damjan Jovanovic 
AuthorDate: Tue Jan 3 08:41:13 2023 +0200

Add the "'" entity definition to our HTML parser, so that we can 
correctly
read it and convert it a "'", but when writing to HTML write out the "'"
directly for now.

Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=80657

Patch by: me
---
 main/svtools/inc/svtools/htmlkywd.hxx   | 1 +
 main/svtools/source/svhtml/htmlkywd.cxx | 1 +
 2 files changed, 2 insertions(+)

diff --git a/main/svtools/inc/svtools/htmlkywd.hxx 
b/main/svtools/inc/svtools/htmlkywd.hxx
index ff11057f1a..5ec2e37c79 100644
--- a/main/svtools/inc/svtools/htmlkywd.hxx
+++ b/main/svtools/inc/svtools/htmlkywd.hxx
@@ -182,6 +182,7 @@
 #define OOO_STRING_SVTOOLS_HTML_C_lt "lt"
 #define OOO_STRING_SVTOOLS_HTML_C_gt "gt"
 #define OOO_STRING_SVTOOLS_HTML_C_amp "amp"
+#define OOO_STRING_SVTOOLS_HTML_C_apos "apos"
 #define OOO_STRING_SVTOOLS_HTML_C_quot "quot"
 #define OOO_STRING_SVTOOLS_HTML_C_Aacute "Aacute"
 #define OOO_STRING_SVTOOLS_HTML_C_Agrave "Agrave"
diff --git a/main/svtools/source/svhtml/htmlkywd.cxx 
b/main/svtools/source/svhtml/htmlkywd.cxx
index 24b3160009..7554343ec6 100644
--- a/main/svtools/source/svhtml/htmlkywd.cxx
+++ b/main/svtools/source/svhtml/htmlkywd.cxx
@@ -278,6 +278,7 @@ static HTML_CharEntry __FAR_DATA aHTMLCharNameTab[] = {
{{OOO_STRING_SVTOOLS_HTML_C_lt}, 60},
{{OOO_STRING_SVTOOLS_HTML_C_gt}, 62},
{{OOO_STRING_SVTOOLS_HTML_C_amp},38},
+   {{OOO_STRING_SVTOOLS_HTML_C_apos},   39},
{{OOO_STRING_SVTOOLS_HTML_C_quot},   34},
 
{{OOO_STRING_SVTOOLS_HTML_C_Agrave},192},



[openoffice] branch trunk updated: When we reach EOF, and SvStream.ReadCsvLine() returned some data, process that data before returning.

2022-12-27 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new c7ace38fed When we reach EOF, and SvStream.ReadCsvLine() returned some 
data, process that data before returning.
c7ace38fed is described below

commit c7ace38fedbe61bc12c11cf4f428626429620f06
Author: Damjan Jovanovic 
AuthorDate: Tue Dec 27 14:47:35 2022 +0200

When we reach EOF, and SvStream.ReadCsvLine() returned some data,
process that data before returning.

Fixes https://bz.apache.org/ooo/show_bug.cgi?id=128548 -
"Last CSV line is silently lost on import if last field is quoted
and EOF is reached before closing quote"

Patch by: me
---
 main/sc/source/ui/docshell/impex.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/sc/source/ui/docshell/impex.cxx 
b/main/sc/source/ui/docshell/impex.cxx
index 2f3688ff2f..58aa039b49 100644
--- a/main/sc/source/ui/docshell/impex.cxx
+++ b/main/sc/source/ui/docshell/impex.cxx
@@ -1231,7 +1231,7 @@ sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
 for( ;; )
 {
 rStrm.ReadCsvLine( aLine, !bFixed, rSeps, cStr);
-if ( rStrm.IsEof() )
+if ( rStrm.IsEof() && aLine.Len() == 0 )
 break;
 
 xub_StrLen nLineLen = aLine.Len();



[openoffice] branch trunk updated: Fix some typos.

2022-12-25 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new e405e85b1e Fix some typos.
e405e85b1e is described below

commit e405e85b1e72df1f328622e9d59104794ec740e8
Author: Damjan Jovanovic 
AuthorDate: Sun Dec 25 07:43:38 2022 +0200

Fix some typos.

Patch by: me
---
 main/bridges/source/cpp_uno/msvc_win64_x86-64/cpp2uno.cxx | 2 +-
 main/bridges/test/testsameprocess.cxx | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/bridges/source/cpp_uno/msvc_win64_x86-64/cpp2uno.cxx 
b/main/bridges/source/cpp_uno/msvc_win64_x86-64/cpp2uno.cxx
index 723d2fef04..59a963723a 100644
--- a/main/bridges/source/cpp_uno/msvc_win64_x86-64/cpp2uno.cxx
+++ b/main/bridges/source/cpp_uno/msvc_win64_x86-64/cpp2uno.cxx
@@ -48,7 +48,7 @@ namespace
 
 // Perform the UNO call
 //
-// We must convert the paramaters stored in pCallStack to UNO
+// We must convert the parameters stored in pCallStack to UNO
 // arguments and call pThis->getUnoI()->pDispatcher.
 //
 // pCallStack:  ret addr, this, [ret *], [params]
diff --git a/main/bridges/test/testsameprocess.cxx 
b/main/bridges/test/testsameprocess.cxx
index 3263258629..471776a69a 100644
--- a/main/bridges/test/testsameprocess.cxx
+++ b/main/bridges/test/testsameprocess.cxx
@@ -119,7 +119,7 @@ int main( int argc, char *argv[] )
 {
if( argc < 2 )
{
-   printf( "usage : testsamprocess host:port\n" );
+   printf( "usage : testsameprocess host:port\n" );
return 0;
}
 



[openoffice] branch trunk updated: Free the rtl_UnicodeToTextContext with rtl_destroyTextToUnicodeContext() instead of rtl_destroyTextToUnicodeConverter().

2022-10-20 Thread damjan
This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new fb3d764656 Free the rtl_UnicodeToTextContext with 
rtl_destroyTextToUnicodeContext() instead of 
rtl_destroyTextToUnicodeConverter().
fb3d764656 is described below

commit fb3d7646562a8e2f3f690b2fdbc7faaa1b30aa42
Author: Damjan Jovanovic 
AuthorDate: Fri Oct 21 03:23:20 2022 +0200

Free the rtl_UnicodeToTextContext with rtl_destroyTextToUnicodeContext() 
instead of rtl_destroyTextToUnicodeConverter().

This fixes
https://bz.apache.org/ooo/show_bug.cgi?id=128539

Patch by: me
---
 main/vcl/source/gdi/impfont.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/vcl/source/gdi/impfont.cxx b/main/vcl/source/gdi/impfont.cxx
index a1ae47ebac..af32eef36a 100644
--- a/main/vcl/source/gdi/impfont.cxx
+++ b/main/vcl/source/gdi/impfont.cxx
@@ -550,7 +550,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 }
 }
 
-rtl_destroyTextToUnicodeConverter( aCvtContext );
+rtl_destroyTextToUnicodeContext( aConverter, aCvtContext );
 rtl_destroyTextToUnicodeConverter( aConverter );
 
 // convert the set of supported unicodes to ranges



  1   2   3   4   5   6   7   8   9   10   >