Kaydet (Commit) 65f70e0d authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Remove these intermediate variables

...and pointless subsequent null check.

Change-Id: I50721a17eeec2f9ee0b515507cdda4ed05ddcae5
üst 1d6a8c4a
......@@ -466,9 +466,9 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
case SID_CHAR_DLG:
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
const SfxStringItem* pItem = 0;
if (nSlot == SID_CHAR_DLG)
pItem = pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) );
pItem = static_cast< const SfxStringItem* >(pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) ) );
if( !pArgs || pItem )
{
......@@ -495,9 +495,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
else if (pItem)
{
const SfxStringItem* pStringItem = static_cast< const SfxStringItem* >(pItem);
if (pStringItem)
pDlg->SetCurPageId(OUStringToOString(pStringItem->GetValue(), RTL_TEXTENCODING_UTF8));
pDlg->SetCurPageId(OUStringToOString(pItem->GetValue(), RTL_TEXTENCODING_UTF8));
}
sal_uInt16 nRet = pDlg->Execute();
......
......@@ -298,9 +298,9 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case SID_CHAR_DLG_FOR_PARAGRAPH:
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
const SfxStringItem* pItem = 0;
if (nSlot == SID_CHAR_DLG)
pItem = pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) );
pItem = static_cast< const SfxStringItem* >(pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) ) );
if( !pArgs || pItem )
{
......@@ -338,9 +338,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
}
else if (pItem)
{
const SfxStringItem* pStringItem = static_cast< const SfxStringItem* >(pItem);
if (pStringItem)
pDlg->SetCurPageId(OUStringToOString(pStringItem->GetValue(), RTL_TEXTENCODING_UTF8));
pDlg->SetCurPageId(OUStringToOString(pItem->GetValue(), RTL_TEXTENCODING_UTF8));
}
sal_uInt16 nRet = pDlg->Execute();
......
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