summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:22:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:24 +0100
commit17fe6b54cdc6a71e324bf83421f22eb2954089a1 (patch)
tree14caa9552943ba2e3a9e3af266b582ec6b3c3246
parent43e4b96e8ecab707803fa5083a53437d6f799444 (diff)
dbaccess: Use appropriate OUString functions on string constants
Change-Id: I1d63c9123ad985cb3424b0ac0ad30c12e39f8170
-rw-r--r--dbaccess/qa/unit/firebird.cxx4
-rw-r--r--dbaccess/source/core/api/RowSet.cxx4
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlConnectionResource.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlDataSource.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceInfo.cxx2
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx12
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx10
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx34
-rw-r--r--dbaccess/source/ui/control/charsetlistbox.cxx2
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx8
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx4
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx4
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx6
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx16
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx19
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx2
22 files changed, 73 insertions, 77 deletions
diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx
index 424c0cdccf58..a8022c125f7f 100644
--- a/dbaccess/qa/unit/firebird.cxx
+++ b/dbaccess/qa/unit/firebird.cxx
@@ -89,9 +89,9 @@ void FirebirdTest::testIntegerDatabase()
xRow->getInt(xColumnLocate->findColumn("_INT")));
CPPUNIT_ASSERT(SAL_CONST_INT64(-9000000000000000000) ==
xRow->getLong(xColumnLocate->findColumn("_BIGINT")));
- CPPUNIT_ASSERT(OUString("5") ==
+ CPPUNIT_ASSERT("5" ==
xRow->getString(xColumnLocate->findColumn("_CHAR")));
- CPPUNIT_ASSERT(OUString("5") ==
+ CPPUNIT_ASSERT("5" ==
xRow->getString(xColumnLocate->findColumn("_VARCHAR")));
CPPUNIT_ASSERT(!xResultSet->next()); // Should only be one row
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 75c1958e340c..d77e3e11cb4a 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1939,7 +1939,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
{
xColumn = NULL;
bReFetchName = true;
- sColumnLabel = "";
+ sColumnLabel.clear();
}
if(!xColumn.is())
{
@@ -2345,7 +2345,7 @@ bool ORowSet::impl_buildActiveCommand_throw()
// the last use the command as it is
bool bDoEscapeProcessing = m_bUseEscapeProcessing;
- m_aActiveCommand = "";
+ m_aActiveCommand.clear();
OUString sCommand;
if ( m_aCommand.isEmpty() )
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index a5cf896ca044..421b6b818594 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -309,7 +309,7 @@ OUString ODsnTypeCollection::getEmbeddedDatabase() const
aInstalled.getNodeValue(s_sValue) >>= sEmbeddedDatabaseURL;
if ( !sEmbeddedDatabaseURL.isEmpty() )
- aInstalled.getNodeValue(OUString(s_sValue) + "/" + sEmbeddedDatabaseURL + "/URL") >>= sEmbeddedDatabaseURL;
+ aInstalled.getNodeValue(OUStringLiteral(s_sValue) + "/" + sEmbeddedDatabaseURL + "/URL") >>= sEmbeddedDatabaseURL;
}
}
if ( sEmbeddedDatabaseURL.isEmpty() )
diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.cxx b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
index b315e58a514a..8905cfe44564 100644
--- a/dbaccess/source/filter/xml/xmlConnectionResource.cxx
+++ b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
@@ -54,7 +54,7 @@ OXMLConnectionResource::OXMLConnectionResource( ODBFilter& rImport,
const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName );
const OUString sValue = _xAttrList->getValueByIndex( i );
- aProperty.Name = "";
+ aProperty.Name.clear();
aProperty.Value = Any();
switch( rTokenMap.Get( nPrefix, sLocalName ) )
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx
index 8fd6654b46e3..c84b0288172a 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -65,7 +65,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName );
OUString sValue = _xAttrList->getValueByIndex( i );
- aProperty.Name = "";
+ aProperty.Name.clear();
aProperty.Value = Any();
switch( rTokenMap.Get( nPrefix, sLocalName ) )
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
index e187ee1d7116..c32d74c9984e 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
@@ -58,7 +58,7 @@ OXMLDataSourceInfo::OXMLDataSourceInfo( ODBFilter& rImport
sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName );
OUString sValue = _xAttrList->getValueByIndex( i );
- aProperty.Name = "";
+ aProperty.Name.clear();
sal_uInt16 nToken = rTokenMap.Get( nPrefix, sLocalName );
aTokens.push_back(nToken);
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 90d29b51778c..9d45476b4852 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2470,7 +2470,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
m_aAsyncDrop.nAction = _rEvt.mnAction;
m_aAsyncDrop.bError = false;
m_aAsyncDrop.bHtml = false;
- m_aAsyncDrop.aUrl = "";
+ 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/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index ae53681d9b35..6f0532958e43 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1076,7 +1076,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t
SolarMutexGuard aGuard;
// the IsModified changed to sal_False ?
- if ( (evt.PropertyName.equals(PROPERTY_ISMODIFIED))
+ if ( evt.PropertyName == PROPERTY_ISMODIFIED
&& !::comphelper::getBOOL(evt.NewValue)
)
{ // -> the current field isn't modified anymore, too
@@ -1084,7 +1084,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t
}
// switching to a new record ?
- if ( (evt.PropertyName.equals(PROPERTY_ISNEW))
+ if ( evt.PropertyName == PROPERTY_ISNEW
&& ::comphelper::getBOOL(evt.NewValue)
)
{
@@ -1094,21 +1094,21 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t
InvalidateAll();
}
- if (evt.PropertyName.equals(PROPERTY_FILTER))
+ if (evt.PropertyName == PROPERTY_FILTER)
{
InvalidateFeature(ID_BROWSER_REMOVEFILTER);
}
- else if (evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE))
+ else if (evt.PropertyName == PROPERTY_HAVING_CLAUSE)
{
InvalidateFeature(ID_BROWSER_REMOVEFILTER);
}
- else if (evt.PropertyName.equals(PROPERTY_ORDER))
+ else if (evt.PropertyName == PROPERTY_ORDER)
{
InvalidateFeature(ID_BROWSER_REMOVEFILTER);
}
// a new record count ? -> may be our search availability has changed
- if (evt.PropertyName.equals(PROPERTY_ROWCOUNT))
+ if (evt.PropertyName == PROPERTY_ROWCOUNT)
{
sal_Int32 nNewValue = 0, nOldValue = 0;
evt.NewValue >>= nNewValue;
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index 41aa59b47f06..87d5e2fde797 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1211,7 +1211,7 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SbaXFormAdapter:
for (sal_Int32 i=0; i<aProps.getLength(); ++i, ++pProps)
{
- if (pProps->Name.equals(PROPERTY_NAME))
+ if (pProps->Name == PROPERTY_NAME)
{
((SbaXFormAdapter*)this)->m_nNamePropHandle = pProps->Handle;
break;
@@ -1241,7 +1241,7 @@ Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< OUSt
Any* pValues = aReturn.getArray();
OSL_ENSURE(aReturn.getLength() == aPropertyNames.getLength(), "SAL_CALL SbaXFormAdapter::getPropertyValues : the main form returned an invalid-length sequence !");
for (sal_Int32 i=0; i<aPropertyNames.getLength(); ++i, ++pNames, ++pValues)
- if (pNames->equals(PROPERTY_NAME))
+ if (*pNames == PROPERTY_NAME)
{
(*pValues) <<= m_sName;
break;
@@ -1289,7 +1289,7 @@ void SAL_CALL SbaXFormAdapter::setPropertyValue(const OUString& aPropertyName, c
return;
// special handling for the "name" property
- if (aPropertyName.equals(PROPERTY_NAME))
+ if (aPropertyName == PROPERTY_NAME)
setFastPropertyValue(m_nNamePropHandle, aValue);
xSet->setPropertyValue(aPropertyName, aValue);
@@ -1302,7 +1302,7 @@ Any SAL_CALL SbaXFormAdapter::getPropertyValue(const OUString& PropertyName) thr
return Any();
// special handling for the "name" property
- if (PropertyName.equals(PROPERTY_NAME))
+ if (PropertyName == PROPERTY_NAME)
return getFastPropertyValue(m_nNamePropHandle);
return xSet->getPropertyValue(PropertyName);
@@ -1632,7 +1632,7 @@ Reference< ::com::sun::star::container::XEnumeration > SAL_CALL SbaXFormAdapter:
// ::com::sun::star::beans::XPropertyChangeListener
void SAL_CALL SbaXFormAdapter::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( RuntimeException, std::exception )
{
- if (evt.PropertyName.equals(PROPERTY_NAME))
+ if (evt.PropertyName == PROPERTY_NAME)
{
::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > >::iterator aIter = ::std::find_if( m_aChildren.begin(),
m_aChildren.end(),
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 001845bf8fbf..8dc5cb1ddf71 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -863,7 +863,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
// one of the many properties which require us to update the definition ?
// a column's width ?
- else if (evt.PropertyName.equals(PROPERTY_WIDTH))
+ else if (evt.PropertyName == PROPERTY_WIDTH)
{ // a column width has changed -> update the model
// (the update of the view is done elsewhere)
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
@@ -877,7 +877,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
}
// a column's 'visible' state ?
- else if (evt.PropertyName.equals(PROPERTY_HIDDEN))
+ else if (evt.PropertyName == PROPERTY_HIDDEN)
{
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
if(xProp.is())
@@ -885,7 +885,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
}
// a columns alignment ?
- else if (evt.PropertyName.equals(PROPERTY_ALIGN))
+ else if (evt.PropertyName == PROPERTY_ALIGN)
{
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
try
@@ -911,7 +911,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
}
// a column's format ?
- else if ( (evt.PropertyName.equals(PROPERTY_FORMATKEY))
+ else if ( evt.PropertyName == PROPERTY_FORMATKEY
&& (TypeClass_LONG == evt.NewValue.getValueTypeClass())
)
{
@@ -923,7 +923,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
// some table definition properties ?
// the height of the rows in the grid ?
- else if (evt.PropertyName.equals(PROPERTY_ROW_HEIGHT))
+ else if (evt.PropertyName == PROPERTY_ROW_HEIGHT)
{
if(m_pCurrentlyDisplayed)
{
@@ -938,15 +938,15 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
}
}
- else if ( evt.PropertyName.equals(PROPERTY_FONT) // the font ?
- || evt.PropertyName.equals(PROPERTY_TEXTCOLOR) // the text color ?
- || evt.PropertyName.equals(PROPERTY_FILTER) // the filter ?
- || evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE) // the having clause ?
- || evt.PropertyName.equals(PROPERTY_ORDER) // the sort ?
- || evt.PropertyName.equals(PROPERTY_APPLYFILTER) // the appliance of the filter ?
- || evt.PropertyName.equals(PROPERTY_TEXTLINECOLOR) // the text line color ?
- || evt.PropertyName.equals(PROPERTY_TEXTEMPHASIS) // the text emphasis ?
- || evt.PropertyName.equals(PROPERTY_TEXTRELIEF) // the text relief ?
+ else if ( evt.PropertyName == PROPERTY_FONT // the font ?
+ || evt.PropertyName == PROPERTY_TEXTCOLOR // the text color ?
+ || evt.PropertyName == PROPERTY_FILTER // the filter ?
+ || evt.PropertyName == PROPERTY_HAVING_CLAUSE // the having clause ?
+ || evt.PropertyName == PROPERTY_ORDER // the sort ?
+ || evt.PropertyName == PROPERTY_APPLYFILTER // the appliance of the filter ?
+ || evt.PropertyName == PROPERTY_TEXTLINECOLOR // the text line color ?
+ || evt.PropertyName == PROPERTY_TEXTEMPHASIS // the text emphasis ?
+ || evt.PropertyName == PROPERTY_TEXTRELIEF // the text relief ?
)
{
transferChangedControlProperty(evt.PropertyName, evt.NewValue);
@@ -1096,7 +1096,7 @@ namespace
return true;
}
_rDisplayName = _rDS;
- _rUniqueId = "";
+ _rUniqueId.clear();
return false;
}
@@ -1623,7 +1623,7 @@ void SbaTableQueryBrowser::LoadFinished(bool _bWasSynch)
{
SbaXDataBrowserController::LoadFinished(_bWasSynch);
- m_sQueryCommand = "";
+ m_sQueryCommand.clear();
m_bQueryEscapeProcessing = false;
if (isValid() && !loadingCancelled())
@@ -3546,7 +3546,7 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const
bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, bool& _bEscapeProcessing )
{
- _rCommand = "";
+ _rCommand.clear();
_bEscapeProcessing = false;
try
diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx
index 3181a82a53aa..9daa8b9be5de 100644
--- a/dbaccess/source/ui/control/charsetlistbox.cxx
+++ b/dbaccess/source/ui/control/charsetlistbox.cxx
@@ -69,7 +69,7 @@ namespace dbaui
// data source type
// This is worth at least an assertion.
OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: invalid character set!" );
- sDisplayName = "";
+ sDisplayName.clear();
}
SelectEntry( sDisplayName );
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 1d79169e732d..1a543dce4c73 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -343,12 +343,12 @@ namespace dbaui
// do not display the Connector/OOo driver itself, it is always wrapped via the MySQL-Driver, if
// this driver is installed
if ( m_pCollection->hasDriver( "sdbc:mysql:mysqlc:" ) )
- _inout_rDisplayName = "";
+ _inout_rDisplayName.clear();
}
if ( eType == ::dbaccess::DST_EMBEDDED_HSQLDB
|| eType == ::dbaccess::DST_EMBEDDED_FIREBIRD )
- _inout_rDisplayName = "";
+ _inout_rDisplayName.clear();
return _inout_rDisplayName.getLength() > 0;
}
@@ -612,7 +612,7 @@ namespace dbaui
case ::dbaccess::DST_MYSQL_NATIVE:
// don't display those, the decision whether the user connects via JDBC/ODBC/C-OOo is made on another
// page
- _inout_rDisplayName = "";
+ _inout_rDisplayName.clear();
break;
default:
break;
@@ -719,7 +719,7 @@ namespace dbaui
return 0L;
}
m_aBrowsedDocument.sURL = sPath;
- m_aBrowsedDocument.sFilter = "";
+ m_aBrowsedDocument.sFilter.clear();
m_aChooseDocumentHandler.Call( this );
return 1L;
}
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 4617c1310c17..b4c8800fce7b 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -342,7 +342,7 @@ namespace dbaui
if (bEmptySelected)
{
- aPos->sFieldName = "";
+ aPos->sFieldName.clear();
// invalidate the row to force repaint
Invalidate(GetRowRectPixel(nRow));
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 4ed0b22a0490..f6428a221231 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -638,9 +638,7 @@ void OSQLMessageBox::impl_addDetailsButton()
void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage )
{
- SetText(
- utl::ConfigManager::getProductName() +
- OUString( " Base" ) );
+ SetText( utl::ConfigManager::getProductName() + " Base" );
// position and size the controls and the dialog, depending on whether we have one or two texts to display
impl_positionControls();
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index ce9da401bf1a..863841e92e73 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -489,7 +489,7 @@ namespace dbaui
if (bCatalogWildcard)
sCatalog = sWildcard;
else
- sCatalog = "";
+ sCatalog.clear();
sCatalog += m_sCatalogSeparator;
sCatalog += m_pTablesList->GetEntryText( pCatalog );
}
@@ -516,7 +516,7 @@ namespace dbaui
aTableFilter[nOldLen] = sComposedName;
// reset the composed name
- sComposedName = "";
+ sComposedName.clear();
}
if (bCatalogWildcard)
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index ee5a791e2357..0f16a402c1f1 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -787,9 +787,9 @@ void ODatabaseExport::adjustFormat()
void ODatabaseExport::eraseTokens()
{
- m_sTextToken = "";
- m_sNumToken = "";
- m_sValToken = "";
+ m_sTextToken.clear();
+ m_sNumToken.clear();
+ m_sValToken.clear();
}
void ODatabaseExport::ensureFormatter()
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 67556a3051cb..fc573d092785 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -192,7 +192,7 @@ void OHTMLReader::NextToken( int nToken )
m_sCurrent += m_sTextToken;
break;
case HTML_PARABREAK_ON:
- m_sTextToken = "";
+ m_sTextToken.clear();
break;
case HTML_TABLEDATA_ON:
fetchOptions();
@@ -210,7 +210,7 @@ void OHTMLReader::NextToken( int nToken )
{
showErrorDialog(e);
}
- m_sCurrent = "";
+ m_sCurrent.clear();
m_nColumnPos++;
eraseTokens();
m_bSDNum = m_bInTbl = false;
@@ -266,7 +266,7 @@ void OHTMLReader::NextToken( int nToken )
m_sCurrent += m_sTextToken;
break;
case HTML_PARABREAK_ON:
- m_sTextToken = "";
+ m_sTextToken.clear();
break;
case HTML_TABLEDATA_OFF:
if ( !m_sCurrent.isEmpty() )
@@ -274,7 +274,7 @@ void OHTMLReader::NextToken( int nToken )
adjustFormat();
m_nColumnPos++;
m_bSDNum = m_bInTbl = false;
- m_sCurrent = "";
+ m_sCurrent.clear();
break;
case HTML_TABLEROW_OFF:
if ( !m_sCurrent.isEmpty() )
@@ -282,7 +282,7 @@ void OHTMLReader::NextToken( int nToken )
adjustFormat();
m_nColumnPos = 0;
m_nRows--;
- m_sCurrent = "";
+ m_sCurrent.clear();
break;
}
}
@@ -436,7 +436,7 @@ bool OHTMLReader::CreateTable(int nToken)
m_sCurrent += aColumnName;
break;
case HTML_PARABREAK_ON:
- m_sTextToken = "";
+ m_sTextToken.clear();
break;
case HTML_TABLEDATA_ON:
case HTML_TABLEHEADER_ON:
@@ -454,8 +454,8 @@ bool OHTMLReader::CreateTable(int nToken)
aColumnName = comphelper::string::strip(aColumnName, ' ');
CreateDefaultColumn(aColumnName);
- aColumnName = "";
- m_sCurrent = "";
+ aColumnName.clear();
+ m_sCurrent.clear();
eVal = SVX_HOR_JUSTIFY_STANDARD;
bTableHeader = false;
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index 8bdce574b878..f76125642190 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -264,11 +264,11 @@ bool ORTFReader::CreateTable(int nToken)
case RTF_UNKNOWNCONTROL:
case RTF_UNKNOWNDATA:
m_bInTbl = false;
- aColumnName = "";
+ aColumnName.clear();
break;
case RTF_INTBL:
if(m_bInTbl)
- aColumnName = "";
+ aColumnName.clear();
m_bInTbl = true;
break;
@@ -284,7 +284,7 @@ bool ORTFReader::CreateTable(int nToken)
aColumnName = ModuleRes(STR_COLUMN_NAME);
CreateDefaultColumn(aColumnName);
- aColumnName = "";
+ aColumnName.clear();
}
break;
case RTF_CF:
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 826a8a6203e6..9e192e66b3ab 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -416,7 +416,7 @@ void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& o_rV
aWindowData.put( "WindowHeight", static_cast<sal_Int32>((*aIter)->GetSize().Height()) );
aWindowData.put( "ShowAll", (*aIter)->IsShowAll() );
- const OUString sTableName( OUString( "Table" ) + OUString::number( i ) );
+ const OUString sTableName( "Table" + OUString::number( i ) );
aAllTablesData.put( sTableName, aWindowData.getPropertyValues() );
}
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index b7ae1336e225..be2840818d70 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -742,7 +742,8 @@ namespace
for (sal_uInt16 i=0 ; i < nMaxCriteria ; i++)
{
- aHavingStr = aWhereStr = "";
+ aHavingStr.clear();
+ aWhereStr.clear();
for(aIter = _rFieldList.begin();aIter != aEnd;++aIter)
{
@@ -2214,7 +2215,7 @@ namespace
{ // we got an aggregate function but without column name inside
// so we set the whole argument of the function as field name
nFunctionType |= FKT_NUMERIC;
- sFieldName = "";
+ sFieldName.clear();
pParamRef->parseNodeToStr( sFieldName,
xConnection,
&rController.getParser().getContext(),
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 1f4c2eaae461..953b183bf769 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -52,11 +52,8 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::accessibility;
-#define g_strOne OUString("1")
-#define g_strZero OUString("0")
-
#define DEFAULT_QUERY_COLS 20
-#define DEFAULT_SIZE GetTextWidth(g_strZero) * 30
+#define DEFAULT_SIZE GetTextWidth("0") * 30
#define CHECKBOX_SIZE 10
#define HANDLE_ID 0
#define HANDLE_COLUMN_WITDH 70
@@ -904,8 +901,8 @@ bool OSelectionBrowseBox::SaveModified()
case BROW_VIS_ROW:
{
bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != TRISTATE_FALSE;
- strOldCellContents = bOldValue ? g_strOne : g_strZero;
- sNewValue = !bOldValue ? g_strOne : g_strZero;
+ strOldCellContents = bOldValue ? "1" : "0";
+ sNewValue = !bOldValue ? "1" : "0";
}
if((m_bOrderByUnRelated || pEntry->GetOrderDir() == ORDER_NONE) &&
(m_bGroupByUnRelated || !pEntry->IsGroupBy()))
@@ -1044,7 +1041,7 @@ bool OSelectionBrowseBox::SaveModified()
// we have to change the visblie flag, so we must append also an undo action
pEntry->SetVisible(true);
m_pVisibleCell->GetBox().Check();
- appendUndoAction(g_strZero,g_strOne,BROW_VIS_ROW,bListAction);
+ appendUndoAction("0","1",BROW_VIS_ROW,bListAction);
RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId());
}
@@ -1058,7 +1055,7 @@ bool OSelectionBrowseBox::SaveModified()
}
else
{
- sFunctionName = "";
+ sFunctionName.clear();
pEntry->SetFunction(OUString());
pEntry->SetFunctionType(pEntry->GetFunctionType() & ~FKT_AGGREGATE );
}
@@ -1185,7 +1182,7 @@ bool OSelectionBrowseBox::SaveModified()
{
// Default to visible
pEntry->SetVisible(true);
- appendUndoAction(g_strZero,g_strOne,BROW_VIS_ROW,bListAction);
+ appendUndoAction("0","1",BROW_VIS_ROW,bListAction);
RowModified(BROW_VIS_ROW, GetCurColumnId());
// if required add empty columns
@@ -2234,7 +2231,7 @@ OUString OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 n
switch (nCellIndex)
{
case BROW_VIS_ROW :
- return pEntry->IsVisible() ? g_strOne : g_strZero;
+ return pEntry->IsVisible() ? "1" : "0";
case BROW_ORDER_ROW:
{
sal_Int32 nIdx = m_pOrderCell->GetSelectEntryPos();
@@ -2260,7 +2257,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con
switch (nRow)
{
case BROW_VIS_ROW:
- pEntry->SetVisible(strNewText == g_strOne);
+ pEntry->SetVisible(strNewText == "1");
break;
case BROW_FIELD_ROW:
pEntry->SetField(strNewText);
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index a8acd0408858..226c7313b925 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -434,7 +434,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
{
if(!bAlter || bNew)
{
- m_sName = "";
+ m_sName.clear();
stopTableListening();
m_xTable = NULL;
}