1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_dbaccess.hxx" 26 27 #ifndef DBAUI_FILEPICKER_INTERACTION_HXX 28 #include "finteraction.hxx" 29 #endif 30 #ifndef _TOOLS_DEBUG_HXX 31 #include <tools/debug.hxx> 32 #endif 33 #ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_ 34 #include <com/sun/star/ucb/InteractiveIOException.hpp> 35 #endif 36 37 //........................................................................ 38 namespace dbaui 39 { 40 //........................................................................ 41 using namespace ::com::sun::star::uno; 42 using namespace ::com::sun::star::task; 43 using namespace ::com::sun::star::ucb; 44 45 //==================================================================== 46 //= OFilePickerInteractionHandler 47 //==================================================================== DBG_NAME(OFilePickerInteractionHandler)48 DBG_NAME( OFilePickerInteractionHandler ) 49 //-------------------------------------------------------------------- 50 OFilePickerInteractionHandler::OFilePickerInteractionHandler( const Reference< XInteractionHandler >& _rxMaster ) 51 :m_xMaster( _rxMaster ) 52 ,m_bDoesNotExist(sal_False) 53 { 54 DBG_CTOR( OFilePickerInteractionHandler, NULL ); 55 DBG_ASSERT( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); 56 } 57 58 //-------------------------------------------------------------------- ~OFilePickerInteractionHandler()59 OFilePickerInteractionHandler::~OFilePickerInteractionHandler( ) 60 { 61 DBG_DTOR( OFilePickerInteractionHandler, NULL ); 62 } 63 64 //-------------------------------------------------------------------- handle(const Reference<XInteractionRequest> & _rxRequest)65 void SAL_CALL OFilePickerInteractionHandler::handle( const Reference< XInteractionRequest >& _rxRequest ) throw (RuntimeException) 66 { 67 InteractiveIOException aIoException; 68 if ( _rxRequest->getRequest() >>= aIoException ) 69 { 70 if ( IOErrorCode_NOT_EXISTING == aIoException.Code ) 71 { 72 m_bDoesNotExist = sal_True; 73 return; 74 } 75 } 76 77 if ( m_xMaster.is() ) 78 m_xMaster->handle( _rxRequest ); 79 } 80 81 //........................................................................ 82 } // namespace svt 83 //........................................................................ 84 85