1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include "finteraction.hxx"
31 #include <tools/debug.hxx>
32 #include <osl/diagnose.h>
33 #include <com/sun/star/ucb/InteractiveIOException.hpp>
35 //........................................................................
38 //........................................................................
39 using namespace ::com::sun::star::uno
;
40 using namespace ::com::sun::star::task
;
41 using namespace ::com::sun::star::ucb
;
43 //====================================================================
44 //= OFilePickerInteractionHandler
45 //====================================================================
46 DBG_NAME( OFilePickerInteractionHandler
)
47 //--------------------------------------------------------------------
48 OFilePickerInteractionHandler::OFilePickerInteractionHandler( const Reference
< XInteractionHandler
>& _rxMaster
)
49 :m_xMaster( _rxMaster
)
50 ,m_bDoesNotExist(sal_False
)
52 DBG_CTOR( OFilePickerInteractionHandler
, NULL
);
53 OSL_ENSURE( m_xMaster
.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" );
56 //--------------------------------------------------------------------
57 OFilePickerInteractionHandler::~OFilePickerInteractionHandler( )
59 DBG_DTOR( OFilePickerInteractionHandler
, NULL
);
62 //--------------------------------------------------------------------
63 void SAL_CALL
OFilePickerInteractionHandler::handle( const Reference
< XInteractionRequest
>& _rxRequest
) throw (RuntimeException
)
65 InteractiveIOException aIoException
;
66 if ( _rxRequest
->getRequest() >>= aIoException
)
68 if ( IOErrorCode_NOT_EXISTING
== aIoException
.Code
)
70 m_bDoesNotExist
= sal_True
;
76 m_xMaster
->handle( _rxRequest
);
79 //........................................................................
81 //........................................................................
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */