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 /sc/source/ui/dbgui | |
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 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/dbnamdlg.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 24a1fcefd8d9..e958bf92cc51 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -601,7 +601,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl) if ( theName.isEmpty() ) { - if ( aBtnAdd.GetText() != OUString(aStrAdd) ) + if (aBtnAdd.GetText() != aStrAdd) aBtnAdd.SetText( aStrAdd ); aBtnAdd .Disable(); aBtnRemove .Disable(); @@ -624,7 +624,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl) { if ( bNameFound ) { - if ( aBtnAdd.GetText() != OUString(aStrModify) ) + if (aBtnAdd.GetText() != aStrModify) aBtnAdd.SetText( aStrModify ); if(!bSaved) @@ -636,7 +636,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl) } else { - if ( aBtnAdd.GetText() != OUString(aStrAdd) ) + if (aBtnAdd.GetText() != aStrAdd) aBtnAdd.SetText( aStrAdd ); bSaved=false; |