merge the formfield patch from ooo-build
[ooovba.git] / ucbhelper / source / provider / interactionrequest.cxx
blob02b14a072dc34c31b9b04ab690d3d481df141512
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: interactionrequest.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_ucbhelper.hxx"
34 /**************************************************************************
35 TODO
36 **************************************************************************
38 *************************************************************************/
39 #include <osl/mutex.hxx>
40 #include <cppuhelper/typeprovider.hxx>
41 #include <ucbhelper/interactionrequest.hxx>
43 using namespace com::sun::star;
44 using namespace ucbhelper;
46 //=========================================================================
47 //=========================================================================
49 // InteractionRequest Implementation.
51 //=========================================================================
52 //=========================================================================
54 namespace ucbhelper
57 struct InteractionRequest_Impl
59 rtl::Reference< InteractionContinuation > m_xSelection;
60 com::sun::star::uno::Any m_aRequest;
61 com::sun::star::uno::Sequence<
62 com::sun::star::uno::Reference<
63 com::sun::star::task::XInteractionContinuation > > m_aContinuations;
65 InteractionRequest_Impl() {}
66 InteractionRequest_Impl( const uno::Any & rRequest )
67 : m_aRequest( rRequest ) {}
72 //=========================================================================
73 InteractionRequest::InteractionRequest()
74 : m_pImpl( new InteractionRequest_Impl )
78 //=========================================================================
79 InteractionRequest::InteractionRequest( const uno::Any & rRequest )
80 : m_pImpl( new InteractionRequest_Impl( rRequest ) )
84 //=========================================================================
85 // virtual
86 InteractionRequest::~InteractionRequest()
88 delete m_pImpl;
91 //=========================================================================
92 void InteractionRequest::setRequest( const uno::Any & rRequest )
94 m_pImpl->m_aRequest = rRequest;
97 //=========================================================================
98 void InteractionRequest::setContinuations(
99 const uno::Sequence< uno::Reference<
100 task::XInteractionContinuation > > & rContinuations )
102 m_pImpl->m_aContinuations = rContinuations;
105 //=========================================================================
106 rtl::Reference< InteractionContinuation >
107 InteractionRequest::getSelection() const
109 return m_pImpl->m_xSelection;
112 //=========================================================================
113 void InteractionRequest::setSelection(
114 const rtl::Reference< InteractionContinuation > & rxSelection )
116 m_pImpl->m_xSelection = rxSelection;
119 //=========================================================================
121 // XInterface methods.
123 //=========================================================================
125 // virtual
126 void SAL_CALL InteractionRequest::acquire()
127 throw()
129 OWeakObject::acquire();
132 //=========================================================================
133 // virtual
134 void SAL_CALL InteractionRequest::release()
135 throw()
137 OWeakObject::release();
140 //=========================================================================
141 // virtual
142 uno::Any SAL_CALL
143 InteractionRequest::queryInterface( const uno::Type & rType )
144 throw ( uno::RuntimeException )
146 uno::Any aRet = cppu::queryInterface( rType,
147 static_cast< lang::XTypeProvider * >( this ),
148 static_cast< task::XInteractionRequest * >( this ) );
150 return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
153 //=========================================================================
155 // XTypeProvider methods.
157 //=========================================================================
159 // virtual
160 uno::Sequence< sal_Int8 > SAL_CALL InteractionRequest::getImplementationId()
161 throw( uno::RuntimeException )
163 static cppu::OImplementationId* pId = NULL;
164 if ( !pId )
166 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
167 if ( !pId )
169 static cppu::OImplementationId id( sal_False );
170 pId = &id;
173 return (*pId).getImplementationId();
176 //=========================================================================
177 // virtual
178 uno::Sequence< uno::Type > SAL_CALL InteractionRequest::getTypes()
179 throw( uno::RuntimeException )
181 static cppu::OTypeCollection* pCollection = 0;
182 if ( !pCollection )
184 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
185 if ( !pCollection )
187 static cppu::OTypeCollection collection(
188 getCppuType( static_cast<
189 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
190 getCppuType( static_cast<
191 uno::Reference< task::XInteractionRequest > * >( 0 ) ) );
192 pCollection = &collection;
195 return (*pCollection).getTypes();
198 //=========================================================================
200 // XInteractionRequest methods.
202 //=========================================================================
204 // virtual
205 uno::Any SAL_CALL InteractionRequest::getRequest()
206 throw( uno::RuntimeException )
208 return m_pImpl->m_aRequest;
211 //=========================================================================
212 // virtual
213 uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL
214 InteractionRequest::getContinuations()
215 throw( uno::RuntimeException )
217 return m_pImpl->m_aContinuations;
220 //=========================================================================
221 //=========================================================================
223 // InteractionContinuation Implementation.
225 //=========================================================================
226 //=========================================================================
228 namespace ucbhelper
231 struct InteractionContinuation_Impl
233 InteractionRequest * m_pRequest;
235 InteractionContinuation_Impl( InteractionRequest * pRequest )
236 : m_pRequest( pRequest ) {}
241 //=========================================================================
242 InteractionContinuation::InteractionContinuation(
243 InteractionRequest * pRequest )
244 : m_pImpl( new InteractionContinuation_Impl( pRequest ) )
248 //=========================================================================
249 // virtual
250 InteractionContinuation::~InteractionContinuation()
252 delete m_pImpl;
255 //=========================================================================
256 void InteractionContinuation::recordSelection()
258 m_pImpl->m_pRequest->setSelection( this );
261 //=========================================================================
262 //=========================================================================
264 // InteractionAbort Implementation.
266 //=========================================================================
267 //=========================================================================
269 //=========================================================================
271 // XInterface methods.
273 //=========================================================================
275 // virtual
276 void SAL_CALL InteractionAbort::acquire()
277 throw()
279 OWeakObject::acquire();
282 //=========================================================================
283 // virtual
284 void SAL_CALL InteractionAbort::release()
285 throw()
287 OWeakObject::release();
290 //=========================================================================
291 // virtual
292 uno::Any SAL_CALL
293 InteractionAbort::queryInterface( const uno::Type & rType )
294 throw ( uno::RuntimeException )
296 uno::Any aRet = cppu::queryInterface( rType,
297 static_cast< lang::XTypeProvider * >( this ),
298 static_cast< task::XInteractionContinuation * >( this ),
299 static_cast< task::XInteractionAbort * >( this ) );
301 return aRet.hasValue()
302 ? aRet : InteractionContinuation::queryInterface( rType );
305 //=========================================================================
307 // XTypeProvider methods.
309 //=========================================================================
311 // virtual
312 uno::Sequence< sal_Int8 > SAL_CALL InteractionAbort::getImplementationId()
313 throw( uno::RuntimeException )
315 static cppu::OImplementationId* pId = NULL;
316 if ( !pId )
318 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
319 if ( !pId )
321 static cppu::OImplementationId id( sal_False );
322 pId = &id;
325 return (*pId).getImplementationId();
328 //=========================================================================
329 // virtual
330 uno::Sequence< uno::Type > SAL_CALL InteractionAbort::getTypes()
331 throw( uno::RuntimeException )
333 static cppu::OTypeCollection* pCollection = 0;
334 if ( !pCollection )
336 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
337 if ( !pCollection )
339 static cppu::OTypeCollection collection(
340 getCppuType( static_cast<
341 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
342 getCppuType( static_cast<
343 uno::Reference< task::XInteractionAbort > * >( 0 ) ) );
344 pCollection = &collection;
347 return (*pCollection).getTypes();
350 //=========================================================================
352 // XInteractionContinuation methods.
354 //=========================================================================
356 // virtual
357 void SAL_CALL InteractionAbort::select()
358 throw( uno::RuntimeException )
360 recordSelection();
363 //=========================================================================
364 //=========================================================================
366 // InteractionRetry Implementation.
368 //=========================================================================
369 //=========================================================================
371 //=========================================================================
373 // XInterface methods.
375 //=========================================================================
377 // virtual
378 void SAL_CALL InteractionRetry::acquire()
379 throw()
381 OWeakObject::acquire();
384 //=========================================================================
385 // virtual
386 void SAL_CALL InteractionRetry::release()
387 throw()
389 OWeakObject::release();
392 //=========================================================================
393 // virtual
394 uno::Any SAL_CALL
395 InteractionRetry::queryInterface( const uno::Type & rType )
396 throw ( uno::RuntimeException )
398 uno::Any aRet = cppu::queryInterface( rType,
399 static_cast< lang::XTypeProvider * >( this ),
400 static_cast< task::XInteractionContinuation * >( this ),
401 static_cast< task::XInteractionRetry * >( this ) );
403 return aRet.hasValue()
404 ? aRet : InteractionContinuation::queryInterface( rType );
407 //=========================================================================
409 // XTypeProvider methods.
411 //=========================================================================
413 // virtual
414 uno::Sequence< sal_Int8 > SAL_CALL InteractionRetry::getImplementationId()
415 throw( uno::RuntimeException )
417 static cppu::OImplementationId* pId = NULL;
418 if ( !pId )
420 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
421 if ( !pId )
423 static cppu::OImplementationId id( sal_False );
424 pId = &id;
427 return (*pId).getImplementationId();
430 //=========================================================================
431 // virtual
432 uno::Sequence< uno::Type > SAL_CALL InteractionRetry::getTypes()
433 throw( uno::RuntimeException )
435 static cppu::OTypeCollection* pCollection = 0;
436 if ( !pCollection )
438 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
439 if ( !pCollection )
441 static cppu::OTypeCollection collection(
442 getCppuType( static_cast<
443 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
444 getCppuType( static_cast<
445 uno::Reference< task::XInteractionRetry > * >( 0 ) ) );
446 pCollection = &collection;
449 return (*pCollection).getTypes();
452 //=========================================================================
454 // XInteractionContinuation methods.
456 //=========================================================================
458 // virtual
459 void SAL_CALL InteractionRetry::select()
460 throw( uno::RuntimeException )
462 recordSelection();
465 //=========================================================================
466 //=========================================================================
468 // InteractionApprove Implementation.
470 //=========================================================================
471 //=========================================================================
473 //=========================================================================
475 // XInterface methods.
477 //=========================================================================
479 // virtual
480 void SAL_CALL InteractionApprove::acquire()
481 throw()
483 OWeakObject::acquire();
486 //=========================================================================
487 // virtual
488 void SAL_CALL InteractionApprove::release()
489 throw()
491 OWeakObject::release();
494 //=========================================================================
495 // virtual
496 uno::Any SAL_CALL
497 InteractionApprove::queryInterface( const uno::Type & rType )
498 throw ( uno::RuntimeException )
500 uno::Any aRet = cppu::queryInterface( rType,
501 static_cast< lang::XTypeProvider * >( this ),
502 static_cast< task::XInteractionContinuation * >( this ),
503 static_cast< task::XInteractionApprove * >( this ) );
505 return aRet.hasValue()
506 ? aRet : InteractionContinuation::queryInterface( rType );
509 //=========================================================================
511 // XTypeProvider methods.
513 //=========================================================================
515 // virtual
516 uno::Sequence< sal_Int8 > SAL_CALL InteractionApprove::getImplementationId()
517 throw( uno::RuntimeException )
519 static cppu::OImplementationId* pId = NULL;
520 if ( !pId )
522 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
523 if ( !pId )
525 static cppu::OImplementationId id( sal_False );
526 pId = &id;
529 return (*pId).getImplementationId();
532 //=========================================================================
533 // virtual
534 uno::Sequence< uno::Type > SAL_CALL InteractionApprove::getTypes()
535 throw( uno::RuntimeException )
537 static cppu::OTypeCollection* pCollection = 0;
538 if ( !pCollection )
540 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
541 if ( !pCollection )
543 static cppu::OTypeCollection collection(
544 getCppuType( static_cast<
545 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
546 getCppuType( static_cast<
547 uno::Reference< task::XInteractionApprove > * >( 0 ) ) );
548 pCollection = &collection;
551 return (*pCollection).getTypes();
554 //=========================================================================
556 // XInteractionContinuation methods.
558 //=========================================================================
560 // virtual
561 void SAL_CALL InteractionApprove::select()
562 throw( uno::RuntimeException )
564 recordSelection();
567 //=========================================================================
568 //=========================================================================
570 // InteractionDisapprove Implementation.
572 //=========================================================================
573 //=========================================================================
575 //=========================================================================
577 // XInterface methods.
579 //=========================================================================
581 // virtual
582 void SAL_CALL InteractionDisapprove::acquire()
583 throw()
585 OWeakObject::acquire();
588 //=========================================================================
589 // virtual
590 void SAL_CALL InteractionDisapprove::release()
591 throw()
593 OWeakObject::release();
596 //=========================================================================
597 // virtual
598 uno::Any SAL_CALL
599 InteractionDisapprove::queryInterface( const uno::Type & rType )
600 throw ( uno::RuntimeException )
602 uno::Any aRet = cppu::queryInterface( rType,
603 static_cast< lang::XTypeProvider * >( this ),
604 static_cast< task::XInteractionContinuation * >( this ),
605 static_cast< task::XInteractionDisapprove * >( this ) );
607 return aRet.hasValue()
608 ? aRet : InteractionContinuation::queryInterface( rType );
611 //=========================================================================
613 // XTypeProvider methods.
615 //=========================================================================
617 // virtual
618 uno::Sequence< sal_Int8 > SAL_CALL InteractionDisapprove::getImplementationId()
619 throw( uno::RuntimeException )
621 static cppu::OImplementationId* pId = NULL;
622 if ( !pId )
624 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
625 if ( !pId )
627 static cppu::OImplementationId id( sal_False );
628 pId = &id;
631 return (*pId).getImplementationId();
634 //=========================================================================
635 // virtual
636 uno::Sequence< uno::Type > SAL_CALL InteractionDisapprove::getTypes()
637 throw( uno::RuntimeException )
639 static cppu::OTypeCollection* pCollection = 0;
640 if ( !pCollection )
642 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
643 if ( !pCollection )
645 static cppu::OTypeCollection collection(
646 getCppuType( static_cast<
647 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
648 getCppuType( static_cast<
649 uno::Reference< task::XInteractionDisapprove > * >( 0 ) ) );
650 pCollection = &collection;
653 return (*pCollection).getTypes();
656 //=========================================================================
658 // XInteractionContinuation methods.
660 //=========================================================================
662 // virtual
663 void SAL_CALL InteractionDisapprove::select()
664 throw( uno::RuntimeException )
666 recordSelection();
669 //=========================================================================
670 //=========================================================================
672 // InteractionSupplyAuthentication Implementation.
674 //=========================================================================
675 //=========================================================================
677 //=========================================================================
679 // XInterface methods.
681 //=========================================================================
683 // virtual
684 void SAL_CALL InteractionSupplyAuthentication::acquire()
685 throw()
687 OWeakObject::acquire();
690 //=========================================================================
691 // virtual
692 void SAL_CALL InteractionSupplyAuthentication::release()
693 throw()
695 OWeakObject::release();
698 //=========================================================================
699 // virtual
700 uno::Any SAL_CALL
701 InteractionSupplyAuthentication::queryInterface( const uno::Type & rType )
702 throw ( uno::RuntimeException )
704 uno::Any aRet = cppu::queryInterface( rType,
705 static_cast< lang::XTypeProvider * >( this ),
706 static_cast< task::XInteractionContinuation * >( this ),
707 static_cast< ucb::XInteractionSupplyAuthentication * >( this ),
708 static_cast< ucb::XInteractionSupplyAuthentication2 * >( this ));
710 return aRet.hasValue()
711 ? aRet : InteractionContinuation::queryInterface( rType );
714 //=========================================================================
716 // XTypeProvider methods.
718 //=========================================================================
720 // virtual
721 uno::Sequence< sal_Int8 > SAL_CALL
722 InteractionSupplyAuthentication::getImplementationId()
723 throw( uno::RuntimeException )
725 static cppu::OImplementationId* pId = NULL;
726 if ( !pId )
728 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
729 if ( !pId )
731 static cppu::OImplementationId id( sal_False );
732 pId = &id;
735 return (*pId).getImplementationId();
738 //=========================================================================
739 // virtual
740 uno::Sequence< uno::Type > SAL_CALL InteractionSupplyAuthentication::getTypes()
741 throw( uno::RuntimeException )
743 static cppu::OTypeCollection* pCollection = 0;
744 if ( !pCollection )
746 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
747 if ( !pCollection )
749 static cppu::OTypeCollection collection(
750 getCppuType( static_cast<
751 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
752 getCppuType( static_cast<
753 uno::Reference<
754 ucb::XInteractionSupplyAuthentication2 > * >( 0 ) ) );
755 pCollection = &collection;
758 return (*pCollection).getTypes();
761 //=========================================================================
763 // XInteractionContinuation methods.
765 //=========================================================================
767 // virtual
768 void SAL_CALL InteractionSupplyAuthentication::select()
769 throw( uno::RuntimeException )
771 recordSelection();
774 //=========================================================================
776 // XInteractionSupplyAuthentication methods.
778 //=========================================================================
780 // virtual
781 sal_Bool SAL_CALL
782 InteractionSupplyAuthentication::canSetRealm()
783 throw( uno::RuntimeException )
785 return m_bCanSetRealm;
788 //=========================================================================
789 // virtual
790 void SAL_CALL
791 InteractionSupplyAuthentication::setRealm( const rtl::OUString& Realm )
792 throw( uno::RuntimeException )
794 OSL_ENSURE( m_bCanSetPassword,
795 "InteractionSupplyAuthentication::setRealm - Not supported!" );
797 if ( m_bCanSetRealm )
798 m_aRealm = Realm;
801 //=========================================================================
802 // virtual
803 sal_Bool SAL_CALL
804 InteractionSupplyAuthentication::canSetUserName()
805 throw( uno::RuntimeException )
807 return m_bCanSetUserName;
810 //=========================================================================
811 // virtual
812 void SAL_CALL
813 InteractionSupplyAuthentication::setUserName( const rtl::OUString& UserName )
814 throw( uno::RuntimeException )
816 OSL_ENSURE( m_bCanSetUserName,
817 "InteractionSupplyAuthentication::setUserName - Not supported!" );
819 if ( m_bCanSetUserName )
820 m_aUserName = UserName;
823 //=========================================================================
824 // virtual
825 sal_Bool SAL_CALL
826 InteractionSupplyAuthentication::canSetPassword()
827 throw( uno::RuntimeException )
829 return m_bCanSetPassword;
832 //=========================================================================
833 // virtual
834 void SAL_CALL
835 InteractionSupplyAuthentication::setPassword( const rtl::OUString& Password )
836 throw( uno::RuntimeException )
838 OSL_ENSURE( m_bCanSetPassword,
839 "InteractionSupplyAuthentication::setPassword - Not supported!" );
841 if ( m_bCanSetPassword )
842 m_aPassword = Password;
845 //=========================================================================
846 // virtual
847 uno::Sequence< ucb::RememberAuthentication > SAL_CALL
848 InteractionSupplyAuthentication::getRememberPasswordModes(
849 ucb::RememberAuthentication& Default )
850 throw( uno::RuntimeException )
852 Default = m_eDefaultRememberPasswordMode;
853 return m_aRememberPasswordModes;
856 //=========================================================================
857 // virtual
858 void SAL_CALL
859 InteractionSupplyAuthentication::setRememberPassword(
860 ucb::RememberAuthentication Remember )
861 throw( uno::RuntimeException )
863 m_eRememberPasswordMode = Remember;
866 //=========================================================================
867 // virtual
868 sal_Bool SAL_CALL
869 InteractionSupplyAuthentication::canSetAccount()
870 throw( uno::RuntimeException )
872 return m_bCanSetAccount;
875 //=========================================================================
876 // virtual
877 void SAL_CALL
878 InteractionSupplyAuthentication::setAccount( const rtl::OUString& Account )
879 throw( uno::RuntimeException )
881 OSL_ENSURE( m_bCanSetAccount,
882 "InteractionSupplyAuthentication::setAccount - Not supported!" );
884 if ( m_bCanSetAccount )
885 m_aAccount = Account;
888 //=========================================================================
889 // virtual
890 uno::Sequence< ucb::RememberAuthentication > SAL_CALL
891 InteractionSupplyAuthentication::getRememberAccountModes(
892 ucb::RememberAuthentication& Default )
893 throw( uno::RuntimeException )
895 Default = m_eDefaultRememberAccountMode;
896 return m_aRememberAccountModes;
899 //=========================================================================
900 // virtual
901 void SAL_CALL InteractionSupplyAuthentication::setRememberAccount(
902 ucb::RememberAuthentication Remember )
903 throw( uno::RuntimeException )
905 m_eRememberAccountMode = Remember;
908 //=========================================================================
910 // XInteractionSupplyAuthentication2 methods.
912 //=========================================================================
914 // virtual
915 ::sal_Bool SAL_CALL
916 InteractionSupplyAuthentication::canUseSystemCredentials(
917 ::sal_Bool& Default )
918 throw ( uno::RuntimeException )
920 Default = m_bDefaultUseSystemCredentials;
921 return m_bCanUseSystemCredentials;
924 //=========================================================================
925 // virtual
926 void SAL_CALL InteractionSupplyAuthentication::setUseSystemCredentials(
927 ::sal_Bool UseSystemCredentials )
928 throw ( uno::RuntimeException )
930 if ( m_bCanUseSystemCredentials )
931 m_bUseSystemCredentials = UseSystemCredentials;
935 //=========================================================================
936 //=========================================================================
938 // InteractionSupplyName Implementation.
940 //=========================================================================
941 //=========================================================================
943 //=========================================================================
945 // XInterface methods.
947 //=========================================================================
949 // virtual
950 void SAL_CALL InteractionSupplyName::acquire()
951 throw()
953 OWeakObject::acquire();
956 //=========================================================================
957 // virtual
958 void SAL_CALL InteractionSupplyName::release()
959 throw()
961 OWeakObject::release();
964 //=========================================================================
965 // virtual
966 uno::Any SAL_CALL
967 InteractionSupplyName::queryInterface( const uno::Type & rType )
968 throw ( uno::RuntimeException )
970 uno::Any aRet = cppu::queryInterface( rType,
971 static_cast< lang::XTypeProvider * >( this ),
972 static_cast< task::XInteractionContinuation * >( this ),
973 static_cast< ucb::XInteractionSupplyName * >( this ) );
975 return aRet.hasValue()
976 ? aRet : InteractionContinuation::queryInterface( rType );
979 //=========================================================================
981 // XTypeProvider methods.
983 //=========================================================================
985 // virtual
986 uno::Sequence< sal_Int8 > SAL_CALL InteractionSupplyName::getImplementationId()
987 throw( uno::RuntimeException )
989 static cppu::OImplementationId* pId = NULL;
990 if ( !pId )
992 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
993 if ( !pId )
995 static cppu::OImplementationId id( sal_False );
996 pId = &id;
999 return (*pId).getImplementationId();
1002 //=========================================================================
1003 // virtual
1004 uno::Sequence< uno::Type > SAL_CALL InteractionSupplyName::getTypes()
1005 throw( uno::RuntimeException )
1007 static cppu::OTypeCollection* pCollection = 0;
1008 if ( !pCollection )
1010 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1011 if ( !pCollection )
1013 static cppu::OTypeCollection collection(
1014 getCppuType( static_cast<
1015 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
1016 getCppuType( static_cast<
1017 uno::Reference< ucb::XInteractionSupplyName > * >( 0 ) ) );
1018 pCollection = &collection;
1021 return (*pCollection).getTypes();
1024 //=========================================================================
1026 // XInteractionContinuation methods.
1028 //=========================================================================
1030 // virtual
1031 void SAL_CALL InteractionSupplyName::select()
1032 throw( uno::RuntimeException )
1034 recordSelection();
1037 //=========================================================================
1039 // XInteractionSupplyName methods.
1041 //=========================================================================
1043 // virtual
1044 void SAL_CALL
1045 InteractionSupplyName::setName( const rtl::OUString& Name )
1046 throw( uno::RuntimeException )
1048 m_aName = Name;
1051 //=========================================================================
1052 //=========================================================================
1054 // InteractionReplaceExistingData Implementation.
1056 //=========================================================================
1057 //=========================================================================
1059 //=========================================================================
1061 // XInterface methods.
1063 //=========================================================================
1065 // virtual
1066 void SAL_CALL InteractionReplaceExistingData::acquire()
1067 throw()
1069 OWeakObject::acquire();
1072 //=========================================================================
1073 // virtual
1074 void SAL_CALL InteractionReplaceExistingData::release()
1075 throw()
1077 OWeakObject::release();
1080 //=========================================================================
1081 // virtual
1082 uno::Any SAL_CALL
1083 InteractionReplaceExistingData::queryInterface( const uno::Type & rType )
1084 throw ( uno::RuntimeException )
1086 uno::Any aRet = cppu::queryInterface( rType,
1087 static_cast< lang::XTypeProvider * >( this ),
1088 static_cast< task::XInteractionContinuation * >( this ),
1089 static_cast< ucb::XInteractionReplaceExistingData * >( this ) );
1091 return aRet.hasValue()
1092 ? aRet : InteractionContinuation::queryInterface( rType );
1095 //=========================================================================
1097 // XTypeProvider methods.
1099 //=========================================================================
1101 // virtual
1102 uno::Sequence< sal_Int8 > SAL_CALL
1103 InteractionReplaceExistingData::getImplementationId()
1104 throw( uno::RuntimeException )
1106 static cppu::OImplementationId* pId = NULL;
1107 if ( !pId )
1109 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1110 if ( !pId )
1112 static cppu::OImplementationId id( sal_False );
1113 pId = &id;
1116 return (*pId).getImplementationId();
1119 //=========================================================================
1120 // virtual
1121 uno::Sequence< uno::Type > SAL_CALL InteractionReplaceExistingData::getTypes()
1122 throw( uno::RuntimeException )
1124 static cppu::OTypeCollection* pCollection = 0;
1125 if ( !pCollection )
1127 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1128 if ( !pCollection )
1130 static cppu::OTypeCollection collection(
1131 getCppuType( static_cast<
1132 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
1133 getCppuType( static_cast<
1134 uno::Reference<
1135 ucb::XInteractionReplaceExistingData > * >( 0 ) ) );
1136 pCollection = &collection;
1139 return (*pCollection).getTypes();
1142 //=========================================================================
1144 // XInteractionContinuation methods.
1146 //=========================================================================
1148 // virtual
1149 void SAL_CALL InteractionReplaceExistingData::select()
1150 throw( uno::RuntimeException )
1152 recordSelection();