diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-24 12:46:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-24 15:26:21 +0200 |
commit | 78cee244be863a14dfc76e4540b21dd08dba5e5a (patch) | |
tree | 8d8b053459db61b44793b62d34f3f241e9787486 /forms | |
parent | b0886a4dc7e5a34ab3ee302b6ad6c30c0ce6a0af (diff) |
make it possible to build required database stuff for fuzzing
The dbase filter requires dbaccess and connectivity but I don't want
to pull in the rest of the stuff that --disable-database-connectivity
currently disables that we still don't need for fuzzing if
--disable-database-connectivity is removed
Change-Id: Ia48d42295f9724b4dd2d3beb8e46ed23fc789f5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122579
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/Filter.cxx | 11 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 11 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 3 |
3 files changed, 14 insertions, 11 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 0bf85648ddba..ce137f3bb1ca 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <config_features.h> +#include <config_fuzzers.h> #include <string_view> @@ -90,7 +91,7 @@ namespace frm bool OFilterControl::ensureInitialized( ) { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS if ( !m_xField.is() ) { OSL_FAIL( "OFilterControl::ensureInitialized: improperly initialized: no field!" ); @@ -271,7 +272,7 @@ namespace frm void SAL_CALL OFilterControl::itemStateChanged( const ItemEvent& rEvent ) { -#if !HAVE_FEATURE_DBCONNECTIVITY +#if !HAVE_FEATURE_DBCONNECTIVITY || ENABLE_FUZZERS (void) rEvent; #else OUStringBuffer aText; @@ -366,7 +367,7 @@ namespace frm void OFilterControl::implInitFilterList() { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS if ( !ensureInitialized( ) ) // already asserted in ensureInitialized return; @@ -491,7 +492,7 @@ namespace frm sal_Bool SAL_CALL OFilterControl::commit() { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS if ( !ensureInitialized( ) ) // already asserted in ensureInitialized return true; @@ -806,7 +807,7 @@ namespace frm void OFilterControl::initControlModel(Reference< XPropertySet > const & xControlModel) { -#if !HAVE_FEATURE_DBCONNECTIVITY +#if !HAVE_FEATURE_DBCONNECTIVITY || ENABLE_FUZZERS (void) xControlModel; #else if ( !xControlModel.is() ) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index b58fb00cd8e9..f719ed3af040 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_fuzzers.h> #include "ListBox.hxx" #include <property.hxx> @@ -345,7 +346,7 @@ namespace frm } break; -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS case PROPERTY_ID_SELECT_VALUE : { ORowSetValue v; @@ -875,7 +876,7 @@ namespace frm switch (m_eListSourceType) { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS case ListSourceType_SQL: case ListSourceType_SQLPASSTHROUGH: case ListSourceType_TABLE: @@ -1206,7 +1207,7 @@ namespace frm sal_Int32 nCount(0); -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS sal_Int16 *pIndex = aSelectionIndicies.getArray(); for ( auto const & value : i_aValues) { @@ -1241,7 +1242,7 @@ namespace frm Any OListBoxModel::translateDbColumnToControlValue() { -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS Reference< XPropertySet > xBoundField( getField() ); if ( !xBoundField.is() ) { @@ -1360,7 +1361,7 @@ namespace frm break; case eValue: -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS { ORowSetValue v; v.fill(_rExternalValue); diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index fa8e092ab5cb..2a87bb2bd2c9 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_fuzzers.h> #include "formoperations.hxx" #include <frm_strings.hxx> @@ -1739,7 +1740,7 @@ namespace frm { f(); } -#if HAVE_FEATURE_DBCONNECTIVITY +#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS catch( const SQLException& ) { if (!pErrorResourceId) // no information to prepend |