LCOV - code coverage report
Current view: top level - dbaccess/source/ui/inc - linkeddocuments.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 1 0.0 %
Date: 2014-11-03 Functions: 0 1 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             : #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_LINKEDDOCUMENTS_HXX
      21             : #define INCLUDED_DBACCESS_SOURCE_UI_INC_LINKEDDOCUMENTS_HXX
      22             : 
      23             : #include "AppElementType.hxx"
      24             : 
      25             : #include <com/sun/star/container/XNameAccess.hpp>
      26             : #include <com/sun/star/uno/XComponentContext.hpp>
      27             : #include <com/sun/star/lang/XComponent.hpp>
      28             : #include <com/sun/star/beans/XPropertySet.hpp>
      29             : #include <com/sun/star/sdbc/XConnection.hpp>
      30             : #include <com/sun/star/frame/XFrame.hpp>
      31             : #include <com/sun/star/frame/XComponentLoader.hpp>
      32             : #include <com/sun/star/ucb/XContent.hpp>
      33             : #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
      34             : #include <comphelper/namedvaluecollection.hxx>
      35             : 
      36             : namespace vcl { class Window; }
      37             : namespace dbaui
      38             : {
      39             : 
      40             :     // OLinkedDocumentsAccess
      41             :     class OLinkedDocumentsAccess
      42             :     {
      43             :     protected:
      44             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
      45             :                     m_xContext;
      46             :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
      47             :                     m_xDocumentContainer;
      48             :         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
      49             :                     m_xConnection;
      50             :         ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >
      51             :                     m_xDocumentUI;
      52             :         vcl::Window*     m_pDialogParent;
      53             :         OUString    m_sCurrentlyEditing;
      54             :         OUString    m_sDataSourceName;
      55             : 
      56             :     public:
      57             :         OLinkedDocumentsAccess(
      58             :             vcl::Window* _pDialogParent,
      59             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rDocumentUI,
      60             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
      61             :             const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
      62             :             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
      63             :             const OUString& _sDataSourceName
      64             :         );
      65             :         ~OLinkedDocumentsAccess();
      66             : 
      67           0 :         inline bool isConnected() const { return m_xConnection.is(); }
      68             : 
      69             :         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>
      70             :                 open(
      71             :                     const OUString& _rLinkName,
      72             :                     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _xDefinition,
      73             :                     ElementOpenMode _eOpenMode,
      74             :                     const ::comphelper::NamedValueCollection& _rAdditionalArgs
      75             :                 );
      76             : 
      77             :         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
      78             :                 newDocument(
      79             :                           sal_Int32 i_nActionID,
      80             :                     const ::comphelper::NamedValueCollection& i_rCreationArgs,
      81             :                           ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rDefinition
      82             :                 );
      83             : 
      84             :         void    newFormWithPilot(
      85             :                     const sal_Int32 _nCommandType = -1,
      86             :                     const OUString& _rObjectName = OUString()
      87             :                 );
      88             :         void    newReportWithPilot(
      89             :                     const sal_Int32 _nCommandType = -1,
      90             :                     const OUString& _rObjectName = OUString()
      91             :                 );
      92             :         void    newQueryWithPilot();
      93             :         void    newTableWithPilot();
      94             : 
      95             :         enum RESULT
      96             :         {
      97             :             ERROR,
      98             :             SUCCESS,
      99             :             CANCEL
     100             :         };
     101             :     private:
     102             :         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
     103             :             impl_open(
     104             :                 const OUString& _rLinkName,
     105             :                 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDefinition,
     106             :                 ElementOpenMode _eOpenMode,
     107             :                 const ::comphelper::NamedValueCollection& _rAdditionalArgs
     108             :             );
     109             : 
     110             :         void
     111             :             impl_newWithPilot(
     112             :                 const char* _pWizardService,
     113             :                 const sal_Int32 _nCommandType,
     114             :                 const OUString& _rObjectName
     115             :             );
     116             : 
     117             :     };
     118             : 
     119             : }   // namespace dbaui
     120             : 
     121             : #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_LINKEDDOCUMENTS_HXX
     122             : 
     123             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10