LCOV - code coverage report
Current view: top level - basctl/source/inc - localizationmgr.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 9 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                 :            :  * 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 _LOCALIZATIONMGR_HXX
      21                 :            : #define _LOCALIZATIONMGR_HXX
      22                 :            : 
      23                 :            : #include "scriptdocument.hxx"
      24                 :            : 
      25                 :            : #include <com/sun/star/resource/XStringResourceManager.hpp>
      26                 :            : 
      27                 :            : class BasicIDEShell;
      28                 :            : class DlgEditor;
      29                 :            : 
      30                 :          0 : class LocalizationMgr
      31                 :            : {
      32                 :            :     ::com::sun::star::uno::Reference
      33                 :            :         < ::com::sun::star::resource::XStringResourceManager >  m_xStringResourceManager;
      34                 :            : 
      35                 :            :     BasicIDEShell*                                              m_pIDEShell;
      36                 :            : 
      37                 :            :     ScriptDocument                                              m_aDocument;
      38                 :            :     ::rtl::OUString                                             m_aLibName;
      39                 :            : 
      40                 :            :     ::com::sun::star::lang::Locale                              m_aLocaleBeforeBasicStart;
      41                 :            : 
      42                 :            :     enum HandleResourceMode
      43                 :            :     {
      44                 :            :         SET_IDS,
      45                 :            :         RESET_IDS,
      46                 :            :         RENAME_DIALOG_IDS,
      47                 :            :         RENAME_CONTROL_IDS,
      48                 :            :         REMOVE_IDS_FROM_RESOURCE,
      49                 :            :         MOVE_RESOURCES,
      50                 :            :         COPY_RESOURCES
      51                 :            :     };
      52                 :            :     static sal_Int32 implHandleControlResourceProperties( ::com::sun::star::uno::Any aControlAny,
      53                 :            :             const ::rtl::OUString& aDialogName, const ::rtl::OUString& aCtrlName,
      54                 :            :             ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >
      55                 :            :             xStringResourceManager, ::com::sun::star::uno::Reference< ::com::sun::star::resource::
      56                 :            :             XStringResourceResolver > xSourceStringResolver, HandleResourceMode eMode );
      57                 :            : 
      58                 :          0 :     void enableResourceForAllLibraryDialogs( void )
      59                 :            :     {
      60                 :          0 :         implEnableDisableResourceForAllLibraryDialogs( SET_IDS );
      61                 :          0 :     }
      62                 :          0 :     void disableResourceForAllLibraryDialogs( void )
      63                 :            :     {
      64                 :          0 :         implEnableDisableResourceForAllLibraryDialogs( RESET_IDS );
      65                 :          0 :     }
      66                 :            :     void implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode eMode );
      67                 :            : 
      68                 :            : public:
      69                 :            :     LocalizationMgr( BasicIDEShell* pIDEShell, const ScriptDocument& rDocument, ::rtl::OUString aLibName,
      70                 :            :         const ::com::sun::star::uno::Reference
      71                 :            :             < ::com::sun::star::resource::XStringResourceManager >& xStringResourceManager );
      72                 :            :     ::com::sun::star::uno::Reference
      73                 :          0 :         < ::com::sun::star::resource::XStringResourceManager >getStringResourceManager( void )
      74                 :            :     {
      75                 :          0 :         return m_xStringResourceManager;
      76                 :            :     }
      77                 :            : 
      78                 :            :     bool isLibraryLocalized( void );
      79                 :            : 
      80                 :            :     void handleTranslationbar( void );
      81                 :            : 
      82                 :            :     void handleAddLocales( ::com::sun::star::uno::Sequence
      83                 :            :         < ::com::sun::star::lang::Locale > aLocaleSeq );
      84                 :            : 
      85                 :            :     void handleRemoveLocales( ::com::sun::star::uno::Sequence
      86                 :            :         < ::com::sun::star::lang::Locale > aLocaleSeq );
      87                 :            : 
      88                 :            :     void handleSetDefaultLocale( ::com::sun::star::lang::Locale aLocale );
      89                 :            : 
      90                 :            :     void handleSetCurrentLocale( ::com::sun::star::lang::Locale aLocale );
      91                 :            : 
      92                 :            :     void handleBasicStarted( void );
      93                 :            : 
      94                 :            :     void handleBasicStopped( void );
      95                 :            : 
      96                 :            :     static void setControlResourceIDsForNewEditorObject( DlgEditor* pEditor,
      97                 :            :         ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName );
      98                 :            : 
      99                 :            :     static void renameControlResourceIDsForEditorObject( DlgEditor* pEditor,
     100                 :            :         ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aNewCtrlName );
     101                 :            : 
     102                 :            :     static void deleteControlResourceIDsForDeletedEditorObject( DlgEditor* pEditor,
     103                 :            :         ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName );
     104                 :            : 
     105                 :            :     static void setStringResourceAtDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aDlgName,
     106                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
     107                 :            : 
     108                 :            :     static void renameStringResourceIDs( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aDlgName,
     109                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
     110                 :            : 
     111                 :            :     static void removeResourceForDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName, const ::rtl::OUString& aDlgName,
     112                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel );
     113                 :            : 
     114                 :            :     static ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >
     115                 :            :         getStringResourceFromDialogLibrary( ::com::sun::star::uno::Reference
     116                 :            :             < ::com::sun::star::container::XNameContainer > xDialogLib );
     117                 :            : 
     118                 :            :     // Clipboard / Drag & Drop
     119                 :            :     static void resetResourceForDialog(
     120                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel,
     121                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager );
     122                 :            : 
     123                 :            :     static void setResourceIDsForDialog(
     124                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel,
     125                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager );
     126                 :            : 
     127                 :            :     static void copyResourcesForPastedEditorObject( DlgEditor* pEditor,
     128                 :            :         ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aCtrlName,
     129                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::resource::
     130                 :            :         XStringResourceResolver > xSourceStringResolver );
     131                 :            : 
     132                 :            :     static void copyResourceForDroppedDialog(
     133                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel,
     134                 :            :         const ::rtl::OUString& aDialogName,
     135                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager,
     136                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > xSourceStringResolver );
     137                 :            : 
     138                 :            :     static void copyResourceForDialog(
     139                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xDialogModel,
     140                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::resource::
     141                 :            :             XStringResourceResolver >& xSourceStringResolver,
     142                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::resource::
     143                 :            :             XStringResourceManager >& xTargetStringResourceManager );
     144                 :            : };
     145                 :            : 
     146                 :            : #endif
     147                 :            : 
     148                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10