LCOV - code coverage report
Current view: top level - cui/source/options - optjava.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-08-25 Functions: 0 4 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 _SVX_OPTJAVA_HXX
      29                 :            : #define _SVX_OPTJAVA_HXX
      30                 :            : 
      31                 :            : #include <vector>
      32                 :            : #include <ucbhelper/content.hxx>
      33                 :            : #include <vcl/button.hxx>
      34                 :            : #include <vcl/fixed.hxx>
      35                 :            : #include <vcl/timer.hxx>
      36                 :            : #include <sfx2/tabdlg.hxx>
      37                 :            : #include <svx/simptabl.hxx>
      38                 :            : #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
      39                 :            : #include <svtools/dialogclosedlistener.hxx>
      40                 :            : #include "radiobtnbox.hxx"
      41                 :            : 
      42                 :            : // forward ---------------------------------------------------------------
      43                 :            : 
      44                 :            : typedef struct _JavaInfo JavaInfo;
      45                 :            : 
      46                 :            : class   SvxJavaParameterDlg;
      47                 :            : class   SvxJavaClassPathDlg;
      48                 :            : 
      49                 :            : // class SvxJavaOptionsPage ----------------------------------------------
      50                 :            : 
      51                 :            : class SvxJavaOptionsPage : public SfxTabPage
      52                 :            : {
      53                 :            : private:
      54                 :            :     FixedLine                   m_aJavaLine;
      55                 :            :     CheckBox                    m_aJavaEnableCB;
      56                 :            :     FixedText                   m_aJavaFoundLabel;
      57                 :            :     SvxSimpleTableContainer     m_aJavaListContainer;
      58                 :            :     svx::SvxRadioButtonListBox  m_aJavaList;
      59                 :            :     FixedText                   m_aJavaPathText;
      60                 :            :     PushButton                  m_aAddBtn;
      61                 :            :     PushButton                  m_aParameterBtn;
      62                 :            :     PushButton                  m_aClassPathBtn;
      63                 :            : 
      64                 :            :     SvxJavaParameterDlg*    m_pParamDlg;
      65                 :            :     SvxJavaClassPathDlg*    m_pPathDlg;
      66                 :            : 
      67                 :            :     JavaInfo**              m_parJavaInfo;
      68                 :            :     rtl_uString**           m_parParameters;
      69                 :            :     rtl_uString*            m_pClassPath;
      70                 :            :     sal_Int32               m_nInfoSize;
      71                 :            :     sal_Int32               m_nParamSize;
      72                 :            :     String                  m_sInstallText;
      73                 :            :     String                  m_sAccessibilityText;
      74                 :            :     String                  m_sAddDialogText;
      75                 :            :     Timer                   m_aResetTimer;
      76                 :            : 
      77                 :            :     ::std::vector< JavaInfo* >
      78                 :            :                             m_aAddedInfos;
      79                 :            : 
      80                 :            :     ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
      81                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker > xFolderPicker;
      82                 :            : 
      83                 :            :     DECL_LINK(EnableHdl_Impl, void *);
      84                 :            :     DECL_LINK(              CheckHdl_Impl, SvxSimpleTable * );
      85                 :            :     DECL_LINK(SelectHdl_Impl, void *);
      86                 :            :     DECL_LINK(AddHdl_Impl, void *);
      87                 :            :     DECL_LINK(ParameterHdl_Impl, void *);
      88                 :            :     DECL_LINK(ClassPathHdl_Impl, void *);
      89                 :            :     DECL_LINK(ResetHdl_Impl, void *);
      90                 :            : 
      91                 :            :     DECL_LINK(              StartFolderPickerHdl, void * );
      92                 :            :     DECL_LINK(              DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* );
      93                 :            : 
      94                 :            :     void                    ClearJavaInfo();
      95                 :            :     void                    ClearJavaList();
      96                 :            :     void                    LoadJREs();
      97                 :            :     void                    AddJRE( JavaInfo* _pInfo );
      98                 :            :     void                    HandleCheckEntry( SvLBoxEntry* _pEntry );
      99                 :            :     void                    AddFolder( const ::rtl::OUString& _rFolder );
     100                 :            : 
     101                 :            : public:
     102                 :            :     SvxJavaOptionsPage( Window* pParent, const SfxItemSet& rSet );
     103                 :            :     ~SvxJavaOptionsPage();
     104                 :            : 
     105                 :            :     static SfxTabPage*      Create( Window* pParent, const SfxItemSet& rSet );
     106                 :            : 
     107                 :            :     virtual sal_Bool            FillItemSet( SfxItemSet& rSet );
     108                 :            :     virtual void            Reset( const SfxItemSet& rSet );
     109                 :            :     virtual void            FillUserData();
     110                 :            : };
     111                 :            : 
     112                 :            : // class SvxJavaParameterDlg ---------------------------------------------
     113                 :            : 
     114                 :            : class SvxJavaParameterDlg : public ModalDialog
     115                 :            : {
     116                 :            : private:
     117                 :            :     FixedText               m_aParameterLabel;
     118                 :            :     Edit                    m_aParameterEdit;
     119                 :            :     PushButton              m_aAssignBtn;
     120                 :            : 
     121                 :            :     FixedText               m_aAssignedLabel;
     122                 :            :     ListBox                 m_aAssignedList;
     123                 :            :     FixedText               m_aExampleText;
     124                 :            :     PushButton              m_aRemoveBtn;
     125                 :            : 
     126                 :            :     FixedLine               m_aButtonsLine;
     127                 :            :     OKButton                m_aOKBtn;
     128                 :            :     CancelButton            m_aCancelBtn;
     129                 :            :     HelpButton              m_aHelpBtn;
     130                 :            : 
     131                 :            :     DECL_LINK(ModifyHdl_Impl, void *);
     132                 :            :     DECL_LINK(AssignHdl_Impl, void *);
     133                 :            :     DECL_LINK(SelectHdl_Impl, void *);
     134                 :            :     DECL_LINK(DblClickHdl_Impl, void *);
     135                 :            :     DECL_LINK(RemoveHdl_Impl, void *);
     136                 :            : 
     137                 :          0 :     inline void             EnableRemoveButton()
     138                 :            :                                 { m_aRemoveBtn.Enable(
     139                 :          0 :                                     m_aAssignedList.GetSelectEntryPos()
     140                 :          0 :                                     != LISTBOX_ENTRY_NOTFOUND ); }
     141                 :            : 
     142                 :            : 
     143                 :            : public:
     144                 :            :     SvxJavaParameterDlg( Window* pParent );
     145                 :            :     ~SvxJavaParameterDlg();
     146                 :            : 
     147                 :            :     virtual short           Execute();
     148                 :            : 
     149                 :            :     ::com::sun::star::uno::Sequence< ::rtl::OUString > GetParameters() const;
     150                 :            :     void SetParameters( ::com::sun::star::uno::Sequence< ::rtl::OUString >& rParams );
     151                 :            : };
     152                 :            : 
     153                 :            : // class SvxJavaClassPathDlg ---------------------------------------------
     154                 :            : 
     155                 :            : class SvxJavaClassPathDlg : public ModalDialog
     156                 :            : {
     157                 :            : private:
     158                 :            :     FixedText               m_aPathLabel;
     159                 :            :     ListBox                 m_aPathList;
     160                 :            :     PushButton              m_aAddArchiveBtn;
     161                 :            :     PushButton              m_aAddPathBtn;
     162                 :            :     PushButton              m_aRemoveBtn;
     163                 :            : 
     164                 :            :     FixedLine               m_aButtonsLine;
     165                 :            :     OKButton                m_aOKBtn;
     166                 :            :     CancelButton            m_aCancelBtn;
     167                 :            :     HelpButton              m_aHelpBtn;
     168                 :            : 
     169                 :            :     String                  m_sOldPath;
     170                 :            : 
     171                 :            :     DECL_LINK(AddArchiveHdl_Impl, void *);
     172                 :            :     DECL_LINK(AddPathHdl_Impl, void *);
     173                 :            :     DECL_LINK(RemoveHdl_Impl, void *);
     174                 :            :     DECL_LINK(SelectHdl_Impl, void *);
     175                 :            : 
     176                 :            :     bool                    IsPathDuplicate( const String& _rPath );
     177                 :          0 :     inline void             EnableRemoveButton()
     178                 :            :                                 { m_aRemoveBtn.Enable(
     179                 :          0 :                                     m_aPathList.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ); }
     180                 :            : 
     181                 :            : public:
     182                 :            :     SvxJavaClassPathDlg( Window* pParent );
     183                 :            :     ~SvxJavaClassPathDlg();
     184                 :            : 
     185                 :          0 :     inline const String&    GetOldPath() const { return m_sOldPath; }
     186                 :          0 :     inline void             SetFocus() { m_aPathList.GrabFocus(); }
     187                 :            : 
     188                 :            :     String                  GetClassPath() const;
     189                 :            :     void                    SetClassPath( const String& _rPath );
     190                 :            : };
     191                 :            : 
     192                 :            : #endif // #ifndef _SVX_OPTJAVA_HXX
     193                 :            : 
     194                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10