Status report: consultancy team, week 10, 2024

Caolan

  • tdf#159696 Small capitals with ‘Individual words’
    underlining regression
  • tdf#159854 Trigger text is black on dark grey in Animation sidebar
  • GLib-GObject-CRITICAL **: gsignal.c:2778: instance X has no
    handler with id Y
  • some debugging of large-document writer test
  • experiment with deferring resolving NumberFormat info until needed
    → defer resolving numberformat info until requested
    • subtracting numbers wants to know if they are durations, etc
      looks like even totally general simple case isn’t easy
    • a bunch of other formatting stuff then hooks off
      that, conditionally, though it could be chained I guess and
      resolved when ultimately required, seems a bit of a stretch to
      be practical
  • tdf#160056 comphelper::rng takes a mutex for every random number
  • tdf#159966 push back on getAccessibleName no longer returns string
    for vertical scrollbar as a regression
  • I wonded if we initializing std::mt19937 correctly via a
    single uint32_t seed. Its common place, but there are
    some suggestions that using a std::seed_seq of length
    STD_RNG_ALGO::state_size is more proper, though that’s a big number
  • some apparent regression pinned on me
    https://gerrit.libreoffice.org/c/core/+/164461
  • work on refactoring SvNumberFormatter for a ReadOnly unlocked mode
  • what ImpGetDefaultCurrencyFormat fetches should be prefetched
  • SvNumberFormatter calls a bunch of other stuff that has various
    hidden const_casts in there
  • fix some new coverity warnings, common to add a new member variable,
    init in ctor, but miss that there are more than one ctor and not
    init in the other
  • measure improvement to date in SvNumberFormatter, surprisingly
    tricky to do that. Calc threaded vs unthreaded mode are not actually
    the same outside the “if (threaded) else (not-hreaded)”
    InterpretFormulaGroup conditional, there’s another big piece of work
    only done in unthreaded mode that depends on the return code from
    that
  • unlocking rng needs to be moved out of ScInterpreter into at least
    ScInterpreterContext, current new location is setup and torn down
    way too frequently.

Mike

  • Span is closed twice in exported ReqIF-XHTML
    ** https://gerrit.libreoffice.org/c/core/+/164325
  • Word OLE causes ressource leak in winword.exe
    ** Repro
    ** Debugging
    ** the issue is manifested
    because of the “OnMainThread” in the loadComponentFromURL call. This
    marshals the call to main thread. But that means that the OLE object gets
    activated in VCL Main thread.
    ** But it is just one possibility. E.g., the Excel OLE isn’t activated in
    the loadComponentFromURL; thus, it could get activated in the ORequestThread
    (handling the Java connection), with the same “load in main thread” code -
    if it tried to do something with OLE after loading.
    ** So some way is needed to ensure the correct thread. I see two options:
    (1) store the thread used when RunObject was called with the OleComponent
    (and try to marshal the request to call CloseObject there); (2) have a
    dedicated OLE open/close thread, and marshal all calls to
    OleComponent::RunObject / OleComponent::CloseObject there. The latter is
    preferable IMO.
    ** Related to Miklos’ https://gerrit.libreoffice.org/c/core/+/114805
    ** and https://gerrit.libreoffice.org/c/core/+/65453/
    ** and https://gerrit.libreoffice.org/c/core/+/115236
    ** IGlobalInterfaceTable (objidl.h) - Win32 apps | Microsoft Learn
    ** Implementing it based on IGlobalInterfaceTable
    ** It looks reasonable. Let me only hope that the three mutexes involved
    here (solar mutex, OleEmbeddedObject mutex, and OleComponent mutex) don’t
    start deadlocking left and right
    ** Some deadlocks happen right away, but look straightforward
    ** Now bugdoc crashes in a callback, where an SvRef for an already
    destroy(ed?ing?) SfxObjectShell is being created…
    ** Fixed by replacing a pointer with SfxObjectShellRef
    ** The test with the bugdoc and their Java code modified to perform 10 000
    iterations succeeds
    ** preparing patches
    ** https://gerrit.libreoffice.org/c/core/+/164457
    ** a build fix is needed: https://gerrit.libreoffice.org/c/core/+/164386 (I
    wonder how could it pass?)
    ** SfxObjectShellRef change
    (https://gerrit.libreoffice.org/c/core/+/164458) seems to crash on Linux
    ** Implementing SfxObjectShellRef using shared_ptr
    ** Needs special handling of creation, because ctor of object shells
    created document, which creates a reference to the shell, before the shell’s
    ctor finishes, and things like make_shared have a chance to create a first
    reference
    ** Re-implementing SfxObjectShellRef using shared_ptr, following Noel’s
    advise
    ** Finally seems working
    ** Needs handling of concurrent closing request while in creation of a
    preview
    ** Have a patch… (https://gerrit.libreoffice.org/c/core/+/164632)

Tomaz

pivot table cell format:

  • Implemented reading “formats” element for the OOXML pivot table
    • currently the Dxf, which is used to define the cell format is written to
      a style (used by conditional formatting)
    • will need to change this later to read as a direct formatting and not
      style, but also handle conditional formatting to keep creating styles
    • currently convenient as the formatting is just referenced by a style
      name
  • Looked into “references” element that is used to reference which cell of
    the pivot table should be formatted with a custom format (dxf)
    • looks incredibly complicated for no particular reason
    • for example if a header value is spanning 2 cells, the first one has an
      offset attribute “A256” and the second one “B256” …
    • no idea where 256 comes from - no explanation in specs that I could
      found - really annoying
    • will just have to reverse engineer this
  • Added the format data to the pivot table - directly to the DPSaveData,
    which is then later handed over to the DPOutput
    • still it look very backwards to me how this works
    • we set the DPSaveData to setup the pivot table (for exmaple form the
      dialog)
    • this is then converted to the xSource, which is a UNO structure
    • then when we want to output the pivot table to the sheet, we create a
      DPOutput instance and we read from the UNO structure and setup the pivot
      table output
    • why is DPSaveData (or some other internal class) not used for this
      instead and the UNO structure creates the internal structure, which is then
      handed over to the DPOutput
    • why easy when you can complicate things instead?
    • so to extend this and add formats I have to extend the UNO structure
      too… bleh not doing it
    • instead of this I just set the formats definition directly to the
      DPOutput
  • Able to apply the formatting (style) to the pivot table, but not yet to
    the correct cell (just to all cells)
    • continuing with making this work - read and set header values first,
      then do data

Miklos

Worked on: