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
d5c14a99
Kaydet (Commit)
d5c14a99
authored
Şub 22, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
just link to HelpIndexer
üst
170b9551
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
30 additions
and
393 deletions
+30
-393
dp_help.cxx
desktop/source/deployment/registry/help/dp_help.cxx
+5
-63
HelpIndexer.hxx
l10ntools/inc/l10ntools/HelpIndexer.hxx
+3
-5
HelpIndexer.cxx
l10ntools/source/help/HelpIndexer.cxx
+6
-3
HelpIndexer_main.cxx
l10ntools/source/help/HelpIndexer_main.cxx
+14
-32
makefile.mk
postprocess/packcomponents/makefile.mk
+0
-1
file_library_ooo.scp
scp2/source/ooo/file_library_ooo.scp
+0
-11
module_hidden_ooo.scp
scp2/source/ooo/module_hidden_ooo.scp
+0
-1
extension_helplink.mk
solenv/inc/extension_helplink.mk
+1
-7
build.lst
xmlhelp/prj/build.lst
+0
-1
databases.cxx
xmlhelp/source/cxxhelp/provider/databases.cxx
+1
-5
CLuceneHelpWrapper.component
xmlhelp/source/helpcomponent/CLuceneHelpWrapper.component
+0
-35
CLuceneHelpWrapper.cxx
xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx
+0
-164
makefile.mk
xmlhelp/source/helpcomponent/makefile.mk
+0
-65
No files found.
desktop/source/deployment/registry/help/dp_help.cxx
Dosyayı görüntüle @
d5c14a99
...
...
@@ -43,6 +43,7 @@
#if !defined(ANDROID) && !defined(IOS)
#include <l10ntools/compilehelp.hxx>
#include <l10ntools/HelpIndexer.hxx>
#endif
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
...
...
@@ -62,29 +63,6 @@ namespace backend {
namespace
help
{
namespace
{
// A current context that filters out java-vm.interaction-handler:
class
NonJavaCurrentContext
:
public
cppu
::
WeakImplHelper1
<
XCurrentContext
>
{
public
:
NonJavaCurrentContext
(
Reference
<
XCurrentContext
>
const
&
parent
)
:
parent_
(
parent
)
{}
virtual
Any
SAL_CALL
getValueByName
(
rtl
::
OUString
const
&
Name
)
throw
(
RuntimeException
);
private
:
Reference
<
XCurrentContext
>
parent_
;
};
Any
NonJavaCurrentContext
::
getValueByName
(
rtl
::
OUString
const
&
Name
)
throw
(
RuntimeException
)
{
return
(
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
JAVA_INTERACTION_HANDLER_NAME
))
||
!
parent_
.
is
())
?
Any
()
:
parent_
->
getValueByName
(
Name
);
}
//==============================================================================
class
BackendImpl
:
public
::
dp_registry
::
backend
::
PackageRegistryBackend
{
...
...
@@ -441,28 +419,6 @@ void BackendImpl::implProcessHelp(
makeAny
(
uno
::
Exception
(
aErrStr
,
oWeakThis
)
)
);
}
Reference
<
XComponentContext
>
const
&
xContext
=
getComponentContext
();
Reference
<
script
::
XInvocation
>
xInvocation
;
if
(
xContext
.
is
()
)
{
// Ignore the missing JRE scenario on upgrade/first-start
// without horrible end-user warnings that are ignorable,
// and cause grief:
ContextLayer
l
(
new
NonJavaCurrentContext
(
getCurrentContext
()));
try
{
xInvocation
=
Reference
<
script
::
XInvocation
>
(
xContext
->
getServiceManager
()
->
createInstanceWithContext
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.help.HelpIndexer"
)),
xContext
)
,
UNO_QUERY
);
}
catch
(
const
Exception
&
)
{
// i98680: Survive missing lucene
}
}
// Scan languages
Sequence
<
rtl
::
OUString
>
aLanguageFolderSeq
=
xSFA
->
getFolderContents
(
aExpandedHelpURL
,
true
);
sal_Int32
nLangCount
=
aLanguageFolderSeq
.
getLength
();
...
...
@@ -542,33 +498,19 @@ void BackendImpl::implProcessHelp(
nXhpFileCount
,
pXhpFiles
,
langFolderDestExpanded
,
aErrorInfo
);
if
(
bSuccess
&&
xInvocation
.
is
()
)
if
(
bSuccess
)
{
Sequence
<
uno
::
Any
>
aParamsSeq
(
6
);
aParamsSeq
[
0
]
=
uno
::
makeAny
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"-lang"
)
));
rtl
::
OUString
aLang
;
sal_Int32
nLastSlash
=
aLangURL
.
lastIndexOf
(
'/'
);
if
(
nLastSlash
!=
-
1
)
aLang
=
aLangURL
.
copy
(
nLastSlash
+
1
);
else
aLang
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"en"
));
aParamsSeq
[
1
]
=
uno
::
makeAny
(
aLang
);
aParamsSeq
[
2
]
=
uno
::
makeAny
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"-mod"
)
));
aParamsSeq
[
3
]
=
uno
::
makeAny
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"help"
)
));
aParamsSeq
[
4
]
=
uno
::
makeAny
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"-zipdir"
)
));
rtl
::
OUString
aSystemPath
;
osl
::
FileBase
::
getSystemPathFromFileURL
(
langFolderDestExpanded
,
aSystemPath
);
aParamsSeq
[
5
]
=
uno
::
makeAny
(
aSystemPath
);
rtl
::
OUString
aMod
(
RTL_CONSTASCII_USTRINGPARAM
(
"help"
));
Sequence
<
sal_Int16
>
aOutParamIndex
;
Sequence
<
uno
::
Any
>
aOutParam
;
uno
::
Any
aRet
=
xInvocation
->
invoke
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"createIndex"
)),
aParamsSeq
,
aOutParamIndex
,
aOutParam
);
HelpIndexer
aIndexer
(
aLang
,
aMod
,
langFolderDestExpanded
,
langFolderDestExpanded
);
aIndexer
.
indexDocuments
();
}
if
(
!
bSuccess
)
...
...
l10ntools/inc/l10ntools/HelpIndexer.hxx
Dosyayı görüntüle @
d5c14a99
...
...
@@ -26,13 +26,11 @@ class L10N_DLLPUBLIC HelpIndexer {
/**
* @param lang Help files language.
* @param module The module of the helpfiles.
* @param captionDir The directory to scan for caption files.
* @param contentDir The directory to scan for content files.
* @param indexDir The directory to write the index to.
* @param srcDir The help directory to index
* @param outDir The directory to write the "module".idxl directory to
*/
HelpIndexer
(
rtl
::
OUString
const
&
lang
,
rtl
::
OUString
const
&
module
,
rtl
::
OUString
const
&
captionDir
,
rtl
::
OUString
const
&
contentDir
,
rtl
::
OUString
const
&
indexDir
);
rtl
::
OUString
const
&
srcDir
,
rtl
::
OUString
const
&
outDir
);
/**
* Run the indexer.
...
...
l10ntools/source/help/HelpIndexer.cxx
Dosyayı görüntüle @
d5c14a99
...
...
@@ -42,10 +42,13 @@
using
namespace
lucene
::
document
;
HelpIndexer
::
HelpIndexer
(
rtl
::
OUString
const
&
lang
,
rtl
::
OUString
const
&
module
,
rtl
::
OUString
const
&
captionDir
,
rtl
::
OUString
const
&
contentDir
,
rtl
::
OUString
const
&
indexDir
)
:
d_lang
(
lang
),
d_module
(
module
),
d_captionDir
(
captionDir
),
d_contentDir
(
contentDir
),
d_indexDir
(
indexDir
),
d_error
(),
d_files
()
rtl
::
OUString
const
&
srcDir
,
rtl
::
OUString
const
&
outDir
)
:
d_lang
(
lang
),
d_module
(
module
)
{
d_indexDir
=
rtl
::
OUStringBuffer
(
outDir
).
append
(
'/'
).
append
(
module
).
appendAscii
(
RTL_CONSTASCII_STRINGPARAM
(
".idxl"
)).
toString
();
d_captionDir
=
srcDir
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/caption"
));
d_contentDir
=
srcDir
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/content"
));
}
bool
HelpIndexer
::
indexDocuments
()
{
...
...
l10ntools/source/help/HelpIndexer_main.cxx
Dosyayı görüntüle @
d5c14a99
...
...
@@ -37,13 +37,11 @@
int
main
(
int
argc
,
char
**
argv
)
{
const
std
::
string
pLang
(
"-lang"
);
const
std
::
string
pModule
(
"-mod"
);
const
std
::
string
pOutDir
(
"-zipdir"
);
const
std
::
string
pSrcDir
(
"-srcdir"
);
const
std
::
string
pDir
(
"-dir"
);
std
::
string
lang
;
std
::
string
module
;
std
::
string
srcDir
;
std
::
string
outDir
;
std
::
string
dir
;
bool
error
=
false
;
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
...
...
@@ -59,15 +57,9 @@ int main(int argc, char **argv) {
}
else
{
error
=
true
;
}
}
else
if
(
p
Out
Dir
.
compare
(
argv
[
i
])
==
0
)
{
}
else
if
(
pDir
.
compare
(
argv
[
i
])
==
0
)
{
if
(
i
+
1
<
argc
)
{
outDir
=
argv
[
++
i
];
}
else
{
error
=
true
;
}
}
else
if
(
pSrcDir
.
compare
(
argv
[
i
])
==
0
)
{
if
(
i
+
1
<
argc
)
{
srcDir
=
argv
[
++
i
];
dir
=
argv
[
++
i
];
}
else
{
error
=
true
;
}
...
...
@@ -80,40 +72,30 @@ int main(int argc, char **argv) {
std
::
cerr
<<
"Error parsing command-line arguments"
<<
std
::
endl
;
}
if
(
error
||
lang
.
empty
()
||
module
.
empty
()
||
srcDir
.
empty
()
||
outD
ir
.
empty
())
{
std
::
cerr
<<
"Usage: HelpIndexer -lang ISOLangCode -mod HelpModule -
srcdir SourceDir -zipdir Output
Dir"
<<
std
::
endl
;
if
(
error
||
lang
.
empty
()
||
module
.
empty
()
||
d
ir
.
empty
())
{
std
::
cerr
<<
"Usage: HelpIndexer -lang ISOLangCode -mod HelpModule -
dir
Dir"
<<
std
::
endl
;
return
1
;
}
std
::
string
captionDir
(
srcD
ir
+
SAL_PATHDELIMITER
+
"caption"
);
std
::
string
contentDir
(
srcD
ir
+
SAL_PATHDELIMITER
+
"content"
);
std
::
string
indexDir
(
outD
ir
+
SAL_PATHDELIMITER
+
module
+
".idxl"
);
std
::
string
captionDir
(
d
ir
+
SAL_PATHDELIMITER
+
"caption"
);
std
::
string
contentDir
(
d
ir
+
SAL_PATHDELIMITER
+
"content"
);
std
::
string
indexDir
(
d
ir
+
SAL_PATHDELIMITER
+
module
+
".idxl"
);
rtl
::
OUString
sCaptionDir
,
sContentDir
,
sIndexDir
;
osl
::
File
::
getFileURLFromSystemPath
(
rtl
::
OUString
(
captionDir
.
c_str
(),
captionDir
.
size
(),
osl_getThreadTextEncoding
()),
sCaptionDir
);
osl
::
File
::
getFileURLFromSystemPath
(
rtl
::
OUString
(
contentDir
.
c_str
(),
contentDir
.
size
(),
osl_getThreadTextEncoding
()),
sContentDir
);
rtl
::
OUString
sDir
;
osl
::
File
::
getFileURLFromSystemPath
(
rtl
::
OUString
(
indexDir
.
c_str
(),
indexD
ir
.
size
(),
osl_getThreadTextEncoding
()),
s
Index
Dir
);
rtl
::
OUString
(
dir
.
c_str
(),
d
ir
.
size
(),
osl_getThreadTextEncoding
()),
sDir
);
rtl
::
OUString
cwd
;
osl_getProcessWorkingDir
(
&
cwd
.
pData
);
osl
::
File
::
getAbsoluteFileURL
(
cwd
,
sCaptionDir
,
sCaptionDir
);
osl
::
File
::
getAbsoluteFileURL
(
cwd
,
sContentDir
,
sContentDir
);
osl
::
File
::
getAbsoluteFileURL
(
cwd
,
sIndexDir
,
sIndexDir
);
osl
::
File
::
getAbsoluteFileURL
(
cwd
,
sDir
,
sDir
);
HelpIndexer
indexer
(
rtl
::
OUString
(
lang
.
c_str
(),
lang
.
size
(),
osl_getThreadTextEncoding
()),
rtl
::
OUString
(
module
.
c_str
(),
module
.
size
(),
osl_getThreadTextEncoding
()),
s
CaptionDir
,
sContentDir
,
sIndex
Dir
);
s
Dir
,
s
Dir
);
if
(
!
indexer
.
indexDocuments
())
{
std
::
wcerr
<<
indexer
.
getErrorMessage
().
getStr
()
<<
std
::
endl
;
...
...
postprocess/packcomponents/makefile.mk
Dosyayı görüntüle @
d5c14a99
...
...
@@ -174,7 +174,6 @@ my_components += \
syssh
\
tvhlp1
\
ucpchelp1
\
CLuceneHelpWrapper
\
.ENDIF
...
...
scp2/source/ooo/file_library_ooo.scp
Dosyayı görüntüle @
d5c14a99
...
...
@@ -1256,17 +1256,6 @@ File gid_File_Lib_Tvhlp1
#endif
End
File gid_File_Lib_CLuceneHelpWrapper
LIB_FILE_BODY;
Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
#ifdef UNX
Name = STRING(CONCAT2(libCLuceneHelpWrapper,UNXSUFFIX));
#else
Name = "libCLuceneHelpWrapper.dll";
#endif
End
File gid_File_Lib_Ucb1
LIB_FILE_BODY;
Styles = (PACKED);
...
...
scp2/source/ooo/module_hidden_ooo.scp
Dosyayı görüntüle @
d5c14a99
...
...
@@ -340,7 +340,6 @@ Module gid_Module_Root_Files_5
#if ! defined SYSTEM_CLUCENE
gid_File_Lib_CLucene,
#endif
gid_File_Lib_CLuceneHelpWrapper,
gid_File_Lib_Comphelper2,
gid_File_Lib_Curl,
gid_Unixlink_File_Lib_Curl,
...
...
solenv/inc/extension_helplink.mk
Dosyayı görüntüle @
d5c14a99
...
...
@@ -36,10 +36,6 @@ HELPLINKALLADDEDDEPS=$(foreach,i,$(aux_alllangiso) $(subst,LANGUAGE,$i $(LINKADD
ALLTAR : $(HELPLINKALLTARGETS)
.IF "$(SYSTEM_DB)" != "YES"
JAVA_LIBRARY_PATH= -Djava.library.path=$(SOLARSHAREDBIN)
.ENDIF
XSL_DIR*:=$(SOLARBINDIR)
XHPLINKSRC*:=$(XHPDEST)
STY_SWITCH:= -sty $(XSL_DIR)/embed.xsl
...
...
@@ -53,12 +49,10 @@ $(HELPLINKALLTARGETS) : $(foreach,i,$(LINKLINKFILES) $(XHPLINKSRC)/$$(@:b:s/_/./
@echo Building help index for $(@:b:s/_/./:e:s/.//)
$(COMMAND_ECHO)$(HELPLINKER) -mod $(LINKNAME) -extlangsrc $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} $(STY_SWITCH) -extlangdest $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -idxcaption $(XSL_DIR)/idxcaption.xsl -idxcontent $(XSL_DIR)/idxcontent.xsl $(LINKLINKFILES)
$(COMMAND_ECHO)cd $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && zip -u -r $(LINKNAME).jar $(PACKAGE)/* $(CHECKZIPRESULT)
.IF "$(SOLAR_JAVA)" == "TRUE"
# cleanup index dir
-$(RM) $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))}/$(LINKNAME).idxl/*
$(HELPINDEXER) -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -
srcdir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -zip
dir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && $(TOUCH) $@
$(HELPINDEXER) -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -dir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && $(TOUCH) $@
-$(RM) $(XHPLINKSRC)/$(@:b:s/_/./:e:s/.//)/content/*.*
-$(RMDIR) $(XHPLINKSRC)/$(@:b:s/_/./:e:s/.//)/content
-$(RM) $(XHPLINKSRC)/$(@:b:s/_/./:e:s/.//)/caption/*.*
-$(RMDIR) $(XHPLINKSRC)/$(@:b:s/_/./:e:s/.//)/caption
.ENDIF
xmlhelp/prj/build.lst
Dosyayı görüntüle @
d5c14a99
xh xmlhelp : comphelper ucbhelper LIBXSLT:libxslt unoil BERKELEYDB:berkeleydb javaunohelper DESKTOP:l10ntools unotools NULL
xh xmlhelp usr1 - all xh_mkout NULL
xh xmlhelp\source\treeview nmake - all xh_treeview NULL
xh xmlhelp\source\helpcomponent nmake - all xh_help NULL
xh xmlhelp\source\cxxhelp\util nmake - all xh_cutil NULL
xh xmlhelp\source\cxxhelp\qe nmake - all xh_qe NULL
xh xmlhelp\source\cxxhelp\provider nmake - all xh_provider NULL
...
...
xmlhelp/source/cxxhelp/provider/databases.cxx
Dosyayı görüntüle @
d5c14a99
...
...
@@ -2149,11 +2149,7 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
}
}
rtl
::
OUString
aCaption
=
aLangURL
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/caption"
));
rtl
::
OUString
aContent
=
aLangURL
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/content"
));
HelpIndexer
aIndexer
(
aLang
,
aMod
,
aCaption
,
aContent
,
aZipDir
);
HelpIndexer
aIndexer
(
aLang
,
aMod
,
aLangURL
,
aZipDir
);
aIndexer
.
indexDocuments
();
if
(
bIsWriteAccess
)
...
...
xmlhelp/source/helpcomponent/CLuceneHelpWrapper.component
deleted
100755 → 0
Dosyayı görüntüle @
170b9551
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2012 Red Hat, Inc., Caolán McNamara <caolanm@redhat.com>
* (initial developer)
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
-->
<component
loader=
"com.sun.star.loader.SharedLibrary"
xmlns=
"http://openoffice.org/2010/uno-components"
>
<implementation
name=
"libreoffice.CLuceneWrapper"
>
<service
name=
"com.sun.star.help.HelpIndexer"
/>
<service
name=
"com.sun.star.help.HelpSearch"
/>
</implementation>
</component>
xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx
deleted
100644 → 0
Dosyayı görüntüle @
170b9551
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2010 Red Hat, Inc., Caolán McNamara <caolanm@redhat.com>
* (initial developer)
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/script/XInvocation.hpp>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implementationentry.hxx>
using
namespace
com
::
sun
::
star
::
beans
;
using
namespace
com
::
sun
::
star
::
reflection
;
using
namespace
com
::
sun
::
star
::
script
;
using
namespace
com
::
sun
::
star
::
lang
;
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
cppu
;
using
namespace
rtl
;
class
CLuceneHelpWrapper
:
public
WeakImplHelper2
<
XServiceInfo
,
XInvocation
>
{
public
:
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
throw
(
RuntimeException
);
virtual
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
)
throw
(
RuntimeException
);
virtual
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
RuntimeException
);
// XInvocation
virtual
Reference
<
XIntrospectionAccess
>
SAL_CALL
getIntrospection
(
void
)
throw
(
RuntimeException
)
{
return
Reference
<
XIntrospectionAccess
>
();
}
virtual
Any
SAL_CALL
invoke
(
const
OUString
&
FunctionName
,
const
Sequence
<
Any
>&
Params
,
Sequence
<
sal_Int16
>&
OutParamIndex
,
Sequence
<
Any
>&
OutParam
)
throw
(
IllegalArgumentException
,
CannotConvertException
,
InvocationTargetException
,
RuntimeException
);
virtual
void
SAL_CALL
setValue
(
const
OUString
&
,
const
Any
&
)
throw
(
UnknownPropertyException
,
CannotConvertException
,
InvocationTargetException
,
RuntimeException
)
{
throw
UnknownPropertyException
();
}
virtual
Any
SAL_CALL
getValue
(
const
OUString
&
)
throw
(
UnknownPropertyException
,
RuntimeException
)
{
throw
UnknownPropertyException
();
}
virtual
sal_Bool
SAL_CALL
hasMethod
(
const
OUString
&
rName
)
throw
(
RuntimeException
)
{
return
rName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"search"
))
||
rName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"createIndex"
));
}
virtual
sal_Bool
SAL_CALL
hasProperty
(
const
OUString
&
)
throw
(
RuntimeException
)
{
return
sal_False
;
}
};
#include <stdio.h> // FIXME: remove once the fprintf() calls below are gone
Any
CLuceneHelpWrapper
::
invoke
(
const
OUString
&
rFunctionName
,
const
Sequence
<
Any
>&
,
Sequence
<
sal_Int16
>&
,
Sequence
<
Any
>&
)
throw
(
IllegalArgumentException
,
CannotConvertException
,
InvocationTargetException
,
RuntimeException
)
{
fprintf
(
stderr
,
"invoke something or other, %s
\n
"
,
rtl
::
OUStringToOString
(
rFunctionName
,
RTL_TEXTENCODING_UTF8
).
getStr
());
if
(
rFunctionName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"search"
)))
fprintf
(
stderr
,
"implement me, do search thing from helpsearch.cxx here"
);
else
if
(
rFunctionName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"createIndex"
)))
fprintf
(
stderr
,
"implement me, do indexing thing for extensions with help, but without pre-created index, make need to split l10ntools HelpIndexer tool into a lib and header that we can link to here"
);
else
throw
IllegalArgumentException
();
return
Any
();
}
namespace
{
Reference
<
XInterface
>
create
(
Reference
<
XComponentContext
>
const
&
/*xContext*/
)
{
return
static_cast
<
::
cppu
::
OWeakObject
*
>
(
new
CLuceneHelpWrapper
);
}
OUString
getImplName
()
{
return
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"libreoffice.CLuceneWrapper"
));
}
Sequence
<
OUString
>
getSuppServices
()
{
OUString
sHelpIndexer
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.help.HelpIndexer"
));
OUString
sHelpSearch
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.help.HelpSearch"
));
Sequence
<
OUString
>
aServiceNames
(
2
);
aServiceNames
[
0
]
=
sHelpIndexer
;
aServiceNames
[
1
]
=
sHelpSearch
;
return
aServiceNames
;
}
}
OUString
CLuceneHelpWrapper
::
getImplementationName
()
throw
(
RuntimeException
)
{
return
getImplName
();
}
sal_Bool
CLuceneHelpWrapper
::
supportsService
(
const
OUString
&
rService
)
throw
(
RuntimeException
)
{
Sequence
<
OUString
>
names
(
getSupportedServiceNames
());
for
(
sal_Int32
i
=
0
;
i
<
names
.
getLength
();
++
i
)
{
if
(
names
[
i
]
==
rService
)
return
true
;
}
return
false
;
}
Sequence
<
OUString
>
CLuceneHelpWrapper
::
getSupportedServiceNames
()
throw
(
RuntimeException
)
{
return
getSuppServices
();
}
namespace
{
static
::
cppu
::
ImplementationEntry
const
entries
[]
=
{
{
create
,
getImplName
,
getSuppServices
,
::
cppu
::
createSingleComponentFactory
,
0
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
}
};
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
void
*
SAL_CALL
component_getFactory
(
char
const
*
pImplName
,
void
*
pServiceManager
,
void
*
pRegistryKey
)
{
return
cppu
::
component_getFactoryHelper
(
pImplName
,
pServiceManager
,
pRegistryKey
,
entries
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
xmlhelp/source/helpcomponent/makefile.mk
deleted
100755 → 0
Dosyayı görüntüle @
170b9551
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# Major Contributor(s):
# Copyright (C) 2012 Red Hat, Inc., Caolán McNamara <caolanm@redhat.com>
# (initial developer)
#
# All Rights Reserved.
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
#*************************************************************************
PRJ
=
..
$/
..
$/
PRJNAME
=
xmlhelp
TARGET
=
CLuceneHelpWrapper
ENABLE_EXCEPTIONS
=
TRUE
.INCLUDE
:
settings.mk
SLOFILES
=
\
$(SLO)$/
CLuceneHelpWrapper.obj
LIB1TARGET
=
$(SLB)$/
_
$(TARGET)
.lib
LIB1OBJFILES
=
$(SLOFILES)
SHL1TARGET
=
$(TARGET)
SHL1LIBS
=
$(LIB1TARGET)
SHL1IMPLIB
=
i
$(TARGET)
SHL1STDLIBS
=
\
$(CPPUHELPERLIB)
\
$(CPPULIB)
\
$(COMPHELPERLIB)
\
$(UNOTOOLSLIB)
\
$(SALLIB)
\
$(LIBCLUCENE_LIBS)
SHL1VERSIONMAP
=
$(SOLARENV)
/src/component.map
.INCLUDE
:
target.mk
ALLTAR
:
$(MISC)/CLuceneHelpWrapper.component
$(MISC)/CLuceneHelpWrapper.component .ERRREMOVE
:
\
$(SOLARENV)/bin/createcomponent.xslt CLuceneHelpWrapper.component
$(XSLTPROC)
--nonet
--stringparam
uri
\
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)'
-o
$@
\
$(SOLARENV)/bin/createcomponent.xslt
CLuceneHelpWrapper.component
# vim: set noet sw=4 ts=4:
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