diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-11-08 10:53:26 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-11-08 10:53:26 +0000 |
commit | 6c79c4a27e2ffcbf5cc28b1fb3423291e964721b (patch) | |
tree | fe9f222da84d96dbd80b1e77f65f9d04b3c6b0b3 /basic | |
parent | 74a03b308ece45e2e6def74d963ac84dcfc81cb0 (diff) |
INTEGRATION: CWS basmgr01 (1.1.2); FILE ADDED
2006/09/28 20:15:09 fs 1.1.2.1: #i69957# moved herein from sfx2/source/inc - dialog library containers
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/inc/dlgcont.hxx | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx new file mode 100644 index 000000000000..80eb99274178 --- /dev/null +++ b/basic/source/inc/dlgcont.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dlgcont.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: kz $ $Date: 2006-11-08 11:53:26 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef BASIC_DIALOGCONTAINER_HXX +#define BASIC_DIALOGCONTAINER_HXX + +#ifndef BASIC_NAMECONTAINER_HXX +#include "namecont.hxx" +#endif + +namespace basic +{ + +//============================================================================ + +class SfxDialogLibraryContainer : public SfxLibraryContainer +{ + // Methods to distinguish between different library types + virtual SfxLibrary* SAL_CALL implCreateLibrary( void ); + virtual SfxLibrary* SAL_CALL implCreateLibraryLink + ( const ::rtl::OUString& aLibInfoFileURL, + const ::rtl::OUString& StorageURL, sal_Bool ReadOnly ); + virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void ); + virtual sal_Bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ); + virtual void SAL_CALL writeLibraryElement + ( + ::com::sun::star::uno::Any aElement, + const ::rtl::OUString& aElementName, + ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutput + ) + throw(::com::sun::star::uno::Exception); + + virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement + ( const ::rtl::OUString& aFile, + const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xElementStream ); + + virtual void SAL_CALL importFromOldStorage( const ::rtl::OUString& aFile ); + + virtual SfxLibraryContainer* createInstanceImpl( void ); + + sal_Bool init( const ::rtl::OUString& aInitialisationParam, + const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage = + ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >() ); + protected: + using SfxLibraryContainer::init; + +public: + SfxDialogLibraryContainer( void ); + SfxDialogLibraryContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + + virtual void SAL_CALL storeLibrariesToStorage( + const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + + // Methods XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& aArguments ) + throw (::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + + // Service + static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(); + static ::rtl::OUString getImplementationName_static(); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create + ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager ) + throw( ::com::sun::star::uno::Exception ); +}; + +//============================================================================ + +class SfxDialogLibrary : public SfxLibrary +{ +public: + SfxDialogLibrary + ( + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI + ); + + SfxDialogLibrary + ( + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSFI, + const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly + ); +}; + +} // namespace basic + +#endif + |