merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / inc / configinteractionhandler.hxx
blob6b1d3f2b360f213844f332372d6729256f7638be
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: configinteractionhandler.hxx,v $
10 * $Revision: 1.5 $
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 CONFIGMGR_CONFIGINTERACTIONHANDLER_HXX
32 #define CONFIGMGR_CONFIGINTERACTIONHANDLER_HXX
34 #include "sal/config.h"
35 #include "com/sun/star/uno/Reference.hxx"
36 #include "rtl/ref.hxx"
37 #include "uno/current_context.hxx"
39 namespace com { namespace sun { namespace star {
40 namespace task { class XInteractionHandler; }
41 namespace uno { class Any; }
42 } } }
43 namespace rtl { class OUString; }
45 namespace configmgr { namespace apihelper {
47 /**
48 represents the InteractionHandler for configuration errors from the current
49 context.
51 <p>Should only be kept in scope while the error is being handled.</p>
53 class ConfigurationInteractionHandler {
54 public:
55 ConfigurationInteractionHandler();
57 ~ConfigurationInteractionHandler();
59 com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >
60 get() const; // throw (com::sun::star::uno::RuntimeException)
62 void setRecursive(
63 com::sun::star::uno::Reference<
64 com::sun::star::task::XInteractionHandler > const & handler);
66 private:
67 ConfigurationInteractionHandler(ConfigurationInteractionHandler &);
68 // not defined
69 void operator =(ConfigurationInteractionHandler &); // not defined
71 com::sun::star::uno::Any getPreviousContextValue(
72 rtl::OUString const & name) const;
73 // throw (com::sun::star::uno::RuntimeException)
75 class Context;
76 friend class Context;
78 rtl::Reference< Context > m_context;
79 com::sun::star::uno::ContextLayer m_layer;
82 } }
84 #endif