Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / connectivity / source / drivers / ado / AView.cxx
blob10a5524db95bc2f4a2691c1770127bd8c7667606
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 <ado/AView.hxx>
21 #include <com/sun/star/lang/DisposedException.hpp>
22 #include <ado/adoimp.hxx>
23 #include <ado/Awrapado.hxx>
24 #include <comphelper/servicehelper.hxx>
25 #include <comphelper/types.hxx>
26 #include <systools/win32/oleauto.hxx>
28 #include <TConnection.hxx>
31 using namespace comphelper;
32 using namespace connectivity::ado;
33 using namespace com::sun::star::uno;
34 using namespace com::sun::star::lang;
35 using namespace com::sun::star::beans;
36 using namespace com::sun::star::sdbc;
38 // IMPLEMENT_SERVICE_INFO(OAdoView,"com.sun.star.sdbcx.AView","com.sun.star.sdbcx.View");
40 OAdoView::OAdoView(bool _bCase,ADOView* _pView) : OView_ADO(_bCase,nullptr)
41 ,m_aView(_pView)
45 void OAdoView::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
47 if(m_aView.IsValid())
49 switch(nHandle)
51 case PROPERTY_ID_NAME:
52 rValue <<= m_aView.get_Name();
53 break;
54 case PROPERTY_ID_CATALOGNAME:
55 break;
56 case PROPERTY_ID_SCHEMANAME:
57 // rValue <<= m_aView.get_Type();
58 break;
59 case PROPERTY_ID_COMMAND:
61 OLEVariant aVar;
62 m_aView.get_Command(aVar);
63 if(!aVar.isNull() && !aVar.isEmpty())
65 ADOCommand* pCom = static_cast<ADOCommand*>(aVar.getIDispatch());
66 sal::systools::BStr aBSTR;
67 pCom->get_CommandText(&aBSTR);
68 rValue <<= OUString(aBSTR);
71 break;
74 else
75 OView_ADO::getFastPropertyValue(rValue,nHandle);
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */