/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "connectivity/TIndex.hxx" #include "connectivity/TIndexColumns.hxx" #include #include #include "connectivity/TTableHelper.hxx" #include "TConnection.hxx" using namespace connectivity; using namespace connectivity::sdbcx; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- OIndexHelper::OIndexHelper( OTableHelper* _pTable) : connectivity::sdbcx::OIndex(sal_True) , m_pTable(_pTable) { construct(); ::std::vector< ::rtl::OUString> aVector; m_pColumns = new OIndexColumns(this,m_aMutex,aVector); } // ------------------------------------------------------------------------- OIndexHelper::OIndexHelper( OTableHelper* _pTable, const ::rtl::OUString& _Name, const ::rtl::OUString& _Catalog, sal_Bool _isUnique, sal_Bool _isPrimaryKeyIndex, sal_Bool _isClustered ) : connectivity::sdbcx::OIndex(_Name, _Catalog, _isUnique, _isPrimaryKeyIndex, _isClustered,sal_True) ,m_pTable(_pTable) { construct(); refreshColumns(); } // ------------------------------------------------------------------------- void OIndexHelper::refreshColumns() { if ( !m_pTable ) return; ::std::vector< ::rtl::OUString> aVector; if ( !isNew() ) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); ::rtl::OUString aSchema,aTable; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; Reference< XResultSet > xResult = m_pTable->getMetaData()->getIndexInfo( m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)), aSchema,aTable,sal_False,sal_False); if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); ::rtl::OUString aColName; while( xResult->next() ) { if ( xRow->getString(6) == m_Name ) { aColName = xRow->getString(9); if ( !xRow->wasNull() ) aVector.push_back(aColName); } } } } if(m_pColumns) m_pColumns->reFill(aVector); else m_pColumns = new OIndexColumns(this,m_aMutex,aVector); } // ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 'distro/collabora/dcm-6.2'>distro/collabora/dcm-6.2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2015-10-20sc: initial png exportMiklos Vajna
2015-10-16drop gconf integration as per ESC decisionBjoern Michaelsen
2015-10-07No xsec_xmlsec built for iOS eitherTor Lillqvist
2015-09-25Replace GUIBASE with USING_X11Samuel Mehrbrodt
2015-09-12Typo: muliple->multipleJulien Nabet
2015-09-03remove KDE3 support, --enable-kde and --enable-kdeabMichael Stahl
2015-09-02ditch gnome-vfs2 supportCaolán McNamara
2015-08-27Improve names of WebDAV-related install:modulesStephan Bergmann
2015-08-27Restrict the install:module="neon_gnomevfs" hack to --with-webdav=neonStephan Bergmann
2015-08-06postprocess: d'oh generated files are in $(BUILDDIR)Michael Stahl
2015-08-06postprocess: try to get the right version number in About dialogMichael Stahl
2015-07-26tdf#92792: Register mork driver on windows 64bit and make it workDavid Ostrovsky
2015-07-13tdf#92668: Revert some implementation names, for backwards compatibilityStephan Bergmann
2015-06-23tdf#90790: Don't take galaxy as a reference icon set, it may be incomplete.Jan Holesovsky
2015-06-15fix fingerprint path with system libextextcatDavid Tardon
2015-05-23tdf#91469: convert links in help/about to httpsJulien Nabet
2015-04-29officecfg, postprocess: allow embedding of Base documentsMiklos Vajna
2015-04-20don't try to sign merged libs on windowsChristian Lohmaier
2015-04-13rhbz#1134285: Access dav, davs URLs via GVFSStephan Bergmann
2015-03-30Make syntax gotchaStephan Bergmann
2015-03-25Revert "give this a copy ctor"Stephan Bergmann
2015-03-25Keep GCC 4.6 happyStephan Bergmann
2015-03-24give this a copy ctorCaolán McNamara
2015-03-24CppunitTest_services: Check that XServiceInfo and .component data matchesStephan Bergmann
2015-03-16Exclude Python components if --disable-pythonStephan Bergmann
2015-02-27gbuild: CppunitTest: always use unittest configurationMichael Stahl
2015-02-12Fill in bug IDStephan Bergmann
2015-02-12Make CppunitTest_services instantiate even more servicesStephan Bergmann
2015-02-11add log message about untested servicesMarkus Mohrhard
2014-11-28icons: Hide the Industrial theme again, fallback to it during Tango creation.Jan Holesovsky
2014-11-23icons: Package only the icons that are in the theme.Jan Holesovsky
2014-11-07Clarify configure GStreamer handlingJan-Marek Glogowski