1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 #include "AccResource.hxx" 23 24 #include <tools/simplerm.hxx> 25 26 // ---- needed as long as we have no contexts for components --- 27 #include <vcl/svapp.hxx> 28 29 //2009.04. Comment the following code because the acc resource is not necessary now. Can open them if necessary 30 //#ifndef _TOOLS_INTN_HXX 31 //#include <tools/intn.hxx> 32 //#endif 33 //#ifndef _SOLAR_HRC 34 //#include <svtools/solar.hrc> 35 //#endif 36 37 //......................................................................... 38 39 //================================================================== 40 //= ResourceManager 41 //================================================================== 42 SimpleResMgr* ResourceManager::m_pImpl = NULL; 43 44 //------------------------------------------------------------------ 45 ResourceManager::EnsureDelete::~EnsureDelete() 46 { 47 delete ResourceManager::m_pImpl; 48 } 49 50 //------------------------------------------------------------------ 51 void ResourceManager::ensureImplExists() 52 { 53 //Comment the following code because the acc resource is not necessary now. Can open them if necessary 54 /* 55 if (m_pImpl) 56 return; 57 58 LanguageType nType = Application::GetSettings().GetUILanguage(); 59 60 ByteString sFileName("winaccessibility"); 61 sFileName += ByteString::CreateFromInt32( (sal_Int32)SOLARUPD ); 62 63 m_pImpl = SimpleResMgr::Create(sFileName.GetBuffer(), nType); 64 65 if (m_pImpl) 66 { 67 // no that we have a impl class make sure it's deleted on unloading the library 68 static ResourceManager::EnsureDelete s_aDeleteTheImplClas; 69 } 70 */ 71 } 72 73 //------------------------------------------------------------------ 74 ::rtl::OUString ResourceManager::loadString(sal_uInt16 _nResId) 75 { 76 ::rtl::OUString sReturn; 77 78 ensureImplExists(); 79 if (m_pImpl) 80 sReturn = m_pImpl->ReadString(_nResId); 81 82 return sReturn; 83 } 84 85 86