summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-04 11:40:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-04 14:51:07 +0200
commiteeb1030c6455d4b45bdd4e535a3eafd809716e54 (patch)
treea4ef1f47835c5e6fb0ba4f46948e433c7c9f59c4 /dbaccess
parent3054a8c1c148aee9cb3feaa4e7b5edee010deead (diff)
loplugin:unusedfields in cui..idl
Change-Id: Icb393cc0b2f79ded154e186ab6975b95e5126903 Reviewed-on: https://gerrit.libreoffice.org/39496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/inc/TypeInfo.hxx8
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx4
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.hxx5
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx47
6 files changed, 7 insertions, 73 deletions
diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx
index 66eb7df7d712..a7dc3f75091c 100644
--- a/dbaccess/source/ui/inc/TypeInfo.hxx
+++ b/dbaccess/source/ui/inc/TypeInfo.hxx
@@ -81,11 +81,9 @@ const sal_uInt16 TYPE_BIT = 31;
sal_Int16 nSearchType; // if it is possible to search for type
- bool bCurrency : 1, // currency
+ bool bCurrency : 1, // currency
bAutoIncrement : 1, // if automatic incrementing field
- bNullable : 1, // if field can be NULL
- bCaseSensitive : 1, // if type is case sensitive
- bUnsigned : 1; // if type is unsigned
+ bNullable : 1; // if field can be NULL
OTypeInfo()
:nPrecision(0)
@@ -97,8 +95,6 @@ const sal_uInt16 TYPE_BIT = 31;
,bCurrency(false)
,bAutoIncrement(false)
,bNullable(true)
- ,bCaseSensitive(false)
- ,bUnsigned(false)
{}
const OUString& getDBName() const { return aTypeName; }
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 630421578240..45b514eed4d2 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -234,13 +234,13 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
m_pTypeInfo->bNullable = (sal_Int32)aValue == ColumnValue::NULLABLE;
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
- m_pTypeInfo->bCaseSensitive = aValue;
+ // bCaseSensitive
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
m_pTypeInfo->nSearchType = aValue;
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
- m_pTypeInfo->bUnsigned = aValue;
+ // bUnsigned
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
m_pTypeInfo->bCurrency = aValue;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 2149c6eb234d..23bbdaf58275 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -479,13 +479,13 @@ void fillTypeInfo( const Reference< css::sdbc::XConnection>& _rxConnection,
pInfo->bNullable = (sal_Int32)aValue == ColumnValue::NULLABLE;
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
- pInfo->bCaseSensitive = (bool)aValue;
+ // bCaseSensitive
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
pInfo->nSearchType = aValue;
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
- pInfo->bUnsigned = (bool)aValue;
+ // bUnsigned
++nPos;
aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow);
pInfo->bCurrency = (bool)aValue;
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
index bfecb4906cde..d7e8ad467b9c 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
@@ -29,8 +29,6 @@ OQueryTableConnectionData::OQueryTableConnectionData()
, m_nDestEntryIndex(0)
, m_eJoinType (INNER_JOIN)
, m_bNatural(false)
- , m_eFromType(TAB_NORMAL_FIELD)
- , m_eDestType(TAB_NORMAL_FIELD)
{
}
@@ -40,10 +38,7 @@ OQueryTableConnectionData::OQueryTableConnectionData( const OQueryTableConnectio
, m_nDestEntryIndex(rConnData.m_nDestEntryIndex)
, m_eJoinType(rConnData.m_eJoinType)
, m_bNatural(rConnData.m_bNatural)
- , m_eFromType(rConnData.m_eFromType)
- , m_eDestType(rConnData.m_eDestType)
{
-
}
OQueryTableConnectionData::OQueryTableConnectionData(const TTableWindowData::value_type& _pReferencingTable,
@@ -53,8 +48,6 @@ OQueryTableConnectionData::OQueryTableConnectionData(const TTableWindowData::val
, m_nDestEntryIndex(0)
, m_eJoinType (INNER_JOIN)
, m_bNatural(false)
- , m_eFromType(TAB_NORMAL_FIELD)
- , m_eDestType(TAB_NORMAL_FIELD)
{
}
@@ -84,8 +77,6 @@ OQueryTableConnectionData& OQueryTableConnectionData::operator=(const OQueryTabl
m_nFromEntryIndex = rConnData.m_nFromEntryIndex;
m_nDestEntryIndex = rConnData.m_nDestEntryIndex;
- m_eFromType = rConnData.m_eFromType;
- m_eDestType = rConnData.m_eDestType;
m_eJoinType = rConnData.m_eJoinType;
m_bNatural = rConnData.m_bNatural;
@@ -111,9 +102,6 @@ void OQueryTableConnectionData::InitFromDrag(const OTableFieldDescRef& rDragLeft
SetFieldIndex(JTCS_FROM, rDragLeft->GetFieldIndex());
SetFieldIndex(JTCS_TO, rDragRight->GetFieldIndex());
- SetFieldType(JTCS_FROM, rDragLeft->GetFieldType());
- SetFieldType(JTCS_TO, rDragRight->GetFieldType());
-
AppendConnLine(rDragLeft->GetField(), rDragRight->GetField());
}
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
index c7137eb5e81b..4ff60d1c3a03 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
@@ -32,9 +32,6 @@ namespace dbaui
EJoinType m_eJoinType;
bool m_bNatural;
- ETableFieldType m_eFromType;
- ETableFieldType m_eDestType;
-
protected:
// for creation and duplication of lines of own type
virtual OConnectionLineDataRef CreateLineDataObj() override;
@@ -61,8 +58,6 @@ namespace dbaui
sal_Int32 GetFieldIndex(EConnectionSide nWhich) const { return nWhich==JTCS_TO ? m_nDestEntryIndex : m_nFromEntryIndex; }
void SetFieldIndex(EConnectionSide nWhich, sal_Int32 nVal) { if (nWhich==JTCS_TO) m_nDestEntryIndex=nVal; else m_nFromEntryIndex=nVal; }
- void SetFieldType(EConnectionSide nWhich, ETableFieldType eType) { if (nWhich==JTCS_TO) m_eDestType=eType; else m_eFromType=eType; }
-
void InitFromDrag(const OTableFieldDescRef& rDragLeft, const OTableFieldDescRef& rDragRight);
EJoinType GetJoinType() const { return m_eJoinType; };
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index ce4ac928d7c8..4d84cd288de2 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -60,39 +60,6 @@ using namespace ::com::sun::star::accessibility;
namespace
{
- bool isColumnInKeyType(const Reference<XIndexAccess>& _rxKeys,const OUString& _rColumnName,sal_Int32 _nKeyType)
- {
- bool bReturn = false;
- if(_rxKeys.is())
- {
- Reference<XColumnsSupplier> xColumnsSupplier;
- // search the one and only primary key
- const sal_Int32 nCount = _rxKeys->getCount();
- for(sal_Int32 i=0;i< nCount;++i)
- {
- Reference<XPropertySet> xProp(_rxKeys->getByIndex(i),UNO_QUERY);
- if(xProp.is())
- {
- sal_Int32 nKeyType = 0;
- xProp->getPropertyValue(PROPERTY_TYPE) >>= nKeyType;
- if(_nKeyType == nKeyType)
- {
- xColumnsSupplier.set(xProp,UNO_QUERY);
- if(xColumnsSupplier.is())
- {
- Reference<XNameAccess> xColumns = xColumnsSupplier->getColumns();
- if(xColumns.is() && xColumns->hasByName(_rColumnName))
- {
- bReturn = true;
- break;
- }
- }
- }
- }
- }
- }
- return bReturn;
- }
/** appends a new TabAdd Undo action at controller
@param _pView the view which we use
@param _pUndoAction the undo action which should be added
@@ -183,10 +150,7 @@ namespace
continue;
}
- pNewConnData->SetFieldType(JTCS_FROM,TAB_NORMAL_FIELD);
-
xColumn->getPropertyValue(PROPERTY_RELATEDCOLUMN) >>= sRelatedColumn;
- pNewConnData->SetFieldType(JTCS_TO,isColumnInKeyType(xReferencedKeys,sRelatedColumn,KeyType::PRIMARY) ? TAB_PRIMARY_FIELD : TAB_NORMAL_FIELD);
{
Sequence< sal_Int16> aFind(::comphelper::findValue(_rSource.GetOriginalColumns()->getElementNames(),*pIter,true));
@@ -593,26 +557,17 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
TTableConnectionData::value_type aNewConnectionData(pNewConnectionData);
sal_uInt32 nSourceFieldIndex, nDestFieldIndex;
- ETableFieldType eSourceFieldType, eDestFieldType;
- // Get name/position/type of both affected fields ...
+ // Get name/position of both affected fields ...
// Source
-
nSourceFieldIndex = jxdSource.pListBox->GetModel()->GetAbsPos(jxdSource.pEntry);
- eSourceFieldType = static_cast< OTableFieldInfo*>(jxdSource.pEntry->GetUserData())->GetKeyType();
-
// Dest
-
nDestFieldIndex = jxdDest.pListBox->GetModel()->GetAbsPos(jxdDest.pEntry);
- eDestFieldType = static_cast< OTableFieldInfo*>(jxdDest.pEntry->GetUserData())->GetKeyType();
// ... and set them
pNewConnectionData->SetFieldIndex(JTCS_FROM, nSourceFieldIndex);
pNewConnectionData->SetFieldIndex(JTCS_TO, nDestFieldIndex);
- pNewConnectionData->SetFieldType(JTCS_FROM, eSourceFieldType);
- pNewConnectionData->SetFieldType(JTCS_TO, eDestFieldType);
-
pNewConnectionData->AppendConnLine( aSourceFieldName,aDestFieldName );
ScopedVclPtrInstance< OQueryTableConnection > aNewConnection(this, aNewConnectionData);