summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-03-18 10:09:11 +0000
committerOliver Bolte <obo@openoffice.org>2005-03-18 10:09:11 +0000
commitf985a16e7061a1886a4ef4a3642b26eab29a5b3c (patch)
tree88a7d1e817479ae0614de3ff36c852add4b9adff /framework/source
parent16a8b834f0db6495ddc84eb9ec3258cf3e236eb4 (diff)
INTEGRATION: CWS fwkpostbeta04 (1.22.28); FILE MERGED
2005/03/03 17:33:24 cd 1.22.28.2: RESYNC: (1.22-1.23); FILE MERGED 2005/03/02 16:26:34 cd 1.22.28.1: #i43731# Make status bar aware of embedded object situation
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx36
1 files changed, 30 insertions, 6 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 53aad694c7e3..e3c1af7674fa 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: layoutmanager.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: obo $ $Date: 2005-03-15 11:36:22 $
+ * last change: $Author: obo $ $Date: 2005-03-18 11:09:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -722,6 +722,23 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
implts_unlock();
}
+sal_Bool LayoutManager::implts_isEmbeddedLayoutManager() const
+{
+ // check if this layout manager is currently using the embedded feature
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ ReadGuard aReadLock( m_aLock );
+ Reference< XFrame > xFrame = m_xFrame;
+ Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow );
+ aReadLock.unlock();
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+
+ Reference< css::awt::XWindow > xFrameContainerWindow = xFrame->getContainerWindow();
+ if ( xFrameContainerWindow == xContainerWindow )
+ return sal_False;
+ else
+ return sal_True;
+}
+
void LayoutManager::implts_destroyElements()
{
UIElementVector aUIElementVector;
@@ -3116,11 +3133,13 @@ void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Siz
{
Reference< XUIElement > xStatusBar;
Reference< XUIElement > xProgressBar;
+ Reference< css::awt::XWindow > xContainerWindow;
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
ReadGuard aReadLock( m_aLock );
xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
+ xContainerWindow = m_xContainerWindow;
Reference< css::awt::XWindow > xWindow;
if ( xStatusBar.is() )
@@ -3136,9 +3155,14 @@ void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Siz
if ( xWindow.is() )
{
- xWindow->setPosSize( rPos.X(), rPos.Y(),
- rSize.Width(), rSize.Height(),
- css::awt::PosSize::POSSIZE );
+ vos::OGuard aGuard( Application::GetSolarMutex() );
+ Window* pParentWindow = VCLUnoHelper::GetWindow( xContainerWindow );
+ Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+ if ( pParentWindow && ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR ))
+ {
+ pWindow->SetParent( pParentWindow );
+ ((StatusBar *)pWindow)->SetPosSizePixel( rPos, rSize );
+ }
}
}
@@ -3716,7 +3740,7 @@ throw (RuntimeException)
}
aWriteLock.unlock();
}
- else if ( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && xFrame->isTop() )
+ else if ( aElementType.equalsIgnoreAsciiCaseAscii( "statusbar" ) && ( xFrame->isTop() || implts_isEmbeddedLayoutManager() ))
{
implts_createStatusBar( aName );
}