core.git: include/sot sfx2/source sot/source vcl/source
include/sot/formats.hxx |3 +- sfx2/source/doc/sfxbasemodel.cxx | 47 --- sot/source/base/exchange.cxx |1 vcl/source/treelist/transfer.cxx | 36 + 4 files changed, 77 insertions(+), 10 deletions(-) New commits: commit 6c04b8356c0764ba8ac51448eee5ff577b08d9e2 Author: Damjan Jovanovic AuthorDate: Wed Feb 14 22:02:35 2024 +0100 Commit: Thorsten Behrens CommitDate: Thu Feb 15 22:09:34 2024 +0100 i#112829: offer svg as clipboard format as well When copying charts, shapes, etc. out of LibreOffice, 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. (cherry picked from commit 61aee323790d0a1ed0745ee5a84b8885bcd0a559) Change-Id: Ia32be448a096154bb092d49f372148c6b2263f35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163412 Tested-by: Thorsten Behrens Reviewed-by: Thorsten Behrens diff --git a/include/sot/formats.hxx b/include/sot/formats.hxx index 12727ffb34c9..fbfa3754bd82 100644 --- a/include/sot/formats.hxx +++ b/include/sot/formats.hxx @@ -175,8 +175,9 @@ enum class SotClipboardFormatId : sal_uInt32 RICHTEXT = 145, STRING_TSVC= 146, PDF= 147, +SVG= 148, // the point at which we start allocating "runtime" format IDs -USER_END = PDF +USER_END = SVG }; /** Make it easier to iterate over format IDs */ diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 5de773ac01e2..3d969f223fc1 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2229,6 +2229,28 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla else throw datatransfer::UnsupportedFlavorException(); } +else if ( aFlavor.MimeType == "image/svg+xml" ) +{ +if ( aFlavor.DataType != cppu::UnoType>::get() ) +throw datatransfer::UnsupportedFlavorException(); + +std::shared_ptr xMetaFile = +m_pData->m_pObjectShell->GetPreviewMetaFile( true ); + +if (xMetaFile) +{ +std::unique_ptr xStream( +GraphicHelper::getFormatStrFromGDI_Impl( +xMetaFile.get(), ConvertDataFormat::SVG ) ); + +if (xStream) +{ +xStream->SetVersion( SOFFICE_FILEFORMAT_CURRENT ); +aAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( xStream->GetData() ), +xStream->TellEnd() ); +} +} +} else if ( aFlavor.MimeType == "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ) { if ( aFlavor.DataType != cppu::UnoType>::get() ) @@ -2288,7 +2310,7 @@ Sequence< datatransfer::DataFlavor > SAL_CALL SfxBaseModel::getTransferDataFlavo { SfxModelGuard aGuard( *this ); -const sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 10 : 8; +const sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 11 : 9; Sequence< datatransfer::DataFlavor > aFlavorSeq( nSuppFlavors ); auto pFlavorSeq = aFlavorSeq.getArray(); @@ -2331,17 +2353,21 @@ Sequence< datatransfer::DataFlavor > SAL_CALL SfxBaseModel::getTransferDataFlavo pFlavorSeq[7].HumanPresentableName = "PNG"; pFlavorSeq[7].DataType = cppu::UnoType>::get(); -if ( nSuppFlavors == 10 ) +pFlavorSeq[8].MimeType = "image/svg+xml"; +pFlavorSeq[8].HumanPresentableName = "SVG"; +pFlavorSeq[8].DataType = cppu::UnoType>::get(); + +if ( nSuppFlavors == 11 ) { -pFlavorSeq[8].MimeType = +pFlavorSeq[9].MimeType = "application/x-openoffice-emf;windows_formatname=\"Image EMF\""; -pFlavorSeq[8].HumanPresentableName = "Enhanced Windows MetaFile"; -pFlavorSeq[8].DataType = cppu::UnoType::get(); +pFlavorSeq[9].HumanPresentableName = "Enhanced Windows MetaFile"; +pFlavorSeq[9].DataType = cppu::UnoType::get(); -pFlavorSeq[9].MimeType = +pFlavorSeq[10].MimeType = "application/x-openoffice-wmf;windows_formatname=\"Image WMF\""; -pFlavorSeq[9].HumanPresentableName = "Windows MetaFile"; -pFlavorSeq[9].DataType = cppu::UnoType::get(); +pFlavorSeq[10].HumanPresentableName = "Windows MetaFile"; +pFlavorSeq[10].DataType = cppu::UnoType::get(); } return aFlavorSeq; @@ -2381,6 +2407,11 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const datatransfer::DataF && aFlavor.DataType ==
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - include/svtools svtools/source
include/svtools/htmlkywd.hxx |1 + svtools/source/svhtml/htmlkywd.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit 1b9042f763a439c5aa0f1088ac86cfc203ccc3b2 Author: Damjan Jovanovic AuthorDate: Tue Jan 3 08:41:13 2023 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Mar 20 17:39:41 2023 + tdf#154273: 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 Cherry-picked from https://github.com/apache/openoffice/commit/3304210c5c53f441cdb2c462fbbf6d8351380b01 "Add the "" entity definition to our HTML parser, so that we can…" Change-Id: I10d07af5f49d2432d99a79318d9d95b0bc976637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149150 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli (cherry picked from commit 28341f0b107b7bcd1377cec68c90eee9c4f27e1c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149104 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 9a84cddd37bf..cdcee168acba 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -150,6 +150,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/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 584322fac8bc..5f81b3e3ca30 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -203,6 +203,7 @@ static HTML_CharEntry aHTMLCharNameTab[] = { {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_lt), 60}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_gt), 62}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_amp),38}, +{std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_apos),39}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_quot), 34}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_Agrave),192},
[Libreoffice-commits] core.git: include/svtools svtools/source
include/svtools/htmlkywd.hxx |1 + svtools/source/svhtml/htmlkywd.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit 28341f0b107b7bcd1377cec68c90eee9c4f27e1c Author: Damjan Jovanovic AuthorDate: Tue Jan 3 08:41:13 2023 +0200 Commit: Xisco Fauli CommitDate: Mon Mar 20 14:45:17 2023 + tdf#154273: 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 Cherry-picked from https://github.com/apache/openoffice/commit/3304210c5c53f441cdb2c462fbbf6d8351380b01 "Add the "" entity definition to our HTML parser, so that we can…" Change-Id: I10d07af5f49d2432d99a79318d9d95b0bc976637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149150 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx index 9a84cddd37bf..cdcee168acba 100644 --- a/include/svtools/htmlkywd.hxx +++ b/include/svtools/htmlkywd.hxx @@ -150,6 +150,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/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 584322fac8bc..5f81b3e3ca30 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -203,6 +203,7 @@ static HTML_CharEntry aHTMLCharNameTab[] = { {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_lt), 60}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_gt), 62}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_amp),38}, +{std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_apos),39}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_quot), 34}, {std::u16string_view(u"" OOO_STRING_SVTOOLS_HTML_C_Agrave),192},
[Libreoffice-commits] core.git: scripting/java
scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java | 12 +++--- 1 file changed, 9 insertions(+), 3 deletions(-) New commits: commit d0159892793860e53ddc068b4bdb707a521def19 Author: Damjan Jovanovic AuthorDate: Sun Oct 16 18:31:15 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Mar 20 14:43:13 2023 + Fix some errors in the scripting module's XInputStreamImpl: - Check the loop termination in readBytes() properly: currently it increments totalBytesRead while also decrementing nBytesToRead, so when compared to each other, the loop terminates when the buffer is half full. Only check for nBytesToRead instead. - Deal with the possibility of available() returning 0 in readSomeBytes(). Patch by: me Cherry-picked from https://github.com/apache/openoffice/commit/7e29bacc90c4b1b9788c3b71dfacd17daecde7a7 "Fix some errors in the scripting module's XInputStreamImpl:" Change-Id: I951dc10565afa3519b0ddf98de559a7b585b1627 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149156 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java index 8320b6227cdb..3270d40d5bfb 100644 --- a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java +++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java @@ -41,11 +41,16 @@ public class XInputStreamImpl implements XInputStream { try { int bytesRead; -while ((bytesRead = is.read(aData[ 0 ], totalBytesRead, nBytesToRead)) > 0 - && (totalBytesRead < nBytesToRead)) { +while (( nBytesToRead > 0 ) && (bytesRead = is.read(aData[ 0 ], totalBytesRead, nBytesToRead)) > 0) { totalBytesRead += bytesRead; nBytesToRead -= bytesRead; } +if ( totalBytesRead < aData[ 0 ].length ) +{ +byte[] out = new byte[ totalBytesRead ]; +System.arraycopy( aData[ 0 ], 0, out, 0, totalBytesRead ); +aData[ 0 ] = out; +} } catch (IOException e) { throw new com.sun.star.io.IOException(e); } catch (IndexOutOfBoundsException aie) { @@ -62,7 +67,8 @@ public class XInputStreamImpl implements XInputStream { int bytesToRead = nMaxBytesToRead; int availableBytes = available(); -if (availableBytes < nMaxBytesToRead) { +if (0 < availableBytes && availableBytes < nMaxBytesToRead) +{ bytesToRead = availableBytes; }
[Libreoffice-commits] core.git: 2 commits - ridljar/com sal/osl
ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java | 23 +++--- sal/osl/unx/process.cxx| 5 ++ 2 files changed, 14 insertions(+), 14 deletions(-) New commits: commit f4d147ef956de834a7402bea88a1aec296c38ef7 Author: Damjan Jovanovic AuthorDate: Mon Feb 27 20:19:39 2023 + Commit: Caolán McNamara CommitDate: Tue Feb 28 11:12:06 2023 + InputStreamToXInputStreamAdapter.readBytes() should read... until the buffer is full, or the file ends. It shouldn't care about available(). (cherry-picked from f04910427d25ede98b84b90df7cc5a12d1adc695) Change-Id: I4ad17c614ba336ff21883248715861f6af1fbc2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147934 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java b/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java index d547b1e7ce17..dd634e771370 100644 --- a/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java +++ b/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java @@ -79,29 +79,24 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream { { try { long bytesRead; +int totalBytesRead = 0; if (b[0] == null || b[0].length < len) { b[0] = new byte[len]; } -if (len >iIn.available()) { -bytesRead = iIn.read(b[0], 0, iIn.available()); -} -else{ -bytesRead = iIn.read(b[0], 0, len); -} // Casting bytesRead to an int is okay, since the user can // only pass in an integer length to read, so the bytesRead // must <= len. -if (bytesRead < b[0].length) { -int outSize = bytesRead > 0 ? (int)bytesRead : 0; -byte[] out = new byte[outSize]; -System.arraycopy(b[0], 0, out, 0, outSize); -b[0] = out; +while ((len > 0) && ((bytesRead = iIn.read(b[0], totalBytesRead, len)) > 0)) { +totalBytesRead += (int)bytesRead; +len -= (int)bytesRead; } -if (bytesRead <= 0) { -return 0; +if (totalBytesRead < b[0].length) { +byte[] out = new byte[totalBytesRead]; +System.arraycopy(b[0], 0, out, 0, totalBytesRead); +b[0] = out; } -return ((int)bytesRead); +return totalBytesRead; } catch (IOException e) { throw new com.sun.star.io.IOException("reader error", e); } commit 4f743219e85e61f622a8dadc028c144010eecd4d Author: Caolán McNamara AuthorDate: Mon Feb 27 20:49:08 2023 + Commit: Caolán McNamara CommitDate: Tue Feb 28 11:11:56 2023 + cid#1521506 silence Thread deadlock and cid#1521510 Thread deadlock annotation is getting a bit spamy Change-Id: I3120562c0f7ca996f53d14965efe7af506be6d19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147935 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index f75534fdc311..7d6936265c0b 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -329,6 +329,7 @@ static void ChildStatusProc(void *pData) else pChild->m_status = -1; +// coverity[lock_order : FALSE] - incorrect report of lock order error osl_setCondition(pChild->m_terminated); } @@ -731,8 +732,12 @@ oslProcess SAL_CALL osl_getProcess(oslProcessIdentifier Ident) pProcImpl->m_status = pChild->m_status; +// coverity[lock_order : FALSE] - incorrect report of lock order error if (osl_checkCondition(pChild->m_terminated)) +{ +// coverity[lock_order : FALSE] - incorrect report of lock order error osl_setCondition(pProcImpl->m_terminated); +} } else pProcImpl->m_pnext = nullptr;
[Libreoffice-commits] core.git: ridljar/com
ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java | 18 ++ 1 file changed, 18 insertions(+) New commits: commit 618e8e30a21efea41b9a4e63219de20e38987f4a Author: Damjan Jovanovic AuthorDate: Mon Feb 27 20:15:20 2023 + Commit: Caolán McNamara CommitDate: Tue Feb 28 10:05:12 2023 + Fix the java.lang.NullPointerException in readBytes() and readSomeBytes()... methods in InputStreamToXInputStreamAdapter when called from the inter-process UNO bridge. XInputStream::readBytes() documents how the buffer is an "out" parameter, and isn't passed to the implementing end, which is why we get the buffer as a "byte[][] b" and b[0] == null. Its role is to box a byte[] array to be returned the client. Thus, allocate the buffer if it is missing or too small. Additionally, virtually all other readBytes() and readSomeBytes() implementations trim this sequence to the actual number of bytes read. This presumably reduces the inter-process traffic, but some callers even rely on the sequence to be trimmed, eg. main/sax/source/expatwrap/xml2utf.cxx. Thus trim our returned array too. (cherry-picked from 6cb06142790376a2c58e6392182eb071420a4221) Change-Id: I42eb209b68f7c13a34670d03c2ca61d76672385b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147933 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java b/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java index a81bb85b1c57..d547b1e7ce17 100644 --- a/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java +++ b/ridljar/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java @@ -79,6 +79,9 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream { { try { long bytesRead; +if (b[0] == null || b[0].length < len) { +b[0] = new byte[len]; +} if (len >iIn.available()) { bytesRead = iIn.read(b[0], 0, iIn.available()); } @@ -89,6 +92,12 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream { // Casting bytesRead to an int is okay, since the user can // only pass in an integer length to read, so the bytesRead // must <= len. +if (bytesRead < b[0].length) { +int outSize = bytesRead > 0 ? (int)bytesRead : 0; +byte[] out = new byte[outSize]; +System.arraycopy(b[0], 0, out, 0, outSize); +b[0] = out; +} if (bytesRead <= 0) { return 0; } @@ -103,6 +112,9 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream { { try { long bytesRead; +if (b[0] == null || b[0].length < len) { +b[0] = new byte[len]; +} if (len >iIn.available()) { bytesRead = iIn.read(b[0], 0, iIn.available()); } @@ -113,6 +125,12 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream { // Casting bytesRead to an int is okay, since the user can // only pass in an integer length to read, so the bytesRead // must <= len. +if (bytesRead < b[0].length) { +int outSize = bytesRead > 0 ? (int)bytesRead : 0; +byte[] out = new byte[outSize]; +System.arraycopy(b[0], 0, out, 0, outSize); +b[0] = out; +} if (bytesRead <= 0) { return 0; }
[Libreoffice-commits] core.git: Changes to 'distro/collabora/libreoffice-4.0.6.2'
New branch 'distro/collabora/libreoffice-4.0.6.2' available with the following commits: commit 36f1060e3c5be0946cd1bc811b84cc542fafe70b Author: Damjan Jovanovic Date: Sun Aug 20 06:22:29 2017 + i#32546# - Java UnoRuntime.getUniqueKey/generateOid do not work reliably In the Java UNO bridge, UnoRuntime.generateOid() generated the object-specific part of the OID using java.lang.Object.hashCode(), which is only 32 bits long, and is commonly overriden and could thus return values from an even smaller range, so OID collisions were quite likely. This changes UnoRuntime.generateOid() to use 128 bit UUIDs for the object-specific part of the OID, and store these in an object => oid java.util.WeakHashMap, making OID collisions almost impossible. Patch by: me Suggested by: Stephan Bergmann (stephan dot bergmann dot secondary at googlemail dot com) (cherry picked from commit 6dd83d1c6c5c580d14ca3d0458be4020603ba118) Change-Id: I8e851a7a69ac2defefa15e9a00118d8f9fc0da95 Reviewed-on: https://gerrit.libreoffice.org/41576 Reviewed-by: Stephan Bergmann Reviewed-by: Noel Grandin Tested-by: Jenkins commit 4a92919c5b1f94ccc58acc01ad3fb40961fce7ad Author: Miklos Vajna Date: Mon Jun 6 12:34:08 2016 +0200 SwXDispatchProviderInterceptor: implement frame::XInterceptorInfo With this, framework::InterceptionHelper can make a better decision what interceptor to call: it can avoid calling SwXDispatchProviderInterceptor when the sw code would just call the previous interceptor anyway. Reviewed-on: https://gerrit.libreoffice.org/25961 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit b0d819ac5667a07f629f2acb5d3c542fa76d348b) Conflicts: sw/source/uibase/inc/unodispatch.hxx sw/source/uibase/uno/unodispatch.cxx Change-Id: I92897f2c8baa264dc9ccbc11b63f415da30a910d commit b99c91d1d78915fea57ba6b8c905e68ae1ad4632 Author: Thorsten Behrens Date: Fri May 20 16:48:00 2016 +0200 framework: last dispatchInterceptor gets asked first Align implementation with API contract as spelled out in offapi/com/sun/star/frame/XDispatchProviderInterception.idl - no idea why this change happenend in 2003: Date: Fri Apr 4 16:16:05 2003 + INTEGRATION: CWS fwk01 (1.1.72); FILE MERGED 2003/04/01 12:40:09 as 1.1.72.1: #107642# change order of used interception objects At any rate, with this change extensions actually get a chance to see dispatch requests first, and process/ignore at will. Change-Id: I58876150ee6d67e592f41b3e82a9ffc314e091a3 Reviewed-on: https://gerrit.libreoffice.org/25215 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 08cf2fd01064306eef7fdbb5b62320947c4d1089) commit aa7f4295c0d428f79149228c3b4d38d6212d3906 Author: Thorsten Behrens Date: Wed Mar 2 15:28:36 2016 +0100 framework: avoid excessive queryDispatch calls Make better use of the css::frame::XInterceptorInfo interface, to avoid calling queryDispatch() pointlessly on interfaces that have explicitely opted out. Since that already broadcasts which urls we're interested in - so just don't bother calling entries who are not matching. Reviewed-on: https://gerrit.libreoffice.org/25214 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 27b6cdb5ab5af33dbba561923c8db81e144c88b9) Conflicts: framework/source/dispatch/interceptionhelper.cxx Change-Id: Id5e780568fd60c38f4cee4ee800d747d65a31dae commit b910152f23678e83b6f6ac0b2ad6728de9ebd92c Author: shubhamtibra Date: Sat Jan 16 21:50:24 2016 +0530 tdf#96949 Remove global static variable m_bPreferrFirstInterceptor and ... ... unused code Remove global static variable "m_bPreferrFirstInterceptor" which is always true, and remove the ifs where it is false. Reviewed-on: https://gerrit.libreoffice.org/21519 Reviewed-by: jan iversen Tested-by: jan iversen (cherry picked from commit 5d4f1f6f630d4382679087a4fb0da364c9c9692b) Conflicts: framework/inc/dispatch/interceptionhelper.hxx framework/source/dispatch/interceptionhelper.cxx Change-Id: I54dcea7a6010c825a66020ec3f7448bb32d120b8 commit 3e4efb6902141051374082458626b97e543b0053 Author: Miklos Vajna Date: Thu May 12 20:32:34 2016 +0200 framework: register DispatchDisabler service Change-Id: I72d9f8b00ba8b2e4e5dc70d7fd77e13ccf9d3bcc Reviewed-on: https://gerrit.libreoffice.org/24940 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 1f041bf31e071611a15ffa1559d2f5df05a685f0) commit 333c2e3ae9c1184ecb2894cb280364a31571eeae Author: Michael Meeks Date: Thu Jan 7 19:24:41 2016 + framework: initial implementation of a dispatch disabler.
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.0' - ridljar/com
ridljar/com/sun/star/uno/UnoRuntime.java | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) New commits: commit a9a87a6cc7005af937dd72aa388253b3858cdb3b Author: Damjan Jovanovic AuthorDate: Sun Aug 20 06:22:29 2017 + Commit: Andras Timar CommitDate: Wed Dec 1 15:17:32 2021 +0100 i#32546# - Java UnoRuntime.getUniqueKey/generateOid do not work reliably In the Java UNO bridge, UnoRuntime.generateOid() generated the object-specific part of the OID using java.lang.Object.hashCode(), which is only 32 bits long, and is commonly overriden and could thus return values from an even smaller range, so OID collisions were quite likely. This changes UnoRuntime.generateOid() to use 128 bit UUIDs for the object-specific part of the OID, and store these in an object => oid java.util.WeakHashMap, making OID collisions almost impossible. Patch by: me Suggested by: Stephan Bergmann (stephan dot bergmann dot secondary at googlemail dot com) (cherry picked from commit 6dd83d1c6c5c580d14ca3d0458be4020603ba118) Change-Id: I8e851a7a69ac2defefa15e9a00118d8f9fc0da95 Reviewed-on: https://gerrit.libreoffice.org/41576 Reviewed-by: Stephan Bergmann Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java index a2fb84848da4..0d3ae0b01d48 100644 --- a/ridljar/com/sun/star/uno/UnoRuntime.java +++ b/ridljar/com/sun/star/uno/UnoRuntime.java @@ -23,6 +23,8 @@ import java.lang.reflect.Array; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Iterator; +import java.util.UUID; +import java.util.WeakHashMap; import com.sun.star.lib.uno.typedesc.TypeDescription; import com.sun.star.lib.util.WeakMap; @@ -104,7 +106,16 @@ public class UnoRuntime { if (object instanceof IQueryInterface) { oid = ((IQueryInterface) object).getOid(); } -return oid == null ? object.hashCode() + oidSuffix : oid; +if (oid == null) { +synchronized (oidMap) { + oid = oidMap.get(object); + if (oid == null) { + oid = UUID.randomUUID().toString() + oidSuffix; + oidMap.put(object, oid); + } +} +} +return oid; } /** @@ -673,6 +684,7 @@ public class UnoRuntime { private final IBridge bridge; } +private static final WeakHashMap oidMap = new WeakHashMap(); private static final String uniqueKeyHostPrefix = Integer.toString(new Object().hashCode(), 16) + ":"; private static final Object uniqueKeyLock = new Object();
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - jvmfwk/plugins
jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx |4 +++- jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx |6 -- 2 files changed, 7 insertions(+), 3 deletions(-) New commits: commit 1eae11e288b879e4b770fe714c3229fd3bd7d8ec Author: Damjan Jovanovic AuthorDate: Sat Jul 27 19:55:19 2019 + Commit: Damjan Jovanovic CommitDate: Sat Jul 27 19:55:19 2019 + Fix detection of Java versions > 1.8 Patch by: me diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx index 84dfedfaedd9..46456bc2be2b 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx @@ -75,6 +75,7 @@ char const* const* OtherInfo::getRuntimePaths(int * size) "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so", // for Blackdown AMD64 "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so", // for Blackdown PPC "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so", // for Java of BEA Systems +"/lib/server/libjvm.so", // > 1.8 "/bin/classic/libjvm.so", // fallback for older for IBM Java "/jre/bin/classic/libjvm.so" // fallback for older for IBM Java #endif @@ -102,7 +103,8 @@ char const* const* OtherInfo::getLibraryPaths(int* size) "/lib/" JFW_PLUGIN_ARCH "/classic", "/lib/" JFW_PLUGIN_ARCH "/jrockit", "/lib/" JFW_PLUGIN_ARCH "/native_threads", -"/lib/" JFW_PLUGIN_ARCH +"/lib/" JFW_PLUGIN_ARCH, +"/lib" // > 1.8 #endif }; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx index 2f636561ad07..a0ecb2508864 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx @@ -75,7 +75,8 @@ char const* const* SunInfo::getRuntimePaths(int * size) "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so", "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so", "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so", -"/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so" +"/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so", +"/lib/server/libjvm.so" // > 1.8 #endif }; *size = sizeof(ar) / sizeof (char*); @@ -89,7 +90,8 @@ char const* const* SunInfo::getLibraryPaths(int* size) "/lib/" JFW_PLUGIN_ARCH "/client", "/lib/" JFW_PLUGIN_ARCH "/native_threads", -"/lib/" JFW_PLUGIN_ARCH +"/lib/" JFW_PLUGIN_ARCH, +"/lib" // > 1.8 }; *size = sizeof(ar) / sizeof (char*); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - default_images/sw jvmfwk/distributions jvmfwk/plugins ooo_custom_images/classic
default_images/sw/res/point.png |binary default_images/sw/res/point_h.png |binary jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml |6 +- jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml |7 ++- jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml|6 +- jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml|6 +- jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx |4 +++- jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx |1 + ooo_custom_images/classic/classic_images.tar.gz |binary 9 files changed, 25 insertions(+), 5 deletions(-) New commits: commit ff76cb4e0f3f8d0164570638742f140aa5b728ef Author: Damjan Jovanovic AuthorDate: Sat Jul 27 15:50:09 2019 + Commit: Damjan Jovanovic CommitDate: Sat Jul 27 15:50:09 2019 + Add support for the AdoptOpenJDK Java distribution (https://adoptopenjdk.net/). Closes #i128157# Add support for AdoptOpenJDK JVM's. Patch by: me diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml index cbbc8d21c08d..80dd762cabb6 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml @@ -23,7 +23,7 @@ http://openoffice.org/2004/java/framework/1.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> - 2012-10-06 + 2019-07-27 @@ -44,6 +44,9 @@ 1.5.0 + +1.8.0 + @@ -53,5 +56,6 @@ vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so + vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml index 63eb024a9a5e..5bc909c3f265 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml @@ -23,7 +23,7 @@ http://openoffice.org/2004/java/framework/1.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> - 2013-01-01 + 2019-07-27 @@ -35,10 +35,15 @@ 1.7.0 + +1.8.0 + + vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dylib vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dylib vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dylib + vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dylib diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml index f1f5fa284911..94268509cae6 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml @@ -23,7 +23,7 @@ http://openoffice.org/2004/java/framework/1.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> - 2011-01-07 + 2019-07-27 @@ -32,10 +32,14 @@ 1.5.0 + +1.8.0 + vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so + vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml index a0257444ae34..92c6d1988c87 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml @@ -23,7 +23,7 @@ http://openoffice.org/2004/java/framework/1.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> - 2012-10-06 + 2019-07-27 @@ -35,11 +35,15 @@ 1.5.0 + +1.8.0 + vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dll vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dll vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dll + vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.dll diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 5c0f0164675d..24b1835695e2 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -120,6 +120,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) rtl::OUString sVendor6(RTL_CONSTASCII_USTRINGPARAM("BEA Systems, Inc.")); rtl::OUString sVendor7(RTL_CONSTASCII_USTRINGPARAM("Free Software Foundation, Inc.")); rtl::OUString sVendor8(RTL_CONSTASCII_USTRINGPARAM("The FreeBSD Foundation")); +rtl::OUString sVendor9(RTL_CONSTASCII_USTRINGPARAM("AdoptOpenJDK")); if ( ! (sVendor0.equals(pInfo->sVendor) == sal_True || sVendor1.equals(pInfo->sVendor) == sal_True || sVendor2.equals(pInfo->sVendor) == sal_True @@ -128,7 +129,8 @@
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - i18npool/Library_i18npool.mk
i18npool/Library_i18npool.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e3336e2088ba1dd1d07be81188ad5696fbaad193 Author: Damjan Jovanovic AuthorDate: Mon Jul 8 19:51:50 2019 + Commit: Damjan Jovanovic CommitDate: Mon Jul 8 19:51:50 2019 + Don't include icuversion.mk if it wasn't delivered (when using system ICU). Fixes: #i128148# build in trunk fails because of icu. Patch by: me diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk index caa159764bed..25892a581575 100644 --- a/i18npool/Library_i18npool.mk +++ b/i18npool/Library_i18npool.mk @@ -144,7 +144,7 @@ $(WORKDIR)/CustomTarget/i18npool/source/collator/lrl_include.hxx : $(wildcard $( # fdo#31271 ")" reclassified in more recent ICU/Unicode Standards -include $(OUTDIR)/inc/icuversion.mk +-include $(OUTDIR)/inc/icuversion.mk ICU_RECLASSIFIED_BRACKET := $(shell [ ${ICU_MAJOR} -ge 5 -o \( ${ICU_MAJOR} -eq 4 -a ${ICU_MINOR} -ge 4 \) ] && echo YES) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - Module_ooo.mk qadevOOo/Ant_OOoRunnerLight.mk qadevOOo/Ant_OOoRunner.mk qadevOOo/build.xml qadevOOo/java qadevOOo/JunitTest_qadevOOo_unoapi.mk qadev
Module_ooo.mk |1 qadevOOo/Ant_OOoRunner.mk | 27 +++ qadevOOo/Ant_OOoRunnerLight.mk | 27 +++ qadevOOo/JunitTest_qadevOOo_unoapi.mk | 42 ++--- qadevOOo/Makefile | 32 +++ qadevOOo/Module_qadevOOo.mk | 33 +-- qadevOOo/build.xml | 74 qadevOOo/java/OOoRunner/build.xml | 41 qadevOOo/java/OOoRunner/src/main/java/ifc/sheet/_XSheetAnnotationAnchor.java |2 qadevOOo/java/OOoRunner/src/main/java/mod/_dbaccess/OQueryDesign.java |2 qadevOOo/java/OOoRunner/src/main/java/mod/_dbaccess/OSingleSelectQueryComposer.java |2 qadevOOo/java/OOoRunner/src/main/java/util/FootnoteDsc.java |2 qadevOOo/java/OOoRunner/src/main/java/util/FormTools.java | 24 +- qadevOOo/java/OOoRunner/src/main/java/util/ParagraphDsc.java |2 qadevOOo/java/OOoRunner/src/main/java/util/ReferenceMarkDsc.java |2 qadevOOo/java/OOoRunner/src/main/java/util/ShapeDsc.java |6 qadevOOo/java/OOoRunner/src/main/java/util/StyleFamilyDsc.java |6 qadevOOo/java/OOoRunner/src/main/java/util/TableDsc.java |2 qadevOOo/java/OOoRunner/src/main/java/util/TextSectionDsc.java |2 qadevOOo/java/OOoRunnerLight/build.xml | 64 +++ qadevOOo/java/OOoRunnerLight/manifest |3 qadevOOo/prj/build.lst |6 qadevOOo/prj/d.lst |1 qadevOOo/prj/makefile.mk | 36 ++-- qadevOOo/runner/basicrunner/basichelper/makefile.mk | 43 - qadevOOo/runner/basicrunner/makefile.mk | 42 - qadevOOo/runner/makefile.mk | 56 -- qadevOOo/runner/util/compare/makefile.mk | 50 -- qadevOOo/runner/util/makefile.mk | 83 -- 29 files changed, 272 insertions(+), 441 deletions(-) New commits: commit ee4b7394ff7c027e09d885e66056a405fc3b0291 Author: Damjan Jovanovic AuthorDate: Sun May 12 09:34:12 2019 + Commit: Damjan Jovanovic CommitDate: Sun May 12 09:34:12 2019 + Port qadevOOo to gbuild/Ant. Patch by: me diff --git a/Module_ooo.mk b/Module_ooo.mk index 6adeea125a71..271cf450925c 100644 --- a/Module_ooo.mk +++ b/Module_ooo.mk @@ -77,6 +77,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\ padmin \ psprint_config \ pyuno \ +qadevOOo \ rdbmaker \ registry \ remotebridges \ diff --git a/qadevOOo/Ant_OOoRunner.mk b/qadevOOo/Ant_OOoRunner.mk new file mode 100644 index ..2b6c0ff661fe --- /dev/null +++ b/qadevOOo/Ant_OOoRunner.mk @@ -0,0 +1,27 @@ +#** +# +# 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. +# +#** + + + +$(eval $(call gb_Ant_Ant,OOoRunner,$(SRCDIR)/qadevOOo/java/OOoRunner/build.xml)) + +# vim: set noet sw=4 ts=4: + diff --git a/qadevOOo/Ant_OOoRunnerLight.mk b/qadevOOo/Ant_OOoRunnerLight.mk new file mode 100644 index ..40471e803043 --- /dev/null +++ b/qadevOOo/Ant_OOoRunnerLight.mk @@ -0,0 +1,27 @@ +#** +# +# Licensed to the Apache Software
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - tools/GoogleTest_tools_pathutils.mk tools/Module_tools.mk tools/qa
tools/GoogleTest_tools_pathutils.mk | 46 tools/Module_tools.mk |1 tools/qa/test_pathutils.cxx | 27 - 3 files changed, 63 insertions(+), 11 deletions(-) New commits: commit e665db4362b177a38f07a8392ebbb8f99ef6b6e9 Author: Damjan Jovanovic AuthorDate: Sun Mar 31 18:17:42 2019 + Commit: Damjan Jovanovic CommitDate: Sun Mar 31 18:17:42 2019 + Port a main/tools unit test from cppunit to gtest. Patch by: me diff --git a/tools/GoogleTest_tools_pathutils.mk b/tools/GoogleTest_tools_pathutils.mk new file mode 100644 index ..58e0c6f5f897 --- /dev/null +++ b/tools/GoogleTest_tools_pathutils.mk @@ -0,0 +1,46 @@ +#** +# +# 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. +# +#** + + +$(eval $(call gb_GoogleTest_GoogleTest,tools_pathutils)) + +$(eval $(call gb_GoogleTest_add_exception_objects,tools_pathutils, \ + tools/qa/test_pathutils \ +)) + +$(eval $(call gb_GoogleTest_add_linked_libs,tools_pathutils, \ +stl \ +tl \ +$(gb_STDLIBS) \ +)) + + +$(eval $(call gb_GoogleTest_add_linked_static_libs,tools_pathutils, \ +ooopathutils \ +)) + +$(eval $(call gb_GoogleTest_set_include,tools_pathutils,\ + $$(INCLUDE) \ + -I$(SRCDIR)/inc \ + -I$(SRCDIR)/tools/inc/pch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/tools/Module_tools.mk b/tools/Module_tools.mk index 53a984177ad8..5f4ec4c6f488 100644 --- a/tools/Module_tools.mk +++ b/tools/Module_tools.mk @@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_targets,tools,\ ifeq ($(ENABLE_UNIT_TESTS),YES) $(eval $(call gb_Module_add_check_targets,tools,\ GoogleTest_tools_fractiontest \ +GoogleTest_tools_pathutils \ )) endif diff --git a/tools/qa/test_pathutils.cxx b/tools/qa/test_pathutils.cxx index 2d771a1a3324..4e59b445b1f6 100644 --- a/tools/qa/test_pathutils.cxx +++ b/tools/qa/test_pathutils.cxx @@ -26,7 +26,7 @@ #include -#include "testshl/simpleheader.hxx" +#include "gtest/gtest.h" #include "tools/pathutils.hxx" namespace { @@ -38,8 +38,8 @@ void buildPath( wchar_t p[MAX_PATH]; wchar_t * e = tools::buildPath( p, front, front + std::wcslen(front), back, std::wcslen(back)); -CPPUNIT_ASSERT_EQUAL(p + std::wcslen(path), e); -CPPUNIT_ASSERT_EQUAL(0, std::wcscmp(path, p)); +ASSERT_EQ(p + std::wcslen(path), e); +ASSERT_EQ(0, std::wcscmp(path, p)); #else (void) front; (void) back; @@ -47,16 +47,18 @@ void buildPath( #endif } -class Test: public CppUnit::TestFixture { +class Test: public ::testing::Test { public: -void testBuildPath(); +void SetUp() +{ +} -CPPUNIT_TEST_SUITE(Test); -CPPUNIT_TEST(testBuildPath); -CPPUNIT_TEST_SUITE_END(); +void TearDown() +{ +} }; -void Test::testBuildPath() { +TEST_F(Test, testBuildPath) { buildPath(L"a:\\b\\", L"..", L"a:\\"); buildPath(L"a:\\b\\", L"..\\", L"a:\\"); buildPath(L"a:\\b\\c\\", L"..\\..\\..\\d", L"a:\\..\\d"); @@ -65,8 +67,11 @@ void Test::testBuildPath() { buildPath(L"", L"..\\a", L"..\\a"); } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +} +int main(int argc, char **argv) +{ +::testing::InitGoogleTest(, argv); +return RUN_ALL_TESTS(); } -NOADDITIONAL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits