summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-19 15:58:58 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 10:07:31 +0200
commit3af99e4d59d89c343965a928681a30f36b1007d2 (patch)
tree2389765131bdb92817e98bc922ffecbf0184d69b /vcl
parentd665e058246631c8a838c3a731bdd0c56be27903 (diff)
convert equalsAsciiL calls to startsWith calls
Convert code like: aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) ) to aStr.startsWith( "ActiveConnection" ) which compiles down to the same machine code. Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 5378194ccada..7d2790cf6c8c 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -557,7 +557,7 @@ GtkPrintDialog::impl_initCustomTab()
if ( aPropertyName == "PrintContent" )
bGtkInternal = true;
- if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Group")) || !pCurParent)
+ if (aCtrlType.startsWith("Group") || !pCurParent)
{
pCurTabPage = gtk_vbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(pCurTabPage), 6);
@@ -566,7 +566,7 @@ GtkPrintDialog::impl_initCustomTab()
pCurParent = pCurTabPage;
aCustomTabs.push_back(std::make_pair(pCurTabPage, aText));
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Subgroup")) && (pCurParent /*|| bOnJobPageValue*/))
+ else if (aCtrlType.startsWith("Subgroup") && (pCurParent /*|| bOnJobPageValue*/))
{
bIgnoreSubgroup = bIgnore;
if (bIgnore)
@@ -600,7 +600,7 @@ GtkPrintDialog::impl_initCustomTab()
GtkWidget* pWidget = NULL;
beans::PropertyValue* pVal = NULL;
- if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bool")) && pCurParent)
+ if (aCtrlType.startsWith("Bool") && pCurParent)
{
pWidget = gtk_check_button_new_with_mnemonic(
OUStringToOString(aText, RTL_TEXTENCODING_UTF8).getStr());
@@ -616,7 +616,7 @@ GtkPrintDialog::impl_initCustomTab()
m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
g_signal_connect(pWidget, "toggled", G_CALLBACK(GtkPrintDialog::UIOption_CheckHdl), this);
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Radio")) && pCurParent)
+ else if (aCtrlType.startsWith("Radio") && pCurParent)
{
GtkWidget* const pVbox = gtk_vbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(pVbox), 0);
@@ -653,9 +653,9 @@ GtkPrintDialog::impl_initCustomTab()
else
pWidget = pVbox;
}
- else if ((aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("List")) ||
- aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Range")) ||
- aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Edit"))
+ else if ((aCtrlType.startsWith("List") ||
+ aCtrlType.startsWith("Range") ||
+ aCtrlType.startsWith("Edit")
) && pCurParent)
{
GtkWidget* const pHbox = gtk_hbox_new(FALSE, 12);
@@ -678,7 +678,7 @@ GtkPrintDialog::impl_initCustomTab()
gtk_combo_box_set_active(GTK_COMBO_BOX(pWidget), nSelectVal);
g_signal_connect(pWidget, "changed", G_CALLBACK(GtkPrintDialog::UIOption_SelectHdl), this);
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Edit")) && pCurParent)
+ else if (aCtrlType.startsWith("Edit") && pCurParent)
{
pWidget = gtk_entry_new();
@@ -689,7 +689,7 @@ GtkPrintDialog::impl_initCustomTab()
gtk_entry_set_text(GTK_ENTRY(pWidget),
OUStringToOString(aCurVal, RTL_TEXTENCODING_UTF8).getStr());
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Range")) && pCurParent)
+ else if (aCtrlType.startsWith("Range") && pCurParent)
{
pWidget = gtk_spin_button_new_with_range(nMinValue, nMaxValue, 1.0);