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
4586cd75
Kaydet (Commit)
4586cd75
authored
Ara 23, 2011
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DECLARE_TABLE->std::map
üst
4d4a6774
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
svxacorr.hxx
editeng/inc/editeng/svxacorr.hxx
+3
-2
svxacorr.cxx
editeng/source/misc/svxacorr.cxx
+10
-15
No files found.
editeng/inc/editeng/svxacorr.hxx
Dosyayı görüntüle @
4586cd75
...
...
@@ -39,13 +39,14 @@
#include <editeng/swafopt.hxx>
#include "editeng/editengdllapi.h"
#include <map>
class
CharClass
;
class
SfxPoolItem
;
class
SvxAutoCorrect
;
class
SvStringsISortDtor
;
class
SfxObjectShell
;
class
SvxAutoCorrLanguageTable_Impl
;
class
SvxAutoCorrLastFileAskTable_Impl
;
class
SotStorageRef
;
class
SotStorage
;
class
Window
;
...
...
@@ -208,7 +209,7 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect
// all languages in a table
SvxAutoCorrLanguageTable_Impl
*
pLangTable
;
SvxAutoCorrLastFileAskTable_Impl
*
pLastFileTable
;
std
::
map
<
LanguageType
,
long
>
*
pLastFileTable
;
CharClass
*
pCharClass
;
bool
bRunNext
;
...
...
editeng/source/misc/svxacorr.cxx
Dosyayı görüntüle @
4586cd75
...
...
@@ -120,9 +120,6 @@ TYPEINIT0(SvxAutoCorrect)
typedef
SvxAutoCorrectLanguageLists
*
SvxAutoCorrectLanguageListsPtr
;
DECLARE_TABLE
(
SvxAutoCorrLanguageTable_Impl
,
SvxAutoCorrectLanguageListsPtr
)
DECLARE_TABLE
(
SvxAutoCorrLastFileAskTable_Impl
,
long
)
inline
int
IsWordDelim
(
const
sal_Unicode
c
)
{
return
' '
==
c
||
'\t'
==
c
||
0x0a
==
c
||
...
...
@@ -345,7 +342,7 @@ SvxAutoCorrect::SvxAutoCorrect( const String& rShareAutocorrFile,
:
sShareAutoCorrFile
(
rShareAutocorrFile
),
sUserAutoCorrFile
(
rUserAutocorrFile
),
pLangTable
(
new
SvxAutoCorrLanguageTable_Impl
),
pLastFileTable
(
new
SvxAutoCorrLastFileAskTable_Impl
),
pLastFileTable
(
new
std
::
map
<
LanguageType
,
long
>
),
pCharClass
(
0
),
bRunNext
(
false
),
cStartDQuote
(
0
),
cEndDQuote
(
0
),
cStartSQuote
(
0
),
cEndSQuote
(
0
)
{
...
...
@@ -362,7 +359,7 @@ SvxAutoCorrect::SvxAutoCorrect( const SvxAutoCorrect& rCpy )
aSwFlags
(
rCpy
.
aSwFlags
),
pLangTable
(
new
SvxAutoCorrLanguageTable_Impl
),
pLastFileTable
(
new
SvxAutoCorrLastFileAskTable_Impl
),
pLastFileTable
(
new
std
::
map
<
LanguageType
,
long
>
),
pCharClass
(
0
),
bRunNext
(
false
),
nFlags
(
rCpy
.
nFlags
&
~
(
ChgWordLstLoad
|
CplSttLstLoad
|
WrdSttLstLoad
)),
...
...
@@ -1618,12 +1615,11 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
SvxAutoCorrectLanguageListsPtr
pLists
=
0
;
Time
nMinTime
(
0
,
2
),
nAktTime
(
Time
::
SYSTEM
),
nLastCheckTime
(
Time
::
EMPTY
);
sal_uLong
nFndPos
;
if
(
TABLE_ENTRY_NOTFOUND
!=
pLastFileTable
->
SearchKey
(
sal_uLong
(
eLang
),
&
nFndPos
)
&&
(
nLastCheckTime
.
SetTime
(
pLastFileTable
->
GetObject
(
nFndPos
)),
nLastCheckTime
<
nAktTime
)
&&
(
nAktTime
-
nLastCheckTime
)
<
nMinTime
)
std
::
map
<
LanguageType
,
long
>::
iterator
nFndPos
=
pLastFileTable
->
find
(
eLang
);
if
(
nFndPos
!=
pLastFileTable
->
end
()
&&
(
nLastCheckTime
.
SetTime
(
nFndPos
->
second
),
nLastCheckTime
<
nAktTime
)
&&
nAktTime
-
nLastCheckTime
<
nMinTime
)
{
// no need to test the file, because the last check is not older then
// 2 minutes.
...
...
@@ -1633,7 +1629,7 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
pLists
=
new
SvxAutoCorrectLanguageLists
(
*
this
,
sShareDirFile
,
sUserDirFile
,
eLang
);
pLangTable
->
Insert
(
sal_uLong
(
eLang
),
pLists
);
pLastFileTable
->
Remove
(
sal_uLong
(
eLang
)
);
pLastFileTable
->
erase
(
nFndPos
);
}
}
else
if
(
(
FStatHelper
::
IsDocument
(
sUserDirFile
)
||
...
...
@@ -1644,12 +1640,11 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
pLists
=
new
SvxAutoCorrectLanguageLists
(
*
this
,
sShareDirFile
,
sUserDirFile
,
eLang
);
pLangTable
->
Insert
(
sal_uLong
(
eLang
),
pLists
);
pLastFileTable
->
Remove
(
sal_uLong
(
eLang
)
);
pLastFileTable
->
erase
(
nFndPos
);
}
else
if
(
!
bNewFile
)
{
if
(
!
pLastFileTable
->
Insert
(
sal_uLong
(
eLang
),
nAktTime
.
GetTime
()
))
pLastFileTable
->
Replace
(
sal_uLong
(
eLang
),
nAktTime
.
GetTime
()
);
pLastFileTable
[
eLang
]
=
{
std
::
make_pair
(
eLang
,
nAktTime
.
GetTime
())
};
}
return
pLists
!=
0
;
}
...
...
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