diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-02-01 12:16:11 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-02-02 19:53:07 -0200 |
commit | beccf7c9dd4966347fa31e11922fd73bd40dfeb9 (patch) | |
tree | 33d40aadd3ef399bdfce0f3662b8ad0055fee125 /vcl/unx/gtk/fpicker | |
parent | 4cb33a7db765f8ad06e65d24a2396f2857a9cf0d (diff) |
Fix for fdo43460 Part LIX getLength() to isEmpty()
Part LIX
Modules
vcl (part 3)
Diffstat (limited to 'vcl/unx/gtk/fpicker')
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 18 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkPicker.cxx | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 27a8dc157580..f7fdbd1c855c 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -600,7 +600,7 @@ void SalGtkFilePicker::ensureFilterList( const ::rtl::OUString& _rInitialCurrent m_pFilterList = new FilterList; // set the first filter to the current filter - if ( !m_aCurrentFilter.getLength() ) + if ( m_aCurrentFilter.isEmpty() ) m_aCurrentFilter = _rInitialCurrentFilter; } } @@ -867,7 +867,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw { if( aListIter->getFilter().equalsIgnoreAsciiCase( aStarDot+sExtension ) ) { - if( !aNewFilter.getLength() ) + if( aNewFilter.isEmpty() ) aNewFilter = aListIter->getTitle(); if( aOldFilter == aListIter->getTitle() ) @@ -1388,7 +1388,7 @@ void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUS if (nControlId == ExtendedFilePickerElementIds::PUSHBUTTON_PLAY) { #ifdef GTK_STOCK_MEDIA_PLAY - if (!msPlayLabel.getLength()) + if (msPlayLabel.isEmpty()) msPlayLabel = rLabel; if (msPlayLabel == rLabel) gtk_button_set_label(GTK_BUTTON(pWidget), GTK_STOCK_MEDIA_PLAY); @@ -1871,9 +1871,9 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O aToken = rType.getToken( 0, ';', nIndex ); // Assume all have the "*.<extn>" syntax aToken = aToken.copy( aToken.lastIndexOf( aStarDot ) + 2 ); - if (aToken.getLength()) + if (!aToken.isEmpty()) { - if (aTokens.getLength()) + if (!aTokens.isEmpty()) aTokens += OUString(RTL_CONSTASCII_USTRINGPARAM(",")); aTokens = aTokens += aToken; gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_URI, @@ -1923,7 +1923,7 @@ void SalGtkFilePicker::implAddFilterGroup( const OUString& /*_rFilter*/, const S void SalGtkFilePicker::SetFilters() { - if (!m_aInitialFilter.getLength()) + if (m_aInitialFilter.isEmpty()) m_aInitialFilter = m_aCurrentFilter; rtl::OUString sPseudoFilter; @@ -1956,7 +1956,7 @@ void SalGtkFilePicker::SetFilters() std::set<OUString>::const_iterator aEnd = aAllFormats.end(); for (std::set<OUString>::const_iterator aIter = aAllFormats.begin(); aIter != aEnd; ++aIter) { - if (sAllFilter.getLength()) + if (!sAllFilter.isEmpty()) sAllFilter += OUString(sal_Unicode(';')); sAllFilter += *aIter; } @@ -1995,9 +1995,9 @@ void SalGtkFilePicker::SetFilters() gtk_widget_hide( m_pFilterExpander ); // set the default filter - if (sPseudoFilter.getLength()) + if (!sPseudoFilter.isEmpty()) SetCurFilter( sPseudoFilter ); - else if(m_aCurrentFilter.getLength()) + else if(!m_aCurrentFilter.isEmpty()) SetCurFilter( m_aCurrentFilter ); OSL_TRACE( "end setting filters"); diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx index dc951a54addc..db173003e1e5 100644 --- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx @@ -87,7 +87,7 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn) else { OUString aNewURL = uno::Reference<uri::XExternalUriReferenceTranslator>(uno::Reference<XMultiComponentFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator")), m_xContext), UNO_QUERY_THROW)->translateToInternal(sURL); - if( aNewURL.getLength() ) + if( !aNewURL.isEmpty() ) sURL = aNewURL; } } @@ -104,7 +104,7 @@ rtl::OString SalGtkPicker::unicodetouri(const rtl::OUString &rURL) { OUString aNewURL = uno::Reference<uri::XExternalUriReferenceTranslator>(uno::Reference<XMultiComponentFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator")), m_xContext ), UNO_QUERY_THROW)->translateToExternal( rURL ); - if( aNewURL.getLength() ) + if( !aNewURL.isEmpty() ) { // At this point the URL should contain ascii characters only actually sURL = OUStringToOString( aNewURL, osl_getThreadTextEncoding() ); |