diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2021-10-26 21:03:41 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2021-10-27 09:29:34 +0200 |
commit | 7d27e4b0257a8a927d3b59edcd549ff9103cbaa9 (patch) | |
tree | 530de5ddcfa682122b6796063c690747ab3ccd04 /basctl | |
parent | 12c6b1ef6a824b09778163ec83fc44bb196e65db (diff) |
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')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 6 |
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; |