1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ParseContext.hxx,v $
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 #include "svx/svxdllapi.h"
34 #include <connectivity/IParseContext.hxx>
35 #include <tools/string.hxx>
36 #include <unotools/localedatawrapper.hxx>
43 //==========================================================================
44 //= OSystemParseContext
45 //==========================================================================
46 class SVX_DLLPUBLIC OSystemParseContext
: public ::connectivity::IParseContext
50 ::std::vector
< String
> m_aLocalizedKeywords
;
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;
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
82 class SVX_DLLPUBLIC OParseContextClient
85 OParseContextClient();
86 virtual ~OParseContextClient();
88 const OSystemParseContext
* getParseContext() const;
91 #endif // SVX_QUERYDESIGNCONTEXT_HXX