LCOV - code coverage report
Current view: top level - ucb/source/ucp/file - filinsreq.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 32 0.0 %
Date: 2014-04-14 Functions: 0 17 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #ifndef _FILINSREQ_HXX_
      22             : #define _FILINSREQ_HXX_
      23             : 
      24             : #include <rtl/ustring.hxx>
      25             : #include <com/sun/star/uno/XInterface.hpp>
      26             : #include <com/sun/star/task/XInteractionAbort.hpp>
      27             : #include <com/sun/star/ucb/XInteractionSupplyName.hpp>
      28             : #include <com/sun/star/task/XInteractionRequest.hpp>
      29             : #include <cppuhelper/implbase1.hxx>
      30             : 
      31             : 
      32             : namespace fileaccess {
      33             : 
      34             : 
      35             :     class shell;
      36             : 
      37             : 
      38           0 : class XInteractionSupplyNameImpl : public cppu::WeakImplHelper1<
      39             :     css::ucb::XInteractionSupplyName >
      40             :     {
      41             :     public:
      42             : 
      43           0 :         XInteractionSupplyNameImpl()
      44           0 :             : m_bSelected(false)
      45             :         {
      46           0 :         }
      47             : 
      48           0 :         virtual void SAL_CALL select()
      49             :             throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
      50             :         {
      51           0 :             m_bSelected = true;
      52           0 :         }
      53             : 
      54           0 :         void SAL_CALL setName(const OUString& Name)
      55             :             throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
      56             :         {
      57           0 :             m_aNewName = Name;
      58           0 :         }
      59             : 
      60           0 :         OUString getName() const
      61             :         {
      62           0 :             return m_aNewName;
      63             :         }
      64             : 
      65           0 :         bool isSelected() const
      66             :         {
      67           0 :             return m_bSelected;
      68             :         }
      69             : 
      70             :     private:
      71             : 
      72             :         bool          m_bSelected;
      73             :         OUString m_aNewName;
      74             :     };
      75             : 
      76             : 
      77             : 
      78           0 :     class XInteractionAbortImpl : public cppu::WeakImplHelper1<
      79             :         css::task::XInteractionAbort >
      80             :     {
      81             :     public:
      82             : 
      83           0 :         XInteractionAbortImpl()
      84           0 :             : m_bSelected(false)
      85             :         {
      86           0 :         }
      87             : 
      88           0 :         virtual void SAL_CALL select()
      89             :             throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
      90             :         {
      91           0 :             m_bSelected = true;
      92           0 :         }
      93             : 
      94             : 
      95           0 :         bool isSelected() const
      96             :         {
      97           0 :             return m_bSelected;
      98             :         }
      99             : 
     100             :     private:
     101             : 
     102             :         bool          m_bSelected;
     103             :     };
     104             : 
     105             : 
     106             : 
     107           0 :     class XInteractionRequestImpl : public cppu::WeakImplHelper1<
     108             :         css::task::XInteractionRequest >
     109             :     {
     110             :     public:
     111             : 
     112             :         XInteractionRequestImpl(
     113             :             const OUString& aClashingName,
     114             :             const com::sun::star::uno::Reference<
     115             :             com::sun::star::uno::XInterface>& xOrigin,
     116             :             shell* pShell,
     117             :             sal_Int32 CommandId);
     118             : 
     119             :         ::com::sun::star::uno::Any SAL_CALL getRequest(  )
     120             :             throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     121             : 
     122             :         com::sun::star::uno::Sequence<
     123             :             com::sun::star::uno::Reference<
     124             :             com::sun::star::task::XInteractionContinuation > > SAL_CALL
     125           0 :         getContinuations(  )
     126             :             throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     127             :         {
     128           0 :             return m_aSeq;
     129             :         }
     130             : 
     131           0 :         bool aborted() const
     132             :         {
     133           0 :             return p2->isSelected();
     134             :         }
     135             : 
     136           0 :         OUString newName() const
     137             :         {
     138           0 :             if( p1->isSelected() )
     139           0 :                 return p1->getName();
     140             :             else
     141           0 :                 return OUString();
     142             :         }
     143             : 
     144             :     private:
     145             : 
     146             :         XInteractionSupplyNameImpl* p1;
     147             :         XInteractionAbortImpl* p2;
     148             :         sal_Int32 m_nErrorCode,m_nMinorError;
     149             : 
     150             :         com::sun::star::uno::Sequence<
     151             :             com::sun::star::uno::Reference<
     152             :             com::sun::star::task::XInteractionContinuation > > m_aSeq;
     153             : 
     154             :         OUString m_aClashingName;
     155             :         com::sun::star::uno::Reference<
     156             :             com::sun::star::uno::XInterface> m_xOrigin;
     157             :     };
     158             : 
     159             : }
     160             : 
     161             : 
     162             : #endif
     163             : 
     164             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10