diff options
author | August Sodora <augsod@gmail.com> | 2011-11-20 17:15:33 -0500 |
---|---|---|
committer | August Sodora <augsod@gmail.com> | 2011-11-20 17:21:03 -0500 |
commit | 25ade2f357f1cedf76919f61ae8d81fda7bdf88d (patch) | |
tree | 5ca0d2d7d27ee5c69b6c790ca6524a4526e1a248 /basic/source/inc | |
parent | 7cc258f35b5b2eef542827ddf03323c5c2b6c794 (diff) |
Refactor BasicCharClass out from scanner and make it a singleton
Diffstat (limited to 'basic/source/inc')
-rw-r--r-- | basic/source/inc/basiccharclass.hxx | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/basic/source/inc/basiccharclass.hxx b/basic/source/inc/basiccharclass.hxx new file mode 100644 index 000000000000..0c1e2b4f3e3f --- /dev/null +++ b/basic/source/inc/basiccharclass.hxx @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + ************************************************************************/ + +#include <unotools/charclass.hxx> +#include <rtl/instance.hxx> + +#include <vcl/svapp.hxx> + +class BasicCharClass +{ + bool IsLetterTab[256]; + +public: + BasicCharClass(); + + bool isLetter( sal_Unicode c ); + bool isLetterUnicode( sal_Unicode c ); + bool isAlpha( sal_Unicode c, bool bCompatible ); + bool isDigit( sal_Unicode c ); + bool isAlphaNumeric( sal_Unicode c, bool bCompatible ); + bool isWhitespace( sal_Unicode c ); +}; + +class theBasicCharClass: public rtl::Static<BasicCharClass, theBasicCharClass> {}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |