Related tdf#164685: Cleanup class SfxItemSetFixed (sw remnants)

Change-Id: Ideb392dadad9dabc08d978bdc23ecc4cc671c7c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203940
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
This commit is contained in:
Julien Nabet
2026-04-20 12:29:03 +02:00
parent e79df8ba0e
commit 95c28f1faa
21 changed files with 47 additions and 47 deletions
+4 -4
View File
@@ -163,10 +163,10 @@ static bool Put( std::shared_ptr<const SwAttrSet>& rpAttrSet, const SwContentNod
SwAttrSet aNewSet( *rpAttrSet );
// #i76273# Robust
std::optional<SfxItemSetFixed<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>> pStyleNames;
std::optional<SfxItemSet> pStyleNames;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames.emplace( *aNewSet.GetPool() );
pStyleNames.emplace( *aNewSet.GetPool(), WhichRangesContainer(svl::Items<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>));
pStyleNames->Put( aNewSet );
}
@@ -210,10 +210,10 @@ static bool Put_BC( std::shared_ptr<const SwAttrSet>& rpAttrSet,
SwAttrSet aNewSet( *rpAttrSet );
// #i76273# Robust
std::optional<SfxItemSetFixed<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>> pStyleNames;
std::optional<SfxItemSet> pStyleNames;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames.emplace( *aNewSet.GetPool() );
pStyleNames.emplace( *aNewSet.GetPool(), WhichRangesContainer(svl::Items<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>));
pStyleNames->Put( aNewSet );
}
+1 -1
View File
@@ -935,7 +935,7 @@ short SwRedlineItr::Seek(SwFont& rFnt,
{
SwAttrPool& rPool =
const_cast<SwDoc&>(m_rDoc).GetAttrPool();
m_pSet = std::make_unique<SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END-1>>(rPool);
m_pSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<RES_CHRATR_BEGIN, RES_CHRATR_END-1>(rPool));
}
if( 1 < pRed->GetStackCount() )
+2 -2
View File
@@ -1703,13 +1703,13 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
// standard UNO API write attributes
// adapt former attr from SvxBrushItem::PutValue to new items XATTR_FILL_FIRST, XATTR_FILL_LAST
SfxItemSetFixed
SfxItemSet aSet(SfxItemSet::makeFixedSfxItemSet
<RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
// FillAttribute support
XATTR_FILL_FIRST, XATTR_FILL_LAST>
aSet( rDoc.GetAttrPool());
( rDoc.GetAttrPool()));
bool bDone(false);
aSet.SetParent(&pFormat->GetAttrSet());
+2 -2
View File
@@ -519,11 +519,11 @@ SwUnoCursorHelper::SetCursorPropertyValue(
// TODO create own map for this, it contains UNO_NAME_DISPLAY_NAME? or make property readable so ODF export can map it to a automatic style?
SfxItemPropertySet const& rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_CHAR_AUTO_STYLE));
SfxItemPropertyMap const& rMap(rPropSet.getPropertyMap());
SfxItemSetFixed
SfxItemSet items(SfxItemSet::makeFixedSfxItemSet
<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>
items( rPam.GetDoc().GetAttrPool() );
( rPam.GetDoc().GetAttrPool() ));
for (beans::NamedValue const& prop : props)
{
+2 -2
View File
@@ -395,10 +395,10 @@ void SwXTextPortion::GetPropertyValue(
{
if(!pSet)
{
pSet = std::make_unique<SfxItemSetFixed<
pSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
RES_UNKNOWNATR_CONTAINER,
RES_UNKNOWNATR_CONTAINER>>(pUnoCursor->GetDoc().GetAttrPool());
RES_UNKNOWNATR_CONTAINER>(pUnoCursor->GetDoc().GetAttrPool()));
SwUnoCursorHelper::GetCursorAttr(*pUnoCursor, *pSet);
}
SfxItemPropertySet::getPropertyValue(rEntry, *pSet, rVal);
+3 -3
View File
@@ -3048,7 +3048,7 @@ void SwXPageStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rProper
else if(pEntry->nWID == SID_ATTR_PAGE_ON && rValues[nProp].get<bool>())
{
// Header/footer gets switched on, create defaults and the needed SfxSetItem
SfxItemSetFixed
SfxItemSet aTempSet(SfxItemSet::makeFixedSfxItemSet
<RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [82
// FillAttribute support
@@ -3058,7 +3058,7 @@ void SwXPageStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rProper
SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>
aTempSet(*aBaseImpl.GetItemSet().GetPool());
(*aBaseImpl.GetItemSet().GetPool()));
// set correct parent to get the XFILL_NONE FillStyle as needed
aTempSet.SetParent(&GetDoc()->GetDfltFrameFormat()->GetAttrSet());
@@ -3934,7 +3934,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc& rInitDoc, IStyleAccess::SwAut
std::pair< sal_uInt16, text::RubyAdjust > aPair( rRubyItem.GetPosition(), rRubyItem.GetAdjustment() );
if ( aRubyMap.insert( aPair ).second )
{
auto pItemSet = std::make_shared<SfxItemSetFixed<RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY>>( rAttrPool );
auto pItemSet = std::make_shared<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY>( rAttrPool ));
pItemSet->Put( rRubyItem );
mAutoStyles.push_back( pItemSet );
}
+2 -2
View File
@@ -1718,10 +1718,10 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
break;
default:
{
SfxItemSetFixed
SfxItemSet aSet(SfxItemSet::makeFixedSfxItemSet
<RES_CHRATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>
aSet(rTableCursor.GetDoc().GetAttrPool());
(rTableCursor.GetDoc().GetAttrPool()));
SwUnoCursorHelper::GetCursorAttr(rTableCursor.GetSelRing(), aSet);
SfxItemPropertySet::getPropertyValue(*pEntry, aSet, aResult);
}
+1 -1
View File
@@ -818,7 +818,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet
}
// create new Itemset for character attributes
rpItemSet.reset(new SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>( m_rDoc.GetAttrPool() ));
rpItemSet.reset(new SfxItemSet(SfxItemSet::makeFixedSfxItemSet<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>( m_rDoc.GetAttrPool() )));
// Set Reader-ItemSet-Pointer to the newly created set
m_rReader.SetCurrentItemSet(std::move(rpItemSet));
+2 -2
View File
@@ -231,9 +231,9 @@ void SwParaDlg::PageCreated(const OUString& rId, SfxTabPage& rPage)
// demand, but could also be directly added from the DrawModel.
else if (rId == "area")
{
SfxItemSetFixed
SfxItemSet aNew(SfxItemSet::makeFixedSfxItemSet
<SID_COLOR_TABLE, SID_PATTERN_LIST,
SID_OFFER_IMPORT, SID_OFFER_IMPORT> aNew(*aSet.GetPool());
SID_OFFER_IMPORT, SID_OFFER_IMPORT> (*aSet.GetPool()));
aNew.Put(*GetInputSetImpl());
+2 -2
View File
@@ -1108,9 +1108,9 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
}
else
{
auto pPrinterSet = std::make_unique<SfxItemSetFixed
auto pPrinterSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet
<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>>( *rSet->GetPool() );
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>( *rSet->GetPool() ));
m_pPrt = VclPtr<SfxPrinter>::Create(std::move(pPrinterSet));
m_bDisposePrinter = true;
}
+2 -2
View File
@@ -198,9 +198,9 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( weld::Window* pParent, SwDocShell& rDocSh,
VclPtr<SfxPrinter> pPrt = pDoc ? pDoc->getIDocumentDeviceAccess().getPrinter(false) : nullptr;
if( !pPrt )
{
auto pSet = std::make_unique<SfxItemSetFixed
auto pSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet
<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>>( rDocSh.GetPool() );
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>( rDocSh.GetPool() ));
pPrt = VclPtr<SfxPrinter>::Create( std::move(pSet) );
bDelPrinter = true;
}
+1 -1
View File
@@ -196,7 +196,7 @@ SfxTabPage* SwFieldEditDlg::CreatePage(SwFieldGroup nGroup)
case SwFieldGroup::DocInfos:
if (SfxObjectShell* pDocSh = SfxObjectShell::Current())
{
auto pSet = new SfxItemSetFixed<FN_FIELD_DIALOG_DOC_PROPS, FN_FIELD_DIALOG_DOC_PROPS>( pDocSh->GetPool() );
auto pSet = new SfxItemSet(SfxItemSet::makeFixedSfxItemSet<FN_FIELD_DIALOG_DOC_PROPS, FN_FIELD_DIALOG_DOC_PROPS>( pDocSh->GetPool() ));
using namespace ::com::sun::star;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocSh->GetModel(), uno::UNO_QUERY_THROW);
+1 -1
View File
@@ -137,7 +137,7 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet(const OUString& rID)
SwDocShell *const pDocSh(static_cast<SwDocShell*>(SfxObjectShell::Current()));
if (rID == "docinfo" && pDocSh) // might not have a shell if the dialog is restored on startup
{
mxInputItemSet = std::make_unique<SfxItemSetFixed<FN_FIELD_DIALOG_DOC_PROPS, FN_FIELD_DIALOG_DOC_PROPS>>( pDocSh->GetPool() );
mxInputItemSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<FN_FIELD_DIALOG_DOC_PROPS, FN_FIELD_DIALOG_DOC_PROPS>( pDocSh->GetPool() ));
using namespace ::com::sun::star;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocSh->GetModel(), uno::UNO_QUERY_THROW);
+2 -2
View File
@@ -138,10 +138,10 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& rSh)
const SwPageDesc* pPageDesc = m_rWrtShell.GetSelectedPageDescs();
if( pPageDesc )
{
m_pPageSet = std::make_unique<SfxItemSetFixed<
m_pPageSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
RES_FRM_SIZE, RES_FRM_SIZE,
RES_LR_SPACE, RES_LR_SPACE,
RES_COL, RES_COL>>(m_rWrtShell.GetAttrPool());
RES_COL, RES_COL>(m_rWrtShell.GetAttrPool()));
const SwFrameFormat &rFormat = pPageDesc->GetMaster();
m_nPageWidth = rFormat.GetFrameSize().GetSize().Width();
+1 -1
View File
@@ -645,7 +645,7 @@ IMPL_LINK(SwGlossaryDlg, MenuHdl, const OUString&, rItemIdent, void)
}
else if (rItemIdent == "macro")
{
auto xSet = std::make_unique<SfxItemSetFixed<RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG>>( m_pShell->GetAttrPool() );
auto xSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG>( m_pShell->GetAttrPool() ));
SvxMacro aStart(OUString(), OUString(), STARBASIC);
SvxMacro aEnd(OUString(), OUString(), STARBASIC);
+1 -1
View File
@@ -1968,7 +1968,7 @@ void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView)
OutlinerView* pOLV = pWin->GetOutlinerView();
SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxItemPool* pPool(SwAnnotationShell::GetAnnotationPool(rView));
auto xDlgAttr = std::make_shared<SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>>(*pPool);
auto xDlgAttr = std::make_shared<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>(*pPool));
xDlgAttr->Put(aEditAttr);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(rView.GetFrameWeld(), rView, *xDlgAttr, SwCharDlgMode::Ann));
+3 -3
View File
@@ -238,11 +238,11 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString
{
// we create a default SfxPrinter.
// ItemSet is deleted by Sfx!
auto pSet = std::make_unique<SfxItemSetFixed<
auto pSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>>
( xDocSh->GetDoc()->GetAttrPool() );
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>
( xDocSh->GetDoc()->GetAttrPool() ));
VclPtr<SfxPrinter> pPrinter = VclPtr<SfxPrinter>::Create( std::move(pSet) );
// and append it to the document.
+1 -1
View File
@@ -702,7 +702,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( pView) != nullptr );
SwModule::get()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
auto pCoreSet = std::make_shared<SfxItemSetFixed<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO>>( GetPool() );
auto pCoreSet = std::make_shared<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO>( GetPool() ));
SfxItemSet aBoxSet(SfxItemSet::makeFixedSfxItemSet<RES_BOXATR_FORMAT, RES_BOXATR_FORMAT,
RES_BOXATR_VALUE, RES_BOXATR_VALUE>( *pCoreSet->GetPool() ));
+2 -2
View File
@@ -178,14 +178,14 @@ static void sw_CharDialog(SwWrtShell& rWrtSh, bool bUseDialog, bool bApplyToPara
{
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &rWrtSh.GetView()) != nullptr );
SwModule::get()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast<sal_uInt16>(eMetric)));
auto pCoreSet = std::make_shared<SfxItemSetFixed<
auto pCoreSet = std::make_shared<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_BACKGROUND, RES_SHADOW,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
SID_HTML_MODE, SID_HTML_MODE,
SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
FN_PARAM_SELECTION, FN_PARAM_SELECTION>> ( rWrtSh.GetView().GetPool() );
FN_PARAM_SELECTION, FN_PARAM_SELECTION> ( rWrtSh.GetView().GetPool() ));
rWrtSh.GetCurAttr(*pCoreSet);
bool bSel = rWrtSh.HasSelection();
+10 -10
View File
@@ -48,7 +48,7 @@ std::unique_ptr<SfxItemSet> lcl_CreateEmptyItemSet( SelectionType nSelectionType
std::unique_ptr<SfxItemSet> pItemSet;
if( nSelectionType & (SelectionType::Frame | SelectionType::Ole | SelectionType::Graphic) )
{
pItemSet = std::make_unique<SfxItemSetFixed<
pItemSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
RES_FRMATR_BEGIN, RES_FILL_ORDER,
// no RES_FRM_SIZE
RES_PAPER_BIN, RES_SURROUND,
@@ -61,7 +61,7 @@ std::unique_ptr<SfxItemSet> lcl_CreateEmptyItemSet( SelectionType nSelectionType
// no RES_URL
RES_EDIT_IN_READONLY, RES_LAYOUT_SPLIT,
// no RES_CHAIN
RES_TEXTGRID, RES_FRMATR_END - 1>>(rPool);
RES_TEXTGRID, RES_FRMATR_END - 1>(rPool));
}
else if( nSelectionType & SelectionType::DrawObject )
{
@@ -70,10 +70,10 @@ std::unique_ptr<SfxItemSet> lcl_CreateEmptyItemSet( SelectionType nSelectionType
else if( nSelectionType & SelectionType::Text )
{
if( bNoParagraphFormats )
pItemSet = std::make_unique<SfxItemSetFixed
<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>>(rPool);
pItemSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet
<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>(rPool));
else
pItemSet = std::make_unique<SfxItemSetFixed<
pItemSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
RES_PARATR_BEGIN, RES_FILL_ORDER,
// no RES_FRM_SIZE
@@ -87,7 +87,7 @@ std::unique_ptr<SfxItemSet> lcl_CreateEmptyItemSet( SelectionType nSelectionType
// no RES_URL
RES_EDIT_IN_READONLY, RES_LAYOUT_SPLIT,
// no RES_CHAIN
RES_TEXTGRID, RES_FRMATR_END - 1>>(rPool);
RES_TEXTGRID, RES_FRMATR_END - 1>(rPool));
}
return pItemSet;
}
@@ -381,7 +381,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
if (nSelectionType & SelectionType::TableCell)
{
//only copy all table attributes if really cells are selected (not only text in tables)
m_pTableItemSet = std::make_unique<SfxItemSetFixed<
m_pTableItemSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
RES_PAGEDESC, RES_BREAK,
RES_BACKGROUND, RES_SHADOW, // RES_BOX is inbetween
RES_KEEP, RES_KEEP,
@@ -394,13 +394,13 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE,
FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN,
FN_TABLE_BOX_TEXTORIENTATION, FN_TABLE_BOX_TEXTORIENTATION,
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE>>(rPool);
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE>(rPool));
}
else
{
//selection in table should copy number format
m_pTableItemSet = std::make_unique<SfxItemSetFixed<
RES_BOXATR_FORMAT, RES_BOXATR_FORMAT>>(rPool);
m_pTableItemSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
RES_BOXATR_FORMAT, RES_BOXATR_FORMAT>(rPool));
}
lcl_getTableAttributes( *m_pTableItemSet, rWrtShell, nSelectionType & SelectionType::TableCell ? true : false);
+2 -2
View File
@@ -500,11 +500,11 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
SvMemoryStream aStream (aSequence.getArray(), nSize,
StreamMode::READ );
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
auto pItemSet = std::make_unique<SfxItemSetFixed<
auto pItemSet = std::make_unique<SfxItemSet>(SfxItemSet::makeFixedSfxItemSet<
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
SID_HTML_MODE, SID_HTML_MODE,
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>>( mpDoc->GetAttrPool() );
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>( mpDoc->GetAttrPool() ));
VclPtr<SfxPrinter> pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) );
assert (! pPrinter->isDisposed() );
// set printer only once; in _postSetValues