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
76661491
Kaydet (Commit)
76661491
authored
Ara 09, 2013
tarafından
Andras Timar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Revert "fdo#56443 allow different name for .dic and .aff files"
This reverts commit
cb56ab9b
.
üst
22115840
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
26 deletions
+19
-26
sspellimp.cxx
lingucomponent/source/spellcheck/spell/sspellimp.cxx
+18
-24
sspellimp.hxx
lingucomponent/source/spellcheck/spell/sspellimp.hxx
+1
-2
No files found.
lingucomponent/source/spellcheck/spell/sspellimp.cxx
Dosyayı görüntüle @
76661491
...
@@ -66,8 +66,7 @@ SpellChecker::SpellChecker() :
...
@@ -66,8 +66,7 @@ SpellChecker::SpellChecker() :
aDicts
(
NULL
),
aDicts
(
NULL
),
aDEncs
(
NULL
),
aDEncs
(
NULL
),
aDLocs
(
NULL
),
aDLocs
(
NULL
),
aDAffNames
(
NULL
),
aDNames
(
NULL
),
aDDicNames
(
NULL
),
numdict
(
0
),
numdict
(
0
),
aEvtListeners
(
GetLinguMutex
()),
aEvtListeners
(
GetLinguMutex
()),
pPropHelper
(
NULL
),
pPropHelper
(
NULL
),
...
@@ -87,8 +86,7 @@ SpellChecker::~SpellChecker()
...
@@ -87,8 +86,7 @@ SpellChecker::~SpellChecker()
}
}
delete
[]
aDEncs
;
delete
[]
aDEncs
;
delete
[]
aDLocs
;
delete
[]
aDLocs
;
delete
[]
aDAffNames
;
delete
[]
aDNames
;
delete
[]
aDDicNames
;
if
(
pPropHelper
)
if
(
pPropHelper
)
{
{
pPropHelper
->
RemoveAsPropListener
();
pPropHelper
->
RemoveAsPropListener
();
...
@@ -185,8 +183,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
...
@@ -185,8 +183,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
aDicts
=
new
Hunspell
*
[
numdict
];
aDicts
=
new
Hunspell
*
[
numdict
];
aDEncs
=
new
rtl_TextEncoding
[
numdict
];
aDEncs
=
new
rtl_TextEncoding
[
numdict
];
aDLocs
=
new
Locale
[
numdict
];
aDLocs
=
new
Locale
[
numdict
];
aDAffNames
=
new
OUString
[
numdict
];
aDNames
=
new
OUString
[
numdict
];
aDDicNames
=
new
OUString
[
numdict
];
k
=
0
;
k
=
0
;
for
(
aDictIt
=
aDics
.
begin
();
aDictIt
!=
aDics
.
end
();
++
aDictIt
)
for
(
aDictIt
=
aDics
.
begin
();
aDictIt
!=
aDics
.
end
();
++
aDictIt
)
{
{
...
@@ -204,16 +201,13 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
...
@@ -204,16 +201,13 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
aDicts
[
k
]
=
NULL
;
aDicts
[
k
]
=
NULL
;
aDEncs
[
k
]
=
RTL_TEXTENCODING_DONTKNOW
;
aDEncs
[
k
]
=
RTL_TEXTENCODING_DONTKNOW
;
aDLocs
[
k
]
=
LanguageTag
::
convertToLocale
(
aLocaleNames
[
i
]
);
aDLocs
[
k
]
=
LanguageTag
::
convertToLocale
(
aLocaleNames
[
i
]
);
if
((
aDictIt
->
aLocations
[
0
]).
endsWith
(
".aff"
))
// also both files have to be in the same directory and the
{
// file names must only differ in the extension (.aff/.dic).
aDAffNames
[
k
]
=
aDictIt
->
aLocations
[
0
];
// Thus we use the first location only and strip the extension part.
aDDicNames
[
k
]
=
aDictIt
->
aLocations
[
1
];
OUString
aLocation
=
aDictIt
->
aLocations
[
0
];
}
sal_Int32
nPos
=
aLocation
.
lastIndexOf
(
'.'
);
else
aLocation
=
aLocation
.
copy
(
0
,
nPos
);
{
aDNames
[
k
]
=
aLocation
;
aDAffNames
[
k
]
=
aDictIt
->
aLocations
[
1
];
aDDicNames
[
k
]
=
aDictIt
->
aLocations
[
0
];
}
++
k
;
++
k
;
}
}
...
@@ -231,10 +225,8 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
...
@@ -231,10 +225,8 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
aDEncs
=
NULL
;
aDEncs
=
NULL
;
delete
[]
aDLocs
;
delete
[]
aDLocs
;
aDLocs
=
NULL
;
aDLocs
=
NULL
;
delete
[]
aDAffNames
;
delete
[]
aDNames
;
delete
[]
aDDicNames
;
aDNames
=
NULL
;
aDAffNames
=
NULL
;
aDDicNames
=
NULL
;
aSuppLocales
.
realloc
(
0
);
aSuppLocales
.
realloc
(
0
);
}
}
}
}
...
@@ -311,16 +303,18 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
...
@@ -311,16 +303,18 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
{
{
if
(
!
aDicts
[
i
])
if
(
!
aDicts
[
i
])
{
{
OUString
dicpath
=
aDNames
[
i
]
+
".dic"
;
OUString
affpath
=
aDNames
[
i
]
+
".aff"
;
OUString
dict
;
OUString
dict
;
OUString
aff
;
OUString
aff
;
osl
::
FileBase
::
getSystemPathFromFileURL
(
aDDicNames
[
i
]
,
dict
);
osl
::
FileBase
::
getSystemPathFromFileURL
(
dicpath
,
dict
);
osl
::
FileBase
::
getSystemPathFromFileURL
(
a
DAffNames
[
i
]
,
aff
);
osl
::
FileBase
::
getSystemPathFromFileURL
(
a
ffpath
,
aff
);
OString
aTmpaff
(
OU2ENC
(
aff
,
osl_getThreadTextEncoding
()));
OString
aTmpaff
(
OU2ENC
(
aff
,
osl_getThreadTextEncoding
()));
OString
aTmpdict
(
OU2ENC
(
dict
,
osl_getThreadTextEncoding
()));
OString
aTmpdict
(
OU2ENC
(
dict
,
osl_getThreadTextEncoding
()));
#if defined(WNT)
#if defined(WNT)
// workaround for Windows specif
i
c problem that the
// workaround for Windows specifc problem that the
// path length in calls to 'fopen' is lim
i
ted to somewhat
// path length in calls to 'fopen' is limted to somewhat
// about 120+ characters which will usually be exceed when
// about 120+ characters which will usually be exceed when
// using dictionaries as extensions.
// using dictionaries as extensions.
aTmpaff
=
Win_GetShortPathName
(
aff
);
aTmpaff
=
Win_GetShortPathName
(
aff
);
...
...
lingucomponent/source/spellcheck/spell/sspellimp.hxx
Dosyayı görüntüle @
76661491
...
@@ -63,8 +63,7 @@ class SpellChecker :
...
@@ -63,8 +63,7 @@ class SpellChecker :
Hunspell
**
aDicts
;
Hunspell
**
aDicts
;
rtl_TextEncoding
*
aDEncs
;
rtl_TextEncoding
*
aDEncs
;
Locale
*
aDLocs
;
Locale
*
aDLocs
;
OUString
*
aDAffNames
;
OUString
*
aDNames
;
OUString
*
aDDicNames
;
sal_Int32
numdict
;
sal_Int32
numdict
;
::
cppu
::
OInterfaceContainerHelper
aEvtListeners
;
::
cppu
::
OInterfaceContainerHelper
aEvtListeners
;
...
...
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