Kaydet (Commit) 2b487c2a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields connectivity

Change-Id: I056b36249803982e451b887cc73b49a851144b7e
Reviewed-on: https://gerrit.libreoffice.org/39498Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 054dab1b
......@@ -112,70 +112,26 @@ connectivity/source/drivers/evoab2/EApi.h:122
(anonymous) address_format char *
connectivity/source/drivers/evoab2/EApi.h:126
(anonymous) ext char *
connectivity/source/drivers/evoab2/NPreparedStatement.hxx:51
connectivity::evoab::OEvoabPreparedStatement::Parameter aValue css::uno::Any
connectivity/source/drivers/evoab2/NPreparedStatement.hxx:52
connectivity::evoab::OEvoabPreparedStatement::Parameter nDataType sal_Int32
connectivity/source/drivers/evoab2/NPreparedStatement.hxx:60
connectivity::evoab::OEvoabPreparedStatement m_aParameters std::vector<Parameter>
connectivity/source/drivers/evoab2/NResultSet.hxx:91
connectivity::evoab::OEvoabResultSet m_aStatement css::uno::WeakReferenceHelper
connectivity/source/drivers/evoab2/NStatement.hxx:58
connectivity::evoab::FieldSort bAscending _Bool
connectivity/source/drivers/evoab2/NTable.hxx:34
connectivity::evoab::OEvoabTable m_xMetaData css::uno::Reference<css::sdbc::XDatabaseMetaData>
connectivity/source/drivers/mork/MDatabaseMetaData.hxx:29
connectivity::mork::ODatabaseMetaData m_pMetaDataHelper std::unique_ptr<MDatabaseMetaDataHelper>
connectivity/source/drivers/mork/MorkParser.hxx:133
MorkParser error_ enum MorkErrors
connectivity/source/drivers/mork/MResultSet.hxx:232
connectivity::mork::OResultSet m_nUpdatedRow sal_Int32
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx:55
connectivity::mozab::ProfileStruct product enum com::sun::star::mozilla::MozillaProductType
connectivity/source/inc/dbase/DTable.hxx:62
connectivity::dbase::ODbaseTable::DBFHeader dateElems sal_uInt8 [3]
connectivity/source/inc/dbase/DTable.hxx:86
connectivity::dbase::ODbaseTable::DBFColumn db_adr sal_uInt32
connectivity/source/inc/file/fcomp.hxx:46
connectivity::file::OPredicateCompiler m_bORCondition _Bool
connectivity/source/inc/file/FConnection.hxx:63
connectivity::file::OConnection m_bClosed _Bool
connectivity/source/inc/file/FResultSet.hxx:116
connectivity::file::OResultSet m_bEOF _Bool
connectivity/source/inc/odbc/ODatabaseMetaData.hxx:41
connectivity::odbc::ODatabaseMetaData m_bOdbc3 _Bool
connectivity/source/inc/odbc/OResultSet.hxx:147
connectivity::odbc::OResultSet m_bInserting _Bool
connectivity/source/inc/OTypeInfo.hxx:31
connectivity::OTypeInfo aTypeName class rtl::OUString
connectivity/source/inc/OTypeInfo.hxx:32
connectivity::OTypeInfo aLiteralPrefix class rtl::OUString
connectivity/source/inc/OTypeInfo.hxx:33
connectivity::OTypeInfo aLiteralSuffix class rtl::OUString
connectivity/source/inc/OTypeInfo.hxx:34
connectivity::OTypeInfo aCreateParams class rtl::OUString
connectivity/source/inc/OTypeInfo.hxx:35
connectivity::OTypeInfo aLocalTypeName class rtl::OUString
connectivity/source/inc/OTypeInfo.hxx:37
connectivity::OTypeInfo nPrecision sal_Int32
connectivity/source/inc/OTypeInfo.hxx:39
connectivity::OTypeInfo nMaximumScale sal_Int16
connectivity/source/inc/OTypeInfo.hxx:40
connectivity::OTypeInfo nMinimumScale sal_Int16
connectivity/source/inc/OTypeInfo.hxx:43
connectivity::OTypeInfo nSearchType sal_Int16
connectivity/source/inc/OTypeInfo.hxx:44
connectivity::OTypeInfo nNumPrecRadix sal_Int16
connectivity/source/inc/OTypeInfo.hxx:46
connectivity::OTypeInfo bCurrency _Bool
connectivity/source/inc/OTypeInfo.hxx:47
connectivity::OTypeInfo bAutoIncrement _Bool
connectivity/source/inc/OTypeInfo.hxx:48
connectivity::OTypeInfo bNullable _Bool
connectivity/source/inc/OTypeInfo.hxx:49
connectivity::OTypeInfo bCaseSensitive _Bool
connectivity/source/inc/OTypeInfo.hxx:50
connectivity::OTypeInfo bUnsigned _Bool
cppcanvas/source/mtfrenderer/emfpbrush.hxx:102
cppcanvas::internal::EMFPBrush wrapMode sal_Int32
cppcanvas/source/mtfrenderer/emfppen.hxx:41
......
......@@ -440,24 +440,23 @@ void OConnection::buildTypeInfo()
aInfo->eType = adVarWChar;
aInfo->aSimpleType.nType = (sal_Int16)ADOS::MapADOType2Jdbc(aInfo->eType);
aInfo->aSimpleType.nPrecision = ADOS::getField(pRecordset,nPos++).get_Value().getInt32();
aInfo->aSimpleType.aLiteralPrefix = ADOS::getField(pRecordset,nPos++).get_Value().getString();
aInfo->aSimpleType.aLiteralSuffix = ADOS::getField(pRecordset,nPos++).get_Value().getString();
aInfo->aSimpleType.aCreateParams = ADOS::getField(pRecordset,nPos++).get_Value().getString();
aInfo->aSimpleType.bNullable = ADOS::getField(pRecordset,nPos++).get_Value().getBool();
aInfo->aSimpleType.bCaseSensitive = ADOS::getField(pRecordset,nPos++).get_Value().getBool();
aInfo->aSimpleType.nSearchType = ADOS::getField(pRecordset,nPos++).get_Value().getInt16();
aInfo->aSimpleType.bUnsigned = ADOS::getField(pRecordset,nPos++).get_Value().getBool();
aInfo->aSimpleType.bCurrency = ADOS::getField(pRecordset,nPos++).get_Value().getBool();
aInfo->aSimpleType.bAutoIncrement = ADOS::getField(pRecordset,nPos++).get_Value().getBool();
nPos++; // aLiteralPrefix
nPos++; // aLiteralSuffix
nPos++; // aCreateParams
nPos++; // bNullable
nPos++; // bCaseSensitive
nPos++; // nSearchType
nPos++; // bUnsigned
nPos++; // bCurrency
nPos++; // bAutoIncrement
aInfo->aSimpleType.aLocalTypeName = ADOS::getField(pRecordset,nPos++).get_Value().getString();
aInfo->aSimpleType.nMinimumScale = ADOS::getField(pRecordset,nPos++).get_Value().getInt16();
nPos++; // nMinimumScale
aInfo->aSimpleType.nMaximumScale = ADOS::getField(pRecordset,nPos++).get_Value().getInt16();
if ( adCurrency == aInfo->eType && !aInfo->aSimpleType.nMaximumScale)
{
aInfo->aSimpleType.nMinimumScale = 4;
aInfo->aSimpleType.nMaximumScale = 4;
}
aInfo->aSimpleType.nNumPrecRadix = ADOS::getField(pRecordset,nPos++).get_Value().getInt16();
nPos++; // nNumPrecRadix
// Now that we have the type info, save it
// in the Hashtable if we don't already have an
// entry for this SQL type.
......
......@@ -58,7 +58,6 @@ typedef connectivity::OMetaConnection OConnection_BASE;
OConnection::OConnection(OFileDriver* _pDriver)
: OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
, m_pDriver(_pDriver)
, m_bClosed(false)
, m_bAutoCommit(false)
, m_bReadOnly(false)
, m_bShowDeleted(false)
......@@ -369,9 +368,8 @@ void OConnection::disposing()
::osl::MutexGuard aGuard(m_aMutex);
OConnection_BASE::disposing();
m_bClosed = true;
m_xDir.clear();
m_xContent.clear();
m_xDir.clear();
m_xContent.clear();
m_xCatalog = WeakReference< XTablesSupplier>();
dispose_ChildImpl();
......
......@@ -95,7 +95,6 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte
,m_nRowCountResult(-1)
,m_nColumnCount(0)
,m_bWasNull(false)
,m_bEOF(false)
,m_bInserted(false)
,m_bRowUpdated(false)
,m_bRowInserted(false)
......@@ -394,7 +393,6 @@ void SAL_CALL OResultSet::afterLast( )
if(last())
next();
m_bEOF = true;
}
......@@ -1039,7 +1037,6 @@ bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOff
}
else
{
m_bEOF = true;
m_nRowPos = 1;
return false;
}
......
......@@ -47,7 +47,6 @@ using namespace com::sun::star;
OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs)
: m_pAnalyzer(pAnalyzer)
, m_nParamCounter(0)
, m_bORCondition(false)
{
}
......@@ -154,7 +153,6 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
if (SQL_ISTOKEN(pPredicateNode->getChild(1),OR)) // OR-Operator
{
m_aCodeList.push_back(new OOp_OR);
m_bORCondition = true;
}
else if (SQL_ISTOKEN(pPredicateNode->getChild(1),AND)) // AND-Operator
m_aCodeList.push_back(new OOp_AND);
......
......@@ -898,19 +898,19 @@ void Connection::buildTypeInfo()
aInfo.aTypeName = xRow->getString (1);
aInfo.nType = xRow->getShort (2);
aInfo.nPrecision = xRow->getInt (3);
aInfo.aLiteralPrefix = xRow->getString (4);
aInfo.aLiteralSuffix = xRow->getString (5);
aInfo.aCreateParams = xRow->getString (6);
aInfo.bNullable = xRow->getBoolean (7);
aInfo.bCaseSensitive = xRow->getBoolean (8);
aInfo.nSearchType = xRow->getShort (9);
aInfo.bUnsigned = xRow->getBoolean (10);
aInfo.bCurrency = xRow->getBoolean (11);
aInfo.bAutoIncrement = xRow->getBoolean (12);
// aLiteralPrefix = xRow->getString (4);
// aLiteralSuffix = xRow->getString (5);
// aCreateParams = xRow->getString (6);
// bNullable = xRow->getBoolean (7);
// bCaseSensitive = xRow->getBoolean (8);
// nSearchType = xRow->getShort (9);
// bUnsigned = xRow->getBoolean (10);
// bCurrency = xRow->getBoolean (11);
// bAutoIncrement = xRow->getBoolean (12);
aInfo.aLocalTypeName = xRow->getString (13);
aInfo.nMinimumScale = xRow->getShort (14);
// nMinimumScale = xRow->getShort (14);
aInfo.nMaximumScale = xRow->getShort (15);
aInfo.nNumPrecRadix = (sal_Int16)xRow->getInt(18);
// nNumPrecRadix = (sal_Int16)xRow->getInt(18);
// Now that we have the type info, save it
......
......@@ -82,7 +82,6 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const std::shared_ptr< connectiv
,m_nParamIndex(0)
,m_bIsAlwaysFalseQuery(false)
,m_pKeySet(nullptr)
,m_nUpdatedRow(0)
,m_bIsReadOnly(TRISTATE_INDET)
{
//m_aQuery.setMaxNrOfReturns(pStmt->getOwnConnection()->getMaxResultRecords());
......@@ -1538,8 +1537,6 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x)
(m_aRow->get())[columnIndex].setBound(true);
(m_aRow->get())[columnIndex] = x;
m_nUpdatedRow = getCurrentCardNumber();
// m_RowStates = m_RowStates | RowStates_Updated;
}
......@@ -1556,8 +1553,6 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex )
(m_aRow->get())[columnIndex].setBound(true);
(m_aRow->get())[columnIndex].setNull();
m_nUpdatedRow = getCurrentCardNumber();
// m_RowStates = m_RowStates | RowStates_Updated;
}
......
......@@ -229,7 +229,6 @@ protected:
sal_Int32 m_nParamIndex;
bool m_bIsAlwaysFalseQuery;
::rtl::Reference<OKeySet> m_pKeySet;
sal_Int32 m_nUpdatedRow; //updated row
TriState m_bIsReadOnly;
void resetParameters() { m_nParamIndex = 0; }
......
......@@ -27,15 +27,12 @@ namespace connectivity
namespace mozab
{
ProfileStruct::ProfileStruct()
: product(css::mozilla::MozillaProductType_Default)
{
}
ProfileStruct::ProfileStruct(MozillaProductType aProduct,
const OUString& aProfileName,
ProfileStruct::ProfileStruct(const OUString& aProfileName,
const OUString& aProfilePath)
: product(aProduct)
, profileName(aProfileName)
: profileName(aProfileName)
, profilePath(aProfilePath)
{
}
......@@ -128,7 +125,7 @@ namespace connectivity
fullProfilePath = profilePath;
}
rProduct.mProfileList[profileName] = ProfileStruct(product,profileName,fullProfilePath);
rProduct.mProfileList[profileName] = ProfileStruct(profileName,fullProfilePath);
sal_Int32 isDefault = 0;
if (!sIsDefault.isEmpty())
......
......@@ -48,11 +48,10 @@ namespace connectivity
{
public:
ProfileStruct();
ProfileStruct(MozillaProductType aProduct, const OUString& aProfileName, const OUString &aProfilePath);
ProfileStruct(const OUString& aProfileName, const OUString &aProfilePath);
const OUString& getProfileName() const { return profileName;}
const OUString& getProfilePath() const;
private:
MozillaProductType product;
OUString profileName;
OUString profilePath;
};
......
......@@ -41,7 +41,6 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon
,m_aConnectionHandle(_pHandle)
,m_pConnection(_pCon)
,m_bUseCatalog(true)
,m_bOdbc3(true)
{
OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!");
if(!m_pConnection->isCatalogUsed())
......@@ -50,8 +49,6 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon
try
{
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
OUString sVersion = getDriverVersion();
m_bOdbc3 = sVersion != "02.50" && sVersion != "02.00";
}
catch(SQLException& )
{ // doesn't matter here
......
......@@ -97,7 +97,6 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
,m_nCurrentFetchState(0)
,m_bWasNull(true)
,m_bEOF(true)
,m_bInserting(false)
,m_bRowInserted(false)
,m_bRowDeleted(false)
,m_bUseFetchScroll(false)
......@@ -987,7 +986,6 @@ void SAL_CALL OResultSet::moveToInsertRow( )
// first unbound all columns
OSL_VERIFY( unbind() == SQL_SUCCESS );
// SQLRETURN nRet = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE ,(SQLPOINTER)1,SQL_IS_INTEGER);
m_bInserting = true;
}
......
......@@ -29,38 +29,18 @@ namespace connectivity
struct OTypeInfo
{
OUString aTypeName; // Name of the type in the database
OUString aLiteralPrefix; // Prefix for quoting
OUString aLiteralSuffix; // Suffix for quoting
OUString aCreateParams; // Parameter for creating
OUString aLocalTypeName;
sal_Int32 nPrecision; // Length of the type
sal_Int16 nMaximumScale; // Decimal places
sal_Int16 nMinimumScale; // Minimum decimal places
sal_Int16 nType; // Database type
sal_Int16 nSearchType; // Can we search for the type?
sal_Int16 nNumPrecRadix; // indicating the radix, which is usually 2 or 10
bool bCurrency : 1; // Currency
bool bAutoIncrement : 1; // Is it an autoincrementing field?
bool bNullable : 1; // Can the field be NULL?
bool bCaseSensitive : 1; // Is the type case sensitive?
bool bUnsigned : 1; // Is the type unsigned?
OTypeInfo()
:nPrecision(0)
,nMaximumScale(0)
,nMinimumScale(0)
,nType( css::sdbc::DataType::OTHER)
,nSearchType( css::sdbc::ColumnSearch::FULL)
,nNumPrecRadix(0)
,bCurrency(false)
,bAutoIncrement(false)
,bNullable(true)
,bCaseSensitive(false)
,bUnsigned(false)
{}
static void * SAL_CALL operator new( size_t nSize )
......
......@@ -60,13 +60,12 @@ namespace connectivity
css::uno::Reference< css::ucb::XDynamicResultSet > m_xDir; // directory
css::uno::Reference< css::ucb::XContent> m_xContent;
bool m_bClosed;
bool m_bAutoCommit;
bool m_bReadOnly;
bool m_bShowDeleted;
bool m_bCaseSensitiveExtension;
bool m_bCheckSQL92;
bool m_bDefaultTextEncoding;
bool m_bDefaultTextEncoding;
void throwUrlNotValid(const OUString & _rsUrl,const OUString & _rsMessage);
......
......@@ -113,7 +113,6 @@ namespace connectivity
sal_Int32 m_nRowCountResult;
sal_Int32 m_nColumnCount;
bool m_bWasNull;
bool m_bEOF; // after last record
bool m_bInserted; // true when moveToInsertRow was called
// set to false when cursor moved or cancel
bool m_bRowUpdated;
......
......@@ -43,7 +43,6 @@ namespace connectivity
OSQLAnalyzer* m_pAnalyzer;
css::uno::Reference< css::container::XNameAccess> m_xIndexes;
sal_Int32 m_nParamCounter;
bool m_bORCondition;
public:
OPredicateCompiler(OSQLAnalyzer* pAnalyzer);
......
......@@ -37,8 +37,7 @@ namespace connectivity
{
SQLHANDLE m_aConnectionHandle;
OConnection* m_pConnection;
bool m_bUseCatalog;
bool m_bOdbc3;
bool m_bUseCatalog;
// cached database information
virtual OUString impl_getIdentifierQuoteString_throw( ) override;
......
......@@ -144,7 +144,6 @@ namespace connectivity
SQLRETURN m_nCurrentFetchState;
bool m_bWasNull;
bool m_bEOF; // after last record
bool m_bInserting;
bool m_bRowInserted;
bool m_bRowDeleted;
bool m_bUseFetchScroll;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment