summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-01-06 18:18:06 +0100
committerJens-Heiner Rechtien <hr@openoffice.org>2010-01-06 18:18:06 +0100
commit2023a7904c5a6536546022423948ab53fb4b309a (patch)
treef55306e92e3202e92269e308a8df3c5090f67aa8 /lingucomponent
parent5c15c000c031a7e97a2d82b188349dcb89068662 (diff)
DEV300 masterfix: #i10000#: add missing <string.h> includes; fix CR/LF
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx73
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx3
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx2
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx1
4 files changed, 42 insertions, 37 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 8f43530c5a3a..7ebd9a7b66f3 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -65,6 +65,7 @@
#include "dictmgr.hxx"
#include <stdio.h>
+#include <string.h>
#include <list>
#include <set>
@@ -544,10 +545,10 @@ Reference< XPossibleHyphens > SAL_CALL
char *lcword;
int k;
- PropertyHelper_Hyphen & rHelper = GetPropHelper();
- rHelper.SetTmpPropVals(aProperties);
- sal_Int16 minTrail = rHelper.GetMinTrailing();
- sal_Int16 minLead = rHelper.GetMinLeading();
+ PropertyHelper_Hyphen & rHelper = GetPropHelper();
+ rHelper.SetTmpPropVals(aProperties);
+ sal_Int16 minTrail = rHelper.GetMinTrailing();
+ sal_Int16 minLead = rHelper.GetMinLeading();
HyphenDict *dict = NULL;
rtl_TextEncoding aEnc = 0;
@@ -621,9 +622,9 @@ Reference< XPossibleHyphens > SAL_CALL
wordlen = encWord.getLength();
lcword = new char[wordlen+1];
hyphens = new char[wordlen+5];
- char ** rep = NULL; // replacements of discretionary hyphenation
- int * pos = NULL; // array of [hyphenation point] minus [deletion position]
- int * cut = NULL; // length of deletions in original word
+ char ** rep = NULL; // replacements of discretionary hyphenation
+ int * pos = NULL; // array of [hyphenation point] minus [deletion position]
+ int * cut = NULL; // length of deletions in original word
// copy converted word into simple char buffer
strcpy(lcword,encWord.getStr());
@@ -634,21 +635,21 @@ Reference< XPossibleHyphens > SAL_CALL
n++;
// fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr);
if (n > 0) {
- if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
- minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
- Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
+ if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
+ minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
+ Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
{
delete[] hyphens;
delete[] lcword;
-
- if (rep) {
- for(int j = 0; j < n; j++) {
- if (rep[j]) free(rep[j]);
- }
- free(rep);
- }
- if (pos) free(pos);
- if (cut) free(cut);
+
+ if (rep) {
+ for(int j = 0; j < n; j++) {
+ if (rep[j]) free(rep[j]);
+ }
+ free(rep);
+ }
+ if (pos) free(pos);
+ if (cut) free(cut);
return NULL;
}
@@ -662,7 +663,7 @@ Reference< XPossibleHyphens > SAL_CALL
INT16 i;
for ( i = 0; i < encWord.getLength(); i++)
- if (hyphens[i]&1 && (!rep || !rep[i]))
+ if (hyphens[i]&1 && (!rep || !rep[i]))
nHyphCount++;
Sequence< INT16 > aHyphPos(nHyphCount);
@@ -671,14 +672,14 @@ Reference< XPossibleHyphens > SAL_CALL
OUString hyphenatedWord;
nHyphCount = 0;
- for (i = 0; i < nWord.getLength(); i++) {
+ for (i = 0; i < nWord.getLength(); i++) {
hyphenatedWordBuffer.append(aWord[i]);
- // hyphenation position (not alternative)
- if (hyphens[i]&1 && (!rep || !rep[i])) {
- pPos[nHyphCount] = i;
- hyphenatedWordBuffer.append(sal_Unicode('='));
- nHyphCount++;
- }
+ // hyphenation position (not alternative)
+ if (hyphens[i]&1 && (!rep || !rep[i])) {
+ pPos[nHyphCount] = i;
+ hyphenatedWordBuffer.append(sal_Unicode('='));
+ nHyphCount++;
+ }
}
hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
@@ -690,15 +691,15 @@ Reference< XPossibleHyphens > SAL_CALL
delete[] hyphens;
delete[] lcword;
-
- if (rep) {
- for(int j = 0; j < n; j++) {
- if (rep[j]) free(rep[j]);
- }
- free(rep);
- }
- if (pos) free(pos);
- if (cut) free(cut);
+
+ if (rep) {
+ for(int j = 0; j < n; j++) {
+ if (rep[j]) free(rep[j]);
+ }
+ free(rep);
+ }
+ if (pos) free(pos);
+ if (cut) free(cut);
return xRes;
}
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 2e00035628bc..5e9b0c8fa592 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -57,11 +57,14 @@
#include <set>
#include <vector>
+#include <string.h>
#include <lingutil.hxx>
#include <dictmgr.hxx>
+
+
using ::com::sun::star::lang::Locale;
using namespace ::com::sun::star;
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 1a92db58a4dc..bcb09c5ac16d 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -60,7 +60,7 @@
#include <list>
#include <set>
-
+#include <string.h>
using namespace utl;
using namespace osl;
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index c526d2b07444..a92c5926c8b4 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -54,6 +54,7 @@
#include <list>
#include <set>
+#include <string.h>
// values asigned to capitalization types
#define CAPTYPE_UNKNOWN 0