Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
761f5020
Kaydet (Commit)
761f5020
authored
Şub 11, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
can use a reference for singleton
üst
56122bdf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
17 deletions
+28
-17
global.hxx
basic/inc/basic/global.hxx
+1
-2
basmgr.cxx
basic/source/basmgr/basmgr.cxx
+3
-3
global.cxx
basic/source/classes/global.cxx
+24
-12
No files found.
basic/inc/basic/global.hxx
Dosyayı görüntüle @
761f5020
...
...
@@ -35,9 +35,8 @@ namespace utl {
class
SbGlobal
{
static
utl
::
TransliterationWrapper
*
pTransliteration
;
public
:
static
utl
::
TransliterationWrapper
*
GetTransliteration
();
static
utl
::
TransliterationWrapper
&
GetTransliteration
();
};
#endif
...
...
basic/source/basmgr/basmgr.cxx
Dosyayı görüntüle @
761f5020
...
...
@@ -1737,11 +1737,11 @@ namespace
String
sModule
=
sMacro
.
GetToken
(
0
,
'.'
,
nLast
);
sMacro
.
Erase
(
0
,
nLast
);
utl
::
TransliterationWrapper
*
p
Transliteration
=
SbGlobal
::
GetTransliteration
();
utl
::
TransliterationWrapper
&
r
Transliteration
=
SbGlobal
::
GetTransliteration
();
sal_uInt16
nLibCount
=
i_manager
->
GetLibCount
();
for
(
sal_uInt16
nLib
=
0
;
nLib
<
nLibCount
;
++
nLib
)
{
if
(
pTransliteration
->
isEqual
(
i_manager
->
GetLibName
(
nLib
),
sLibName
)
)
if
(
rTransliteration
.
isEqual
(
i_manager
->
GetLibName
(
nLib
),
sLibName
)
)
{
StarBASIC
*
pLib
=
i_manager
->
GetLib
(
nLib
);
if
(
!
pLib
)
...
...
@@ -1756,7 +1756,7 @@ namespace
for
(
sal_uInt16
nMod
=
0
;
nMod
<
nModCount
;
++
nMod
)
{
SbModule
*
pMod
=
(
SbModule
*
)
pLib
->
GetModules
()
->
Get
(
nMod
);
if
(
pMod
&&
pTransliteration
->
isEqual
(
pMod
->
GetName
(),
sModule
)
)
if
(
pMod
&&
rTransliteration
.
isEqual
(
pMod
->
GetName
(),
sModule
)
)
{
SbMethod
*
pMethod
=
(
SbMethod
*
)
pMod
->
Find
(
sMacro
,
SbxCLASS_METHOD
);
if
(
pMethod
)
...
...
basic/source/classes/global.cxx
Dosyayı görüntüle @
761f5020
...
...
@@ -27,24 +27,36 @@
*/
#include "basic/global.hxx"
#include <unotools/transliterationwrapper.hxx>
#include <comphelper/processfactory.hxx>
#include <i18npool/lang.h>
#include <rtl/instance.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <vcl/svapp.hxx>
utl
::
TransliterationWrapper
*
SbGlobal
::
pTransliteration
=
NULL
;
utl
::
TransliterationWrapper
*
SbGlobal
::
GetTransliteration
()
namespace
{
if
(
!
pTransliteration
)
class
lclTransliterationWrapper
{
const
LanguageType
eOfficeLanguage
=
Application
::
GetSettings
().
GetLanguage
();
pTransliteration
=
new
::
utl
::
TransliterationWrapper
(
comphelper
::
getProcessServiceFactory
(),
com
::
sun
::
star
::
i18n
::
TransliterationModules_IGNORE_CASE
);
pTransliteration
->
loadModuleIfNeeded
(
eOfficeLanguage
);
}
return
pTransliteration
;
private
:
utl
::
TransliterationWrapper
m_aTransliteration
;
public
:
lclTransliterationWrapper
()
:
m_aTransliteration
(
comphelper
::
getProcessServiceFactory
(),
com
::
sun
::
star
::
i18n
::
TransliterationModules_IGNORE_CASE
)
{
const
LanguageType
eOfficeLanguage
=
Application
::
GetSettings
().
GetLanguage
();
m_aTransliteration
.
loadModuleIfNeeded
(
eOfficeLanguage
);
}
utl
::
TransliterationWrapper
&
getTransliteration
()
{
return
m_aTransliteration
;
}
};
class
theTransliterationWrapper
:
public
rtl
::
Static
<
lclTransliterationWrapper
,
theTransliterationWrapper
>
{};
}
utl
::
TransliterationWrapper
&
SbGlobal
::
GetTransliteration
()
{
return
theTransliterationWrapper
::
get
().
getTransliteration
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment