summaryrefslogtreecommitdiff
path: root/svx/source/unogallery/unogalthemeprovider.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unogallery/unogalthemeprovider.cxx')
-rw-r--r--svx/source/unogallery/unogalthemeprovider.cxx80
1 files changed, 40 insertions, 40 deletions
diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx
index f96d569b75..a2da39ed92 100644
--- a/svx/source/unogallery/unogalthemeprovider.cxx
+++ b/svx/source/unogallery/unogalthemeprovider.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,15 +31,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "unogalthemeprovider.hxx"
-#include "unogaltheme.hxx"
-#include "gallery1.hxx"
+#include "unogalthemeprovider.hxx"
+#include "unogaltheme.hxx"
+#include "svx/gallery1.hxx"
#include <rtl/uuid.h>
#include <vos/mutex.hxx>
-#ifndef _SV_SVAPP_HXX_
+#ifndef _SV_SVAPP_HXX_
#include <vcl/svapp.hxx>
#endif
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <com/sun/star/gallery/XGalleryTheme.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -52,7 +52,7 @@ namespace unogallery {
// --------------------
uno::Reference< uno::XInterface > SAL_CALL GalleryThemeProvider_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & )
+ const uno::Reference< lang::XMultiServiceFactory > & )
throw( uno::Exception )
{
return *( new GalleryThemeProvider() );
@@ -60,7 +60,7 @@ uno::Reference< uno::XInterface > SAL_CALL GalleryThemeProvider_createInstance(
// -----------------------------------------------------------------------------
-uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider_getSupportedServiceNames()
+uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider_getSupportedServiceNames()
throw()
{
return GalleryThemeProvider::getSupportedServiceNames_Static();
@@ -68,7 +68,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider_getSupportedServi
// -----------------------------------------------------------------------------
-::rtl::OUString SAL_CALL GalleryThemeProvider_getImplementationName()
+::rtl::OUString SAL_CALL GalleryThemeProvider_getImplementationName()
throw()
{
return GalleryThemeProvider::getImplementationName_Static();
@@ -91,7 +91,7 @@ GalleryThemeProvider::~GalleryThemeProvider()
}
// ------------------------------------------------------------------------------
-
+
SVX_DLLPUBLIC ::rtl::OUString GalleryThemeProvider::getImplementationName_Static()
throw()
{
@@ -104,15 +104,15 @@ SVX_DLLPUBLIC uno::Sequence< ::rtl::OUString > GalleryThemeProvider::getSupporte
throw()
{
uno::Sequence< ::rtl::OUString > aSeq( 1 );
-
+
aSeq.getArray()[ 0 ] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.gallery.GalleryThemeProvider" ) );
-
+
return aSeq;
}
// ------------------------------------------------------------------------------
-
-::rtl::OUString SAL_CALL GalleryThemeProvider::getImplementationName()
+
+::rtl::OUString SAL_CALL GalleryThemeProvider::getImplementationName()
throw( uno::RuntimeException )
{
return getImplementationName_Static();
@@ -120,7 +120,7 @@ SVX_DLLPUBLIC uno::Sequence< ::rtl::OUString > GalleryThemeProvider::getSupporte
// ------------------------------------------------------------------------------
-sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const ::rtl::OUString& ServiceName )
+sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const ::rtl::OUString& ServiceName )
throw( uno::RuntimeException )
{
uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() );
@@ -135,7 +135,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const ::rtl::OUString&
// ------------------------------------------------------------------------------
-uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames()
+uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames()
throw( uno::RuntimeException )
{
return getSupportedServiceNames_Static();
@@ -143,7 +143,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider::getSupportedServ
// ------------------------------------------------------------------------------
-uno::Sequence< uno::Type > SAL_CALL GalleryThemeProvider::getTypes()
+uno::Sequence< uno::Type > SAL_CALL GalleryThemeProvider::getTypes()
throw(uno::RuntimeException)
{
uno::Sequence< uno::Type > aTypes( 6 );
@@ -161,18 +161,18 @@ uno::Sequence< uno::Type > SAL_CALL GalleryThemeProvider::getTypes()
// ------------------------------------------------------------------------------
-uno::Sequence< sal_Int8 > SAL_CALL GalleryThemeProvider::getImplementationId()
+uno::Sequence< sal_Int8 > SAL_CALL GalleryThemeProvider::getImplementationId()
throw(uno::RuntimeException)
{
const vos::OGuard aGuard( Application::GetSolarMutex() );
static uno::Sequence< sal_Int8 > aId;
-
+
if( aId.getLength() == 0 )
{
aId.realloc( 16 );
rtl_createUuid( reinterpret_cast< sal_uInt8* >( aId.getArray() ), 0, sal_True );
}
-
+
return aId;
}
@@ -189,11 +189,11 @@ void SAL_CALL GalleryThemeProvider::initialize( const uno::Sequence< uno::Any >&
if( rArguments[ i ] >>= aParams )
break;
}
-
+
for( i = 0; i < aParams.getLength(); ++i )
{
const beans::PropertyValue& rProp = aParams[ i ];
-
+
if( rProp.Name.equalsAscii( "ProvideHiddenThemes" ) )
rProp.Value >>= mbHiddenThemes;
}
@@ -209,22 +209,22 @@ uno::Type SAL_CALL GalleryThemeProvider::getElementType()
// ------------------------------------------------------------------------------
-sal_Bool SAL_CALL GalleryThemeProvider::hasElements()
+sal_Bool SAL_CALL GalleryThemeProvider::hasElements()
throw (uno::RuntimeException)
{
const ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
+
return( ( mpGallery != NULL ) && ( mpGallery->GetThemeCount() > 0 ) );
}
// ------------------------------------------------------------------------------
-
+
uno::Any SAL_CALL GalleryThemeProvider::getByName( const ::rtl::OUString& rName )
throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
const ::vos::OGuard aGuard( Application::GetSolarMutex() );
uno::Any aRet;
-
+
if( !mpGallery || !mpGallery->HasTheme( rName ) )
{
throw container::NoSuchElementException();
@@ -233,7 +233,7 @@ uno::Any SAL_CALL GalleryThemeProvider::getByName( const ::rtl::OUString& rName
{
aRet = uno::makeAny( uno::Reference< gallery::XGalleryTheme >( new ::unogallery::GalleryTheme( rName ) ) );
}
-
+
return aRet;
}
@@ -245,17 +245,17 @@ uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider::getElementNames(
const ::vos::OGuard aGuard( Application::GetSolarMutex() );
sal_uInt32 i = 0, nCount = ( mpGallery ? mpGallery->GetThemeCount() : 0 ), nRealCount = 0;
uno::Sequence< ::rtl::OUString > aSeq( nCount );
-
+
for( ; i < nCount; ++i )
{
const GalleryThemeEntry* pEntry = mpGallery->GetThemeInfo( i );
-
+
if( mbHiddenThemes || !pEntry->IsHidden() )
aSeq[ nRealCount++ ] = pEntry->GetThemeName();
}
-
+
aSeq.realloc( nRealCount );
-
+
return aSeq;
}
@@ -265,9 +265,9 @@ sal_Bool SAL_CALL GalleryThemeProvider::hasByName( const ::rtl::OUString& rName
throw (uno::RuntimeException)
{
const ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
+
sal_Bool bRet = sal_False;
-
+
if( mpGallery && mpGallery->HasTheme( rName ) )
bRet = ( mbHiddenThemes || !mpGallery->GetThemeInfo( rName )->IsHidden() );
@@ -276,12 +276,12 @@ sal_Bool SAL_CALL GalleryThemeProvider::hasByName( const ::rtl::OUString& rName
// ------------------------------------------------------------------------------
-uno::Reference< gallery::XGalleryTheme > SAL_CALL GalleryThemeProvider::insertNewByName( const ::rtl::OUString& rThemeName )
+uno::Reference< gallery::XGalleryTheme > SAL_CALL GalleryThemeProvider::insertNewByName( const ::rtl::OUString& rThemeName )
throw (container::ElementExistException, uno::RuntimeException)
{
const ::vos::OGuard aGuard( Application::GetSolarMutex() );
uno::Reference< gallery::XGalleryTheme > xRet;
-
+
if( mpGallery )
{
if( mpGallery->HasTheme( rThemeName ) )
@@ -293,19 +293,19 @@ uno::Reference< gallery::XGalleryTheme > SAL_CALL GalleryThemeProvider::insertNe
xRet = new ::unogallery::GalleryTheme( rThemeName );
}
}
-
+
return xRet;
}
// ------------------------------------------------------------------------------
-void SAL_CALL GalleryThemeProvider::removeByName( const ::rtl::OUString& rName )
+void SAL_CALL GalleryThemeProvider::removeByName( const ::rtl::OUString& rName )
throw (container::NoSuchElementException, uno::RuntimeException)
{
const ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- if( !mpGallery ||
- !mpGallery->HasTheme( rName ) ||
+
+ if( !mpGallery ||
+ !mpGallery->HasTheme( rName ) ||
( !mbHiddenThemes && mpGallery->GetThemeInfo( rName )->IsHidden() ) )
{
throw container::NoSuchElementException();