Using &* can be problematic if the pointer is null. In this case it
doesn’t matter, but using Reference::get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.
Change-Id: I2361761496648eaaa1e245912ac19aa130b38863
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211842
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This patch implements and fixes cases for filtering. In particular
the cases for form-based and dialogue-based filtering in forms for
data and time. Additionally, the cases for time values in Table
Data View.
A specific limitation comes from firebird which accepts only 4 digits
for nanoseconds in time values. The data are rounded to that digit
for firebird while still support full precision (up to 9 digits)
for other engines. This is implemented using the driver's metadata
functions.
Unit tests are added.
Change-Id: I89435da239c898f3c782fcc9f78f98caf4223f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211298
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
Tested-by: Jenkins
After commit db92d0be756305ec0b1e122a1d00333477c17ba5 (dbase: apply
one consistent key-per-page limit in the .ndx index, 2026-08-19) a
local CODA-W build failed with:
C:/lo/online/engine/connectivity/source/drivers/dbase/dindexnode.cxx(518): error C2220: the following warning is treated as an error
C:/lo/online/engine/connectivity/source/drivers/dbase/dindexnode.cxx(518): warning C4018: '<': signed/unsigned mismatch
C:/lo/online/engine/connectivity/source/drivers/dbase/dindexnode.cxx(599): warning C4018: '<': signed/unsigned mismatch
The problem was the change of type of nNewCount from sal_uInt16 to
sal_uInt32, which made the following comparison warn:
if (nNewCount < (nMaxNodes_2 * 2))
nMaxNodes_2 is sal_uInt16, but multiplication gives int; before the
change, nNewCount was promoted from sal_uInt16 to int as well; but
now it isn't promoted, hence the problem.
Fix it by making sure that multiplication produces an unsigned value.
Change-Id: I056fa7517834b64706be27b4318bb21c42ecfebb
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9581
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit d68d84af021b67ceaf9f94294722c2e97ee9e963)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209455
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
db_maxkeys came from the index header, the key count of a page came from the
page itself, and node access used neither. Now the header value is capped to
the number of keys a DINDEX_PAGE_SIZE page can hold for the given key length,
each page keeps its own capacity and caps its key count to it, and node
positions are clamped to the same bound, so all three agree.
ODbaseIndex::CreateImpl worked out db_maxkeys from a four byte page header
while the reader counts eight bytes of page header, so use eight here too and
write an index the reader agrees with.
ONDXPage::Remove asserted on a position past the key count and then carried on
regardless, so return early instead.
ONDXPage::Merge added the key counts of two pages together in a sal_uInt16, so
widen the sum to sal_uInt32.
nValue was a file-level static shared by the page read and write operators for
no reason, so make it a local in the reader and write rPage.nCount directly.
The two GetChild overloads would load a child page that is already on the chain
of parents the descent came down, so leave such a page unread rather than
descending into a page we are inside. ONDXPage::Merge and ONDXPage::PrintPage
can then be handed a page that was left unread, so both check for one with
nothing loaded.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id51bf8368099447df41aaacbaebba7783c5769e2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9518
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit db92d0be756305ec0b1e122a1d00333477c17ba5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209449
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Debian patches firebird to resolve its plugins, intl and conf
directories under the FIREBIRD variable (instead of where it was built)
and we want point that variable at a private directory. But then the
modules aren't loaded and no database opens.
So write a replacement plugins.conf that lists the absolute path of each
plugin module (and the intl conf files) with their macros expanded.
each lib<Name>.so (otherwise found by default) with no entry names gets
an entry of its own.
Change-Id: I2696d7197394b7fe9b7739732deadd2cb2e01acc
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/7989
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit b8407b18adf3c6d552d54d7b6657539e2769afd6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208882
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
there is one firebird engine per process and it reads its configuration once
from the directory we set up, so a .fdb the user picked somewhere else could
not be attached. firebird resolves a name in databases.conf before it treats
it as a path, so give the file a name there and pass firebird that name,
dropped again when the connection is disposed.
since:
commit 520d8173cef39a4da85b3ba21bdaaa3150384c25
Date: Sun Jul 12 12:10:41 2026 +0000
firebird: keep each embedded database's files in one directory
Change-Id: I4872a4e2165c4701bfb20be5dcd8c119b1723125
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/7990
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 6ab71a109bd8a8335208c9faa37a3cfa94523148)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208773
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This reverts commit c656bab4c9.
Reason for revert: it breaks the Windows build with
[_RUN_____] MigrationTest::testBinaryImport
warn:sfx.appl:12852:4132:sfx2/source/appl/app.cxx:148: No DDE-Service possible. Error: 16399
warn:vcl:12852:4132:vcl/win/window/salframe.cxx:1046: WinSalFrame::SetIcon(): Could not load large icon !
warn:vcl:12852:4132:vcl/win/window/salframe.cxx:1047: WinSalFrame::SetIcon(): Could not load small icon !
warn:comphelper:12852:4132:comphelper/source/misc/logging.cxx:65: EventLogger_Impl::impl_createLogger_nothrow: caught an exception! com.sun.star.uno.DeploymentException message: "component context fails to supply singleton com.sun.star.logging.LoggerPool of type com.sun.star.logging.XLoggerPool at E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnoApiHeadersTarget\offapi\normal\com/sun/star/logging/LoggerPool.hpp:38" context: class cppu::`anonymous namespace'::ComponentContext
warn:connectivity.firebird:12852:4132:connectivity/source/drivers/firebird/Util.cxx:58: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD4.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
unknown:0:MigrationTest::testBinaryImport
An uncaught UNO exception
- com.sun.star.sdbc.SQLException: {Message: "firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD4.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69", Context: @00000054DD385300, SQLState: "", ErrorCode: 1, NextException: void: void}
warn:connectivity.firebird:12852:4132:connectivity/source/drivers/firebird/Util.cxx:58: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD4.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_service_start'
warn:cppuhelper:12852:4132:cppuhelper/source/implbase.cxx:82: class com::sun::star::uno::Exception msg: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD4.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_service_start'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69 at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Connection.cxx:922
warn:dbaccess:12852:4132:dbaccess/source/core/dataaccess/ModelImpl.cxx:925: com.sun.star.uno.DeploymentException message: "component context fails to supply service com.sun.star.security.DocumentDigitalSignatures of type com.sun.star.security.XDocumentDigitalSignatures at E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnoApiHeadersTarget\offapi\normal\com/sun/star/security/DocumentDigitalSignatures.hpp:79" context: class cppu::`anonymous namespace'::ComponentContext
MigrationTest::testBinaryImport finished in: 878ms
[_RUN_____] MigrationTest::testNumbers
warn:vcl:12852:4132:vcl/win/window/salframe.cxx:1046: WinSalFrame::SetIcon(): Could not load large icon !
warn:vcl:12852:4132:vcl/win/window/salframe.cxx:1047: WinSalFrame::SetIcon(): Could not load small icon !
warn:connectivity.firebird:12852:4132:connectivity/source/drivers/firebird/Util.cxx:58: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD6.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
unknown:0:MigrationTest::testNumbers
An uncaught UNO exception
- com.sun.star.sdbc.SQLException: {Message: "firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD6.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69", Context: @00000054DD386320, SQLState: "", ErrorCode: 1, NextException: void: void}
warn:connectivity.firebird:12852:4132:connectivity/source/drivers/firebird/Util.cxx:58: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD6.TMP\FIREBIRD.FDB is not allowed by server configuration
*Exiting before completion due to errors
caused by
'isc_service_start'
warn:cppuhelper:12852:4132:cppuhelper/source/implbase.cxx:82: class com::sun::star::uno::Exception msg: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD6.TMP\FIREBIRD.FDB is not allowed by server configuration
*Exiting before completion due to errors
caused by
'isc_service_start'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69 at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Connection.cxx:922
warn:dbaccess:12852:4132:dbaccess/source/core/dataaccess/ModelImpl.cxx:925: com.sun.star.uno.DeploymentException message: "component context fails to supply service com.sun.star.security.DocumentDigitalSignatures of type com.sun.star.security.XDocumentDigitalSignatures at E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnoApiHeadersTarget\offapi\normal\com/sun/star/security/DocumentDigitalSignatures.hpp:79" context: class cppu::`anonymous namespace'::ComponentContext
MigrationTest::testNumbers finished in: 145ms
[_RUN_____] MigrationTest::testTime
warn:vcl:12852:4132:vcl/win/window/salframe.cxx:1046: WinSalFrame::SetIcon(): Could not load large icon !
warn:vcl:12852:4132:vcl/win/window/salframe.cxx:1047: WinSalFrame::SetIcon(): Could not load small icon !
warn:connectivity.firebird:12852:4132:connectivity/source/drivers/firebird/Util.cxx:58: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD8.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
unknown:0:MigrationTest::testTime
An uncaught UNO exception
- com.sun.star.sdbc.SQLException: {Message: "firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD8.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69", Context: @00000054DD3863A0, SQLState: "", ErrorCode: 1, NextException: void: void}
warn:connectivity.firebird:12852:4132:connectivity/source/drivers/firebird/Util.cxx:58: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD8.TMP\FIREBIRD.FDB is not allowed by server configuration
*Exiting before completion due to errors
caused by
'isc_service_start'
warn:cppuhelper:12852:4132:cppuhelper/source/implbase.cxx:82: class com::sun::star::uno::Exception msg: firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD8.TMP\FIREBIRD.FDB is not allowed by server configuration
*Exiting before completion due to errors
caused by
'isc_service_start'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69 at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Connection.cxx:922
warn:dbaccess:12852:4132:dbaccess/source/core/dataaccess/ModelImpl.cxx:925: com.sun.star.uno.DeploymentException message: "component context fails to supply service com.sun.star.security.DocumentDigitalSignatures of type com.sun.star.security.XDocumentDigitalSignatures at E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnoApiHeadersTarget\offapi\normal\com/sun/star/security/DocumentDigitalSignatures.hpp:79" context: class cppu::`anonymous namespace'::ComponentContext
MigrationTest::testTime finished in: 128ms
##Failure Location unknown## : Error
Test name: MigrationTest::testBinaryImport
An uncaught UNO exception
- com.sun.star.sdbc.SQLException: {Message: "firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD4.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69", Context: @00000054DD385300, SQLState: "", ErrorCode: 1, NextException: void: void}
##Failure Location unknown## : Error
Test name: MigrationTest::testNumbers
An uncaught UNO exception
- com.sun.star.sdbc.SQLException: {Message: "firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD6.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69", Context: @00000054DD386320, SQLState: "", ErrorCode: 1, NextException: void: void}
##Failure Location unknown## : Error
Test name: MigrationTest::testTime
An uncaught UNO exception
- com.sun.star.sdbc.SQLException: {Message: "firebird_sdbc error:
*Use of database at location E:\JENKINS\WORKSPACE\GERRIT_WINDOWS_WSL\TMP\TEST_DBACCESS_MIGRATION.DLL2JVD3.TMP\TEST_DBACCESS_MIGRATION.DLL2JVD8.TMP\FIREBIRD.FDB is not allowed by server configuration
caused by
'isc_create_database'
at E:/jenkins/workspace/gerrit_windows_wsl/connectivity/source/drivers/firebird/Util.cxx:69", Context: @00000054DD3863A0, SQLState: "", ErrorCode: 1, NextException: void: void}
Failures !!!
Run: 3 Failure total: 3 Failures: 0 Errors: 3
Change-Id: I5a4c4b072cc1898340eac176d23a689a3cb67128
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208154
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Give the driver a directory of its own, extract each embedded database
into a subdirectory of it, and set DatabaseAccess so firebird keeps any
associated files it makes for a database in the same directory.
A distro firebird reads only firebird.conf from the directory the
FIREBIRD variable names and finds its other resources at their normal
absolute paths. A bundled firebird finds everything relative to it.
Change-Id: If082a30d2426e7942fc9dd48f7124928fc984434
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/6701
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 520d8173cef39a4da85b3ba21bdaaa3150384c25)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208039
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
When an SQL query has comments then those were deleted
when switching to design view. This is fixed and the comments
are maintained. In the case the query is edited in design
view then the comments are inevitably lost.
Change-Id: Ibcf6e36fce88a526c7340d352aca9859b1b3714e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205441
Tested-by: Jenkins
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
Add cases for date, time and timestamp data types in prepared statement
of firebird embedded database. Add unit tests for this particular case
and for testing the DBTypeConversion functions toDate, toTime,
toDateTime that used in the fix.
Change-Id: I91fd2322598b14f84a96f071ed029c9b3e64d51e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204841
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
The macOS headers included do not collide with LibreOffice types, so the
premac/postmac wrappers are unnecessary.
Change-Id: I3671e6af5f84144eab3439eea076192342ad9fa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201677
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
Replace by operator[], begin() and end(), which don't have overhead
since commit 2484de6728 (Remove non-
const Sequence::begin()/end() in internal code, 2021-10-15)
and commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).
Change-Id: I221470b3439bb0dc6e7705b0d99deb3cd2063484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195176
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
rBHelper was a local variable with the same name of a member variable of
the class ODatabaseMetaDataResultSet. With this patch, we avoid this
name duplication.
The above duplication was causing build problem with the latest VS 2026
compiler:
error C2220: the following warning is treated as an error
warning C4458: declaration of 'rBHelper' hides class member
Change-Id: Id70c690c3b09611aefab720aef1f8c8c1dd46829
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193965
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes
Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>