diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-23 01:35:16 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-24 23:22:11 +0100 |
commit | 5131a9d086148c8a0d14a8b7c74e6c5ce46267e6 (patch) | |
tree | ab278a624b50a47c6633b6999fce390e2adbda49 /sw | |
parent | 1e7e296eaea378b63f15c1c2dad0744681986630 (diff) |
Remove temporary OUString by bailing out early
Change-Id: I58e63b11c684d686e0e0830bb4e0e3b7fc9bbc32
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index f14438b69a60..8617752157e2 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1565,30 +1565,28 @@ SwCreateAuthEntryDlg_Impl::~SwCreateAuthEntryDlg_Impl() OUString SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) const { - OUString sRet; if( AUTH_FIELD_AUTHORITY_TYPE == eField ) { OSL_ENSURE(pTypeListBox, "No ListBox"); - sRet = OUString::number(pTypeListBox->GetSelectEntryPos()); + return OUString::number(pTypeListBox->GetSelectEntryPos()); } - else if( AUTH_FIELD_IDENTIFIER == eField && !m_bNewEntryMode) + + if( AUTH_FIELD_IDENTIFIER == eField && !m_bNewEntryMode) { OSL_ENSURE(pIdentifierBox, "No ComboBox"); - sRet = pIdentifierBox->GetText(); + return pIdentifierBox->GetText(); } - else + + for(int nIndex = 0; nIndex < AUTH_FIELD_END; nIndex++) { - for(int nIndex = 0; nIndex < AUTH_FIELD_END; nIndex++) + const TextInfo aCurInfo = aTextInfoArr[nIndex]; + if(aCurInfo.nToxField == eField) { - const TextInfo aCurInfo = aTextInfoArr[nIndex]; - if(aCurInfo.nToxField == eField) - { - sRet = pEdits[nIndex]->GetText(); - break; - } + return pEdits[nIndex]->GetText(); } } - return sRet; + + return OUString(); } IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox*, pBox) |