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

loplugin:unusedfields in jvmfwk..mysqlc

Change-Id: If9c7a3239fceba9a2db3a5905ccaa7fa9adadb08
Reviewed-on: https://gerrit.libreoffice.org/39099Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 0f347c04
...@@ -316,8 +316,6 @@ class AsynchReader: public salhelper::Thread ...@@ -316,8 +316,6 @@ class AsynchReader: public salhelper::Thread
size_t m_nDataSize; size_t m_nDataSize;
std::unique_ptr<sal_Char[]> m_arData; std::unique_ptr<sal_Char[]> m_arData;
bool m_bError;
bool m_bDone;
FileHandleGuard m_aGuard; FileHandleGuard m_aGuard;
virtual ~AsynchReader() override {} virtual ~AsynchReader() override {}
...@@ -336,8 +334,8 @@ public: ...@@ -336,8 +334,8 @@ public:
}; };
AsynchReader::AsynchReader(oslFileHandle & rHandle): AsynchReader::AsynchReader(oslFileHandle & rHandle):
Thread("jvmfwkAsyncReader"), m_nDataSize(0), m_bError(false), Thread("jvmfwkAsyncReader"), m_nDataSize(0),
m_bDone(false), m_aGuard(rHandle) m_aGuard(rHandle)
{ {
} }
...@@ -363,13 +361,11 @@ void AsynchReader::execute() ...@@ -363,13 +361,11 @@ void AsynchReader::execute()
case osl_File_E_None: case osl_File_E_None:
break; break;
default: default:
m_bError = true;
return; return;
} }
if (nRead == 0) if (nRead == 0)
{ {
m_bDone = true;
break; break;
} }
else if (nRead <= BUFFER_SIZE) else if (nRead <= BUFFER_SIZE)
......
...@@ -43,7 +43,6 @@ typedef std::vector< OString* > LngLineList; ...@@ -43,7 +43,6 @@ typedef std::vector< OString* > LngLineList;
class LngParser class LngParser
{ {
private: private:
sal_uInt16 nError;
LngLineList *pLines; LngLineList *pLines;
OString sSource; OString sSource;
std::vector<OString> aLanguages; std::vector<OString> aLanguages;
......
...@@ -49,8 +49,7 @@ void lcl_RemoveUTF8ByteOrderMarker( OString &rString ) ...@@ -49,8 +49,7 @@ void lcl_RemoveUTF8ByteOrderMarker( OString &rString )
// class LngParser // class LngParser
LngParser::LngParser(const OString &rLngFile) LngParser::LngParser(const OString &rLngFile)
: nError( LNG_OK ) : pLines( nullptr )
, pLines( nullptr )
, sSource( rLngFile ) , sSource( rLngFile )
{ {
pLines = new LngLineList; pLines = new LngLineList;
...@@ -76,8 +75,6 @@ LngParser::LngParser(const OString &rLngFile) ...@@ -76,8 +75,6 @@ LngParser::LngParser(const OString &rLngFile)
} }
pLines->push_back( new OString() ); pLines->push_back( new OString() );
} }
else
nError = LNG_COULD_NOT_OPEN;
} }
LngParser::~LngParser() LngParser::~LngParser()
...@@ -166,10 +163,6 @@ bool LngParser::Merge( ...@@ -166,10 +163,6 @@ bool LngParser::Merge(
{ {
std::ofstream aDestination( std::ofstream aDestination(
rDestinationFile.getStr(), std::ios_base::out | std::ios_base::trunc); rDestinationFile.getStr(), std::ios_base::out | std::ios_base::trunc);
if (!aDestination.is_open()) {
nError = LNG_COULD_NOT_OPEN;
}
nError = LNG_OK;
MergeDataFile aMergeDataFile( rPOFile, sSource, false, true ); MergeDataFile aMergeDataFile( rPOFile, sSource, false, true );
if( rLanguage.equalsIgnoreAsciiCase("ALL") ) if( rLanguage.equalsIgnoreAsciiCase("ALL") )
......
...@@ -3282,7 +3282,6 @@ lok_doc_view_open_document (LOKDocView* pDocView, ...@@ -3282,7 +3282,6 @@ lok_doc_view_open_document (LOKDocView* pDocView,
GError* error = nullptr; GError* error = nullptr;
LOEvent* pLOEvent = new LOEvent(LOK_LOAD_DOC); LOEvent* pLOEvent = new LOEvent(LOK_LOAD_DOC);
pLOEvent->m_pPath = pPath;
priv->m_aDocPath = pPath; priv->m_aDocPath = pPath;
if (pRenderingArguments) if (pRenderingArguments)
......
...@@ -180,11 +180,6 @@ struct LOEvent ...@@ -180,11 +180,6 @@ struct LOEvent
gboolean m_bNotifyWhenFinished; gboolean m_bNotifyWhenFinished;
///@} ///@}
/// @name open_document parameter
///@{
const gchar* m_pPath;
///@}
/// set_edit parameter /// set_edit parameter
gboolean m_bEdit; gboolean m_bEdit;
...@@ -240,7 +235,6 @@ struct LOEvent ...@@ -240,7 +235,6 @@ struct LOEvent
, m_pCommand(nullptr) , m_pCommand(nullptr)
, m_pArguments(nullptr) , m_pArguments(nullptr)
, m_bNotifyWhenFinished(false) , m_bNotifyWhenFinished(false)
, m_pPath(nullptr)
, m_bEdit(false) , m_bEdit(false)
, m_nPartMode(0) , m_nPartMode(0)
, m_nPart(0) , m_nPart(0)
......
...@@ -179,12 +179,11 @@ ConvDic::ConvDic( ...@@ -179,12 +179,11 @@ ConvDic::ConvDic(
bNeedEntries = true; bNeedEntries = true;
bIsModified = bIsActive = false; bIsModified = bIsActive = false;
bIsReadonly = false;
if( !rMainURL.isEmpty() ) if( !rMainURL.isEmpty() )
{ {
bool bExists = false; bool bExists = false;
bIsReadonly = IsReadOnly( rMainURL, &bExists ); IsReadOnly( rMainURL, &bExists );
if( !bExists ) // new empty dictionary if( !bExists ) // new empty dictionary
{ {
...@@ -193,7 +192,6 @@ ConvDic::ConvDic( ...@@ -193,7 +192,6 @@ ConvDic::ConvDic(
//! that could be found by the dictionary-list implementation //! that could be found by the dictionary-list implementation
// (Note: empty dictionaries are not just empty files!) // (Note: empty dictionaries are not just empty files!)
Save(); Save();
bIsReadonly = IsReadOnly( rMainURL ); // will be sal_False if Save was successful
} }
} }
else else
......
...@@ -77,7 +77,6 @@ protected: ...@@ -77,7 +77,6 @@ protected:
bool bNeedEntries; bool bNeedEntries;
bool bIsModified; bool bIsModified;
bool bIsActive; bool bIsActive;
bool bIsReadonly;
// disallow copy-constructor and assignment-operator for now // disallow copy-constructor and assignment-operator for now
ConvDic(const ConvDic &); ConvDic(const ConvDic &);
......
...@@ -125,14 +125,12 @@ class ConvDicXMLEntryTextContext_Impl : ...@@ -125,14 +125,12 @@ class ConvDicXMLEntryTextContext_Impl :
public ConvDicXMLImportContext public ConvDicXMLImportContext
{ {
OUString aLeftText; OUString aLeftText;
sal_Int16 nPropertyType; // used for Chinese simplified/traditional conversion
public: public:
ConvDicXMLEntryTextContext_Impl( ConvDicXMLEntryTextContext_Impl(
ConvDicXMLImport &rImport, ConvDicXMLImport &rImport,
sal_uInt16 nPrefix, const OUString& rLName ) : sal_uInt16 nPrefix, const OUString& rLName ) :
ConvDicXMLImportContext( rImport, nPrefix, rLName ), ConvDicXMLImportContext( rImport, nPrefix, rLName )
nPropertyType( ConversionPropertyType::NOT_DEFINED )
{ {
} }
...@@ -256,8 +254,6 @@ void ConvDicXMLEntryTextContext_Impl::StartElement( ...@@ -256,8 +254,6 @@ void ConvDicXMLEntryTextContext_Impl::StartElement(
if ( nPrefix == XML_NAMESPACE_TCD && aLocalName == "left-text" ) if ( nPrefix == XML_NAMESPACE_TCD && aLocalName == "left-text" )
aLeftText = aValue; aLeftText = aValue;
if ( nPrefix == XML_NAMESPACE_TCD && aLocalName == "property-type" )
nPropertyType = (sal_Int16) aValue.toInt32();
} }
} }
......
...@@ -67,7 +67,6 @@ OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver * _cppDriver) ...@@ -67,7 +67,6 @@ OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver * _cppDriver)
,m_xMetaData(nullptr) ,m_xMetaData(nullptr)
,m_rDriver(_rDriver) ,m_rDriver(_rDriver)
,cppDriver(_cppDriver) ,cppDriver(_cppDriver)
,m_bClosed(false)
{ {
m_rDriver.acquire(); m_rDriver.acquire();
} }
...@@ -507,7 +506,6 @@ void OConnection::disposing() ...@@ -507,7 +506,6 @@ void OConnection::disposing()
} }
m_aStatements.clear(); m_aStatements.clear();
m_bClosed = true;
m_xMetaData = WeakReference< XDatabaseMetaData >(); m_xMetaData = WeakReference< XDatabaseMetaData >();
dispose_ChildImpl(); dispose_ChildImpl();
......
...@@ -108,8 +108,6 @@ namespace connectivity ...@@ -108,8 +108,6 @@ namespace connectivity
MysqlCDriver& m_rDriver; // Pointer to the owning driver object MysqlCDriver& m_rDriver; // Pointer to the owning driver object
sql::Driver* cppDriver; sql::Driver* cppDriver;
bool m_bClosed;
public: public:
/// @throws SQLException /// @throws SQLException
/// @throws RuntimeException /// @throws RuntimeException
......
...@@ -78,13 +78,9 @@ void lcl_setRows_throw(const Reference< XResultSet >& _xResultSet,sal_Int32 _nTy ...@@ -78,13 +78,9 @@ void lcl_setRows_throw(const Reference< XResultSet >& _xResultSet,sal_Int32 _nTy
ODatabaseMetaData::ODatabaseMetaData(OConnection& _rCon) ODatabaseMetaData::ODatabaseMetaData(OConnection& _rCon)
:m_rConnection(_rCon) :m_rConnection(_rCon)
,m_bUseCatalog(true)
,meta(_rCon.getConnectionSettings().cppConnection->getMetaData()) ,meta(_rCon.getConnectionSettings().cppConnection->getMetaData())
,identifier_quote_string_set(false) ,identifier_quote_string_set(false)
{ {
osl_atomic_increment(&m_refCount);
m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable());
osl_atomic_decrement(&m_refCount);
} }
ODatabaseMetaData::~ODatabaseMetaData() ODatabaseMetaData::~ODatabaseMetaData()
......
...@@ -42,7 +42,6 @@ namespace connectivity ...@@ -42,7 +42,6 @@ namespace connectivity
class ODatabaseMetaData : public ODatabaseMetaData_BASE class ODatabaseMetaData : public ODatabaseMetaData_BASE
{ {
OConnection& m_rConnection; OConnection& m_rConnection;
bool m_bUseCatalog;
protected: protected:
sql::DatabaseMetaData * meta; sql::DatabaseMetaData * meta;
rtl::OUString identifier_quote_string; rtl::OUString identifier_quote_string;
......
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