tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / connectivity / source / sdbcx / VIndexColumn.cxx
blob4f55fc864167dd1eee7d3d0e00735263e7c53d0b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sdbcx/VIndexColumn.hxx>
21 #include <com/sun/star/beans/PropertyAttribute.hpp>
22 #include <cppuhelper/supportsservice.hxx>
23 #include <TConnection.hxx>
25 using namespace connectivity;
26 using namespace connectivity::sdbcx;
27 using namespace ::com::sun::star::beans;
28 using namespace ::com::sun::star::uno;
30 OUString SAL_CALL OIndexColumn::getImplementationName( )
32 if(isNew())
33 return u"com.sun.star.sdbcx.VIndexColumnDescriptor"_ustr;
34 return u"com.sun.star.sdbcx.VIndexColumn"_ustr;
37 css::uno::Sequence< OUString > SAL_CALL OIndexColumn::getSupportedServiceNames( )
39 return { isNew()?u"com.sun.star.sdbcx.IndexColumnDescriptor"_ustr:u"com.sun.star.sdbcx.IndexColumn"_ustr };
42 sal_Bool SAL_CALL OIndexColumn::supportsService( const OUString& _rServiceName )
44 return cppu::supportsService(this, _rServiceName);
47 OIndexColumn::OIndexColumn(bool _bCase) : OColumn(_bCase), m_IsAscending(true)
49 construct();
53 OIndexColumn::OIndexColumn( bool IsAscending,
54 const OUString& Name,
55 const OUString& TypeName,
56 const OUString& DefaultValue,
57 sal_Int32 IsNullable,
58 sal_Int32 Precision,
59 sal_Int32 Scale,
60 sal_Int32 Type,
61 bool _bCase,
62 const OUString& CatalogName,
63 const OUString& SchemaName,
64 const OUString& TableName
65 ) : OColumn(Name,
66 TypeName,
67 DefaultValue,
68 OUString(),
69 IsNullable,
70 Precision,
71 Scale,
72 Type,
73 false/*IsAutoIncrement*/,
74 false/*IsRowVersion*/,
75 false/*IsCurrency*/,
76 _bCase,
77 CatalogName,
78 SchemaName,
79 TableName)
80 , m_IsAscending(IsAscending)
82 construct();
85 ::cppu::IPropertyArrayHelper* OIndexColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const
87 return doCreateArrayHelper();
90 ::cppu::IPropertyArrayHelper& SAL_CALL OIndexColumn::getInfoHelper()
92 return *OIndexColumn_PROP::getArrayHelper(isNew() ? 1 : 0);
95 void OIndexColumn::construct()
97 sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
98 registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, nAttrib,&m_IsAscending, cppu::UnoType<bool>::get());
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */