Files
libreoffice/basic/source/inc/dlgcont.hxx

123 lines
4.8 KiB
C++
Raw Normal View History

/*************************************************************************
*
* 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