summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2011-12-19 18:10:37 -0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2011-12-21 09:52:48 +0100
commit545921f914ec172bcd6712cce54847131a49afb6 (patch)
tree92dde2ebc7c4d70240e4967b11526e73fef10b16 /dbaccess/source/ui/browser
parent1835d0599e3d8984c7dfa2bbef2be5747596716a (diff)
Fix for fdo43460 Part XII getLength() to isEmpty()
Part XII Module dbaccess
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx4
-rw-r--r--dbaccess/source/ui/browser/dbloader.cxx2
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx4
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx10
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx18
6 files changed, 20 insertions, 20 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 6a29b663a88b..f56819dd7ff5 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1760,7 +1760,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
Reference< XPropertySet > xActiveSet(getRowSet(), UNO_QUERY);
::rtl::OUString aFilter = ::comphelper::getString(xActiveSet->getPropertyValue(PROPERTY_FILTER));
::rtl::OUString aHaving = ::comphelper::getString(xActiveSet->getPropertyValue(PROPERTY_HAVING_CLAUSE));
- if ( aFilter.getLength() || aHaving.getLength() )
+ if ( !(aFilter.isEmpty() && aHaving.isEmpty()) )
{
xActiveSet->getPropertyValue( PROPERTY_APPLYFILTER ) >>= aReturn.bChecked;
aReturn.bEnabled = sal_True;
@@ -1888,7 +1888,7 @@ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_
::rtl::OUString sActiveCommand;
OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ACTIVECOMMAND ) >>= sActiveCommand );
- if ( sActiveCommand.getLength() > 0 )
+ if ( !sActiveCommand.isEmpty() )
{
xComposer->setElementaryQuery( sActiveCommand );
}
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index cbf1b2778602..a3557049e853 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -283,7 +283,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
{
xDatabaseDocument.set( getDataSourceOrModel( xDataSource ), UNO_QUERY );
}
- else if ( sDataSourceName.getLength() )
+ else if ( !sDataSourceName.isEmpty() )
{
::dbtools::SQLExceptionInfo aError;
xDataSource.set( getDataSourceByName( sDataSourceName, NULL, m_xServiceFactory, &aError ) );
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index ce463a6440c5..f23898fd83d9 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -186,7 +186,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
else
OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (").append(rtl::OUStringToOString(pArguments->Name, osl_getThreadTextEncoding())).append(") !").getStr());
}
- if (!sControlType.getLength())
+ if (sControlType.isEmpty())
{
OSL_FAIL("SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
sControlType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextField"));
@@ -287,7 +287,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
)
)
{
- OSL_ENSURE(aURL.Mark.getLength() == 0, "SbaExternalSourceBrowser::queryDispatch : the ::com::sun::star::util::URL shouldn't have a mark !");
+ OSL_ENSURE(aURL.Mark.isEmpty(), "SbaExternalSourceBrowser::queryDispatch : the ::com::sun::star::util::URL shouldn't have a mark !");
::com::sun::star::util::URL aNewUrl = aURL;
// split the ::com::sun::star::util::URL
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index ae7fe8725281..fe8f4e764a3b 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -564,7 +564,7 @@ sal_Bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId )
::std::bind2nd( CompareFeatureById(), _nId )
);
- return ( m_aSupportedFeatures.end() != aFeaturePos && aFeaturePos->first.getLength());
+ return ( m_aSupportedFeatures.end() != aFeaturePos && !aFeaturePos->first.isEmpty());
}
// -----------------------------------------------------------------------
@@ -809,7 +809,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene
{
DispatchIterator iterSearch = m_arrStatusListener.begin();
- sal_Bool bRemoveForAll = (_rURL.Complete.getLength() == 0);
+ sal_Bool bRemoveForAll = _rURL.Complete.isEmpty();
while ( iterSearch != m_arrStatusListener.end() )
{
DispatchTarget& rCurrent = *iterSearch;
@@ -996,7 +996,7 @@ URL OGenericUnoController::getURLForId(sal_Int32 _nId) const
::std::bind2nd( CompareFeatureById(), _nId )
);
- if ( m_aSupportedFeatures.end() != aIter && aIter->first.getLength() )
+ if ( m_aSupportedFeatures.end() != aIter && !aIter->first.isEmpty() )
{
aReturn.Complete = aIter->first;
m_xUrlTransformer->parseStrict( aReturn );
@@ -1487,7 +1487,7 @@ sal_Bool OGenericUnoController::isCommandEnabled(sal_uInt16 _nCommandId) const
// -----------------------------------------------------------------------------
sal_uInt16 OGenericUnoController::registerCommandURL( const ::rtl::OUString& _rCompleteCommandURL )
{
- if ( !_rCompleteCommandURL.getLength() )
+ if ( _rCompleteCommandURL.isEmpty() )
return 0;
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( _rCompleteCommandURL );
@@ -1546,7 +1546,7 @@ sal_Bool OGenericUnoController::isCommandChecked(sal_uInt16 _nCommandId) const
// -----------------------------------------------------------------------------
sal_Bool OGenericUnoController::isCommandEnabled( const ::rtl::OUString& _rCompleteCommandURL ) const
{
- OSL_ENSURE( _rCompleteCommandURL.getLength(), "OGenericUnoController::isCommandEnabled: Empty command url!" );
+ OSL_ENSURE( !_rCompleteCommandURL.isEmpty(), "OGenericUnoController::isCommandEnabled: Empty command url!" );
sal_Bool bIsEnabled = sal_False;
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( _rCompleteCommandURL );
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 4f8eb3c20a99..9d3a539ab8d6 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1281,7 +1281,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
{
OSL_FAIL("SbaGridControl::DoColumnDrag : something went wrong while getting the column");
}
- if (0 == sField.getLength())
+ if (sField.isEmpty())
return;
OColumnTransferable* pDataTransfer = new OColumnTransferable(xDataSource, sField, xAffectedField, xActiveConnection, CTF_FIELD_DESCRIPTOR | CTF_COLUMN_DESCRIPTOR);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 5a8b8a187e01..4d980a0bf62b 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -479,7 +479,7 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
::rtl::OUString sColumnName;
OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName );
- if ( sTableName.getLength() == 0 )
+ if ( sTableName.isEmpty() )
{
if ( !xColumnNames->hasByName( sColumnName ) )
{
@@ -789,7 +789,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
aInitialValues.push_back( NamedValue( PROPERTY_CONTROLSOURCE, makeAny( *pIter ) ) );
::rtl::OUString sLabel;
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
- if ( sLabel.getLength() )
+ if ( !sLabel.isEmpty() )
aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( sLabel ) ) );
else
aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( *pIter ) ) );
@@ -824,7 +824,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
aDescription = xColumn->getPropertyValue( PROPERTY_HELPTEXT );
::rtl::OUString sTemp;
aDescription >>= sTemp;
- if ( !sTemp.getLength() )
+ if ( sTemp.isEmpty() )
xColumn->getPropertyValue( PROPERTY_DESCRIPTION ) >>= sTemp;
aDescription <<= sTemp;
@@ -1107,7 +1107,7 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
::rtl::OUString sCommand;
m_aDocumentDataSource[daCommand] >>= sCommand;
- bKnownDocDataSource = (CommandType::COMMAND == nCommandType) && (0 != sCommand.getLength());
+ bKnownDocDataSource = (CommandType::COMMAND == nCommandType) && (!sCommand.isEmpty());
}
}
}
@@ -1934,7 +1934,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
sal_Bool bFullReinit = sal_False;
// check if the query signature (if the form is based on a query) has changed
- if ( m_sQueryCommand.getLength() )
+ if ( !m_sQueryCommand.isEmpty() )
{
::rtl::OUString sNewQueryCommand;
sal_Bool bNewQueryEP;
@@ -3131,7 +3131,7 @@ namespace
Reference< XDataSource > xDataSource;
try
{
- if ( _rDataSourceName.getLength() && _rxDatabaseContext->hasByName( _rDataSourceName ) )
+ if ( !_rDataSourceName.isEmpty() && _rxDatabaseContext->hasByName( _rDataSourceName ) )
xDataSource.set( _rxDatabaseContext->getByName( _rDataSourceName ), UNO_QUERY_THROW );
if ( !xDataSource.is() )
@@ -3265,7 +3265,7 @@ void SbaTableQueryBrowser::impl_initialize()
startConnectionListening( xConnection );
// if no initial name was given, try to obtain one from the data source
- if ( !sInitialDataSourceName.getLength() )
+ if ( sInitialDataSourceName.isEmpty() )
{
Reference< XChild > xChild( xConnection, UNO_QUERY );
Reference< XPropertySet > xDataSourceProperties;
@@ -3752,7 +3752,7 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
INetURLObject aURL(sTitle);
if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
sTitle = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
- if ( sName.getLength() )
+ if ( !sName.isEmpty() )
{
sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - "));
sName += sTitle;
@@ -3779,7 +3779,7 @@ sal_Bool SbaTableQueryBrowser::preReloadForm()
sal_Int32 nCommandType = CommandType::COMMAND;
sal_Bool bEscapeProcessing = sal_True;
extractDescriptorProps(aDesc, sDataSource, sCommand, nCommandType, bEscapeProcessing);
- if ( sDataSource.getLength() && sCommand.getLength() && (-1 != nCommandType) )
+ if ( !sDataSource.isEmpty() && !sCommand.isEmpty() && (-1 != nCommandType) )
{
SvLBoxEntry* pDataSource = NULL;
SvLBoxEntry* pCommandType = NULL;