chart2/source/controller/main/ShapeToolbarController.cxx | 5 chart2/source/controller/main/ShapeToolbarController.hxx | 2 connectivity/Library_dbase.mk | 1 connectivity/source/drivers/dbase/DCode.cxx | 122 --------------- connectivity/source/drivers/dbase/DResultSet.cxx | 6 connectivity/source/inc/dbase/DCode.hxx | 62 ------- connectivity/source/inc/dbase/DResultSet.hxx | 1 oox/source/drawingml/table/tableproperties.cxx | 14 - unusedcode.easy | 2 9 files changed, 6 insertions(+), 209 deletions(-)
New commits: commit a7cfc17991ce528eb5ceb80cfab82bfe76a73609 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Apr 4 21:09:58 2015 +0100 and no user of OFILEOperandAttr left now either Change-Id: Ice43b710b16eed79870d561e6dcf14f4a07cad9f diff --git a/connectivity/Library_dbase.mk b/connectivity/Library_dbase.mk index 7e592a0..e383de8 100644 --- a/connectivity/Library_dbase.mk +++ b/connectivity/Library_dbase.mk @@ -42,7 +42,6 @@ $(eval $(call gb_Library_use_libraries,dbase,\ )) $(eval $(call gb_Library_add_exception_objects,dbase,\ - connectivity/source/drivers/dbase/DCode \ connectivity/source/drivers/dbase/DResultSet \ connectivity/source/drivers/dbase/DStatement \ connectivity/source/drivers/dbase/DPreparedStatement \ diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx deleted file mode 100644 index 3052faa..0000000 --- a/connectivity/source/drivers/dbase/DCode.cxx +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- 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 "dbase/DCode.hxx" -#include <com/sun/star/sdbcx/XColumnsSupplier.hpp> -#include "dbase/DIndex.hxx" -#include "dbase/DIndexIter.hxx" - - -using namespace connectivity::dbase; -using namespace connectivity::file; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::sdbcx; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::container; - -TYPEINIT1(OFILEOperandAttr, OOperandAttr); - -OFILEOperandAttr::OFILEOperandAttr(sal_uInt16 _nPos, - const Reference< XPropertySet>& _xColumn, - const Reference< XNameAccess>& _xIndexes) - : OOperandAttr(_nPos,_xColumn) -{ - if(_xIndexes.is()) - { - OUString sName; - Reference<XPropertySetInfo> xColInfo = _xColumn->getPropertySetInfo(); - Reference<XPropertySet> xIndex; - - Sequence< OUString> aSeq = _xIndexes->getElementNames(); - const OUString* pBegin = aSeq.getConstArray(); - const OUString* pEnd = pBegin + aSeq.getLength(); - for(;pBegin != pEnd;++pBegin) - { - _xIndexes->getByName(*pBegin) >>= xIndex; - if(xIndex.is()) - { - Reference<XColumnsSupplier> xColsSup(xIndex,UNO_QUERY); - Reference<XNameAccess> xNameAccess = xColsSup->getColumns(); - _xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sName; - if(xNameAccess->hasByName(sName)) - { - m_xIndex = xIndex; - break; - } - else if(xColInfo->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME))) - { - _xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME)) >>= sName; - if(xNameAccess->hasByName(sName)) - { - m_xIndex = xIndex; - break; - } - } - } - } - } - -} - -bool OFILEOperandAttr::isIndexed() const -{ - return m_xIndex.is(); -} - -OEvaluateSet* OFILEOperandAttr::preProcess(OBoolOperator* pOp, OOperand* pRight) -{ - OEvaluateSet* pEvaluateSet = NULL; - if (isIndexed()) - { - Reference<XUnoTunnel> xTunnel(m_xIndex,UNO_QUERY); - if(xTunnel.is()) - { - ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) ); - if(pIndex) - { - OIndexIterator* pIter = pIndex->createIterator(pOp,pRight); - - if (pIter) - { - pEvaluateSet = new OEvaluateSet(); - sal_uIntPtr nRec = pIter->First(); - while (nRec != NODE_NOTFOUND) - { - (*pEvaluateSet)[nRec] = nRec; - nRec = pIter->Next(); - } - } - delete pIter; - } - } - } - return pEvaluateSet; -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index a5d9782..22089c5 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -24,7 +24,6 @@ #include <cppuhelper/supportsservice.hxx> #include "dbase/DIndex.hxx" #include "dbase/DIndexIter.hxx" -#include "dbase/DCode.hxx" #include <comphelper/types.hxx> #include <connectivity/dbexception.hxx> #include "resource/dbase_res.hrc" diff --git a/connectivity/source/inc/dbase/DCode.hxx b/connectivity/source/inc/dbase/DCode.hxx deleted file mode 100644 index 14b815f..0000000 --- a/connectivity/source/inc/dbase/DCode.hxx +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- 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 . - */ -#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_DBASE_DCODE_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_INC_DBASE_DCODE_HXX - -#include "file/fanalyzer.hxx" -#include <com/sun/star/container/XIndexAccess.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include "file/fcode.hxx" - -namespace connectivity -{ - namespace dbase - { - // Attributes from a result row - class OFILEOperandAttr : public file::OOperandAttr - { - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xIndex; - public: - OFILEOperandAttr(sal_uInt16 _nPos, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn, - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xIndexes=NULL); - - virtual bool isIndexed() const SAL_OVERRIDE; - virtual file::OEvaluateSet* preProcess(file::OBoolOperator* pOp, file::OOperand* pRight = 0) SAL_OVERRIDE; - TYPEINFO_OVERRIDE(); - }; - } -} - -#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_DBASE_DCODE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit c614370677d4b0605c061d5380072c4bae50cb6a Author: Caolán McNamara <caol...@redhat.com> Date: Sat Apr 4 21:08:41 2015 +0100 new user of OFILEAnalyzer anymore Change-Id: I8a4e8fc801bae7826d37b9ff29c1535416623f12 diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx index 6e8503d..3052faa 100644 --- a/connectivity/source/drivers/dbase/DCode.cxx +++ b/connectivity/source/drivers/dbase/DCode.cxx @@ -33,14 +33,6 @@ using namespace ::com::sun::star::container; TYPEINIT1(OFILEOperandAttr, OOperandAttr); -OOperandAttr* OFILEAnalyzer::createOperandAttr(sal_Int32 _nPos, - const Reference< XPropertySet>& _xCol, - const Reference< XNameAccess>& _xIndexes) -{ - return new OFILEOperandAttr((sal_uInt16)_nPos,_xCol,_xIndexes); -} - - OFILEOperandAttr::OFILEOperandAttr(sal_uInt16 _nPos, const Reference< XPropertySet>& _xColumn, const Reference< XNameAccess>& _xIndexes) diff --git a/connectivity/source/inc/dbase/DCode.hxx b/connectivity/source/inc/dbase/DCode.hxx index 0208f83..14b815f 100644 --- a/connectivity/source/inc/dbase/DCode.hxx +++ b/connectivity/source/inc/dbase/DCode.hxx @@ -26,21 +26,8 @@ namespace connectivity { - namespace file - { - class OConnection; - } namespace dbase { - class OFILEAnalyzer : public file::OSQLAnalyzer - { - public: - OFILEAnalyzer(file::OConnection* _pConnection) : file::OSQLAnalyzer(_pConnection){} - virtual file::OOperandAttr* createOperandAttr(sal_Int32 _nPos, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xCol, - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xIndexes=NULL) SAL_OVERRIDE; - }; - // Attributes from a result row class OFILEOperandAttr : public file::OOperandAttr { commit a1ea31078fb8d81cc171e2ba4a0e8148692965a8 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Apr 4 21:07:21 2015 +0100 ODbaseResultSet::createAnalyzer never called Change-Id: Iefb2ef68cf769c78f4e41c14a02afc9356e8e495 diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index 260b89d..a5d9782 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -213,11 +213,6 @@ void SAL_CALL ODbaseResultSet::release() throw() return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -OSQLAnalyzer* ODbaseResultSet::createAnalyzer() -{ - return new OFILEAnalyzer(m_pTable->getConnection()); -} - sal_Int32 ODbaseResultSet::getCurrentFilePos() const { return m_pTable->getFilePos(); diff --git a/connectivity/source/inc/dbase/DResultSet.hxx b/connectivity/source/inc/dbase/DResultSet.hxx index 32c2379..b8cf08a 100644 --- a/connectivity/source/inc/dbase/DResultSet.hxx +++ b/connectivity/source/inc/dbase/DResultSet.hxx @@ -47,7 +47,6 @@ namespace connectivity // OPropertySetHelper virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE; virtual bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex) SAL_OVERRIDE; - file::OSQLAnalyzer* createAnalyzer(); public: DECLARE_SERVICE_INFO(); diff --git a/unusedcode.easy b/unusedcode.easy index 8e82437..0e3d322 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -170,7 +170,6 @@ comphelper::OAccessibleImplementationAccess::setStateBit(short, bool) comphelper::detail::ConfigurationWrapper::getGroupReadWrite(std::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&) comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUString const&) const comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(std::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) -connectivity::dbase::ODbaseResultSet::createAnalyzer() connectivity::firebird::release(int&, cppu::OBroadcastHelperVar<cppu::OMultiTypeInterfaceContainerHelper, com::sun::star::uno::Type>&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&, com::sun::star::lang::XComponent*) connectivity::odbc::appendSQLWCHARs(rtl::OUStringBuffer&, wchar_t const*, int) connectivity::sdbcx::OGroup::OGroup(bool) commit 4ecab66a6243e3675c89f925a0856e8e36723ca0 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Apr 4 21:03:20 2015 +0100 ShapeToolbarController::create is unused Change-Id: Ie7612e4599699977ddca1f581eafd6aca4003f5d diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx index 63231e9..46c7cda 100644 --- a/chart2/source/controller/main/ShapeToolbarController.cxx +++ b/chart2/source/controller/main/ShapeToolbarController.cxx @@ -63,11 +63,6 @@ Sequence< OUString > ShapeToolbarController::getSupportedServiceNames() throw (u return getSupportedServiceNames_Static(); } -Reference< uno::XInterface > ShapeToolbarController::create( const Reference< uno::XComponentContext >& xContext ) -{ - return * new ShapeToolbarController( xContext ); -} - ShapeToolbarController::ShapeToolbarController( const Reference< uno::XComponentContext >& xContext ) :m_pToolbarController( NULL ) ,m_nToolBoxId( 1 ) diff --git a/chart2/source/controller/main/ShapeToolbarController.hxx b/chart2/source/controller/main/ShapeToolbarController.hxx index f777dcb..73b98c7 100644 --- a/chart2/source/controller/main/ShapeToolbarController.hxx +++ b/chart2/source/controller/main/ShapeToolbarController.hxx @@ -68,8 +68,6 @@ public: // needed by registration static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException ); static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw(::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::lang::XInitialization diff --git a/unusedcode.easy b/unusedcode.easy index e88e695..8e82437 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -166,7 +166,6 @@ apitest::XTextContent::testGetAnchor() apitest::XTextField::testGetPresentation() basegfx::tools::containsOnlyHorizontalAndVerticalEdges(basegfx::B2DPolyPolygon const&) canvas::createSurfaceProxyManager(boost::shared_ptr<canvas::IRenderModule> const&) -chart::ShapeToolbarController::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) comphelper::OAccessibleImplementationAccess::setStateBit(short, bool) comphelper::detail::ConfigurationWrapper::getGroupReadWrite(std::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&) comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUString const&) const commit ee4317e4cf84b67f9afdba692590c367c1c63a70 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Apr 4 20:58:07 2015 +0100 I wonder if I make this less obscure if coverity will grok it Change-Id: Ie3494fe4cee904d8eec65aa5cad861ab1916e8d9 diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index e71f055..d498233 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -143,12 +143,11 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& pTableStyle->getLastCol().getTextBoldStyle() = textBoldStyle; } - bool CreateTableStyle(TableStyle* &pTableStyle , const OUString& styleId) +TableStyle* CreateTableStyle(const OUString& styleId) { - bool createdTblStyle = false; + TableStyle* pTableStyle = NULL; if(styleId == "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}") { //Medium Style 2 Accenat 1 pTableStyle = new TableStyle(); - createdTblStyle = true; //first row style //fill color and type oox::drawingml::FillPropertiesPtr pFstRowFillProperties( new oox::drawingml::FillProperties ); @@ -185,7 +184,6 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& else if (styleId == "{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}") //Medium Style 2 Accent 2 { pTableStyle = new TableStyle(); - createdTblStyle = true; oox::drawingml::FillPropertiesPtr pFstRowFillProperties( new oox::drawingml::FillProperties ); pFstRowFillProperties->moFillType.set(XML_solidFill); pFstRowFillProperties->maFillColor.setSchemeClr(XML_accent2); @@ -217,11 +215,10 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& else if (styleId == "{C4B1156A-380E-4F78-BDF5-A606A8083BF9}") //Medium Style 4 Accent 4 { pTableStyle = new TableStyle(); - createdTblStyle = true; SetTableStyleProperties(pTableStyle, XML_accent4, XML_dk1, XML_accent4); } - return createdTblStyle; + return pTableStyle; } const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, bool &isCreateTabStyle ) @@ -246,9 +243,10 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt ++aIter; } //if the pptx just has table style id, but no table style content, we will create the table style ourselves - if ( !pTableStyle ) + if (!pTableStyle) { - isCreateTabStyle = CreateTableStyle(pTableStyle , aStyleId); + pTableStyle = CreateTableStyle(aStyleId); + isCreateTabStyle = (pTableStyle != NULL); } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits