[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - framework/source
Jan Holesovsky
kendy at collabora.com
Fri Dec 13 01:04:04 PST 2013
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 26 ++++++----------
1 file changed, 11 insertions(+), 15 deletions(-)
New commits:
commit 171f2ca39a08299abe54e92e8096cdaa5e02a4dc
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Nov 15 10:59:36 2013 +0100
fdo#66864: Return from full-screen should restore toolbars.
The fix for fdo#37758 was not correct, we shouldn't fiddle with the m_bVisible
itself, but instead react on the m_bMasterHide flag; or at least that is my
understanding of the related framework code (why is it so confusing?!)
Change-Id: I791fcea9e5e5313b6a5b776cb3187cbd1a028386
(cherry picked from commit 986644335c3f9e99ec3c6bebc0b75cca0acdf79b)
Reviewed-on: https://gerrit.libreoffice.org/7065
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 52a0d7b..1bb03d1 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -294,7 +294,7 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea()
SolarMutexGuard aGuard;
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && !xDockWindow->isFloating() && pConstIter->m_bVisible )
+ if ( pWindow && !xDockWindow->isFloating() && pConstIter->m_bVisible && !pConstIter->m_bMasterHide )
{
awt::Rectangle aPosSize = xWindow->getPosSize();
if ( pConstIter->m_aDockedData.m_nDockedArea != nCurrDockingArea )
@@ -442,7 +442,7 @@ bool ToolbarLayoutManager::requestToolbar( const OUString& rResourceURL )
if ( !xUIElement.is() )
bMustCallCreate = true;
- bool bCreateOrShowToolbar( aRequestedToolbar.m_bVisible & !aRequestedToolbar.m_bMasterHide );
+ bool bCreateOrShowToolbar( aRequestedToolbar.m_bVisible && !aRequestedToolbar.m_bMasterHide );
uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow, uno::UNO_QUERY );
if ( xContainerWindow.is() && aRequestedToolbar.m_bFloating )
@@ -681,28 +681,24 @@ void ToolbarLayoutManager::setVisible( bool bVisible )
UIElementVector::iterator pIter;
for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); ++pIter )
{
- pIter->m_bMasterHide = !bVisible;
+ if (!pIter->m_bFloating)
+ {
+ UIElement aUIElement(*pIter);
+ aUIElement.m_bMasterHide = !bVisible;
+ implts_setToolbar(aUIElement);
+ implts_setLayoutDirty();
+ }
+
Window* pWindow = getWindowFromXUIElement( pIter->m_xUIElement );
if ( pWindow )
{
- bool bSetVisible( pIter->m_bVisible & bVisible );
+ bool bSetVisible( pIter->m_bVisible && bVisible );
if ( !bSetVisible )
- {
pWindow->Hide();
-
- UIElement aUIElement( *pIter );
- if ( !aUIElement.m_bFloating )
- implts_setLayoutDirty();
-
- aUIElement.m_bVisible = false;
- implts_setToolbar( aUIElement );
- }
else
{
if ( pIter->m_bFloating )
pWindow->Show(true, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
- else
- implts_setLayoutDirty();
}
}
}
More information about the Libreoffice-commits
mailing list