summaryrefslogtreecommitdiffstats
path: root/basctl/source
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2021-10-26 21:03:41 +0200
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2021-10-27 09:29:34 +0200
commit7d27e4b0257a8a927d3b59edcd549ff9103cbaa9 (patch)
tree530de5ddcfa682122b6796063c690747ab3ccd04 /basctl/source
parenttry harder not to mix CPU-specific code with generic code (diff)
downloadcore-7d27e4b0257a8a927d3b59edcd549ff9103cbaa9.tar.gz
core-7d27e4b0257a8a927d3b59edcd549ff9103cbaa9.zip
tdf#57308 - Basic IDE: Watching of a variable does not work
Watching a variable which returns a value from a function always shows "out of scope" in the watch window of the Basic IDE. In order to resolve this issue, the name of the variable being watched will be searched also in the current method instance. Change-Id: I5ff6ce22067e11d74275eeb82da814da1eebe3db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124239 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/baside2b.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 5457ebcce376..d998193cc2a5 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2373,7 +2373,7 @@ void WatchWindow::UpdateWatches(bool bBasicStopped)
eEnableChildren = TRISTATE_TRUE;
}
- if (SbxVariable const* pVar = IsSbxVariable(pSBX))
+ if (SbxVariable* pVar = dynamic_cast<SbxVariable*>(pSBX))
{
// extra treatment of arrays
SbxDataType eType = pVar->GetType();
@@ -2486,7 +2486,11 @@ void WatchWindow::UpdateWatches(bool bBasicStopped)
{
aWatchStr += aStrStr;
}
+ // tdf#57308 - avoid a second call to retrieve the data
+ const SbxFlagBits nFlags = pVar->GetFlags();
+ pVar->SetFlag(SbxFlagBits::NoBroadcast);
aWatchStr += pVar->GetOUString();
+ pVar->SetFlags(nFlags);
if( bString )
{
aWatchStr += aStrStr;