summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-04-23 15:31:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-04-23 18:50:20 +0200
commit979164938007e4774b7718abcb20fded9a00839f (patch)
tree41ee64484cd76d04aabff5529b078580cdb1e14d /sc/source
parent8f3a19ce3a2dea548f644a8925bfe0718424ac21 (diff)
tdf#160768 Changing value in a text box control with a link cell set up, Crash
regression from commit 7510cca63690ea97eb02a43f698fc183c3d0434a Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Mar 26 15:56:02 2024 +0200 convert OCellValueBinding to comphelper::WeakComponentImplHelper Change-Id: I36ec4cca7a48992b29d6c2ff5c87fb0fed1c8c3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166540 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index d1fa61175557..c728f503a856 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -286,7 +286,12 @@ namespace calc
OUString sText;
aValue >>= sText;
if ( m_xCellText.is() )
+ {
+ // might call back into us via modified(EventObject&)
+ aGuard.unlock();
m_xCellText->setString( sText );
+ aGuard.lock();
+ }
}
break;
@@ -302,7 +307,12 @@ namespace calc
double nCellValue = bValue ? 1.0 : 0.0;
if ( m_xCell.is() )
+ {
+ // might call back into us via modified(EventObject&)
+ aGuard.unlock();
m_xCell->setValue( nCellValue );
+ aGuard.lock();
+ }
setBooleanFormat();
}
@@ -315,7 +325,12 @@ namespace calc
double nValue = 0;
aValue >>= nValue;
if ( m_xCell.is() )
+ {
+ // might call back into us via modified(EventObject&)
+ aGuard.unlock();
m_xCell->setValue( nValue );
+ aGuard.lock();
+ }
}
break;
@@ -327,7 +342,12 @@ namespace calc
aValue >>= nValue; // list index from control layer (0-based)
++nValue; // the list position value in the cell is 1-based
if ( m_xCell.is() )
+ {
+ // might call back into us via modified(EventObject&)
+ aGuard.unlock();
m_xCell->setValue( nValue );
+ aGuard.lock();
+ }
}
break;
@@ -341,7 +361,10 @@ namespace calc
{
Sequence<Any> aInner(1); // one empty element
Sequence< Sequence<Any> > aOuter( &aInner, 1 ); // one row
+ // might call back into us via modified(EventObject&)
+ aGuard.unlock();
xData->setDataArray( aOuter );
+ aGuard.lock();
}
}
break;