[Libreoffice] Trouble of showing LibreOffice/OpenOffice toolbar back
Michael Meeks
michael.meeks at suse.com
Mon Oct 24 05:47:13 PDT 2011
Hi Noel & co.
I'll CC the public dev list on this since it may be of wider interest.
On Mon, 2011-10-24 at 11:24 +0100, Noel Power wrote:
> something like this should work ( although doesn't on master or 3.4
> but... does appear to work on 3.3 :-/ ) seems like this really is a
> regression
Carlos - reading the code, it looks like 'setVisible' is what you want
to be calling - it -looks- (on a first glance) as if it doesn't save the
state in this case - so it should be something we can call and will not
alter the other documents (but perhaps I'm mistaken).
> sub togglefind
> layoutManager = thisComponent.currentController.frame.layoutManager
> findbarUrl = "private:resource/toolbar/findbar"
> bVis = layoutmanager.iselementvisible( "private:resource/toolbar/findbar" )
> msgbox "Findbar currently IsVisible? " & bVis
>
> if bVis then
> layoutmanager.hideElement( findbarUrl )
> else
> layoutmanager.showelement( findbarUrl )
> endif
>
> end sub
I'm personally suspicious of:
commit 560e5132f606b1fcd790e3cf97d665cec8c442fc
Author: Carsten Driesner <cd at openoffice.org>
Date: Mon Nov 1 13:29:26 2010 +0100
dockingwindows: #i112595# Fixed problem related to changes for
better layouting. Further code rework
Which does the:
- if ( pWindow && pIter->m_bFloating )
- pWindow->Show(bVisible & bToolbarVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ if ( pWindow )
+ {
+ bool bSetVisible( pIter->m_bVisible & bVisible );
+ if ( !bSetVisible )
+ pWindow->Hide();
+ else
+ {
+ if ( pIter->m_bFloating )
+ pWindow->Show(true, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ else
+ implts_setLayoutDirty();
+ }
Which (at first glance) doesn't seem to hide non-floating windows ( or
perhaps I'm missing how the dirty notification propagates somehow ).
HTH,
Michael.
--
michael.meeks at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list