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
9a582dd3
Kaydet (Commit)
9a582dd3
authored
Ara 12, 2011
tarafından
Herbert Dürr
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i118662# remove berkeleyDB from module l10tools (author=orwitt)
üst
cfc7c5cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
139 deletions
+8
-139
build.lst
l10ntools/prj/build.lst
+1
-1
HelpCompiler.hxx
l10ntools/source/help/HelpCompiler.hxx
+0
-5
HelpLinker.cxx
l10ntools/source/help/HelpLinker.cxx
+5
-127
makefile.mk
l10ntools/source/help/makefile.mk
+2
-6
No files found.
l10ntools/prj/build.lst
Dosyayı görüntüle @
9a582dd3
tr l10ntools : tools LIBXSLT:libxslt
BERKELEYDB:berkeleydb
LUCENE:lucene PYTHON:python NULL
tr l10ntools : tools LIBXSLT:libxslt LUCENE:lucene PYTHON:python NULL
tr l10ntools usr1 - all tr_mkout NULL
tr l10ntools\inc nmake - all tr_inc NULL
tr l10ntools\scripts nmake - all tr_scripts NULL
...
...
l10ntools/source/help/HelpCompiler.hxx
Dosyayı görüntüle @
9a582dd3
...
...
@@ -33,11 +33,6 @@
#include <sstream>
#include <algorithm>
#include <ctype.h>
#ifdef SYSTEM_DB
#include <db.h>
#else
#include <berkeleydb/db.h>
#endif
#include <boost/shared_ptr.hpp>
...
...
l10ntools/source/help/HelpLinker.cxx
Dosyayı görüntüle @
9a582dd3
...
...
@@ -40,8 +40,6 @@
#include <expat.h>
#define DBHELP_ONLY
class
IndexerPreProcessor
{
private
:
...
...
@@ -211,28 +209,6 @@ public:
data
.
append
(
id
);
}
void
dump
(
DB
*
table
)
{
DataHashtable
::
const_iterator
aEnd
=
_hash
.
end
();
for
(
DataHashtable
::
const_iterator
aIter
=
_hash
.
begin
();
aIter
!=
aEnd
;
++
aIter
)
{
const
std
::
string
&
keystr
=
aIter
->
first
;
DBT
key
;
memset
(
&
key
,
0
,
sizeof
(
key
));
key
.
data
=
const_cast
<
char
*>
(
keystr
.
c_str
());
key
.
size
=
keystr
.
length
();
const
Data
&
data
=
aIter
->
second
;
std
::
string
str
=
data
.
getString
();
DBT
value
;
memset
(
&
value
,
0
,
sizeof
(
value
));
value
.
data
=
const_cast
<
char
*>
(
str
.
c_str
());
value
.
size
=
str
.
length
();
table
->
put
(
table
,
NULL
,
&
key
,
&
value
,
0
);
}
}
void
dump_DBHelp
(
const
fs
::
path
&
rFileName
)
{
#ifdef WNT //We need _wfopen to support long file paths on Windows XP
...
...
@@ -291,21 +267,9 @@ private:
IndexerPreProcessor
*
m_pIndexerPreProcessor
;
void
initIndexerPreProcessor
();
void
link
()
throw
(
HelpProcessingException
);
void
addBookmark
(
DB
*
dbBase
,
FILE
*
pFile_DBHelp
,
std
::
string
thishid
,
void
addBookmark
(
FILE
*
pFile_DBHelp
,
std
::
string
thishid
,
const
std
::
string
&
fileB
,
const
std
::
string
&
anchorB
,
const
std
::
string
&
jarfileB
,
const
std
::
string
&
titleB
);
#if 0
/**
* @param outputFile
* @param module
* @param lang
* @param hid
* @param helpFiles
* @param additionalFiles
*/
private HelpURLStreamHandlerFactory urlHandler = null;
#endif
};
namespace
URLEncoder
...
...
@@ -331,7 +295,7 @@ namespace URLEncoder
}
}
void
HelpLinker
::
addBookmark
(
DB
*
dbBase
,
FILE
*
pFile_DBHelp
,
std
::
string
thishid
,
void
HelpLinker
::
addBookmark
(
FILE
*
pFile_DBHelp
,
std
::
string
thishid
,
const
std
::
string
&
fileB
,
const
std
::
string
&
anchorB
,
const
std
::
string
&
jarfileB
,
const
std
::
string
&
titleB
)
{
...
...
@@ -340,11 +304,6 @@ void HelpLinker::addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishi
thishid
=
URLEncoder
::
encode
(
thishid
);
DBT
key
;
memset
(
&
key
,
0
,
sizeof
(
key
));
key
.
data
=
const_cast
<
char
*>
(
thishid
.
c_str
());
key
.
size
=
thishid
.
length
();
int
fileLen
=
fileB
.
length
();
if
(
!
anchorB
.
empty
())
fileLen
+=
(
1
+
anchorB
.
length
());
...
...
@@ -369,14 +328,6 @@ void HelpLinker::addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishi
for
(
size_t
j
=
0
;
j
<
titleB
.
length
();
++
j
)
dataB
[
i
++
]
=
titleB
[
j
];
DBT
data
;
memset
(
&
data
,
0
,
sizeof
(
data
));
data
.
data
=
&
dataB
[
0
];
data
.
size
=
dataB
.
size
();
if
(
dbBase
!=
NULL
)
dbBase
->
put
(
dbBase
,
NULL
,
&
key
,
&
data
,
0
);
if
(
pFile_DBHelp
!=
NULL
)
{
std
::
string
aValueStr
(
dataB
.
begin
(),
dataB
.
end
()
);
...
...
@@ -412,10 +363,6 @@ void HelpLinker::link() throw( HelpProcessingException )
fs
::
create_directory
(
indexDirParentName
);
}
#ifdef CMC_DEBUG
std
::
cerr
<<
"will not delete tmpdir of "
<<
indexDirParentName
.
native_file_string
().
c_str
()
<<
std
::
endl
;
#endif
std
::
string
mod
=
module
;
std
::
transform
(
mod
.
begin
(),
mod
.
end
(),
mod
.
begin
(),
tolower
);
...
...
@@ -427,18 +374,8 @@ void HelpLinker::link() throw( HelpProcessingException )
appl
=
appl
.
substr
(
1
);
bool
bUse_
=
true
;
#ifdef DBHELP_ONLY
if
(
!
bExtensionMode
)
bUse_
=
false
;
#endif
DB
*
helpText
(
0
);
#ifndef DBHELP_ONLY
fs
::
path
helpTextFileName
(
indexDirParentName
/
(
mod
+
".ht"
));
db_create
(
&
helpText
,
0
,
0
);
helpText
->
open
(
helpText
,
NULL
,
helpTextFileName
.
native_file_string
().
c_str
(),
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_TRUNCATE
,
0644
);
#endif
fs
::
path
helpTextFileName_DBHelp
(
indexDirParentName
/
(
mod
+
(
bUse_
?
".ht_"
:
".ht"
)));
#ifdef WNT
...
...
@@ -450,13 +387,6 @@ void HelpLinker::link() throw( HelpProcessingException )
FILE
*
pFileHelpText_DBHelp
=
fopen
(
helpTextFileName_DBHelp
.
native_file_string
().
c_str
(),
"wb"
);
#endif
DB
*
dbBase
(
0
);
#ifndef DBHELP_ONLY
fs
::
path
dbBaseFileName
(
indexDirParentName
/
(
mod
+
".db"
));
db_create
(
&
dbBase
,
0
,
0
);
dbBase
->
open
(
dbBase
,
NULL
,
dbBaseFileName
.
native_file_string
().
c_str
(),
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_TRUNCATE
,
0644
);
#endif
fs
::
path
dbBaseFileName_DBHelp
(
indexDirParentName
/
(
mod
+
(
bUse_
?
".db_"
:
".db"
)));
#ifdef WNT
...
...
@@ -468,14 +398,6 @@ void HelpLinker::link() throw( HelpProcessingException )
(
dbBaseFileName_DBHelp
.
native_file_string
().
c_str
(),
"wb"
);
#endif
#ifndef DBHELP_ONLY
DB
*
keyWord
(
0
);
fs
::
path
keyWordFileName
(
indexDirParentName
/
(
mod
+
".key"
));
db_create
(
&
keyWord
,
0
,
0
);
keyWord
->
open
(
keyWord
,
NULL
,
keyWordFileName
.
native_file_string
().
c_str
(),
NULL
,
DB_BTREE
,
DB_CREATE
|
DB_TRUNCATE
,
0644
);
#endif
fs
::
path
keyWordFileName_DBHelp
(
indexDirParentName
/
(
mod
+
(
bUse_
?
".key_"
:
".key"
)));
HelpKeyword
helpKeyword
;
...
...
@@ -568,23 +490,12 @@ void HelpLinker::link() throw( HelpProcessingException )
if
(
documentTitle
.
empty
())
documentTitle
=
"<notitle>"
;
#if 0
std::cout << "for " << xhpFileName << " documentBaseId is " << documentBaseId << "\n";
std::cout << "for " << xhpFileName << " documentPath is " << documentPath << "\n";
std::cout << "for " << xhpFileName << " documentJarfile is " << documentJarfile << "\n";
std::cout << "for " << xhpFileName << " documentPath is " << documentTitle << "\n";
#endif
const
std
::
string
&
fileB
=
documentPath
;
const
std
::
string
&
jarfileB
=
documentJarfile
;
std
::
string
&
titleB
=
documentTitle
;
// add once this as its own id.
addBookmark
(
dbBase
,
pFileDbBase_DBHelp
,
documentPath
,
fileB
,
std
::
string
(),
jarfileB
,
titleB
);
// first the database *.db
// ByteArrayInputStream bais = null;
// ObjectInputStream ois = null;
addBookmark
(
pFileDbBase_DBHelp
,
documentPath
,
fileB
,
std
::
string
(),
jarfileB
,
titleB
);
const
HashSet
*
hidlist
=
streamTable
.
appl_hidlist
;
if
(
!
hidlist
)
...
...
@@ -605,7 +516,7 @@ void HelpLinker::link() throw( HelpProcessingException )
anchorB
=
thishid
.
substr
(
1
+
index
);
thishid
=
thishid
.
substr
(
0
,
index
);
}
addBookmark
(
dbBase
,
pFileDbBase_DBHelp
,
thishid
,
fileB
,
anchorB
,
jarfileB
,
titleB
);
addBookmark
(
pFileDbBase_DBHelp
,
thishid
,
fileB
,
anchorB
,
jarfileB
,
titleB
);
}
}
...
...
@@ -621,7 +532,7 @@ void HelpLinker::link() throw( HelpProcessingException )
enumer
!=
aEnd
;
++
enumer
)
{
const
std
::
string
&
anchor
=
enumer
->
first
;
addBookmark
(
dbBase
,
pFileDbBase_DBHelp
,
documentPath
,
fileB
,
addBookmark
(
pFileDbBase_DBHelp
,
documentPath
,
fileB
,
anchor
,
jarfileB
,
titleB
);
std
::
string
totalId
=
fakedHid
+
"#"
+
anchor
;
// std::cerr << hzipFileName << std::endl;
...
...
@@ -651,19 +562,6 @@ void HelpLinker::link() throw( HelpProcessingException )
helpTextId
=
URLEncoder
::
encode
(
helpTextId
);
DBT
keyDbt
;
memset
(
&
keyDbt
,
0
,
sizeof
(
keyDbt
));
keyDbt
.
data
=
const_cast
<
char
*>
(
helpTextId
.
c_str
());
keyDbt
.
size
=
helpTextId
.
length
();
DBT
textDbt
;
memset
(
&
textDbt
,
0
,
sizeof
(
textDbt
));
textDbt
.
data
=
const_cast
<
char
*>
(
helpTextText
.
c_str
());
textDbt
.
size
=
helpTextText
.
length
();
if
(
helpText
!=
NULL
)
helpText
->
put
(
helpText
,
NULL
,
&
keyDbt
,
&
textDbt
,
0
);
if
(
pFileHelpText_DBHelp
!=
NULL
)
writeKeyValue_DBHelp
(
pFileHelpText_DBHelp
,
helpTextId
,
helpTextText
);
}
...
...
@@ -692,11 +590,6 @@ void HelpLinker::link() throw( HelpProcessingException )
catch
(
const
HelpProcessingException
&
)
{
// catch HelpProcessingException to avoid locking data bases
#ifndef DBHELP_ONLY
helpText
->
close
(
helpText
,
0
);
dbBase
->
close
(
dbBase
,
0
);
keyWord
->
close
(
keyWord
,
0
);
#endif
if
(
pFileHelpText_DBHelp
!=
NULL
)
fclose
(
pFileHelpText_DBHelp
);
if
(
pFileDbBase_DBHelp
!=
NULL
)
...
...
@@ -704,12 +597,6 @@ void HelpLinker::link() throw( HelpProcessingException )
throw
;
}
#ifndef DBHELP_ONLY
helpText
->
close
(
helpText
,
0
);
dbBase
->
close
(
dbBase
,
0
);
helpKeyword
.
dump
(
keyWord
);
keyWord
->
close
(
keyWord
,
0
);
#endif
if
(
pFileHelpText_DBHelp
!=
NULL
)
fclose
(
pFileHelpText_DBHelp
);
if
(
pFileDbBase_DBHelp
!=
NULL
)
...
...
@@ -738,15 +625,6 @@ void HelpLinker::link() throw( HelpProcessingException )
}
}
/*
/////////////////////////////////////////////////////////////////////////
/// remove temprary directory for index creation
/////////////////////////////////////////////////////////////////////////
#ifndef CMC_DEBUG
if( !bExtensionMode )
fs::remove_all( indexDirParentName );
#endif
*/
}
...
...
l10ntools/source/help/makefile.mk
Dosyayı görüntüle @
9a582dd3
...
...
@@ -44,10 +44,6 @@ LIBXSLTINCDIR=external$/libxslt
CFLAGS
+=
-I
$(SOLARINCDIR)$/$(LIBXSLTINCDIR)
.ENDIF
.IF
"$(SYSTEM_DB)"
==
"YES"
CFLAGS
+=
-DSYSTEM_DB
-I
$(DB_INCLUDES)
.ENDIF
.IF
"$(SYSTEM_EXPAT)"
==
"YES"
CFLAGS
+=
-DSYSTEM_EXPAT
.ENDIF
...
...
@@ -79,13 +75,13 @@ APP1OBJS=\
$(OBJ)$/
HelpLinker.obj
\
$(OBJ)$/
HelpCompiler.obj
APP1STDLIBS
+=
$(SALLIB)
$(
BERKELEYLIB)
$(
XSLTLIB)
$(EXPATASCII3RDLIB)
APP1STDLIBS
+=
$(SALLIB)
$(XSLTLIB)
$(EXPATASCII3RDLIB)
SHL1TARGET
=
$(LIBBASENAME)$(DLLPOSTFIX)
SHL1LIBS
=
$(SLB)$/$(TARGET)
.lib
SHL1IMPLIB
=
i
$(LIBBASENAME)
SHL1DEF
=
$(MISC)$/$(SHL1TARGET)
.def
SHL1STDLIBS
=
$(SALLIB)
$(
BERKELEYLIB)
$(
XSLTLIB)
$(EXPATASCII3RDLIB)
SHL1STDLIBS
=
$(SALLIB)
$(XSLTLIB)
$(EXPATASCII3RDLIB)
SHL1USE_EXPORTS
=
ordinal
DEF1NAME
=
$(SHL1TARGET)
...
...
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