summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbainterior.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-12-07 09:54:12 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-12-07 09:54:12 +0000
commitb4a10fc494dc1681ed1c7bedb42b42554715bfb0 (patch)
treee12dc0dfb9dc0f8a5f5210f59faab08c2bd0770a /sc/source/ui/vba/vbainterior.cxx
parent3bb3146bb3eb8738909484679fa0928464f7684d (diff)
INTEGRATION: CWS npower8 (1.2.4); FILE MERGED
2007/07/23 11:47:24 npower 1.2.4.3: i#77189# 2007/07/18 13:46:46 npower 1.2.4.2: #i77189# sync ooo-build and this module 2007/05/10 11:23:10 npower 1.2.4.1: -m#i77189#
Diffstat (limited to 'sc/source/ui/vba/vbainterior.cxx')
-rw-r--r--sc/source/ui/vba/vbainterior.cxx28
1 files changed, 23 insertions, 5 deletions
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index 825ee3698fbe..22ed2f169841 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vbainterior.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: vg $ $Date: 2007-08-30 10:04:53 $
+ * last change: $Author: vg $ $Date: 2007-12-07 10:54:12 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -53,10 +53,8 @@ using namespace ::com::sun::star;
using namespace ::org::openoffice;
static const rtl::OUString BACKCOLOR( RTL_CONSTASCII_USTRINGPARAM( "CellBackColor" ) );
-ScVbaInterior::ScVbaInterior( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, ScDocument* pScDoc ) throw ( lang::IllegalArgumentException) : m_xProps(xProps), m_xContext(xContext), m_pScDoc( pScDoc )
+ScVbaInterior::ScVbaInterior( const uno::Reference< vba::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, ScDocument* pScDoc ) throw ( lang::IllegalArgumentException) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc )
{
- if ( !xContext.is() )
- throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "context not set" ) ), uno::Reference< uno::XInterface >(), 1 );
if ( !m_xProps.is() )
throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "properties") ), uno::Reference< uno::XInterface >(), 2 );
}
@@ -78,6 +76,8 @@ ScVbaInterior::setColor( const uno::Any& _color ) throw (uno::RuntimeException)
uno::Reference< container::XIndexAccess >
ScVbaInterior::getPalette()
{
+ if ( !m_pScDoc )
+ throw uno::RuntimeException();
SfxObjectShell* pShell = m_pScDoc->GetDocumentShell();
ScVbaPalette aPalette( pShell );
return aPalette.getPalette();
@@ -126,4 +126,22 @@ ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
return uno::makeAny( nIndex );
}
+rtl::OUString&
+ScVbaInterior::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaInterior") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+ScVbaInterior::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.excel.Interior" ) );
+ }
+ return aServiceNames;
+}