[Libreoffice-commits] core.git: basctl/source cui/source include/sfx2 reportdesign/source sc/source sd/inc sd/source sfx2/source starmath/source svx/source sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Mar 16 07:25:33 UTC 2018
basctl/source/basicide/basides1.cxx | 20 ++++----
cui/source/dialogs/cuihyperdlg.cxx | 3 -
include/sfx2/sfxsids.hrc | 52 +++++++++++----------
reportdesign/source/ui/report/ReportController.cxx | 2
sc/source/ui/drawfunc/drawsh5.cxx | 2
sc/source/ui/optdlg/tpview.cxx | 2
sc/source/ui/view/formatsh.cxx | 2
sc/source/ui/view/prevwsh.cxx | 8 +--
sc/source/ui/view/tabvwsh3.cxx | 8 +--
sc/source/ui/view/tabvwshb.cxx | 3 -
sd/inc/app.hrc | 2
sd/source/filter/grf/sdgrffilter.cxx | 2
sd/source/ui/docshell/docshel3.cxx | 11 ++--
sd/source/ui/docshell/docshel4.cxx | 10 ++--
sd/source/ui/func/fuformatpaintbrush.cxx | 2
sd/source/ui/func/fuscale.cxx | 4 -
sd/source/ui/func/futempl.cxx | 6 +-
sd/source/ui/view/drviews2.cxx | 8 +--
sd/source/ui/view/drviews3.cxx | 2
sd/source/ui/view/drviewse.cxx | 2
sd/source/ui/view/outlnvs2.cxx | 8 +--
sd/source/ui/view/outlnvsh.cxx | 2
sfx2/source/dialog/dinfdlg.cxx | 16 ++----
sfx2/source/doc/objserv.cxx | 4 -
starmath/source/view.cxx | 2
svx/source/dialog/imapwnd.cxx | 2
sw/source/ui/config/optload.cxx | 2
sw/source/ui/config/optpage.cxx | 2
sw/source/uibase/uiview/view1.cxx | 3 -
29 files changed, 92 insertions(+), 100 deletions(-)
New commits:
commit b8512a1cc771b0bce7305ed5930524e1527b1cc1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Mar 15 16:40:37 2018 +0200
use more TypedWhichId in sfxsids
Change-Id: I136427319ce2f1117501517efec2f03019bbf71e
Reviewed-on: https://gerrit.libreoffice.org/51339
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index a1f4f07f18cf..95025f859bf9 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -284,7 +284,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
{
if ( rReq.GetArgs() )
{
- const SfxUInt16Item &rTabId = static_cast<const SfxUInt16Item&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID ));
+ const SfxUInt16Item &rTabId = rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID );
Organize( rTabId.GetValue() );
}
else
@@ -300,7 +300,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_EDITMACRO:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxMacroInfoItem& rInfo = static_cast<const SfxMacroInfoItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO ));
+ const SfxMacroInfoItem& rInfo = rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO );
BasicManager* pBasMgr = const_cast<BasicManager*>(rInfo.GetBasicManager());
DBG_ASSERT( pBasMgr, "Nothing selected in basic tree?" );
@@ -367,8 +367,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_NAMECHANGEDONTAB:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxUInt16Item &rTabId = static_cast<const SfxUInt16Item&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID ));
- const SfxStringItem &rModName = static_cast<const SfxStringItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MODULENAME ));
+ const SfxUInt16Item &rTabId = rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID );
+ const SfxStringItem &rModName = rReq.GetArgs()->Get(SID_BASICIDE_ARG_MODULENAME );
if ( aWindowTable.find( rTabId.GetValue() ) != aWindowTable.end() )
{
VclPtr<BaseWindow> pWin = aWindowTable[ rTabId.GetValue() ];
@@ -419,7 +419,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_UPDATEMODULESOURCE:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxMacroInfoItem& rInfo = static_cast<const SfxMacroInfoItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO ));
+ const SfxMacroInfoItem& rInfo = rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO );
BasicManager* pBasMgr = const_cast<BasicManager*>(rInfo.GetBasicManager());
DBG_ASSERT( pBasMgr, "Store source: No BasMgr?" );
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
@@ -454,10 +454,10 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_LIBLOADED:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SfxUnoAnyItem& rShellItem = static_cast<const SfxUnoAnyItem&>(rReq.GetArgs()->Get( SID_BASICIDE_ARG_DOCUMENT_MODEL ));
+ const SfxUnoAnyItem& rShellItem = rReq.GetArgs()->Get( SID_BASICIDE_ARG_DOCUMENT_MODEL );
uno::Reference< frame::XModel > xModel( rShellItem.GetValue(), UNO_QUERY );
ScriptDocument aDocument( xModel.is() ? ScriptDocument( xModel ) : ScriptDocument::getApplicationScriptDocument() );
- const SfxStringItem& rLibNameItem = static_cast<const SfxStringItem&>(rReq.GetArgs()->Get( SID_BASICIDE_ARG_LIBNAME ));
+ const SfxStringItem& rLibNameItem = rReq.GetArgs()->Get( SID_BASICIDE_ARG_LIBNAME );
const OUString& aLibName( rLibNameItem.GetValue() );
if ( nSlot == SID_BASICIDE_LIBSELECTED )
@@ -531,7 +531,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_SBXINSERTED:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
+ const SbxItem& rSbxItem = rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
const ScriptDocument& aDocument( rSbxItem.GetDocument() );
const OUString& aLibName( rSbxItem.GetLibName() );
const OUString& aName( rSbxItem.GetName() );
@@ -547,7 +547,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_SBXDELETED:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
+ const SbxItem& rSbxItem = rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
const ScriptDocument& aDocument( rSbxItem.GetDocument() );
VclPtr<BaseWindow> pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), true );
if ( pWin )
@@ -557,7 +557,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_SHOWSBX:
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
- const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
+ const SbxItem& rSbxItem = rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
const ScriptDocument& aDocument( rSbxItem.GetDocument() );
const OUString& aLibName( rSbxItem.GetLibName() );
const OUString& aName( rSbxItem.GetName() );
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index b592dd338970..390df7e4df85 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -201,8 +201,7 @@ void SvxHpLinkDlg::Apply()
{
pCurrentPage->FillItemSet( &aItemSet );
- const SvxHyperlinkItem *aItem = static_cast<const SvxHyperlinkItem *>(
- aItemSet.GetItem (SID_HYPERLINK_SETLINK));
+ const SvxHyperlinkItem *aItem = aItemSet.GetItem(SID_HYPERLINK_SETLINK);
if ( !aItem->GetURL().isEmpty() )
GetDispatcher()->ExecuteList(SID_HYPERLINK_SETLINK,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { aItem });
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 6fbdaa4f281e..739fdef24736 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -21,6 +21,12 @@
#include <svl/solar.hrc>
#include <svl/memberid.h>
+#include <svl/typedwhich.hxx>
+
+class SvxZoomItem;
+class SfxUInt16Item;
+class SvxHyperlinkItem;
+class SfxDocumentInfoItem;
// Please be careful:
// Changing just one part here doesn't add new
@@ -70,7 +76,7 @@
#define SID_PROGRESS_STATUSBAR_CONTROL (SID_SFX_START + 1597)
-#define SID_SELECTION (SID_SFX_START + 346)
+#define SID_SELECTION TypedWhichId<SfxBoolItem>(SID_SFX_START + 346)
// 360-400 see SID_MAIL_...
@@ -156,7 +162,7 @@
#define SID_EXPLORER_FILEPROPS_START (SID_SFX_START + 1390)
// SID_EXPLORER_FILEPROPS_END (SID_SFX_START + 1399)
-#define SID_ATTR_ZOOM (SID_SVX_START + 0)
+#define SID_ATTR_ZOOM TypedWhichId<SvxZoomItem>(SID_SVX_START + 0)
#define SID_EXPLORER_PROPS_START (SID_SFX_START + 1410)
// SID_EXPLORER_PROPS_END (SID_SFX_START + 1499)
@@ -257,7 +263,7 @@
#define SID_VIEW_DATA (SID_SFX_START + 1582)
#define SID_SILENT (SID_SFX_START + 528)
#define SID_HIDDEN (SID_SFX_START + 534)
-#define SID_PREVIEW (SID_SFX_START + 1404)
+#define SID_PREVIEW TypedWhichId<SfxBoolItem>(SID_SFX_START + 1404)
#define SID_FOCUSURLBOX (SID_SFX_START + 1406)
@@ -274,7 +280,7 @@
#define SID_DOC_LOADING (SID_SFX_START + 585)
#define SID_IMG_LOADING (SID_SFX_START + 586)
#define SID_DOC_SAVED (SID_SFX_START + 599)
-#define SID_DOCINFO (SID_SFX_START + 535)
+#define SID_DOCINFO TypedWhichId<SfxDocumentInfoItem>(SID_SFX_START + 535)
#define SID_DOCINFO_KEYWORDS (SID_SFX_START + 591)
#define SID_DOCINFO_COMMENTS (SID_SFX_START + 592)
#define SID_DOCINFO_AUTHOR (SID_SFX_START + 593)
@@ -288,7 +294,7 @@
#define SID_MODIFIER (SID_SFX_START + 669)
#define SID_SETOPTIONS (SID_SFX_START + 670)
#define SID_SOURCEVIEW (SID_SFX_START + 675)
-#define SID_DOC_STARTPRESENTATION (SID_SFX_START + 695)
+#define SID_DOC_STARTPRESENTATION TypedWhichId<SfxBoolItem>(SID_SFX_START + 695)
#define SID_DDE_RECONNECT_ONLOAD (SID_SFX_START + 696)
#define SID_DOCTEMPLATE (SID_SFX_START + 538)
@@ -314,8 +320,8 @@
#define SID_STYLE_EDIT (SID_SFX_START + 550)
#define SID_STYLE_DELETE (SID_SFX_START + 551)
#define SID_STYLE_APPLY (SID_SFX_START + 552)
-#define SID_STYLE_FAMILY (SID_SFX_START + 553)
-#define SID_STYLE_FAMILYNAME (SID_SFX_START + 566)
+#define SID_STYLE_FAMILY TypedWhichId<SfxUInt16Item>(SID_SFX_START + 553)
+#define SID_STYLE_FAMILYNAME TypedWhichId<SfxStringItem>(SID_SFX_START + 566)
#define SID_STYLE_WATERCAN (SID_SFX_START + 554)
#define SID_STYLE_NEW_BY_EXAMPLE (SID_SFX_START + 555)
#define SID_STYLE_UPDATE_BY_EXAMPLE (SID_SFX_START + 556)
@@ -326,7 +332,7 @@
#define SID_STYLE_HIDE (SID_SFX_START + 1603)
#define SID_STYLE_SHOW (SID_SFX_START + 1604)
#define SID_STYLE_UPD_BY_EX_NAME (SID_SFX_START + 1585)
-#define SID_STYLE_REFERENCE (SID_SFX_START + 1602)
+#define SID_STYLE_REFERENCE TypedWhichId<SfxStringItem>(SID_SFX_START + 1602)
#define SID_TEMPLATE_NAME (SID_SFX_START + 660)
#define SID_TEMPLATE_REGIONNAME (SID_SFX_START + 662)
@@ -349,7 +355,7 @@
// Doc-Properties
#define SID_DOCFULLNAME (SID_SFX_START + 581)
#define SID_DOCPATH (SID_SFX_START + 582)
-#define SID_DOCTITLE (SID_SFX_START + 583)
+#define SID_DOCTITLE TypedWhichId<SfxStringItem>(SID_SFX_START + 583)
#define SID_DOCUMENT (SID_SFX_START + 588)
@@ -381,7 +387,7 @@
#define SID_DELETE (SID_SFX_START + 713)
#define SID_BACKSPACE (SID_SFX_START + 714)
-#define SID_FORMATPAINTBRUSH (SID_SFX_START + 715)
+#define SID_FORMATPAINTBRUSH TypedWhichId<SfxBoolItem>(SID_SFX_START + 715)
#define SID_SELECT (SID_SFX_START + 720)
#define SID_SELECTALL (SID_SFX_START + 723)
#define SID_CURSORDOWN (SID_SFX_START + 731)
@@ -423,7 +429,7 @@
#define SID_SHOWPOPUPS (SID_SFX_START + 929)
// Item-Id for the assigned event Tabpage
-#define SID_ATTR_MACROITEM (SID_SFX_START + 934)
+#define SID_ATTR_MACROITEM TypedWhichId<SvxMacroItem>(SID_SFX_START + 934)
#define SID_OPTIONS (SID_SFX_START + 940)
#define SID_BASICLOAD (SID_SFX_START + 951)
@@ -444,7 +450,7 @@
#define SID_BASICBREAK (SID_SFX_START +1521)
-#define SID_OBJECTRESIZE (SID_SFX_START + 1000)
+#define SID_OBJECTRESIZE TypedWhichId<SfxRectangleItem>(SID_SFX_START + 1000)
#define SID_EVENTCONFIG (SID_SFX_START + 1101)
#define SID_VERB_START (SID_SFX_START + 1100)
@@ -466,7 +472,7 @@
// GeneralTabPage
-#define SID_ATTR_METRIC (SID_OPTIONS_START + 8)
+#define SID_ATTR_METRIC TypedWhichId<SfxUInt16Item>(SID_OPTIONS_START + 8)
#define SID_ATTR_DEFTABSTOP (SID_OPTIONS_START + 14)
#define SID_ATTR_BUTTON_OUTSTYLE3D (SID_OPTIONS_START + 62)
#define SID_ATTR_BUTTON_BIGSIZE (SID_OPTIONS_START + 63)
@@ -524,12 +530,12 @@
#define SID_SIZE_PAGE (SID_SVX_START + 100)
#define SID_GALLERY_BG_BRUSH (SID_SVX_START + 279)
#define SID_SEARCH_OPTIONS (SID_SVX_START + 281)
-#define SID_SEARCH_ITEM (SID_SVX_START + 291)
+#define SID_SEARCH_ITEM TypedWhichId<SvxSearchItem>(SID_SVX_START + 291)
#define SID_SIDEBAR (SID_SVX_START + 336)
#define SID_NOTEBOOKBAR (SID_SVX_START + 338)
#define SID_MENUBAR (SID_SVX_START + 339)
#define SID_HYPERLINK_GETLINK (SID_SVX_START + 361)
-#define SID_HYPERLINK_SETLINK (SID_SVX_START + 362)
+#define SID_HYPERLINK_SETLINK TypedWhichId<SvxHyperlinkItem>(SID_SVX_START + 362)
#define SID_INFOBAR (SID_SVX_START + 365)
#define SID_NAVIGATOR (SID_SVX_START + 366)
#define SID_ZOOM_NEXT (SID_SVX_START + 402)
@@ -578,11 +584,11 @@
#define SID_BASICIDE_SBXRENAMED ( SID_BASICIDE_START + 26 )
#define SID_BASICIDE_LIBLOADED ( SID_BASICIDE_START + 27 )
#define SID_BASICIDE_LIBREMOVED ( SID_BASICIDE_START + 28 )
-#define SID_BASICIDE_ARG_TABID ( SID_BASICIDE_START + 30 )
-#define SID_BASICIDE_ARG_SBX ( SID_BASICIDE_START + 31 )
-#define SID_BASICIDE_ARG_MACROINFO ( SID_BASICIDE_START + 32 )
-#define SID_BASICIDE_ARG_LIBNAME ( SID_BASICIDE_START + 34 )
-#define SID_BASICIDE_ARG_MODULENAME ( SID_BASICIDE_START + 35 )
+#define SID_BASICIDE_ARG_TABID TypedWhichId<SfxUInt16Item>( SID_BASICIDE_START + 30 )
+#define SID_BASICIDE_ARG_SBX TypedWhichId<SbxItem>( SID_BASICIDE_START + 31 )
+#define SID_BASICIDE_ARG_MACROINFO TypedWhichId<SfxMacroInfoItem>( SID_BASICIDE_START + 32 )
+#define SID_BASICIDE_ARG_LIBNAME TypedWhichId<SfxStringItem>( SID_BASICIDE_START + 34 )
+#define SID_BASICIDE_ARG_MODULENAME TypedWhichId<SfxStringItem>( SID_BASICIDE_START + 35 )
#define SID_BASICIDE_BRKPNTSCHANGED ( SID_BASICIDE_START + 36 )
#define SID_BASICIDE_STAT_POS ( SID_BASICIDE_START + 38 )
#define SID_BASICIDE_STAT_DATE ( SID_BASICIDE_START + 39 )
@@ -590,13 +596,13 @@
#define SID_BASICIDE_MANAGEBRKPNTS ( SID_BASICIDE_START + 42 )
#define SID_BASICIDE_TOGGLEBRKPNTENABLED ( SID_BASICIDE_START + 43 )
#define SID_BASICIDE_SHOWWINDOW ( SID_BASICIDE_START + 44 )
-#define SID_BASICIDE_ARG_DOCUMENT ( SID_BASICIDE_START + 45 )
+#define SID_BASICIDE_ARG_DOCUMENT TypedWhichId<SfxUnoAnyItem>( SID_BASICIDE_START + 45 )
#define SID_BASICIDE_ARG_NAME ( SID_BASICIDE_START + 46 )
#define SID_BASICIDE_ARG_TYPE ( SID_BASICIDE_START + 47 )
#define SID_BASICIDE_ARG_LINE ( SID_BASICIDE_START + 48 )
#define SID_BASICIDE_ARG_COLUMN1 ( SID_BASICIDE_START + 49 )
#define SID_BASICIDE_ARG_COLUMN2 ( SID_BASICIDE_START + 50 )
-#define SID_BASICIDE_ARG_DOCUMENT_MODEL ( SID_BASICIDE_START + 51 )
+#define SID_BASICIDE_ARG_DOCUMENT_MODEL TypedWhichId<SfxUnoAnyItem>( SID_BASICIDE_START + 51 )
#define SID_BASICIDE_MANAGE_LANG ( SID_BASICIDE_START + 52 )
#define SID_BASICIDE_CURRENT_LANG ( SID_BASICIDE_START + 53 )
#define SID_OPTIONS_TREEDIALOG ( SID_BASICIDE_START + 862)
@@ -626,7 +632,7 @@
#define SID_CURSOREND_SEL (SID_KEYFUNC_START + 13)
#define SID_REPAINT (SID_SC_START + 12)
-#define SID_MODIFIED (SID_SD_START+89)
+#define SID_MODIFIED TypedWhichId<SfxBoolItem>(SID_SD_START+89)
#define ID_VAL_DUMMY0 (SID_SD_START+230)
#define SID_SIZE_OPTIMAL (SID_SD_START+99)
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index f440916d3bdc..dab9dd56d237 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4194,7 +4194,7 @@ void OReportController::openZoomDialog()
if ( !bCancel )
{
- const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(pDlg->GetOutputItemSet()->Get( SID_ATTR_ZOOM ));
+ const SvxZoomItem& rZoomItem = pDlg->GetOutputItemSet()->Get( SID_ATTR_ZOOM );
m_eZoomType = rZoomItem.GetType();
m_nZoomValue = rZoomItem.GetValue();
if ( m_eZoomType != SvxZoomType::PERCENT )
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index c426ef2c43dd..52fd6c6b37ab 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -667,7 +667,7 @@ void ScDrawShell::ExecFormatPaintbrush( const SfxRequest& rReq )
bool bLock = false;
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
- bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue();
+ bLock = pArgs->Get(SID_FORMATPAINTBRUSH).GetValue();
ScDrawView* pDrawView = pViewData->GetScDrawView();
if ( pDrawView && pDrawView->AreObjectsMarked() )
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 39d420f7f827..a7151bded5e7 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -527,7 +527,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet )
m_pUnitLB->SetNoSelection();
if ( rCoreSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
{
- const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(rCoreSet->Get( SID_ATTR_METRIC ));
+ const SfxUInt16Item& rItem = rCoreSet->Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = static_cast<FieldUnit>(rItem.GetValue());
for ( sal_Int32 i = 0; i < m_pUnitLB->GetEntryCount(); ++i )
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 0e10b9646efe..ce6114d78766 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2798,7 +2798,7 @@ void ScFormatShell::ExecFormatPaintbrush( const SfxRequest& rReq )
bool bLock = false;
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
- bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue();
+ bLock = pArgs->Get(SID_FORMATPAINTBRUSH).GetValue();
// in case of multi selection, deselect all and use the cursor position
ScRange aDummy;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 4acbaf1d8796..2067dd94687d 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -610,8 +610,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
if ( pReqArgs )
{
- const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(
- pReqArgs->Get(SID_ATTR_ZOOM));
+ const SvxZoomItem& rZoomItem = pReqArgs->Get(SID_ATTR_ZOOM);
eZoom = rZoomItem.GetType();
nZoom = rZoomItem.GetValue();
@@ -633,9 +632,8 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
if ( !bCancel )
{
- const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(
- pDlg->GetOutputItemSet()->
- Get( SID_ATTR_ZOOM ));
+ const SvxZoomItem& rZoomItem = pDlg->GetOutputItemSet()->
+ Get( SID_ATTR_ZOOM );
eZoom = rZoomItem.GetType();
nZoom = rZoomItem.GetValue();
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 4c9fae9e1a11..1248d4e5576c 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -698,8 +698,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( pReqArgs )
{
- const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(
- pReqArgs->Get(SID_ATTR_ZOOM));
+ const SvxZoomItem& rZoomItem = pReqArgs->Get(SID_ATTR_ZOOM);
eNewZoomType = rZoomItem.GetType();
nZoom = rZoomItem.GetValue();
@@ -739,9 +738,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// so no need to check again pDlg
if ( !bCancel )
{
- const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(
- pDlg->GetOutputItemSet()->
- Get( SID_ATTR_ZOOM ));
+ const SvxZoomItem& rZoomItem = pDlg->GetOutputItemSet()->
+ Get( SID_ATTR_ZOOM );
eNewZoomType = rZoomItem.GetType();
nZoom = rZoomItem.GetValue();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 034fa38d2296..062a02f82247 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -372,8 +372,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
if ( pClient && pClient->IsObjectInPlaceActive() )
{
- const SfxRectangleItem& rRect =
- static_cast<const SfxRectangleItem&>(rReq.GetArgs()->Get(SID_OBJECTRESIZE));
+ const SfxRectangleItem& rRect = rReq.GetArgs()->Get(SID_OBJECTRESIZE);
tools::Rectangle aRect( pWin->PixelToLogic( rRect.GetValue() ) );
if ( pView->AreObjectsMarked() )
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 01e55838560e..8571af94c10c 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -140,7 +140,7 @@
#define SID_STATUS_PAGE (SID_SD_START+86)
#define SID_STATUS_LAYOUT (SID_SD_START+87)
#define SID_STATUS_SELMODE (SID_SD_START+88)
-#define SID_MODIFIED (SID_SD_START+89)
+#define SID_MODIFIED TypedWhichId<SfxBoolItem>(SID_SD_START+89)
#define SID_OBJECT_CROOK_ROTATE (SID_SD_START+90)
#define SID_OBJECT_CROOK_SLANT (SID_SD_START+91)
#define SID_OBJECT_CROOK_STRETCH (SID_SD_START+92)
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index d5dd2d1cedfb..522f2bab8fc4 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -289,7 +289,7 @@ bool SdGRFFilter::Export()
// take selection if needed
if( ( SfxItemState::SET == pSet->GetItemState( SID_SELECTION ) )
- && static_cast< const SfxBoolItem& >( pSet->Get( SID_SELECTION ) ).GetValue()
+ && pSet->Get( SID_SELECTION ).GetValue()
&& pDrawViewShell )
{
uno::Reference< view::XSelectionSupplier > xSelectionSupplier(
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index c49841bcb969..de61d9c25eb0 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -145,9 +145,9 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if (pReqArgs)
{
- const SvxSearchItem* pSearchItem = static_cast<const SvxSearchItem*>( &pReqArgs->Get(SID_SEARCH_ITEM) );
+ const SvxSearchItem & rSearchItem = pReqArgs->Get(SID_SEARCH_ITEM);
- SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>(pSearchItem->Clone())));
+ SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>(rSearchItem.Clone())));
}
rReq.Done();
@@ -208,11 +208,10 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if( xFuSearch.is() )
{
- const SvxSearchItem* pSearchItem =
- static_cast<const SvxSearchItem*>( &pReqArgs->Get(SID_SEARCH_ITEM) );
+ const SvxSearchItem& rSearchItem = pReqArgs->Get(SID_SEARCH_ITEM);
- SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>( pSearchItem->Clone() )));
- xFuSearch->SearchAndReplace(pSearchItem);
+ SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>( rSearchItem.Clone() )));
+ xFuSearch->SearchAndReplace(&rSearchItem);
}
}
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 33d351e05d15..426b09b7e2d7 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -281,13 +281,13 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
if( pSet )
{
- if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
+ if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && pSet->Get( SID_PREVIEW ).GetValue() )
{
mpDoc->SetStarDrawPreviewMode( true );
}
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
+ pSet->Get( SID_DOC_STARTPRESENTATION ).GetValue() )
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );
@@ -420,7 +420,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
if( pSet )
{
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
+ pSet->Get( SID_DOC_STARTPRESENTATION ).GetValue() )
{
mpDoc->SetStartWithPresentation( true );
@@ -451,13 +451,13 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
if( pSet )
{
- if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
+ if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && pSet->Get( SID_PREVIEW ).GetValue() )
{
mpDoc->SetStarDrawPreviewMode( true );
}
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
+ pSet->Get( SID_DOC_STARTPRESENTATION ).GetValue() )
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx
index 1d19e9cc9ebc..bcdf46996c5c 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -65,7 +65,7 @@ void FuFormatPaintBrush::DoExecute( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
{
- mbPermanent = static_cast<const SfxBoolItem &>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue();
+ mbPermanent = pArgs->Get(SID_FORMATPAINTBRUSH).GetValue();
}
if( mpView )
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index 7cb45019018d..5b2505985d27 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -134,11 +134,11 @@ void FuScale::DoExecute( SfxRequest& rReq )
if (!mpViewShell)
return;
- switch (static_cast<const SvxZoomItem &>( aArgs.Get (SID_ATTR_ZOOM)).GetType ())
+ switch ( aArgs.Get (SID_ATTR_ZOOM).GetType ())
{
case SvxZoomType::PERCENT:
{
- nValue = static_cast<const SvxZoomItem &>( aArgs.Get (SID_ATTR_ZOOM)).GetValue ();
+ nValue = aArgs.Get (SID_ATTR_ZOOM).GetValue ();
mpViewShell->SetZoom( nValue );
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 89c798af391d..d51f9e25e18e 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -107,12 +107,12 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY,
false, &pItem ))
{
- nFamily = static_cast<SfxStyleFamily>(static_cast<const SfxUInt16Item &>( pArgs->Get( SID_STYLE_FAMILY ) ).GetValue());
+ nFamily = static_cast<SfxStyleFamily>( pArgs->Get( SID_STYLE_FAMILY ).GetValue());
}
else if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME,
false, &pItem ))
{
- OUString sFamily = static_cast<const SfxStringItem &>( pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue();
+ OUString sFamily = pArgs->Get( SID_STYLE_FAMILYNAME ).GetValue();
if (sFamily == "graphics")
nFamily = SfxStyleFamily::Para;
else
@@ -172,7 +172,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SfxItemState::SET)
{
- OUString aParentName(static_cast<const SfxStringItem&>( pArgs->Get(SID_STYLE_REFERENCE)).GetValue());
+ OUString aParentName( pArgs->Get(SID_STYLE_REFERENCE).GetValue());
pStyleSheet->SetParent(aParentName);
}
else
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 6ca5cf90da8a..940ac082849e 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -908,13 +908,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if ( pArgs )
{
- SvxZoomType eZT = static_cast<const SvxZoomItem&>( pArgs->
- Get( SID_ATTR_ZOOM ) ).GetType();
+ SvxZoomType eZT = pArgs->Get( SID_ATTR_ZOOM ).GetType();
switch( eZT )
{
case SvxZoomType::PERCENT:
- SetZoom( static_cast<long>(static_cast<const SvxZoomItem&>( pArgs->
- Get( SID_ATTR_ZOOM ) ).GetValue()) );
+ SetZoom( static_cast<long>( pArgs->Get( SID_ATTR_ZOOM ).GetValue()) );
break;
case SvxZoomType::OPTIMAL:
@@ -2145,7 +2143,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pReqArgs)
{
const SvxHyperlinkItem* pHLItem =
- static_cast<const SvxHyperlinkItem*>( &pReqArgs->Get(SID_HYPERLINK_SETLINK) );
+ &pReqArgs->Get(SID_HYPERLINK_SETLINK);
if (pHLItem->GetInsertMode() == HLINK_FIELD)
{
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 2615d8b7505e..18b5a2978607 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -331,7 +331,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if ( pIPClient && pIPClient->IsObjectInPlaceActive() )
{
const SfxRectangleItem& rRect =
- static_cast<const SfxRectangleItem&>(rReq.GetArgs()->Get(SID_OBJECTRESIZE));
+ rReq.GetArgs()->Get(SID_OBJECTRESIZE);
::tools::Rectangle aRect( GetActiveWindow()->PixelToLogic( rRect.GetValue() ) );
if ( mpDrawView->AreObjectsMarked() )
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index e8111408ef0b..42f4f12e4d19 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -709,7 +709,7 @@ void DrawViewShell::FuDeleteSelectedObjects()
void DrawViewShell::FuSupport(SfxRequest& rReq)
{
if( rReq.GetSlot() == SID_STYLE_FAMILY && rReq.GetArgs())
- GetDocSh()->SetStyleFamily(static_cast<SfxStyleFamily>(static_cast<const SfxUInt16Item&>(rReq.GetArgs()->Get( SID_STYLE_FAMILY )).GetValue()));
+ GetDocSh()->SetStyleFamily(static_cast<SfxStyleFamily>(rReq.GetArgs()->Get( SID_STYLE_FAMILY ).GetValue()));
// We do not execute a thing during a native slide show
if(SlideShow::IsRunning(GetViewShellBase()) &&
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 9400154d44a2..ff5a555756c6 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -89,13 +89,11 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
if ( pArgs )
{
- SvxZoomType eZT = static_cast<const SvxZoomItem&>( pArgs->
- Get( SID_ATTR_ZOOM ) ).GetType();
+ SvxZoomType eZT = pArgs->Get( SID_ATTR_ZOOM ).GetType();
switch( eZT )
{
case SvxZoomType::PERCENT:
- SetZoom( static_cast<long>(static_cast<const SvxZoomItem&>( pArgs->
- Get( SID_ATTR_ZOOM ) ).GetValue()) );
+ SetZoom( static_cast<long>( pArgs->Get( SID_ATTR_ZOOM ).GetValue()) );
Invalidate( SID_ATTR_ZOOM );
Invalidate( SID_ATTR_ZOOMSLIDER );
break;
@@ -368,7 +366,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
if (pReqArgs)
{
const SvxHyperlinkItem* pHLItem =
- static_cast<const SvxHyperlinkItem*>( &pReqArgs->Get(SID_HYPERLINK_SETLINK) );
+ &pReqArgs->Get(SID_HYPERLINK_SETLINK);
SvxFieldItem aURLItem(SvxURLField(pHLItem->GetURL(),
pHLItem->GetName(),
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 0cf769ead03d..30a4dd6693c1 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -411,7 +411,7 @@ void OutlineViewShell::GetCtrlState(SfxItemSet &rSet)
void OutlineViewShell::FuSupport(SfxRequest &rReq)
{
if( rReq.GetSlot() == SID_STYLE_FAMILY && rReq.GetArgs())
- GetDocSh()->SetStyleFamily(static_cast<SfxStyleFamily>(static_cast<const SfxUInt16Item&>(rReq.GetArgs()->Get( SID_STYLE_FAMILY )).GetValue()));
+ GetDocSh()->SetStyleFamily(static_cast<SfxStyleFamily>(rReq.GetArgs()->Get( SID_STYLE_FAMILY ).GetValue()));
bool bPreviewState = false;
sal_uLong nSlot = rReq.GetSlot();
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 415e8af27ad9..141e43ce2742 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -699,7 +699,7 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet)
void SfxDocumentDescPage::Reset(const SfxItemSet *rSet)
{
- m_pInfoItem = const_cast<SfxDocumentInfoItem*>(&static_cast<const SfxDocumentInfoItem &>(rSet->Get(SID_DOCINFO)));
+ m_pInfoItem = const_cast<SfxDocumentInfoItem*>(&rSet->Get(SID_DOCINFO));
m_pTitleEd->SetText( m_pInfoItem->getTitle() );
m_pThemaEd->SetText( m_pInfoItem->getSubject() );
@@ -1006,8 +1006,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet )
void SfxDocumentPage::Reset( const SfxItemSet* rSet )
{
// Determine the document information
- const SfxDocumentInfoItem& rInfoItem =
- static_cast<const SfxDocumentInfoItem &>(rSet->Get(SID_DOCINFO));
+ const SfxDocumentInfoItem& rInfoItem = rSet->Get(SID_DOCINFO);
// template data
if ( rInfoItem.HasTemplate() )
@@ -1166,8 +1165,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
"sfx/ui/documentpropertiesdialog.ui", &rItemSet)
, m_nDocInfoId(0)
{
- const SfxDocumentInfoItem& rInfoItem =
- static_cast<const SfxDocumentInfoItem &>(rItemSet.Get( SID_DOCINFO ));
+ const SfxDocumentInfoItem& rInfoItem = rItemSet.Get( SID_DOCINFO );
#ifdef DBG_UTIL
const SfxStringItem* pURLItem = rItemSet.GetItem<SfxStringItem>(SID_BASEURL, false);
@@ -2191,7 +2189,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
if ( SfxItemState::SET !=
GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) )
- pInfo = const_cast<SfxDocumentInfoItem*>(&static_cast<const SfxDocumentInfoItem& >(rSet->Get( SID_DOCINFO )));
+ pInfo = const_cast<SfxDocumentInfoItem*>(&rSet->Get( SID_DOCINFO ));
else
{
bMustDelete = true;
@@ -2234,7 +2232,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet )
void SfxCustomPropertiesPage::Reset( const SfxItemSet* rItemSet )
{
m_pPropertiesCtrl->ClearAllLines();
- const SfxDocumentInfoItem& rInfoItem = static_cast<const SfxDocumentInfoItem &>(rItemSet->Get(SID_DOCINFO));
+ const SfxDocumentInfoItem& rInfoItem = rItemSet->Get(SID_DOCINFO);
std::vector< CustomProperty* > aCustomProps = rInfoItem.GetCustomProperties();
m_pPropertiesCtrl->SetCustomProperties(aCustomProps);
}
@@ -2659,7 +2657,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
if ( SfxItemState::SET !=
GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) )
- pInfo = const_cast<SfxDocumentInfoItem*>(&static_cast<const SfxDocumentInfoItem& >(rSet->Get( SID_DOCINFO )));
+ pInfo = const_cast<SfxDocumentInfoItem*>(&rSet->Get( SID_DOCINFO ));
else
{
bMustDelete = true;
@@ -2721,7 +2719,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet )
void SfxCmisPropertiesPage::Reset( const SfxItemSet* rItemSet )
{
m_pPropertiesCtrl.ClearAllLines();
- const SfxDocumentInfoItem& rInfoItem = static_cast<const SfxDocumentInfoItem& >(rItemSet->Get(SID_DOCINFO));
+ const SfxDocumentInfoItem& rInfoItem = rItemSet->Get(SID_DOCINFO);
uno::Sequence< document::CmisProperty > aCmisProps = rInfoItem.GetCmisProperties();
for ( sal_Int32 i = 0; i < aCmisProps.getLength(); i++ )
{
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c8c6a06f7540..601b5f5889f8 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1106,13 +1106,13 @@ void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq)
{
case SID_MODIFIED:
{
- SetModified( static_cast<const SfxBoolItem&>(rReq.GetArgs()->Get(SID_MODIFIED)).GetValue() );
+ SetModified( rReq.GetArgs()->Get(SID_MODIFIED).GetValue() );
rReq.Done();
break;
}
case SID_DOCTITLE:
- SetTitle( static_cast<const SfxStringItem&>(rReq.GetArgs()->Get(SID_DOCTITLE)).GetValue() );
+ SetTitle( rReq.GetArgs()->Get(SID_DOCTITLE).GetValue() );
rReq.Done();
break;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 87aff89a864f..9cbb38e075a7 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2004,7 +2004,7 @@ bool SmViewShell::IsInlineEditEnabled() const
void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet)
{
assert(pSet);
- const SvxZoomItem &rZoom = static_cast<const SvxZoomItem &>(pSet->Get(SID_ATTR_ZOOM));
+ const SvxZoomItem &rZoom = pSet->Get(SID_ATTR_ZOOM);
switch( rZoom.GetType() )
{
case SvxZoomType::PERCENT:
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 234c96c74f26..da1a22a37ed9 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -651,7 +651,7 @@ void IMapWindow::DoMacroAssign()
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
- pIMapObj->SetMacroTable( static_cast<const SvxMacroItem& >(pOutSet->Get( SID_ATTR_MACROITEM )).GetMacroTable() );
+ pIMapObj->SetMacroTable( pOutSet->Get( SID_ATTR_MACROITEM ).GetMacroTable() );
pModel->SetChanged();
UpdateInfo( false );
}
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index d8f7f929e5ba..1ea83ac0cccb 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -323,7 +323,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet)
m_pMetricLB->SetNoSelection();
if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
{
- const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(rSet->Get( SID_ATTR_METRIC ));
+ const SfxUInt16Item& rItem = rSet->Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = static_cast<FieldUnit>(rItem.GetValue());
for ( sal_Int32 i = 0; i < m_pMetricLB->GetEntryCount(); ++i )
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 1bfa450b605f..115043bd30c1 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1241,7 +1241,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet)
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
{
- const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(rSet->Get( SID_ATTR_METRIC ));
+ const SfxUInt16Item& rItem = rSet->Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = static_cast<FieldUnit>(rItem.GetValue());
::SetFieldUnit( *m_pRowMoveMF, eFieldUnit );
::SetFieldUnit( *m_pColMoveMF, eFieldUnit );
diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx
index c5c70feaf26c..6c6ab090f989 100644
--- a/sw/source/uibase/uiview/view1.cxx
+++ b/sw/source/uibase/uiview/view1.cxx
@@ -176,8 +176,7 @@ void SwView::ExecFormatPaintbrush(SfxRequest const & rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 1 )
{
- bPersistentCopy = static_cast<const SfxBoolItem &>(pArgs->Get(
- SID_FORMATPAINTBRUSH)).GetValue();
+ bPersistentCopy = pArgs->Get(SID_FORMATPAINTBRUSH).GetValue();
}
m_pFormatClipboard->Copy( GetWrtShell(), GetPool(), bPersistentCopy );
More information about the Libreoffice-commits
mailing list