summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-03 15:53:56 +0100
committerMathias Bauer <mba@openoffice.org>2011-02-03 15:53:56 +0100
commit2e913ff4d61087475ddf3d15455a652cb50c0549 (patch)
tree9fc661cdf6462f6d245cd92ac2a20c747e1f9cd9 /i18npool
parentfd66c3fb05c8aa2031e6f859f6cfaef0ee7bfa87 (diff)
parent99ff7a9fb521895d6ba18ca4ca92d7eb0c3524fd (diff)
CWS gnumake3: resync to m99
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/inc/i18npool/paper.hxx7
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx4
-rw-r--r--i18npool/source/paper/paper.cxx6
3 files changed, 16 insertions, 1 deletions
diff --git a/i18npool/inc/i18npool/paper.hxx b/i18npool/inc/i18npool/paper.hxx
index 76aebbe473d5..f0a7d76931b7 100644
--- a/i18npool/inc/i18npool/paper.hxx
+++ b/i18npool/inc/i18npool/paper.hxx
@@ -34,6 +34,10 @@
#include <rtl/string.hxx>
#include <com/sun/star/lang/Locale.hpp>
+//!! WARNING: be aware of cui/source/tabpages/page.h where someone had the broken idea
+//!! of duplicating the values of this enum in order to use those defines within
+//!! src files.
+//!! Thus don't reorder the enum values here without changing the code there as well.
enum Paper
{
PAPER_A0,
@@ -116,6 +120,9 @@ enum Paper
PAPER_ARCHE
};
+// defined for 'equal size' test with the implementation array
+#define NUM_PAPER_ENTRIES (PAPER_ARCHE - PAPER_A0 + 1)
+
// ---------
// - Paper -
// ---------
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index d22203d100c7..19b175d4bd83 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -448,6 +448,10 @@ typedef struct {
sal_Int16 script;
} UBlock2Script;
+// for a list of the UBLOCK_... values see:
+// http://icu-project.org/apiref/icu4c/uchar_8h.html
+// where enum UBlockCode is defined.
+// See also http://www.unicode.org/charts/ for general reference
static UBlock2Script scriptList[] = {
{UBLOCK_NO_BLOCK, UBLOCK_NO_BLOCK, ScriptType::WEAK},
{UBLOCK_BASIC_LATIN, UBLOCK_ARMENIAN, ScriptType::LATIN},
diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx
index e94efa6e06c5..0d9235747fd6 100644
--- a/i18npool/source/paper/paper.cxx
+++ b/i18npool/source/paper/paper.cxx
@@ -27,6 +27,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
+
+#include <osl/diagnose.h>
#include <sal/config.h>
#include <rtl/ustring.hxx>
#include <rtl/string.hxx>
@@ -129,7 +131,6 @@ static PageDesc aDinTab[] =
{ MM2MM100( 227 ), MM2MM100( 356 ), "SuperA", NULL },
{ MM2MM100( 305 ), MM2MM100( 487 ), "SuperB", NULL },
{ IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL },
- { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL },
{ MM2MM100( 210 ), MM2MM100( 330 ), "A4Plus", NULL },
{ MM2MM100( 200 ), MM2MM100( 148 ), "DoublePostcard", NULL },
{ MM2MM100( 105 ), MM2MM100( 148 ), "A6", NULL },
@@ -385,6 +386,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
PaperInfo::PaperInfo(Paper eType) : m_eType(eType)
{
+ OSL_ENSURE( sizeof(aDinTab) / sizeof(aDinTab[0]) == NUM_PAPER_ENTRIES,
+ "mismatch between array entries and enum values" );
+
m_nPaperWidth = aDinTab[m_eType].m_nWidth;
m_nPaperHeight = aDinTab[m_eType].m_nHeight;
}