2004-02-25 16:45:23 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* $RCSfile: sfxhelperfunctions.cxx,v $
|
|
|
|
* $Revision: 1.8 $
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
2008-04-11 07:19:45 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-02-25 16:45:23 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 12:49:32 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_framework.hxx"
|
|
|
|
|
2004-07-06 15:56:52 +00:00
|
|
|
#ifndef __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_CXX_
|
2004-02-25 16:45:23 +00:00
|
|
|
#include <classes/sfxhelperfunctions.hxx>
|
2004-07-06 15:56:52 +00:00
|
|
|
#endif
|
2004-02-25 16:45:23 +00:00
|
|
|
|
2004-09-09 16:09:13 +00:00
|
|
|
static pfunc_setToolBoxControllerCreator pToolBoxControllerCreator = NULL;
|
|
|
|
static pfunc_setStatusBarControllerCreator pStatusBarControllerCreator = NULL;
|
2006-04-07 09:18:53 +00:00
|
|
|
static pfunc_getRefreshToolbars pRefreshToolbars = NULL;
|
|
|
|
|
2004-02-25 16:45:23 +00:00
|
|
|
|
|
|
|
using namespace ::com::sun::star::uno;
|
2004-07-06 15:56:52 +00:00
|
|
|
using namespace ::com::sun::star::frame;
|
|
|
|
|
|
|
|
namespace framework
|
|
|
|
{
|
2004-02-25 16:45:23 +00:00
|
|
|
|
2004-07-06 15:56:52 +00:00
|
|
|
pfunc_setToolBoxControllerCreator SAL_CALL SetToolBoxControllerCreator( pfunc_setToolBoxControllerCreator pSetToolBoxControllerCreator )
|
2004-02-25 16:45:23 +00:00
|
|
|
{
|
2004-07-06 15:56:52 +00:00
|
|
|
pfunc_setToolBoxControllerCreator pOldSetToolBoxControllerCreator = pToolBoxControllerCreator;
|
|
|
|
pToolBoxControllerCreator = pSetToolBoxControllerCreator;
|
|
|
|
return pOldSetToolBoxControllerCreator;
|
2004-02-25 16:45:23 +00:00
|
|
|
}
|
|
|
|
|
2004-07-06 15:56:52 +00:00
|
|
|
svt::ToolboxController* SAL_CALL CreateToolBoxController( const Reference< XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL )
|
2004-02-25 16:45:23 +00:00
|
|
|
{
|
2004-07-06 15:56:52 +00:00
|
|
|
if ( pToolBoxControllerCreator )
|
|
|
|
return (*pToolBoxControllerCreator)( rFrame, pToolbox, nID, aCommandURL );
|
2004-02-25 16:45:23 +00:00
|
|
|
else
|
2004-07-06 15:56:52 +00:00
|
|
|
return NULL;
|
2004-02-25 16:45:23 +00:00
|
|
|
}
|
|
|
|
|
2004-09-09 16:09:13 +00:00
|
|
|
pfunc_setStatusBarControllerCreator SAL_CALL SetStatusBarControllerCreator( pfunc_setStatusBarControllerCreator pSetStatusBarControllerCreator )
|
|
|
|
{
|
|
|
|
pfunc_setStatusBarControllerCreator pOldSetStatusBarControllerCreator = pSetStatusBarControllerCreator;
|
|
|
|
pStatusBarControllerCreator = pSetStatusBarControllerCreator;
|
|
|
|
return pOldSetStatusBarControllerCreator;
|
|
|
|
}
|
|
|
|
|
|
|
|
svt::StatusbarController* SAL_CALL CreateStatusBarController( const Reference< XFrame >& rFrame, StatusBar* pStatusBar, unsigned short nID, const ::rtl::OUString& aCommandURL )
|
|
|
|
{
|
|
|
|
if ( pStatusBarControllerCreator )
|
|
|
|
return (*pStatusBarControllerCreator)( rFrame, pStatusBar, nID, aCommandURL );
|
|
|
|
else
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2006-04-07 09:18:53 +00:00
|
|
|
pfunc_getRefreshToolbars SAL_CALL SetRefreshToolbars( pfunc_getRefreshToolbars pNewRefreshToolbarsFunc )
|
|
|
|
{
|
|
|
|
pfunc_getRefreshToolbars pOldFunc = pRefreshToolbars;
|
|
|
|
pRefreshToolbars = pNewRefreshToolbarsFunc;
|
|
|
|
|
|
|
|
return pOldFunc;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL RefreshToolbars( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame )
|
|
|
|
{
|
|
|
|
if ( pRefreshToolbars )
|
|
|
|
(*pRefreshToolbars)( rFrame );
|
|
|
|
}
|
|
|
|
|
2004-07-06 15:56:52 +00:00
|
|
|
}
|