LCOV - code coverage report
Current view: top level - extensions/source/bibliography - general.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 8 0.0 %
Date: 2014-11-03 Functions: 0 4 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_EXTENSIONS_SOURCE_BIBLIOGRAPHY_GENERAL_HXX
      21             : #define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_GENERAL_HXX
      22             : 
      23             : #include <com/sun/star/awt/XFocusListener.hpp>
      24             : #include <com/sun/star/awt/XControlContainer.hpp>
      25             : #include <com/sun/star/form/XBoundComponent.hpp>
      26             : #include <com/sun/star/sdbc/XRowSetListener.hpp>
      27             : #include <svtools/stdctrl.hxx>
      28             : 
      29             : #include <vcl/layout.hxx>
      30             : #include <vcl/lstbox.hxx>
      31             : #include <vcl/group.hxx>
      32             : #include <svtools/svmedit.hxx>
      33             : #include <vcl/tabpage.hxx>
      34             : #include <vcl/combobox.hxx>
      35             : #include <vcl/scrbar.hxx>
      36             : #include <cppuhelper/implbase1.hxx>
      37             : #include "bibshortcuthandler.hxx"
      38             : 
      39             : 
      40             : class BibDataManager;
      41             : #define TYPE_COUNT 22
      42             : #define FIELD_COUNT 31
      43             : 
      44             : typedef cppu::WeakAggImplHelper1 < ::com::sun::star::awt::XFocusListener > BibGeneralPageBaseClass;
      45             : 
      46             : class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage
      47             : {
      48             :     VclGrid*            pGrid;
      49             :     VclScrolledWindow*  pScrolledWindow;
      50             : 
      51             :     FixedText*          pIdentifierFT;
      52             :     FixedText*          pAuthTypeFT;
      53             :     FixedText*          pYearFT;
      54             : 
      55             :     FixedText*          pAuthorFT;
      56             :     FixedText*          pTitleFT;
      57             : 
      58             :     FixedText*          pPublisherFT;
      59             :     FixedText*          pAddressFT;
      60             :     FixedText*          pISBNFT;
      61             : 
      62             :     FixedText*          pChapterFT;
      63             :     FixedText*          pPagesFT;
      64             : 
      65             :     FixedText*          pEditorFT;
      66             :     FixedText*          pEditionFT;
      67             : 
      68             :     FixedText*          pBooktitleFT;
      69             :     FixedText*          pVolumeFT;
      70             :     FixedText*          pHowpublishedFT;
      71             : 
      72             :     FixedText*          pOrganizationsFT;
      73             :     FixedText*          pInstitutionFT;
      74             :     FixedText*          pSchoolFT;
      75             : 
      76             :     FixedText*          pReportTypeFT;
      77             :     FixedText*          pMonthFT;
      78             : 
      79             :     FixedText*          pJournalFT;
      80             :     FixedText*          pNumberFT;
      81             :     FixedText*          pSeriesFT;
      82             : 
      83             :     FixedText*          pAnnoteFT;
      84             :     FixedText*          pNoteFT;
      85             :     FixedText*          pURLFT;
      86             : 
      87             :     FixedText*          pCustom1FT;
      88             :     FixedText*          pCustom2FT;
      89             :     FixedText*          pCustom3FT;
      90             :     FixedText*          pCustom4FT;
      91             :     FixedText*          pCustom5FT;
      92             : 
      93             :     FixedText*          aFixedTexts[ FIELD_COUNT ];
      94             :     sal_Int16           nFT2CtrlMap[ FIELD_COUNT ];
      95             : 
      96             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
      97             :                         aControls[ FIELD_COUNT ];
      98             : 
      99             :     OUString            aBibTypeArr[ TYPE_COUNT ];
     100             :     OUString            sErrorPrefix;
     101             :     OUString            sTableErrorString;
     102             : 
     103             :     OUString            sTypeColumnName;
     104             : 
     105             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
     106             :                         xCtrlContnr;
     107             : 
     108             :     ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >
     109             :                         xCurrentBoundComponent;
     110             : 
     111             :     ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >
     112             :                         xLBModel;
     113             : 
     114             :     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >
     115             :                         xPosListener;
     116             : 
     117             : 
     118             :     BibDataManager*     pDatMan;
     119             : 
     120             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >
     121             :                                 AddXControl( const OUString& rName, FixedText& rLabel, const OString& sHelpId,
     122             :                                             sal_Int16& rIndex, std::vector<vcl::Window*>& rChildren );
     123             : 
     124             :     void                        AddControlWithError( const OUString& rColumnName, FixedText& rLabel,
     125             :                                             OUString& rErrorString,
     126             :                                             const OString& sHelpId, sal_uInt16 nIndexInFTArray, std::vector<vcl::Window*>& rChildren );
     127             : 
     128             : protected:
     129             :     void                        InitFixedTexts( void );     // create mnemonics and set text an all fixed texts
     130             : 
     131             : public:
     132             :                                 BibGeneralPage(vcl::Window* pParent, BibDataManager* pDatMan);
     133             :     virtual                     ~BibGeneralPage();
     134             : 
     135             :     inline const OUString&      GetErrorString() const;
     136             : 
     137             :     inline const ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >&
     138             :                                 GetTypeListBoxModel() const;
     139             :     inline const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >&
     140             :                                 GetControlContainer() const;
     141             : 
     142             :     inline BibDataManager*      GetDataManager();
     143             : 
     144             :     void                        CommitActiveControl();
     145             : 
     146             :     virtual void SAL_CALL       disposing( const ::com::sun::star::lang::EventObject& Source ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     147             : 
     148             :     void SAL_CALL               focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     149             :     void SAL_CALL               focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     150             : 
     151             :     void                        RemoveListeners();
     152             : 
     153             :     virtual void                GetFocus() SAL_OVERRIDE;
     154             : 
     155             :     virtual bool                HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled
     156             : };
     157             : 
     158             : 
     159           0 : inline const OUString& BibGeneralPage::GetErrorString() const
     160             : {
     161           0 :     return sTableErrorString;
     162             : }
     163             : 
     164             : inline const ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >&
     165           0 :     BibGeneralPage::GetTypeListBoxModel() const
     166             : {
     167           0 :     return xLBModel;
     168             : }
     169             : 
     170             : inline const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >&
     171           0 :     BibGeneralPage::GetControlContainer() const
     172             : {
     173           0 :     return xCtrlContnr;
     174             : }
     175             : 
     176           0 : inline BibDataManager* BibGeneralPage::GetDataManager()
     177             : {
     178           0 :     return pDatMan;
     179             : }
     180             : 
     181             : #endif
     182             : 
     183             : 
     184             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10