Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / ParseContext.hxx
blob95885e987a3a66f2b4deb92c74c663ea212cbd1b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ParseContext.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SVX_QUERYDESIGNCONTEXT_HXX
31 #define SVX_QUERYDESIGNCONTEXT_HXX
33 #ifndef CONNECTIVITY_IPARSECONTEXT_HXX
34 #include <connectivity/IParseContext.hxx>
35 #endif
37 #ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX
38 #include <unotools/localedatawrapper.hxx>
39 #endif
40 namespace binfilter {
42 namespace svxform
44 //==========================================================================
45 //= OSystemParseContext
46 //==========================================================================
47 class OSystemParseContext : public ::connectivity::IParseContext
49 private:
50 ByteString m_aSQLInternationals;
52 public:
53 OSystemParseContext();
55 virtual ~OSystemParseContext();
56 // retrieves language specific error messages
57 virtual ::rtl::OUString getErrorMessage(ErrorCode _eCodes) const;
59 // retrieves language specific keyword strings (only ASCII allowed)
60 virtual ::rtl::OString getIntlKeywordAscii(InternationalKeyCode _eKey) const;
62 // finds out, if we have an international keyword (only ASCII allowed)
63 virtual InternationalKeyCode getIntlKeyCode(const ::rtl::OString& rToken) const;
65 /** get's a locale instance which should be used when parsing in the context specified by this instance
66 <p>if this is not overridden by derived classes, it returns the static default locale.</p>
68 virtual ::com::sun::star::lang::Locale getPreferredLocale( ) const;
70 public:
71 // helper methods to ease access to some of the characteristics of the locale
72 sal_Unicode getNumDecimalSep( ) const;
73 sal_Unicode getNumThousandSep( ) const;
76 //==========================================================================
77 //= OParseContextClient
78 //==========================================================================
79 /** helper class which needs access to a (shared and ref-counted) OSystemParseContext
80 instance.
82 class OParseContextClient
84 protected:
85 OParseContextClient();
86 virtual ~OParseContextClient();
89 }//end of namespace binfilter
90 #endif // SVX_QUERYDESIGNCONTEXT_HXX