accessibility/source/extended/accessibletablistboxtable.cxx |    2 
 cui/source/tabpages/paragrph.cxx                            |    2 
 dbaccess/source/ui/dlg/paramdialog.cxx                      |    2 
 editeng/source/uno/unonrule.cxx                             |    4 
 editeng/source/uno/unotext.cxx                              |    6 -
 filter/source/flash/swfexporter.cxx                         |    2 
 filter/source/msfilter/msdffimp.cxx                         |    2 
 filter/source/xsltfilter/XSLTFilter.cxx                     |    2 
 reportdesign/source/ui/report/ReportController.cxx          |    2 
 sc/source/filter/excel/xlchart.cxx                          |   10 -
 sc/source/filter/excel/xlroot.cxx                           |    2 
 sc/source/filter/orcus/orcusfiltersimpl.cxx                 |    2 
 sc/source/filter/xml/xmlwrap.cxx                            |    2 
 sc/source/ui/docshell/docsh.cxx                             |    3 
 sd/inc/sdattr.hxx                                           |   30 -----
 sd/source/core/sdattr.cxx                                   |   67 ------------
 sd/source/core/stlsheet.cxx                                 |    6 -
 sd/source/filter/html/htmlex.cxx                            |    6 -
 sd/source/filter/xml/sdtransform.cxx                        |    6 -
 sd/source/ui/dlg/dlgolbul.cxx                               |    4 
 sd/source/ui/func/fuchar.cxx                                |    2 
 sd/source/ui/func/fupage.cxx                                |    4 
 sd/source/ui/func/futempl.cxx                               |    4 
 sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx            |    4 
 sd/source/ui/unoidl/unomodel.cxx                            |    8 -
 sd/source/ui/unoidl/unopback.cxx                            |    4 
 sd/source/ui/view/drviews2.cxx                              |    6 -
 sd/source/ui/view/drviewsj.cxx                              |    2 
 sfx2/source/doc/docfile.cxx                                 |    4 
 starmath/source/unomodel.cxx                                |    4 
 svtools/source/config/helpopt.cxx                           |    6 -
 svx/source/dialog/rubydialog.cxx                            |    4 
 svx/source/dialog/srchdlg.cxx                               |    2 
 svx/source/fmcomp/gridcell.cxx                              |    2 
 svx/source/table/cell.cxx                                   |    4 
 svx/source/table/tablelayouter.cxx                          |    2 
 svx/source/tbxctrls/tbcontrl.cxx                            |    4 
 svx/source/toolbars/extrusionbar.cxx                        |   16 +-
 svx/source/toolbars/fontworkbar.cxx                         |    6 -
 svx/source/unodraw/unobrushitemhelper.cxx                   |    2 
 svx/source/unodraw/unoshape.cxx                             |    4 
 sw/qa/extras/odfexport/odfexport.cxx                        |    2 
 sw/source/core/fields/expfld.cxx                            |    2 
 sw/source/core/txtnode/ndtxt.cxx                            |    2 
 sw/source/core/unocore/swunohelper.cxx                      |    2 
 sw/source/core/unocore/unoframe.cxx                         |    8 -
 sw/source/filter/html/htmlform.cxx                          |   10 -
 sw/source/filter/ww8/ww8atr.cxx                             |    4 
 sw/source/filter/ww8/ww8par.cxx                             |    2 
 sw/source/filter/ww8/ww8par4.cxx                            |    3 
 sw/source/ui/dbui/mmresultdialogs.cxx                       |    6 -
 sw/source/ui/index/cntex.cxx                                |    6 -
 sw/source/uibase/config/fontcfg.cxx                         |    2 
 sw/source/uibase/dbui/mailmergehelper.cxx                   |    2 
 sw/source/uibase/shells/drformsh.cxx                        |    2 
 sw/source/uibase/shells/textdrw.cxx                         |    4 
 sw/source/uibase/uiview/viewtab.cxx                         |   12 +-
 sw/source/uibase/uno/unoatxt.cxx                            |    4 
 sw/source/uibase/uno/unotxdoc.cxx                           |    4 
 59 files changed, 117 insertions(+), 216 deletions(-)

New commits:
commit 7139563afe073b0e4e819fdaf7fe285e597f4c5f
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Fri Mar 3 16:42:37 2017 +0200

    make use of the SfxItemSet::GetItem<T> method
    
    Change-Id: I8201429993129b019a6dd51c203a9f8dcbb2253e
    Reviewed-on: https://gerrit.libreoffice.org/34867
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 3c28357..5a3e94cf 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1619,7 +1619,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
         {
             m_pPageNumBox->EnableTriState(false);
             m_pPageNumBox->SetState(TRISTATE_TRUE);
-            SfxUInt16Item const*const pItem(static_cast<const 
SfxUInt16Item*>(rSet->GetItem(_nWhich)));
+            SfxUInt16Item const*const 
pItem(rSet->GetItem<SfxUInt16Item>(_nWhich));
             const sal_uInt16 nPageNum(pItem->GetValue());
             m_pPagenumEdit->SetValue( nPageNum );
             break;
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 70df9b1..99f8884 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -634,7 +634,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const 
SfxItemPropertySimpleEntry* pM
     case EE_FEATURE_FIELD:
         if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET 
)
         {
-            const SvxFieldItem* pItem = static_cast<const 
SvxFieldItem*>(rSet.GetItem( EE_FEATURE_FIELD ));
+            const SvxFieldItem* pItem = rSet.GetItem<SvxFieldItem>( 
EE_FEATURE_FIELD );
             const SvxFieldData* pData = pItem->GetField();
             uno::Reference< text::XTextRange > xAnchor( this );
 
@@ -690,7 +690,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper(  
SfxItemSet& rSet, const SfxIt
             if( eState != SfxItemState::SET && eState != SfxItemState::DEFAULT)
                 throw uno::RuntimeException();
 
-            const SvxNumBulletItem* pBulletItem = static_cast<const 
SvxNumBulletItem*>(rSet.GetItem( EE_PARA_NUMBULLET ));
+            const SvxNumBulletItem* pBulletItem = 
rSet.GetItem<SvxNumBulletItem>( EE_PARA_NUMBULLET );
 
             if( pBulletItem == nullptr )
                 throw uno::RuntimeException();
@@ -731,7 +731,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper(  
SfxItemSet& rSet, const SfxIt
             SfxItemState eState = rSet.GetItemState( EE_PARA_BULLETSTATE );
             if( eState == SfxItemState::SET || eState == SfxItemState::DEFAULT 
)
             {
-                const SfxBoolItem* pItem = static_cast<const 
SfxBoolItem*>(rSet.GetItem( EE_PARA_BULLETSTATE ));
+                const SfxBoolItem* pItem = rSet.GetItem<SfxBoolItem>( 
EE_PARA_BULLETSTATE );
                 bState = pItem->GetValue();
             }
 
diff --git a/sc/source/filter/excel/xlchart.cxx 
b/sc/source/filter/excel/xlchart.cxx
index d4ad17e..c78811f 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -1015,17 +1015,17 @@ void XclChPropSetHelper::WriteEscherProperties( 
ScfPropertySet& rPropSet,
 {
     if( rEscherFmt.mxItemSet )
     {
-        if( const XFillStyleItem* pStyleItem = static_cast< const 
XFillStyleItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLSTYLE, false ) ) )
+        if( const XFillStyleItem* pStyleItem = 
rEscherFmt.mxItemSet->GetItem<XFillStyleItem>( XATTR_FILLSTYLE, false ) )
         {
             switch( pStyleItem->GetValue() )
             {
                 case drawing::FillStyle_SOLID:
                     // #i84812# Excel 2007 writes Escher properties for solid 
fill
-                    if( const XFillColorItem* pColorItem = static_cast< const 
XFillColorItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLCOLOR, false ) ) )
+                    if( const XFillColorItem* pColorItem = 
rEscherFmt.mxItemSet->GetItem<XFillColorItem>( XATTR_FILLCOLOR, false ) )
                     {
                         namespace cssd = ::com::sun::star::drawing;
                         // get solid transparence too
-                        const XFillTransparenceItem* pTranspItem = 
static_cast< const XFillTransparenceItem* >( rEscherFmt.mxItemSet->GetItem( 
XATTR_FILLTRANSPARENCE, false ) );
+                        const XFillTransparenceItem* pTranspItem = 
rEscherFmt.mxItemSet->GetItem<XFillTransparenceItem>( XATTR_FILLTRANSPARENCE, 
false );
                         sal_uInt16 nTransp = pTranspItem ? 
pTranspItem->GetValue() : 0;
                         ScfPropSetHelper& rAreaHlp = GetAreaHelper( ePropMode 
);
                         rAreaHlp.InitializeWrite();
@@ -1034,7 +1034,7 @@ void XclChPropSetHelper::WriteEscherProperties( 
ScfPropertySet& rPropSet,
                     }
                 break;
                 case drawing::FillStyle_GRADIENT:
-                    if( const XFillGradientItem* pGradItem = static_cast< 
const XFillGradientItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLGRADIENT, 
false ) ) )
+                    if( const XFillGradientItem* pGradItem = 
rEscherFmt.mxItemSet->GetItem<XFillGradientItem>( XATTR_FILLGRADIENT, false ) )
                     {
                         Any aGradientAny;
                         if( pGradItem->QueryValue( aGradientAny, 
MID_FILLGRADIENT ) )
@@ -1052,7 +1052,7 @@ void XclChPropSetHelper::WriteEscherProperties( 
ScfPropertySet& rPropSet,
                     }
                 break;
                 case drawing::FillStyle_BITMAP:
-                    if( const XFillBitmapItem* pBmpItem = static_cast< const 
XFillBitmapItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLBITMAP, false ) ) )
+                    if( const XFillBitmapItem* pBmpItem = 
rEscherFmt.mxItemSet->GetItem<XFillBitmapItem>( XATTR_FILLBITMAP, false ) )
                     {
                         Any aBitmapAny;
                         if( pBmpItem->QueryValue( aBitmapAny, MID_GRAFURL ) )
diff --git a/sc/source/filter/excel/xlroot.cxx 
b/sc/source/filter/excel/xlroot.cxx
index 58f37e3..4754fa6 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -125,7 +125,7 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
 
     // document URL and path
     if( const SfxItemSet* pItemSet = mrMedium.GetItemSet() )
-        if( const SfxStringItem* pItem = static_cast< const SfxStringItem* >( 
pItemSet->GetItem( SID_FILE_NAME ) ) )
+        if( const SfxStringItem* pItem = pItemSet->GetItem<SfxStringItem>( 
SID_FILE_NAME ) )
             maDocUrl = pItem->GetValue();
     maBasePath = maDocUrl.copy( 0, maDocUrl.lastIndexOf( '/' ) + 1 );
 
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx 
b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index a27f270..6bac0e9 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -48,7 +48,7 @@ uno::Reference<task::XStatusIndicator> 
getStatusIndicator(SfxMedium& rMedium)
     SfxItemSet* pSet = rMedium.GetItemSet();
     if (pSet)
     {
-        const SfxUnoAnyItem* pItem = static_cast<const 
SfxUsrAnyItem*>(pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL));
+        const SfxUnoAnyItem* pItem = 
pSet->GetItem<SfxUsrAnyItem>(SID_PROGRESS_STATUSBAR_CONTROL);
         if (pItem)
             xStatusIndicator.set(pItem->GetValue(), uno::UNO_QUERY);
     }
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 579c7f0..668531e 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -87,7 +87,7 @@ uno::Reference <task::XStatusIndicator> 
ScXMLImportWrapper::GetStatusIndicator()
         SfxItemSet* pSet = pMedium->GetItemSet();
         if (pSet)
         {
-            const SfxUnoAnyItem* pItem = static_cast<const 
SfxUnoAnyItem*>(pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL));
+            const SfxUnoAnyItem* pItem = 
pSet->GetItem<SfxUnoAnyItem>(SID_PROGRESS_STATUSBAR_CONTROL);
             if (pItem)
                 xStatusIndicator.set(pItem->GetValue(), uno::UNO_QUERY);
         }
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 377fe43..f8baa2e 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2380,8 +2380,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
             bRet = true;
             if ( bHasMemo )
             {
-                const SfxStringItem* pNameItem =
-                    static_cast<const SfxStringItem*>( 
rMed.GetItemSet()->GetItem( SID_FILE_NAME ) );
+                const SfxStringItem* pNameItem = 
rMed.GetItemSet()->GetItem<SfxStringItem>( SID_FILE_NAME );
                 INetURLObject aDbtFile( pNameItem->GetValue(), 
INetProtocol::File );
                 aDbtFile.setExtension("dbt");
                 if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) )
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index a7dd13c..3b9c340 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1099,8 +1099,8 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const 
OUString& PropertyName )
         {
             SfxItemSet &rStyleSet = GetItemSet();
 
-            const XFillBmpStretchItem* pStretchItem = static_cast<const 
XFillBmpStretchItem*>(rStyleSet.GetItem(XATTR_FILLBMP_STRETCH));
-            const XFillBmpTileItem* pTileItem = static_cast<const 
XFillBmpTileItem*>(rStyleSet.GetItem(XATTR_FILLBMP_TILE));
+            const XFillBmpStretchItem* pStretchItem = 
rStyleSet.GetItem<XFillBmpStretchItem>(XATTR_FILLBMP_STRETCH);
+            const XFillBmpTileItem* pTileItem = 
rStyleSet.GetItem<XFillBmpTileItem>(XATTR_FILLBMP_TILE);
 
             if( pStretchItem && pTileItem )
             {
@@ -1228,7 +1228,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( 
const OUString& PropertyN
             case XATTR_LINESTART:
             case XATTR_LINEDASH:
                 {
-                    const NameOrIndex* pItem = static_cast<const 
NameOrIndex*>(rStyleSet.GetItem((sal_uInt16)pEntry->nWID));
+                    const NameOrIndex* pItem = 
rStyleSet.GetItem<NameOrIndex>((sal_uInt16)pEntry->nWID);
                     if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
                         eState = PropertyState_DEFAULT_VALUE;
                 }
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 9c62a04..323a3c3 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -316,7 +316,7 @@ OUString getParagraphStyle( SdrOutliner* pOutliner, 
sal_Int32 nPara )
 
     OUString sStyle;
 
-    if( static_cast<const SvxFrameDirectionItem*>(aParaSet.GetItem( 
EE_PARA_WRITINGDIR ))->GetValue() == FRMDIR_HORI_RIGHT_TOP )
+    if( aParaSet.GetItem<SvxFrameDirectionItem>( EE_PARA_WRITINGDIR 
)->GetValue() == FRMDIR_HORI_RIGHT_TOP )
     {
 
         sStyle = "direction: rtl;";
@@ -830,7 +830,7 @@ void HtmlExport::SetDocColors( SdPage* pPage )
     {
         SfxItemSet& rSet = pSheet->GetItemSet();
         if(rSet.GetItemState(EE_CHAR_COLOR) == SfxItemState::SET)
-            maTextColor = static_cast<const 
SvxColorItem*>(rSet.GetItem(EE_CHAR_COLOR))->GetValue();
+            maTextColor = 
rSet.GetItem<SvxColorItem>(EE_CHAR_COLOR)->GetValue();
     }
 
     // default background from the background of the master page of the first 
page
@@ -1460,7 +1460,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* 
pSet, HtmlState* pState
     OUString aLink, aTarget;
     if ( pSet->GetItemState( EE_FEATURE_FIELD ) == SfxItemState::SET )
     {
-        const SvxFieldItem* pItem = static_cast<const 
SvxFieldItem*>(pSet->GetItem( EE_FEATURE_FIELD ));
+        const SvxFieldItem* pItem = pSet->GetItem<SvxFieldItem>( 
EE_FEATURE_FIELD );
         if(pItem)
         {
             const SvxURLField* pURL = dynamic_cast<const SvxURLField*>( 
pItem->GetField() );
diff --git a/sd/source/filter/xml/sdtransform.cxx 
b/sd/source/filter/xml/sdtransform.cxx
index 726fa02..e8b52ee 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -276,7 +276,7 @@ bool SdTransformOOo2xDocument::getBulletState( const 
SfxItemSet& rSet, sal_uInt1
 {
     if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) )
     {
-        const SvXMLAttrContainerItem& rAttr = *static_cast< const 
SvXMLAttrContainerItem* >( rSet.GetItem( nWhich ) );
+        const SvXMLAttrContainerItem& rAttr = 
*rSet.GetItem<SvXMLAttrContainerItem>( nWhich );
 
         const sal_uInt16 nCount = rAttr.GetAttrCount();
         for( sal_uInt16 nItem = 0; nItem < nCount; nItem++ )
@@ -298,7 +298,7 @@ bool SdTransformOOo2xDocument::transformItemSet( 
SfxItemSet& rSet, bool bNumberi
     bool bRet = false;
     if( bNumbering )
     {
-        SvxLRSpaceItem aItem( *static_cast<const 
SvxLRSpaceItem*>(rSet.GetItem( EE_PARA_LRSPACE )) );
+        SvxLRSpaceItem aItem( *rSet.GetItem<SvxLRSpaceItem>( EE_PARA_LRSPACE ) 
);
         if( (aItem.GetLeft() != 0) || (aItem.GetTextFirstLineOfst() != 0) )
         {
             aItem.SetLeftValue( 0 );
@@ -322,7 +322,7 @@ bool SdTransformOOo2xDocument::removeAlienAttributes( 
SfxItemSet& rSet, sal_uInt
 {
     if( (rSet.GetItemState( nWhich ) == SfxItemState::SET) )
     {
-        const SvXMLAttrContainerItem& rAttr = *static_cast< const 
SvXMLAttrContainerItem* >( rSet.GetItem( nWhich ) );
+        const SvXMLAttrContainerItem& rAttr = 
*rSet.GetItem<SvXMLAttrContainerItem>( nWhich );
 
         const sal_uInt16 nCount = rAttr.GetAttrCount();
         for( sal_uInt16 nItem = 0; nItem < nCount; nItem++ )
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index ae69b2a..6622254 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -112,7 +112,7 @@ OutlineBulletDlg::OutlineBulletDlg(
 
     if(bTitle && aInputSet.GetItemState(EE_PARA_NUMBULLET) == 
SfxItemState::SET )
     {
-        const SvxNumBulletItem* pItem = static_cast<const SvxNumBulletItem*>( 
aInputSet.GetItem(EE_PARA_NUMBULLET) );
+        const SvxNumBulletItem* pItem = 
aInputSet.GetItem<SvxNumBulletItem>(EE_PARA_NUMBULLET);
         SvxNumRule* pRule = pItem->GetNumRule();
         if(pRule)
         {
@@ -187,7 +187,7 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
 
     if(bTitle && pOutputSet->GetItemState(EE_PARA_NUMBULLET) == 
SfxItemState::SET )
     {
-        const SvxNumBulletItem* pBulletItem = static_cast<const 
SvxNumBulletItem*>(pOutputSet->GetItem(EE_PARA_NUMBULLET));
+        const SvxNumBulletItem* pBulletItem = 
pOutputSet->GetItem<SvxNumBulletItem>(EE_PARA_NUMBULLET);
         SvxNumRule* pRule = pBulletItem->GetNumRule();
         if(pRule)
             pRule->SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, false );
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index 91dce94..4a8aedd 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -113,7 +113,7 @@ void FuChar::DoExecute( SfxRequest& rReq )
                 SfxItemSet aOtherSet( *pOutputSet );
 
                 // and now the reverse process
-                const SvxBrushItem* pBrushItem= static_cast<const 
SvxBrushItem*>(aOtherSet.GetItem( SID_ATTR_BRUSH_CHAR ));
+                const SvxBrushItem* pBrushItem = 
aOtherSet.GetItem<SvxBrushItem>( SID_ATTR_BRUSH_CHAR );
 
                 if ( pBrushItem )
                 {
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 15682c4..cd9c99b 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -362,9 +362,9 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* 
pParent )
             }
 
             // if the background for this page was set to invisible, the 
background-object has to be deleted, too.
-            if( ( static_cast<const XFillStyleItem*>( pTempSet->GetItem( 
XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) ||
+            if( ( pTempSet->GetItem<XFillStyleItem>( XATTR_FILLSTYLE 
)->GetValue() == drawing::FillStyle_NONE ) ||
                 ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == 
SfxItemState::DEFAULT ) &&
-                    ( static_cast<const XFillStyleItem*>( aMergedAttr.GetItem( 
XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) ) )
+                    ( aMergedAttr.GetItem<XFillStyleItem>( XATTR_FILLSTYLE 
)->GetValue() == drawing::FillStyle_NONE ) ) )
                 mbPageBckgrdDeleted = true;
 
             bool bSetToAllPages = false;
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 30893d8..77a53c1 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -414,7 +414,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
                             SfxItemSet aTempSet(*pOutSet);
                             
static_cast<SdStyleSheet*>(pStyleSheet)->AdjustToFontHeight(aTempSet);
 
-                            const SvxBrushItem* pBrushItem = static_cast<const 
SvxBrushItem*>(aTempSet.GetItem(XATTR_FILLBACKGROUND));
+                            const SvxBrushItem* pBrushItem = 
aTempSet.GetItem<SvxBrushItem>(XATTR_FILLBACKGROUND);
                             if( pBrushItem )
                             {
                                SvxBackgroundColorItem aBackColorItem( 
pBrushItem->GetColor(), EE_CHAR_BKGCOLOR);
@@ -432,7 +432,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
                             {
                                 if (aTempSet.GetItemState(EE_PARA_NUMBULLET) 
== SfxItemState::SET)
                                 {
-                                    SvxNumRule aRule(*static_cast<const 
SvxNumBulletItem*>(aTempSet.GetItem(EE_PARA_NUMBULLET))->GetNumRule());
+                                    SvxNumRule 
aRule(*aTempSet.GetItem<SvxNumBulletItem>(EE_PARA_NUMBULLET)->GetNumRule());
 
                                     OUString 
sStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1");
                                     SfxStyleSheetBase* pFirstStyleSheet = 
pSSPool->Find( sStyleName, SD_STYLE_FAMILY_PSEUDO);
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 17043a9..e65af78 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -277,8 +277,8 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( 
const OUString& Propert
         {
             if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
             {
-                const XFillBmpStretchItem* pStretchItem = static_cast<const 
XFillBmpStretchItem*>(mpSet->GetItem(XATTR_FILLBMP_STRETCH));
-                const XFillBmpTileItem* pTileItem = static_cast<const 
XFillBmpTileItem*>(mpSet->GetItem(XATTR_FILLBMP_TILE));
+                const XFillBmpStretchItem* pStretchItem = 
mpSet->GetItem<XFillBmpStretchItem>(XATTR_FILLBMP_STRETCH);
+                const XFillBmpTileItem* pTileItem = 
mpSet->GetItem<XFillBmpTileItem>(XATTR_FILLBMP_TILE);
 
                 if( pStretchItem && pTileItem )
                 {
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 93e2289..ea41c4d 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -215,16 +215,16 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                 mpDrawView->BegUndo();
 
                 SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-                bool bSet = static_cast<const 
SdrTextFitToSizeTypeItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue()
 != SdrFitToSizeType::NONE;
+                bool bSet = 
pObj->GetMergedItemSet().GetItem<SdrTextFitToSizeTypeItem>(SDRATTR_TEXT_FITTOSIZE)->GetValue()
 != SdrFitToSizeType::NONE;
 
                 
mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
 
                 if (!bSet)
                 {
                     //If we are turning on AutoFit we have to turn these off 
if already on
-                    if (static_cast<const 
SdrOnOffItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_AUTOGROWHEIGHT))->GetValue())
+                    if 
(pObj->GetMergedItemSet().GetItem<SdrOnOffItem>(SDRATTR_TEXT_AUTOGROWHEIGHT)->GetValue())
                         
pObj->SetMergedItem(makeSdrTextAutoGrowHeightItem(false));
-                    if (static_cast<const 
SdrOnOffItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_AUTOGROWWIDTH))->GetValue())
+                    if 
(pObj->GetMergedItemSet().GetItem<SdrOnOffItem>(SDRATTR_TEXT_AUTOGROWWIDTH)->GetValue())
                         
pObj->SetMergedItem(makeSdrTextAutoGrowWidthItem(false));
                 }
 
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 6043ba6..cc52eb9 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -262,7 +262,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
         if( SfxItemState::DEFAULT == rSet.GetItemState( 
SID_OUTLINE_TEXT_AUTOFIT ) )
         {
             const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-            const bool bSet = static_cast<const 
SdrTextFitToSizeTypeItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue()
 != SdrFitToSizeType::NONE;
+            const bool bSet = 
pObj->GetMergedItemSet().GetItem<SdrTextFitToSizeTypeItem>(SDRATTR_TEXT_FITTOSIZE)->GetValue()
 != SdrFitToSizeType::NONE;
             rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
         }
 
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 8b90a7a..303704d 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -461,7 +461,7 @@ Reference < XContent > SfxMedium::GetContent() const
 OUString SfxMedium::GetBaseURL( bool bForSaving )
 {
     OUString aBaseURL;
-    const SfxStringItem* pBaseURLItem = static_cast<const SfxStringItem*>( 
GetItemSet()->GetItem(SID_DOC_BASEURL) );
+    const SfxStringItem* pBaseURLItem = 
GetItemSet()->GetItem<SfxStringItem>(SID_DOC_BASEURL);
     if ( pBaseURLItem )
         aBaseURL = pBaseURLItem->GetValue();
     else if (!utl::ConfigManager::IsAvoidConfig() && GetContent().is())
@@ -492,7 +492,7 @@ OUString SfxMedium::GetBaseURL( bool bForSaving )
 
 bool SfxMedium::IsSkipImages()
 {
-    const SfxStringItem* pSkipImagesItem = static_cast<const SfxStringItem*>( 
GetItemSet()->GetItem(SID_FILE_FILTEROPTIONS) );
+    const SfxStringItem* pSkipImagesItem = 
GetItemSet()->GetItem<SfxStringItem>(SID_FILE_FILTEROPTIONS);
     return pSkipImagesItem && pSkipImagesItem->GetValue() == "SkipImages";
 }
 
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 0d3b4d4..a563787 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1376,7 +1376,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const 
OUString& PropertyName )
                 case XATTR_FILLHATCH:
                 case XATTR_LINEDASH:
                     {
-                        const NameOrIndex* pItem = static_cast<const 
NameOrIndex*>(rSet.GetItem((sal_uInt16)pMap->nWID));
+                        const NameOrIndex* pItem = 
rSet.GetItem<NameOrIndex>((sal_uInt16)pMap->nWID);
                         if( ( pItem == nullptr ) || pItem->GetName().isEmpty() 
)
                             eState = PropertyState_DEFAULT_VALUE;
                     }
@@ -1391,7 +1391,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const 
OUString& PropertyName )
                 case XATTR_LINESTART:
                 case XATTR_FILLFLOATTRANSPARENCE:
                     {
-                        const NameOrIndex* pItem = static_cast<const 
NameOrIndex*>(rSet.GetItem((sal_uInt16)pMap->nWID));
+                        const NameOrIndex* pItem = 
rSet.GetItem<NameOrIndex>((sal_uInt16)pMap->nWID);
                         if( pItem == nullptr )
                             eState = PropertyState_DEFAULT_VALUE;
                     }
diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index e90c199..efba5de 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -1009,7 +1009,7 @@ void TableLayouter::UpdateBorderLayout()
             if( !xCell.is() )
                 continue;
 
-            const SvxBoxItem* pThisAttr = static_cast<const 
SvxBoxItem*>(xCell->GetItemSet().GetItem( SDRATTR_TABLE_BORDER ));
+            const SvxBoxItem* pThisAttr = 
xCell->GetItemSet().GetItem<SvxBoxItem>( SDRATTR_TABLE_BORDER );
             
OSL_ENSURE(pThisAttr,"sdr::table::TableLayouter::UpdateBorderLayout(), no 
border attribute?");
 
             if( !pThisAttr )
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 99f93e1..a0f5c5e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -678,9 +678,9 @@ void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& 
rRenderContext, vcl::Windo
             if (!pItemSet) return;
 
             const SvxFontItem * const pFontItem =
-                static_cast<const 
SvxFontItem*>(pItemSet->GetItem(SID_ATTR_CHAR_FONT));
+                pItemSet->GetItem<SvxFontItem>(SID_ATTR_CHAR_FONT);
             const SvxFontHeightItem * const pFontHeightItem =
-                static_cast<const 
SvxFontHeightItem*>(pItemSet->GetItem(SID_ATTR_CHAR_FONTHEIGHT));
+                pItemSet->GetItem<SvxFontHeightItem>(SID_ATTR_CHAR_FONTHEIGHT);
 
             if ( pFontItem && pFontHeightItem )
             {
diff --git a/svx/source/toolbars/extrusionbar.cxx 
b/svx/source/toolbars/extrusionbar.cxx
index 9a60fa4..481388a 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -177,7 +177,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
     {
         if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( 
SID_EXTRUSION_DIRECTION ) == SfxItemState::SET )
         {
-            sal_Int32 nSkew = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_DIRECTION))->GetValue();
+            sal_Int32 nSkew = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_EXTRUSION_DIRECTION)->GetValue();
 
             Position3D  aViewPoint( 3472, -3472, 25000 );
             double      fOriginX = 0.50;
@@ -261,7 +261,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
     {
         if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( 
SID_EXTRUSION_PROJECTION ) == SfxItemState::SET )
         {
-            sal_Int32 nProjection = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_PROJECTION))->GetValue();
+            sal_Int32 nProjection = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_EXTRUSION_PROJECTION)->GetValue();
             ProjectionMode eProjectionMode = nProjection == 1 ? 
ProjectionMode_PARALLEL : ProjectionMode_PERSPECTIVE;
             css::beans::PropertyValue aPropValue;
             aPropValue.Name = "ProjectionMode";
@@ -274,7 +274,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
     {
         if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( 
SID_EXTRUSION_DEPTH ) == SfxItemState::SET)
         {
-            double fDepth = static_cast<const 
SvxDoubleItem*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_DEPTH))->GetValue();
+            double fDepth = 
rReq.GetArgs()->GetItem<SvxDoubleItem>(SID_EXTRUSION_DEPTH)->GetValue();
             double fFraction = 0.0;
             EnhancedCustomShapeParameterPair aDepthPropPair;
             aDepthPropPair.First.Value <<= fDepth;
@@ -318,7 +318,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
     {
         if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( 
SID_EXTRUSION_SURFACE ) == SfxItemState::SET)
         {
-            sal_Int32 nSurface = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_SURFACE))->GetValue();
+            sal_Int32 nSurface = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_EXTRUSION_SURFACE)->GetValue();
 
             ShadeMode eShadeMode( ShadeMode_FLAT );
             bool bMetal = false;
@@ -365,7 +365,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
     {
         if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( 
SID_EXTRUSION_LIGHTING_INTENSITY ) == SfxItemState::SET)
         {
-            sal_Int32 nLevel = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_LIGHTING_INTENSITY))->GetValue();
+            sal_Int32 nLevel = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_EXTRUSION_LIGHTING_INTENSITY)->GetValue();
 
             double fBrightness;
             bool bHarsh2 = false;
@@ -425,7 +425,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
     {
         if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( 
SID_EXTRUSION_LIGHTING_DIRECTION ) == SfxItemState::SET)
         {
-            sal_Int32 nDirection = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_LIGHTING_DIRECTION))->GetValue();
+            sal_Int32 nDirection = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_EXTRUSION_LIGHTING_DIRECTION)->GetValue();
 
             if((nDirection >= 0) && (nDirection < 9))
             {
@@ -568,8 +568,8 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& 
rReq, SfxBindings& rB
                 (rReq.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH ) == 
SfxItemState::SET) &&
                 (rReq.GetArgs()->GetItemState( SID_ATTR_METRIC ) == 
SfxItemState::SET))
             {
-                double fDepth = static_cast<const 
SvxDoubleItem*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_DEPTH))->GetValue();
-                FieldUnit eUnit = (FieldUnit)static_cast<const 
SfxUInt16Item*>(rReq.GetArgs()->GetItem(SID_ATTR_METRIC))->GetValue();
+                double fDepth = 
rReq.GetArgs()->GetItem<SvxDoubleItem>(SID_EXTRUSION_DEPTH)->GetValue();
+                FieldUnit eUnit = 
(FieldUnit)rReq.GetArgs()->GetItem<SfxUInt16Item>(SID_ATTR_METRIC)->GetValue();
 
                 ScopedVclPtrInstance< ExtrusionDepthDialog > aDlg(nullptr, 
fDepth, eUnit);
                 sal_uInt16 nRet = aDlg->Execute();
diff --git a/svx/source/toolbars/fontworkbar.cxx 
b/svx/source/toolbars/fontworkbar.cxx
index f863205..493571b 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -269,7 +269,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
         {
             if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( 
SID_FONTWORK_ALIGNMENT ) == SfxItemState::SET )
             {
-                sal_Int32 nValue = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_FONTWORK_ALIGNMENT))->GetValue();
+                sal_Int32 nValue = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_FONTWORK_ALIGNMENT)->GetValue();
                 if ( ( nValue >= 0 ) && ( nValue < 5 ) )
                 {
                     SdrFitToSizeType eFTS = SdrFitToSizeType::NONE;
@@ -294,7 +294,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, 
SdrCustomShapeGeometryItem
         {
             if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( 
SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) )
             {
-                sal_Int32 nCharSpacing = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING))->GetValue();
+                sal_Int32 nCharSpacing = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_FONTWORK_CHARACTER_SPACING)->GetValue();
                 pObj->SetMergedItem( SvxCharScaleWidthItem( 
(sal_uInt16)nCharSpacing, EE_CHAR_FONTWIDTH ) );
                 pObj->BroadcastObjectChange();
             }
@@ -484,7 +484,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& 
rReq, SfxBindings& rBi
         {
             if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( 
SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) )
             {
-                sal_Int32 nCharSpacing = static_cast<const 
SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING))->GetValue();
+                sal_Int32 nCharSpacing = 
rReq.GetArgs()->GetItem<SfxInt32Item>(SID_FONTWORK_CHARACTER_SPACING)->GetValue();
                 ScopedVclPtrInstance< FontworkCharacterSpacingDialog > aDlg( 
nullptr, nCharSpacing );
                 sal_uInt16 nRet = aDlg->Execute();
                 if( nRet != 0 )
diff --git a/svx/source/unodraw/unobrushitemhelper.cxx 
b/svx/source/unodraw/unobrushitemhelper.cxx
index c3d547d..5f610e1 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -194,7 +194,7 @@ SvxBrushItem getSvxBrushItemForSolid(const SfxItemSet& 
rSourceSet, bool bSearchI
 //UUUU
 SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, 
sal_uInt16 nBackgroundID, bool bSearchInParents, bool bXMLImportHack)
 {
-    const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem*  
>(rSourceSet.GetItem(XATTR_FILLSTYLE, bSearchInParents)));
+    const XFillStyleItem* 
pXFillStyleItem(rSourceSet.GetItem<XFillStyleItem>(XATTR_FILLSTYLE, 
bSearchInParents));
 
     if(!pXFillStyleItem || drawing::FillStyle_NONE == 
pXFillStyleItem->GetValue())
     {
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 1f26889..46a69cd 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2030,7 +2030,7 @@ beans::PropertyState SAL_CALL 
SvxShape::_getPropertyState( const OUString& Prope
             case XATTR_FILLHATCH:
             case XATTR_LINEDASH:
                 {
-                    const NameOrIndex* pItem = static_cast<const 
NameOrIndex*>(rSet.GetItem((sal_uInt16)pMap->nWID));
+                    const NameOrIndex* pItem = 
rSet.GetItem<NameOrIndex>((sal_uInt16)pMap->nWID);
                     if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
                         eState = beans::PropertyState_DEFAULT_VALUE;
                 }
@@ -2045,7 +2045,7 @@ beans::PropertyState SAL_CALL 
SvxShape::_getPropertyState( const OUString& Prope
             case XATTR_LINESTART:
             case XATTR_FILLFLOATTRANSPARENCE:
                 {
-                    const NameOrIndex* pItem = static_cast<const 
NameOrIndex*>(rSet.GetItem((sal_uInt16)pMap->nWID));
+                    const NameOrIndex* pItem = 
rSet.GetItem<NameOrIndex>((sal_uInt16)pMap->nWID);
                     if ( pItem == nullptr )
                         eState = beans::PropertyState_DEFAULT_VALUE;
                 }
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index b44e7eb..dbca147 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -4864,7 +4864,7 @@ sal_uInt32 SwTextNode::GetRsid( sal_Int32 nStt, sal_Int32 
nEnd ) const
     SfxItemSet aSet( (SfxItemPool&) (GetDoc()->GetAttrPool()), 
RES_CHRATR_RSID, RES_CHRATR_RSID );
     if ( GetAttr(aSet, nStt, nEnd) )
     {
-        const SvxRsidItem* pRsid = static_cast<const 
SvxRsidItem*>(aSet.GetItem(RES_CHRATR_RSID));
+        const SvxRsidItem* pRsid = aSet.GetItem<SvxRsidItem>(RES_CHRATR_RSID);
         if( pRsid )
             return pRsid->GetValue();
     }
diff --git a/sw/source/core/unocore/swunohelper.cxx 
b/sw/source/core/unocore/swunohelper.cxx
index c6dd8fb..8044bfb 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -263,7 +263,7 @@ bool UCB_GetFileListOfFolder( const OUString& rURL,
 bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet,
         sal_uInt16 const nMID)
 {
-    const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem*  
>(rSet.GetItem(XATTR_FILLSTYLE, false)));
+    const XFillStyleItem* 
pXFillStyleItem(rSet.GetItem<XFillStyleItem>(XATTR_FILLSTYLE, false));
 
     if(!pXFillStyleItem)
     {
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 017df5b..d0fad8f 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -285,7 +285,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& 
rSet, bool bPapFormat, b
             }
 
             // Has to be called after RES_PARATR_GRABBAG is processed.
-            const XFillStyleItem* pXFillStyleItem(static_cast<const 
XFillStyleItem*>(rSet.GetItem(XATTR_FILLSTYLE)));
+            const XFillStyleItem* 
pXFillStyleItem(rSet.GetItem<XFillStyleItem>(XATTR_FILLSTYLE));
             if (pXFillStyleItem && pXFillStyleItem->GetValue() == 
drawing::FillStyle_SOLID && !rSet.HasItem(RES_BACKGROUND))
             {
                 // Construct an SvxBrushItem, as expected by the exporters.
@@ -803,7 +803,7 @@ void MSWordExportBase::OutputFormat( const SwFormat& 
rFormat, bool bPapFormat, b
                 if (SfxItemState::SET != aSet.GetItemState(RES_SURROUND))
                     aSet.Put(SwFormatSurround(css::text::WrapTextMode_NONE));
 
-                const XFillStyleItem* pXFillStyleItem(static_cast< const 
XFillStyleItem*  >(rFrameFormat.GetAttrSet().GetItem(XATTR_FILLSTYLE)));
+                const XFillStyleItem* 
pXFillStyleItem(rFrameFormat.GetAttrSet().GetItem<XFillStyleItem>(XATTR_FILLSTYLE));
                 if (pXFillStyleItem)
                 {
                     switch (pXFillStyleItem->GetValue())
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index b27d983..6f03cbb 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -380,8 +380,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
 
     if (pFlySet)
     {
-        if (const SwFormatFrameSize* pSize =
-            static_cast<const 
SwFormatFrameSize*>(pFlySet->GetItem(RES_FRM_SIZE, false)))
+        if (const SwFormatFrameSize* pSize = 
pFlySet->GetItem<SwFormatFrameSize>(RES_FRM_SIZE, false))
         {
             aRect.SetSize(pSize->GetSize());
         }
diff --git a/sw/source/uibase/uiview/viewtab.cxx 
b/sw/source/uibase/uiview/viewtab.cxx
index 9423c59..c656c40 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -2242,8 +2242,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
             rSet.Put( SfxBoolItem(SID_ATTR_PAGE_FOOTER, bFooterOn ) );
             if(bFooterOn)
             {
-                const SvxLRSpaceItem* rLR = static_cast<const 
SvxLRSpaceItem*>(rFooter.GetFooterFormat()->GetAttrSet().GetItem(SID_ATTR_LRSPACE));
-                const SvxULSpaceItem* rUL = static_cast<const 
SvxULSpaceItem*>(rFooter.GetFooterFormat()->GetAttrSet().GetItem(SID_ATTR_ULSPACE));
+                const SvxLRSpaceItem* rLR = 
rFooter.GetFooterFormat()->GetAttrSet().GetItem<SvxLRSpaceItem>(SID_ATTR_LRSPACE);
+                const SvxULSpaceItem* rUL = 
rFooter.GetFooterFormat()->GetAttrSet().GetItem<SvxULSpaceItem>(SID_ATTR_ULSPACE);
                 SvxLongLRSpaceItem aLR(rLR->GetLeft(), rLR->GetRight(), 
SID_ATTR_PAGE_FOOTER_LRMARGIN);
                 rSet.Put(aLR);
                 SvxLongULSpaceItem aUL( rUL->GetUpper(), rUL->GetLower(), 
SID_ATTR_PAGE_FOOTER_SPACING);
@@ -2274,7 +2274,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
             {
                 case (drawing::FillStyle_SOLID):
                 {
-                    Color aColor =  static_cast<const XFillColorItem*>( 
aSet.GetItem( XATTR_FILLCOLOR, false ) )->GetColorValue();
+                    Color aColor = aSet.GetItem<XFillColorItem>( 
XATTR_FILLCOLOR, false )->GetColorValue();
                     XFillColorItem aFillColorItem( OUString(), aColor );
                     aFillColorItem.SetWhich( SID_ATTR_PAGE_COLOR );
                     rSet.Put( aFillColorItem );
@@ -2283,7 +2283,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
 
                 case (drawing::FillStyle_GRADIENT):
                 {
-                    const XGradient& xGradient =  static_cast<const 
XFillGradientItem*>( aSet.GetItem( XATTR_FILLGRADIENT ) )->GetGradientValue();
+                    const XGradient& xGradient = 
aSet.GetItem<XFillGradientItem>( XATTR_FILLGRADIENT )->GetGradientValue();
                     XFillGradientItem aFillGradientItem( OUString(), 
xGradient, SID_ATTR_PAGE_GRADIENT  );
                     rSet.Put( aFillGradientItem );
                 }
@@ -2291,7 +2291,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
 
                 case (drawing::FillStyle_HATCH):
                 {
-                    const XFillHatchItem *pFillHatchItem( static_cast<const 
XFillHatchItem*>( aSet.GetItem( XATTR_FILLHATCH ) ) );
+                    const XFillHatchItem *pFillHatchItem( 
aSet.GetItem<XFillHatchItem>( XATTR_FILLHATCH ) );
                     XFillHatchItem aFillHatchItem( pFillHatchItem->GetName(), 
pFillHatchItem->GetHatchValue());
                     aFillHatchItem.SetWhich( SID_ATTR_PAGE_HATCH );
                     rSet.Put( aFillHatchItem );
@@ -2300,7 +2300,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
 
                 case (drawing::FillStyle_BITMAP):
                 {
-                    const XFillBitmapItem *pFillBitmapItem = static_cast<const 
XFillBitmapItem*>( aSet.GetItem( XATTR_FILLBITMAP ) );
+                    const XFillBitmapItem *pFillBitmapItem = 
aSet.GetItem<XFillBitmapItem>( XATTR_FILLBITMAP );
                     XFillBitmapItem aFillBitmapItem( 
pFillBitmapItem->GetName(), pFillBitmapItem->GetGraphicObject() );
                     aFillBitmapItem.SetWhich( SID_ATTR_PAGE_BITMAP );
                     rSet.Put( aFillBitmapItem );
commit aadf790bbceb1cde94c2a6fe8edfb9951edca0a0
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Fri Mar 3 16:01:45 2017 +0200

    remove some unnecessary use of OUString constructor
    
    found with
       git grep -nP '<<= OUString\(\w*[A-Za-z]+'
    
    Change-Id: I43354842f1e0418fb292f2e8e0cb30f1229d1c67
    Reviewed-on: https://gerrit.libreoffice.org/34864
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx 
b/accessibility/source/extended/accessibletablistboxtable.cxx
index d50f98a..857de8c 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -226,7 +226,7 @@ namespace accessibility
                             Reference< XAccessible > xChild =
                                 m_pTabListBox->CreateAccessibleCell( nRow, 
nCol );
                             uno::Any aOldValue, aNewValue;
-                            aOldValue <<= OUString( pData->m_sOldText );
+                            aOldValue <<= pData->m_sOldText;
                             OUString sNewText( m_pTabListBox->GetCellText( 
nRow, nCol ) );
                             aNewValue <<= sNewText;
                             TriState eState = TRISTATE_INDET;
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx 
b/dbaccess/source/ui/dlg/paramdialog.cxx
index 636d82e..c42e3d7 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -305,7 +305,7 @@ namespace dbaui
                 return true;
             }
 
-            m_aFinalValues[m_nCurrentlySelected].Value <<= 
OUString(m_pParam->GetText());
+            m_aFinalValues[m_nCurrentlySelected].Value <<= m_pParam->GetText();
         }
 
         // initialize the controls with the new values
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 051c1f7..07a7703 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -190,13 +190,13 @@ Sequence<beans::PropertyValue> 
SvxUnoNumberingRules::getNumberingRuleByIndex(sal
     }
 
     {
-        aVal <<= OUString(rFmt.GetPrefix());
+        aVal <<= rFmt.GetPrefix();
         beans::PropertyValue aPrefixProp( UNO_NAME_NRULE_PREFIX, -1, aVal, 
beans::PropertyState_DIRECT_VALUE);
         pArray[nIdx++] = aPrefixProp;
     }
 
     {
-        aVal <<= OUString(rFmt.GetSuffix());
+        aVal <<= rFmt.GetSuffix();
         beans::PropertyValue aSuffixProp( UNO_NAME_NRULE_SUFFIX, -1, aVal, 
beans::PropertyState_DIRECT_VALUE);
         pArray[nIdx++] = aSuffixProp;
     }
diff --git a/filter/source/flash/swfexporter.cxx 
b/filter/source/flash/swfexporter.cxx
index 9aa7b7f..d2af184 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -666,7 +666,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent 
>&xComponent, GDIMetaFile
     aDescriptor[0].Value <<= bExportAsJPEG ? OUString("PNG") : OUString("SVM");
 
     aDescriptor[1].Name = "URL";
-    aDescriptor[1].Value <<= OUString(aFile.GetURL());
+    aDescriptor[1].Value <<= aFile.GetURL();
     aDescriptor[2].Name = "FilterData";
     aDescriptor[2].Value <<= aFilterData;
     if( bOnlyBackground )
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index dd60719..15b0449 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6986,7 +6986,7 @@ css::uno::Reference < css::embed::XEmbeddedObject >  
SvxMSDffManager::CheckForCo
             aMedium[1].Name = "URL";
             aMedium[1].Value <<= OUString( "private:stream" );
             aMedium[2].Name = "DocumentBaseURL";
-            aMedium[2].Value <<= OUString(rBaseURL);
+            aMedium[2].Value <<= rBaseURL;
 
             if ( !aFilterName.isEmpty() )
             {
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx 
b/filter/source/xsltfilter/XSLTFilter.cxx
index fcc6831..47d9e38 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -315,7 +315,7 @@ namespace XSLT
         nv.Value <<= aURL;
         args[1] <<= nv;
         nv.Name = "SourceBaseURL";
-        nv.Value <<= OUString(INetURLObject(aURL).getBase());
+        nv.Value <<= INetURLObject(aURL).getBase();
         args[2] <<= nv;
 
         m_tcontrol = impl_createTransformer(msUserData[1], args);
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 3fdf00a..dcb41e3b 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3026,7 +3026,7 @@ void OReportController::insertGraphic()
             xController->getValue( 
ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bLink;
             uno::Sequence<beans::PropertyValue> aArgs(2);
             aArgs[0].Name = PROPERTY_IMAGEURL;
-            aArgs[0].Value <<= OUString(aDialog.GetPath());
+            aArgs[0].Value <<= aDialog.GetPath();
             aArgs[1].Name = PROPERTY_PRESERVEIRI;
             aArgs[1].Value <<= bLink;
             createControl(aArgs,xSection,OUString(),OBJ_DLG_IMAGECONTROL);
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx 
b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index a25c35d..50fb75d 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -220,10 +220,10 @@ void RecentlyUsedMasterPages::SavePersistentValues()
             {
                 xSet->insertByName (sKey, makeAny(xChild));
 
-                aValue <<= OUString(iDescriptor->msURL);
+                aValue <<= iDescriptor->msURL;
                 xChild->replaceByName (sURLMemberName, aValue);
 
-                aValue <<= OUString(iDescriptor->msName);
+                aValue <<= iDescriptor->msName;
                 xChild->replaceByName (sNameMemberName, aValue);
             }
         }
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index f997ac7..d86f4a9 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1383,8 +1383,8 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( 
const OUString& Property
                         {
                             const SvxFontItem *pFont = static_cast<const 
SvxFontItem *>(pItem);
 
-                            aSeq[nSeqIndex++] <<= 
OUString(pFont->GetFamilyName());
-                            aSeq[nSeqIndex++] <<= 
OUString(pFont->GetStyleName());
+                            aSeq[nSeqIndex++] <<= pFont->GetFamilyName();
+                            aSeq[nSeqIndex++] <<= pFont->GetStyleName();
                             aSeq[nSeqIndex++] <<= 
sal_Int16(pFont->GetFamily());
                             aSeq[nSeqIndex++] <<= sal_Int16(pFont->GetPitch());
                             aSeq[nSeqIndex++] <<= 
sal_Int16(pFont->GetCharSet());
@@ -1393,8 +1393,8 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( 
const OUString& Property
 
                     const SvxFontItem& rFont = static_cast<const 
SvxFontItem&>(rPool.GetDefaultItem( nWhichId ));
 
-                    aSeq[nSeqIndex++] <<= OUString(rFont.GetFamilyName());
-                    aSeq[nSeqIndex++] <<= OUString(rFont.GetStyleName());
+                    aSeq[nSeqIndex++] <<= rFont.GetFamilyName();
+                    aSeq[nSeqIndex++] <<= rFont.GetStyleName();
                     aSeq[nSeqIndex++] <<= sal_Int16(rFont.GetFamily());
                     aSeq[nSeqIndex++] <<= sal_Int16(rFont.GetPitch());
                     aSeq[nSeqIndex++] <<= sal_Int16(rFont.GetCharSet());
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 20bd008..d8f9e0b 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -703,7 +703,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry 
**ppEntries, Any *pValu
         switch ( (*ppEntries)->mnHandle )
         {
             case HANDLE_FORMULA:
-                *pValue <<= OUString(pDocSh->GetText());
+                *pValue <<= pDocSh->GetText();
             break;
             case HANDLE_FONT_NAME_VARIABLES                :
             case HANDLE_FONT_NAME_FUNCTIONS                :
@@ -714,7 +714,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry 
**ppEntries, Any *pValu
             case HANDLE_CUSTOM_FONT_NAME_FIXED             :
             {
                 const SmFace &  rFace = 
aFormat.GetFont((*ppEntries)->mnMemberId);
-                *pValue <<= OUString(rFace.GetFamilyName());
+                *pValue <<= rFace.GetFamilyName();
             }
             break;
             case HANDLE_CUSTOM_FONT_FIXED_POSTURE:
diff --git a/svtools/source/config/helpopt.cxx 
b/svtools/source/config/helpopt.cxx
index 3f34fa1..d3dc601 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -235,14 +235,14 @@ void SvtHelpOptions_Impl::ImplCommit()
                 break;
 
             case HelpProperty::Locale:
-                pValues[nProp] <<= OUString(aLocale);
+                pValues[nProp] <<= aLocale;
                 break;
 
             case HelpProperty::System:
-                pValues[nProp] <<= OUString(aSystem);
+                pValues[nProp] <<= aSystem;
                 break;
             case HelpProperty::StyleSheet:
-                pValues[nProp] <<= OUString(sHelpStyleSheet);
+                pValues[nProp] <<= sHelpStyleSheet;
             break;
 
         }
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 9ef4e95..489572f 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -439,9 +439,9 @@ void SvxRubyDialog::GetRubyText()
             for (sal_Int32 nProp = 0; nProp < rProps.getLength(); nProp++)
             {
                 if (pProps[nProp].Name == cRubyBaseText)
-                    pProps[nProp].Value <<= OUString(aEditArr[i]->GetText());
+                    pProps[nProp].Value <<= aEditArr[i]->GetText();
                 else if (pProps[nProp].Name == cRubyText)
-                    pProps[nProp].Value <<= OUString(aEditArr[i + 
1]->GetText());
+                    pProps[nProp].Value <<= aEditArr[i + 1]->GetText();
             }
         }
     }
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 35903aa..c5a16a3 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -1433,7 +1433,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, 
pBtn, void )
         uno::Sequence < beans::PropertyValue > aArgs(2);
         beans::PropertyValue* pArgs = aArgs.getArray();
         pArgs[0].Name = "SearchString";
-        pArgs[0].Value <<= OUString(m_pSearchLB->GetText());
+        pArgs[0].Value <<= m_pSearchLB->GetText();
         pArgs[1].Name = "ParentWindow";
         pArgs[1].Value <<= VCLUnoHelper::GetInterface( this );
         if(pBtn == m_pSearchComponent1PB)
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 705653d..a2a8960 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1584,7 +1584,7 @@ bool DbFormattedField::commitControl()
         // ein LeerString wird erst mal standardmaessig als void weitergereicht
     }
     else
-        aNewVal <<= OUString(rField.GetTextValue());
+        aNewVal <<= rField.GetTextValue();
 
     m_rColumn.getModel()->setPropertyValue(FM_PROP_EFFECTIVE_VALUE, aNewVal);
     return true;
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 3354ce2..dddaa4b 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -543,7 +543,7 @@ DECLARE_ODFEXPORT_TEST(testFdo58949, "fdo58949.docx")
     save("writer8", aTempFile);
 
     uno::Sequence<uno::Any> aArgs(1);
-    aArgs[0] <<= OUString(aTempFile.GetURL());
+    aArgs[0] <<= aTempFile.GetURL();
     uno::Reference<container::XNameAccess> 
xNameAccess(m_xSFactory->createInstanceWithArguments("com.sun.star.packages.zip.ZipFileAccess",
 aArgs), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("Obj102")));
 }
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 1beea37..1f1e688 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1101,7 +1101,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, 
sal_uInt16 nWhichId ) const
         rAny <<= GetInputFlag();
         break;
     case FIELD_PROP_PAR4:
-        rAny <<= OUString(GetExpStr());
+        rAny <<= GetExpStr();
         break;
     default:
         return SwField::QueryValue(rAny, nWhichId);
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index 8ea12cb..6ec8c97 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2134,7 +2134,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& 
rPropertyName)
         }
         else if(FN_UNO_FRAME_STYLE_NAME == pEntry->nWID)
         {
-            aAny <<= 
OUString(SwStyleNameMapper::GetProgName(pFormat->DerivedFrom()->GetName(), 
SwGetPoolIdFromName::FrmFmt ) );
+            aAny <<= 
SwStyleNameMapper::GetProgName(pFormat->DerivedFrom()->GetName(), 
SwGetPoolIdFromName::FrmFmt );
         }
         // #i73249#
         else if( FN_UNO_TITLE == pEntry->nWID )
@@ -2142,7 +2142,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& 
rPropertyName)
             SwFlyFrameFormat& rFlyFormat = 
dynamic_cast<SwFlyFrameFormat&>(*pFormat);
             // assure that <SdrObject> instance exists.
             GetOrCreateSdrObject(rFlyFormat);
-            aAny <<= OUString(rFlyFormat.GetObjTitle());
+            aAny <<= rFlyFormat.GetObjTitle();
         }
         // New attribute Description
         else if( FN_UNO_DESCRIPTION == pEntry->nWID )
@@ -2150,7 +2150,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& 
rPropertyName)
             SwFlyFrameFormat& rFlyFormat = 
dynamic_cast<SwFlyFrameFormat&>(*pFormat);
             // assure that <SdrObject> instance exists.
             GetOrCreateSdrObject(rFlyFormat);
-            aAny <<= OUString(rFlyFormat.GetObjDescription());
+            aAny <<= rFlyFormat.GetObjDescription();
         }
         else if(eType == FLYCNTTYPE_GRF &&
                 (rPropertyName == UNO_NAME_ACTUAL_SIZE))
@@ -2223,7 +2223,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& 
rPropertyName)
                 aAny <<= aHexCLSID;
             else if(FN_UNO_STREAM_NAME == pEntry->nWID)
             {
-                aAny <<= 
OUString(pOleNode->GetOLEObj().GetCurrentPersistName());
+                aAny <<= pOleNode->GetOLEObj().GetCurrentPersistName();
             }
             else if(FN_EMBEDDED_OBJECT == pEntry->nWID)
             {
diff --git a/sw/source/filter/html/htmlform.cxx 
b/sw/source/filter/html/htmlform.cxx
index 53e479b..4a09292 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1321,7 +1321,7 @@ void SwHTMLParser::NewForm( bool bAppend )
     uno::Reference< beans::XPropertySet > xFormPropSet( xForm, UNO_QUERY );
 
     Any aTmp;
-    aTmp <<= OUString(sName);
+    aTmp <<= sName;
     xFormPropSet->setPropertyValue("Name", aTmp );
 
     if( !aAction.isEmpty() )
@@ -1334,7 +1334,7 @@ void SwHTMLParser::NewForm( bool bAppend )
         INetURLObject aURLObj( m_aPathToFile );
         aAction = aURLObj.GetPartBeforeLastName();
     }
-    aTmp <<= OUString(aAction);
+    aTmp <<= aAction;
     xFormPropSet->setPropertyValue("TargetURL",
                                     aTmp );
 
@@ -1614,7 +1614,7 @@ void SwHTMLParser::InsertInput()
     uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
 
     Any aTmp;
-    aTmp <<= OUString(sName);
+    aTmp <<= sName;
     xPropSet->setPropertyValue("Name", aTmp );
 
     if( HTML_IT_HIDDEN != eType  )
@@ -2004,7 +2004,7 @@ void SwHTMLParser::NewTextArea()
     uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
 
     Any aTmp;
-    aTmp <<= OUString(sName);
+    aTmp <<= sName;
     xPropSet->setPropertyValue("Name", aTmp );
 
     aTmp <<= true;
@@ -2272,7 +2272,7 @@ void SwHTMLParser::NewSelect()
     uno::Reference< beans::XPropertySet >  xPropSet( xFComp, UNO_QUERY );
 
     Any aTmp;
-    aTmp <<= OUString(sName);
+    aTmp <<= sName;
     xPropSet->setPropertyValue("Name", aTmp );
 
     if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX  )
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a564ae7..8b9e4e2 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4704,7 +4704,7 @@ void SwWW8ImplReader::ReadDocVars()
         {
             const OUString &rName = aDocVarStrings[i];
             uno::Any aValue;
-            aValue <<= OUString(aDocValueStrings[i]);
+            aValue <<= rName;
             try {
                 xUserDefinedProps->addProperty( rName,
                     beans::PropertyAttribute::REMOVABLE,
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index 53fb96f..a33cf99 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -648,7 +648,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
Button*, pButton, void)
         uno::Sequence< beans::PropertyValue > aValues(1);
         beans::PropertyValue* pValues = aValues.getArray();
         pValues[0].Name = "FilterName";
-        pValues[0].Value <<= OUString(pSfxFlt->GetFilterName());
+        pValues[0].Value <<= pSfxFlt->GetFilterName();
 
         uno::Reference< frame::XStorable > xStore( 
pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY);
         sal_uInt32 nErrorCode = ERRCODE_NONE;
@@ -1079,7 +1079,7 @@ IMPL_LINK(SwMMResultEmailDialog, SendDocumentsHdl_Impl, 
Button*, pButton, void)
     uno::Sequence< beans::PropertyValue > aValues(1);
     beans::PropertyValue* pValues = aValues.getArray();
     pValues[0].Name = "FilterName";
-    pValues[0].Value <<= OUString(pTargetSfxFlt->GetFilterName());
+    pValues[0].Value <<= pTargetSfxFlt->GetFilterName();
 
     uno::Reference< frame::XStorable > xStore( 
pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY);
     xStore->storeToURL( sTargetTempURL, aValues   );
@@ -1130,7 +1130,7 @@ IMPL_LINK(SwMMResultEmailDialog, SendDocumentsHdl_Impl, 
Button*, pButton, void)
             uno::Sequence< beans::PropertyValue > 
aFilterValues(withFilterOptions ? 2 : 1);
             beans::PropertyValue* pFilterValues = aFilterValues.getArray();
             pFilterValues[0].Name = "FilterName";
-            pFilterValues[0].Value <<= OUString(pSfxFlt->GetFilterName());
+            pFilterValues[0].Value <<= pSfxFlt->GetFilterName();
             if(withFilterOptions)
             {
                 pFilterValues[1].Name = "FilterOptions";
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 394683b..b637fec 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -68,7 +68,7 @@ static void lcl_SetProp( uno::Reference< XPropertySetInfo > & 
xInfo,
     if(xInfo->hasPropertyByName(aPropName))
     {
         uno::Any aValue;
-        aValue <<= OUString(rValue);
+        aValue <<= rValue;
         xProps->setPropertyValue(aPropName, aValue);
     }
 }
@@ -339,7 +339,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
                         pPropValArr[0].Name = "TokenType";
                         pPropValArr[0].Value <<= sTokenType;
                         pPropValArr[1].Name = "CharacterStyleName";
-                        pPropValArr[1].Value <<= 
OUString(aToken.sCharStyleName);
+                        pPropValArr[1].Value <<= aToken.sCharStyleName;
                         if(TOKEN_TAB_STOP == aToken.eTokenType)
                         {
                             pPropValArr[2].Name = "TabStopRightAligned";
@@ -355,7 +355,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
                         else if(TOKEN_TEXT == aToken.eTokenType)
                         {
                             pPropValArr[2].Name = "Text";
-                            pPropValArr[2].Value <<= OUString(aToken.sText);
+                            pPropValArr[2].Value <<= aToken.sText;
                         }
                         beans::PropertyValues* pValues = 
aSequPropVals.getArray();
                         pValues[nTokenIndex] = aPropVals;
diff --git a/sw/source/uibase/config/fontcfg.cxx 
b/sw/source/uibase/config/fontcfg.cxx
index 7ab1b56a..d6607b4 100644
--- a/sw/source/uibase/config/fontcfg.cxx
+++ b/sw/source/uibase/config/fontcfg.cxx
@@ -152,7 +152,7 @@ void SwStdFontConfig::ImplCommit()
         if( nProp < DEF_FONT_COUNT )
         {
             if(GetDefaultFor(nProp, lcl_LanguageOfType(nProp, eWestern, eCJK, 
eCTL)) != sDefaultFonts[nProp])
-                pValues[nProp] <<= OUString(sDefaultFonts[nProp]);
+                pValues[nProp] <<= sDefaultFonts[nProp];
         }
         else
         {
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx 
b/sw/source/uibase/dbui/mailmergehelper.cxx
index 6a1b718..f6e01c2 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -689,7 +689,7 @@ uno::Any SwMailTransferable::getTransferData( const 
datatransfer::DataFlavor& /*
 {
     uno::Any aRet;
     if( m_bIsBody )
-        aRet <<= OUString(m_sBody);
+        aRet <<= m_sBody;
     else
     {
         Sequence<sal_Int8> aData;
diff --git a/sw/source/uibase/shells/drformsh.cxx 
b/sw/source/uibase/shells/drformsh.cxx
index 8b21b63..af77738 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -125,7 +125,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
                                 OUString sLabel("Label");
                                 if( xPropInfoSet->hasPropertyByName(sLabel) )
                                 {
-                                    aTmp <<= OUString(rHLinkItem.GetName());
+                                    aTmp <<= rHLinkItem.GetName();
                                     xPropSet->setPropertyValue(sLabel, aTmp );
                                 }
 
diff --git a/sw/source/uibase/shells/textdrw.cxx 
b/sw/source/uibase/shells/textdrw.cxx
index 5dc92e64..7e51c42 100644
--- a/sw/source/uibase/shells/textdrw.cxx
+++ b/sw/source/uibase/shells/textdrw.cxx
@@ -87,7 +87,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const 
OUString& rTarget,
 
             uno::Any aTmp;
 
-            aTmp <<= OUString(rText);
+            aTmp <<= rText;
             xPropSet->setPropertyValue( "Label", aTmp );
 
             SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
@@ -95,7 +95,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const 
OUString& rTarget,
             if( pMedium )
                 aAbs = pMedium->GetURLObject();
 
-            aTmp <<= OUString(URIHelper::SmartRel2Abs(aAbs, rURL));
+            aTmp <<= URIHelper::SmartRel2Abs(aAbs, rURL);
             xPropSet->setPropertyValue( "TargetURL", aTmp );
 
             if( !rTarget.isEmpty() )
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 673f458..1bdd909 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -625,10 +625,10 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const 
OUString& rPropertyName)
     switch(pEntry->nWID)
     {
         case  WID_GROUP_PATH:
-            aAny <<= OUString(pGlosGroup->GetFileName());
+            aAny <<= pGlosGroup->GetFileName();
         break;
         case  WID_GROUP_TITLE:
-            aAny <<= OUString(pGlosGroup->GetName());
+            aAny <<= pGlosGroup->GetName();
         break;
     }
     return aAny;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index cea95ba..d95b363 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -4064,7 +4064,7 @@ Any SwXLinkNameAccessWrapper::getPropertyValue(const 
OUString& rPropertyName)
     Any aRet;
     if( rPropertyName == UNO_LINK_DISPLAY_NAME )
     {
-        aRet <<= OUString(sLinkDisplayName);
+        aRet <<= sLinkDisplayName;
     }
     else if( rPropertyName == UNO_LINK_DISPLAY_BITMAP )
     {
@@ -4138,7 +4138,7 @@ Any SwXOutlineTarget::getPropertyValue(const OUString& 
rPropertyName)
 {
     Any aRet;
     if(rPropertyName == UNO_LINK_DISPLAY_NAME)
-        aRet <<= OUString(sOutlineText);
+        aRet <<= sOutlineText;
     else
         throw UnknownPropertyException();
     return aRet;
commit 6b58caf0597fed21c78fd806e5f2cef6fc43c502
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Fri Mar 3 14:24:26 2017 +0200

    Dia*Item classes are unused
    
    Change-Id: I0546a15300312c19feaf701057ab0191547b9202
    Reviewed-on: https://gerrit.libreoffice.org/34858
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx
index da66190..afda93c 100644
--- a/sd/inc/sdattr.hxx
+++ b/sd/inc/sdattr.hxx
@@ -67,36 +67,6 @@ inline SfxBoolItem makeSdAttrLayerThisPage()
     return SfxBoolItem( ATTR_LAYER_THISPAGE, false );
 }
 
-class DiaEffectItem : public SfxEnumItem<sal_uInt16>
-{
-public:
-            DiaEffectItem( SvStream& rIn );
-
-    virtual SfxPoolItem*    Clone( SfxItemPool* pPool = nullptr ) const 
override;
-    virtual SfxPoolItem*    Create( SvStream& rIn, sal_uInt16 nVer ) const 
override;
-            sal_uInt16      GetValueCount() const override { return 
FADE_EFFECT_COUNT; }
-};
-
-class DiaSpeedItem : public SfxEnumItem<sal_uInt16>
-{
-public:
-            DiaSpeedItem( SvStream& rIn );
-
-    virtual SfxPoolItem*    Clone( SfxItemPool* pPool = nullptr ) const 
override;
-    virtual SfxPoolItem*    Create( SvStream& rIn, sal_uInt16 nVer ) const 
override;
-            sal_uInt16      GetValueCount() const override { return 
FADE_SPEED_COUNT; }
-};
-
-class DiaAutoItem : public SfxEnumItem<PresChange>
-{
-public:
-            DiaAutoItem( SvStream& rIn );
-
-    virtual SfxPoolItem*    Clone( SfxItemPool* pPool = nullptr ) const 
override;
-    virtual SfxPoolItem*    Create( SvStream& rIn, sal_uInt16 nVer ) const 
override;
-            sal_uInt16      GetValueCount() const override { return 
PRESCHANGE_COUNT; }
-};
-
 #endif // INCLUDED_SD_INC_SDATTR_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/sdattr.cxx b/sd/source/core/sdattr.cxx
index 8a6a385..52597c5 100644
--- a/sd/source/core/sdattr.cxx
+++ b/sd/source/core/sdattr.cxx
@@ -17,71 +17,4 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sdattr.hxx"
-
-using namespace ::com::sun::star;
-
-/*************************************************************************
-|*
-|*  DiaEffectItem
-|*
-*************************************************************************/
-
-DiaEffectItem::DiaEffectItem( SvStream& rIn ) :
-    SfxEnumItem( ATTR_DIA_EFFECT, rIn )
-{
-}
-
-SfxPoolItem* DiaEffectItem::Clone( SfxItemPool* ) const
-{
-    return new DiaEffectItem( *this );
-}
-
-SfxPoolItem* DiaEffectItem::Create( SvStream& rIn, sal_uInt16 ) const
-{
-    return new DiaEffectItem( rIn );
-}
-
-/*************************************************************************
-|*
-|*  DiaSpeedItem
-|*
-*************************************************************************/
-
-DiaSpeedItem::DiaSpeedItem( SvStream& rIn ) :
-    SfxEnumItem( ATTR_DIA_SPEED, rIn )
-{
-}
-
-SfxPoolItem* DiaSpeedItem::Clone( SfxItemPool* ) const
-{
-    return new DiaSpeedItem( *this );
-}
-
-SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, sal_uInt16 ) const
-{
-    return new DiaSpeedItem( rIn );
-}
-
-/*************************************************************************
-|*
-|*  DiaAutoItem
-|*
-*************************************************************************/
-
-DiaAutoItem::DiaAutoItem( SvStream& rIn ) :
-    SfxEnumItem( ATTR_DIA_AUTO, rIn )
-{
-}
-
-SfxPoolItem* DiaAutoItem::Clone( SfxItemPool* ) const
-{
-    return new DiaAutoItem( *this );
-}
-
-SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, sal_uInt16 ) const
-{
-    return new DiaAutoItem( rIn );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to