Kaydet (Commit) 8d8ff8f0 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

Remove USE_CELL_BOUNDARY_CODE directive.

üst 40ab8452
......@@ -35,9 +35,6 @@
namespace com { namespace sun { namespace star { namespace i18n {
// Whether to use cell boundary code, currently unused but prepared.
#define USE_CELL_BOUNDARY_CODE 0
#define CACHE_MAX 32 // max cache structure number
#define DEFAULT_SIZE 256 // for boundary size, to avoid alloc and release memory
......@@ -64,12 +61,6 @@ private:
Boundary boundary;
sal_Bool japaneseWordBreak;
#if USE_CELL_BOUNDARY_CODE
// For CTL breakiterator, where the word boundary should not be inside cell.
sal_Bool useCellBoundary;
sal_Int32* cellBoundary;
#endif
public:
xdictionary(const sal_Char *lang);
~xdictionary();
......@@ -78,10 +69,6 @@ public:
Boundary getWordBoundary( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType, sal_Bool bDirection );
void setJapaneseWordBreak();
#if USE_CELL_BOUNDARY_CODE
void setCellBoundary(sal_Int32* cellArray);
#endif
private:
WordBreakCache cache[CACHE_MAX];
......
......@@ -61,12 +61,6 @@ xdictionary::xdictionary(const sal_Char *lang) :
hModule( NULL ),
boundary(),
japaneseWordBreak( sal_False )
#if USE_CELL_BOUNDARY_CODE
// For CTL breakiterator, where the word boundary should not be inside cell.
,
useCellBoundary( sal_False ),
cellBoundary( NULL )
#endif
{
index1 = 0;
#ifdef SAL_DLLPREFIX
......@@ -102,10 +96,6 @@ xdictionary::xdictionary(const sal_Char *lang) :
for (sal_Int32 i = 0; i < CACHE_MAX; i++)
cache[i].size = 0;
#if USE_CELL_BOUNDARY_CODE
useCellBoundary = sal_False;
cellBoundary = NULL;
#endif
japaneseWordBreak = sal_False;
}
......@@ -295,28 +285,12 @@ WordBreakCache& xdictionary::getCache(const sal_Unicode *text, Boundary& wordBou
if (count) {
aCache.wordboundary[i+1] = aCache.wordboundary[i] + count;
i++;
#if USE_CELL_BOUNDARY_CODE
if (useCellBoundary) {
sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1];
if (cBoundary > 0)
aCache.wordboundary[i] = cBoundary - wordBoundary.startPos;
}
#endif
}
}
if (len) {
aCache.wordboundary[i+1] = aCache.wordboundary[i] + len;
i++;
#if USE_CELL_BOUNDARY_CODE
if (useCellBoundary) {
sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1];
if (cBoundary > 0)
aCache.wordboundary[i] = cBoundary - wordBoundary.startPos;
}
#endif
}
}
aCache.wordboundary[i + 1] = aCache.length + 1;
......@@ -392,14 +366,6 @@ Boundary xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, s
return boundary;
}
#if USE_CELL_BOUNDARY_CODE
void xdictionary::setCellBoundary(sal_Int32* cellArray)
{
useCellBoundary = sal_True;
cellBoundary = cellArray;
}
#endif
} } } }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment