1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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)
45 void OAdoView::getFastPropertyValue(Any
& rValue
,sal_Int32 nHandle
) const
51 case PROPERTY_ID_NAME
:
52 rValue
<<= m_aView
.get_Name();
54 case PROPERTY_ID_CATALOGNAME
:
56 case PROPERTY_ID_SCHEMANAME
:
57 // rValue <<= m_aView.get_Type();
59 case PROPERTY_ID_COMMAND
:
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
);
75 OView_ADO::getFastPropertyValue(rValue
,nHandle
);
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */