diff options
Diffstat (limited to 'svtools/source/inc')
-rw-r--r-- | svtools/source/inc/configitems/accessibilityoptions_const.hxx | 58 | ||||
-rw-r--r-- | svtools/source/inc/configitems/historyoptions_const.hxx | 63 | ||||
-rw-r--r-- | svtools/source/inc/configitems/useroptions_const.hxx | 64 | ||||
-rw-r--r-- | svtools/source/inc/fsfactory.hxx | 75 | ||||
-rw-r--r-- | svtools/source/inc/hatchwindowfactory.hxx | 77 | ||||
-rw-r--r-- | svtools/source/inc/passwordcontainer.hxx | 429 | ||||
-rw-r--r-- | svtools/source/inc/poolio.hxx | 204 | ||||
-rw-r--r-- | svtools/source/inc/svtaccessiblefactory.hxx | 76 | ||||
-rw-r--r-- | svtools/source/inc/unoiface.hxx | 445 |
9 files changed, 1491 insertions, 0 deletions
diff --git a/svtools/source/inc/configitems/accessibilityoptions_const.hxx b/svtools/source/inc/configitems/accessibilityoptions_const.hxx new file mode 100644 index 000000000000..07dff55591a6 --- /dev/null +++ b/svtools/source/inc/configitems/accessibilityoptions_const.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: accessibilityoptions_const.hxx,v $ + * + * $Revision: 1.1.4.2 $ + * + * last change: $Author: as $ $Date: 2008/03/19 11:17:49 $ + * + * 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 + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#ifndef INCLUDE_CONFIGITEMS_ACCESSIBILITYOPTIONS_CONST_HXX +#define INCLUDE_CONFIGITEMS_ACCESSIBILITYOPTIONS_CONST_HXX + +#include <rtl/ustring.hxx> + +namespace +{ + static const ::rtl::OUString s_sAccessibility = ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/Accessibility"); + static const ::rtl::OUString s_sAutoDetectSystemHC = ::rtl::OUString::createFromAscii("AutoDetectSystemHC"); + static const ::rtl::OUString s_sIsForPagePreviews = ::rtl::OUString::createFromAscii("IsForPagePreviews"); + static const ::rtl::OUString s_sIsHelpTipsDisappear = ::rtl::OUString::createFromAscii("IsHelpTipsDisappear"); + static const ::rtl::OUString s_sHelpTipSeconds = ::rtl::OUString::createFromAscii("HelpTipSeconds"); + static const ::rtl::OUString s_sIsAllowAnimatedGraphics = ::rtl::OUString::createFromAscii("IsAllowAnimatedGraphics"); + static const ::rtl::OUString s_sIsAllowAnimatedText = ::rtl::OUString::createFromAscii("IsAllowAnimatedText"); + static const ::rtl::OUString s_sIsAutomaticFontColor = ::rtl::OUString::createFromAscii("IsAutomaticFontColor"); + static const ::rtl::OUString s_sIsSystemFont = ::rtl::OUString::createFromAscii("IsSystemFont"); + static const ::rtl::OUString s_sIsSelectionInReadonly = ::rtl::OUString::createFromAscii("IsSelectionInReadonly"); +} + +#endif // INCLUDE_CONFIGITEMS_ACCESSIBILITYOPTIONS_CONST_HXX diff --git a/svtools/source/inc/configitems/historyoptions_const.hxx b/svtools/source/inc/configitems/historyoptions_const.hxx new file mode 100644 index 000000000000..c9148aeb26f8 --- /dev/null +++ b/svtools/source/inc/configitems/historyoptions_const.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: historyoptions_const.hxx,v $ + * + * $Revision: 1.1.4.2 $ + * + * last change: $Author: as $ $Date: 2008/03/19 11:17:49 $ + * + * 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 + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#ifndef INCLUDE_CONFIGITEMS_HISTORYOPTIONS_CONST_HXX +#define INCLUDE_CONFIGITEMS_HISTORYOPTIONS_CONST_HXX + +#include <rtl/ustring.hxx> + +namespace +{ + static const ::rtl::OUString s_sCommonHistory = ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/History"); + static const ::rtl::OUString s_sHistories = ::rtl::OUString::createFromAscii("org.openoffice.Office.Histories/Histories"); + static const ::rtl::OUString s_sPickListSize = ::rtl::OUString::createFromAscii("PickListSize"); + static const ::rtl::OUString s_sURLHistorySize = ::rtl::OUString::createFromAscii("Size"); + static const ::rtl::OUString s_sHelpBookmarksSize = ::rtl::OUString::createFromAscii("HelpBookmarkSize"); + static const ::rtl::OUString s_sPickList = ::rtl::OUString::createFromAscii("PickList"); + static const ::rtl::OUString s_sURLHistory = ::rtl::OUString::createFromAscii("URLHistory"); + static const ::rtl::OUString s_sHelpBookmarks = ::rtl::OUString::createFromAscii("HelpBookmarks"); + static const ::rtl::OUString s_sItemList = ::rtl::OUString::createFromAscii("ItemList"); + static const ::rtl::OUString s_sOrderList = ::rtl::OUString::createFromAscii("OrderList"); + static const ::rtl::OUString s_sHistoryItemRef = ::rtl::OUString::createFromAscii("HistoryItemRef"); + static const ::rtl::OUString s_sURL = ::rtl::OUString::createFromAscii("URL"); + static const ::rtl::OUString s_sFilter = ::rtl::OUString::createFromAscii("Filter"); + static const ::rtl::OUString s_sTitle = ::rtl::OUString::createFromAscii("Title"); + static const ::rtl::OUString s_sPassword = ::rtl::OUString::createFromAscii("Password"); +} + +#endif // INCLUDE_CONFIGITEMS_HISTORYOPTIONS_CONST_HXX diff --git a/svtools/source/inc/configitems/useroptions_const.hxx b/svtools/source/inc/configitems/useroptions_const.hxx new file mode 100644 index 000000000000..4dbd6da8bba3 --- /dev/null +++ b/svtools/source/inc/configitems/useroptions_const.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: useroptions_const.hxx,v $ + * + * $Revision: 1.1.4.2 $ + * + * last change: $Author: as $ $Date: 2008/03/19 11:17:50 $ + * + * 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 INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX +#define INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX + +#include <rtl/ustring.hxx> + +namespace +{ + static const ::rtl::OUString s_sData = ::rtl::OUString::createFromAscii("org.openoffice.UserProfile/Data"); + static const ::rtl::OUString s_so = ::rtl::OUString::createFromAscii("o"); // USER_OPT_COMPANY + static const ::rtl::OUString s_sgivenname = ::rtl::OUString::createFromAscii("givenname"); // USER_OPT_FIRSTNAME + static const ::rtl::OUString s_ssn = ::rtl::OUString::createFromAscii("sn"); // USER_OPT_LASTNAME + static const ::rtl::OUString s_sinitials = ::rtl::OUString::createFromAscii("initials"); // USER_OPT_ID + static const ::rtl::OUString s_sstreet = ::rtl::OUString::createFromAscii("street"); // USER_OPT_STREET + static const ::rtl::OUString s_sl = ::rtl::OUString::createFromAscii("l"); // USER_OPT_CITY + static const ::rtl::OUString s_sst = ::rtl::OUString::createFromAscii("st"); // USER_OPT_STATE + static const ::rtl::OUString s_spostalcode = ::rtl::OUString::createFromAscii("postalcode"); // USER_OPT_ZIP + static const ::rtl::OUString s_sc = ::rtl::OUString::createFromAscii("c"); // USER_OPT_COUNTRY + static const ::rtl::OUString s_stitle = ::rtl::OUString::createFromAscii("title"); // USER_OPT_TITLE + static const ::rtl::OUString s_sposition = ::rtl::OUString::createFromAscii("position"); // USER_OPT_POSITION + static const ::rtl::OUString s_shomephone = ::rtl::OUString::createFromAscii("homephone"); // USER_OPT_TELEPHONEHOME + static const ::rtl::OUString s_stelephonenumber = ::rtl::OUString::createFromAscii("telephonenumber"); // USER_OPT_TELEPHONEWORK + static const ::rtl::OUString s_sfacsimiletelephonenumber = ::rtl::OUString::createFromAscii("facsimiletelephonenumber"); // USER_OPT_FAX + static const ::rtl::OUString s_smail = ::rtl::OUString::createFromAscii("mail"); // USER_OPT_EMAIL + static const ::rtl::OUString s_scustomernumber = ::rtl::OUString::createFromAscii("customernumber"); // USER_OPT_CUSTOMERNUMBER + static const ::rtl::OUString s_sfathersname = ::rtl::OUString::createFromAscii("fathersname"); // USER_OPT_FATHERSNAME + static const ::rtl::OUString s_sapartment = ::rtl::OUString::createFromAscii("apartment"); // USER_OPT_APARTMENT +} + +#endif // INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX diff --git a/svtools/source/inc/fsfactory.hxx b/svtools/source/inc/fsfactory.hxx new file mode 100644 index 000000000000..5954ecebabc2 --- /dev/null +++ b/svtools/source/inc/fsfactory.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * 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 + * + * $RCSfile: fsfactory.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FSFACTORY_HXX_ +#define __FSACTORY_HXX_ + +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <cppuhelper/implbase2.hxx> + + +class FSStorage; + +class FSStorageFactory : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleServiceFactory, + ::com::sun::star::lang::XServiceInfo > +{ + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; + +public: + FSStorageFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ) + : m_xFactory( xFactory ) + { + OSL_ENSURE( xFactory.is(), "No service manager is provided!\n" ); + } + + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + impl_staticGetSupportedServiceNames(); + + static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); + + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL + impl_staticCreateSelfInstance( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + + + // XSingleServiceFactory + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); + +}; + +#endif + diff --git a/svtools/source/inc/hatchwindowfactory.hxx b/svtools/source/inc/hatchwindowfactory.hxx new file mode 100644 index 000000000000..72eaa58bb16d --- /dev/null +++ b/svtools/source/inc/hatchwindowfactory.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * 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 + * + * $RCSfile: hatchwindowfactory.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XHATCHWINDOWFACTORY_HXX_ +#define _XHATCHWINDOWFACTORY_HXX_ + +#include <com/sun/star/embed/XHatchWindowFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> + + +#ifndef _CPPUHELPER_IMPLBASE5_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + + +class OHatchWindowFactory : public ::cppu::WeakImplHelper2< + ::com::sun::star::embed::XHatchWindowFactory, + ::com::sun::star::lang::XServiceInfo > +{ + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; + +public: + OHatchWindowFactory( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ) + : m_xFactory( xFactory ) + { + OSL_ENSURE( xFactory.is(), "No service manager is provided!\n" ); + } + + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL impl_staticGetSupportedServiceNames(); + + static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); + + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL + impl_staticCreateSelfInstance( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + + + // XHatchWindowFactory + virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XHatchWindow > SAL_CALL createHatchWindowInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent, const ::com::sun::star::awt::Rectangle& aBounds, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); + +}; + +#endif + diff --git a/svtools/source/inc/passwordcontainer.hxx b/svtools/source/inc/passwordcontainer.hxx new file mode 100644 index 000000000000..a067672f3cf6 --- /dev/null +++ b/svtools/source/inc/passwordcontainer.hxx @@ -0,0 +1,429 @@ +/************************************************************************* + * + * 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 + * + * $RCSfile: passwordcontainer.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_COMPHELPER_PASSWORDCONTAINER_HXX +#define INCLUDED_COMPHELPER_PASSWORDCONTAINER_HXX + +#include <list> +#include <vector> +#include <map> +#include <com/sun/star/task/XPasswordContainer.hpp> +#include <com/sun/star/task/XUrlContainer.hpp> +#include <com/sun/star/task/PasswordRequestMode.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/task/XMasterPasswordHandling2.hpp> +#include <cppuhelper/implbase5.hxx> +#include <cppuhelper/typeprovider.hxx> +#include <cppuhelper/queryinterface.hxx> +#include <cppuhelper/factory.hxx> + +#include <tools/stream.hxx> +#include <unotools/configitem.hxx> +#include <ucbhelper/interactionrequest.hxx> + +#include <rtl/ref.hxx> +#include <osl/mutex.hxx> + +#include "syscreds.hxx" + +#define MEMORY_RECORD 0 +#define PERSISTENT_RECORD 1 + +//---------------------------------------------------------------------------------- + +class NamePassRecord +{ + ::rtl::OUString m_aName; + + // there are two lists of passwords, memory passwords and persistent passwords + sal_Bool m_bHasMemPass; + ::std::vector< ::rtl::OUString > m_aMemPass; + + // persistent passwords are encrypted in one string + sal_Bool m_bHasPersPass; + ::rtl::OUString m_aPersPass; + + void InitArrays( sal_Bool bHasMemoryList, const ::std::vector< ::rtl::OUString >& aMemoryList, + sal_Bool bHasPersistentList, const ::rtl::OUString& aPersistentList ) + { + m_bHasMemPass = bHasMemoryList; + if ( bHasMemoryList ) + m_aMemPass = aMemoryList; + + m_bHasPersPass = bHasPersistentList; + if ( bHasPersistentList ) + m_aPersPass = aPersistentList; + } + +public: + + NamePassRecord( const ::rtl::OUString& aName ) + : m_aName( aName ) + , m_bHasMemPass( sal_False ) + , m_bHasPersPass( sal_False ) + { + } + + NamePassRecord( const ::rtl::OUString& aName, const ::std::vector< ::rtl::OUString >& aMemoryList ) + : m_aName( aName ) + , m_bHasMemPass( sal_True ) + , m_aMemPass( aMemoryList ) + , m_bHasPersPass( sal_False ) + { + } + + NamePassRecord( const ::rtl::OUString& aName, const ::rtl::OUString& aPersistentList ) + : m_aName( aName ) + , m_bHasMemPass( sal_False ) + , m_bHasPersPass( sal_True ) + , m_aPersPass( aPersistentList ) + { + } + + NamePassRecord( const ::rtl::OUString& aName, + sal_Bool bHasMemoryList, const ::std::vector< ::rtl::OUString >& aMemoryList, + sal_Bool bHasPersistentList, const ::rtl::OUString aPersistentList ) + : m_aName( aName ) + , m_bHasMemPass( bHasMemoryList ) + , m_bHasPersPass( bHasPersistentList ) + { + InitArrays( bHasMemoryList, aMemoryList, bHasPersistentList, aPersistentList ); + } + + NamePassRecord( const NamePassRecord& aRecord ) + : m_aName( aRecord.m_aName ) + , m_bHasMemPass( sal_False ) + , m_bHasPersPass( sal_False ) + { + InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass ); + } + + NamePassRecord& operator=( const NamePassRecord& aRecord ) + { + m_aName = aRecord.m_aName; + + m_aMemPass.clear(); + m_aPersPass = ::rtl::OUString(); + InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass ); + + return *this; + } + + ::rtl::OUString GetUserName() const + { + return m_aName; + } + + sal_Bool HasPasswords( sal_Int8 nStatus ) const + { + if ( nStatus == MEMORY_RECORD ) + return m_bHasMemPass; + if ( nStatus == PERSISTENT_RECORD ) + return m_bHasPersPass; + + return sal_False; + } + + ::std::vector< ::rtl::OUString > GetMemPasswords() const + { + if ( m_bHasMemPass ) + return m_aMemPass; + + return ::std::vector< ::rtl::OUString >(); + } + + ::rtl::OUString GetPersPasswords() const + { + if ( m_bHasPersPass ) + return m_aPersPass; + + return ::rtl::OUString(); + } + + void SetMemPasswords( const ::std::vector< ::rtl::OUString >& aMemList ) + { + m_aMemPass = aMemList; + m_bHasMemPass = sal_True; + } + + void SetPersPasswords( const ::rtl::OUString& aPersList ) + { + m_aPersPass = aPersList; + m_bHasPersPass = sal_True; + } + + void RemovePasswords( sal_Int8 nStatus ) + { + if ( nStatus == MEMORY_RECORD ) + { + m_bHasMemPass = sal_False; + m_aMemPass.clear(); + } + else if ( nStatus == PERSISTENT_RECORD ) + { + m_bHasPersPass = sal_False; + m_aPersPass = ::rtl::OUString(); + } + } + +}; + +//---------------------------------------------------------------------------------- + +typedef ::std::pair< const ::rtl::OUString, ::std::list< NamePassRecord > > PairUrlRecord; +typedef ::std::map< ::rtl::OUString, ::std::list< NamePassRecord > > PassMap; + +//---------------------------------------------------------------------------------- + +class PasswordContainer; + +class StorageItem : public ::utl::ConfigItem { + PasswordContainer* mainCont; + sal_Bool hasEncoded; + ::rtl::OUString mEncoded; +public: + StorageItem( PasswordContainer* point, const ::rtl::OUString& path ) : + ConfigItem( path, CONFIG_MODE_IMMEDIATE_UPDATE ), + mainCont( point ), + hasEncoded( sal_False ) + { + ::com::sun::star::uno::Sequence< ::rtl::OUString > aNode( 1 ); + *aNode.getArray() = path; + *aNode.getArray() += ::rtl::OUString::createFromAscii( "/Store" ); + EnableNotification( aNode ); + } + + PassMap getInfo(); + void update( const ::rtl::OUString& url, const NamePassRecord& rec ); + void remove( const ::rtl::OUString& url, const ::rtl::OUString& rec ); + void clear(); + + sal_Bool getEncodedMP( ::rtl::OUString& aResult ); + void setEncodedMP( const ::rtl::OUString& aResult, sal_Bool bAcceptEnmpty = sal_False ); + void setUseStorage( sal_Bool bUse ); + sal_Bool useStorage(); + + virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ); + virtual void Commit(); +}; + +//---------------------------------------------------------------------------------- + +enum PasswordState { + no_password, + entered, + cancelled +}; + +class PasswordContainer : public ::cppu::WeakImplHelper5< + ::com::sun::star::task::XPasswordContainer, + ::com::sun::star::task::XMasterPasswordHandling2, + ::com::sun::star::task::XUrlContainer, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XEventListener > +{ +private: + PassMap m_aContainer; + StorageItem* m_pStorageFile; + ::osl::Mutex mMutex; + ::rtl::OUString m_aMasterPasswd; // master password is set when the string is not empty + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mComponent; + SysCredentialsConfig mUrlContainer; + + ::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > CopyToUserRecordSequence( + const ::std::list< NamePassRecord >& original, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); + + ::com::sun::star::task::UserRecord CopyToUserRecord( + const NamePassRecord& aRecord, + sal_Bool& io_bTryToDecode, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler ); + + ::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > FindUsr( + const ::std::list< NamePassRecord >& userlist, + const ::rtl::OUString& name, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); +bool createUrlRecord( + const PassMap::iterator & rIter, + bool bName, + const ::rtl::OUString & aName, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler, + ::com::sun::star::task::UrlRecord & rRec ) + throw( ::com::sun::star::uno::RuntimeException ); + +::com::sun::star::task::UrlRecord find( + const ::rtl::OUString& aURL, + const ::rtl::OUString& aName, + bool bName, // only needed to support empty user names + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler ) throw(::com::sun::star::uno::RuntimeException); + + ::rtl::OUString GetDefaultMasterPassword(); + + ::rtl::OUString RequestPasswordFromUser( + ::com::sun::star::task::PasswordRequestMode aRMode, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); + + ::rtl::OUString GetMasterPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); + + void UpdateVector( const ::rtl::OUString& url, ::std::list< NamePassRecord >& toUpdate, NamePassRecord& rec, sal_Bool writeFile ) + throw(::com::sun::star::uno::RuntimeException); + + void PrivateAdd( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName, + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPasswords, + char aMode, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); + + ::std::vector< ::rtl::OUString > DecodePasswords( const ::rtl::OUString& aLine, const ::rtl::OUString& aMasterPassword ) + throw(::com::sun::star::uno::RuntimeException); + + ::rtl::OUString EncodePasswords( ::std::vector< ::rtl::OUString > lines, const ::rtl::OUString& aMasterPassword ) + throw(::com::sun::star::uno::RuntimeException); + +public: + PasswordContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); + ~PasswordContainer(); + + virtual void SAL_CALL add( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName, + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPasswords, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL addPersistent( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName, + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPasswords, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::task::UrlRecord SAL_CALL + find( const ::rtl::OUString& aUrl, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::task::UrlRecord SAL_CALL + findForName( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + throw(::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL remove( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName ) + throw(::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL removePersistent( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName ) + throw(::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL removeAllPersistent() throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::task::UrlRecord > SAL_CALL + getAllPersistent( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); + + + // provide factory + static ::rtl::OUString SAL_CALL impl_getStaticImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + impl_getStaticSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL + impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager ) throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL + impl_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) throw( ::com::sun::star::uno::RuntimeException ); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL + getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) + throw(::com::sun::star::uno::RuntimeException); + + // XMasterPasswordHandling + virtual ::sal_Bool SAL_CALL authorizateWithMasterPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) + throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL changeMasterPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeMasterPassword() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasMasterPassword( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL allowPersistentStoring( ::sal_Bool bAllow ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isPersistentStoringAllowed( ) throw (::com::sun::star::uno::RuntimeException); + + // XMasterPasswordHandling2 + virtual ::sal_Bool SAL_CALL useDefaultMasterPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isDefaultMasterPasswordUsed( ) throw (::com::sun::star::uno::RuntimeException); + + // XUrlContainer + virtual void SAL_CALL addUrl( const ::rtl::OUString& Url, ::sal_Bool MakePersistent ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL findUrl( const ::rtl::OUString& Url ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeUrl( const ::rtl::OUString& Url ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getUrls( ::sal_Bool OnlyPersistent ) throw (::com::sun::star::uno::RuntimeException); + + void Notify(); +}; + +//---------------------------------------------------------------------------------- + +class MasterPasswordRequest_Impl : public ucbhelper::InteractionRequest +{ + ::rtl::Reference< ucbhelper::InteractionSupplyAuthentication > m_xAuthSupplier; + +public: + MasterPasswordRequest_Impl( ::com::sun::star::task::PasswordRequestMode Mode ); + + const ::rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & + getAuthenticationSupplier() const { return m_xAuthSupplier; } + +}; + +//---------------------------------------------------------------------------------- + +class RW_SvMemoryStream : public SvMemoryStream { +public: + RW_SvMemoryStream( void* Buf, ULONG Size, StreamMode eMode ): + SvMemoryStream( Buf, Size, eMode){} + + RW_SvMemoryStream( ULONG InitSize=512, ULONG Resize=64 ): + SvMemoryStream( InitSize, Resize ){} + + ULONG getActualSize(){ return nEndOfData; } +}; + + + +#endif // #ifndef INCLUDED_COMPHELPER_PASSWORDCONTAINER_HXX + diff --git a/svtools/source/inc/poolio.hxx b/svtools/source/inc/poolio.hxx new file mode 100644 index 000000000000..fb30fc04832d --- /dev/null +++ b/svtools/source/inc/poolio.hxx @@ -0,0 +1,204 @@ +/************************************************************************* + * + * 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 + * + * $RCSfile: poolio.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include <svtools/brdcst.hxx> + + +#ifndef DELETEZ +#define DELETEZ(pPtr) { delete pPtr; pPtr = 0; } +#endif + + +struct SfxPoolVersion_Impl +{ + USHORT _nVer; + USHORT _nStart, _nEnd; + USHORT* _pMap; + + SfxPoolVersion_Impl( USHORT nVer, USHORT nStart, USHORT nEnd, + USHORT *pMap ) + : _nVer( nVer ), + _nStart( nStart ), + _nEnd( nEnd ), + _pMap( pMap ) + {} + SfxPoolVersion_Impl( const SfxPoolVersion_Impl &rOrig ) + : _nVer( rOrig._nVer ), + _nStart( rOrig._nStart ), + _nEnd( rOrig._nEnd ), + _pMap( rOrig._pMap ) + {} +}; + +SV_DECL_PTRARR( SfxPoolItemArrayBase_Impl, SfxPoolItem*, 0, 5 ) +SV_DECL_PTRARR_DEL( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl*, 0, 2 ) + +struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl +{ + USHORT nFirstFree; + + SfxPoolItemArray_Impl (USHORT nInitSize = 0) + : SfxPoolItemArrayBase_Impl( nInitSize ), + nFirstFree( 0 ) + {} +}; + +class SfxStyleSheetIterator; + +struct SfxItemPool_Impl +{ + SfxBroadcaster aBC; + SfxPoolItemArray_Impl** ppPoolItems; + SfxPoolVersionArr_Impl aVersions; + USHORT nVersion; + USHORT nLoadingVersion; + USHORT nInitRefCount; // 1, beim Laden ggf. 2 + USHORT nVerStart, nVerEnd; // WhichRange in Versions + USHORT nStoringStart, nStoringEnd; // zu speichernder Range + BYTE nMajorVer, nMinorVer; // Pool selbst + SfxMapUnit eDefMetric; + FASTBOOL bInSetItem; + FASTBOOL bStreaming; // in Load() bzw. Store() + + SfxItemPool_Impl( USHORT nStart, USHORT nEnd ) + : ppPoolItems (new SfxPoolItemArray_Impl*[ nEnd - nStart + 1]) + { + memset( ppPoolItems, 0, sizeof( SfxPoolItemArray_Impl* ) * ( nEnd - nStart + 1) ); + } + + ~SfxItemPool_Impl() + { + delete[] ppPoolItems; + } + + void DeleteItems() + { + delete[] ppPoolItems; ppPoolItems = 0; + } +}; + +// ----------------------------------------------------------------------- + +// IBM-C-Set mag keine doppelten Defines +#ifdef DBG +# undef DBG +#endif + +#if defined(DBG_UTIL) && defined(MSC) +#define SFX_TRACE(s,p) \ + { \ + ByteString aPtr(RTL_CONSTASCII_STRINGPARAM("0x0000:0x0000")); \ + _snprintf(const_cast< sal_Char *>(aPtr.GetBuffer()), aPtr.Len(), \ + "%lp", p ); \ + aPtr.Insert(s, 0); \ + DbgTrace( aPtr.GetBuffer() ); \ + } +#define DBG(x) x +#else +#define SFX_TRACE(s,p) +#define DBG(x) +#endif + +#define CHECK_FILEFORMAT( rStream, nTag ) \ + { USHORT nFileTag; \ + rStream >> nFileTag; \ + if ( nTag != nFileTag ) \ + { \ + DBG_ERROR( #nTag ); /*! s.u. */ \ + /*! error-code setzen und auswerten! */ \ + (rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \ + pImp->bStreaming = FALSE; \ + return rStream; \ + } \ + } + +#define CHECK_FILEFORMAT_RELEASE( rStream, nTag, pPointer ) \ + { USHORT nFileTag; \ + rStream >> nFileTag; \ + if ( nTag != nFileTag ) \ + { \ + DBG_ERROR( #nTag ); /*! s.u. */ \ + /*! error-code setzen und auswerten! */ \ + (rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \ + pImp->bStreaming = FALSE; \ + delete pPointer; \ + return rStream; \ + } \ + } + +#define CHECK_FILEFORMAT2( rStream, nTag1, nTag2 ) \ + { USHORT nFileTag; \ + rStream >> nFileTag; \ + if ( nTag1 != nFileTag && nTag2 != nFileTag ) \ + { \ + DBG_ERROR( #nTag1 ); /*! s.u. */ \ + /*! error-code setzen und auswerten! */ \ + (rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \ + pImp->bStreaming = FALSE; \ + return rStream; \ + } \ + } + +#define SFX_ITEMPOOL_VER_MAJOR BYTE(2) +#define SFX_ITEMPOOL_VER_MINOR BYTE(0) + +#define SFX_ITEMPOOL_TAG_STARTPOOL_4 USHORT(0x1111) +#define SFX_ITEMPOOL_TAG_STARTPOOL_5 USHORT(0xBBBB) +#define SFX_ITEMPOOL_TAG_ITEMPOOL USHORT(0xAAAA) +#define SFX_ITEMPOOL_TAG_ITEMS USHORT(0x2222) +#define SFX_ITEMPOOL_TAG_ITEM USHORT(0x7777) +#define SFX_ITEMPOOL_TAG_SIZES USHORT(0x3333) +#define SFX_ITEMPOOL_TAG_DEFAULTS USHORT(0x4444) +#define SFX_ITEMPOOL_TAG_VERSIONMAP USHORT(0x5555) +#define SFX_ITEMPOOL_TAG_HEADER USHORT(0x6666) +#define SFX_ITEMPOOL_TAG_ENDPOOL USHORT(0xEEEE) +#define SFX_ITEMPOOL_TAG_TRICK4OLD USHORT(0xFFFF) + +#define SFX_ITEMPOOL_REC BYTE(0x01) +#define SFX_ITEMPOOL_REC_HEADER BYTE(0x10) +#define SFX_ITEMPOOL_REC_VERSIONMAP USHORT(0x0020) +#define SFX_ITEMPOOL_REC_WHICHIDS USHORT(0x0030) +#define SFX_ITEMPOOL_REC_ITEMS USHORT(0x0040) +#define SFX_ITEMPOOL_REC_DEFAULTS USHORT(0x0050) + +#define SFX_ITEMSET_REC BYTE(0x02) + +#define SFX_STYLES_REC BYTE(0x03) +#define SFX_STYLES_REC_HEADER USHORT(0x0010) +#define SFX_STYLES_REC_STYLES USHORT(0x0020) + +//======================================================================== + +inline USHORT SfxItemPool::GetIndex_Impl(USHORT nWhich) const +{ + DBG_CHKTHIS(SfxItemPool, 0); + DBG_ASSERT(nWhich >= nStart && nWhich <= nEnd, "Which-Id nicht im Pool-Bereich"); + return nWhich - nStart; +} + diff --git a/svtools/source/inc/svtaccessiblefactory.hxx b/svtools/source/inc/svtaccessiblefactory.hxx new file mode 100644 index 000000000000..d4a0a5b518e8 --- /dev/null +++ b/svtools/source/inc/svtaccessiblefactory.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * 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 + * + * $RCSfile: svtaccessiblefactory.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_ACCESSIBLE_FACTORY_ACCESS_HXX +#define SVTOOLS_ACCESSIBLE_FACTORY_ACCESS_HXX + +#include <svtools/accessiblefactory.hxx> + +//........................................................................ +namespace svt +{ +//........................................................................ + + //==================================================================== + //= AccessibleFactoryAccess + //==================================================================== + /** a client for the accessibility implementations which have been outsourced + from the main svtools library + + All instances of this class share a reference to a common IAccessibleFactory + instance, which is used for creating all kind of Accessibility related + components. + + When the AccessibleFactoryAccess goes aways, this factory goes aways, to, and the respective + library is unloaded. + + This class is not thread-safe. + */ + class AccessibleFactoryAccess + { + private: + bool m_bInitialized; + + public: + AccessibleFactoryAccess(); + ~AccessibleFactoryAccess(); + + IAccessibleFactory& getFactory(); + + private: + void ensureInitialized(); + }; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVTOOLS_ACCESSIBLE_FACTORY_ACCESS_HXX + diff --git a/svtools/source/inc/unoiface.hxx b/svtools/source/inc/unoiface.hxx new file mode 100644 index 000000000000..80ceda96fab5 --- /dev/null +++ b/svtools/source/inc/unoiface.hxx @@ -0,0 +1,445 @@ +/************************************************************************* + * + * 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 + * + * $RCSfile: unoiface.hxx,v $ + * $Revision: 1.12 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVT_UNOIFACE_HXX +#define _SVT_UNOIFACE_HXX + +#include <toolkit/awt/vclxwindow.hxx> +#include <toolkit/awt/vclxwindows.hxx> +#include <toolkit/helper/listenermultiplexer.hxx> + +#include <cppuhelper/typeprovider.hxx> + +#include <com/sun/star/awt/XTextArea.hpp> +#include <com/sun/star/awt/XTextComponent.hpp> +#include <com/sun/star/awt/XTextLayoutConstrains.hpp> +#include <svtools/svmedit.hxx> +#include <svtools/fmtfield.hxx> +#include <com/sun/star/awt/XImageConsumer.hpp> + + +#include <comphelper/uno3.hxx> +#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/implbase3.hxx> +#include <com/sun/star/awt/XItemEventBroadcaster.hpp> + + +namespace com { namespace sun { namespace star { namespace util { + class XNumberFormatsSupplier; +} } } } + +class SvNumberFormatsSupplierObj; + +// ---------------------------------------------------- +// class VCLXMultiLineEdit +// ---------------------------------------------------- +class VCLXMultiLineEdit : public ::com::sun::star::awt::XTextComponent, + public ::com::sun::star::awt::XTextArea, + public ::com::sun::star::awt::XTextLayoutConstrains, + public VCLXWindow +{ +private: + TextListenerMultiplexer maTextListeners; + LineEnd meLineEndType; + +protected: + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + +public: + VCLXMultiLineEdit(); + ~VCLXMultiLineEdit(); + + // ::com::sun::star::uno::XInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { VCLXWindow::acquire(); } + void SAL_CALL release() throw() { VCLXWindow::release(); } + + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XTextComponent + void SAL_CALL addTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL removeTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL insertText( const ::com::sun::star::awt::Selection& Sel, const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException); + ::rtl::OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException); + ::rtl::OUString SAL_CALL getSelectedText( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Selection SAL_CALL getSelection( ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isEditable( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException); + sal_Int16 SAL_CALL getMaxTextLen( ) throw(::com::sun::star::uno::RuntimeException); + + //XTextArea + ::rtl::OUString SAL_CALL getTextLines( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XLayoutConstrains + ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XTextLayoutConstrains + ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XWindow + void SAL_CALL setFocus( ) throw(::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + + +// ---------------------------------------------------- +// class VCLXFileControl +// ---------------------------------------------------- +class VCLXFileControl : ::com::sun::star::awt::XTextComponent, public ::com::sun::star::awt::XTextLayoutConstrains, public VCLXWindow +{ +protected: + DECL_LINK( ModifyHdl, Edit* ); + TextListenerMultiplexer maTextListeners; + +public: + VCLXFileControl(); + ~VCLXFileControl(); + + void SetWindow( Window* pWindow ); + + // ::com::sun::star::uno::XInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { VCLXWindow::acquire(); } + void SAL_CALL release() throw() { VCLXWindow::release(); } + + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XTextComponent + void SAL_CALL addTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL removeTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL insertText( const ::com::sun::star::awt::Selection& Sel, const ::rtl::OUString& Text ) throw(::com::sun::star::uno::RuntimeException); + ::rtl::OUString SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException); + ::rtl::OUString SAL_CALL getSelectedText( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Selection SAL_CALL getSelection( ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isEditable( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException); + sal_Int16 SAL_CALL getMaxTextLen( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XLayoutConstrains + ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XTextLayoutConstrains + ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException); + + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + +// ---------------------------------------------------- +// class SVTXFormattedField +// ---------------------------------------------------- + +class SVTXFormattedField : public VCLXSpinField +{ +protected: + SvNumberFormatsSupplierObj* m_pCurrentSupplier; + sal_Bool bIsStandardSupplier; + + sal_Int32 nKeyToSetDelayed; + + FormattedField* GetFormattedField() const { return (FormattedField*)GetWindow(); } + +public: + SVTXFormattedField(); + ~SVTXFormattedField(); + + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + +protected: + ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > getFormatsSupplier(void) const; + void setFormatsSupplier(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & xSupplier); + sal_Int32 getFormatKey(void) const; + void setFormatKey(sal_Int32 nKey); + + void SetValue(const ::com::sun::star::uno::Any& rValue); + ::com::sun::star::uno::Any GetValue(); + + void SetTreatAsNumber(sal_Bool bSet); + sal_Bool GetTreatAsNumber(); + + void SetDefaultValue(const ::com::sun::star::uno::Any& rValue); + ::com::sun::star::uno::Any GetDefaultValue(); + + void SetMinValue(const ::com::sun::star::uno::Any& rValue); + ::com::sun::star::uno::Any GetMinValue(); + + void SetMaxValue(const ::com::sun::star::uno::Any& rValue); + ::com::sun::star::uno::Any GetMaxValue(); + + void NotifyTextListeners(); + ::com::sun::star::uno::Any convertEffectiveValue(const ::com::sun::star::uno::Any& rValue); + + virtual void SetWindow(Window* _pWindow); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + + + +// ---------------------------------------------------- +// class SVTXRoadmap +// ---------------------------------------------------- + +namespace svt +{ + class ORoadmap; +} + +struct RMItemData +{ + sal_Bool b_Enabled; + sal_Int32 n_ID; + ::rtl::OUString Label; +}; + +typedef ::cppu::ImplInheritanceHelper3 < VCLXImageConsumer + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::beans::XPropertyChangeListener + , ::com::sun::star::awt::XItemEventBroadcaster + > SVTXRoadmap_Base; +class SVTXRoadmap : public SVTXRoadmap_Base + + +{ +private: + ItemListenerMultiplexer maItemListeners; + + RMItemData CurRMItemData; + RMItemData GetRMItemData( const ::com::sun::star::container::ContainerEvent& _rEvent ); + +protected: + ::svt::ORoadmap* GetRoadmap() const { return (::svt::ORoadmap*)GetWindow(); } + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + + ~SVTXRoadmap(); + +public: + SVTXRoadmap(); + + void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { VCLXWindow::disposing( Source ); } + + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + + ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + + // XContainerListener + void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException); + + // XItemEventBroadcaster + virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException); + + // XPropertyChangeListener + virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException); + +protected: + + // VCLXImageConsumer overridables + virtual void ImplSetNewImage(); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + + + +// ---------------------------------------------------- +// class SVTXNumericField +// ---------------------------------------------------- +class SVTXNumericField : public ::com::sun::star::awt::XNumericField, public SVTXFormattedField +{ +public: + SVTXNumericField(); + ~SVTXNumericField(); + + // ::com::sun::star::uno::XInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { SVTXFormattedField::acquire(); } + void SAL_CALL release() throw() { SVTXFormattedField::release(); } + + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XNumericField + void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getSpinSize( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException); + sal_Int16 SAL_CALL getDecimalDigits( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + +// ---------------------------------------------------- +// class VCLXCurrencyField +// ---------------------------------------------------- +class SVTXCurrencyField : public ::com::sun::star::awt::XCurrencyField, public SVTXFormattedField +{ +public: + SVTXCurrencyField(); + ~SVTXCurrencyField(); + + // ::com::sun::star::uno::XInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { SVTXFormattedField::acquire(); } + void SAL_CALL release() throw() { SVTXFormattedField::release(); } + + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XCurrencyField + void SAL_CALL setValue( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMin( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getMin( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setMax( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getMax( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getFirst( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setLast( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getLast( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException); + double SAL_CALL getSpinSize( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(::com::sun::star::uno::RuntimeException); + sal_Int16 SAL_CALL getDecimalDigits( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isStrictFormat( ) throw(::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + +// ---------------------------------------------------- +// class VCLXProgressBar +// ---------------------------------------------------- +class VCLXProgressBar : public ::com::sun::star::awt::XProgressBar, + public VCLXWindow +{ +private: + sal_Int32 m_nValue; + sal_Int32 m_nValueMin; + sal_Int32 m_nValueMax; + +protected: + void ImplUpdateValue(); + +public: + VCLXProgressBar(); + ~VCLXProgressBar(); + + // ::com::sun::star::uno::XInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { VCLXWindow::acquire(); } + void SAL_CALL release() throw() { VCLXWindow::release(); } + + // ::com::sun::star::lang::XTypeProvider + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XProgressBar + void SAL_CALL setForegroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException ); + sal_Int32 SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::VclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + +// ---------------------------------------------------- +// class SVTXDateField +// ---------------------------------------------------- +class SVTXDateField : public VCLXDateField +{ +public: + SVTXDateField(); + ~SVTXDateField(); + + // ::com::sun::star::awt::VclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } +}; + +#endif // _SVT_UNOIFACE_HXX |