summaryrefslogtreecommitdiff
path: root/framework/source/uiconfiguration/moduleimagemanager.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-07-07 10:28:00 +0000
committerOliver Bolte <obo@openoffice.org>2004-07-07 10:28:00 +0000
commit5e188dc945f99dc7dc63a7ee423d124a406cf559 (patch)
tree2b56b1d113cd42a01a74961d1ca3a43af409ef3c /framework/source/uiconfiguration/moduleimagemanager.cxx
parentf7f9e0f9eb1634a2d98761a0ae358acf75b6e3cd (diff)
#i10000# resolve merge problems
Diffstat (limited to 'framework/source/uiconfiguration/moduleimagemanager.cxx')
-rw-r--r--framework/source/uiconfiguration/moduleimagemanager.cxx218
1 files changed, 109 insertions, 109 deletions
diff --git a/framework/source/uiconfiguration/moduleimagemanager.cxx b/framework/source/uiconfiguration/moduleimagemanager.cxx
index edb2233e35..9b7daa63d0 100644
--- a/framework/source/uiconfiguration/moduleimagemanager.cxx
+++ b/framework/source/uiconfiguration/moduleimagemanager.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: moduleimagemanager.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: obo $ $Date: 2004-07-06 16:59:05 $
+ * last change: $Author: obo $ $Date: 2004-07-07 11:27:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,7 +135,7 @@
#ifndef _SV_PNGWRITE_HXX
#include <vcl/pngwrite.hxx>
#endif
-
+
//_________________________________________________________________________________________________________________
// namespaces
//_________________________________________________________________________________________________________________
@@ -167,7 +167,7 @@ static const char IMAGE_FOLDER[] = "images";
static const char BITMAPS_FOLDER[] = "Bitmaps";
static const char IMAGE_EXTENSION[] = ".png";
-static const char* IMAGELIST_XML_FILE[] =
+static const char* IMAGELIST_XML_FILE[] =
{
"sc_imagelist.xml",
"lc_imagelist.xml",
@@ -175,8 +175,8 @@ static const char* IMAGELIST_XML_FILE[] =
"lch_imagelist.xml"
};
-static const char* BITMAP_FILE_NAMES[] =
-{
+static const char* BITMAP_FILE_NAMES[] =
+{
"sc_userimages.png",
"lc_userimages.png",
"sch_userimages.png",
@@ -188,14 +188,14 @@ namespace framework
static osl::Mutex* pImageListWrapperMutex = 0;
static GlobalImageList* pGlobalImageList = 0;
-static char* ImageType_Prefixes[ImageType_COUNT] =
-{
- "res/commandimagelist/sc_",
- "res/commandimagelist/lc_",
- "res/commandimagelist/sch_",
- "res/commandimagelist/lch_"
+static char* ImageType_Prefixes[ImageType_COUNT] =
+{
+ "res/commandimagelist/sc_",
+ "res/commandimagelist/lc_",
+ "res/commandimagelist/sch_",
+ "res/commandimagelist/lch_"
};
-static char ModuleImageList[] = "private:resource/images/moduleimages";
+static char ModuleImageList[] = "private:resource/images/moduleimages";
typedef GraphicNameAccess CmdToXGraphicNameAccess;
@@ -209,14 +209,14 @@ static osl::Mutex& getGlobalImageListMutex()
return *pImageListWrapperMutex;
}
-
+
static GlobalImageList* getGlobalImageList( const uno::Reference< XMultiServiceFactory >& rServiceManager )
{
- osl::MutexGuard guard( getGlobalImageListMutex() );
-
+ osl::MutexGuard guard( getGlobalImageListMutex() );
+
if ( pGlobalImageList == 0 )
pGlobalImageList = new GlobalImageList( rServiceManager );
-
+
return pGlobalImageList;
}
@@ -243,7 +243,7 @@ void CmdImageList::impl_fillCommandToImageNameMap()
{
const rtl::OUString aCommandImageList( RTL_CONSTASCII_USTRINGPARAM( UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDIMAGELIST ));
Sequence< OUString > aCmdImageSeq;
- uno::Reference< XNameAccess > xCmdDesc( m_xServiceManager->createInstance(
+ uno::Reference< XNameAccess > xCmdDesc( m_xServiceManager->createInstance(
SERVICENAME_UICOMMANDDESCRIPTION ),
UNO_QUERY );
@@ -277,26 +277,26 @@ void CmdImageList::impl_fillCommandToImageNameMap()
{
}
}
-
+
// We have to map commands which uses special characters like '/',':','?'
String aExt = String::CreateFromAscii( IMAGE_EXTENSION );
m_aImageCommandNameVector.resize(aCmdImageSeq.getLength() );
m_aImageNameVector.resize( aCmdImageSeq.getLength() );
-
- ::std::copy( aCmdImageSeq.getConstArray(),
- aCmdImageSeq.getConstArray()+aCmdImageSeq.getLength(),
- m_aImageCommandNameVector.begin() );
-
+
+ ::std::copy( aCmdImageSeq.getConstArray(),
+ aCmdImageSeq.getConstArray()+aCmdImageSeq.getLength(),
+ m_aImageCommandNameVector.begin() );
+
// Create a image name vector that must be provided to the vcl imagelist. We also need
// a command to image name map to speed up access time for image retrieval.
for ( sal_uInt32 i = 0; i < m_aImageCommandNameVector.size(); i++ )
{
INetURLObject aURLObj( m_aImageCommandNameVector[i] );
m_aImageNameVector[i] = ( aURLObj.GetURLPath().ToLowerAscii() += aExt );
- m_aCommandToImageNameMap.insert( CommandToImageNameMap::value_type( m_aImageCommandNameVector[i],
+ m_aCommandToImageNameMap.insert( CommandToImageNameMap::value_type( m_aImageCommandNameVector[i],
m_aImageNameVector[i] ));
}
-
+
m_bVectorInit = sal_True;
}
}
@@ -306,8 +306,8 @@ ImageList* CmdImageList::impl_getImageList( sal_Int16 nImageType )
if ( !m_pImageList[nImageType] )
{
impl_fillCommandToImageNameMap();
- m_pImageList[nImageType] = new ImageList( m_aImageNameVector,
- OUString::createFromAscii( ImageType_Prefixes[nImageType] ),
+ m_pImageList[nImageType] = new ImageList( m_aImageNameVector,
+ OUString::createFromAscii( ImageType_Prefixes[nImageType] ),
NULL );
}
@@ -371,7 +371,7 @@ GlobalImageList::GlobalImageList( const uno::Reference< XMultiServiceFactory >&
GlobalImageList::~GlobalImageList()
{
}
-
+
Image GlobalImageList::getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL )
{
osl::MutexGuard guard( getGlobalImageListMutex() );
@@ -405,7 +405,7 @@ oslInterlockedCount GlobalImageList::acquire()
oslInterlockedCount GlobalImageList::release()
{
osl::MutexGuard guard( getGlobalImageListMutex() );
-
+
if ( !osl_decrementInterlockedCount( &m_nRefCount ))
{
oslInterlockedCount nCount( m_nRefCount );
@@ -437,7 +437,7 @@ DEFINE_XTYPEPROVIDER_6 ( ModuleImageManager
css::lang::XInitialization ,
drafts::com::sun::star::ui::XImageManager ,
drafts::com::sun::star::ui::XUIConfiguration ,
- drafts::com::sun::star::ui::XUIConfigurationPersistence
+ drafts::com::sun::star::ui::XUIConfigurationPersistence
)
static OUString RetrieveNameFromResourceURL( const rtl::OUString& aResourceURL )
@@ -455,18 +455,18 @@ static sal_Bool implts_checkAndScaleGraphic( uno::Reference< XGraphic >& rOutGra
rOutGraphic = Image().GetXGraphic();
return sal_False;
}
-
+
// Check size and scale it
Image aImage( rInGraphic );
Size aSize = aImage.GetSizePixel();
bool bMustScale( false );
-
- if (( nImageType == ImageType_Color_Large ) ||
+
+ if (( nImageType == ImageType_Color_Large ) ||
( nImageType == ImageType_HC_Large ))
bMustScale = ( aSize != aLargeSize );
else
bMustScale = ( aSize != aNormSize );
-
+
if ( bMustScale )
{
BitmapEx aBitmap = aImage.GetBitmapEx();
@@ -508,14 +508,14 @@ const rtl::Reference< GlobalImageList >& ModuleImageManager::implts_getGlobalIma
ResetableGuard aGuard( m_aLock );
if ( !m_pGlobalImageList.is() )
- m_pGlobalImageList = getGlobalImageList( m_xServiceManager );
+ m_pGlobalImageList = getGlobalImageList( m_xServiceManager );
return m_pGlobalImageList;
}
CmdImageList* ModuleImageManager::implts_getDefaultImageList()
{
ResetableGuard aGuard( m_aLock );
-
+
if ( !m_pDefaultImageList )
m_pDefaultImageList = new CmdImageList( m_xServiceManager, m_aModuleIdentifier );
@@ -540,7 +540,7 @@ void ModuleImageManager::implts_initialize()
try
{
- m_xUserImageStorage = m_xUserConfigStorage->openStorageElement( OUString::createFromAscii( IMAGE_FOLDER ),
+ m_xUserImageStorage = m_xUserConfigStorage->openStorageElement( OUString::createFromAscii( IMAGE_FOLDER ),
nModes );
if ( m_xUserImageStorage.is() )
{
@@ -566,9 +566,9 @@ void ModuleImageManager::implts_initialize()
}
}
-sal_Bool ModuleImageManager::implts_loadUserImages(
+sal_Bool ModuleImageManager::implts_loadUserImages(
ImageType nImageType,
- const uno::Reference< XStorage >& xUserImageStorage,
+ const uno::Reference< XStorage >& xUserImageStorage,
const uno::Reference< XStorage >& xUserBitmapsStorage )
{
ResetableGuard aGuard( m_aLock );
@@ -577,10 +577,10 @@ sal_Bool ModuleImageManager::implts_loadUserImages(
{
try
{
- uno::Reference< XStream > xStream = xUserImageStorage->openStreamElement( rtl::OUString::createFromAscii( IMAGELIST_XML_FILE[nImageType] ),
+ uno::Reference< XStream > xStream = xUserImageStorage->openStreamElement( rtl::OUString::createFromAscii( IMAGELIST_XML_FILE[nImageType] ),
ElementModes::READ );
uno::Reference< XInputStream > xInputStream = xStream->getInputStream();
-
+
ImageListsDescriptor aUserImageListInfo;
sal_Bool bResult = ImagesConfiguration::LoadImages( m_xServiceManager,
xInputStream,
@@ -597,18 +597,18 @@ sal_Bool ModuleImageManager::implts_loadUserImages(
const ImageItemDescriptor* pItem = pList->pImageItemList->GetObject(i);
aUserImagesVector.push_back( pItem->aCommandURL );
}
-
- uno::Reference< XStream > xBitmapStream = xUserBitmapsStorage->openStreamElement(
+
+ uno::Reference< XStream > xBitmapStream = xUserBitmapsStorage->openStreamElement(
rtl::OUString::createFromAscii( BITMAP_FILE_NAMES[nImageType] ),
ElementModes::READ );
-
+
if ( xBitmapStream.is() )
{
SvStream* pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream );
vcl::PNGReader aPngReader( *pSvStream );
BitmapEx aUserBitmap = aPngReader.Read();
delete pSvStream;
-
+
// Delete old image list and create a new one from the read bitmap
delete m_pUserImageList[nImageType];
m_pUserImageList[nImageType] = new ImageList( aUserBitmap, aUserImagesVector );
@@ -640,13 +640,13 @@ sal_Bool ModuleImageManager::implts_loadUserImages(
return sal_True;
}
-sal_Bool ModuleImageManager::implts_storeUserImages(
+sal_Bool ModuleImageManager::implts_storeUserImages(
ImageType nImageType,
- const uno::Reference< XStorage >& xUserImageStorage,
+ const uno::Reference< XStorage >& xUserImageStorage,
const uno::Reference< XStorage >& xUserBitmapsStorage )
{
ResetableGuard aGuard( m_aLock );
-
+
if ( m_bModified )
{
ImageList* pImageList = implts_getUserImageList( nImageType );
@@ -667,40 +667,40 @@ sal_Bool ModuleImageManager::implts_storeUserImages(
pItem->aCommandURL = pImageList->GetImageName( i );
pList->pImageItemList->Insert( pItem, pList->pImageItemList->Count() );
}
-
+
pList->aURL = String::CreateFromAscii("Bitmaps/");
pList->aURL += String::CreateFromAscii( BITMAP_FILE_NAMES[nImageType] );
uno::Reference< XTransactedObject > xTransaction;
uno::Reference< XOutputStream > xOutputStream;
- uno::Reference< XStream > xStream = xUserImageStorage->openStreamElement( rtl::OUString::createFromAscii( IMAGELIST_XML_FILE[nImageType] ),
+ uno::Reference< XStream > xStream = xUserImageStorage->openStreamElement( rtl::OUString::createFromAscii( IMAGELIST_XML_FILE[nImageType] ),
ElementModes::WRITE|ElementModes::TRUNCATE );
if ( xStream.is() )
{
- uno::Reference< XStream > xBitmapStream =
+ uno::Reference< XStream > xBitmapStream =
xUserBitmapsStorage->openStreamElement( rtl::OUString::createFromAscii( BITMAP_FILE_NAMES[nImageType] ),
ElementModes::WRITE|ElementModes::TRUNCATE );
if ( xBitmapStream.is() )
{
SvStream* pSvStream = utl::UcbStreamHelper::CreateStream( xBitmapStream );
- vcl::PNGWriter aPngWriter( *pSvStream );
- aPngWriter.Write( pImageList->GetBitmapEx() );
+ vcl::PNGWriter aPngWriter( pImageList->GetBitmapEx() );
+ aPngWriter.Write( *pSvStream );
delete pSvStream;
// Commit user bitmaps storage
xTransaction = uno::Reference< XTransactedObject >( xUserBitmapsStorage, UNO_QUERY );
xTransaction->commit();
}
-
+
xOutputStream = xStream->getOutputStream();
if ( xOutputStream.is() )
ImagesConfiguration::StoreImages( m_xServiceManager, xOutputStream, aUserImageListInfo );
-
+
// Commit user image storage
xTransaction = uno::Reference< XTransactedObject >( xUserImageStorage, UNO_QUERY );
xTransaction->commit();
}
-
+
return sal_True;
}
else
@@ -722,7 +722,7 @@ sal_Bool ModuleImageManager::implts_storeUserImages(
catch ( ::com::sun::star::container::NoSuchElementException& )
{
}
-
+
return sal_True;
}
}
@@ -763,7 +763,7 @@ void SAL_CALL ModuleImageManager::dispose() throw (::com::sun::star::uno::Runtim
css::lang::EventObject aEvent( xThis );
m_aListenerContainer.disposeAndClear( aEvent );
-
+
{
ResetableGuard aGuard( m_aLock );
m_xUserConfigStorage.clear();
@@ -784,7 +784,7 @@ void SAL_CALL ModuleImageManager::addEventListener( const uno::Reference< XEvent
if ( m_bDisposed )
throw DisposedException();
}
-
+
m_aListenerContainer.addInterface( ::getCppuType( ( const uno::Reference< XEventListener >* ) NULL ), xListener );
}
@@ -798,7 +798,7 @@ void SAL_CALL ModuleImageManager::removeEventListener( const uno::Reference< XEv
void SAL_CALL ModuleImageManager::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
ResetableGuard aLock( m_aLock );
-
+
if ( !m_bInitialized )
{
for ( sal_Int32 n = 0; n < aArguments.getLength(); n++ )
@@ -820,7 +820,7 @@ void SAL_CALL ModuleImageManager::initialize( const Sequence< Any >& aArguments
}
}
}
-
+
if ( m_xUserConfigStorage.is() )
{
uno::Reference< XPropertySet > xPropSet( m_xUserConfigStorage, UNO_QUERY );
@@ -832,10 +832,10 @@ void SAL_CALL ModuleImageManager::initialize( const Sequence< Any >& aArguments
m_bReadOnly = !( nOpenMode & ElementModes::WRITE );
}
}
-
+
implts_initialize();
- m_bInitialized = true;
+ m_bInitialized = true;
}
}
@@ -844,19 +844,19 @@ void SAL_CALL ModuleImageManager::reset()
throw (::com::sun::star::uno::RuntimeException)
{
ResetableGuard aLock( m_aLock );
-
+
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
if ( m_bDisposed )
throw DisposedException();
-
+
std::vector< OUString > aUserImageNames;
-
+
for ( sal_Int32 i = 0; i < ImageType_COUNT; i++ )
{
aUserImageNames.clear();
ImageList* pImageList = implts_getUserImageList( ImageType(i));
pImageList->GetImageNames( aUserImageNames );
-
+
Sequence< rtl::OUString > aRemoveList( aUserImageNames.size() );
for ( sal_uInt32 j = 0; j < aUserImageNames.size(); j++ )
aRemoveList[j] = aUserImageNames[j];
@@ -869,15 +869,15 @@ throw (::com::sun::star::uno::RuntimeException)
m_bModified = sal_True;
}
-Sequence< ::rtl::OUString > SAL_CALL ModuleImageManager::getAllImageNames( ::sal_Int16 nImageType )
+Sequence< ::rtl::OUString > SAL_CALL ModuleImageManager::getAllImageNames( ::sal_Int16 nImageType )
throw (::com::sun::star::uno::RuntimeException)
{
ResetableGuard aLock( m_aLock );
-
+
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
if ( m_bDisposed )
throw DisposedException();
-
+
ImageNameMap aImageCmdNameMap;
sal_Int16 nIndex = implts_convertImageTypeToIndex( nImageType );
@@ -897,7 +897,7 @@ throw (::com::sun::star::uno::RuntimeException)
pImageList->GetImageNames( rUserImageNames );
for ( i = 0; i < rUserImageNames.size(); i++ )
aImageCmdNameMap.insert( ImageNameMap::value_type( rUserImageNames[i], sal_True ));
-
+
Sequence< OUString > aImageNameSeq( aImageCmdNameMap.size() );
ImageNameMap::const_iterator pIter;
i = 0;
@@ -907,22 +907,22 @@ throw (::com::sun::star::uno::RuntimeException)
return aImageNameSeq;
}
-::sal_Bool SAL_CALL ModuleImageManager::hasImage( ::sal_Int16 nImageType, const ::rtl::OUString& aCommandURL )
+::sal_Bool SAL_CALL ModuleImageManager::hasImage( ::sal_Int16 nImageType, const ::rtl::OUString& aCommandURL )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
ResetableGuard aLock( m_aLock );
-
+
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
if ( m_bDisposed )
throw DisposedException();
-
+
if (( nImageType < 0 ) || ( nImageType > MAX_IMAGETYPE_VALUE ))
throw IllegalArgumentException();
sal_Int16 nIndex = implts_convertImageTypeToIndex( nImageType );
if ( implts_getGlobalImageList()->hasImage( nIndex, aCommandURL ))
return sal_True;
- else
+ else
{
if ( implts_getDefaultImageList()->hasImage( nIndex, aCommandURL ))
return sal_True;
@@ -934,24 +934,24 @@ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::
return ( pImageList->GetImagePos( aCommandURL ) != IMAGELIST_IMAGE_NOTFOUND );
}
}
-
+
return sal_False;
}
-Sequence< uno::Reference< XGraphic > > SAL_CALL ModuleImageManager::getImages(
- ::sal_Int16 nImageType,
- const Sequence< ::rtl::OUString >& aCommandURLSequence )
+Sequence< uno::Reference< XGraphic > > SAL_CALL ModuleImageManager::getImages(
+ ::sal_Int16 nImageType,
+ const Sequence< ::rtl::OUString >& aCommandURLSequence )
throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException )
{
ResetableGuard aLock( m_aLock );
-
+
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
if ( m_bDisposed )
throw DisposedException();
if (( nImageType < 0 ) || ( nImageType > MAX_IMAGETYPE_VALUE ))
throw IllegalArgumentException();
-
+
Sequence< uno::Reference< XGraphic > > aGraphSeq( aCommandURLSequence.getLength() );
const rtl::OUString* aStrArray = aCommandURLSequence.getConstArray();
@@ -974,27 +974,27 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno:
if ( !aImage )
aImage = rGlobalImageList->getImageFromCommandURL( nIndex, aStrArray[n] );
}
-
+
aGraphSeq[n] = aImage.GetXGraphic();
}
return aGraphSeq;
}
-void SAL_CALL ModuleImageManager::replaceImages(
- ::sal_Int16 nImageType,
- const Sequence< ::rtl::OUString >& aCommandURLSequence,
- const Sequence< uno::Reference< XGraphic > >& aGraphicsSequence )
-throw ( ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::lang::IllegalAccessException,
+void SAL_CALL ModuleImageManager::replaceImages(
+ ::sal_Int16 nImageType,
+ const Sequence< ::rtl::OUString >& aCommandURLSequence,
+ const Sequence< uno::Reference< XGraphic > >& aGraphicsSequence )
+throw ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::IllegalAccessException,
::com::sun::star::uno::RuntimeException)
{
CmdToXGraphicNameAccess* pInsertedImages( 0 );
CmdToXGraphicNameAccess* pReplacedImages( 0 );
-
+
{
ResetableGuard aLock( m_aLock );
-
+
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
if ( m_bDisposed )
throw DisposedException();
@@ -1008,14 +1008,14 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
sal_Int16 nIndex = implts_convertImageTypeToIndex( nImageType );
ImageList* pImageList = implts_getUserImageList( ImageType( nIndex ));
-
+
uno::Reference< XGraphic > xGraphic;
for ( sal_Int32 i = 0; i < aCommandURLSequence.getLength(); i++ )
{
// Check size and scale. If we don't have any graphics ignore it
if ( !implts_checkAndScaleGraphic( xGraphic, aGraphicsSequence[i], nIndex ))
continue;
-
+
USHORT nPos = pImageList->GetImagePos( aCommandURLSequence[i] );
if ( nPos == IMAGELIST_IMAGE_NOTFOUND )
{
@@ -1051,7 +1051,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
aInsertEvent.Accessor = uno::makeAny( xThis );
aInsertEvent.Source = xIfac;
aInsertEvent.ResourceURL = m_aResourceString;
- aInsertEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
+ aInsertEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pInsertedImages ), UNO_QUERY ));
implts_notifyContainerListener( aInsertEvent, NotifyOp_Insert );
}
@@ -1063,15 +1063,15 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
aReplaceEvent.Source = xIfac;
aReplaceEvent.ResourceURL = m_aResourceString;
aReplaceEvent.ReplacedElement = Any();
- aReplaceEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
+ aReplaceEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pReplacedImages ), UNO_QUERY ));
implts_notifyContainerListener( aReplaceEvent, NotifyOp_Replace );
}
}
-void SAL_CALL ModuleImageManager::removeImages( ::sal_Int16 nImageType, const Sequence< ::rtl::OUString >& aCommandURLSequence )
-throw ( ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::lang::IllegalAccessException,
+void SAL_CALL ModuleImageManager::removeImages( ::sal_Int16 nImageType, const Sequence< ::rtl::OUString >& aCommandURLSequence )
+throw ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::IllegalAccessException,
::com::sun::star::uno::RuntimeException)
{
CmdToXGraphicNameAccess* pRemovedImages( 0 );
@@ -1079,7 +1079,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
{
ResetableGuard aLock( m_aLock );
-
+
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
if ( m_bDisposed )
throw DisposedException();
@@ -1095,7 +1095,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
CmdImageList* pDefaultImageList = implts_getDefaultImageList();
ImageList* pImageList = implts_getUserImageList( ImageType( nIndex ));
uno::Reference< XGraphic > xEmptyGraphic( Image().GetXGraphic() );
-
+
for ( sal_Int32 i = 0; i < aCommandURLSequence.getLength(); i++ )
{
USHORT nPos = pImageList->GetImagePos( aCommandURLSequence[i] );
@@ -1124,7 +1124,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
}
}
}
-
+
if (( pReplacedImages != 0 ) || ( pRemovedImages != 0 ))
{
m_bModified = sal_True;
@@ -1143,7 +1143,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
aRemoveEvent.Accessor = uno::makeAny( xThis );
aRemoveEvent.Source = xIfac;
aRemoveEvent.ResourceURL = m_aResourceString;
- aRemoveEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
+ aRemoveEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pRemovedImages ), UNO_QUERY ));
implts_notifyContainerListener( aRemoveEvent, NotifyOp_Remove );
}
@@ -1155,16 +1155,16 @@ throw ( ::com::sun::star::lang::IllegalArgumentException,
aReplaceEvent.Source = xIfac;
aReplaceEvent.ResourceURL = m_aResourceString;
aReplaceEvent.ReplacedElement = Any();
- aReplaceEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
+ aReplaceEvent.Element = uno::makeAny( uno::Reference< XNameAccess >(
static_cast< OWeakObject *>( pReplacedImages ), UNO_QUERY ));
implts_notifyContainerListener( aReplaceEvent, NotifyOp_Replace );
}
}
-void SAL_CALL ModuleImageManager::insertImages( ::sal_Int16 nImageType, const Sequence< ::rtl::OUString >& aCommandURLSequence, const Sequence< uno::Reference< XGraphic > >& aGraphicSequence )
-throw ( ::com::sun::star::container::ElementExistException,
- ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::lang::IllegalAccessException,
+void SAL_CALL ModuleImageManager::insertImages( ::sal_Int16 nImageType, const Sequence< ::rtl::OUString >& aCommandURLSequence, const Sequence< uno::Reference< XGraphic > >& aGraphicSequence )
+throw ( ::com::sun::star::container::ElementExistException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::IllegalAccessException,
::com::sun::star::uno::RuntimeException)
{
CmdToXGraphicNameAccess* pInsertedImages( 0 );
@@ -1172,7 +1172,7 @@ throw ( ::com::sun::star::container::ElementExistException,
{
ResetableGuard aLock( m_aLock );
-
+
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
if ( m_bDisposed )
throw DisposedException();
@@ -1186,7 +1186,7 @@ throw ( ::com::sun::star::container::ElementExistException,
sal_Int16 nIndex = implts_convertImageTypeToIndex( nImageType );
ImageList* pImageList = implts_getUserImageList( ImageType( nIndex ));
-
+
uno::Reference< XGraphic > xGraphic;
for ( sal_Int32 i = 0; i < aCommandURLSequence.getLength(); i++ )
{