leginee opened a new pull request, #495:
URL: https://github.com/apache/openoffice/pull/495

   ### What this fixes
   In Base, choose Tables → "Use Wizard to Create Table…". If the wizard cannot 
start, Apache OpenOffice today does nothing whatsoever — no dialog, no message, 
no log entry. The menu item simply appears not to work, and there is no way for 
a user or a support volunteer to find out why.
   
   This was reported 18 years ago, in [issue 80338, comment 
21](https://bz.apache.org/ooo/show_bug.cgi?id=80338#c21):
   
   "It is bad that the wizard dialog silently does not appear without any error 
message."
   
   That reporter also guessed where the error was being thrown away — "caught 
and ignored somewhere (libdbaxml680li.so?)". They were right, and this PR fixes 
it at that exact spot.
   
   ### Why it was silent
   Two independent places, both in dbaccess:
   
   dbloader2.cxx (the wizard that starts automatically after you create a new 
database). It asked for the wizard component and checked whether it got one — 
but if the answer was "no", there was no else branch at all. Nothing happened, 
and nothing was reported. If the request instead failed with an error, that 
error was passed to OSL_ENSURE, a debugging aid that is compiled out of release 
builds — so again, nothing.
   
   linkeddocuments.cxx (the "Use Wizard to Create…" menu entries for tables, 
queries, forms and reports). Here the failure was turned into a proper error, 
but it was then discarded by DBG_UNHANDLED_EXCEPTION, which is also debug-only.
   
   In short: in the builds users actually run, both paths threw the explanation 
away.
   
   ### What changes
   Both now show an error box naming the component that could not be started, 
for example:
   
   
   com.sun.star.wizards.table.CallTableWizard:
   unsatisfied query for interface of type com.sun.star.task.XJobExecutor!
   Not beautiful, but it turns "the button does nothing" into something 
diagnosable.
   
   ### Notes for reviewers
   No new translatable strings. The text is the underlying error's own message, 
prefixed with the service name, so there is no translation work and nothing to 
re-import.
   ErrorBox, not InteractionHandler or dbaui::showError. Both were tried first 
and both would have stayed silent: uui's handleRequest_impl matches specific 
request types and returns false for anything else, and showError is documented 
to display nothing when the SQLExceptionInfo is not valid — which a plain 
RuntimeException is not. ErrorBox is already reachable from both libraries.
   The exception is deliberately not rethrown. OnStartTableWizard runs from a 
VCL user event; an escaping exception reaches Desktop::Main's catch-all, which 
calls FatalError() and then _exit() — turning a silent no-op into killing the 
office with unsaved work in other windows.
   No modal UI inside the user-event handler. m_xMySelf keeps the loader alive 
across that event, and a message box pumps a nested event loop during which the 
document/frame creation that posted the handler can drop the last reference. 
The error is therefore collected first, member state settled (with a local 
keep-alive), and only then reported. This was found the hard way — an earlier 
version of this patch crashed on exactly that path.
   Second commit, unrelated
   sdbc_hsqldb: stop preloading two libraries that have not existed for years 
removes two dead System.loadLibrary calls on Windows:
   
   msvcr71 — the Visual Studio 2003 C runtime. Not what AOO builds against, and 
the CRT is resolved through the side-by-side assembly in each library's 
manifest anyway.
   dbtoolsmi — dbtools with the DLL suffix of a much older Windows platform 
set. DLLPOSTFIX is empty in every wntmsci*.mk, so the library has been plain 
dbtools.dll for as long as those files have looked the way they do.
   Both always failed, and the failure is swallowed, so this has been invisible 
rather than harmful. The same two names are still present in LibreOffice.
   
   The two commits are independent — happy to split them into separate PRs if 
preferred.
   
   ### Testing
   Built and exercised on Windows x64. The table wizard entry point now shows 
the dialog above where it previously did nothing; creating a database, adding a 
table, saving and reopening all work, with a clean process exit.
   
   
   🤖 I generated this PR with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to