<div dir="ltr"><div>Awesome, thanks!</div><div>Gonna start looking at it.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie, 5 mar 2021 a las 13:17, Caolán McNamara (<<a href="mailto:caolanm@redhat.com">caolanm@redhat.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 2021-03-05 at 12:17 +0100, Dante Doménech wrote:<br>
> Hello.<br>
> I'm trying to find a piece of code.<br>
> When you run ./instdir/program/soffice --math for opening the math<br>
> module there must be a point in which you initialize everything<br>
> (smviewshell, smdochell, smeditwindow, smelementsdockingwindow, ...).<br>
> The question is where can I find that code?<br>
<br>
You can launch in a debugger and set breakpoints in their ctor to see<br>
when they are created. SmModule::SmModule should be the first thing<br>
called, but just once, so its possible that SmModule is useful to you.<br>
<br>
On a typical startup then a SmDocShell is created, followed by<br>
SmViewShell, SmEditWindow (which itself owns another embedded<br>
SmDocShell) and SmElementsDockingWindow.<br>
<br>
SmCmdBoxWrapper (which owns the SmEditWindow) and<br>
SmElementsDockingWindow are registered to be created for SmViewShell at<br>
SmViewShell::InitInterface_Impl.<br>
<br>
So the launching code somewhere in sfx will create a SmDocShell and<br>
then create a SmViewShell to put it into to and create all those<br>
registered childwindows for the SmViewShell<br>
<br>
</blockquote></div>