https://bugs.documentfoundation.org/show_bug.cgi?id=170399

Michael Weghorn <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
           Assignee|[email protected] |[email protected]
                   |desktop.org                 |
             Status|NEW                         |RESOLVED

--- Comment #5 from Michael Weghorn <[email protected]> ---
(In reply to wildgugu2020 from comment #3)
> Hi, although I couldn't find the crash reason atm, part of the reason seems
> to be 
> 
> LoadEnv::impl_searchRecycleTarget() is expecting templates to reuse the 
> start center but in manage templates view, the templates that are right
> click and open as edit are not loaded as templates.
> 
> Inside templatedlg.cxx, changing aArgs property, AsTemplate to true fixes
> the crash for now.
> 
> IMPL_LINK(SfxTemplateManagerDlg, EditTemplateHdl, ThumbnailViewItem*, pItem,
> void)
> {
>     uno::Sequence< PropertyValue > aArgs{
>         comphelper::makePropertyValue(u"AsTemplate"_ustr, true),
> ...}
> 
> Even it is created as a new frame, it shouldn't close together with the
> start center like other documents that are created as new frames.

That indeed avoids the crash in a quick test. But it would mean that you now
get a new document (e.g. "Untitled 1") based on the template, instead of being
able to edit the actual template, so that wouldn't be ideal.

I've merged my change for now to have the crash fixed in time for the 26.2
release. (This gives time to take a closer look without needing to rush in any
way, if you're interested.)

If you come up with a different idea/solution, then this can of course be
changed again.
Thanks a lot for looking into this and your input in Gerrit and by email!

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to