summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/a11y/atktext.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atktextattributes.cxx4
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx2
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx18
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkPicker.cxx4
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx4
6 files changed, 19 insertions, 19 deletions
diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index 96a56e3e46c2..f14fb3dbb8ad 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.cxx
@@ -80,7 +80,7 @@ adjust_boundaries( accessibility::XAccessibleText* pText,
rtl::OUString aString;
gint start = 0, end = 0;
- if( rTextSegment.SegmentText.getLength() > 0 )
+ if( !rTextSegment.SegmentText.isEmpty() )
{
switch(boundary_type)
{
@@ -112,7 +112,7 @@ adjust_boundaries( accessibility::XAccessibleText* pText,
// Determine the start index of the next segment
aTextSegment = pText->getTextBehindIndex(rTextSegment.SegmentEnd,
text_type_from_boundary(boundary_type));
- if( aTextSegment.SegmentText.getLength() > 0 )
+ if( !aTextSegment.SegmentText.isEmpty() )
end = aTextSegment.SegmentStart;
else
end = pText->getCharacterCount();
@@ -126,7 +126,7 @@ adjust_boundaries( accessibility::XAccessibleText* pText,
// Determine the end index of the previous segment
aTextSegment = pText->getTextBeforeIndex(rTextSegment.SegmentStart,
text_type_from_boundary(boundary_type));
- if( aTextSegment.SegmentText.getLength() > 0 )
+ if( !aTextSegment.SegmentText.isEmpty() )
start = aTextSegment.SegmentEnd;
else
start = 0;
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index fca51df0ad00..989bdffd22d8 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -544,7 +544,7 @@ GetString(const uno::Any& rAny)
{
rtl::OString aFontName = rtl::OUStringToOString( rAny.get< rtl::OUString > (), RTL_TEXTENCODING_UTF8 );
- if( aFontName.getLength() )
+ if( !aFontName.isEmpty() )
return g_strdup( aFontName.getStr() );
return NULL;
@@ -555,7 +555,7 @@ SetString( uno::Any& rAny, const gchar * value )
{
rtl::OString aFontName( value );
- if( aFontName.getLength() )
+ if( !aFontName.isEmpty() )
{
rAny = uno::makeAny( rtl::OStringToOUString( aFontName, RTL_TEXTENCODING_UTF8 ) );
return true;
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index e118f56cee2a..7141ded7f721 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -653,7 +653,7 @@ void GtkData::Init()
// Set consistant name of the root accessible
rtl::OUString aAppName = Application::GetAppName();
- if( aAppName.getLength() > 0 )
+ if( !aAppName.isEmpty() )
{
rtl::OString aPrgName = rtl::OUStringToOString(aAppName, aEnc);
g_set_prgname(aPrgName.getStr());
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() );
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 84ab2a903dce..e4856bde95c8 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1949,7 +1949,7 @@ void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
void GtkSalFrame::updateWMClass()
{
rtl::OString aResClass = rtl::OUStringToOString(m_sWMClass, RTL_TEXTENCODING_ASCII_US);
- const char *pResClass = aResClass.getLength() ? aResClass.getStr() :
+ const char *pResClass = !aResClass.isEmpty() ? aResClass.getStr() :
SalGenericSystem::getFrameClassName();
Display *display;
@@ -4112,7 +4112,7 @@ gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pCon
{
sal_uInt32 nPosition = xText->getCaretPosition();
rtl::OUString sAllText = xText->getText();
- if (!sAllText.getLength())
+ if (sAllText.isEmpty())
return sal_False;
rtl::OString sUTF = rtl::OUStringToOString(sAllText, RTL_TEXTENCODING_UTF8);
rtl::OUString sCursorText(sAllText.copy(0, nPosition));