diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-14 14:24:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-14 18:02:03 +0100 |
commit | 78693c376ed1bdf6d859a44c2651030dc9c970f8 (patch) | |
tree | 28e1c7ba2a1c7acdb131599691c8774ec0f6a30c /basctl | |
parent | 78a18a5dc6986c9f5612f26d164c62202a1b94f8 (diff) |
tdf#108189 inspection of object hangs LO
There is no general solution to this that I am aware of, so just
implement a rather specific solution that will need periodic extending
to check for other dangerous properties
Change-Id: Ie09d89416fea5b7cdf782319ed9921657faa5a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176593
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/inc/strings.hrc | 1 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc index ee83fbb543b0..8dba3f960c93 100644 --- a/basctl/inc/strings.hrc +++ b/basctl/inc/strings.hrc @@ -114,6 +114,7 @@ #define RID_STR_MODULE_READONLY NC_("RID_STR_READONLY_WARNING", "This module is read-only and cannot be edited.") #define RID_STR_DIALOG_READONLY NC_("RID_STR_READONLY_WARNING", "This dialog is read-only and cannot be edited.") #define RID_LINE_STATUS_CONTROL NC_("RID_LINE_STATUS_CONTROL", "Current line and character. Click to open 'Go to Line' dialog.") +#define RID_VARIABLE_TOO_LARGE_TO_DISPLAY NC_("RID_VARIABLE_TOO_LARGE_TO_DISPLAY", "Variable too large to display in debugger") // Color scheme names #define RID_STR_COLORSCHEME_DEFAULT NC_("RID_STR_COLORSCHEME_DEFAULT", "Default") diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index b3d44695740c..b7b75b958183 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2314,7 +2314,13 @@ SbxBase* WatchWindow::ImplGetSBXForEntry(const weld::TreeIter& rEntry, bool& rbA // Force getting value SbxValues aRes; aRes.eType = SbxVOID; - pVar->Get( aRes ); + if (!isVeryLargeUnoProperty(pVar)) + pVar->Get( aRes ); + else + { + aRes.eType = SbxSTRING; + aRes.pOUString = new OUString("<" + IDEResId(RID_VARIABLE_TOO_LARGE_TO_DISPLAY) + ">"); + } } } // Array? @@ -2495,7 +2501,11 @@ void WatchWindow::UpdateWatches(bool bBasicStopped) { // extra treatment of arrays SbxDataType eType = pVar->GetType(); - if ( eType & SbxARRAY ) + if (isVeryLargeUnoProperty(pVar)) + { + aWatchStr += "<" + IDEResId(RID_VARIABLE_TOO_LARGE_TO_DISPLAY) + ">"; + } + else if ( eType & SbxARRAY ) { // consider multidimensional arrays! if (SbxDimArray* pNewArray = dynamic_cast<SbxDimArray*>(pVar->GetObject())) |