diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-01-21 21:42:46 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-01-22 11:26:39 +0000 |
commit | fea25896a87aa5826eb243069d34aae7d0333a4c (patch) | |
tree | a41c644ca2efcdc4814d53ee1bd7ae2b9c7b578f /cui/source/dialogs/scriptdlg.cxx | |
parent | c605119a8a69a04e3dcc958d1ac2796d4bb04a9b (diff) |
tools/string.hxx: add operator==/!= for OUString/String
This has the disadvantage that it makes comparisons involving fast
OUString concatenation via operator+ ambiguous, as can be seen in
scriptdlg.cxx, but it allows comparing String and OUString wihout
explicit conversion, which is nice for incrementally converting code.
Change-Id: Ibfc728bdb161a01e0f8311915c97bcbba8b58c0b
Reviewed-on: https://gerrit.libreoffice.org/1803
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'cui/source/dialogs/scriptdlg.cxx')
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index f4b1e9480cf1..944ca6f01f0f 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -910,7 +910,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) } for( sal_Int32 index = 0; index < childNodes.getLength(); index++ ) { - if ( (aNewName+extn) == childNodes[index]->getName() ) + if (OUString(aNewName+extn) == childNodes[index]->getName()) { bFound = sal_True; break; @@ -939,7 +939,8 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) bValid = sal_True; for( sal_Int32 index = 0; index < childNodes.getLength(); index++ ) { - if ( (aUserSuppliedName+extn) == childNodes[index]->getName() ) + if (OUString(aUserSuppliedName+extn) + == childNodes[index]->getName()) { bValid = sal_False; String aError( m_createErrStr ); |