summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorBrij Mohan Lal Srivastava <contactbrijmohan@gmail.com>2014-11-12 14:24:10 +0530
committerStephan Bergmann <sbergman@redhat.com>2014-11-14 09:20:38 +0100
commitd32be3ace8c8fd430bbecdf69f88a116b0ee91d1 (patch)
treeb373c084cb124434e0498867b24bc7bb333155dd /dbaccess/source
parentf5e86ebc097f0f8bc5b282511149cb026710ecde (diff)
fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx6
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx2
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx2
-rw-r--r--dbaccess/source/ui/inc/indexes.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineData.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx4
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx2
12 files changed, 19 insertions, 18 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 7b912320f266..ef3c0e079e16 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -330,7 +330,7 @@ void SAL_CALL OSingleSelectQueryComposer::setQuery( const OUString& command ) th
// we have no "elementary" parts anymore (means filter/groupby/having/order clauses)
for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) )
- m_aElementaryParts[ eLoopParts ] = OUString();
+ m_aElementaryParts[ eLoopParts ].clear();
}
void SAL_CALL OSingleSelectQueryComposer::setCommand( const OUString& Command,sal_Int32 _nCommandType ) throw(SQLException, RuntimeException, std::exception)
@@ -1754,21 +1754,21 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
pCondition = pWhereNode->getChild(1);
#if OSL_DEBUG_LEVEL > 0
- sCondition = OUString();
+ sCondition.clear();
pCondition->parseNodeToStr( sCondition, m_xConnection );
#endif
OSQLParseNode::disjunctiveNormalForm(pCondition);
pCondition = pWhereNode->getChild(1);
#if OSL_DEBUG_LEVEL > 0
- sCondition = OUString();
+ sCondition.clear();
pCondition->parseNodeToStr( sCondition, m_xConnection );
#endif
OSQLParseNode::absorptions(pCondition);
pCondition = pWhereNode->getChild(1);
#if OSL_DEBUG_LEVEL > 0
- sCondition = OUString();
+ sCondition.clear();
pCondition->parseNodeToStr( sCondition, m_xConnection );
#endif
if ( pCondition )
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 25923c4de031..b6c57087c0ae 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -917,7 +917,7 @@ void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
case PROPERTY_ID_USER:
rValue >>= m_pImpl->m_sUser;
// if the user name has changed, reset the password
- m_pImpl->m_aPassword = OUString();
+ (m_pImpl->m_aPassword).clear();
break;
case PROPERTY_ID_PASSWORD:
rValue >>= m_pImpl->m_aPassword;
@@ -1131,7 +1131,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
m_pImpl->m_aPassword = pAuthenticate->getPassword();
bNewPasswordGiven = true;
}
- m_pImpl->m_sFailedPassword = OUString();
+ (m_pImpl->m_sFailedPassword).clear();
}
try
@@ -1146,7 +1146,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
// assume that we had an authentication problem. Without this we may, after an unsuccessful connect, while
// the user gave us a password an the order to remember it, never allow an password input again (at least
// not without restarting the session)
- m_pImpl->m_aPassword = OUString();
+ (m_pImpl->m_aPassword).clear();
}
throw;
}
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index eda7eecd38d5..4c6ec3e6145a 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -69,7 +69,7 @@ namespace dbaccess
void SettingsImport::split( const OUString& i_rElementName, OUString& o_rNamespace, OUString& o_rLocalName )
{
- o_rNamespace = OUString();
+ o_rNamespace.clear();
o_rLocalName = i_rElementName;
const sal_Int32 nSeparatorPos = i_rElementName.indexOf( ':' );
if ( nSeparatorPos > -1 )
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 4b9d676893e0..90f0b1f7c731 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -59,7 +59,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName );
const OUString sValue = _xAttrList->getValueByIndex( i );
- aProperty.Name = OUString();
+ aProperty.Name.clear();
aProperty.Value = Any();
switch( rTokenMap.Get( nPrefix, sLocalName ) )
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index a65a3a440915..0403fba293bb 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -138,7 +138,7 @@ namespace dbaui
m_aAsyncDrop.bError = false;
m_aAsyncDrop.bHtml = false;
m_aAsyncDrop.pDroppedAt = NULL;
- m_aAsyncDrop.aUrl = OUString();
+ m_aAsyncDrop.aUrl.clear();
// loop through the available formats and see what we can do ...
// first we have to check if it is our own format, if not we have to copy the stream :-(
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index d10b40cd32d6..a6ca7ae16bd9 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -118,7 +118,7 @@ OUString TableListFacade::getSelectedName( OUString& _out_rAliasName ) const
&& !xMeta->supportsSchemasInDataManipulation() )
{
aCatalog = aSchema;
- aSchema = OUString();
+ aSchema.clear();
}
aComposedName = ::dbtools::composeTableName(
diff --git a/dbaccess/source/ui/inc/indexes.hxx b/dbaccess/source/ui/inc/indexes.hxx
index 57a0f2d9682a..91f5d40fa0c8 100644
--- a/dbaccess/source/ui/inc/indexes.hxx
+++ b/dbaccess/source/ui/inc/indexes.hxx
@@ -71,7 +71,7 @@ namespace dbaui
void clearModified() { setModified(false); }
bool isNew() const { return getOriginalName().isEmpty(); }
- void flagAsNew(const GrantIndexAccess&) { sOriginalName = OUString(); }
+ void flagAsNew(const GrantIndexAccess&) { sOriginalName.clear(); }
void flagAsCommitted(const GrantIndexAccess&) { sOriginalName = sName; }
private:
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
index 178a4508f927..518ffea03243 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
@@ -61,7 +61,8 @@ OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData&
bool OConnectionLineData::Reset()
{
- m_aDestFieldName = m_aSourceFieldName = OUString();
+ m_aDestFieldName.clear();
+ m_aSourceFieldName.clear();
return true;
}
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 85a3e45bc2ca..6c3ab2d64d18 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -61,7 +61,7 @@ OQueryTableWindow::OQueryTableWindow( vcl::Window* pParent, const TTableWindowDa
// if table name matches alias, do not pass to InitialAlias,
// as the appending of a possible token could not succeed...
if (m_strInitialAlias == pTabWinData->GetTableName())
- m_strInitialAlias = OUString();
+ m_strInitialAlias.clear();
SetHelpId(HID_CTL_QRYDGNTAB);
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 3d78dee5f153..1b66601dabbb 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -904,7 +904,7 @@ void OQueryController::impl_initialize()
break;
case CommandType::COMMAND:
setStatement_fireEvent( sCommand );
- m_sName = OUString();
+ m_sName.clear();
break;
default:
OSL_FAIL( "OQueryController::impl_initialize: logic error in code!" );
@@ -1771,7 +1771,7 @@ OUString OQueryController::translateStatement( bool _bFireStatementChange )
::dbtools::SQLExceptionInfo aInfo(e);
showError(aInfo);
// an error occurred so we clear the statement
- sTranslatedStmt = OUString();
+ sTranslatedStmt.clear();
}
}
else if(m_sStatement.isEmpty())
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 98a72c8587c8..546b4c9053d8 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -319,7 +319,7 @@ bool ORelationTableConnectionData::Update()
}
// get the name of foreign key; search for columns
- m_aConnName = OUString();
+ m_aConnName.clear();
xKey.clear();
bool bDropRelation = false;
for(sal_Int32 i=0;i<xKeys->getCount();++i)
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 3bdb494924ca..70e5a6e615ce 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -569,7 +569,7 @@ void CopyTableWizard::impl_dialogToAttributes_nothrow( const OCopyTableWizard& _
if ( m_aPrimaryKeyName.IsPresent )
m_aPrimaryKeyName.Value = _rDialog.getPrimaryKeyName();
else
- m_aPrimaryKeyName.Value = OUString();
+ m_aPrimaryKeyName.Value.clear();
m_sDestinationTable = _rDialog.getName();