LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/inc - swuiidxmrk.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 8 0.0 %
Date: 2012-12-27 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 _SWUI_IDXMRK_HXX
      20             : #define _SWUI_IDXMRK_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             : 
      82             :     PushButton*     m_pOKBT;
      83             :     PushButton*     m_pCloseBT;
      84             :     PushButton*     m_pDelBT;
      85             : 
      86             :     PushButton*     m_pPrevSameBT;
      87             :     PushButton*     m_pNextSameBT;
      88             :     PushButton*     m_pPrevBT;
      89             :     PushButton*     m_pNextBT;
      90             : 
      91             :     String          aOrgStr;
      92             :     sal_Bool            bDel;
      93             :     sal_Bool            bNewMark;
      94             :     sal_Bool            bSelected;
      95             : 
      96             :     sal_Bool            bPhoneticED0_ChangedByUser;
      97             :     sal_Bool            bPhoneticED1_ChangedByUser;
      98             :     sal_Bool            bPhoneticED2_ChangedByUser;
      99             :     LanguageType    nLangForPhoneticReading; //Language of current text used for phonetic reading proposal
     100             :     sal_Bool            bIsPhoneticReadingEnabled; //this value states whether phonetic reading is enabled in principle dependent of global cjk settings and language of current entry
     101             :     com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier >
     102             :                     xExtendedIndexEntrySupplier;
     103             : 
     104             :     SwTOXMgr*       pTOXMgr;
     105             :     SwWrtShell*     pSh;
     106             : 
     107             :     void            Apply();
     108             :     void            InitControls();
     109             :     void            InsertMark();
     110             :     void            UpdateMark();
     111             : 
     112             :     DECL_LINK( InsertHdl, Button * );
     113             :     DECL_LINK(CloseHdl, void *);
     114             :     DECL_LINK(DelHdl, void *);
     115             :     DECL_LINK(NextHdl, void *);
     116             :     DECL_LINK(NextSameHdl, void *);
     117             :     DECL_LINK(PrevHdl, void *);
     118             :     DECL_LINK(PrevSameHdl, void *);
     119             :     DECL_LINK( ModifyHdl, ListBox* pBox = 0 );
     120             :     DECL_LINK( KeyDCBModifyHdl, ComboBox * );
     121             :     DECL_LINK(NewUserIdxHdl, void *);
     122             :     DECL_LINK( SearchTypeHdl, CheckBox*);
     123             :     DECL_LINK( PhoneticEDModifyHdl, Edit * );
     124             : 
     125             :     //this method updates the values from 'nLangForPhoneticReading' and 'bIsPhoneticReadingEnabled'
     126             :     //it needs to be called ones if this dialog is opened to create a new entry (in InitControls),
     127             :     //or otherwise it has to be called for each changed TOXMark (in UpdateDialog)
     128             :     void            UpdateLanguageDependenciesForPhoneticReading();
     129             :     String          GetDefaultPhoneticReading( const String& rText );
     130             : 
     131             :     void            UpdateKeyBoxes();
     132             : 
     133             :     void            UpdateDialog();
     134             :     void            InsertUpdate();
     135             : 
     136             :     void            Activate();
     137             : 
     138             : public:
     139             : 
     140             :     SwIndexMarkPane(Dialog &rDialog,
     141             :                     sal_Bool bNewDlg,
     142             :                     SwWrtShell& rWrtShell);
     143             : 
     144           0 :     Dialog &GetDialog() { return m_rDialog; }
     145             : 
     146             : 
     147             :     ~SwIndexMarkPane();
     148             : 
     149             :     void    ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0);
     150           0 :     sal_Bool    IsTOXType(const String& rName)
     151           0 :                 {return LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos(rName);}
     152             : };
     153             : 
     154           0 : class SwIndexMarkFloatDlg : public SfxModelessDialog
     155             : {
     156             :     SwIndexMarkPane m_aContent;
     157             :     virtual void    Activate();
     158             :     public:
     159             :         SwIndexMarkFloatDlg(    SfxBindings* pBindings,
     160             :                                    SfxChildWindow* pChild,
     161             :                                    Window *pParent,
     162             :                                 SfxChildWinInfo* pInfo,
     163             :                                    sal_Bool bNew=sal_True);
     164             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     165             : };
     166             : 
     167           0 : class SwIndexMarkModalDlg : public SvxStandardDialog
     168             : {
     169             :     SwIndexMarkPane m_aContent;
     170             : public:
     171             :     SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark);
     172             : 
     173             :     virtual void        Apply();
     174             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     175             : };
     176             : 
     177             : class SwAuthMarkModalDlg;
     178             : 
     179           0 : class SwAuthorMarkPane
     180             : {
     181             :     Dialog& m_rDialog;
     182             : 
     183             :     static sal_Bool     bIsFromComponent;
     184             : 
     185             :     friend class SwAuthMarkModalDlg;
     186             :     friend class SwAuthMarkFloatDlg;
     187             : 
     188             :     RadioButton*    m_pFromComponentRB;
     189             :     RadioButton*    m_pFromDocContentRB;
     190             :     FixedText*      m_pAuthorFI;
     191             :     FixedText*      m_pTitleFI;
     192             :     Edit*           m_pEntryED;
     193             :     ListBox*        m_pEntryLB;
     194             : 
     195             :     PushButton*     m_pActionBT;
     196             :     PushButton*     m_pCloseBT;
     197             :     PushButton*     m_pCreateEntryPB;
     198             :     PushButton*     m_pEditEntryPB;
     199             : 
     200             :     sal_Bool        bNewEntry;
     201             :     sal_Bool        bBibAccessInitialized;
     202             : 
     203             :     SwWrtShell*     pSh;
     204             : 
     205             :     String          m_sColumnTitles[AUTH_FIELD_END];
     206             :     String          m_sFields[AUTH_FIELD_END];
     207             : 
     208             :     String          m_sCreatedEntry[AUTH_FIELD_END];
     209             : 
     210             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >    xBibAccess;
     211             : 
     212             :     DECL_LINK(InsertHdl, void *);
     213             :     DECL_LINK(CloseHdl, void *);
     214             :     DECL_LINK(CreateEntryHdl, PushButton*);
     215             :     DECL_LINK(CompEntryHdl, ListBox*);
     216             :     DECL_LINK(ChangeSourceHdl, RadioButton*);
     217             :     DECL_LINK(IsEntryAllowedHdl, Edit*);
     218             :     DECL_LINK(EditModifyHdl, Edit*);
     219             : 
     220             :     void InitControls();
     221             :     void Activate();
     222             : public:
     223             : 
     224             :     SwAuthorMarkPane( Dialog &rDialog,
     225             :                        sal_Bool bNew=sal_True);
     226             : 
     227             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     228             : };
     229             : 
     230           0 : class SwAuthMarkFloatDlg : public SfxModelessDialog
     231             : {
     232             :     SwAuthorMarkPane m_aContent;
     233             :     virtual void    Activate();
     234             :     public:
     235             :         SwAuthMarkFloatDlg(     SfxBindings* pBindings,
     236             :                                    SfxChildWindow* pChild,
     237             :                                    Window *pParent,
     238             :                                 SfxChildWinInfo* pInfo,
     239             :                                    sal_Bool bNew=sal_True);
     240             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     241             : };
     242             : 
     243           0 : class SwAuthMarkModalDlg : public SvxStandardDialog
     244             : {
     245             :     SwAuthorMarkPane m_aContent;
     246             : public:
     247             :     SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh);
     248             : 
     249             :     virtual void        Apply();
     250             :     void    ReInitDlg(SwWrtShell& rWrtShell);
     251             : };
     252             : 
     253             : #endif // _SWUI_IDXMRK_HXX
     254             : 
     255             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10