summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-19 09:35:41 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-04-19 12:05:43 +0200
commitc2c3d04478f0228f4914cd78f84113f939dcf325 (patch)
tree7ad7fda0197680c95725e9b79fbf535303b52687 /basctl
parentc9e7fc3741107486c5d785575d8d2fb2f974b792 (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/+/150568 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/dlged/dlgedobj.cxx21
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() )
{