summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-15 10:59:36 +0100
committerJan Holesovsky <kendy@collabora.com>2013-11-15 11:11:47 +0100
commit986644335c3f9e99ec3c6bebc0b75cca0acdf79b (patch)
tree0f5888a1a7e9d53cd4c98fd7d8a688a2a4347f58
parent01af3e2efd4f7e0994340cb5b09c252323de63d9 (diff)
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
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx26
1 files changed, 11 insertions, 15 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index bd2f04e883df..97cfa764c72b 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();
}
}
}