LCOV - code coverage report
Current view: top level - sw/source/ui/inc - glossary.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 8 0.0 %
Date: 2012-08-25 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _GLOSSARY_HXX
      29                 :            : #define _GLOSSARY_HXX
      30                 :            : 
      31                 :            : #include <vcl/edit.hxx>
      32                 :            : #include <svtools/svtreebx.hxx>
      33                 :            : #include <svx/stddlg.hxx>
      34                 :            : 
      35                 :            : #include <vcl/button.hxx>
      36                 :            : #include <vcl/fixed.hxx>
      37                 :            : 
      38                 :            : #include <vcl/combobox.hxx>
      39                 :            : 
      40                 :            : #include <vcl/menubtn.hxx>
      41                 :            : #include <com/sun/star/container/XEnumerationAccess.hpp>
      42                 :            : #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
      43                 :            : #include <com/sun/star/container/XNameAccess.hpp>
      44                 :            : #include <com/sun/star/container/XContentEnumerationAccess.hpp>
      45                 :            : #include <com/sun/star/container/XEnumeration.hpp>
      46                 :            : #include <com/sun/star/container/XElementAccess.hpp>
      47                 :            : #include <com/sun/star/container/XIndexAccess.hpp>
      48                 :            : 
      49                 :            : #include <actctrl.hxx>
      50                 :            : 
      51                 :            : class SwGlossaryHdl;
      52                 :            : class SwNewGlosNameDlg;
      53                 :            : class SwWrtShell;
      54                 :            : class SfxViewFrame;
      55                 :            : class PopupMenu;
      56                 :            : class Menu;
      57                 :            : 
      58                 :            : const short RET_EDIT = 100;
      59                 :            : 
      60                 :            : //------------------------------------------------------------------
      61                 :            : 
      62                 :          0 : class SwGlTreeListBox : public SvTreeListBox
      63                 :            : {
      64                 :            :     const String    sReadonly;
      65                 :            : 
      66                 :            :     SvLBoxEntry*  pDragEntry;
      67                 :            : 
      68                 :            :     virtual DragDropMode NotifyStartDrag( TransferDataContainer& rContainer,
      69                 :            :                                             SvLBoxEntry* );
      70                 :            :     virtual sal_Bool    NotifyAcceptDrop( SvLBoxEntry* );
      71                 :            : 
      72                 :            :     virtual sal_Bool    NotifyMoving(   SvLBoxEntry*  pTarget,
      73                 :            :                                     SvLBoxEntry*  pEntry,
      74                 :            :                                     SvLBoxEntry*& rpNewParent,
      75                 :            :                                     sal_uLong&        rNewChildPos
      76                 :            :                                 );
      77                 :            :     virtual sal_Bool    NotifyCopying(  SvLBoxEntry*  pTarget,
      78                 :            :                                     SvLBoxEntry*  pEntry,
      79                 :            :                                     SvLBoxEntry*& rpNewParent,
      80                 :            :                                     sal_uLong&        rNewChildPos);
      81                 :            : public:
      82                 :            :     SwGlTreeListBox(Window* pParent, const ResId& rResId);
      83                 :            : 
      84                 :            :     virtual void    RequestHelp( const HelpEvent& rHEvt );
      85                 :            :     void            Clear();
      86                 :            : };
      87                 :            : 
      88                 :            : //------------------------------------------------------------------
      89                 :            : class SwOneExampleFrame;
      90                 :            : class SwGlossaryDlg : public SvxStandardDialog
      91                 :            : {
      92                 :            :     friend class SwNewGlosNameDlg;
      93                 :            :     friend class SwGlTreeListBox;
      94                 :            : 
      95                 :            :     CheckBox        aInsertTipCB;
      96                 :            :     FixedText       aNameLbl;
      97                 :            :     Edit            aNameED;
      98                 :            :     FixedText       aShortNameLbl;
      99                 :            :     NoSpaceEdit     aShortNameEdit;
     100                 :            :     SwGlTreeListBox aCategoryBox;
     101                 :            :     FixedLine       aRelativeFL;
     102                 :            :     CheckBox        aFileRelCB;
     103                 :            :     CheckBox        aNetRelCB;
     104                 :            :     Window          aExampleWIN;
     105                 :            :     Window          aExampleDummyWIN;
     106                 :            :     CheckBox        aShowExampleCB;
     107                 :            :     OKButton        aInsertBtn;
     108                 :            :     CancelButton    aCloseBtn;
     109                 :            :     HelpButton      aHelpBtn;
     110                 :            :     MenuButton      aEditBtn;
     111                 :            :     PushButton      aBibBtn;
     112                 :            :     PushButton      aPathBtn;
     113                 :            : 
     114                 :            :     String          sReadonlyPath;
     115                 :            : 
     116                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >        _xAutoText;
     117                 :            :     SwOneExampleFrame*  pExampleFrame;
     118                 :            : 
     119                 :            :     PopupMenu*      pMenu;
     120                 :            :     SwGlossaryHdl*  pGlossaryHdl;
     121                 :            : 
     122                 :            :     String          sResumeGroup;
     123                 :            :     String          sResumeShortName;
     124                 :            :     sal_Bool            bResume;
     125                 :            : 
     126                 :            : 
     127                 :            :     const sal_Bool      bSelection : 1;
     128                 :            :     sal_Bool            bReadOnly : 1;
     129                 :            :     sal_Bool            bIsOld : 1;
     130                 :            :     sal_Bool            bIsDocReadOnly:1;
     131                 :            : 
     132                 :            :     SwWrtShell*     pSh;
     133                 :            : 
     134                 :            :     void EnableShortName(sal_Bool bOn = sal_True);
     135                 :            : 
     136                 :            :     DECL_LINK( NameModify, Edit * );
     137                 :            :     DECL_LINK( NameDoubleClick, SvTreeListBox * );
     138                 :            :     DECL_LINK( GrpSelect, SvTreeListBox * );
     139                 :            :     DECL_LINK( MenuHdl, Menu * );
     140                 :            :     DECL_LINK( EnableHdl, Menu * );
     141                 :            :     DECL_LINK(BibHdl, void *);
     142                 :            :     DECL_LINK(EditHdl, void *);
     143                 :            :     DECL_LINK( PathHdl, Button * );
     144                 :            :     DECL_LINK( CheckBoxHdl, CheckBox * );
     145                 :            :     DECL_LINK( ShowPreviewHdl, CheckBox * );
     146                 :            :     DECL_LINK( PreviewLoadedHdl, void * );
     147                 :            : 
     148                 :            : 
     149                 :            :     virtual void    Apply();
     150                 :            :     void            Init();
     151                 :            :     SvLBoxEntry*    DoesBlockExist(const String& sBlock, const String& rShort);
     152                 :            :     void            ShowAutoText(const String& rGroup, const String& rShortName);
     153                 :            :     void            ResumeShowAutoText();
     154                 :            : 
     155                 :          0 :     sal_Bool            GetResumeData(String& rGroup, String& rShortName)
     156                 :          0 :                         {rGroup = sResumeGroup; rShortName = sResumeShortName; return bResume;}
     157                 :          0 :     void            SetResumeData(const String& rGroup, const String& rShortName)
     158                 :          0 :                         {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = sal_True;}
     159                 :          0 :     void            ResetResumeData() {bResume = sal_False;}
     160                 :            : public:
     161                 :            :     SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell);
     162                 :            :     ~SwGlossaryDlg();
     163                 :            :     String          GetCurrGrpName() const;
     164                 :            :     inline String   GetCurrLongName() const;
     165                 :            :     inline String   GetCurrShortName() const;
     166                 :            :     static String   GetCurrGroup();
     167                 :            :     static void     SetActGroup(const String& rNewGroup);
     168                 :            :     static String   GetExtension();
     169                 :            : };
     170                 :            : 
     171                 :            : inline String SwGlossaryDlg::GetCurrLongName() const
     172                 :            : {
     173                 :            :     return aNameED.GetText();
     174                 :            : }
     175                 :          0 : inline String SwGlossaryDlg::GetCurrShortName() const
     176                 :            : {
     177                 :          0 :     return aShortNameEdit.GetText();
     178                 :            : }
     179                 :            : 
     180                 :            : 
     181                 :            : #endif
     182                 :            : 
     183                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10