summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-07-08 08:28:14 +0000
committerOliver Bolte <obo@openoffice.org>2005-07-08 08:28:14 +0000
commitd63b1f88cf8cb4419c5df08c8c25f8c18df9a85b (patch)
tree8b73303bdcbf0af091e58e9a2d89b7c355d0456f /sfx2
parentefc974ec9d1b339102630d982f2651ffb3a46894 (diff)
INTEGRATION: CWS fwk14 (1.48.72); FILE MERGED
2005/05/31 14:51:24 cd 1.48.72.2: #i46092# New ctor to use a provided window parent for SfxPopupWindow 2005/05/31 13:45:24 cd 1.48.72.1: #i46092# New ctor to use a provided window parent for SfxPopupWindow
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx73
1 files changed, 63 insertions, 10 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index c896053e13a3..0d0243ca7df0 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tbxitem.cxx,v $
*
- * $Revision: 1.49 $
+ * $Revision: 1.50 $
*
- * last change: $Author: obo $ $Date: 2005-07-06 09:15:48 $
+ * last change: $Author: obo $ $Date: 2005-07-08 09:28:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -975,21 +975,26 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const ::rtl::OUString& rSub
}
pImpl->mxUIElement = xUIElement;
+ Window* pParentTbxWindow( pImpl->pBox );
Window* pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar );
ToolBox* pToolBar( 0 );
if ( pTbxWindow && pTbxWindow->GetType() == WINDOW_TOOLBOX )
pToolBar = (ToolBox *)pTbxWindow;
- ::Size aSize = getPersistentFloatingSize( xFrame, rSubToolBarResName );
- if ( aSize.Width() == 0 || aSize.Height() == 0 )
+ if ( pToolBar )
{
- // calc and set size for popup mode
- aSize = pToolBar->CalcPopupWindowSizePixel();
- }
- pToolBar->SetSizePixel( aSize );
+ pToolBar->SetParent( pParentTbxWindow );
+ ::Size aSize = getPersistentFloatingSize( xFrame, rSubToolBarResName );
+ if ( aSize.Width() == 0 || aSize.Height() == 0 )
+ {
+ // calc and set size for popup mode
+ aSize = pToolBar->CalcPopupWindowSizePixel();
+ }
+ pToolBar->SetSizePixel( aSize );
- // open subtoolbox in popup mode
- Window::GetDockingManager()->StartPopupMode( pImpl->pBox, pToolBar );
+ // open subtoolbox in popup mode
+ Window::GetDockingManager()->StartPopupMode( pImpl->pBox, pToolBar );
+ }
}
}
}
@@ -1331,6 +1336,54 @@ SfxPopupWindow::SfxPopupWindow(
//--------------------------------------------------------------------
+SfxPopupWindow::SfxPopupWindow(
+ USHORT nId,
+ const Reference< XFrame >& rFrame,
+ Window* pParentWindow,
+ WinBits nBits ) :
+ FloatingWindow( pParentWindow, nBits )
+ , m_nId( nId )
+ , m_bFloating(FALSE)
+ , m_pStatusListener( 0 )
+ , m_bCascading( FALSE )
+ , m_xFrame( rFrame )
+{
+ m_xServiceManager = ::comphelper::getProcessServiceFactory();
+
+ Window* pWindow = SFX_APP()->GetTopWindow();
+ while ( pWindow && !pWindow->IsSystemWindow() )
+ pWindow = pWindow->GetParent();
+
+ if ( pWindow )
+ ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
+}
+
+//--------------------------------------------------------------------
+
+SfxPopupWindow::SfxPopupWindow(
+ USHORT nId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ Window* pParentWindow,
+ const ResId &rId ) :
+ FloatingWindow( pParentWindow, rId )
+ , m_nId( nId )
+ , m_bFloating(FALSE)
+ , m_pStatusListener( 0 )
+ , m_bCascading( FALSE )
+ , m_xFrame( rFrame )
+{
+ m_xServiceManager = ::comphelper::getProcessServiceFactory();
+
+ Window* pWindow = SFX_APP()->GetTopWindow();
+ while ( pWindow && !pWindow->IsSystemWindow() )
+ pWindow = pWindow->GetParent();
+
+ if ( pWindow )
+ ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this );
+}
+
+//--------------------------------------------------------------------
+
SfxPopupWindow::~SfxPopupWindow()
{
if ( m_xStatusListener.is() )