summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-08-28 23:05:47 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2014-08-29 00:53:24 +0300
commit65f70e0d57be14c55063709e86f252f84dab087b (patch)
tree85ef595a52b15a6e4bc87ed217b8b490bfd51477 /sw/source/uibase
parent1d6a8c4a950892bb72b7737209d3e3d8e467adf2 (diff)
Remove these intermediate variables
...and pointless subsequent null check. Change-Id: I50721a17eeec2f9ee0b515507cdda4ed05ddcae5
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/shells/annotsh.cxx8
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx8
2 files changed, 6 insertions, 10 deletions
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index ad5b11cbb2e3..5c74c35007fd 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -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();
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 907dc5a09d91..84b1fa55bbf9 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -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();