LCOV - code coverage report
Current view: top level - extensions/source/bibliography - general.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 8 0.0 %
Date: 2014-04-14 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 _BIB_GENERAL_HXX
      21             : #define _BIB_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/lstbox.hxx>
      30             : #include <vcl/group.hxx>
      31             : #include <svtools/svmedit.hxx>
      32             : #include <vcl/tabpage.hxx>
      33             : #include <vcl/combobox.hxx>
      34             : #include <vcl/scrbar.hxx>
      35             : #include <cppuhelper/implbase1.hxx>
      36             : #include "bibshortcuthandler.hxx"
      37             : 
      38             : 
      39             : class BibDataManager;
      40             : #define TYPE_COUNT 22
      41             : #define FIELD_COUNT 31
      42             : 
      43             : typedef cppu::WeakAggImplHelper1 < ::com::sun::star::awt::XFocusListener > BibGeneralPageBaseClass;
      44             : 
      45             : class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage
      46             : {
      47             :     Window              aControlParentWin;
      48             :     FixedText           aIdentifierFT;
      49             :     FixedText           aAuthTypeFT;
      50             :     FixedText           aYearFT;
      51             : 
      52             :     FixedText           aAuthorFT;
      53             :     FixedText           aTitleFT;
      54             : 
      55             :     FixedText           aPublisherFT;
      56             :     FixedText           aAddressFT;
      57             :     FixedText           aISBNFT;
      58             : 
      59             :     FixedText           aChapterFT;
      60             :     FixedText           aPagesFT;
      61             :     FixedLine           aFirstFL;
      62             : 
      63             :     FixedText           aEditorFT;
      64             :     FixedText           aEditionFT;
      65             : 
      66             :     FixedText           aBooktitleFT;
      67             :     FixedText           aVolumeFT;
      68             :     FixedText           aHowpublishedFT;
      69             : 
      70             :     FixedText           aOrganizationsFT;
      71             :     FixedText           aInstitutionFT;
      72             :     FixedText           aSchoolFT;
      73             : 
      74             :     FixedText           aReportTypeFT;
      75             :     FixedText           aMonthFT;
      76             :     FixedLine           aSecondFL;
      77             : 
      78             :     FixedText           aJournalFT;
      79             :     FixedText           aNumberFT;
      80             :     FixedText           aSeriesFT;
      81             : 
      82             :     FixedText           aAnnoteFT;
      83             :     FixedText           aNoteFT;
      84             :     FixedText           aURLFT;
      85             :     FixedLine           aThirdFL;
      86             : 
      87             :     FixedText           aCustom1FT;
      88             :     FixedText           aCustom2FT;
      89             :     FixedText           aCustom3FT;
      90             :     FixedText           aCustom4FT;
      91             :     FixedText           aCustom5FT;
      92             : 
      93             :     ScrollBar           aHoriScroll;
      94             :     ScrollBar           aVertScroll;
      95             : 
      96             :     FixedText*          aFixedTexts[ FIELD_COUNT ];
      97             :     sal_Int16           nFT2CtrlMap[ FIELD_COUNT ];
      98             : 
      99             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
     100             :                         aControls[ FIELD_COUNT ];
     101             : 
     102             :     Size                aStdSize;
     103             :     Point               aBasePos;
     104             : 
     105             :     OUString            aBibTypeArr[ TYPE_COUNT ];
     106             :     OUString            sErrorPrefix;
     107             :     OUString            sTableErrorString;
     108             : 
     109             :     OUString            sTypeColumnName;
     110             : 
     111             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
     112             :                         xCtrlContnr;
     113             : 
     114             :     ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >
     115             :                         xCurrentBoundComponent;
     116             : 
     117             :     ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >
     118             :                         xLBModel;
     119             : 
     120             :     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >
     121             :                         xPosListener;
     122             : 
     123             : 
     124             :     BibDataManager*     pDatMan;
     125             : 
     126             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >
     127             :                                 AddXControl( const OUString& rName, Point aPos, Size aSize, const OString& sHelpId,
     128             :                                             sal_Int16& rIndex );
     129             : 
     130             :     void                        AddControlWithError( const OUString& rColumnName, const Point& rPos,
     131             :                                             const Size& rSize, OUString& rErrorString, const OUString& aColumnUIName,
     132             :                                             const OString& sHelpId, sal_uInt16 nIndexInFTArray );
     133             : 
     134             :     void                        AdjustScrollbars();
     135             : 
     136             :     DECL_LINK( ScrollHdl, ScrollBar* );
     137             : 
     138             : protected:
     139             :     virtual void                Resize() SAL_OVERRIDE;
     140             :     void                        InitFixedTexts( void );     // create mnemonics and set text an all fixed texts
     141             : 
     142             : public:
     143             :                                 BibGeneralPage(Window* pParent, BibDataManager* pDatMan);
     144             :     virtual                     ~BibGeneralPage();
     145             : 
     146             :     inline const OUString&      GetErrorString() const;
     147             : 
     148             :     inline const ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >&
     149             :                                 GetTypeListBoxModel() const;
     150             :     inline const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >&
     151             :                                 GetControlContainer() const;
     152             : 
     153             :     inline BibDataManager*      GetDataManager();
     154             : 
     155             :     void                        CommitActiveControl();
     156             : 
     157             :     virtual void SAL_CALL       disposing( const ::com::sun::star::lang::EventObject& Source ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     158             : 
     159             :     void SAL_CALL               focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     160             :     void SAL_CALL               focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     161             : 
     162             :     void                        RemoveListeners();
     163             : 
     164             :     virtual void                GetFocus() SAL_OVERRIDE;
     165             : 
     166             :     virtual sal_Bool                HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled
     167             : };
     168             : 
     169             : 
     170           0 : inline const OUString& BibGeneralPage::GetErrorString() const
     171             : {
     172           0 :     return sTableErrorString;
     173             : }
     174             : 
     175             : inline const ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >&
     176           0 :     BibGeneralPage::GetTypeListBoxModel() const
     177             : {
     178           0 :     return xLBModel;
     179             : }
     180             : 
     181             : inline const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >&
     182           0 :     BibGeneralPage::GetControlContainer() const
     183             : {
     184           0 :     return xCtrlContnr;
     185             : }
     186             : 
     187           0 : inline BibDataManager* BibGeneralPage::GetDataManager()
     188             : {
     189           0 :     return pDatMan;
     190             : }
     191             : 
     192             : #endif
     193             : 
     194             : 
     195             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10