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

Generated by: LCOV version 1.11