some interface changes for imageproducer
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: imageproducer.hxx,v $
|
* $RCSfile: imageproducer.hxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.1 $
|
* $Revision: 1.2 $
|
||||||
*
|
*
|
||||||
* last change: $Author: cd $ $Date: 2001-05-03 08:02:22 $
|
* last change: $Author: mba $ $Date: 2001-05-03 17:03:56 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -79,10 +79,15 @@
|
|||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef Image* ( *pfunc_getImage)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL );
|
namespace framework
|
||||||
|
{
|
||||||
|
|
||||||
|
typedef Image ( *pfunc_getImage)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig );
|
||||||
|
|
||||||
pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc );
|
pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc );
|
||||||
|
|
||||||
Image* SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL );
|
Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
#endif // __FRAMEWORK_HELPER_IMAGEPRODUCER_HXX_
|
#endif // __FRAMEWORK_HELPER_IMAGEPRODUCER_HXX_
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: bmkmenu.cxx,v $
|
* $RCSfile: bmkmenu.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.2 $
|
* $Revision: 1.3 $
|
||||||
*
|
*
|
||||||
* last change: $Author: cd $ $Date: 2001-05-03 08:04:20 $
|
* last change: $Author: mba $ $Date: 2001-05-03 17:04:14 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -277,11 +277,11 @@ void BmkMenu::Initialize()
|
|||||||
{
|
{
|
||||||
USHORT nId = CreateMenuId();
|
USHORT nId = CreateMenuId();
|
||||||
|
|
||||||
Image* pImage = GetImageFromURL( m_xFrame, aURL );
|
Image aImage = GetImageFromURL( m_xFrame, aURL, FALSE );
|
||||||
if ( pImage )
|
if ( !aImage )
|
||||||
InsertItem( nId, aTitle, *pImage );
|
|
||||||
else
|
|
||||||
InsertItem( nId, aTitle );
|
InsertItem( nId, aTitle );
|
||||||
|
else
|
||||||
|
InsertItem( nId, aTitle, aImage );
|
||||||
|
|
||||||
BmkMenu::Attributes* pUserAttributes = new BmkMenu::Attributes;
|
BmkMenu::Attributes* pUserAttributes = new BmkMenu::Attributes;
|
||||||
pUserAttributes->aTargetFrame = aTargetFrame;
|
pUserAttributes->aTargetFrame = aTargetFrame;
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: menumanager.cxx,v $
|
* $RCSfile: menumanager.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.6 $
|
* $Revision: 1.7 $
|
||||||
*
|
*
|
||||||
* last change: $Author: cd $ $Date: 2001-05-03 13:21:25 $
|
* last change: $Author: mba $ $Date: 2001-05-03 17:04:14 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -242,10 +242,9 @@ MenuManager::MenuManager( REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDe
|
|||||||
}
|
}
|
||||||
else if ( pMenu->GetItemType( i ) != MENUITEM_SEPARATOR )
|
else if ( pMenu->GetItemType( i ) != MENUITEM_SEPARATOR )
|
||||||
{
|
{
|
||||||
Image* pImage = GetImageFromURL( rFrame, aItemCommand );
|
Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE );
|
||||||
|
if ( !!aImage )
|
||||||
if ( pImage )
|
pMenu->SetItemImage( nItemId, aImage );
|
||||||
pMenu->SetItemImage( nItemId, *pImage );
|
|
||||||
|
|
||||||
m_aMenuItemHandlerVector.push_back( new MenuItemHandler( nItemId, NULL, REFERENCE< XDISPATCH >() ));
|
m_aMenuItemHandlerVector.push_back( new MenuItemHandler( nItemId, NULL, REFERENCE< XDISPATCH >() ));
|
||||||
}
|
}
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: imageproducer.cxx,v $
|
* $RCSfile: imageproducer.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.1 $
|
* $Revision: 1.2 $
|
||||||
*
|
*
|
||||||
* last change: $Author: cd $ $Date: 2001-05-03 08:01:51 $
|
* last change: $Author: mba $ $Date: 2001-05-03 17:04:14 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -61,6 +61,9 @@
|
|||||||
|
|
||||||
#include <helper/imageproducer.hxx>
|
#include <helper/imageproducer.hxx>
|
||||||
|
|
||||||
|
namespace framework
|
||||||
|
{
|
||||||
|
|
||||||
static pfunc_getImage _pGetImageFunc = NULL;
|
static pfunc_getImage _pGetImageFunc = NULL;
|
||||||
|
|
||||||
pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc )
|
pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc )
|
||||||
@@ -72,11 +75,13 @@ pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Image* SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL )
|
Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig )
|
||||||
{
|
{
|
||||||
if ( _pGetImageFunc )
|
if ( _pGetImageFunc )
|
||||||
return _pGetImageFunc( rFrame, aURL );
|
return _pGetImageFunc( rFrame, aURL, bBig );
|
||||||
else
|
else
|
||||||
return NULL;
|
return Image();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user