diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-06-06 12:29:22 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-06-06 12:29:22 +0000 |
commit | 9b285102fb576a5624d5092e9292a2074535a634 (patch) | |
tree | 17fe34d5f1cd82dcb443844f3f88f575a6522eb1 /basic | |
parent | 27c0add9390e4ccdaee6add606a655b3fc5f9024 (diff) |
INTEGRATION: CWS dba30c (1.9.12); FILE MERGED
2008/05/13 07:02:31 fs 1.9.12.1: joining changes from CWS odbmacros3 to CWS dba30c
2008/04/30 09:26:47 fs 1.9.4.1: add some safety against using an unloaded script/dialog library - this now throws an exception, instead of silently doing nothing/nonsense
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/uno/dlgcont.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 1803fe84e4..ba67d5bfa5 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: dlgcont.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.10 $ * * This file is part of OpenOffice.org. * @@ -120,12 +120,9 @@ Any SAL_CALL SfxDialogLibraryContainer::createEmptyLibraryElement( void ) return aRetAny; } -sal_Bool SAL_CALL SfxDialogLibraryContainer::isLibraryElementValid( Any aElement ) +bool SAL_CALL SfxDialogLibraryContainer::isLibraryElementValid( Any aElement ) const { - Reference< XInputStreamProvider > xISP; - aElement >>= xISP; - sal_Bool bRet = xISP.is(); - return bRet; + return SfxDialogLibrary::containsValidDialog( aElement ); } bool writeOasis2OOoLibraryElement( @@ -644,6 +641,18 @@ Reference< resource::XStringResourceResolver > return xRet; } +bool SfxDialogLibrary::containsValidDialog( const ::com::sun::star::uno::Any& aElement ) +{ + Reference< XInputStreamProvider > xISP; + aElement >>= xISP; + return xISP.is(); +} + +bool SAL_CALL SfxDialogLibrary::isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const +{ + return SfxDialogLibrary::containsValidDialog( aElement ); +} + } //============================================================================ |