diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-19 09:35:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-04-19 13:52:23 +0200 |
commit | 8550aff56cec3fbe3a4b8c753d6869d0ad94f702 (patch) | |
tree | 84579a572476ccc10eeef7c36d10695e7467aaba /basctl | |
parent | 0f6e6e82a4a693a6970540db6e98d0302f3fefa6 (diff) |
Resolves: tdf#104011 add a default CellRange argument in dialog editor
so the form combo box can be added without exception, likely either a problem
from:
commit 9cff030fa15f89fa1009fbb3827ab11c43c20b04
Date: Mon Dec 5 09:56:17 2011 +0000
add some form control support for basic dialogs
or:
commit c0d6bc75b223e9e477ef3669f7dc4abec703ecf6
Date: Fri Jun 5 14:52:44 2015 +0100
Resolves: tdf#90361 CellValueBinding/CellRangeListSource need WithArguments
Change-Id: I80e670840195a6725a9fdedc024f9763ad12ffe7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150599
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 3e06307941da..1f4421d5ca43 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/script/XScriptEventsSupplier.hpp> #include <com/sun/star/table/CellAddress.hpp> +#include <com/sun/star/table/CellRangeAddress.hpp> #include <cppuhelper/exc_hlp.hxx> #include <o3tl/functional.hxx> #include <svx/svdpagv.hxx> @@ -1673,17 +1674,21 @@ void DlgEdObj::MakeDataAware( const Reference< frame::XModel >& xModel ) if ( !xFac.is() ) return; - css::table::CellAddress aApiAddress; - - //tdf#90361 CellValueBinding and CellRangeListSource are unusable + //tdf#90361 and tdf#104011 CellValueBinding and CellRangeListSource are unusable //without being initialized, so use createInstanceWithArguments with a - //dummy BoundCell instead of createInstance. This at least results in + //dummy BoundCell and CellRange instead of createInstance. This at least results in //the dialog editor not falling. - css::beans::NamedValue aValue; - aValue.Name = "BoundCell"; - aValue.Value <<= aApiAddress; + css::beans::NamedValue aCellValue; + aCellValue.Name = "BoundCell"; + css::table::CellAddress aCellAddress; + aCellValue.Value <<= aCellAddress; + + css::beans::NamedValue aCellRange; + aCellRange.Name = "CellRange"; + css::table::CellRangeAddress aRangeAddress; + aCellRange.Value <<= aRangeAddress; - Sequence< Any > aArgs{ Any(aValue) }; + Sequence< Any > aArgs{ Any(aCellValue), Any(aCellRange) }; if ( xBindable.is() ) { |