office-gobmx/i18npool/inc/xdictionary.hxx
Ivo Hinkelmann e260d2a64d CWS-TOOLING: integrate CWS locales32
2009-09-06 19:13:15 +0200 er  r275860 : #i104308# Lower and Upper Sorbian
2009-09-03 01:40:09 +0200 erack  r275732 : CWS-TOOLING: rebase CWS locales32 to trunk@275331 (milestone: DEV300:m56)
2009-08-17 21:48:26 +0200 erack  r275072 : * #i102920# use OUString::iterateCodePoints() in xdictionary; patch from <cmc>
* Adapted local iterateCodePoints() in breakiteratorImpl.cxx to cope with
  surrogates at text end.
* Use OUString::iterateCodePoints() in BreakIterator_CJK::getLineBreak()
2009-08-09 23:14:39 +0200 erack  r274792 : mergeinfo
2009-08-09 23:09:31 +0200 erack  r274791 : re-adding this again, merge from tag didn't work; SVN IS A PIECE OF CRAP
2009-08-09 22:45:02 +0200 erack  r274790 : don't re-add file, merge instead
2009-08-09 22:09:49 +0200 erack  r274789 : cws rebase ERRONEOUSLY REMOVED THIS FILE!
2009-08-09 22:01:02 +0200 erack  r274788 : adapt to new postset.mk completelangiso content; get rid of /i modifier uglyness
2009-08-09 19:40:46 +0200 erack  r274787 : #i99823# sort currency list ISO,symbol,language/country; removed unused STR_EUROPE
2009-08-09 01:23:35 +0200 erack  r274786 : make AZM currency legacyOnly to avoid duplicate listing in number formatter because of the identical 'man.' currency symbol
2009-08-09 01:11:38 +0200 erack  r274785 : #i94445# make ROL currency legacyOnly to avoid duplicate listing in number formatter because of the identical 'lei' currency symbol
2009-08-06 19:10:34 +0200 erack  r274743 : CWS-TOOLING: rebase CWS locales32 to trunk@274622 (milestone: DEV300:m54)
2009-08-04 21:26:24 +0200 erack  r274634 : #i94445# new currency RON
2009-08-04 21:06:55 +0200 erack  r274633 : #i103193# corrected data; from <calibaashi>
2009-07-18 23:56:55 +0200 erack  r274104 : #i103408# ignore an empty LANGUAGE variable; patch from <cmc>
2009-07-07 00:21:02 +0200 erack  r273764 : Langpack.ulf is gone
2009-07-07 00:02:39 +0200 erack  r273763 : #i103358# add 'is' Icelandic
2009-07-04 02:10:55 +0200 erack  r273720 : #i101173# typographic quotation marks
2009-07-04 01:07:44 +0200 erack  r273719 : #i65127# make it compile with OSL_DEBUG_LEVEL>2 again
2009-06-26 22:50:49 +0200 erack  r273444 : #i97602# add Asturian_Spain [ast-ES]; locale data contributed by <astur>/<it46>
2009-06-26 22:01:25 +0200 erack  r273443 : #i101173# add Oromo [om-ET] locale data; contributed by <barreessaa>
2009-06-26 21:55:41 +0200 erack  r273442 : #i101173# add Oromo [om-ET] locale data; contributed by <barreessaa>
2009-06-26 21:11:46 +0200 erack  r273441 : #i102991# linguistic corrections
2009-06-26 21:02:45 +0200 erack  r273440 : #i102986# add Somali 'so'
2009-06-22 00:04:35 +0200 erack  r273190 : #i101235# add Uyghur_China [ug-CN] locale; contributed by <sahran>/<it46>
2009-06-21 23:35:21 +0200 erack  r273189 : blah
2009-06-21 23:22:40 +0200 erack  r273188 : #i99972# add Quechua (Ecuador) [qu-EC]
2009-06-21 21:57:29 +0200 erack  r273187 : #i97791# add Yiddish [yi-IL]
2009-06-21 21:24:29 +0200 erack  r273186 : #i102186# add Greek, Ancient [grc-GR]
2009-06-21 21:00:59 +0200 erack  r273185 : #i98489# add Arabic (Oman) [ar-OM] locale data; contributed by <zayed2001>/<it46>
2009-06-21 20:54:07 +0200 erack  r273184 : check ListSeparator for ';' semicolon, for consistency
2009-06-21 20:20:13 +0200 erack  r273183 : ISO 4217 checks only if not legacy (e.g. Macau Pound 'P')
2009-06-21 20:00:27 +0200 erack  r273182 : check CurrencyID and BankSymbol vor ISO 4217
2009-06-21 19:10:36 +0200 erack  r273181 : #i73118# Bokmål instead of Bokmal
2009-06-21 19:00:47 +0200 erack  r273180 : #i99827# add Sardinian locale data; contributed by <valterubuntu>
2009-06-21 18:20:05 +0200 erack  r273179 : give URL of svn instead of legacy cvs
2009-06-21 17:45:31 +0200 erack  r273178 : #i87907# add Oromo [om-ET]
2009-06-21 17:23:14 +0200 erack  r273177 : grep in completelangiso of postset.mk
2009-03-24 00:22:16 +0100 erack  r269901 : #i100368# parentheses, parentheses, parentheses ...
2009-03-23 23:31:22 +0100 erack  r269899 : #i99712# call OutlineNumberingLevel_Impl dtor
2009-03-23 22:37:31 +0100 erack  r269897 : #i98347# register NumToCharHalfwidth
2009-03-22 18:07:40 +0100 erack  r269852 : definitely ignore any output resulting from the cd command in list of rules, which may have lead to a spurious rule file
2009-09-16 14:55:33 +00:00

99 lines
3.3 KiB
C++

/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xdictionary.hxx,v $
* $Revision: 1.7.24.1 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _XDICTIONARY_H_
#define _XDICTIONARY_H_
#include <sal/types.h>
#include <osl/module.h>
#include <com/sun/star/i18n/Boundary.hpp>
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
// cache structure.
struct WordBreakCache {
sal_Int32 length; // contents length saved here.
sal_Unicode *contents; // seperated segment contents.
sal_Int32* wordboundary; // word boundaries in segments.
sal_Int32 size; // size of wordboundary
WordBreakCache();
sal_Bool equals(const sal_Unicode *str, Boundary& boundary); // checking cached string
};
class xdictionary
{
private:
const sal_uInt8 * existMark;
const sal_Int16 * index1;
const sal_Int32 * index2;
const sal_Int32 * lenArray;
const sal_Unicode* dataArea;
oslModule hModule;
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();
Boundary nextWord( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType);
Boundary previousWord( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType);
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];
sal_Bool seekSegment(const rtl::OUString& rText, sal_Int32 pos, Boundary& boundary);
WordBreakCache& getCache(const sal_Unicode *text, Boundary& boundary);
sal_Bool exists(const sal_uInt32 u);
sal_Int32 getLongestMatch(const sal_Unicode *text, sal_Int32 len);
};
} } } }
#endif