diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-20 20:42:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-23 10:31:19 +0000 |
commit | 8f6321b77528b70f170a8f0e74ce003e8bd9219d (patch) | |
tree | 9cbb1955542c862b7343d6b93bb06a4245d6d07f /l10ntools | |
parent | c4e3596820d0d71a86bd2f88a428b34d2c587074 (diff) |
use different OUString ctor for RTL_TEXTENCODING_UCS4
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/prj/build.lst | 2 | ||||
-rw-r--r-- | l10ntools/source/help/LuceneHelper.cxx | 19 | ||||
-rw-r--r-- | l10ntools/source/help/makefile.mk | 7 |
3 files changed, 10 insertions, 18 deletions
diff --git a/l10ntools/prj/build.lst b/l10ntools/prj/build.lst index 8e3ea7041bc6..372fcfe98c1b 100644 --- a/l10ntools/prj/build.lst +++ b/l10ntools/prj/build.lst @@ -1,4 +1,4 @@ -tr l10ntools : BERKELEYDB:berkeleydb EXPAT:expat LIBXSLT:libxslt sal NULL +tr l10ntools : BERKELEYDB:berkeleydb EXPAT:expat LIBXSLT:libxslt CLUCENE:clucene sal NULL tr l10ntools usr1 - all tr_mkout NULL tr l10ntools\inc nmake - all tr_inc NULL tr l10ntools\source nmake - all tr_src tr_inc NULL diff --git a/l10ntools/source/help/LuceneHelper.cxx b/l10ntools/source/help/LuceneHelper.cxx index a88542f93009..762475b17dcd 100644 --- a/l10ntools/source/help/LuceneHelper.cxx +++ b/l10ntools/source/help/LuceneHelper.cxx @@ -8,26 +8,21 @@ std::vector<TCHAR> OUStringToTCHARVec(rtl::OUString const &rStr) //UTF-32 std::vector<TCHAR> aRet; - for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength() + 1; ) + for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength(); ) { const sal_uInt32 nCode = rStr.iterateCodePoints(&nStrIndex); aRet.push_back(nCode); } + aRet.push_back(0); return aRet; } -inline unsigned tstrlen(TCHAR const *str) { - unsigned i; - for (i = 0; str[i] != 0; ++i) {} - return i; -} - rtl::OUString TCHARArrayToOUString(TCHAR const *str) { - // UTF-16 - if (sizeof(TCHAR) == sizeof(sal_Unicode)) - return rtl::OUString((sal_Unicode*) str); + // UTF-16 + if (sizeof(TCHAR) == sizeof(sal_Unicode)) + return rtl::OUString((const sal_Unicode*)(str)); - // UTF-32 - return rtl::OUString((char*) str, tstrlen(str), RTL_TEXTENCODING_UCS4); + // UTF-32 + return ::OUString((const sal_uInt32*)str, wcslen(str)); } diff --git a/l10ntools/source/help/makefile.mk b/l10ntools/source/help/makefile.mk index a466e2c9fc24..2b7cdf3cc4c0 100644 --- a/l10ntools/source/help/makefile.mk +++ b/l10ntools/source/help/makefile.mk @@ -77,9 +77,6 @@ NOOPTFILES=\ $(SLO)$/HelpLinker.obj .ENDIF -PKGCONFIG_MODULES=libclucene-core libclucene-contribs-lib -.INCLUDE : pkg_config.mk - APP1TARGET= $(TARGET) APP1OBJS=\ $(OBJ)$/HelpLinker.obj \ @@ -93,7 +90,7 @@ APP2OBJS=\ $(OBJ)$/HelpIndexer.obj \ $(OBJ)$/HelpIndexer_main.obj APP2RPATH = NONE -APP2STDLIBS+=$(SALLIB) $(PKGCONFIG_LIBS) +APP2STDLIBS+=$(SALLIB) $(CLUCENELIB) SHL1TARGET =$(LIBBASENAME)$(DLLPOSTFIX) SHL1LIBS= $(SLB)$/$(TARGET).lib @@ -103,7 +100,7 @@ SHL1IMPLIB =i$(LIBBASENAME) SHL1IMPLIB =$(LIBBASENAME)$(DLLPOSTFIX) .ENDIF SHL1DEF =$(MISC)$/$(SHL1TARGET).def -SHL1STDLIBS =$(SALLIB) $(BERKELEYLIB) $(XSLTLIB) $(EXPATASCII3RDLIB) $(PKGCONFIG_LIBS) +SHL1STDLIBS =$(SALLIB) $(BERKELEYLIB) $(XSLTLIB) $(EXPATASCII3RDLIB) $(CLUCENELIB) SHL1USE_EXPORTS =ordinal DEF1NAME =$(SHL1TARGET) |