LCOV - code coverage report
Current view: top level - basctl/source/inc - managelang.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 4 0.0 %
Date: 2014-04-11 Functions: 0 4 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             : 
      20             : #ifndef BASCTL_MANAGELANG_HXX
      21             : #define BASCTL_MANAGELANG_HXX
      22             : 
      23             : #include <svx/checklbx.hxx>
      24             : #include <vcl/button.hxx>
      25             : #include <vcl/dialog.hxx>
      26             : #include <vcl/fixed.hxx>
      27             : 
      28             : class SvxLanguageBox;
      29             : 
      30             : namespace basctl
      31             : {
      32             : 
      33             : class LocalizationMgr;
      34             : 
      35           0 : struct LanguageEntry
      36             : {
      37             :     OUString                        m_sLanguage;
      38             :     ::com::sun::star::lang::Locale  m_aLocale;
      39             :     bool                            m_bIsDefault;
      40             : 
      41           0 :     LanguageEntry( const OUString& _rLanguage,
      42             :                    const ::com::sun::star::lang::Locale& _rLocale,
      43             :                    bool _bIsDefault ) :
      44             :         m_sLanguage( _rLanguage ),
      45             :         m_aLocale( _rLocale ),
      46           0 :         m_bIsDefault( _bIsDefault ) {}
      47             : };
      48             : 
      49             : extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
      50             :                              const ::com::sun::star::lang::Locale& rLocaleRight );
      51             : 
      52             : class ManageLanguageDialog : public ModalDialog
      53             : {
      54             : private:
      55             :     ListBox*            m_pLanguageLB;
      56             :     PushButton*         m_pAddPB;
      57             :     PushButton*         m_pDeletePB;
      58             :     PushButton*         m_pMakeDefPB;
      59             : 
      60             :     boost::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
      61             : 
      62             :     OUString            m_sDefLangStr;
      63             :     OUString            m_sDeleteStr;
      64             :     OUString            m_sCreateLangStr;
      65             : 
      66             :     void                Init();
      67             :     void                FillLanguageBox();
      68             :     void                ClearLanguageBox();
      69             : 
      70             :     DECL_LINK(AddHdl, void *);
      71             :     DECL_LINK(DeleteHdl, void *);
      72             :     DECL_LINK(MakeDefHdl, void *);
      73             :     DECL_LINK(SelectHdl, void *);
      74             : 
      75             : public:
      76             :     ManageLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> _pLMgr );
      77             :     virtual ~ManageLanguageDialog();
      78             : };
      79             : 
      80           0 : class SetDefaultLanguageDialog : public ModalDialog
      81             : {
      82             : private:
      83             :     FixedText*          m_pLanguageFT;
      84             :     SvxLanguageBox*     m_pLanguageLB;
      85             :     FixedText*          m_pCheckLangFT;
      86             :     SvxCheckListBox*    m_pCheckLangLB;
      87             :     FixedText*          m_pDefinedFT;
      88             :     FixedText*          m_pAddedFT;
      89             : 
      90             :     boost::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
      91             : 
      92             :     void                FillLanguageBox();
      93             : 
      94             : public:
      95             :     SetDefaultLanguageDialog(Window* pParent, boost::shared_ptr<LocalizationMgr> xLMgr);
      96             : 
      97             :     ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale >   GetLocales() const;
      98             : };
      99             : 
     100             : } // namespace basctl
     101             : 
     102             : #endif // BASCTL_MANAGELANG_HXX
     103             : 
     104             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10