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

--- Comment #22 from Mike Kaganski <[email protected]> ---
(In reply to Mike Kaganski from comment #21)
> And the same frame 29 has pClipDoc, which has a single "Sheet.1" in
> maTabNames, and a single element in maTabs with aName and aCodeName equal to
> "Sheet.1", and empty aUpperName. It is created right there, in the
> ScViewFunc::CopyToClipSingleRange (the caller sends nullptr).

In fact. the document used in frame 0 is created also there in frame 29, right
after the pClipDoc is created:

    if ( bSysClip && bIncludeObjects )
    {
        bool bAnyOle = rDoc.HasOLEObjectsInArea( aRange );
        // Update ScGlobal::xDrawClipDocShellRef.
        ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc(
bAnyOle ) );
    }

ScTransferObj::SetDrawClipDoc creates a new ScDocShell, which created a new
ScDocument (m_aDocument).

So maybe the code in frame 29 needs to create the ScDocShell when it needs a
pClipDoc, and then pass it to the SetDrawClipDoc to avoid two different
documents?

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

Reply via email to