summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-10-16 12:06:21 +0200
committerJan Holesovsky <kendy@collabora.com>2015-10-16 12:12:28 +0200
commitadeefc6295b1cf411b47b9b4213c16effea9d832 (patch)
tree04eb6620ab4bc1ed72b7c187994c13be30726f52 /sw
parent20248b82be361279f2b4814280b0371658ca27c0 (diff)
sfx items: Kill the unreadable & misplaced SFX_ITEMSET_ARG too.
Change-Id: I1e0f96dce2b9cf9da32f4f577cf76e1d8824d37a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmlform.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/ui/config/optpage.cxx10
-rw-r--r--sw/source/ui/fldui/flddinf.cxx2
-rw-r--r--sw/source/ui/misc/insfnote.cxx4
-rw-r--r--sw/source/ui/misc/srtdlg.cxx2
-rw-r--r--sw/source/uibase/app/apphdl.cxx4
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/app/docshini.cxx2
-rw-r--r--sw/source/uibase/shells/annotsh.cxx4
-rw-r--r--sw/source/uibase/shells/basesh.cxx2
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx4
15 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index ad3e96bbbc58..84e9b8f3f681 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -659,7 +659,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
if ( pDocSh->GetMedium() )
{
// if there is no hidden property in the MediaDescriptor it should be removed after loading
- SFX_ITEMSET_ARG(pDocSh->GetMedium()->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN);
+ const SfxBoolItem* pHiddenItem = SfxItemSet::GetItem<SfxBoolItem>(pDocSh->GetMedium()->GetItemSet(), SID_HIDDEN, false);
bRemoveHidden = ( pHiddenItem == NULL || !pHiddenItem->GetValue() );
}
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 39e737860604..8bd3e1d42651 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2987,7 +2987,7 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec
if ( mpMedium )
{
- SFX_ITEMSET_ARG(mpMedium->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA);
+ const SfxUnoAnyItem* pEncryptionDataItem = SfxItemSet::GetItem<SfxUnoAnyItem>(mpMedium->GetItemSet(), SID_ENCRYPTIONDATA, false);
if ( pEncryptionDataItem && ( pEncryptionDataItem->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
{
OSL_ENSURE( false, "Unexpected EncryptionData!" );
@@ -2997,7 +2997,7 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec
if ( !aEncryptionData.getLength() )
{
// try to generate the encryption data based on password
- SFX_ITEMSET_ARG(mpMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD);
+ const SfxStringItem* pPasswordItem = SfxItemSet::GetItem<SfxStringItem>(mpMedium->GetItemSet(), SID_PASSWORD, false);
if ( pPasswordItem && !pPasswordItem->GetValue().isEmpty() && pPasswordItem->GetValue().getLength() <= 15 )
{
// Generate random number with a seed of time as salt.
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f5a2c61f2046..f2f5dbe1c15c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5526,7 +5526,7 @@ namespace
uno::Sequence< beans::NamedValue > InitXorWord95Codec( ::msfilter::MSCodec_XorWord95& rCodec, SfxMedium& rMedium, WW8Fib* pWwFib )
{
uno::Sequence< beans::NamedValue > aEncryptionData;
- SFX_ITEMSET_ARG(rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA);
+ const SfxUnoAnyItem* pEncryptionData = SfxItemSet::GetItem<SfxUnoAnyItem>(rMedium.GetItemSet(), SID_ENCRYPTIONDATA, false);
if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
aEncryptionData.realloc( 0 );
@@ -5585,7 +5585,7 @@ namespace
uno::Sequence< beans::NamedValue > InitStd97Codec( ::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium )
{
uno::Sequence< beans::NamedValue > aEncryptionData;
- SFX_ITEMSET_ARG(rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA);
+ const SfxUnoAnyItem* pEncryptionData = SfxItemSet::GetItem<SfxUnoAnyItem>(rMedium.GetItemSet(), SID_ENCRYPTIONDATA, false);
if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
aEncryptionData.realloc( 0 );
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 6667624185ae..873708621172 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -515,8 +515,8 @@ IMPL_LINK_NOARG_TYPED(SwAddPrinterTabPage, SelectHdl, ListBox&, void)
void SwAddPrinterTabPage::PageCreated( const SfxAllItemSet& aSet)
{
- SFX_ITEMSET_ARG(&aSet,pListItem,SfxBoolItem,SID_FAX_LIST);
- SFX_ITEMSET_ARG(&aSet,pPreviewItem,SfxBoolItem,SID_PREVIEWFLAG_TYPE);
+ const SfxBoolItem* pListItem = aSet.GetItem<SfxBoolItem>(SID_FAX_LIST, false);
+ const SfxBoolItem* pPreviewItem = aSet.GetItem<SfxBoolItem>(SID_PREVIEWFLAG_TYPE, false);
if (pPreviewItem)
{
SetPreview(pPreviewItem->GetValue());
@@ -1089,7 +1089,7 @@ IMPL_LINK_TYPED( SwStdFontTabPage, LoseFocusHdl, Control&, rControl, void )
void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet)
{
- SFX_ITEMSET_ARG(&aSet,pFlagItem,SfxUInt16Item, SID_FONTMODE_TYPE);
+ const SfxUInt16Item* pFlagItem = aSet.GetItem<SfxUInt16Item>(SID_FONTMODE_TYPE, false);
if (pFlagItem)
SetFontMode(sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue()));
}
@@ -1306,7 +1306,7 @@ IMPL_LINK_NOARG_TYPED(SwTableOptionsTabPage, CheckBoxHdl, Button*, void)
void SwTableOptionsTabPage::PageCreated( const SfxAllItemSet& aSet)
{
- SFX_ITEMSET_ARG(&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL);
+ const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false);
if (pWrtSh)
SetWrtShell(pWrtSh->GetValue());
}
@@ -1411,7 +1411,7 @@ VclPtr<SfxTabPage> SwShdwCrsrOptionsTabPage::Create( vcl::Window* pParent, const
void SwShdwCrsrOptionsTabPage::PageCreated( const SfxAllItemSet& aSet )
{
- SFX_ITEMSET_ARG(&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL);
+ const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false);
if (pWrtSh)
SetWrtShell(pWrtSh->GetValue());
}
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index ca76e79f8646..3bdc85d99755 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -82,7 +82,7 @@ SwFieldDokInfPage::SwFieldDokInfPage(vcl::Window* pParent, const SfxItemSet& rCo
//enable 'active' language selection
m_pFormatLB->SetShowLanguageControl(true);
- SFX_ITEMSET_ARG(&rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO);
+ const SfxUnoAnyItem* pItem = rCoreSet.GetItem<SfxUnoAnyItem>(SID_DOCINFO, false);
if ( pItem )
pItem->GetValue() >>= xCustomPropertySet;
}
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 0c90ebb08df4..f4b424fae7c3 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -116,8 +116,8 @@ IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberExtCharHdl, Button*, void)
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
if (RET_OK == pDlg->Execute())
{
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP);
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT);
+ const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
+ const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pItem )
{
m_pNumberCharEdit->SetText( pItem->GetValue() );
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 5a1b12985b60..f6cdfa9d71e9 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -403,7 +403,7 @@ IMPL_LINK_NOARG_TYPED(SwSortDlg, DelimCharHdl, Button*, void)
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
if( RET_OK == pMap->Execute() )
{
- SFX_ITEMSET_ARG(pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR);
+ const SfxInt32Item* pItem = SfxItemSet::GetItem<SfxInt32Item>(pMap->GetOutputItemSet(), SID_ATTR_CHAR, false);
if ( pItem )
m_pDelimEdt->SetText( OUString(sal_Unicode(pItem->GetValue())) );
}
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index c6fa1fd7d634..e4166bfc0fb4 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -701,7 +701,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
// update fixed fields
if (pDocSh->GetMedium())
{
- SFX_ITEMSET_ARG(pDocSh->GetMedium()->GetItemSet(), pTemplateItem, SfxBoolItem, SID_TEMPLATE);
+ const SfxBoolItem* pTemplateItem = SfxItemSet::GetItem<SfxBoolItem>(pDocSh->GetMedium()->GetItemSet(), SID_TEMPLATE, false);
if (pTemplateItem && pTemplateItem->GetValue())
{
pDocSh->GetDoc()->getIDocumentFieldsAccess().SetFixFields(false, 0);
@@ -712,7 +712,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
// Update all FIX-Date/Time fields
if( pWrtSh )
{
- SFX_ITEMSET_ARG(pDocSh->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE);
+ const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(pDocSh->GetMedium()->GetItemSet(), SID_UPDATEDOCMODE, false);
bool bUpdateFields = true;
if( pUpdateDocItem && pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE)
bUpdateFields = false;
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 612c8d7c8845..b6dd0809eca0 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -198,7 +198,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
return 0;
// #i30171# set the UpdateDocMode at the SwDocShell
- SFX_ITEMSET_ARG(rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE);
+ const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
m_nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
if (!pFlt->GetDefaultTemplate().isEmpty())
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index ec99808d258d..68f5f9c172ba 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -869,7 +869,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich, false, &pItem ) )
{
aFileName = static_cast<const SfxStringItem*>(pItem)->GetValue();
- SFX_ITEMSET_ARG(pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME);
+ const SfxStringItem* pTemplItem = SfxItemSet::GetItem<SfxStringItem>(pArgs, SID_TEMPLATE_NAME, false);
if ( pTemplItem )
aTemplateName = pTemplItem->GetValue();
}
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 786f6844f740..c91b99d0bf0e 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -502,7 +502,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SfxObjectCreateMode::ORGANIZER == GetCreateMode() );
if(GetCreateMode() != SfxObjectCreateMode::ORGANIZER)
{
- SFX_ITEMSET_ARG(rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE);
+ const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
m_nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
}
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index d4e9cdaac179..1c5e2351081b 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1709,8 +1709,8 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP);
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT);
+ const SfxStringItem* pCItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
+ const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 9336584c413e..50c290802746 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -708,7 +708,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_GALLERY_FORMATS:
{
- SFX_ITEMSET_ARG(pArgs, pGalleryItem, SvxGalleryItem, SID_GALLERY_FORMATS);
+ const SvxGalleryItem* pGalleryItem = SfxItemSet::GetItem<SvxGalleryItem>(pArgs, SID_GALLERY_FORMATS, false);
if ( !pGalleryItem )
break;
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 52e50fdf963b..b98db0f16ae2 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -748,8 +748,8 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP);
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT);
+ const SfxStringItem* pCItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
+ const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index c842ef5e14d5..525d7cd88001 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -1042,8 +1042,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
if( RET_OK == pDlg->Execute() )
{
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP);
- SFX_ITEMSET_ARG(pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT);
+ const SfxStringItem* pCItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
+ const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, false);
if ( pFontItem )
{
aNewFont.SetName( pFontItem->GetFamilyName() );