LCOV - code coverage report
Current view: top level - filter/source/xsltdialog - xmlfiltersettingsdialog.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 4 0.0 %
Date: 2014-04-11 Functions: 0 6 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             : #ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERSETTINGSDIALOG_HXX
      20             : #define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERSETTINGSDIALOG_HXX
      21             : 
      22             : #include <com/sun/star/lang/XComponent.hpp>
      23             : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      24             : #include <com/sun/star/container/XHierarchicalName.hpp>
      25             : #include <com/sun/star/container/XNameContainer.hpp>
      26             : #include <vcl/button.hxx>
      27             : #include <vcl/dialog.hxx>
      28             : #include <vcl/layout.hxx>
      29             : #include <svtools/svtabbx.hxx>
      30             : #include <svl/poolitem.hxx>
      31             : #include <unotools/moduleoptions.hxx>
      32             : 
      33             : #include "xmlfiltercommon.hxx"
      34             : 
      35             : 
      36             : 
      37             : class HeaderBar;
      38             : class XMLFilterListBox;
      39             : 
      40             : class SvxPathControl : public VclVBox
      41             : {
      42             : private:
      43             :     bool bHasBeenShown;
      44             :     HeaderBar* m_pHeaderBar;
      45             :     XMLFilterListBox* m_pFocusCtrl;
      46             : protected:
      47             :     virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
      48             : public:
      49             :     SvxPathControl(Window* pParent);
      50           0 :     HeaderBar* getHeaderBar() { return m_pHeaderBar; }
      51           0 :     XMLFilterListBox* getListBox() { return m_pFocusCtrl; }
      52             :     virtual ~SvxPathControl();
      53             : 
      54             :     virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
      55             : };
      56             : 
      57             : 
      58             : 
      59             : class HeaderBar;
      60             : 
      61           0 : class XMLFilterListBox : public SvTabListBox
      62             : {
      63             : private:
      64             :     bool        mbFirstPaint;
      65             :     HeaderBar*  m_pHeaderBar;
      66             : 
      67             :     DECL_LINK( TabBoxScrollHdl_Impl, SvTabListBox* );
      68             :     DECL_LINK( HeaderEndDrag_Impl, HeaderBar* );
      69             : 
      70             :     OUString getEntryString( const filter_info_impl* pInfo ) const;
      71             : 
      72             : public:
      73             :     XMLFilterListBox(SvxPathControl* pParent);
      74             : 
      75             :     /** adds a new filter info entry to the ui filter list */
      76             :     void addFilterEntry( const filter_info_impl* pInfo );
      77             : 
      78             :     void changeEntry( const filter_info_impl* pInfo );
      79             : 
      80             :     virtual void    Paint( const Rectangle& rRect ) SAL_OVERRIDE;
      81             : };
      82             : 
      83             : 
      84             : 
      85           0 : class XMLFilterSettingsDialog : public ModelessDialog
      86             : {
      87             : public:
      88             :     XMLFilterSettingsDialog(Window* pParent,
      89             :         const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext);
      90             : 
      91             :     DECL_LINK(ClickHdl_Impl, PushButton * );
      92             :     DECL_LINK(SelectionChangedHdl_Impl, void * );
      93             :     DECL_LINK(DoubleClickHdl_Impl, void * );
      94             : 
      95             :     virtual short Execute() SAL_OVERRIDE;
      96             : 
      97             :     void    onNew();
      98             :     void    onEdit();
      99             :     void    onTest();
     100             :     void    onDelete();
     101             :     void    onSave();
     102             :     void    onOpen();
     103             :     void    onClose();
     104             : 
     105             :     void    updateStates();
     106             : 
     107             :     virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     108             : 
     109             :     bool    isClosable();
     110             : 
     111             : private:
     112             :     void    initFilterList();
     113             :     void    disposeFilterList();
     114             : 
     115             :     bool    insertOrEdit( filter_info_impl* pNewInfo, const filter_info_impl* pOldInfo = NULL );
     116             : 
     117             :     OUString createUniqueFilterName( const OUString& rUIName );
     118             :     OUString createUniqueTypeName( const OUString& rTypeName );
     119             :     OUString createUniqueInterfaceName( const OUString& rInterfaceName );
     120             : 
     121             : private:
     122             : 
     123             :     com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
     124             :     com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > mxFilterContainer;
     125             :     com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > mxTypeDetection;
     126             :     com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > mxExtendedTypeDetection;
     127             : 
     128             :     std::vector< filter_info_impl* > maFilterVector;
     129             : 
     130             :     XMLFilterListBox*   m_pFilterListBox;
     131             :     SvxPathControl* m_pCtrlFilterList;
     132             :     PushButton* m_pPBNew;
     133             :     PushButton* m_pPBEdit;
     134             :     PushButton* m_pPBTest;
     135             :     PushButton* m_pPBDelete;
     136             :     PushButton* m_pPBSave;
     137             :     PushButton* m_pPBOpen;
     138             :     CloseButton* m_pPBClose;
     139             : 
     140             :     bool m_bIsClosable;
     141             : 
     142             :     OUString m_sTemplatePath;
     143             :     OUString m_sDocTypePrefix;
     144             : 
     145             :     SvtModuleOptions maModuleOpt;
     146             : };
     147             : 
     148             : #endif
     149             : 
     150             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10