Kaydet (Commit) f315a959 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Julien Nabet

cppcheck: knownConditionTrueFalse 'bValid' is always true

Change-Id: I3f73641286020a06a605867726d54376c47a06dc
Reviewed-on: https://gerrit.libreoffice.org/42134Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 69057cd1
...@@ -1002,23 +1002,10 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry ) ...@@ -1002,23 +1002,10 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
ScopedVclPtrInstance< CuiInputDialog > xNewDlg( static_cast<vcl::Window*>(this), InputDialogMode::RENAME ); ScopedVclPtrInstance< CuiInputDialog > xNewDlg( static_cast<vcl::Window*>(this), InputDialogMode::RENAME );
xNewDlg->SetObjectName( aNewName ); xNewDlg->SetObjectName( aNewName );
bool bValid; if ( !xNewDlg->Execute() || xNewDlg->GetObjectName().isEmpty() )
do return; // user hit cancel or hit OK with nothing in the editbox
{
if ( xNewDlg->Execute() && !xNewDlg->GetObjectName().isEmpty() ) aNewName = xNewDlg->GetObjectName();
{
OUString aUserSuppliedName = xNewDlg->GetObjectName();
bValid = true;
if( bValid )
aNewName = aUserSuppliedName;
}
else
{
// user hit cancel or hit OK with nothing in the editbox
return;
}
}
while ( !bValid );
Sequence< Any > args( 1 ); Sequence< Any > args( 1 );
args[ 0 ] <<= aNewName; args[ 0 ] <<= aNewName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment