Update ooo320-m1
[ooovba.git] / fpicker / source / office / fpinteraction.hxx
blob6f614d7a3fea6c929b47c68cc00db5e35da54e05
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: fpinteraction.hxx,v $
10 * $Revision: 1.4 $
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 #ifndef SVTOOLS_FILEPICKER_INTERACTION_HXX
32 #define SVTOOLS_FILEPICKER_INTERACTION_HXX
34 #include <cppuhelper/implbase1.hxx>
35 #include <com/sun/star/task/XInteractionHandler.hpp>
37 //........................................................................
38 namespace svt
40 //........................................................................
42 //====================================================================
43 //= OFilePickerInteractionHandler
44 //====================================================================
45 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::task::XInteractionHandler
46 > OFilePickerInteractionHandler_Base;
48 /** a InteractionHandler implementation which extends another handler with some customizability
50 class OFilePickerInteractionHandler : public OFilePickerInteractionHandler_Base
52 public:
53 /** flags, which indicates special handled interactions
54 These values will be used combained as flags - so they must
55 in range [2^n]!
57 enum EInterceptedInteractions
59 E_NOINTERCEPTION = 0,
60 E_DOESNOTEXIST = 1
61 // next values [2,4,8,16 ...]!
64 protected:
65 ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > m_xMaster ; // our master handler
66 ::com::sun::star::uno::Any m_aException ; // the last handled request
67 sal_Bool m_bUsed ; // indicates using of this interaction handler instance
68 EInterceptedInteractions m_eInterceptions ; // enable/disable interception of some special interactions
70 public:
71 OFilePickerInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxMaster );
73 // some generic functions
74 void enableInterceptions( EInterceptedInteractions eInterceptions );
75 sal_Bool wasUsed () const;
76 void resetUseState ();
77 void forgetRequest ();
79 // functions to analyze last cached request
80 sal_Bool wasAccessDenied() const;
82 protected:
83 // XInteractionHandler
84 virtual void SAL_CALL handle( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& _rxRequest ) throw (::com::sun::star::uno::RuntimeException);
86 private:
87 ~OFilePickerInteractionHandler();
90 //........................................................................
91 } // namespace svt
92 //........................................................................
94 #endif // SVTOOLS_FILEPICKER_INTERACTION_HXX