To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=90158
                 Issue #|90158
                 Summary|Can't close floating Gallery window when OOo is embedd
                        |ed
               Component|framework
                 Version|OOo 2.4.0
                Platform|PC
                     URL|
              OS/Version|Windows, all
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|mba
             Reported by|tml





------- Additional comments from [EMAIL PROTECTED] Fri May 30 12:52:11 +0000 
2008 -------
When an application on Windows "embeds" OOo Writer in a window of its own, and
you have last had the Gallery window (Tools:Gallery) open (either floating or
docked) in a normal freestanding OOo, the Gallery window is opened too (as
floating), and can't be closed. Clicking on the close button of the Gallery
window's title bar does nothing.

Unfortunately the embedding application is rather huge, and I don't have access
to its source code, so I am not able to pick out code from it to reproduce this
with a minimal test program.

As far as I understand from spending too much time in the debugger, the critical
place where the behaviour differs between closing a floating Gallery window of a
freestanding OOo and one of an embedded one is in
sfx2/source/control/dispatch.cxx, in SfxDispatcher::_FindServer(), around line 
2482:

// Shell und Slot passen zusammen
if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
        ( !bIsContainerSlot && bIsServerShell ) ) )
        pSlot = 0;

In the embedded case bIsContainerShell=0, bIsContainerSlot=1 and
bIsServerShell=1. In the freestanding case again at that point 
bIsContainerShell=1. 

This means that in the embeddes case pSlot gets set to 0, and then later:

if ( pSlot )
{
        rServer.SetSlot(pSlot);
        rServer.SetShellLevel(i);
        return sal_True;
}

the condition thus is false. In the freestanding case this is where
SfxDispatcher::_FindServer() returns sal_True, which apparently then means that
the Gallery window does close. In the embedded case sal_False is returned, and
the attempt to close the window is ignored.

Hopefully somebody understands the code and what is going on...

I think the ideal solution to this would be that docking windows wouldn't be
opened at all in an embedded OOo instance, but it would be enough if it was
possible to close them at least...

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to