summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-10-20 09:42:35 -0700
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-10-31 12:03:29 +0100
commit23722506efd84a9b7b447578de32c0eef9bf8b98 (patch)
treebb2fcf1bc1d6e6b190163acaa6e72a084b2dd7af /sfx2/source/dialog
parent793ea6fe90209dbf2b659a44a302306a05888011 (diff)
CMIS: added CheckOut in the File menu
Change-Id: I5f003556065cff34cec38148bc3bb4da20692e54
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/infobar.cxx23
1 files changed, 18 insertions, 5 deletions
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 1f979e871514..f92e836abe1d 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -94,9 +94,10 @@ namespace
}
}
-SfxInfoBarWindow::SfxInfoBarWindow( Window* pParent, const rtl::OUString& sMessage,
- vector< PushButton* > aButtons ) :
+SfxInfoBarWindow::SfxInfoBarWindow( Window* pParent, const rtl::OUString& sId,
+ const rtl::OUString& sMessage, vector< PushButton* > aButtons ) :
Window( pParent, 0 ),
+ m_sId( sId ),
m_pMessage( NULL ),
m_pCloseBtn( NULL ),
m_aActionBtns( aButtons )
@@ -243,13 +244,12 @@ SfxInfoBarContainerWindow::~SfxInfoBarContainerWindow( )
m_pInfoBars.clear( );
}
-void SfxInfoBarContainerWindow::appendInfoBar( const rtl::OUString& sMessage, vector< PushButton* > aButtons )
+void SfxInfoBarContainerWindow::appendInfoBar( const rtl::OUString& sId, const rtl::OUString& sMessage, vector< PushButton* > aButtons )
{
Size aSize = GetSizePixel( );
- SfxInfoBarWindow* pInfoBar = new SfxInfoBarWindow( this, sMessage, aButtons );
+ SfxInfoBarWindow* pInfoBar = new SfxInfoBarWindow( this, sId, sMessage, aButtons );
pInfoBar->SetPosPixel( Point( 0, aSize.getHeight( ) ) );
- m_pInfoBars.push_back( pInfoBar );
pInfoBar->Show( );
long nHeight = pInfoBar->GetSizePixel( ).getHeight( );
@@ -257,6 +257,19 @@ void SfxInfoBarContainerWindow::appendInfoBar( const rtl::OUString& sMessage, ve
SetSizePixel( aSize );
}
+SfxInfoBarWindow* SfxInfoBarContainerWindow::getInfoBar( const rtl::OUString& sId )
+{
+ SfxInfoBarWindow* pRet = NULL;
+ for ( vector< SfxInfoBarWindow* >::iterator it = m_pInfoBars.begin( );
+ it != m_pInfoBars.end( ) && pRet == NULL; ++it )
+ {
+ SfxInfoBarWindow* pBar = *it;
+ if ( pBar->getId( ) == sId )
+ pRet = pBar;
+ }
+ return pRet;
+}
+
void SfxInfoBarContainerWindow::removeInfoBar( SfxInfoBarWindow* pInfoBar )
{
for ( vector< SfxInfoBarWindow* >::iterator it = m_pInfoBars.begin( );