Hello Carl, On Tue, Jul 27, 2021 at 10:14:55PM -0400, Carl Marcum wrote:
> Hi Arrigo, > > On 7/27/21 4:21 PM, Arrigo Marchiori wrote: > > Hello All, > > > > resurrecting an old thread. > > > > On Thu, May 27, 2021 at 02:19:44PM -0000, Yuri Dario wrote: > > > > > Hi, > > > > > > > i can build AOO 4.2.x without problems with gcc 6.3 which is in Debian 9 > > > > I had problems to build it at Debian 10 with gcc 8.3. > > > here I have a 4.2 build done under Manjaro with gcc 9.2: saving a diagram > > > in ods format works fine, so it doesn't seems to be a compiler issue; > > > > > > How is XML writing done with ODS files? > > It's... complicated ;-) > > > > I tried to dig deeper into this problem, as I could reproduce it with > > the "catalina" branch on our Mac Mini. > > > > > > Executive Summary (TL;DR ;-) > > ============================ > > A boolean setting is not recognized as a boolean. An exception is > > thrown when accessing it. The exception is swallowed and the XML > > files' contents are not written. [...] > > Would it be worth a try to check that the value type of the Any is a bool > before accessing it like code further down at line 2114: > > if (xPropertySetInfo->hasPropertyByName(sRepeat)) > { > uno::Any aAny = mxExportInfo->getPropertyValue(sRepeat); > if (aAny.getValueType() == getBooleanCppuType()) > mpProgressBarHelper->SetRepeat(::cppu::any2bool(aAny)); > else { > DBG_ERRORFILE("why is it no boolean?"); > } > } I believe that this would surely help avoiding that specific exception and possibly allow the chart to be saved. But why cannot we trust that value, that was explicitly set as a boolean, and is not later recognized as such? And why does this happen only when using certain compilers? I am afraid there is something bigger behind this problem. Similar problems could be scattered around the code, and may silently corrupt user data. Exceptions are routinely swallowed, therefore the user is hardly informed when something wrong has happened (we should have got a warning just for this problem, and we did not!). To use a common metaphor, we should refrain from chasing chicken, and rather repair the fence. But can we? Best regards, -- Arrigo --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org