summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx6
-rw-r--r--basic/source/runtime/runtime.cxx15
2 files changed, 17 insertions, 4 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;
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 2d7b988d7647..11699093e022 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3754,11 +3754,20 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
}
if ( !pElem && pMeth )
{
- // for statics, set the method's name in front
- OUString aMethName = pMeth->GetName() + ":" + rName;
- pElem = pMod->Find(aMethName, SbxClassType::DontCare);
+ const OUString aMethName = pMeth->GetName();
+ // tdf#57308 - check if the name is the current method instance
+ if (pMeth->GetName() == rName)
+ {
+ pElem = pMeth;
+ }
+ else
+ {
+ // for statics, set the method's name in front
+ pElem = pMod->Find(aMethName + ":" + rName, SbxClassType::DontCare);
+ }
}
+
// search in parameter list
if( !pElem && pMeth )
{