extensions/source/propctrlr/standardcontrol.cxx | 3 ++- forms/source/xforms/datatypes.cxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit 0138745f0206f348644fd6d47c7316c8190d711b Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun May 14 21:16:30 2023 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Thu May 18 12:40:03 2023 +0200 tdf#155123: XML Form: Deleting parts of user defined data type impossible 2 parts: 1) in extensions/source/propctrlr/standardcontrol.cxx if value retrieved from the field is 0, let's return an empty Any var. 2) forms/source/xforms/datatypes.cxx Allow to select 0 in the spinbox for String and URI ("hyperlink") datatypes to be homogeneous Change-Id: Ife9a94c279e8651623112c0bf8a64555cb9c556c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151740 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 9468ecc56745..ad978253b076 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -499,7 +499,8 @@ namespace pcr if ( !getTypedControlWindow()->get_text().isEmpty() ) { double nValue = impl_fieldValueToApiValue_nothrow( getTypedControlWindow()->get_value( m_eValueUnit ) ); - aPropValue <<= nValue; + if (nValue) + aPropValue <<= nValue; } return aPropValue; } diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index e81f40246425..c2612f65f0ca 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -514,7 +514,7 @@ namespace xforms { sal_Int32 nValue( 0 ); OSL_VERIFY( _rNewValue >>= nValue ); - if ( nValue <= 0 ) + if ( nValue < 0 ) _rErrorMessage = "Length limits must denote positive integer values."; // TODO/eforms: localize the error message } @@ -635,7 +635,7 @@ namespace xforms { sal_Int32 nValue( 0 ); OSL_VERIFY( _rNewValue >>= nValue ); - if ( nValue <= 0 ) + if ( nValue < 0 ) _rErrorMessage = "Length limits must denote positive integer values."; // TODO/eforms: localize the error message }