LCOV - code coverage report
Current view: top level - sw/source/core/uibase/inc - swuiidxmrk.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 8 0.0 %
Date: 2014-04-11 Functions: 0 11 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_SW_SOURCE_UI_INC_SWUIIDXMRK_HXX
      20             : #define INCLUDED_SW_SOURCE_UI_INC_SWUIIDXMRK_HXX
      21             : 
      22             : #include <com/sun/star/container/XNameAccess.hpp>
      23             : #include <sfx2/basedlgs.hxx>
      24             : 
      25             : #include <svx/stddlg.hxx>
      26             : 
      27             : #include <vcl/button.hxx>
      28             : #include <vcl/combobox.hxx>
      29             : #include <vcl/field.hxx>
      30             : #include <vcl/fixed.hxx>
      31             : #include <vcl/group.hxx>
      32             : #include <vcl/layout.hxx>
      33             : #include <vcl/lstbox.hxx>
      34             : 
      35             : #include <sfx2/childwin.hxx>
      36             : #include "toxe.hxx"
      37             : #include <svtools/stdctrl.hxx>
      38             : #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
      39             : 
      40             : class SwWrtShell;
      41             : class SwTOXMgr;
      42             : class SwTOXMark;
      43             : /*--------------------------------------------------------------------
      44             :      Description:   insert mark for index entry
      45             :  --------------------------------------------------------------------*/
      46             : class SwIndexMarkFloatDlg;
      47             : class SwIndexMarkModalDlg;
      48             : 
      49             : class SwIndexMarkPane
      50             : {
      51             :     Dialog& m_rDialog;
      52             : 
      53             :     friend class SwIndexMarkFloatDlg;
      54             :     friend class SwIndexMarkModalDlg;
      55             :     VclFrame*       m_pFrame;
      56             :     FixedText*      m_pTypeFT;
      57             :     ListBox*        m_pTypeDCB;
      58             :     PushButton*     m_pNewBT;
      59             : 
      60             :     Edit*           m_pEntryED;
      61             :     FixedText*      m_pPhoneticFT0;
      62             :     Edit*           m_pPhoneticED0;
      63             : 
      64             :     FixedText*      m_pKey1FT;
      65             :     ComboBox*       m_pKey1DCB;
      66             :     FixedText*      m_pPhoneticFT1;
      67             :     Edit*           m_pPhoneticED1;
      68             : 
      69             :     FixedText*      m_pKey2FT;
      70             :     ComboBox*       m_pKey2DCB;
      71             :     FixedText*      m_pPhoneticFT2;
      72             :     Edit*           m_pPhoneticED2;
      73             : 
      74             :     FixedText*      m_pLevelFT;
      75             :     NumericField*   m_pLevelNF;
      76             :     CheckBox*       m_pMainEntryCB;
      77             :     CheckBox*       m_pApplyToAllCB;
      78             :     CheckBox*       m_pSearchCaseSensitiveCB;
      79             :     CheckBox*       m_pSearchCaseWordOnlyCB;
      80             : 
      81             :     PushButton*     m_pOKBT;
      82             :     CloseButton*    m_pCloseBT;
      83             :     PushButton*     m_pDelBT;
      84             : 
      85             :     PushButton*     m_pPrevSameBT;
      86             :     PushButton*     m_pNextSameBT;
      87             :     PushButton*     m_pPrevBT;
      88             :     PushButton*     m_pNextBT;
      89             : 
      90             :     OUString        aOrgStr;
      91             :     sal_Bool            bDel;
      92             :     sal_Bool            bNewMark;
      93             :     sal_Bool            bSelected;
      94             : 
      95             :     sal_Bool            bPhoneticED0_ChangedByUser;
      96             :     sal_Bool            bPhoneticED1_ChangedByUser;
      97             :     sal_Bool            bPhoneticED2_ChangedByUser;
      98             :     LanguageType    nLangForPhoneticReading; //Language of current text used for phonetic reading proposal
      99             :     sal_Bool            bIsPhoneticReadingEnabled; //this value states whether phonetic reading is enabled in principle dependent of global cjk settings and language of current entry
     100             :     com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier >
     101             :                     xExtendedIndexEntrySupplier;
     102             : 
     103             :     SwTOXMgr*       pTOXMgr;
     104             :     SwWrtShell*     pSh;
     105             : 
     106             :     void            Apply();
     107             :     void            InitControls();
     108             :     void            InsertMark();
     109             :     void            UpdateMark();
     110             : 
     111             :     DECL_LINK( InsertHdl, Button * );
     112             :     DECL_LINK(CloseHdl, void *);
     113             :     DECL_LINK(DelHdl, void *);
     114             :     DECL_LINK(NextHdl, void *);
     115             :     DECL_LINK(NextSameHdl, void *);
     116             :     DECL_LINK(PrevHdl, void *);
     117             :     DECL_LINK(PrevSameHdl, void *);
     118             :     DECL_LINK( ModifyHdl, ListBox* pBox = 0 );
     119             :     DECL_LINK( KeyDCBModifyHdl, ComboBox * );
     120             :     DECL_LINK(NewUserIdxHdl, void *);
     121             :     DECL_LINK( SearchTypeHdl, CheckBox*);
     122             :     DECL_LINK( PhoneticEDModifyHdl, Edit * );
     123             : 
     124             :     //this method updates the values from 'nLangForPhoneticReading' and 'bIsPhoneticReadingEnabled'
     125             :     //it needs to be called ones if this dialog is opened to create a new entry (in InitControls),
     126             :     //or otherwise it has to be called for each changed TOXMark (in UpdateDialog)
     127             :     void            UpdateLanguageDependenciesForPhoneticReading();
     128             :     OUString        GetDefaultPhoneticReading( const OUString& rText );
     129             : 
     130             :     void            UpdateKeyBoxes();
     131             : 
     132             :     void            UpdateDialog();
     133             :     void            InsertUpdate();
     134             : 
     135             :     void            Activate();
     136             : 
     137             : public:
     138             : 
     139             :     SwIndexMarkPane(Dialog &rDialog,
     140             :                     sal_Bool bNewDlg,
     141             :                     SwWrtShell& rWrtShell);
     142             : 
     143           0 :     Dialog &GetDialog() { return m_rDialog; }
     144             : 
     145             :     ~SwIndexMarkPane();
     146             : 
     147             :     void    ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0);
     148           0 :     sal_Bool    IsTOXType(const OUString& rName)
     149           0 :                 {return LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos(rName);}
     150             : };
     151             : 
     152           0 : class SwIndexMarkFloatDlg : public SfxModelessDialog
     153             : {
     154             :     SwIndexMarkPane m_aContent;
     155             :     virtual void    Activate() SAL_OVERRIDE;
     156             :     public:
     157             :         SwIndexMarkFloatDlg(    SfxBindings* pBindings,
     158             :                                    SfxChildWindow* pChild,
     159             :                                    Window *pParent,
     160             :                                 SfxChildWinInfo* pInfo,
     161             :                                    sal_Bool bNew=sal_True);
     162             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     163             : };
     164             : 
     165           0 : class SwIndexMarkModalDlg : public SvxStandardDialog
     166             : {
     167             :     SwIndexMarkPane m_aContent;
     168             : public:
     169             :     SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark);
     170             : 
     171             :     virtual void        Apply() SAL_OVERRIDE;
     172             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     173             : };
     174             : 
     175             : class SwAuthMarkModalDlg;
     176             : 
     177           0 : class SwAuthorMarkPane
     178             : {
     179             :     Dialog& m_rDialog;
     180             : 
     181             :     static sal_Bool     bIsFromComponent;
     182             : 
     183             :     friend class SwAuthMarkModalDlg;
     184             :     friend class SwAuthMarkFloatDlg;
     185             : 
     186             :     RadioButton*    m_pFromComponentRB;
     187             :     RadioButton*    m_pFromDocContentRB;
     188             :     FixedText*      m_pAuthorFI;
     189             :     FixedText*      m_pTitleFI;
     190             :     Edit*           m_pEntryED;
     191             :     ListBox*        m_pEntryLB;
     192             : 
     193             :     PushButton*     m_pActionBT;
     194             :     CloseButton*    m_pCloseBT;
     195             :     PushButton*     m_pCreateEntryPB;
     196             :     PushButton*     m_pEditEntryPB;
     197             : 
     198             :     sal_Bool        bNewEntry;
     199             :     sal_Bool        bBibAccessInitialized;
     200             : 
     201             :     SwWrtShell*     pSh;
     202             : 
     203             :     OUString        m_sColumnTitles[AUTH_FIELD_END];
     204             :     OUString        m_sFields[AUTH_FIELD_END];
     205             : 
     206             :     OUString        m_sCreatedEntry[AUTH_FIELD_END];
     207             : 
     208             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >    xBibAccess;
     209             : 
     210             :     DECL_LINK(InsertHdl, void *);
     211             :     DECL_LINK(CloseHdl, void *);
     212             :     DECL_LINK(CreateEntryHdl, PushButton*);
     213             :     DECL_LINK(CompEntryHdl, ListBox*);
     214             :     DECL_LINK(ChangeSourceHdl, RadioButton*);
     215             :     DECL_LINK(IsEntryAllowedHdl, Edit*);
     216             :     DECL_LINK(EditModifyHdl, Edit*);
     217             : 
     218             :     void InitControls();
     219             :     void Activate();
     220             : public:
     221             : 
     222             :     SwAuthorMarkPane( Dialog &rDialog,
     223             :                        sal_Bool bNew=sal_True);
     224             : 
     225             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     226             : };
     227             : 
     228           0 : class SwAuthMarkFloatDlg : public SfxModelessDialog
     229             : {
     230             :     SwAuthorMarkPane m_aContent;
     231             :     virtual void    Activate() SAL_OVERRIDE;
     232             :     public:
     233             :         SwAuthMarkFloatDlg(     SfxBindings* pBindings,
     234             :                                    SfxChildWindow* pChild,
     235             :                                    Window *pParent,
     236             :                                 SfxChildWinInfo* pInfo,
     237             :                                    sal_Bool bNew=sal_True);
     238             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     239             : };
     240             : 
     241           0 : class SwAuthMarkModalDlg : public SvxStandardDialog
     242             : {
     243             :     SwAuthorMarkPane m_aContent;
     244             : public:
     245             :     SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh);
     246             : 
     247             :     virtual void        Apply() SAL_OVERRIDE;
     248             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     249             : };
     250             : 
     251             : #endif // INCLUDED_SW_SOURCE_UI_INC_SWUIIDXMRK_HXX
     252             : 
     253             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10