summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2024-01-27 15:04:06 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2024-01-27 19:02:54 +0100
commit4790ef5cb574650c418591566eeb0babc69db59e (patch)
treebdca4156b1da8bb3efc06cebcee77fa541866ca7
parentd2d8f8bf82558d9aa548fb9f13bed410e0baf79b (diff)
ITEM: Cleanup some Pool stuff with Defaults
Sorted out some methods at ItemPool which process Defaults to make more clear what is going on and what which method is doing. Change-Id: I2568d3e03d0a56a14b6fe4e04521e1a8e22c000b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162643 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx8
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartTransferable.cxx2
-rw-r--r--chart2/source/view/main/ChartItemPool.cxx4
-rw-r--r--chart2/source/view/main/ChartView.cxx4
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx4
-rw-r--r--cui/source/tabpages/TextColumnsPage.cxx4
-rw-r--r--cui/source/tabpages/connect.cxx8
-rw-r--r--cui/source/tabpages/measure.cxx12
-rw-r--r--cui/source/tabpages/textanim.cxx14
-rw-r--r--cui/source/tabpages/textattr.cxx8
-rw-r--r--cui/source/tabpages/tpshadow.cxx4
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx12
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx2
-rw-r--r--editeng/source/editeng/editdoc.cxx4
-rw-r--r--editeng/source/editeng/impedit4.cxx10
-rw-r--r--editeng/source/editeng/impedit5.cxx2
-rw-r--r--editeng/source/outliner/outlvw.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx4
-rw-r--r--editeng/source/rtf/svxrtf.cxx8
-rw-r--r--editeng/source/uno/unofdesc.cxx14
-rw-r--r--editeng/source/uno/unoipset.cxx6
-rw-r--r--editeng/source/uno/unotext.cxx2
-rw-r--r--extensions/source/propctrlr/fontdialog.cxx4
-rw-r--r--forms/source/richtext/richtextengine.cxx10
-rw-r--r--include/svl/itempool.hxx69
-rw-r--r--include/svl/poolitem.hxx36
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
-rw-r--r--sc/qa/unit/subsequent_export_test.cxx12
-rw-r--r--sc/source/core/data/attarray.cxx10
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/core/data/documen3.cxx8
-rw-r--r--sc/source/core/data/documen9.cxx8
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/core/data/drwlayer.cxx20
-rw-r--r--sc/source/core/data/fillinfo.cxx6
-rw-r--r--sc/source/core/data/global.cxx4
-rw-r--r--sc/source/core/data/patattr.cxx2
-rw-r--r--sc/source/core/data/stlsheet.cxx16
-rw-r--r--sc/source/core/data/table4.cxx2
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx2
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx2
-rw-r--r--sc/source/ui/app/drwtrans.cxx2
-rw-r--r--sc/source/ui/app/msgpool.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx12
-rw-r--r--sc/source/ui/view/printfun.cxx6
-rw-r--r--sd/source/core/drawdoc.cxx2
-rw-r--r--sd/source/core/drawdoc2.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx10
-rw-r--r--sd/source/core/stlpool.cxx2
-rw-r--r--sd/source/core/stlsheet.cxx6
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx4
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx2
-rw-r--r--sd/source/ui/func/fuolbull.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
-rw-r--r--sd/source/ui/unoidl/unopback.cxx6
-rw-r--r--sd/source/ui/view/viewshel.cxx2
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx2
-rw-r--r--sfx2/source/explorer/nochaos.cxx4
-rw-r--r--starmath/source/smediteng.cxx8
-rw-r--r--svl/qa/unit/items/stylepool.cxx4
-rw-r--r--svl/source/items/itempool.cxx108
-rw-r--r--svl/source/items/itemprop.cxx4
-rw-r--r--svl/source/items/itemset.cxx20
-rw-r--r--svl/source/items/poolitem.cxx3
-rw-r--r--svx/source/dialog/hdft.cxx2
-rw-r--r--svx/source/dialog/weldeditview.cxx12
-rw-r--r--svx/source/engine3d/view3d1.cxx4
-rw-r--r--svx/source/svdraw/svdattr.cxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx18
-rw-r--r--svx/source/table/cell.cxx6
-rw-r--r--svx/source/unodraw/unomod.cxx2
-rw-r--r--svx/source/unodraw/unopool.cxx34
-rw-r--r--svx/source/unodraw/unoshape.cxx8
-rw-r--r--svx/source/xoutdev/xpool.cxx4
-rw-r--r--sw/source/core/attr/swatrset.cxx16
-rw-r--r--sw/source/core/bastyp/init.cxx2
-rw-r--r--sw/source/core/crsr/findattr.cxx10
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx4
-rw-r--r--sw/source/core/doc/doc.cxx2
-rw-r--r--sw/source/core/doc/docdraw.cxx2
-rw-r--r--sw/source/core/doc/docfmt.cxx10
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/doc/poolfmt.cxx4
-rw-r--r--sw/source/core/draw/drawdoc.cxx4
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rw-r--r--sw/source/core/text/txttab.cxx2
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx4
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
-rw-r--r--sw/source/core/unocore/unoobj.cxx4
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx2
-rw-r--r--sw/source/core/unocore/unosrch.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx4
-rw-r--r--sw/source/core/view/vprint.cxx4
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/writer/writer.cxx4
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx12
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx6
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx2
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx2
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx2
-rw-r--r--sw/source/ui/envelp/envfmt.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/shells/langhelper.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/shells/txtattr.cxx8
-rw-r--r--vcl/source/app/scheduler.cxx2
126 files changed, 436 insertions, 410 deletions
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 1cd90c06b7ad..51d3e7c3e63a 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -90,12 +90,12 @@ DrawViewWrapper::DrawViewWrapper(
SvtLinguConfig aLinguConfig;
SvtLinguOptions aLinguOptions;
aLinguConfig.GetOptions( aLinguOptions );
- pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage, EE_CHAR_LANGUAGE ) );
- pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK ) );
- pOutlinerPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL ) );
+ pOutlinerPool->SetUserDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage, EE_CHAR_LANGUAGE ) );
+ pOutlinerPool->SetUserDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK ) );
+ pOutlinerPool->SetUserDefaultItem( SvxLanguageItem( aLinguOptions.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL ) );
// set font height without changing SdrEngineDefaults
- pOutlinerPool->SetPoolDefaultItem( SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT ) ); // 12pt
+ pOutlinerPool->SetUserDefaultItem( SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT ) ); // 12pt
}
// #i121463# Use big handles by default
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index d4578313e87f..4ef74c80a83b 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -95,7 +95,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
if( GetItemProperty( nWhich, aProperty ))
{
// put the Property into the itemset
- std::unique_ptr<SfxPoolItem> pItem(rPool.GetDefaultItem( nWhich ).Clone());
+ std::unique_ptr<SfxPoolItem> pItem(rPool.GetUserOrPoolDefaultItem( nWhich ).Clone());
if( pItem )
{
diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index 9a94d45ff9ff..d369562d03d2 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -123,7 +123,7 @@ bool ChartTransferable::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void*
// for the changed pool defaults from drawing layer pool set those
// attributes as hard attributes to preserve them for saving
const SfxItemPool& rItemPool = pMarkedObjModel->GetItemPool();
- const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetDefaultItem( EE_CHAR_FONTHEIGHT );
+ const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetUserOrPoolDefaultItem( EE_CHAR_FONTHEIGHT );
sal_uInt16 nCount = pMarkedObjModel->GetPageCount();
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx
index afecbf047107..8b198028baf7 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -200,7 +200,7 @@ ChartItemPool::ChartItemPool():
pItemInfos[SCHATTR_STYLE_SYMBOL - SCHATTR_START]._nItemInfoSlotID = SID_ATTR_SYMBOLTYPE;
pItemInfos[SCHATTR_SYMBOL_SIZE - SCHATTR_START]._nItemInfoSlotID = SID_ATTR_SYMBOLSIZE;
- SetDefaults(ppPoolDefaults);
+ SetPoolDefaults(ppPoolDefaults);
SetItemInfos(pItemInfos.get());
}
@@ -213,7 +213,7 @@ ChartItemPool::~ChartItemPool()
{
Delete();
// release and delete static pool default items
- ReleaseDefaults(true);
+ ReleasePoolDefaults(true);
}
rtl::Reference<SfxItemPool> ChartItemPool::Clone() const
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index bed80f49b326..d01a877040b2 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -471,7 +471,7 @@ void lcl_setDefaultWritingMode( const std::shared_ptr< DrawModelWrapper >& pDraw
if( nWritingMode != -1 && nWritingMode != text::WritingMode2::PAGE )
{
if( pDrawModelWrapper )
- pDrawModelWrapper->GetItemPool().SetPoolDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR) );
+ pDrawModelWrapper->GetItemPool().SetUserDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR) );
}
}
catch( const uno::Exception& )
@@ -486,7 +486,7 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( const std::shared_ptr<DrawModelWrap
if(!pDrawModelWrapper)
return nWritingMode;
- const SfxPoolItem& rItem = pDrawModelWrapper->GetItemPool().GetDefaultItem(EE_PARA_WRITINGDIR);
+ const SfxPoolItem& rItem = pDrawModelWrapper->GetItemPool().GetUserOrPoolDefaultItem(EE_PARA_WRITINGDIR);
nWritingMode
= static_cast<sal_Int16>(static_cast<const SvxFrameDirectionItem&>(rItem).GetValue());
return nWritingMode;
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 5593c9b59943..a8cfa60d0875 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -52,8 +52,8 @@ DrawModelWrapper::DrawModelWrapper()
SfxItemPool* pMasterPool = &GetItemPool();
pMasterPool->SetDefaultMetric(MapUnit::Map100thMM);
- pMasterPool->SetPoolDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE, true) );
- pMasterPool->SetPoolDefaultItem(makeSvx3DPercentDiagonalItem (5));
+ pMasterPool->SetUserDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE, true) );
+ pMasterPool->SetUserDefaultItem(makeSvx3DPercentDiagonalItem (5));
// append chart pool to end of pool chain
pMasterPool->GetLastPoolInChain()->SetSecondaryPool(m_xChartItemPool.get());
diff --git a/cui/source/tabpages/TextColumnsPage.cxx b/cui/source/tabpages/TextColumnsPage.cxx
index 5bfd3b47a69e..2e39995083f3 100644
--- a/cui/source/tabpages/TextColumnsPage.cxx
+++ b/cui/source/tabpages/TextColumnsPage.cxx
@@ -39,7 +39,7 @@ void SvxTextColumnsPage::Reset(const SfxItemSet* rAttrs)
{
auto pItem = GetItem(*rAttrs, SDRATTR_TEXTCOLUMNS_NUMBER);
if (!pItem)
- pItem = &pPool->GetDefaultItem(SDRATTR_TEXTCOLUMNS_NUMBER);
+ pItem = &pPool->GetUserOrPoolDefaultItem(SDRATTR_TEXTCOLUMNS_NUMBER);
m_xColumnsNumber->set_value(pItem->GetValue());
m_xColumnsNumber->save_value();
}
@@ -48,7 +48,7 @@ void SvxTextColumnsPage::Reset(const SfxItemSet* rAttrs)
MapUnit eUnit = pPool->GetMetric(SDRATTR_TEXTCOLUMNS_SPACING);
auto pItem = GetItem(*rAttrs, SDRATTR_TEXTCOLUMNS_SPACING);
if (!pItem)
- pItem = &pPool->GetDefaultItem(SDRATTR_TEXTCOLUMNS_SPACING);
+ pItem = &pPool->GetUserOrPoolDefaultItem(SDRATTR_TEXTCOLUMNS_SPACING);
SetMetricValue(*m_xColumnsSpacing, pItem->GetValue(), eUnit);
m_xColumnsSpacing->save_value();
}
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index b69f17b55113..b3d036d991f9 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -124,7 +124,7 @@ void SvxConnectionPage::SetMetricValueAndSave(const SfxItemSet* rAttrs, weld::Me
const SfxPoolItem* pItem = GetItem( *rAttrs, nWhich);
const SfxItemPool* pPool = rAttrs->GetPool();
if( !pItem )
- pItem = &pPool->GetDefaultItem( nWhich );
+ pItem = &pPool->GetUserOrPoolDefaultItem( nWhich );
SetMetricValue(rField, pItem->StaticWhichCast(nWhich).GetValue(), eUnit);
rField.save_value();
}
@@ -164,7 +164,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
// SdrEdgeLineDeltaAnzItem
pItem = GetItem( *rAttrs, SDRATTR_EDGELINEDELTACOUNT );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTACOUNT );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_EDGELINEDELTACOUNT );
switch (pItem->StaticWhichCast(SDRATTR_EDGELINEDELTACOUNT).GetValue())
{
case 0:
@@ -187,7 +187,7 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
// SdrEdgeKindItem
pItem = GetItem( *rAttrs, SDRATTR_EDGEKIND );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_EDGEKIND );
m_xLbType->set_active(
sal::static_int_cast<sal_uInt16>(pItem->StaticWhichCast(SDRATTR_EDGEKIND).GetValue()));
m_xLbType->save_value();
@@ -374,7 +374,7 @@ void SvxConnectionPage::FillTypeLB()
const SfxItemPool* pPool = rOutAttrs.GetPool();
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_EDGEKIND );
const SdrEdgeKindItem* pEdgeKindItem = &pItem->StaticWhichCast(SDRATTR_EDGEKIND);
const sal_uInt16 nCount = pEdgeKindItem->GetValueCount();
for (sal_uInt16 i = 0; i < nCount; i++)
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index fe61ed53abff..3e53891e21e2 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -149,14 +149,14 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
// SdrMeasureLineDistItem
if( pItem == nullptr )
- pItem = &pPool->GetDefaultItem( SDRATTR_MEASURELINEDIST );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_MEASURELINEDIST );
SetMetricValue(*m_xMtrFldLineDist, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
m_xMtrFldLineDist->save_value();
// SdrMeasureHelplineOverhangItem
pItem = GetItem( *rAttrs, SDRATTR_MEASUREHELPLINEOVERHANG );
if( pItem == nullptr )
- pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINEOVERHANG );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_MEASUREHELPLINEOVERHANG );
SetMetricValue(*m_xMtrFldHelplineOverhang, static_cast<const SdrMetricItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldHelplineOverhang->save_value();
@@ -164,7 +164,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
// SdrMeasureHelplineDistItem
pItem = GetItem( *rAttrs, SDRATTR_MEASUREHELPLINEDIST );
if( pItem == nullptr )
- pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINEDIST );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_MEASUREHELPLINEDIST );
SetMetricValue(*m_xMtrFldHelplineDist, static_cast<const SdrMetricItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldHelplineDist->save_value();
@@ -172,7 +172,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
// SdrMeasureHelpline1LenItem
pItem = GetItem( *rAttrs, SDRATTR_MEASUREHELPLINE1LEN );
if( pItem == nullptr )
- pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINE1LEN );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_MEASUREHELPLINE1LEN );
SetMetricValue(*m_xMtrFldHelpline1Len, static_cast<const SdrMetricItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldHelpline1Len->save_value();
@@ -180,7 +180,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
// SdrMeasureHelpline2LenItem
pItem = GetItem( *rAttrs, SDRATTR_MEASUREHELPLINE2LEN );
if( pItem == nullptr )
- pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINE2LEN );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_MEASUREHELPLINE2LEN );
SetMetricValue(*m_xMtrFldHelpline2Len, static_cast<const SdrMetricItem*>(pItem)->GetValue(),
eUnit);
m_xMtrFldHelpline2Len->save_value();
@@ -200,7 +200,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
// SdrMeasureDecimalPlacesItem
pItem = GetItem( *rAttrs, SDRATTR_MEASUREDECIMALPLACES );
if( pItem == nullptr )
- pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREDECIMALPLACES );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_MEASUREDECIMALPLACES );
m_xMtrFldDecimalPlaces->set_value(
static_cast<const SdrMeasureDecimalPlacesItem*>(pItem)->GetValue());
m_xMtrFldDecimalPlaces->save_value();
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index b5ba3d90ce62..f0964e4957d6 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -140,7 +140,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
const SfxPoolItem* pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANIKIND );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIKIND );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_ANIKIND );
eAniKind = static_cast<const SdrTextAniKindItem*>(pItem)->GetValue();
m_xLbEffect->set_active(sal::static_int_cast<sal_Int32>(eAniKind));
@@ -149,7 +149,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
// animation direction
pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANIDIRECTION );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDIRECTION );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_ANIDIRECTION );
SelectDirection(static_cast<const SdrTextAniDirectionItem*>(pItem)->GetValue());
m_aUpState = m_xBtnUp->get_state();
@@ -160,7 +160,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
// Start inside
pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANISTARTINSIDE );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE );
if (static_cast<const SdrTextAniStartInsideItem*>(pItem)->GetValue())
m_xTsbStartInside->set_state(TRISTATE_TRUE);
@@ -171,7 +171,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
// Stop inside
pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANISTOPINSIDE );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE );
if (static_cast<const SdrTextAniStopInsideItem*>(pItem)->GetValue())
m_xTsbStopInside->set_state(TRISTATE_TRUE);
@@ -182,7 +182,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
// quantity
pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANICOUNT );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_ANICOUNT );
tools::Long nValue = static_cast<tools::Long>(static_cast<const SdrTextAniCountItem*>(pItem)->GetValue());
m_xNumFldCount->set_value(nValue);
@@ -207,7 +207,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
// delay
pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANIDELAY );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_ANIDELAY );
nValue = static_cast<tools::Long>(static_cast<const SdrTextAniDelayItem*>(pItem)->GetValue());
m_xMtrFldDelay->set_value(nValue, FieldUnit::NONE);
@@ -224,7 +224,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
// step size
pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANIAMOUNT );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_ANIAMOUNT );
nValue = static_cast<tools::Long>(static_cast<const SdrTextAniAmountItem*>(pItem)->GetValue());
if (nValue <= 0)
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index f773be6b8cb1..d97937f53542 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -109,28 +109,28 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
const SdrMetricItem* pItem = GetItem(*rAttrs, SDRATTR_TEXT_LEFTDIST);
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_LEFTDIST );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_LEFTDIST );
SetMetricValue(*m_xMtrFldLeft, pItem->GetValue(), eUnit);
m_xMtrFldLeft->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_RIGHTDIST );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_RIGHTDIST );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_RIGHTDIST );
SetMetricValue(*m_xMtrFldRight, pItem->GetValue(), eUnit);
m_xMtrFldRight->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_UPPERDIST );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_UPPERDIST );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_UPPERDIST );
SetMetricValue(*m_xMtrFldTop, pItem->GetValue(), eUnit);
m_xMtrFldTop->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_LOWERDIST );
if( !pItem )
- pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_LOWERDIST );
+ pItem = &pPool->GetUserOrPoolDefaultItem( SDRATTR_TEXT_LOWERDIST );
SetMetricValue(*m_xMtrFldBottom, pItem->GetValue(), eUnit);
m_xMtrFldBottom->save_value();
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 795a57f13dde..0f2df7b821ec 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -381,9 +381,9 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )
// determine default-distance
SfxItemPool* pPool = m_rOutAttrs.GetPool();
{
- sal_Int32 n = pPool->GetDefaultItem(SDRATTR_SHADOWXDIST).GetValue();
+ sal_Int32 n = pPool->GetUserOrPoolDefaultItem(SDRATTR_SHADOWXDIST).GetValue();
if (n == 0)
- n = pPool->GetDefaultItem(SDRATTR_SHADOWYDIST).GetValue();
+ n = pPool->GetUserOrPoolDefaultItem(SDRATTR_SHADOWYDIST).GetValue();
SetMetricValue(*m_xMtrDistance, std::abs(n), m_ePoolUnit);
}
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 5997e5b80e17..4d00c32293d2 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -96,21 +96,21 @@ void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool)
Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
vcl::Font aAppFont(sFontName, aFontSize);
- pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
+ pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO));
- pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
+ pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CJK));
- pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
+ pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CTL));
- pItemPool->SetPoolDefaultItem(
+ pItemPool->SetUserDefaultItem(
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT));
- pItemPool->SetPoolDefaultItem(
+ pItemPool->SetUserDefaultItem(
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT_CJK));
- pItemPool->SetPoolDefaultItem(
+ pItemPool->SetUserDefaultItem(
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT_CTL));
}
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index a2e6d009fc78..e50e6734ae6d 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -89,7 +89,7 @@ namespace
OSL_ENSURE( pPool, "implCheckItemType: invalid item pool!" );
if ( pPool )
{
- const SfxPoolItem& rDefItem = pPool->GetDefaultItem( _nId );
+ const SfxPoolItem& rDefItem = pPool->GetUserOrPoolDefaultItem( _nId );
bCorrectType = isItemType(&rDefItem);
}
return bCorrectType;
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 8fe5d8a5bd27..b1191b53f9a7 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -421,7 +421,7 @@ void ODbAdminDialog::destroyItemSet(std::unique_ptr<SfxItemSet>& _rpSet, rtl::Re
// delete the pool
if (_rpPool)
{
- _rpPool->ReleaseDefaults(true);
+ _rpPool->ReleasePoolDefaults(true);
// the "true" means delete the items, too
_rpPool = nullptr;
}
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 0e26a5802a00..5d68ac99e7a8 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1550,12 +1550,12 @@ EditEngineItemPool::EditEngineItemPool()
aItemInfos, nullptr )
{
m_xDefItems = EditDLL::Get().GetGlobalData()->GetDefItems();
- SetDefaults(&m_xDefItems->getDefaults());
+ SetPoolDefaults(&m_xDefItems->getDefaults());
}
EditEngineItemPool::~EditEngineItemPool()
{
- ClearDefaults();
+ ClearPoolDefaults();
SetSecondaryPool(nullptr);
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 6bab867f012e..ffde50bf78d3 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -295,9 +295,9 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
// Generate and write out Font table ...
std::vector<std::unique_ptr<SvxFontItem>> aFontTable;
// default font must be up front, so DEF font in RTF
- aFontTable.emplace_back( new SvxFontItem( maEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO ) ) );
- aFontTable.emplace_back( new SvxFontItem( maEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CJK ) ) );
- aFontTable.emplace_back( new SvxFontItem( maEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CTL ) ) );
+ aFontTable.emplace_back( new SvxFontItem( maEditDoc.GetItemPool().GetUserOrPoolDefaultItem( EE_CHAR_FONTINFO ) ) );
+ aFontTable.emplace_back( new SvxFontItem( maEditDoc.GetItemPool().GetUserOrPoolDefaultItem( EE_CHAR_FONTINFO_CJK ) ) );
+ aFontTable.emplace_back( new SvxFontItem( maEditDoc.GetItemPool().GetUserOrPoolDefaultItem( EE_CHAR_FONTINFO_CTL ) ) );
for ( sal_uInt16 nScriptType = 0; nScriptType < 3; nScriptType++ )
{
sal_uInt16 nWhich = EE_CHAR_FONTINFO;
@@ -387,7 +387,7 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
SvxColorList aColorList;
// COL_AUTO should be the default color, always put it first
aColorList.emplace_back(COL_AUTO);
- SvxColorItem const& rDefault(maEditDoc.GetItemPool().GetDefaultItem(EE_CHAR_COLOR));
+ SvxColorItem const& rDefault(maEditDoc.GetItemPool().GetUserOrPoolDefaultItem(EE_CHAR_COLOR));
if (rDefault.GetValue() != COL_AUTO) // is the default always AUTO?
{
aColorList.push_back(rDefault.GetValue());
@@ -501,7 +501,7 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
rOutput.WriteChar( '{' ).WriteOString( OOO_STRING_SVTOOLS_RTF_IGNORE ).WriteOString( "\\EditEnginePoolDefaults" );
for ( sal_uInt16 nPoolDefItem = EE_PARA_START; nPoolDefItem <= EE_CHAR_END; nPoolDefItem++)
{
- const SfxPoolItem& rItem = maEditDoc.GetItemPool().GetDefaultItem( nPoolDefItem );
+ const SfxPoolItem& rItem = maEditDoc.GetItemPool().GetUserOrPoolDefaultItem( nPoolDefItem );
WriteItemAsRTF( rItem, rOutput, 0, 0, aFontTable, aColorList );
}
rOutput.WriteChar( '}' ) << endl;
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 8a4b39b47e71..c746b5d6de75 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -386,7 +386,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl
{
if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT )
{
- aCurSet.Put( maEditDoc.GetItemPool().GetDefaultItem( nWhich ) );
+ aCurSet.Put( maEditDoc.GetItemPool().GetUserOrPoolDefaultItem( nWhich ) );
}
}
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 4fdf36470252..8daeee025c9b 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -857,7 +857,7 @@ void OutlinerView::ToggleBullets()
// determine default numbering rule for bullets
const ESelection aSelection(nPara, 0);
const SfxItemSet aTmpSet(pOwner->pEditEngine->GetAttribs(aSelection));
- const SfxPoolItem& rPoolItem = aTmpSet.GetPool()->GetDefaultItem( EE_PARA_NUMBULLET );
+ const SfxPoolItem& rPoolItem = aTmpSet.GetPool()->GetUserOrPoolDefaultItem( EE_PARA_NUMBULLET );
const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(&rPoolItem);
pDefaultBulletNumRule = pNumBulletItem ? &pNumBulletItem->GetNumRule() : nullptr;
}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index bf6b002f971e..63ae0c119974 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1842,7 +1842,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
while( nTabCount )
const_cast<SvxTabStop&>(aNewTab[ --nTabCount ]).GetAdjustment() = SvxTabAdjust::Default;
- pAttrPool->SetPoolDefaultItem( aNewTab );
+ pAttrPool->SetUserDefaultItem( aNewTab );
}
break;
}
@@ -1854,7 +1854,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
const SfxPoolItem* pItem = aIter.GetCurItem();
do
{
- pAttrPool->SetPoolDefaultItem( *pItem );
+ pAttrPool->SetUserDefaultItem( *pItem );
pItem = aIter.NextItem();
} while (pItem);
}
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index a8d4c976e212..24bbf69da88c 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -598,7 +598,7 @@ const vcl::Font& SvxRTFParser::GetFont( sal_uInt16 nId )
return it->second;
}
const SvxFontItem& rDfltFont =
- pAttrPool->GetDefaultItem(aPlainMap[SID_ATTR_CHAR_FONT]);
+ pAttrPool->GetUserOrPoolDefaultItem(aPlainMap[SID_ATTR_CHAR_FONT]);
pDfltFont->SetFamilyName( rDfltFont.GetStyleName() );
pDfltFont->SetFamily( rDfltFont.GetFamily() );
return *pDfltFont;
@@ -653,7 +653,7 @@ void SvxRTFParser::ClearStyleAttr_( SvxRTFItemStackType& rStkType )
{
if (SfxItemPool::IsWhich(nWhich) &&
SfxItemState::SET == aIter.GetItemState( false, &pItem ) &&
- rPool.GetDefaultItem( nWhich ) == *pItem )
+ rPool.GetUserOrPoolDefaultItem( nWhich ) == *pItem )
aIter.ClearItem(); // delete
}
}
@@ -674,7 +674,7 @@ void SvxRTFParser::ClearStyleAttr_( SvxRTFItemStackType& rStkType )
}
else if (SfxItemPool::IsWhich(nWhich) &&
SfxItemState::SET == aIter.GetItemState( false, &pItem ) &&
- rPool.GetDefaultItem( nWhich ) == *pItem )
+ rPool.GetUserOrPoolDefaultItem( nWhich ) == *pItem )
rSet.ClearItem( nWhich ); // delete
}
}
@@ -959,7 +959,7 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults()
{
SvxScriptSpaceItem aItem( false, nId );
if( bNewDoc )
- pAttrPool->SetPoolDefaultItem( aItem );
+ pAttrPool->SetUserDefaultItem( aItem );
else
pRTFDefaults->Put( aItem );
}
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index 722ae7d7f9db..0022e16597af 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -208,13 +208,13 @@ uno::Any SvxUnoFontDescriptor::getPropertyDefault( SfxItemPool* pPool )
!SfxItemPool::IsWhich(EE_CHAR_WLM))
return aAny;
- aSet.Put(pPool->GetDefaultItem(EE_CHAR_FONTINFO));
- aSet.Put(pPool->GetDefaultItem(EE_CHAR_FONTHEIGHT));
- aSet.Put(pPool->GetDefaultItem(EE_CHAR_ITALIC));
- aSet.Put(pPool->GetDefaultItem(EE_CHAR_UNDERLINE));
- aSet.Put(pPool->GetDefaultItem(EE_CHAR_WEIGHT));
- aSet.Put(pPool->GetDefaultItem(EE_CHAR_STRIKEOUT));
- aSet.Put(pPool->GetDefaultItem(EE_CHAR_WLM));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(EE_CHAR_FONTINFO));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(EE_CHAR_FONTHEIGHT));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(EE_CHAR_ITALIC));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(EE_CHAR_UNDERLINE));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(EE_CHAR_WEIGHT));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(EE_CHAR_STRIKEOUT));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(EE_CHAR_WLM));
awt::FontDescriptor aDesc;
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 4a4dd9f5e505..8782217fd394 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -63,7 +63,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMapEntry* pM
SfxItemPool* pPool = rSet.GetPool();
(void)rSet.GetItemState( pMap->nWID, bSearchInParent, &pItem );
if( nullptr == pItem && pPool )
- pItem = &(pPool->GetDefaultItem( pMap->nWID ));
+ pItem = &(pPool->GetUserOrPoolDefaultItem( pMap->nWID ));
const MapUnit eMapUnit = pPool ? pPool->GetMetric(pMap->nWID) : MapUnit::Map100thMM;
sal_uInt8 nMemberId = pMap->nMemberId;
@@ -118,7 +118,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMapEntry* pMap,
return;
}
- pItem = &pPool->GetDefaultItem( pMap->nWID );
+ pItem = &pPool->GetUserOrPoolDefaultItem( pMap->nWID );
}
uno::Any aValue(rVal);
@@ -166,7 +166,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMapEntry* pM
{
// Get Default from ItemPool
if(SfxItemPool::IsWhich(pMap->nWID))
- aSet.Put(mrItemPool.GetDefaultItem(pMap->nWID));
+ aSet.Put(mrItemPool.GetUserOrPoolDefaultItem(pMap->nWID));
}
if(aSet.Count())
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index a10fd66fdf9a..e8886bbe12b4 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1345,7 +1345,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
if(SfxItemPool::IsWhich(pMap->nWID))
{
SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID );
- aSet.Put(pPool->GetDefaultItem(pMap->nWID));
+ aSet.Put(pPool->GetUserOrPoolDefaultItem(pMap->nWID));
return SvxItemPropertySet::getPropertyValue(pMap, aSet, true, false );
}
}
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 5605560070e8..9a7078a869ab 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -566,14 +566,14 @@ namespace pcr
void ControlCharacterDialog::destroyItemSet(std::unique_ptr<SfxItemSet>& _rpSet, rtl::Reference<SfxItemPool>& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults)
{
// from the pool, get and remember the font list (needs to be deleted)
- const SvxFontListItem& rFontListItem = static_cast<const SvxFontListItem&>(_rpPool->GetDefaultItem(FontItemIds::CFID_FONTLIST));
+ const SvxFontListItem& rFontListItem = static_cast<const SvxFontListItem&>(_rpPool->GetUserOrPoolDefaultItem(FontItemIds::CFID_FONTLIST));
const FontList* pFontList = rFontListItem.GetFontList();
// _first_ delete the set (referring the pool)
_rpSet.reset();
// delete the pool
- _rpPool->ReleaseDefaults(true);
+ _rpPool->ReleasePoolDefaults(true);
// the "true" means delete the items, too
_rpPool = nullptr;
diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx
index 14f50a6fca4d..96be77103f90 100644
--- a/forms/source/richtext/richtextengine.cxx
+++ b/forms/source/richtext/richtextengine.cxx
@@ -58,18 +58,18 @@ namespace frm
// defaults
vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont();
aFont.SetFamilyName( "Times New Roman" );
- pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) );
+ pPool->SetUserDefaultItem( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) );
// 12 pt font size
MapMode aPointMapMode( MapUnit::MapPoint );
Size a12PointSize( OutputDevice::LogicToLogic( Size( 12, 0 ), aPointMapMode, aDeviceMapMode ) );
- pPool->SetPoolDefaultItem( SvxFontHeightItem( a12PointSize.Width(), 100, EE_CHAR_FONTHEIGHT ) );
+ pPool->SetUserDefaultItem( SvxFontHeightItem( a12PointSize.Width(), 100, EE_CHAR_FONTHEIGHT ) );
// font languages
SvtLinguOptions aLinguOpt;
- pPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOpt.nDefaultLanguage, EE_CHAR_LANGUAGE ) );
- pPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOpt.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK ) );
- pPool->SetPoolDefaultItem( SvxLanguageItem( aLinguOpt.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL ) );
+ pPool->SetUserDefaultItem( SvxLanguageItem( aLinguOpt.nDefaultLanguage, EE_CHAR_LANGUAGE ) );
+ pPool->SetUserDefaultItem( SvxLanguageItem( aLinguOpt.nDefaultLanguage_CJK, EE_CHAR_LANGUAGE_CJK ) );
+ pPool->SetUserDefaultItem( SvxLanguageItem( aLinguOpt.nDefaultLanguage_CTL, EE_CHAR_LANGUAGE_CTL ) );
return pReturn;
}
diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index 8e971bde5a50..8dca5e89f11b 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -76,14 +76,11 @@ class SVL_DLLPUBLIC SfxItemPool : public salhelper::SimpleReferenceObject
friend SfxPoolItem const* implCreateItemEntry(SfxItemPool&, SfxPoolItem const*, bool);
friend void implCleanupItemEntry(SfxPoolItem const*);
- // unit testing
- friend class PoolItemTest;
-
const SfxItemInfo* pItemInfos;
SfxBroadcaster aBC;
OUString aName;
- std::vector<SfxPoolItem*> maPoolDefaults;
- std::vector<SfxPoolItem*>* mpStaticDefaults;
+ std::vector<SfxPoolItem*> maUserDefaults;
+ std::vector<SfxPoolItem*>* mpPoolDefaults;
SfxItemPool* mpMaster;
rtl::Reference<SfxItemPool> mpSecondary;
WhichRangesContainer mpPoolRanges;
@@ -132,18 +129,35 @@ public:
SfxBroadcaster& BC();
- void SetPoolDefaultItem( const SfxPoolItem& );
-
- const SfxPoolItem* GetPoolDefaultItem( sal_uInt16 nWhich ) const;
+ // UserDefaults: Every PoolDefault can be 'overloaded' with a user-defined
+ // default. This is then owned by the pool. The read access is limited
+ // to check the UserDefaults, so it *will* return nullptr if none is set
+ void SetUserDefaultItem( const SfxPoolItem& );
+ const SfxPoolItem* GetUserDefaultItem( sal_uInt16 nWhich ) const;
+ template<class T> const T* GetUserDefaultItem( TypedWhichId<T> nWhich ) const
+ { return static_cast<const T*>(GetUserDefaultItem(sal_uInt16(nWhich))); }
+ void ResetUserDefaultItem( sal_uInt16 nWhich );
+
+ // PoolDefaults: Owned by the pool. The read access will only return
+ // nullptr if the WhichID aske for is not in the range of the pool,
+ // making the request invalid.
+ void SetPoolDefaults(std::vector<SfxPoolItem*>* pDefaults);
+ void ClearPoolDefaults();
+ void ReleasePoolDefaults( bool bDelete = false );
+ static void ReleasePoolDefaults( std::vector<SfxPoolItem*> *pDefaults, bool bDelete = false );
+ const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const;
template<class T> const T* GetPoolDefaultItem( TypedWhichId<T> nWhich ) const
{ return static_cast<const T*>(GetPoolDefaultItem(sal_uInt16(nWhich))); }
- void ResetPoolDefaultItem( sal_uInt16 nWhich );
-
- void SetDefaults(std::vector<SfxPoolItem*>* pDefaults);
- void ClearDefaults();
- void ReleaseDefaults( bool bDelete = false );
- static void ReleaseDefaults( std::vector<SfxPoolItem*> *pDefaults, bool bDelete = false );
+ // UserOrPoolDefaults: Combination of UserDefaults and PoolDefaults.
+ // UserDefaults will be preferred. If none is set for that WhichID,
+ // the PoolDefault will be returned.
+ // Note that read access will return a reference, but this will lead
+ // to an asserted error when the given WhichID is not in the range of
+ // the pool.
+ const SfxPoolItem& GetUserOrPoolDefaultItem( sal_uInt16 nWhich ) const;
+ template<class T> const T& GetUserOrPoolDefaultItem( TypedWhichId<T> nWhich ) const
+ { return static_cast<const T&>(GetUserOrPoolDefaultItem(sal_uInt16(nWhich))); }
virtual MapUnit GetMetric( sal_uInt16 nWhich ) const;
void SetDefaultMetric( MapUnit eNewMetric );
@@ -182,13 +196,6 @@ public:
virtual rtl::Reference<SfxItemPool> Clone() const;
const OUString& GetName() const;
- const SfxPoolItem& GetDefaultItem( sal_uInt16 nWhich ) const;
- template<class T> const T& GetDefaultItem( TypedWhichId<T> nWhich ) const
- { return static_cast<const T&>(GetDefaultItem(sal_uInt16(nWhich))); }
- const SfxPoolItem * GetItem2Default(sal_uInt16 nWhich) const;
- template<class T> const T* GetItem2Default( TypedWhichId<T> nWhich ) const
- { return static_cast<const T*>(GetItem2Default(sal_uInt16(nWhich))); }
-
public:
// SurrogateData callback helper for iterateItemSurrogates
class SurrogateData
@@ -227,7 +234,6 @@ public:
SfxItemPool* GetLastPoolInChain();
SfxItemPool* GetMasterPool() const;
void FreezeIdRanges();
-
void Delete();
// syntactical sugar: direct call to not have to use the flag define
@@ -240,14 +246,25 @@ public:
template<class T>
TypedWhichId<T> GetWhich( TypedWhichId<T> nSlot, bool bDeep = true ) const
{ return TypedWhichId<T>(GetWhich(sal_uInt16(nSlot), bDeep)); }
+
+ // get SlotID that may be registered in the SfxItemInfo for
+ // the given WhichID.
+ // If none is defined, return nWhich.
+ // If nWhich is not a WhichID, return nWhich.
sal_uInt16 GetSlotId( sal_uInt16 nWhich ) const;
+
+ // tries to translate back from SlotID to WhichID. That may be
+ // expensive, it needs to linerarly iterate over SfxItemInfo
+ // to evtl. find if a SlotID is defined for a WhichID
sal_uInt16 GetTrueWhich( sal_uInt16 nSlot, bool bDeep = true ) const;
+
+ // same as GetSlotId, but returns 0 in error cases, so:
+ // If none is defined, return 0.
+ // If nWhich is not a WhichID, return 0.
sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich ) const;
- static bool IsWhich(sal_uInt16 nId) {
- return nId && nId <= SFX_WHICH_MAX; }
- static bool IsSlot(sal_uInt16 nId) {
- return nId && nId > SFX_WHICH_MAX; }
+ static bool IsWhich(sal_uInt16 nId) { return nId && nId <= SFX_WHICH_MAX; }
+ static bool IsSlot(sal_uInt16 nId) { return nId && nId > SFX_WHICH_MAX; }
private:
const SfxItemPool& operator=(const SfxItemPool &) = delete;
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 10f0d024c75d..5cbbf4268cc6 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -116,7 +116,6 @@ class ItemInstanceManager;
class SVL_DLLPUBLIC SfxPoolItem
{
friend class SfxItemPool;
- friend class SfxItemDisruptor_Impl;
friend class SfxItemSet;
friend class InstanceManagerHelper;
@@ -141,37 +140,40 @@ class SVL_DLLPUBLIC SfxPoolItem
// Item is registered at some Pool as default.
// m_bStaticDefault: direct Pool Item (CAUTION:
// these are not really 'static', but should be)
- // -> needs cleanup
- // m_bPoolDefault: set by user using SetPoolDefaultItem
- // those should be better called 'UserDefault'
+ // m_bDynamicDefault: dynamic pool item, e.g.
+ // SfxSetItems which are Pool dependent
+ // m_bUserDefault: set by user using
+ // SetUserDefaultItem
bool m_bStaticDefault : 1; // bit 0
- bool m_bPoolDefault : 1; // bit 1
+ bool m_bDynamicDefault : 1; // bit 1
+ bool m_bUserDefault : 1; // bit 2
// Item is derived from SfxSetItem -> is Pool-dependent
- bool m_bIsSetItem : 1; // bit 2
+ bool m_bIsSetItem : 1; // bit 3
// Defines if the Item can be shared/RefCounted else it will be cloned.
// Default is true - as it should be for all Items. It is needed by some
// SW items, so protected to let them set it in constructor. If this could
// be fixed at that Items we may remove this again.
- bool m_bShareable : 1; // bit 3
+ bool m_bShareable : 1; // bit 4
protected:
#ifdef DBG_UTIL
// this flag will make debugging item stuff much simpler
- bool m_bDeleted : 1; // bit 4
+ bool m_bDeleted : 1; // bit 5
#endif
private:
inline void SetRefCount(sal_uInt32 n)
{
m_nRefCount = n;
- m_bStaticDefault = m_bPoolDefault = false;
+ m_bStaticDefault = m_bDynamicDefault = m_bUserDefault = false;
}
protected:
void setStaticDefault() { m_bStaticDefault = true; }
- void setPoolDefault() { m_bPoolDefault = true; }
+ void setDynamicDefault() { m_bDynamicDefault = true; }
+ void setUserDefault() { m_bUserDefault = true; }
void setIsSetItem() { m_bIsSetItem = true; }
void setNonShareable() { m_bShareable = false; }
@@ -196,7 +198,8 @@ public:
#endif
bool isStaticDefault() const { return m_bStaticDefault; }
- bool isPoolDefault() const { return m_bPoolDefault; }
+ bool isDynamicDefault() const { return m_bDynamicDefault; }
+ bool isUserDefault() const { return m_bUserDefault; }
bool isSetItem() const { return m_bIsSetItem; }
bool isShareable() const { return m_bShareable; }
@@ -346,9 +349,9 @@ private:
virtual void remove(const SfxPoolItem&) override;
};
-inline bool IsPoolDefaultItem(const SfxPoolItem *pItem )
+inline bool IsUserDefaultItem(const SfxPoolItem *pItem )
{
- return pItem && pItem->isPoolDefault();
+ return pItem && pItem->isUserDefault();
}
inline bool IsStaticDefaultItem(const SfxPoolItem *pItem )
@@ -356,9 +359,14 @@ inline bool IsStaticDefaultItem(const SfxPoolItem *pItem )
return pItem && pItem->isStaticDefault();
}
+inline bool IsDynamicDefaultItem(const SfxPoolItem *pItem )
+{
+ return pItem && pItem->isDynamicDefault();
+}
+
inline bool IsDefaultItem( const SfxPoolItem *pItem )
{
- return pItem && (pItem->isPoolDefault() || pItem->isStaticDefault());
+ return pItem && (pItem->isUserDefault() || pItem->isStaticDefault() || pItem->isDynamicDefault());
}
inline bool IsPooledItem( const SfxPoolItem *pItem )
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index b0a92b2a07e9..a87a867c1db0 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2408,7 +2408,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric))
};
- pPool->SetDefaults(&pDefaults);
+ pPool->SetPoolDefaults(&pDefaults);
pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
diff --git a/sc/qa/unit/subsequent_export_test.cxx b/sc/qa/unit/subsequent_export_test.cxx
index 4fc83ab7df9f..bf64e19821ca 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -76,19 +76,19 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testDefaultFontHeight)
ScDocument* pDoc = getScDoc();
ScDocumentPool* pPool = pDoc->GetPool();
- pPool->SetPoolDefaultItem(SvxFontHeightItem(400, 100, ATTR_FONT_HEIGHT));
- pPool->SetPoolDefaultItem(SvxFontHeightItem(400, 100, ATTR_CJK_FONT_HEIGHT));
- pPool->SetPoolDefaultItem(SvxFontHeightItem(400, 100, ATTR_CTL_FONT_HEIGHT));
+ pPool->SetUserDefaultItem(SvxFontHeightItem(400, 100, ATTR_FONT_HEIGHT));
+ pPool->SetUserDefaultItem(SvxFontHeightItem(400, 100, ATTR_CJK_FONT_HEIGHT));
+ pPool->SetUserDefaultItem(SvxFontHeightItem(400, 100, ATTR_CTL_FONT_HEIGHT));
saveAndReload("calc8");
pDoc = getScDoc();
pPool = pDoc->GetPool();
- const SvxFontHeightItem& rItem = pPool->GetDefaultItem(ATTR_FONT_HEIGHT);
+ const SvxFontHeightItem& rItem = pPool->GetUserOrPoolDefaultItem(ATTR_FONT_HEIGHT);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(400), rItem.GetHeight());
- const SvxFontHeightItem& rCJKItem = pPool->GetDefaultItem(ATTR_CJK_FONT_HEIGHT);
+ const SvxFontHeightItem& rCJKItem = pPool->GetUserOrPoolDefaultItem(ATTR_CJK_FONT_HEIGHT);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(400), rCJKItem.GetHeight());
- const SvxFontHeightItem& rCTLItem = pPool->GetDefaultItem(ATTR_CTL_FONT_HEIGHT);
+ const SvxFontHeightItem& rCTLItem = pPool->GetUserOrPoolDefaultItem(ATTR_CTL_FONT_HEIGHT);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(400), rCTLItem.GetHeight());
}
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index fcdb0be9da5e..e61d6cbfdea5 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -937,7 +937,7 @@ static void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
SfxItemState eNewState = rSource.GetItemState( nId, true, &pNewItem );
if ( eNewState == SfxItemState::SET )
{
- if ( *pNewItem != rMergeSet.GetPool()->GetDefaultItem(nId) )
+ if ( *pNewItem != rMergeSet.GetPool()->GetUserOrPoolDefaultItem(nId) )
rMergeSet.InvalidateItem( nId );
}
}
@@ -951,7 +951,7 @@ static void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
}
else // Default
{
- if ( *pOldItem != rSource.GetPool()->GetDefaultItem(nId) )
+ if ( *pOldItem != rSource.GetPool()->GetUserOrPoolDefaultItem(nId) )
rMergeSet.InvalidateItem( nId );
}
}
@@ -1523,8 +1523,8 @@ void ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
SCROW nCountY = pItem->GetRowMerge();
if (nCountX>1 || nCountY>1)
{
- const ScMergeAttr* pAttr = &rDocument.GetPool()->GetDefaultItem( ATTR_MERGE );
- const ScMergeFlagAttr* pFlagAttr = &rDocument.GetPool()->GetDefaultItem( ATTR_MERGE_FLAG );
+ const ScMergeAttr* pAttr = &rDocument.GetPool()->GetUserOrPoolDefaultItem( ATTR_MERGE );
+ const ScMergeFlagAttr* pFlagAttr = &rDocument.GetPool()->GetUserOrPoolDefaultItem( ATTR_MERGE_FLAG );
OSL_ENSURE( nCountY==1 || nThisStart==nThisEnd, "What's up?" );
@@ -2243,7 +2243,7 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
{
// ApplyAttr for areas
- const SfxPoolItem& rDef = rDocument.GetPool()->GetDefaultItem( ATTR_MERGE );
+ const SfxPoolItem& rDef = rDocument.GetPool()->GetUserOrPoolDefaultItem( ATTR_MERGE );
for (SCSIZE nAdd=0; nAdd<nSize; nAdd++)
rDocument.ApplyAttr( nCol, nStartRow+nAdd, nTab, rDef );
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index fcad72a6dbea..d27b0e82a498 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -304,7 +304,7 @@ ScDocumentPool::ScDocumentPool()
mvPoolDefaults[ ATTR_PAGE_SCALETO - ATTR_STARTINDEX ] = new ScPageScaleToItem( 1, 1 );
mvPoolDefaults[ ATTR_HIDDEN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_HIDDEN, false );
- SetDefaults( &mvPoolDefaults );
+ SetPoolDefaults( &mvPoolDefaults );
}
ScDocumentPool::~ScDocumentPool()
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index b42a8d36b582..dd1f0a1c7f1d 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1976,9 +1976,9 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy
if ( mxPoolHelper.is() )
{
ScDocumentPool* pPool = mxPoolHelper->GetDocPool();
- pPool->SetPoolDefaultItem( SvxLanguageItem( eLanguage, ATTR_FONT_LANGUAGE ) );
- pPool->SetPoolDefaultItem( SvxLanguageItem( eCjkLanguage, ATTR_CJK_FONT_LANGUAGE ) );
- pPool->SetPoolDefaultItem( SvxLanguageItem( eCtlLanguage, ATTR_CTL_FONT_LANGUAGE ) );
+ pPool->SetUserDefaultItem( SvxLanguageItem( eLanguage, ATTR_FONT_LANGUAGE ) );
+ pPool->SetUserDefaultItem( SvxLanguageItem( eCjkLanguage, ATTR_CJK_FONT_LANGUAGE ) );
+ pPool->SetUserDefaultItem( SvxLanguageItem( eCtlLanguage, ATTR_CTL_FONT_LANGUAGE ) );
}
UpdateDrawLanguages(); // Set edit engine defaults in drawing layer pool
@@ -2097,7 +2097,7 @@ void ScDocument::RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab )
RemoveFlagsTab( nCol, nRow, nEndCol, nEndRow, nTab, ScMF::Hor | ScMF::Ver );
- const ScMergeAttr* pDefAttr = &mxPoolHelper->GetDocPool()->GetDefaultItem( ATTR_MERGE );
+ const ScMergeAttr* pDefAttr = &mxPoolHelper->GetDocPool()->GetUserOrPoolDefaultItem( ATTR_MERGE );
ApplyAttr( nCol, nRow, nTab, *pDefAttr );
}
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index b48e01234f3a..2b6685bd0ee6 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -169,7 +169,7 @@ void ScDocument::InitDrawLayer( ScDocShell* pDocShell )
// set draw defaults directly
SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool();
- rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
+ rDrawPool.SetUserDefaultItem( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
UpdateDrawLanguages();
if (bImportingXML)
@@ -185,9 +185,9 @@ void ScDocument::UpdateDrawLanguages()
if (mpDrawLayer)
{
SfxItemPool& rDrawPool = mpDrawLayer->GetItemPool();
- rDrawPool.SetPoolDefaultItem( SvxLanguageItem( eLanguage, EE_CHAR_LANGUAGE ) );
- rDrawPool.SetPoolDefaultItem( SvxLanguageItem( eCjkLanguage, EE_CHAR_LANGUAGE_CJK ) );
- rDrawPool.SetPoolDefaultItem( SvxLanguageItem( eCtlLanguage, EE_CHAR_LANGUAGE_CTL ) );
+ rDrawPool.SetUserDefaultItem( SvxLanguageItem( eLanguage, EE_CHAR_LANGUAGE ) );
+ rDrawPool.SetUserDefaultItem( SvxLanguageItem( eCjkLanguage, EE_CHAR_LANGUAGE_CJK ) );
+ rDrawPool.SetUserDefaultItem( SvxLanguageItem( eCtlLanguage, EE_CHAR_LANGUAGE_CTL ) );
}
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 98aac2f7ca3d..0fcba88870a1 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4732,7 +4732,7 @@ const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_
OSL_FAIL( "Attribute Null" );
}
}
- return &mxPoolHelper->GetDocPool()->GetDefaultItem( nWhich );
+ return &mxPoolHelper->GetDocPool()->GetUserOrPoolDefaultItem( nWhich );
}
const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich, SCROW& nStartRow, SCROW& nEndRow ) const
@@ -4747,7 +4747,7 @@ const SfxPoolItem* ScDocument::GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_
OSL_FAIL( "Attribute Null" );
}
}
- return &mxPoolHelper->GetDocPool()->GetDefaultItem( nWhich );
+ return &mxPoolHelper->GetDocPool()->GetUserOrPoolDefaultItem( nWhich );
}
const SfxPoolItem* ScDocument::GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 2570bcd214d8..80bebd1be8a2 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -279,19 +279,19 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, OUString _aName ) :
SfxItemPool& rPool = GetItemPool();
rPool.SetDefaultMetric(MapUnit::Map100thMM);
SvxFrameDirectionItem aModeItem( SvxFrameDirection::Environment, EE_PARA_WRITINGDIR );
- rPool.SetPoolDefaultItem( aModeItem );
+ rPool.SetUserDefaultItem( aModeItem );
// #i33700#
// Set shadow distance defaults as PoolDefaultItems. Details see bug.
- rPool.SetPoolDefaultItem(makeSdrShadowXDistItem(300));
- rPool.SetPoolDefaultItem(makeSdrShadowYDistItem(300));
+ rPool.SetUserDefaultItem(makeSdrShadowXDistItem(300));
+ rPool.SetUserDefaultItem(makeSdrShadowYDistItem(300));
// default for script spacing depends on locale, see SdDrawDocument ctor in sd
LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
if (MsLangId::isKorean(eOfficeLanguage) || eOfficeLanguage == LANGUAGE_JAPANESE)
{
// secondary is edit engine pool
- rPool.GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
+ rPool.GetSecondaryPool()->SetUserDefaultItem( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
}
rPool.FreezeIdRanges(); // the pool is also used directly
@@ -320,16 +320,16 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, OUString _aName ) :
SfxItemPool* pOutlinerPool = rOutliner.GetEditTextObjectPool();
if ( pOutlinerPool )
{
- m_pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt
- m_pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt
- m_pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt
+ m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt
+ m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt
+ m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt
}
SfxItemPool* pHitOutlinerPool = rHitOutliner.GetEditTextObjectPool();
if ( pHitOutlinerPool )
{
- pHitOutlinerPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt
- pHitOutlinerPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt
- pHitOutlinerPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt
+ pHitOutlinerPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt
+ pHitOutlinerPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt
+ pHitOutlinerPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt
}
// initial undo mode as in Calc document
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 1f97801b1737..b33a30f5fea2 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -363,11 +363,11 @@ void ScDocument::FillInfo(
RowInfo* pRowInfo = rTabInfo.mpRowInfo.get();
const SvxBrushItem* pDefBackground =
- &pPool->GetDefaultItem( ATTR_BACKGROUND );
+ &pPool->GetUserOrPoolDefaultItem( ATTR_BACKGROUND );
const ScMergeAttr* pDefMerge =
- &pPool->GetDefaultItem( ATTR_MERGE );
+ &pPool->GetUserOrPoolDefaultItem( ATTR_MERGE );
const SvxShadowItem* pDefShadow =
- &pPool->GetDefaultItem( ATTR_SHADOW );
+ &pPool->GetUserOrPoolDefaultItem( ATTR_SHADOW );
SCSIZE nArrRow;
SCSIZE nArrCount;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 18094086c50f..8fcdaf5782c2 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -146,10 +146,10 @@ bool ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
// Contains a Default Item
// PoolItems, meaning Item comparison necessary
if (!pOldItem)
- pOldItem = &rOldAttrs.GetPool()->GetDefaultItem( nWhich );
+ pOldItem = &rOldAttrs.GetPool()->GetUserOrPoolDefaultItem( nWhich );
if (!pNewItem)
- pNewItem = &rNewAttrs.GetPool()->GetDefaultItem( nWhich );
+ pNewItem = &rNewAttrs.GetPool()->GetUserOrPoolDefaultItem( nWhich );
bInvalidate = (*pNewItem != *pOldItem);
}
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index bdfd5ad15801..59f9fa1866b4 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -1291,7 +1291,7 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
else if ( eOldState != SfxItemState::DONTCARE )
{
// not set in OldAttrs -> compare item value to default item
- if ( *pThisItem == rThisSet.GetPool()->GetDefaultItem( nSubWhich ) )
+ if ( *pThisItem == rThisSet.GetPool()->GetUserOrPoolDefaultItem( nSubWhich ) )
{
rThisSet.ClearItem( nSubWhich );
mxVisible.reset();
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 7679f1936a6b..dc9e7715f6e2 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -163,7 +163,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
SvxSizeItem aPaperSizeItem( ATTR_PAGE_SIZE, SvxPaperInfo::GetDefaultPaperSize() );
SvxSetItem aHFSetItem(
- rItemPool.GetDefaultItem(ATTR_PAGE_HEADERSET) );
+ rItemPool.GetUserOrPoolDefaultItem(ATTR_PAGE_HEADERSET) );
SfxItemSet& rHFSet = aHFSetItem.GetItemSet();
SvxSizeItem aHFSizeItem( // 0,5 cm + distance
@@ -210,14 +210,14 @@ SfxItemSet& ScStyleSheet::GetItemSet()
SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
pSet->Put( SvxFrameDirectionItem( eDirection, ATTR_WRITINGDIR ) );
- rItemPool.SetPoolDefaultItem( aPageItem );
- rItemPool.SetPoolDefaultItem( aPaperSizeItem );
- rItemPool.SetPoolDefaultItem( aLRSpaceItem );
- rItemPool.SetPoolDefaultItem( aULSpaceItem );
- rItemPool.SetPoolDefaultItem( SfxUInt16Item( ATTR_PAGE_SCALE, 100 ) );
+ rItemPool.SetUserDefaultItem( aPageItem );
+ rItemPool.SetUserDefaultItem( aPaperSizeItem );
+ rItemPool.SetUserDefaultItem( aLRSpaceItem );
+ rItemPool.SetUserDefaultItem( aULSpaceItem );
+ rItemPool.SetUserDefaultItem( SfxUInt16Item( ATTR_PAGE_SCALE, 100 ) );
ScPageScaleToItem aScaleToItem;
- rItemPool.SetPoolDefaultItem( aScaleToItem );
- rItemPool.SetPoolDefaultItem( SfxUInt16Item( ATTR_PAGE_SCALETOPAGES, 0 ) );
+ rItemPool.SetUserDefaultItem( aScaleToItem );
+ rItemPool.SetUserDefaultItem( SfxUInt16Item( ATTR_PAGE_SCALETOPAGES, 0 ) );
}
}
break;
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index e7cc13734511..5bd4a6ea3ea7 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -1298,7 +1298,7 @@ void ScTable::GetBackColorArea(SCCOL& rStartCol, SCROW& /*rStartRow*/,
SCCOL& rEndCol, SCROW& rEndRow ) const
{
bool bExtend;
- const SvxBrushItem* pDefBackground = &rDocument.GetPool()->GetDefaultItem(ATTR_BACKGROUND);
+ const SvxBrushItem* pDefBackground = &rDocument.GetPool()->GetUserOrPoolDefaultItem(ATTR_BACKGROUND);
rStartCol = std::min<SCCOL>(rStartCol, aCol.size() - 1);
rEndCol = std::min<SCCOL>(rEndCol, aCol.size() - 1);
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 94ac690c131a..860ecf71c454 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -213,7 +213,7 @@ bool ScfTools::CheckItems( const SfxItemSet& rItemSet, const sal_uInt16* pnWhich
void ScfTools::PutItem( SfxItemSet& rItemSet, const SfxPoolItem& rItem, sal_uInt16 nWhichId, bool bSkipPoolDef )
{
- if( !bSkipPoolDef || (rItem != rItemSet.GetPool()->GetDefaultItem( nWhichId )) )
+ if( !bSkipPoolDef || (rItem != rItemSet.GetPool()->GetUserOrPoolDefaultItem( nWhichId )) )
{
rItemSet.Put( rItem.CloneSetWhich(nWhichId) );
}
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index b2d2b8c2521f..9302affd7dc2 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -44,7 +44,7 @@ ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
// RTF default FontSize 12Pt
tools::Long nMM = o3tl::convert(12, o3tl::Length::pt, o3tl::Length::mm100);
- pPool->SetPoolDefaultItem( SvxFontHeightItem( nMM, 100, EE_CHAR_FONTHEIGHT ) );
+ pPool->SetUserDefaultItem( SvxFontHeightItem( nMM, 100, EE_CHAR_FONTHEIGHT ) );
// Free-flying pInsDefault
pInsDefault.reset( new ScRTFCellDefault( pPool.get() ) );
}
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index f6951eddb0b8..6024a6e3b092 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -53,7 +53,7 @@ void ScXMLFontAutoStylePool_Impl::AddFontItems(const sal_uInt16* pWhichIds, sal_
sal_uInt16 nWhichId(pWhichIds[i]);
if (bExportDefaults)
{
- const SfxPoolItem* pItem = &pItemPool->GetDefaultItem(nWhichId);
+ const SfxPoolItem* pItem = &pItemPool->GetUserOrPoolDefaultItem(nWhichId);
const SvxFontItem *pFont(static_cast<const SvxFontItem *>(pItem));
Add( pFont->GetFamilyName(), pFont->GetStyleName(),
pFont->GetFamily(), pFont->GetPitch(),
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 8dae3e5f3374..3257a6cae4d3 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -442,7 +442,7 @@ bool ScDrawTransferObj::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void*
// for the changed pool defaults from drawing layer pool set those
// attributes as hard attributes to preserve them for saving
const SfxItemPool& rItemPool = pDrawModel->GetItemPool();
- const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT);
+ const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetUserOrPoolDefaultItem(EE_CHAR_FONTHEIGHT);
// SW should have no MasterPages
OSL_ENSURE(0 == pDrawModel->GetMasterPageCount(), "SW with MasterPages (!)");
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index 859a8a3537c6..68d03ecd663c 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -65,7 +65,7 @@ ScMessagePool::ScMessagePool()
mvPoolDefaults[SCITEM_SOLVEDATA - MSGPOOL_START] = &aGlobalSolveItem;
mvPoolDefaults[SCITEM_USERLIST - MSGPOOL_START] = &aGlobalUserListItem;
- SetDefaults( &mvPoolDefaults );
+ SetPoolDefaults( &mvPoolDefaults );
SetSecondaryPool( pDocPool.get() );
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index b7f181674cb7..2867b8b6df36 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5118,7 +5118,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord, Sc
rDoc.CopyToDocument(aExtended, InsertDeleteFlags::ATTRIB, false, *pUndoDoc);
}
- const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetDefaultItem( ATTR_MERGE );
+ const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetUserOrPoolDefaultItem( ATTR_MERGE );
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
aPattern.GetItemSet().Put( rDefAttr );
rDoc.ApplyPatternAreaTab( aRange.aStart.Col(), aRange.aStart.Row(),
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index ef46e1b7e7c2..08f9958ebb59 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -2307,7 +2307,7 @@ void ScUndoRemoveMerge::Redo()
// There is no need to extend merge area because it's already been extended.
ScRange aRange = rOption.getSingleRange(nTab);
- const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetDefaultItem( ATTR_MERGE );
+ const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetUserOrPoolDefaultItem( ATTR_MERGE );
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
aPattern.GetItemSet().Put( rDefAttr );
rDoc.ApplyPatternAreaTab( rOption.mnStartCol, rOption.mnStartRow,
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 516fc8c6c768..508ec91dc48d 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -183,12 +183,12 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
else
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- std::unique_ptr<SfxPoolItem> pNewItem(pPool->GetDefaultItem(pEntry->nWID).Clone());
+ std::unique_ptr<SfxPoolItem> pNewItem(pPool->GetUserOrPoolDefaultItem(pEntry->nWID).Clone());
if( !pNewItem->PutValue( aValue, pEntry->nMemberId ) )
throw lang::IllegalArgumentException();
- pPool->SetPoolDefaultItem( *pNewItem );
+ pPool->SetUserDefaultItem( *pNewItem );
ItemsChanged();
}
@@ -232,7 +232,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const OUString& aPropertyN
else
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- const SfxPoolItem& rItem = pPool->GetDefaultItem( pEntry->nWID );
+ const SfxPoolItem& rItem = pPool->GetUserOrPoolDefaultItem( pEntry->nWID );
rItem.QueryValue( aRet, pEntry->nMemberId );
}
return aRet;
@@ -268,7 +268,7 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const OUString
// check if pool default is set
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- if ( pPool->GetPoolDefaultItem( nWID ) != nullptr )
+ if ( pPool->GetUserDefaultItem( nWID ) != nullptr )
eRet = beans::PropertyState_DIRECT_VALUE;
}
@@ -301,7 +301,7 @@ void SAL_CALL ScDocDefaultsObj::setPropertyToDefault( const OUString& aPropertyN
if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- pPool->ResetPoolDefaultItem( pEntry->nWID );
+ pPool->ResetUserDefaultItem( pEntry->nWID );
ItemsChanged();
}
@@ -324,7 +324,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const OUString& aPropert
if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- const SfxPoolItem* pItem = pPool->GetItem2Default( pEntry->nWID );
+ const SfxPoolItem* pItem = pPool->GetPoolDefaultItem( pEntry->nWID );
if (pItem)
pItem->QueryValue( aRet, pEntry->nMemberId );
}
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 9ab9c902b3f5..86a8fff947f3 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -955,17 +955,17 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, false,
reinterpret_cast<const SfxPoolItem**>(&pScaleItem) );
if ( SfxItemState::DEFAULT == eState )
- pScaleItem = &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALE );
+ pScaleItem = &pParamSet->GetPool()->GetUserOrPoolDefaultItem( ATTR_PAGE_SCALE );
eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, false,
reinterpret_cast<const SfxPoolItem**>(&pScaleToItem) );
if ( SfxItemState::DEFAULT == eState )
- pScaleToItem = &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETO );
+ pScaleToItem = &pParamSet->GetPool()->GetUserOrPoolDefaultItem( ATTR_PAGE_SCALETO );
eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false,
reinterpret_cast<const SfxPoolItem**>(&pScaleToPagesItem) );
if ( SfxItemState::DEFAULT == eState )
- pScaleToPagesItem = &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETOPAGES );
+ pScaleToPagesItem = &pParamSet->GetPool()->GetUserOrPoolDefaultItem( ATTR_PAGE_SCALETOPAGES );
OSL_ENSURE( pScaleItem && pScaleToItem && pScaleToPagesItem, "Missing ScaleItem! :-/" );
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 57dc8518a571..8df4f49c1d9a 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -206,7 +206,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
// for korean and japanese languages we have a different default for apply spacing between asian, latin and ctl text
if (MsLangId::isKorean(eRealCTLLanguage) || (LANGUAGE_JAPANESE == eRealCTLLanguage))
{
- GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
+ GetPool().GetSecondaryPool()->SetUserDefaultItem( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) );
}
// Set DefTab and SpellOptions for the SD module
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 7804c98cb7b5..4feb8f10c6fd 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -881,7 +881,7 @@ void SdDrawDocument::SetLanguage( const LanguageType eLang, const sal_uInt16 nId
{
GetDrawOutliner().SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
m_pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
- m_pItemPool->SetPoolDefaultItem( SvxLanguageItem( eLang, nId ) );
+ m_pItemPool->SetUserDefaultItem( SvxLanguageItem( eLang, nId ) );
SetChanged( bChanged );
}
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index f8c8d7d7f600..ed87499a7554 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1147,7 +1147,7 @@ void SdDrawDocument::SetTextDefaults() const
aBulletItem.SetStart(1);
aBulletItem.SetScale(45); // In percent
aBulletItem.SetSymbol( 0x25CF ); // In points
- m_pItemPool->SetPoolDefaultItem( aBulletItem );
+ m_pItemPool->SetUserDefaultItem( aBulletItem );
// New BulletItem
SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
@@ -1173,12 +1173,12 @@ void SdDrawDocument::SetTextDefaults() const
}
SvxNumBulletItem aNumBulletItem( std::move(aNumRule), EE_PARA_NUMBULLET );
- m_pItemPool->SetPoolDefaultItem( aNumBulletItem );
+ m_pItemPool->SetUserDefaultItem( aNumBulletItem );
}
css::text::WritingMode SdDrawDocument::GetDefaultWritingMode() const
{
- const SfxPoolItem* pItem = ( m_pItemPool ? m_pItemPool->GetPoolDefaultItem( EE_PARA_WRITINGDIR ) : nullptr );
+ const SfxPoolItem* pItem = ( m_pItemPool ? m_pItemPool->GetUserDefaultItem( EE_PARA_WRITINGDIR ) : nullptr );
css::text::WritingMode eRet = css::text::WritingMode_LR_TB;
if( pItem )
@@ -1215,14 +1215,14 @@ void SdDrawDocument::SetDefaultWritingMode(css::text::WritingMode eMode )
}
SvxFrameDirectionItem aModeItem( nVal, EE_PARA_WRITINGDIR );
- m_pItemPool->SetPoolDefaultItem( aModeItem );
+ m_pItemPool->SetUserDefaultItem( aModeItem );
SvxAdjustItem aAdjust( SvxAdjust::Left, EE_PARA_JUST );
if( eMode == css::text::WritingMode_RL_TB )
aAdjust.SetAdjust( SvxAdjust::Right );
- m_pItemPool->SetPoolDefaultItem( aAdjust );
+ m_pItemPool->SetUserDefaultItem( aAdjust );
}
void SdDrawDocument::getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont )
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 1d90ed00bca4..77a386bc30fc 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1097,7 +1097,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
{
// Subtitle template
SvxNumBulletItem const*const pItem(
- rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET));
+ rSet.GetPool()->GetSecondaryPool()->GetUserDefaultItem(EE_PARA_NUMBULLET));
const SvxNumRule *const pDefaultRule = pItem ? &pItem->GetNumRule() : nullptr;
DBG_ASSERT( pDefaultRule, "Where is my default template? [CL]" );
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index ba058df3f689..6f1f91eca555 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1062,7 +1062,7 @@ void SdStyleSheet::setPropertyValue_Impl(const OUString& aPropertyName, const cs
}
else
{
- aSet.Put( GetPool()->GetPool().GetDefaultItem( pEntry->nWID ) );
+ aSet.Put( GetPool()->GetPool().GetUserOrPoolDefaultItem( pEntry->nWID ) );
}
}
@@ -1172,7 +1172,7 @@ css::uno::Any SdStyleSheet::getPropertyValue_Impl(const OUString& PropertyName)
aSet.Put( *pItem );
if( !aSet.Count() )
- aSet.Put( GetPool()->GetPool().GetDefaultItem( pEntry->nWID ) );
+ aSet.Put( GetPool()->GetPool().GetUserOrPoolDefaultItem( pEntry->nWID ) );
if(SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pEntry, aAny ))
return aAny;
@@ -1495,7 +1495,7 @@ Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName )
{
SfxItemPool& rMyPool = GetPool()->GetPool();
SfxItemSet aSet( rMyPool, pEntry->nWID, pEntry->nWID);
- aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
+ aSet.Put( rMyPool.GetUserOrPoolDefaultItem( pEntry->nWID ) );
aRet = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
}
return aRet;
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index dbd9768b554c..2caf48df3f5e 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -99,10 +99,10 @@ SfxItemPool* GetAnnotationPool()
if( !s_pAnnotationPool )
{
s_pAnnotationPool = EditEngine::CreatePool();
- s_pAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
+ s_pAnnotationPool->SetUserDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
vcl::Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() );
- s_pAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(),aAppFont.GetFamilyName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
+ s_pAnnotationPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(),aAppFont.GetFamilyName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
}
return s_pAnnotationPool.get();
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index edc867785b63..87b4df84945f 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -94,7 +94,7 @@ OutlineBulletDlg::OutlineBulletDlg(weld::Window* pParent, const SfxItemSet* pAtt
}
if( pItem == nullptr )
- pItem = m_aInputSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
+ pItem = m_aInputSet.GetPool()->GetSecondaryPool()->GetUserDefaultItem(EE_PARA_NUMBULLET);
DBG_ASSERT( pItem, "No EE_PARA_NUMBULLET in Pool! [CL]" );
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 1f5a056b7ef7..34eb212dc920 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -313,7 +313,7 @@ const SvxNumBulletItem* FuBulletAndPosition::GetNumBulletItem(SfxItemSet& aNewAt
}
if( pItem == nullptr )
- pItem = aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
+ pItem = aNewAttr.GetPool()->GetSecondaryPool()->GetUserDefaultItem(EE_PARA_NUMBULLET);
//DBG_ASSERT( pItem, "No EE_PARA_NUMBULLET in the Pool!" );
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index c97cd9ff0ab8..6e86e2a958f9 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1410,7 +1410,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
pSeq[nSeqIndex++] <<= sal_Int16(pFont->GetCharSet());
}
- const SvxFontItem& rFont = static_cast<const SvxFontItem&>(rPool.GetDefaultItem( nWhichId ));
+ const SvxFontItem& rFont = static_cast<const SvxFontItem&>(rPool.GetUserOrPoolDefaultItem( nWhichId ));
pSeq[nSeqIndex++] <<= rFont.GetFamilyName();
pSeq[nSeqIndex++] <<= rFont.GetStyleName();
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 5b500371f54c..1dc535b6e1f8 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -212,7 +212,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa
aSet.Put( *mpSet );
if( !aSet.Count() )
- aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) );
+ aSet.Put( rPool.GetUserOrPoolDefaultItem( pEntry->nWID ) );
if( pEntry->nMemberId == MID_NAME && ( pEntry->nWID == XATTR_FILLBITMAP || pEntry->nWID == XATTR_FILLGRADIENT || pEntry->nWID == XATTR_FILLHATCH || pEntry->nWID == XATTR_FILLFLOATTRANSPARENCE ) )
{
@@ -272,7 +272,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert
aSet.Put( *mpSet );
if( !aSet.Count() )
- aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) );
+ aSet.Put( rPool.GetUserOrPoolDefaultItem( pEntry->nWID ) );
// get value from ItemSet
aAny = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
@@ -391,7 +391,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyDefault( const OUString& aProp
{
SfxItemPool& rPool = *mpSet->GetPool();
SfxItemSet aSet(rPool, pEntry->nWID, pEntry->nWID);
- aSet.Put(rPool.GetDefaultItem(pEntry->nWID));
+ aSet.Put(rPool.GetUserOrPoolDefaultItem(pEntry->nWID));
aAny = SvxItemPropertySet_getPropertyValue(pEntry, aSet);
}
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 3a91c7efb6bc..086efde29a24 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -900,7 +900,7 @@ const SvxNumBulletItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, TypedW
}
if( pItem == nullptr )
- pItem = aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
+ pItem = aNewAttr.GetPool()->GetSecondaryPool()->GetUserDefaultItem(EE_PARA_NUMBULLET);
aNewAttr.Put(pItem->CloneSetWhich(EE_PARA_NUMBULLET));
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 4f4ba99ce3ee..ffc4c2f753ae 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -497,7 +497,7 @@ SfxPoolItemHolder SfxShell::GetSlotState
if ( eState == SfxItemState::DEFAULT )
{
if ( SfxItemPool::IsWhich(nSlotId) )
- pItem = &rPool.GetDefaultItem(nSlotId);
+ pItem = &rPool.GetUserOrPoolDefaultItem(nSlotId);
else
eState = SfxItemState::DONTCARE;
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 39d0245637ca..6a79a50ee291 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -251,7 +251,7 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot
rSet.GetItemState( nWh, true, &pItem );
if ( !pItem && nWh != nSlot )
- pItem = &pPool->GetDefaultItem( nWh );
+ pItem = &pPool->GetUserOrPoolDefaultItem( nWh );
return pItem;
}
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
index 3d9dc5bc9450..045d58ea7303 100644
--- a/sfx2/source/explorer/nochaos.cxx
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -107,7 +107,7 @@ CntItemPool::CntItemPool()
SetItemInfos( pPoolDefs_Impl->GetItemInfos() );
// Set static pool default items.
- SetDefaults( pPoolDefs_Impl->GetDefaults() );
+ SetPoolDefaults( pPoolDefs_Impl->GetDefaults() );
}
@@ -115,7 +115,7 @@ CntItemPool::CntItemPool()
CntItemPool::~CntItemPool()
{
// Release static pool default items.
- ReleaseDefaults();
+ ReleasePoolDefaults();
}
diff --git a/starmath/source/smediteng.cxx b/starmath/source/smediteng.cxx
index 9eac0863e3de..6ba9f23d25c4 100644
--- a/starmath/source/smediteng.cxx
+++ b/starmath/source/smediteng.cxx
@@ -139,7 +139,7 @@ void SmEditEngine::setSmItemPool(SfxItemPool* mpItemPool, const SvtLinguOptions&
vcl::Font aFont = OutputDevice::GetDefaultFont(aFontData.nFontType, nLang,
GetDefaultFontFlags::OnlyOne);
aFont.SetColor(aTextColor);
- mpItemPool->SetPoolDefaultItem(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
+ mpItemPool->SetUserDefaultItem(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(), aFontData.nFontInfoId));
}
@@ -148,11 +148,11 @@ void SmEditEngine::setSmItemPool(SfxItemPool* mpItemPool, const SvtLinguOptions&
SvxFontHeightItem aFontHeight(
aDefaultDevice->LogicToPixel(Size(0, 11), MapMode(MapUnit::MapPoint)).Height(), 100,
EE_CHAR_FONTHEIGHT);
- mpItemPool->SetPoolDefaultItem(aFontHeight);
+ mpItemPool->SetUserDefaultItem(aFontHeight);
aFontHeight.SetWhich(EE_CHAR_FONTHEIGHT_CJK);
- mpItemPool->SetPoolDefaultItem(aFontHeight);
+ mpItemPool->SetUserDefaultItem(aFontHeight);
aFontHeight.SetWhich(EE_CHAR_FONTHEIGHT_CTL);
- mpItemPool->SetPoolDefaultItem(aFontHeight);
+ mpItemPool->SetUserDefaultItem(aFontHeight);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/svl/qa/unit/items/stylepool.cxx b/svl/qa/unit/items/stylepool.cxx
index c7b59e77940e..52625648dbb3 100644
--- a/svl/qa/unit/items/stylepool.cxx
+++ b/svl/qa/unit/items/stylepool.cxx
@@ -31,7 +31,7 @@ CPPUNIT_TEST_FIXTURE(StylePoolTest, testIterationOrder)
};
rtl::Reference<SfxItemPool> pPool = new SfxItemPool("test", 1, 1, aItems);
- pPool->SetDefaults(&aDefaults);
+ pPool->SetPoolDefaults(&aDefaults);
{
// Set up parents in mixed order to make sure we do not sort by pointer address.
SfxItemSet aParent1(*pPool, svl::Items<1, 1>);
@@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(StylePoolTest, testFixedItemSet)
{ 2, SFX_ITEMINFOFLAG_NONE }
};
rtl::Reference<SfxItemPool> pPool = new SfxItemPool("test", 1, 1, aItems);
- pPool->SetDefaults(&aDefaults);
+ pPool->SetPoolDefaults(&aDefaults);
SfxItemSetFixed<1, 2> aItemSet1(*pPool);
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index cb70ecd95c0b..0b5fd21b2fe8 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -332,13 +332,13 @@ sal_uInt16 SfxItemPool::GetSize_Impl() const
return mnEnd - mnStart + 1;
}
-const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( sal_uInt16 nWhich ) const
+const SfxPoolItem* SfxItemPool::GetUserDefaultItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pRet;
if( IsInRange( nWhich ) )
- pRet = maPoolDefaults[GetIndex_Impl(nWhich)];
+ pRet = maUserDefaults[GetIndex_Impl(nWhich)];
else if( mpSecondary )
- pRet = mpSecondary->GetPoolDefaultItem( nWhich );
+ pRet = mpSecondary->GetUserDefaultItem( nWhich );
else
{
assert(false && "unknown WhichId - cannot get pool default");
@@ -383,11 +383,11 @@ SfxBroadcaster& SfxItemPool::BC()
*
* If the Pool is supposed to hold SfxSetItems, the ctor cannot yet contain
* static Defaults. This needs to be done afterwards, using
- * @see SfxItemPool::SetDefaults(std::vector<SfxPoolItem*>*).
+ * @see SfxItemPool::SetPoolDefaults(std::vector<SfxPoolItem*>*).
*
- * @see SfxItemPool::SetDefaults(std::vector<SfxPoolItem*>*)
- * @see SfxItemPool::ReleaseDefaults(std::vector<SfxPoolItem*>*,bool)
- * @see SfxItemPool::ReleaseDefaults(bool)
+ * @see SfxItemPool::SetPoolDefaults(std::vector<SfxPoolItem*>*)
+ * @see SfxItemPool::ReleasePoolDefaults(std::vector<SfxPoolItem*>*,bool)
+ * @see SfxItemPool::ReleasePoolDefaults(bool)
*/
SfxItemPool::SfxItemPool
(
@@ -403,8 +403,8 @@ SfxItemPool::SfxItemPool
: salhelper::SimpleReferenceObject()
,pItemInfos(pInfo)
, aName(rName)
-, maPoolDefaults(nEndWhich - nStartWhich + 1)
-, mpStaticDefaults(nullptr)
+, maUserDefaults(nEndWhich - nStartWhich + 1)
+, mpPoolDefaults(nullptr)
, mpMaster(this)
, mnStart(nStartWhich)
, mnEnd(nEndWhich)
@@ -416,7 +416,7 @@ SfxItemPool::SfxItemPool
eDefMetric = MapUnit::MapTwip;
if ( pDefaults )
- SetDefaults(pDefaults);
+ SetPoolDefaults(pDefaults);
#ifdef DBG_UTIL
if (pItemInfos)
@@ -455,8 +455,8 @@ SfxItemPool::SfxItemPool
: salhelper::SimpleReferenceObject()
, pItemInfos(rPool.pItemInfos)
, aName(rPool.aName)
-, maPoolDefaults(rPool.mnEnd - rPool.mnStart + 1)
-, mpStaticDefaults(nullptr)
+, maUserDefaults(rPool.mnEnd - rPool.mnStart + 1)
+, mpPoolDefaults(nullptr)
, mpMaster(this)
, mnStart(rPool.mnStart)
, mnEnd(rPool.mnEnd)
@@ -473,21 +473,21 @@ SfxItemPool::SfxItemPool
std::vector<SfxPoolItem *>* ppDefaults = new std::vector<SfxPoolItem*>(mnEnd-mnStart+1);
for ( sal_uInt16 n = 0; n <= mnEnd - mnStart; ++n )
{
- (*ppDefaults)[n] = (*rPool.mpStaticDefaults)[n]->Clone(this);
+ (*ppDefaults)[n] = (*rPool.mpPoolDefaults)[n]->Clone(this);
(*ppDefaults)[n]->setStaticDefault();
}
- SetDefaults( ppDefaults );
+ SetPoolDefaults( ppDefaults );
}
else
- SetDefaults( rPool.mpStaticDefaults );
+ SetPoolDefaults( rPool.mpPoolDefaults );
// Copy Pool Defaults
- for (size_t n = 0; n < maPoolDefaults.size(); ++n )
- if (rPool.maPoolDefaults[n])
+ for (size_t n = 0; n < maUserDefaults.size(); ++n )
+ if (rPool.maUserDefaults[n])
{
- maPoolDefaults[n] = rPool.maPoolDefaults[n]->Clone(this); //resets kind
- maPoolDefaults[n]->setPoolDefault();
+ maUserDefaults[n] = rPool.maUserDefaults[n]->Clone(this); //resets kind
+ maUserDefaults[n]->setUserDefault();
}
// Repair linkage
@@ -495,30 +495,30 @@ SfxItemPool::SfxItemPool
SetSecondaryPool( rPool.mpSecondary->Clone().get() );
}
-void SfxItemPool::SetDefaults( std::vector<SfxPoolItem*>* pDefaults )
+void SfxItemPool::SetPoolDefaults( std::vector<SfxPoolItem*>* pDefaults )
{
DBG_ASSERT( pDefaults, "first we ask for it, and then we don't give back..." );
- DBG_ASSERT( !mpStaticDefaults, "already have Defaults" );
+ DBG_ASSERT( !mpPoolDefaults, "already have Defaults" );
- mpStaticDefaults = pDefaults;
- //! if ((*mpStaticDefaults)->GetKind() != SfxItemKind::StaticDefault)
+ mpPoolDefaults = pDefaults;
+ //! if ((*mpPoolDefaults)->GetKind() != SfxItemKind::StaticDefault)
//! FIXME: Probably doesn't work with SetItems at the end
{
- DBG_ASSERT( (*mpStaticDefaults)[0]->GetRefCount() == 0 ||
- IsDefaultItem( (*mpStaticDefaults)[0] ),
+ DBG_ASSERT( (*mpPoolDefaults)[0]->GetRefCount() == 0 ||
+ IsDefaultItem( (*mpPoolDefaults)[0] ),
"these are not static" );
for ( sal_uInt16 n = 0; n <= mnEnd - mnStart; ++n )
{
- assert( ((*mpStaticDefaults)[n]->Which() == n + mnStart)
+ assert( ((*mpPoolDefaults)[n]->Which() == n + mnStart)
&& "items ids in pool-ranges and in static-defaults do not match" );
- (*mpStaticDefaults)[n]->setStaticDefault();
+ (*mpPoolDefaults)[n]->setStaticDefault();
}
}
}
-void SfxItemPool::ClearDefaults()
+void SfxItemPool::ClearPoolDefaults()
{
- mpStaticDefaults = nullptr;
+ mpPoolDefaults = nullptr;
}
/**
@@ -528,7 +528,7 @@ void SfxItemPool::ClearDefaults()
* The SfxItemPool instance MUST NOT BE USED after this function has
* been called; only the dtor must be called.
*/
-void SfxItemPool::ReleaseDefaults
+void SfxItemPool::ReleasePoolDefaults
(
bool bDelete /* true
Deletes the array as well as the single static Defaults
@@ -539,12 +539,12 @@ void SfxItemPool::ReleaseDefaults
{
- DBG_ASSERT( mpStaticDefaults, "requirements not met" );
- ReleaseDefaults( mpStaticDefaults, bDelete );
+ DBG_ASSERT( mpPoolDefaults, "requirements not met" );
+ ReleasePoolDefaults( mpPoolDefaults, bDelete );
- // mpStaticDefaults points to deleted memory if bDelete == true.
+ // mpPoolDefaults points to deleted memory if bDelete == true.
if ( bDelete )
- mpStaticDefaults = nullptr;
+ mpPoolDefaults = nullptr;
}
@@ -555,7 +555,7 @@ void SfxItemPool::ReleaseDefaults
* This method MUST be called AFTER all SfxItemPool instances (which
* use the specified static Defaults 'pDefault') have been destroyed.
*/
-void SfxItemPool::ReleaseDefaults
+void SfxItemPool::ReleasePoolDefaults
(
std::vector<SfxPoolItem*>*
pDefaults, /* Static Defaults that are to be freed */
@@ -593,7 +593,7 @@ void SfxItemPool::ReleaseDefaults
SfxItemPool::~SfxItemPool()
{
// Need to be deleted?
- if (!mbPreDeleteDone)//maPoolDefaults.empty())
+ if (!mbPreDeleteDone)//maUserDefaults.empty())
Delete();
if (mpMaster != nullptr && mpMaster != this)
@@ -682,7 +682,7 @@ rtl::Reference<SfxItemPool> SfxItemPool::Clone() const
void SfxItemPool::Delete()
{
// Already deleted?
- if (mbPreDeleteDone)//maPoolDefaults.empty())
+ if (mbPreDeleteDone)//maUserDefaults.empty())
return;
mbPreDeleteDone = true;
@@ -690,7 +690,7 @@ void SfxItemPool::Delete()
aBC.Broadcast( SfxHint( SfxHintId::Dying ) );
// default items
- for (auto rItemPtr : maPoolDefaults)
+ for (auto rItemPtr : maUserDefaults)
{
if (rItemPtr)
{
@@ -702,19 +702,19 @@ void SfxItemPool::Delete()
}
}
- maPoolDefaults.clear();
+ maUserDefaults.clear();
mpPoolRanges.reset();
}
-void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
+void SfxItemPool::SetUserDefaultItem(const SfxPoolItem &rItem)
{
if ( IsInRange(rItem.Which()) )
{
auto& rOldDefault =
- maPoolDefaults[GetIndex_Impl(rItem.Which())];
+ maUserDefaults[GetIndex_Impl(rItem.Which())];
SfxPoolItem *pNewDefault = rItem.Clone(this);
- pNewDefault->setPoolDefault();
+ pNewDefault->setUserDefault();
if (rOldDefault)
{
rOldDefault->SetRefCount(0);
@@ -724,7 +724,7 @@ void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
rOldDefault = pNewDefault;
}
else if ( mpSecondary )
- mpSecondary->SetPoolDefaultItem(rItem);
+ mpSecondary->SetUserDefaultItem(rItem);
else
{
assert(false && "unknown WhichId - cannot set pool default");
@@ -735,12 +735,12 @@ void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
* Resets the default of the given WhichId back to the static Default.
* If a pool default exists, it is removed.
*/
-void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
+void SfxItemPool::ResetUserDefaultItem( sal_uInt16 nWhichId )
{
if ( IsInRange(nWhichId) )
{
auto& rOldDefault =
- maPoolDefaults[GetIndex_Impl(nWhichId)];
+ maUserDefaults[GetIndex_Impl(nWhichId)];
if (rOldDefault)
{
rOldDefault->SetRefCount(0);
@@ -749,28 +749,28 @@ void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
}
}
else if ( mpSecondary )
- mpSecondary->ResetPoolDefaultItem(nWhichId);
+ mpSecondary->ResetUserDefaultItem(nWhichId);
else
{
assert(false && "unknown WhichId - cannot reset pool default");
}
}
-const SfxPoolItem& SfxItemPool::GetDefaultItem( sal_uInt16 nWhich ) const
+const SfxPoolItem& SfxItemPool::GetUserOrPoolDefaultItem( sal_uInt16 nWhich ) const
{
if ( !IsInRange(nWhich) )
{
if ( mpSecondary )
- return mpSecondary->GetDefaultItem( nWhich );
+ return mpSecondary->GetUserOrPoolDefaultItem( nWhich );
assert(!"unknown which - don't ask me for defaults");
}
- DBG_ASSERT( mpStaticDefaults, "no defaults known - don't ask me for defaults" );
+ DBG_ASSERT( mpPoolDefaults, "no defaults known - don't ask me for defaults" );
sal_uInt16 nPos = GetIndex_Impl(nWhich);
- SfxPoolItem* pDefault = maPoolDefaults[nPos];
+ SfxPoolItem* pDefault = maUserDefaults[nPos];
if ( pDefault )
return *pDefault;
- return *(*mpStaticDefaults)[nPos];
+ return *(*mpPoolDefaults)[nPos];
}
SfxItemPool* SfxItemPool::GetSecondaryPool() const
@@ -822,16 +822,16 @@ const WhichRangesContainer& SfxItemPool::GetFrozenIdRanges() const
return mpPoolRanges;
}
-const SfxPoolItem *SfxItemPool::GetItem2Default(sal_uInt16 nWhich) const
+const SfxPoolItem *SfxItemPool::GetPoolDefaultItem(sal_uInt16 nWhich) const
{
if ( !IsInRange(nWhich) )
{
if ( mpSecondary )
- return mpSecondary->GetItem2Default( nWhich );
+ return mpSecondary->GetPoolDefaultItem( nWhich );
assert(false && "unknown WhichId - cannot resolve surrogate");
return nullptr;
}
- return (*mpStaticDefaults)[ GetIndex_Impl(nWhich) ];
+ return (*mpPoolDefaults)[ GetIndex_Impl(nWhich) ];
}
namespace
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 3885542f89b8..8478eaadc98a 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -120,7 +120,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertyMapEntry& rEntry
const SfxPoolItem* pItem = nullptr;
SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem );
if (SfxItemState::SET != eState && SfxItemPool::IsWhich(rEntry.nWID) )
- pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID);
+ pItem = &rSet.GetPool()->GetUserOrPoolDefaultItem(rEntry.nWID);
// return item values as uno::Any
if(eState >= SfxItemState::DEFAULT && pItem)
{
@@ -168,7 +168,7 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertyMapEntry& rEntry
std::unique_ptr<SfxPoolItem> pNewItem;
SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem );
if (SfxItemState::SET != eState && SfxItemPool::IsWhich(rEntry.nWID))
- pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID);
+ pItem = &rSet.GetPool()->GetUserOrPoolDefaultItem(rEntry.nWID);
if (pItem)
{
pNewItem.reset(pItem->Clone());
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 1c591f73c60e..9271ab13f3c1 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -560,7 +560,7 @@ SfxPoolItem const* implCreateItemEntry(SfxItemPool& rPool, SfxPoolItem const* pS
// if (IsStaticDefaultItem(pSource))
// {
// assert(!bPassingOwnership && "ITEM: PassingOwnership not possible combined with StaticDefault (!)");
- // const SfxPoolItem* pStatic(pTargetPool->GetItem2Default(pSource->Which()));
+ // const SfxPoolItem* pStatic(pTargetPool->GetPoolDefaultItem(pSource->Which()));
// if (nullptr != pStatic)
// {
// if (SfxPoolItem::areSame(pSource, pStatic))
@@ -575,7 +575,7 @@ SfxPoolItem const* implCreateItemEntry(SfxItemPool& rPool, SfxPoolItem const* pS
// else if (IsDefaultItem(pSource))
// {
// assert(!bPassingOwnership && "ITEM: PassingOwnership not possible combined with DynamicDefault (!)");
- // const SfxPoolItem* pDynamic(pTargetPool->GetPoolDefaultItem(pSource->Which()));
+ // const SfxPoolItem* pDynamic(pTargetPool->GetUserDefaultItem(pSource->Which()));
// if (nullptr != pDynamic)
// {
// if (SfxPoolItem::areSame(pSource, pDynamic))
@@ -1254,7 +1254,7 @@ void SfxItemSet::PutExtended
switch (eDontCareAs)
{
case SfxItemState::SET:
- PutImpl(rSource.GetPool()->GetDefaultItem(nWhich), false);
+ PutImpl(rSource.GetPool()->GetUserOrPoolDefaultItem(nWhich), false);
break;
case SfxItemState::DEFAULT:
@@ -1281,7 +1281,7 @@ void SfxItemSet::PutExtended
switch (eDefaultAs)
{
case SfxItemState::SET:
- PutImpl(rSource.GetPool()->GetDefaultItem(nWhich), false);
+ PutImpl(rSource.GetPool()->GetUserOrPoolDefaultItem(nWhich), false);
break;
case SfxItemState::DEFAULT:
@@ -1506,7 +1506,7 @@ const SfxPoolItem* SfxItemSet::GetItem(sal_uInt16 nId, bool bSearchInParent) con
if (bSearchInParent && SfxItemState::DEFAULT == eState && SfxItemPool::IsWhich(nWhich))
{
- pItem = &GetPool()->GetDefaultItem(nWhich);
+ pItem = &GetPool()->GetUserOrPoolDefaultItem(nWhich);
}
return pItem;
@@ -1525,7 +1525,7 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
{
if (IsInvalidItem(*aFoundOne))
{
- return GetPool()->GetDefaultItem(nWhich);
+ return GetPool()->GetUserOrPoolDefaultItem(nWhich);
}
#ifdef DBG_UTIL
if (IsDisabledItem(*aFoundOne))
@@ -1542,7 +1542,7 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
// Get the Default from the Pool and return
assert(m_pPool);
- return GetPool()->GetDefaultItem(nWhich);
+ return GetPool()->GetUserOrPoolDefaultItem(nWhich);
}
/**
@@ -1753,7 +1753,7 @@ void SfxItemSet::MergeItem_Impl(const SfxPoolItem **ppFnd1, const SfxPoolItem *p
*ppFnd1 = INVALID_POOL_ITEM;
else if ( pFnd2 && !bIgnoreDefaults &&
- GetPool()->GetDefaultItem(pFnd2->Which()) != *pFnd2 )
+ GetPool()->GetUserOrPoolDefaultItem(pFnd2->Which()) != *pFnd2 )
// Decision table: default, set, !=, sal_False
*ppFnd1 = INVALID_POOL_ITEM;
@@ -1776,7 +1776,7 @@ void SfxItemSet::MergeItem_Impl(const SfxPoolItem **ppFnd1, const SfxPoolItem *p
{
// 2nd Item is Default
if ( !bIgnoreDefaults &&
- **ppFnd1 != GetPool()->GetDefaultItem((*ppFnd1)->Which()) )
+ **ppFnd1 != GetPool()->GetUserOrPoolDefaultItem((*ppFnd1)->Which()) )
{
// Decision table: set, default, !=, sal_False
checkRemovePoolRegistration(*ppFnd1);
@@ -1789,7 +1789,7 @@ void SfxItemSet::MergeItem_Impl(const SfxPoolItem **ppFnd1, const SfxPoolItem *p
{
// 2nd Item is dontcare
if ( !bIgnoreDefaults ||
- **ppFnd1 != GetPool()->GetDefaultItem( (*ppFnd1)->Which()) )
+ **ppFnd1 != GetPool()->GetUserOrPoolDefaultItem( (*ppFnd1)->Which()) )
{
// Decision table: set, dontcare, doesn't matter, sal_False
// or: set, dontcare, !=, sal_True
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 10fda040f5cb..31f6cd27990d 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -510,7 +510,8 @@ SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich)
, m_nSerialNumber(nUsedSfxPoolItemCount)
#endif
, m_bStaticDefault(false)
- , m_bPoolDefault(false)
+ , m_bDynamicDefault(false)
+ , m_bUserDefault(false)
, m_bIsSetItem(false)
, m_bShareable(true)
#ifdef DBG_UTIL
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 2052a072c083..90c2f7450275 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -237,7 +237,7 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet )
aSet.Put(SfxBoolItem(nWSharedFirst, m_xCntSharedFirstBox->get_active()));
if (m_xDynSpacingCB->get_visible() && SfxItemPool::IsWhich(nWDynSpacing))
{
- std::unique_ptr<SfxBoolItem> pBoolItem(static_cast<SfxBoolItem*>(pPool->GetDefaultItem(nWDynSpacing).Clone()));
+ std::unique_ptr<SfxBoolItem> pBoolItem(static_cast<SfxBoolItem*>(pPool->GetUserOrPoolDefaultItem(nWDynSpacing).Clone()));
pBoolItem->SetValue(m_xDynSpacingCB->get_active());
aSet.Put(std::move(pBoolItem));
}
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index d1b5e4b73e4a..6292bd56cb9f 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -112,21 +112,21 @@ void WeldEditView::makeEditEngine()
vcl::Font aAppFont(Application::GetSettings().GetStyleSettings().GetAppFont());
- pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
+ pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO));
- pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
+ pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CJK));
- pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
+ pItemPool->SetUserDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), aAppFont.GetFamilyName(),
"", PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW,
EE_CHAR_FONTINFO_CTL));
- pItemPool->SetPoolDefaultItem(
+ pItemPool->SetUserDefaultItem(
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT));
- pItemPool->SetPoolDefaultItem(
+ pItemPool->SetUserDefaultItem(
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT_CJK));
- pItemPool->SetPoolDefaultItem(
+ pItemPool->SetUserDefaultItem(
SvxFontHeightItem(aAppFont.GetFontHeight() * 20, 100, EE_CHAR_FONTHEIGHT_CTL));
m_xEditEngine.reset(new EditEngine(pItemPool.get()));
diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx
index 47de321f581e..64f0fba1f5c8 100644
--- a/svx/source/engine3d/view3d1.cxx
+++ b/svx/source/engine3d/view3d1.cxx
@@ -166,12 +166,12 @@ void E3dView::Set3DAttributes( const SfxItemSet& rAttr)
double E3dView::GetDefaultCamPosZ()
{
- return static_cast<double>(GetModel().GetItemPool().GetDefaultItem(SDRATTR_3DSCENE_DISTANCE).GetValue());
+ return static_cast<double>(GetModel().GetItemPool().GetUserOrPoolDefaultItem(SDRATTR_3DSCENE_DISTANCE).GetValue());
}
double E3dView::GetDefaultCamFocal()
{
- return static_cast<double>(GetModel().GetItemPool().GetDefaultItem(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue());
+ return static_cast<double>(GetModel().GetItemPool().GetUserOrPoolDefaultItem(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index bf237d35ae18..ceaa80259fd9 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -374,7 +374,7 @@ SdrItemPool::SdrItemPool(
mpLocalItemInfos[SDRATTR_WRITINGMODE2 - SDRATTR_START]._nItemInfoSlotID = 0 /*TODO*/;
// it's my own creation level, set Defaults and ItemInfos
- SetDefaults(mpLocalPoolDefaults);
+ SetPoolDefaults(mpLocalPoolDefaults);
SetItemInfos(mpLocalItemInfos.get());
}
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 47272987ec79..f429953dc28a 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -171,11 +171,11 @@ SdrModel::SdrModel(SfxItemPool* pPool, comphelper::IEmbeddedHelper* pEmbeddedHel
m_pItemPool->SetDefaultMetric(m_eObjUnit);
// using static SdrEngineDefaults only if default SvxFontHeight item is not available
- const SfxPoolItem* pPoolItem = m_pItemPool->GetPoolDefaultItem( EE_CHAR_FONTHEIGHT );
+ const SfxPoolItem* pPoolItem = m_pItemPool->GetUserDefaultItem( EE_CHAR_FONTHEIGHT );
if (pPoolItem)
mnDefTextHgt = static_cast<const SvxFontHeightItem*>(pPoolItem)->GetHeight();
- m_pItemPool->SetPoolDefaultItem( makeSdrTextWordWrapItem( false ) );
+ m_pItemPool->SetUserDefaultItem( makeSdrTextWordWrapItem( false ) );
SetTextDefaults();
m_pLayerAdmin->SetModel(this);
@@ -638,7 +638,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt )
aSvxFontItem.SetStyleName(OUString());
aSvxFontItem.SetPitch( aFont.GetPitch());
aSvxFontItem.SetCharSet( aFont.GetCharSet() );
- pItemPool->SetPoolDefaultItem(aSvxFontItem);
+ pItemPool->SetUserDefaultItem(aSvxFontItem);
// get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default
vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
@@ -647,7 +647,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt )
aSvxFontItemCJK.SetStyleName(OUString());
aSvxFontItemCJK.SetPitch( aFontCJK.GetPitch());
aSvxFontItemCJK.SetCharSet( aFontCJK.GetCharSet());
- pItemPool->SetPoolDefaultItem(aSvxFontItemCJK);
+ pItemPool->SetUserDefaultItem(aSvxFontItemCJK);
// get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default
vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DefaultFontType::CTL_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne));
@@ -656,15 +656,15 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt )
aSvxFontItemCTL.SetStyleName(OUString());
aSvxFontItemCTL.SetPitch( aFontCTL.GetPitch() );
aSvxFontItemCTL.SetCharSet( aFontCTL.GetCharSet());
- pItemPool->SetPoolDefaultItem(aSvxFontItemCTL);
+ pItemPool->SetUserDefaultItem(aSvxFontItemCTL);
// set dynamic FontHeight defaults
- pItemPool->SetPoolDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT ) );
- pItemPool->SetPoolDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT_CJK ) );
- pItemPool->SetPoolDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT_CTL ) );
+ pItemPool->SetUserDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT ) );
+ pItemPool->SetUserDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT_CJK ) );
+ pItemPool->SetUserDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT_CTL ) );
// set FontColor defaults
- pItemPool->SetPoolDefaultItem( SvxColorItem(SdrEngineDefaults::GetFontColor(), EE_CHAR_COLOR) );
+ pItemPool->SetUserDefaultItem( SvxColorItem(SdrEngineDefaults::GetFontColor(), EE_CHAR_COLOR) );
}
SdrOutliner& SdrModel::GetDrawOutliner(const SdrTextObj* pObj) const
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index c617129f3fd2..a7dc7397e9ad 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1104,7 +1104,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
{
// fetch the default from ItemPool
if(SfxItemPool::IsWhich(pMap->nWID))
- aSet.Put(GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->nWID));
+ aSet.Put(GetObject().getSdrModelFromSdrObject().GetItemPool().GetUserOrPoolDefaultItem(pMap->nWID));
}
if( aSet.GetItemState( pMap->nWID ) == SfxItemState::SET )
@@ -1208,7 +1208,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName )
{
// fetch the default from ItemPool
if(SfxItemPool::IsWhich(pMap->nWID))
- aSet.Put(GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->nWID));
+ aSet.Put(GetObject().getSdrModelFromSdrObject().GetItemPool().GetUserOrPoolDefaultItem(pMap->nWID));
}
if( aSet.Count() )
@@ -1586,7 +1586,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName )
if( SfxItemPool::IsWhich(pMap->nWID) )
{
SfxItemSet aSet(GetObject().getSdrModelFromSdrObject().GetItemPool(), pMap->nWID, pMap->nWID);
- aSet.Put(GetObject().getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->nWID));
+ aSet.Put(GetObject().getSdrModelFromSdrObject().GetItemPool().GetUserOrPoolDefaultItem(pMap->nWID));
return GetAnyForItem( aSet, pMap );
}
}
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 07b9751ef048..d631ec72f4cd 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -644,7 +644,7 @@ css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel*
const SvxNumRule* pDefaultRule = nullptr;
if( pModel )
{
- const SvxNumBulletItem* pItem = pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
+ const SvxNumBulletItem* pItem = pModel->GetItemPool().GetSecondaryPool()->GetUserDefaultItem(EE_PARA_NUMBULLET);
if( pItem )
{
pDefaultRule = &pItem->GetNumRule();
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index c8d5e59bcbd0..3be3c0418ea7 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -81,11 +81,11 @@ void SvxUnoDrawPool::getAny( SfxItemPool const * pPool, const comphelper::Proper
{
case OWN_ATTR_FILLBMP_MODE:
{
- if (pPool->GetDefaultItem(XATTR_FILLBMP_TILE).GetValue())
+ if (pPool->GetUserOrPoolDefaultItem(XATTR_FILLBMP_TILE).GetValue())
{
rValue <<= drawing::BitmapMode_REPEAT;
}
- else if (pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH).GetValue())
+ else if (pPool->GetUserOrPoolDefaultItem(XATTR_FILLBMP_STRETCH).GetValue())
{
rValue <<= drawing::BitmapMode_STRETCH;
}
@@ -105,7 +105,7 @@ void SvxUnoDrawPool::getAny( SfxItemPool const * pPool, const comphelper::Proper
// Assure, that ID is a Which-ID (it could be a Slot-ID.)
// Thus, convert handle to Which-ID.
- pPool->GetDefaultItem( pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) ) ).QueryValue( rValue, nMemberId );
+ pPool->GetUserOrPoolDefaultItem( pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) ) ).QueryValue( rValue, nMemberId );
}
}
@@ -154,15 +154,15 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
eMode = static_cast<drawing::BitmapMode>(nMode);
}
- pPool->SetPoolDefaultItem( XFillBmpStretchItem( eMode == drawing::BitmapMode_STRETCH ) );
- pPool->SetPoolDefaultItem( XFillBmpTileItem( eMode == drawing::BitmapMode_REPEAT ) );
+ pPool->SetUserDefaultItem( XFillBmpStretchItem( eMode == drawing::BitmapMode_STRETCH ) );
+ pPool->SetUserDefaultItem( XFillBmpTileItem( eMode == drawing::BitmapMode_REPEAT ) );
return;
}
while(false);
default:
{
- std::unique_ptr<SfxPoolItem> pNewItem( pPool->GetDefaultItem( nWhich ).Clone() );
+ std::unique_ptr<SfxPoolItem> pNewItem( pPool->GetUserOrPoolDefaultItem( nWhich ).Clone() );
sal_uInt8 nMemberId = pEntry->mnMemberId;
if( pPool->GetMetric(nWhich) == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS);
@@ -170,7 +170,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
if( !pNewItem->PutValue( aValue, nMemberId ) )
throw lang::IllegalArgumentException();
- pPool->SetPoolDefaultItem( *pNewItem );
+ pPool->SetUserDefaultItem( *pNewItem );
}
}
}
@@ -223,8 +223,8 @@ void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** pp
{
// use method <IsStaticDefaultItem(..)> instead of using
// probably incompatible item pool <mpDefaultPool>.
- if ( IsStaticDefaultItem( &(pPool->GetDefaultItem( XATTR_FILLBMP_STRETCH )) ) ||
- IsStaticDefaultItem( &(pPool->GetDefaultItem( XATTR_FILLBMP_TILE )) ) )
+ if ( IsStaticDefaultItem( &(pPool->GetUserOrPoolDefaultItem( XATTR_FILLBMP_STRETCH )) ) ||
+ IsStaticDefaultItem( &(pPool->GetUserOrPoolDefaultItem( XATTR_FILLBMP_TILE )) ) )
{
*pStates = beans::PropertyState_DEFAULT_VALUE;
}
@@ -235,8 +235,8 @@ void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** pp
}
break;
case OWN_ATTR_TEXTCOLUMNS:
- if (IsStaticDefaultItem(&pPool->GetDefaultItem(sal_uInt16(SDRATTR_TEXTCOLUMNS_NUMBER)))
- && IsStaticDefaultItem(&pPool->GetDefaultItem(sal_uInt16(SDRATTR_TEXTCOLUMNS_SPACING))))
+ if (IsStaticDefaultItem(&pPool->GetUserOrPoolDefaultItem(sal_uInt16(SDRATTR_TEXTCOLUMNS_NUMBER)))
+ && IsStaticDefaultItem(&pPool->GetUserOrPoolDefaultItem(sal_uInt16(SDRATTR_TEXTCOLUMNS_SPACING))))
*pStates = beans::PropertyState_DEFAULT_VALUE;
else
*pStates = beans::PropertyState_DIRECT_VALUE;
@@ -245,8 +245,8 @@ void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** pp
//#i18732# - correction:
// use method <IsStaticDefaultItem(..)> instead of using probably
// incompatible item pool <mpDefaultPool>.
- const SfxPoolItem& r1 = pPool->GetDefaultItem( nWhich );
- //const SfxPoolItem& r2 = mpDefaultPool->GetDefaultItem( nWhich );
+ const SfxPoolItem& r1 = pPool->GetUserOrPoolDefaultItem( nWhich );
+ //const SfxPoolItem& r2 = mpDefaultPool->GetUserOrPoolDefaultItem( nWhich );
if ( IsStaticDefaultItem( &r1 ) )
{
@@ -282,20 +282,20 @@ void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry*
const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) );
if ( pPool && pPool != mpDefaultsPool.get() )
{
- // use method <ResetPoolDefaultItem(..)> instead of using probably incompatible item pool <mpDefaultsPool>.
- pPool->ResetPoolDefaultItem( nWhich );
+ // use method <ResetUserDefaultItem(..)> instead of using probably incompatible item pool <mpDefaultsPool>.
+ pPool->ResetUserDefaultItem( nWhich );
}
}
uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry* pEntry )
{
SolarMutexGuard aGuard;
- //#i18732# - use method <GetPoolDefaultItem(..)> instead of
+ //#i18732# - use method <GetUserDefaultItem(..)> instead of
// using probably incompatible item pool <mpDefaultsPool>
uno::Any aAny;
SfxItemPool* pPool = getModelPool( true );
const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) );
- const SfxPoolItem *pItem = pPool->GetPoolDefaultItem ( nWhich );
+ const SfxPoolItem *pItem = pPool->GetUserDefaultItem ( nWhich );
if (pItem)
{
pItem->QueryValue( aAny, pEntry->mnMemberId );
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 90ff0eeb4275..703b3e664638 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -530,7 +530,7 @@ static void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemProper
if(SfxItemPool::IsWhich(nWID)
&& (nWID < OWN_ATTR_VALUE_START || nWID > OWN_ATTR_VALUE_END)
&& rAnys.GetUsrAnyForID(*pSrcProp))
- rSet.Put(rSet.GetPool()->GetDefaultItem(nWID));
+ rSet.Put(rSet.GetPool()->GetUserOrPoolDefaultItem(nWID));
}
for(const SfxItemPropertyMapEntry* pSrcProp : rSrc.getPropertyEntries())
@@ -1564,7 +1564,7 @@ void SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any&
{
// get default from ItemPool
if(SfxItemPool::IsWhich(pMap->nWID))
- pSet->Put(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->nWID));
+ pSet->Put(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetUserOrPoolDefaultItem(pMap->nWID));
}
if( pSet->GetItemState( pMap->nWID ) == SfxItemState::SET )
@@ -1633,7 +1633,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
{
// get default from ItemPool
if(SfxItemPool::IsWhich(pMap->nWID))
- aSet.Put(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->nWID));
+ aSet.Put(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetUserOrPoolDefaultItem(pMap->nWID));
}
if(aSet.Count())
@@ -3065,7 +3065,7 @@ uno::Any SvxShape::_getPropertyDefault( const OUString& aPropertyName )
throw beans::UnknownPropertyException( "No WhichID " + OUString::number(pMap->nWID) + " for " + aPropertyName, getXWeak());
SfxItemSet aSet( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool(), pMap->nWID, pMap->nWID );
- aSet.Put(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->nWID));
+ aSet.Put(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetUserOrPoolDefaultItem(pMap->nWID));
return GetAnyForItem( aSet, pMap );
}
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
index cb91553f5390..9419a5c43456 100644
--- a/svx/source/xoutdev/xpool.cxx
+++ b/svx/source/xoutdev/xpool.cxx
@@ -214,7 +214,7 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster)
// if it's my own creation level, set Defaults and ItemInfos
if(XATTR_START == GetFirstWhich() && XATTR_END == GetLastWhich())
{
- SetDefaults(mpLocalPoolDefaults);
+ SetPoolDefaults(mpLocalPoolDefaults);
SetItemInfos(mpLocalItemInfos.get());
}
}
@@ -235,7 +235,7 @@ XOutdevItemPool::~XOutdevItemPool()
{
Delete();
// release and delete static pool default items
- ReleaseDefaults(true);
+ ReleasePoolDefaults(true);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 6e52f4af3d51..17adbeeb6901 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -58,16 +58,16 @@ SwAttrPool::SwAttrPool( SwDoc* pD )
constexpr tools::Long nDefEdgeDist
= o3tl::convert(500, o3tl::Length::mm100, o3tl::Length::twip);
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode1HorzDistItem(nDefEdgeDist));
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode1VertDistItem(nDefEdgeDist));
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode2HorzDistItem(nDefEdgeDist));
- pSdrPool->SetPoolDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist));
+ pSdrPool->SetUserDefaultItem(SdrEdgeNode1HorzDistItem(nDefEdgeDist));
+ pSdrPool->SetUserDefaultItem(SdrEdgeNode1VertDistItem(nDefEdgeDist));
+ pSdrPool->SetUserDefaultItem(SdrEdgeNode2HorzDistItem(nDefEdgeDist));
+ pSdrPool->SetUserDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist));
// #i33700# // Set shadow distance defaults as PoolDefaultItems
constexpr tools::Long nDefShadowDist
= o3tl::convert(300, o3tl::Length::mm100, o3tl::Length::twip);
- pSdrPool->SetPoolDefaultItem(makeSdrShadowXDistItem(nDefShadowDist));
- pSdrPool->SetPoolDefaultItem(makeSdrShadowYDistItem(nDefShadowDist));
+ pSdrPool->SetUserDefaultItem(makeSdrShadowXDistItem(nDefShadowDist));
+ pSdrPool->SetUserDefaultItem(makeSdrShadowYDistItem(nDefShadowDist));
rtl::Reference<SfxItemPool> pEEgPool = EditEngine::CreatePool();
@@ -141,7 +141,7 @@ void SwAttrSet::changeCallback(const SfxPoolItem* pOld, const SfxPoolItem* pNew)
const SfxItemSet* pParent(GetParent());
m_pOldSet->PutImpl(nullptr != pParent
? pParent->Get(nWhich)
- : GetPool()->GetDefaultItem(nWhich), false);
+ : GetPool()->GetUserOrPoolDefaultItem(nWhich), false);
}
else if (!IsInvalidItem(pOld))
{
@@ -159,7 +159,7 @@ void SwAttrSet::changeCallback(const SfxPoolItem* pOld, const SfxPoolItem* pNew)
const SfxItemSet* pParent(GetParent());
m_pNewSet->PutImpl(nullptr != pParent
? pParent->Get(nWhich)
- : GetPool()->GetDefaultItem(nWhich), false);
+ : GetPool()->GetUserOrPoolDefaultItem(nWhich), false);
}
else if (!IsInvalidItem(pNew))
{
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index d453c2ddc9a5..20ca5c6ca4f6 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -707,7 +707,7 @@ void FinitCore()
#if OSL_DEBUG_LEVEL > 0
// free defaults to prevent assertions
if ( aAttrTab[0]->GetRefCount() )
- SfxItemPool::ReleaseDefaults( &aAttrTab );
+ SfxItemPool::ReleasePoolDefaults( &aAttrTab );
#endif
delete SwDoc::s_pAutoCompleteWords;
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 9492cfdd6c70..f06e31fe6465 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -278,7 +278,7 @@ void SwAttrCheckArr::SetNewSet( const SwTextNode& rTextNd, const SwPaM& rPam )
break; // end of text attributes
if( SfxItemState::SET == rSet.GetItemState( nWhich, !m_bNoColls, &pFndItem )
- && !CmpAttr( *pFndItem, rSet.GetPool()->GetDefaultItem( nWhich ) ))
+ && !CmpAttr( *pFndItem, rSet.GetPool()->GetUserOrPoolDefaultItem( nWhich ) ))
{
m_pFindArr[ nWhich - m_nArrStart ] =
SwSrchChrAttr( *pFndItem, m_nNodeStart, m_nNodeEnd );
@@ -412,7 +412,7 @@ bool SwAttrCheckArr::SetAttrFwd( const SwTextAttr& rAttr )
if( SfxItemState::DONTCARE == eState )
{
// Will the attribute become valid?
- if( !CmpAttr( m_aComapeSet.GetPool()->GetDefaultItem( nWhch ),
+ if( !CmpAttr( m_aComapeSet.GetPool()->GetUserOrPoolDefaultItem( nWhch ),
*pTmpItem ))
{
// search attribute and extend if needed
@@ -570,7 +570,7 @@ bool SwAttrCheckArr::SetAttrBwd( const SwTextAttr& rAttr )
if( SfxItemState::DONTCARE == eState )
{
// Will the attribute become valid?
- if( !CmpAttr( m_aComapeSet.GetPool()->GetDefaultItem( nWhch ),
+ if( !CmpAttr( m_aComapeSet.GetPool()->GetUserOrPoolDefaultItem( nWhch ),
*pTmpItem ) )
{
// search attribute and extend if needed
@@ -889,7 +889,7 @@ static bool lcl_Search( const SwContentNode& rCNd, const SfxItemSet& rCmpSet, bo
{
nWhich = rCmpSet.GetWhichByOffset( aIter.GetCurPos() );
if( SfxItemState::SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
- || CmpAttr( *pNdItem, rNdSet.GetPool()->GetDefaultItem( nWhich ) ))
+ || CmpAttr( *pNdItem, rNdSet.GetPool()->GetUserOrPoolDefaultItem( nWhich ) ))
return false;
}
else
@@ -1384,7 +1384,7 @@ int SwFindParaAttr::DoFind(SwPaM & rCursor, SwMoveFnCollection const & fnMove,
// reset all that are not set with pool defaults
if( !IsInvalidItem( pItem ) && SfxItemState::SET !=
pReplSet->GetItemState( pItem->Which(), false ))
- aSet.Put( pPool->GetDefaultItem( pItem->Which() ));
+ aSet.Put( pPool->GetUserOrPoolDefaultItem( pItem->Which() ));
pItem = aIter.NextItem();
} while (pItem);
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index a72bc5951438..672c8abffb75 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -74,7 +74,7 @@ void DocumentDrawModelManager::InitDrawModel()
ReleaseDrawModel();
// set FontHeight pool defaults without changing static SdrEngineDefaults
- m_rDoc.GetAttrPool().SetPoolDefaultItem(SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ));
+ m_rDoc.GetAttrPool().SetUserDefaultItem(SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ));
SAL_INFO( "sw.doc", "before create DrawDocument" );
// The document owns the SwDrawModel. We always have two layers and one page.
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index ab0fd4ef0de7..fe7b22049a4c 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -439,7 +439,7 @@ namespace
sal_uInt16 nWhich = aTmp.GetWhichByOffset(nItem);
if( SfxItemState::SET == aTmp.GetItemState( nWhich, false ) &&
SfxItemState::SET != aTmp2.GetItemState( nWhich, false ) )
- aTmp2.Put( aTmp.GetPool()->GetDefaultItem(nWhich) );
+ aTmp2.Put( aTmp.GetPool()->GetUserOrPoolDefaultItem(nWhich) );
}
}
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 56c1274a8726..68d4e5c11855 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -133,7 +133,7 @@ namespace
};
for(const auto & n : aArr)
{
- LanguageType nLng = static_cast<const SvxLanguageItem&>(rSet.GetPool()->GetDefaultItem(
+ LanguageType nLng = static_cast<const SvxLanguageItem&>(rSet.GetPool()->GetUserOrPoolDefaultItem(
n.nResLngId )).GetLanguage();
vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType,
nLng, GetDefaultFontFlags::OnlyOne ) );
@@ -162,7 +162,7 @@ namespace
for(const auto & n : aArr)
{
- LanguageType nLng = static_cast<const SvxLanguageItem&>(rSet.GetPool()->GetDefaultItem(
+ LanguageType nLng = static_cast<const SvxLanguageItem&>(rSet.GetPool()->GetUserOrPoolDefaultItem(
n.nResLngId )).GetLanguage();
vcl::Font aFnt( OutputDevice::GetDefaultFont( n.nFntType,
nLng, GetDefaultFontFlags::OnlyOne ) );
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 845421629fe5..048478f194d4 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1905,7 +1905,7 @@ void SwDoc::SetMissingDictionaries( bool bIsMissing )
void SwDoc::SetLanguage(const LanguageType eLang, const sal_uInt16 nId)
{
- mpAttrPool->SetPoolDefaultItem(SvxLanguageItem(eLang, nId));
+ mpAttrPool->SetUserDefaultItem(SvxLanguageItem(eLang, nId));
}
bool SwDoc::HasParagraphDirectFormatting(const SwPosition& rPos)
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 521ca2b0ba15..2f1459aa787a 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -95,7 +95,7 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
// If no anchor frame exist - e.g. because no layout exists - the
// default layout direction is taken.
const SvxFrameDirectionItem& rDirItem =
- _pFrameFormat->GetAttrSet().GetPool()->GetDefaultItem( RES_FRAMEDIR );
+ _pFrameFormat->GetAttrSet().GetPool()->GetUserOrPoolDefaultItem( RES_FRAMEDIR );
switch ( rDirItem.GetValue() )
{
case SvxFrameDirection::Vertical_LR_TB:
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index d2543da6f057..120e8394f196 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -569,9 +569,9 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
{
bool bCheckSdrDflt = false;
const sal_uInt16 nWhich = pItem->Which();
- aOld.Put( GetAttrPool().GetDefaultItem( nWhich ) );
- GetAttrPool().SetPoolDefaultItem( *pItem );
- aNew.Put( GetAttrPool().GetDefaultItem( nWhich ) );
+ aOld.Put( GetAttrPool().GetUserOrPoolDefaultItem( nWhich ) );
+ GetAttrPool().SetUserDefaultItem( *pItem );
+ aNew.Put( GetAttrPool().GetUserOrPoolDefaultItem( nWhich ) );
if (isCHRATR(nWhich) || isTXTATR(nWhich))
{
@@ -611,7 +611,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
{
std::unique_ptr<SfxPoolItem> pCpy(pItem->Clone());
pCpy->SetWhich( nEdtWhich );
- pSdrPool->SetPoolDefaultItem( *pCpy );
+ pSdrPool->SetUserDefaultItem( *pCpy );
}
}
}
@@ -679,7 +679,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
/// Get the default attribute in this document
const SfxPoolItem& SwDoc::GetDefault( sal_uInt16 nFormatHint ) const
{
- return GetAttrPool().GetDefaultItem( nFormatHint );
+ return GetAttrPool().GetUserOrPoolDefaultItem( nFormatHint );
}
/// Delete the formats
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index fd2efff24893..f6994fb76c6b 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1669,7 +1669,7 @@ SvxFrameDirection SwDoc::GetTextDirection( const SwPosition& rPos,
}
}
if( !pItem )
- pItem = &GetAttrPool().GetDefaultItem( RES_FRAMEDIR );
+ pItem = &GetAttrPool().GetUserOrPoolDefaultItem( RES_FRAMEDIR );
nRet = pItem->GetValue();
}
return nRet;
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 729213bd67d1..7a854008a923 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -869,8 +869,8 @@ void SwDoc::ReplaceDefaults(const SwDoc& rSource)
nWhich <= rPair.second; ++nWhich)
{
const SfxPoolItem& rSourceAttr =
- rSource.mpAttrPool->GetDefaultItem(nWhich);
- if (rSourceAttr != mpAttrPool->GetDefaultItem(nWhich))
+ rSource.mpAttrPool->GetUserOrPoolDefaultItem(nWhich);
+ if (rSourceAttr != mpAttrPool->GetUserOrPoolDefaultItem(nWhich))
aNewDefaults.Put(rSourceAttr);
}
}
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 97b4e4cce938..6e6f2a5fd11c 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -286,7 +286,7 @@ sal_uInt16 GetPoolParent( sal_uInt16 nId )
void SwDoc::RemoveAllFormatLanguageDependencies()
{
/* Restore the language independent pool defaults and styles. */
- GetAttrPool().ResetPoolDefaultItem( RES_PARATR_ADJUST );
+ GetAttrPool().ResetUserDefaultItem( RES_PARATR_ADJUST );
SwTextFormatColl * pTextFormatColl = getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD );
@@ -305,7 +305,7 @@ void SwDoc::RemoveAllFormatLanguageDependencies()
}
//#i16874# AutoKerning as default for new documents
- GetAttrPool().ResetPoolDefaultItem( RES_CHRATR_AUTOKERN );
+ GetAttrPool().ResetUserDefaultItem( RES_CHRATR_AUTOKERN );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 4d53c76344f3..ec1ddd7ee07b 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -63,7 +63,7 @@ SwDrawModel::SwDrawModel(SwDoc& rDoc)
*pRangeArr; pRangeArr += 2 )
for( sal_uInt16 nW = *pRangeArr, nEnd = *(pRangeArr+1);
nW < nEnd; ++nW )
- if( nullptr != (pItem = rDocPool.GetPoolDefaultItem( nW )) &&
+ if( nullptr != (pItem = rDocPool.GetUserDefaultItem( nW )) &&
0 != (nSlotId = rDocPool.GetSlotId( nW ) ) &&
nSlotId != nW &&
0 != (nEdtWhich = pSdrPool->GetWhich( nSlotId )) &&
@@ -71,7 +71,7 @@ SwDrawModel::SwDrawModel(SwDoc& rDoc)
{
std::unique_ptr<SfxPoolItem> pCpy(pItem->Clone());
pCpy->SetWhich( nEdtWhich );
- pSdrPool->SetPoolDefaultItem( *pCpy );
+ pSdrPool->SetUserDefaultItem( *pCpy );
}
}
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 8ff0026d03c3..c1137b499471 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -379,7 +379,7 @@ std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> SwEditShell
if( !pItem && !pTextNd->HasSwAttrSet() )
{
pNewPaM = new SwPaM(*pNd, nStt, *pNd, nEnd);
- pItem = pAutoSet->GetPool()->GetPoolDefaultItem( nWhich );
+ pItem = pAutoSet->GetPool()->GetUserDefaultItem( nWhich );
vItem.emplace_back( pItem, std::unique_ptr<SwPaM>(pNewPaM) );
}
}
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index d7f7a2cab99e..94fcdf453cfa 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1538,7 +1538,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
else
{
const SvxTabStopItem& rTab =
- pSet->GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
+ pSet->GetPool()->GetUserOrPoolDefaultItem( RES_PARATR_TABSTOP );
const SwTwips nDefTabDist = rTab[0].GetTabPos();
nRightTab = nLeftTab - nTextLeft;
nRightTab /= nDefTabDist;
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index e7141aaec538..e19dd8efe9b4 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -184,7 +184,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto
if( USHRT_MAX == nDefTabDist )
{
const SvxTabStopItem& rTab =
- m_pFrame->GetAttrSet()->GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
+ m_pFrame->GetAttrSet()->GetPool()->GetUserOrPoolDefaultItem( RES_PARATR_TABSTOP );
if( rTab.Count() )
nDefTabDist = o3tl::narrowing<sal_uInt16>(rTab[0].GetTabPos());
else
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index a74808141dc3..f129eff219eb 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -191,7 +191,7 @@ void SAL_CALL SwXTextDefaults::setPropertyToDefault( const OUString& rPropertyNa
if ( pMap->nFlags & PropertyAttribute::READONLY)
throw RuntimeException( "setPropertyToDefault: property is read-only: " + rPropertyName, getXWeak() );
SfxItemPool& rSet (m_pDoc->GetAttrPool());
- rSet.ResetPoolDefaultItem ( pMap->nWID );
+ rSet.ResetUserDefaultItem ( pMap->nWID );
}
Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName )
@@ -203,7 +203,7 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName
throw UnknownPropertyException( "Unknown property: " + rPropertyName, getXWeak() );
Any aRet;
SfxItemPool& rSet (m_pDoc->GetAttrPool());
- SfxPoolItem const*const pItem = rSet.GetPoolDefaultItem(pMap->nWID);
+ SfxPoolItem const*const pItem = rSet.GetUserDefaultItem(pMap->nWID);
if (pItem)
{
pItem->QueryValue( aRet, pMap->nMemberId );
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 9104b5b2f62c..f753ba768284 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1996,7 +1996,7 @@ uno::Any SwXShape::getPropertyDefault( const OUString& rPropertyName )
throw uno::RuntimeException();
const SfxPoolItem& rDefItem =
- pFormat->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
+ pFormat->GetDoc()->GetAttrPool().GetUserOrPoolDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 3ac7bb77aceb..e2b8930fa889 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2629,7 +2629,7 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
if ( pEntry->nWID < RES_FRMATR_END )
{
const SfxPoolItem& rDefItem =
- pFormat->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
+ pFormat->GetDoc()->GetAttrPool().GetUserOrPoolDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index a0a8668bff59..225b78424e6d 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2198,7 +2198,7 @@ uno::Any SwUnoCursorHelper::GetPropertyDefault(
{
SwDoc& rDoc = rPaM.GetDoc();
const SfxPoolItem& rDefItem =
- rDoc.GetAttrPool().GetDefaultItem(pEntry->nWID);
+ rDoc.GetAttrPool().GetUserOrPoolDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
return aRet;
@@ -2647,7 +2647,7 @@ SwXTextCursor::getPropertyDefaults(
if (pEntry->nWID < RES_FRMATR_END)
{
const SfxPoolItem& rDefItem =
- rDoc.GetAttrPool().GetDefaultItem(pEntry->nWID);
+ rDoc.GetAttrPool().GetUserOrPoolDefaultItem(pEntry->nWID);
rDefItem.QueryValue(pAny[i], pEntry->nMemberId);
}
}
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 3a227f5be1d1..d230dc84b997 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -1213,7 +1213,7 @@ SwXParagraph::getPropertyDefault(const OUString& rPropertyName)
if(bBelowFrameAtrEnd || bDrawingLayerRange)
{
- const SfxPoolItem& rDefItem = rTextNode.GetDoc().GetAttrPool().GetDefaultItem(pEntry->nWID);
+ const SfxPoolItem& rDefItem = rTextNode.GetDoc().GetAttrPool().GetUserOrPoolDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 4439862002d3..2f5ca7c142cf 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -1613,7 +1613,7 @@ SwXTextSection::getPropertyDefault(const OUString& rPropertyName)
{
SwDoc *const pDoc = pFormat->GetDoc();
const SfxPoolItem& rDefItem =
- pDoc->GetAttrPool().GetDefaultItem(pEntry->nWID);
+ pDoc->GetAttrPool().GetUserOrPoolDefaultItem(pEntry->nWID);
rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
}
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index d41dccb0d07d..0b9a9fce9294 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -154,7 +154,7 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, bool bIsValueSearch)
auto funcClone = [&rSet](sal_uInt16 nWID, std::unique_ptr<SfxPoolItem> & rpPoolItem)
{
if(!rpPoolItem)
- rpPoolItem.reset(rSet.GetPool()->GetDefaultItem(nWID).Clone());
+ rpPoolItem.reset(rSet.GetPool()->GetUserOrPoolDefaultItem(nWID).Clone());
return rpPoolItem.get();
};
for(auto const & rPair : maValues)
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index a68424c221a3..643707f437df 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2399,7 +2399,7 @@ uno::Any SwXStyle::GetPropertyValue_Impl(const SfxItemPropertySet* pPropSet, SwS
else
pFormat = m_pDoc->GetDfltFrameFormat();
const SwAttrPool* pPool = pFormat->GetAttrSet().GetPool();
- const SfxPoolItem& rItem = pPool->GetDefaultItem(pEntry->nWID);
+ const SfxPoolItem& rItem = pPool->GetUserOrPoolDefaultItem(pEntry->nWID);
rItem.QueryValue(aValue, pEntry->nMemberId);
}
break;
@@ -2777,7 +2777,7 @@ uno::Sequence<uno::Any> SAL_CALL SwXStyle::getPropertyDefaults(const uno::Sequen
}
else if(pEntry->nWID != rSet.GetPool()->GetSlotId(pEntry->nWID))
{
- const SfxPoolItem& rItem = rSet.GetPool()->GetDefaultItem(pEntry->nWID);
+ const SfxPoolItem& rItem = rSet.GetPool()->GetUserOrPoolDefaultItem(pEntry->nWID);
rItem.QueryValue(pRet[i], pEntry->nMemberId);
}
}
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index c26e5b9aff20..5975cf498b9b 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -318,9 +318,9 @@ void SwViewShell::FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt)
const SfxItemPool& rPool = GetAttrPool();
for( sal_uInt16 nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
{
- const SfxPoolItem* pCpyItem = rPool.GetPoolDefaultItem( nWh );
+ const SfxPoolItem* pCpyItem = rPool.GetUserDefaultItem( nWh );
if( nullptr != pCpyItem )
- rPrtDoc.GetAttrPool().SetPoolDefaultItem( *pCpyItem );
+ rPrtDoc.GetAttrPool().SetUserDefaultItem( *pCpyItem );
}
// JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 30ba8d3c0a75..a07b0c9ce8d9 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1055,7 +1055,7 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
{
// the Attribute exists only in the reference; the default
// might have to be exported
- rItemSet.Put( rItemSet.GetPool()->GetDefaultItem(nWhich) );
+ rItemSet.Put( rItemSet.GetPool()->GetUserOrPoolDefaultItem(nWhich) );
}
}
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index cf37c1948b90..7036b99b3aa6 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -100,7 +100,7 @@ void SwHTMLWriter::GetEEAttrsFromDrwObj( SfxItemSet& rItemSet,
{
// if the item isn't set we maybe take the default item
if( !bSet )
- pEEItem = &rObjItemSet.GetPool()->GetDefaultItem(nEEWhich);
+ pEEItem = &rObjItemSet.GetPool()->GetUserOrPoolDefaultItem(nEEWhich);
// now we clone the item with the which id of the writer
rItemSet.Put( pEEItem->CloneSetWhich(nSwWhich) );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index bd5015bb820e..093cef850614 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1032,7 +1032,7 @@ static void OutBodyColor( const char* pTag, const SwFormat *pFormat,
else if( pRefItem )
{
// The item was still set in the HTML template so we output the default
- pColorItem = &rItemSet.GetPool()->GetDefaultItem( RES_CHRATR_COLOR );
+ pColorItem = &rItemSet.GetPool()->GetUserOrPoolDefaultItem( RES_CHRATR_COLOR );
}
if( pColorItem )
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 043baa06782b..a90482bfb31a 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -362,10 +362,10 @@ void Writer::PutEditEngFontsInAttrPool()
void Writer::AddFontItems_( SfxItemPool& rPool, sal_uInt16 nW )
{
- const SvxFontItem* pFont = static_cast<const SvxFontItem*>(&rPool.GetDefaultItem( nW ));
+ const SvxFontItem* pFont = static_cast<const SvxFontItem*>(&rPool.GetUserOrPoolDefaultItem( nW ));
AddFontItem( rPool, *pFont );
- pFont = static_cast<const SvxFontItem*>(rPool.GetPoolDefaultItem( nW ));
+ pFont = static_cast<const SvxFontItem*>(rPool.GetUserDefaultItem( nW ));
if( nullptr != pFont )
AddFontItem( rPool, *pFont );
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index e566aab4ec0a..cda66d3379cb 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -89,7 +89,7 @@ SwHTMLWriter& Out_SfxItemSet( const SwAttrFnTab pTab, SwHTMLWriter& rWrt,
while( nWhich )
{
if( SfxItemState::SET == aIter.GetItemState( bDeep, &pItem ) &&
- ( *pItem != rPool.GetDefaultItem( nWhich )
+ ( *pItem != rPool.GetUserOrPoolDefaultItem( nWhich )
|| ( pSet->GetParent() &&
*pItem != pSet->GetParent()->Get( nWhich ))
))
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 0819c70caa48..135a84da36a5 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -739,7 +739,7 @@ ErrCode RtfExport::ExportDocument_Impl()
.WriteOString(OOO_STRING_SVTOOLS_RTF_ANSI);
Strm().WriteOString(OOO_STRING_SVTOOLS_RTF_DEFF);
Strm().WriteNumberAsString(
- m_aFontHelper.GetId(m_rDoc.GetAttrPool().GetDefaultItem(RES_CHRATR_FONT)));
+ m_aFontHelper.GetId(m_rDoc.GetAttrPool().GetUserOrPoolDefaultItem(RES_CHRATR_FONT)));
// If this not exist, MS don't understand our ansi characters (0x80-0xff).
Strm().WriteOString("\\adeflang1025");
@@ -1258,7 +1258,7 @@ void RtfExport::OutColorTable()
{
auto pCol = GetDfltAttr(RES_CHRATR_COLOR);
InsColor(pCol->GetValue());
- pCol = rPool.GetPoolDefaultItem(RES_CHRATR_COLOR);
+ pCol = rPool.GetUserDefaultItem(RES_CHRATR_COLOR);
if (pCol)
InsColor(pCol->GetValue());
rPool.GetItemSurrogates(aSurrogates, RES_CHRATR_COLOR);
@@ -1297,7 +1297,7 @@ void RtfExport::OutColorTable()
{
auto pBackground = static_cast<const SvxBrushItem*>(GetDfltAttr(*pIds));
InsColor(pBackground->GetColor());
- pBackground = static_cast<const SvxBrushItem*>(rPool.GetPoolDefaultItem(*pIds));
+ pBackground = static_cast<const SvxBrushItem*>(rPool.GetUserDefaultItem(*pIds));
if (pBackground)
{
InsColor(pBackground->GetColor());
@@ -1317,7 +1317,7 @@ void RtfExport::OutColorTable()
{
auto pShadow = GetDfltAttr(RES_SHADOW);
InsColor(pShadow->GetColor());
- pShadow = rPool.GetPoolDefaultItem(RES_SHADOW);
+ pShadow = rPool.GetUserDefaultItem(RES_SHADOW);
if (nullptr != pShadow)
{
InsColor(pShadow->GetColor());
@@ -1335,7 +1335,7 @@ void RtfExport::OutColorTable()
// frame border color
{
- const SvxBoxItem* pBox = rPool.GetPoolDefaultItem(RES_BOX);
+ const SvxBoxItem* pBox = rPool.GetUserDefaultItem(RES_BOX);
if (nullptr != pBox)
InsColorLine(*pBox);
rPool.GetItemSurrogates(aSurrogates, RES_BOX);
@@ -1348,7 +1348,7 @@ void RtfExport::OutColorTable()
}
{
- const SvxBoxItem* pCharBox = rPool.GetPoolDefaultItem(RES_CHRATR_BOX);
+ const SvxBoxItem* pCharBox = rPool.GetUserDefaultItem(RES_CHRATR_BOX);
if (pCharBox)
InsColorLine(*pCharBox);
rPool.GetItemSurrogates(aSurrogates, RES_CHRATR_BOX);
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 65dbf5b5beb3..ff3b4e5c049f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1777,7 +1777,7 @@ const SvxBrushItem* WW8Export::GetCurrentPageBgBrush() const
if (!pRet ||
(!pRet->GetGraphic() && pRet->GetColor() == COL_TRANSPARENT))
{
- pRet = &m_rDoc.GetAttrPool().GetDefaultItem(RES_BACKGROUND);
+ pRet = &m_rDoc.GetAttrPool().GetUserOrPoolDefaultItem(RES_BACKGROUND);
}
return pRet;
}
@@ -3783,11 +3783,11 @@ WW8Ruby::WW8Ruby(const SwTextNode& rNode, const SwFormatRuby& rRuby, const MSWor
const SvxFontItem& rFont
- = pPool->GetDefaultItem( GetWhichOfScript(RES_CHRATR_FONT, nRubyScript) );
+ = pPool->GetUserOrPoolDefaultItem( GetWhichOfScript(RES_CHRATR_FONT, nRubyScript) );
m_sFontFamily = rFont.GetFamilyName();
const SvxFontHeightItem& rHeight =
- pPool->GetDefaultItem( GetWhichOfScript(RES_CHRATR_FONTSIZE, nRubyScript));
+ pPool->GetUserOrPoolDefaultItem( GetWhichOfScript(RES_CHRATR_FONTSIZE, nRubyScript));
m_nRubyHeight = rHeight.GetHeight();
}
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 3c8b29aa1a37..42a12b7567bd 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -552,7 +552,7 @@ void MSWordStyles::SetStyleDefaults( const SwFormat& rFormat, bool bPap )
// dynamic defaults
const SfxItemPool& rPool = *rFormat.GetAttrSet().GetPool();
for( n = nStt; n < nEnd; ++n )
- aFlags[ n - RES_CHRATR_BEGIN ] = nullptr != rPool.GetPoolDefaultItem( n )
+ aFlags[ n - RES_CHRATR_BEGIN ] = nullptr != rPool.GetUserDefaultItem( n )
|| SfxItemState::SET == m_rExport.m_rDoc.GetDfltTextFormatColl()->GetItemState( n, false );
// static defaults, that differs between WinWord and SO
@@ -925,7 +925,7 @@ void wwFontHelper::InitFontTable(const SwDoc& rDoc)
pFont->GetFamily(), pFont->GetCharSet()));
const SfxItemPool& rPool = rDoc.GetAttrPool();
- pFont = rPool.GetPoolDefaultItem(RES_CHRATR_FONT);
+ pFont = rPool.GetUserDefaultItem(RES_CHRATR_FONT);
if (nullptr != pFont)
{
GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(),
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 971f4baec4f3..104b2539329e 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -463,7 +463,7 @@ static void WriteDop( WW8Export& rWrt )
// write default TabStop
const SvxTabStopItem& rTabStop =
- rWrt.m_rDoc.GetAttrPool().GetDefaultItem(RES_PARATR_TABSTOP);
+ rWrt.m_rDoc.GetAttrPool().GetUserOrPoolDefaultItem(RES_PARATR_TABSTOP);
rDop.dxaTab = o3tl::narrowing<sal_uInt16>(rTabStop[0].GetTabPos());
// Zoom factor and type
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 50d2471dc93f..fa6531caed92 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5904,7 +5904,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, bool bTest
( !bTestForDefault ||
nWhich == RES_UL_SPACE ||
nWhich == RES_LR_SPACE ||
- *pItem != rPool.GetDefaultItem( nWhich ) ||
+ *pItem != rPool.GetUserOrPoolDefaultItem( nWhich ) ||
( pSet->GetParent() && *pItem != pSet->GetParent()->Get( nWhich ) ) ) )
{
OutputItem( *pItem );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index cd68bfa8dde0..97c0a808813b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1486,7 +1486,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFormatAttr(const SwPosition& rPos,
{
SwContentNode const*const pNd = rPos.GetNode().GetContentNode();
if (!pNd)
- pItem = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich);
+ pItem = &m_rDoc.GetAttrPool().GetUserOrPoolDefaultItem(nWhich);
else
{
/*
@@ -1814,7 +1814,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
SvxTabStopItem aOrig = pSty ?
pSty->GetFormatAttr(RES_PARATR_TABSTOP) :
- m_rDoc.GetAttrPool().GetDefaultItem(RES_PARATR_TABSTOP);
+ m_rDoc.GetAttrPool().GetUserOrPoolDefaultItem(RES_PARATR_TABSTOP);
NewAttr(aOrig);
}
}
@@ -1876,7 +1876,7 @@ void SwWW8ImplReader::ImportDop()
SvxTabStopItem aNewTab( 1, sal_uInt16(nDefTabSiz), SvxTabAdjust::Default, RES_PARATR_TABSTOP );
const_cast<SvxTabStop&>(aNewTab[0]).GetAdjustment() = SvxTabAdjust::Default;
- m_rDoc.GetAttrPool().SetPoolDefaultItem( aNewTab );
+ m_rDoc.GetAttrPool().SetUserDefaultItem( aNewTab );
// Import zoom factor
if (m_xWDop->wScaleSaved)
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 13270b28c144..a82dffcc9d5d 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2896,7 +2896,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFormatAttr( sal_uInt16 nWhich )
if (!pRet)
pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : nullptr;
if (!pRet)
- pRet = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich);
+ pRet = &m_rDoc.GetAttrPool().GetUserOrPoolDefaultItem(nWhich);
}
else if (m_xPlcxMan && m_xPlcxMan->GetDoingDrawTextBox())
{
@@ -2912,7 +2912,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFormatAttr( sal_uInt16 nWhich )
if (!pRet)
pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : nullptr;
if (!pRet)
- pRet = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich);
+ pRet = &m_rDoc.GetAttrPool().GetUserOrPoolDefaultItem(nWhich);
}
else
pRet = m_xCtrlStck->GetFormatAttr(*m_pPaM->GetPoint(), nWhich);
@@ -4401,7 +4401,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
pLeftMargin->SetTextLeft(pNumFormat->GetIndentAt());
// If have not explicit left, set number format list tab position is doc default tab
- const SvxTabStopItem *pDefaultStopItem = m_rDoc.GetAttrPool().GetPoolDefaultItem(RES_PARATR_TABSTOP);
+ const SvxTabStopItem *pDefaultStopItem = m_rDoc.GetAttrPool().GetUserDefaultItem(RES_PARATR_TABSTOP);
if ( pDefaultStopItem && pDefaultStopItem->Count() > 0 )
const_cast<SwNumFormat*>(pNumFormat)->SetListtabPos( const_cast<SvxTabStop&>((*pDefaultStopItem)[0]).GetTabPos() );
}
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index 5aefd4b751e4..740bab6af288 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -68,7 +68,7 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(SwXMLExport& _rExport,
for(sal_uInt16 nWhichId : aWhichIds)
{
const SvxFontItem& rFont =
- static_cast<const SvxFontItem&>(rPool.GetDefaultItem( nWhichId ));
+ static_cast<const SvxFontItem&>(rPool.GetUserOrPoolDefaultItem( nWhichId ));
aFonts.push_back(&rFont);
ItemSurrogates aSurrogates;
rPool.GetItemSurrogates(aSurrogates, nWhichId);
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index ec10f5c75629..141491db92de 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -112,7 +112,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
// if it's not set, try the pool
if (SfxItemState::SET != eState && SfxItemPool::IsWhich(pEntry->nWhichId))
- pItem = &rSet.GetPool()->GetDefaultItem(pEntry->nWhichId);
+ pItem = &rSet.GetPool()->GetUserOrPoolDefaultItem(pEntry->nWhichId);
// do we have an item?
if(eState >= SfxItemState::DEFAULT && pItem)
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index 55ddfd8fb53f..e4655143b4ea 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -201,7 +201,7 @@ void SwXMLImportTableItemMapper_Impl::finished(
// if not set, try the pool
if ((SfxItemState::SET != eState) && SfxItemPool::IsWhich(Ids[i][0]))
{
- pItem = &rSet.GetPool()->GetDefaultItem(Ids[i][0]);
+ pItem = &rSet.GetPool()->GetUserOrPoolDefaultItem(Ids[i][0]);
}
// do we have an item?
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index ebf99363cd56..87d824942a04 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -206,7 +206,7 @@ void SwEnvFormatPage::Edit(std::u16string_view rIdent, bool bSender)
// Insert tabs, default tabs into ItemSet
const SvxTabStopItem& rDefTabs =
- pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
+ pSh->GetView().GetCurShell()->GetPool().GetUserOrPoolDefaultItem(RES_PARATR_TABSTOP);
const sal_uInt16 nDefDist = o3tl::narrowing<sal_uInt16>(::GetTabDist( rDefTabs ));
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index cb96c08527c6..15a225e1997c 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -703,7 +703,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotTempStream>& xStream,
// for the changed pool defaults from drawing layer pool set those
// attributes as hard attributes to preserve them for saving
const SfxItemPool& rItemPool = pModel->GetItemPool();
- const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT);
+ const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetUserOrPoolDefaultItem(EE_CHAR_FONTHEIGHT);
// SW should have no MasterPages
OSL_ENSURE(0 == pModel->GetMasterPageCount(), "SW with MasterPages (!)");
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index db4c612433ee..f5325f9a68e6 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -377,7 +377,7 @@ namespace SwLangHelper
else if (nState == SfxItemState::DEFAULT)
{
// since the attribute is not set: retrieve the default value
- nLang = aSet.GetPool()->GetDefaultItem( nLangWhichId ).GetLanguage();
+ nLang = aSet.GetPool()->GetUserOrPoolDefaultItem( nLangWhichId ).GetLanguage();
}
else if (nState == SfxItemState::DONTCARE)
{
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 1c66f7a5f00f..1716e6183180 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1530,7 +1530,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// Tabulators: Put DefaultTabs into ItemSet
const SvxTabStopItem& rDefTabs =
- GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
+ GetPool().GetUserOrPoolDefaultItem(RES_PARATR_TABSTOP);
const sal_uInt16 nDefDist = o3tl::narrowing<sal_uInt16>(::GetTabDist( rDefTabs ));
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 68f4197f5437..d53f498e1e2c 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -552,7 +552,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, false, &pItem);
if( SfxItemState::DEFAULT == eState )
- pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST);
+ pItem = &rPool.GetUserOrPoolDefaultItem(RES_PARATR_ADJUST);
if( SfxItemState::DEFAULT <= eState )
{
eAdjust = static_cast<const SvxAdjustItem* >( pItem)->GetAdjust();
@@ -562,14 +562,14 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
short nEsc = 0;
eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, false, &pItem);
if( SfxItemState::DEFAULT == eState )
- pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT);
+ pItem = &rPool.GetUserOrPoolDefaultItem(RES_CHRATR_ESCAPEMENT);
if( eState >= SfxItemState::DEFAULT )
nEsc = static_cast<const SvxEscapementItem* >(pItem)->GetEsc();
sal_uInt16 nLineSpace = 0;
eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, false, &pItem);
if( SfxItemState::DEFAULT == eState )
- pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING);
+ pItem = &rPool.GetUserOrPoolDefaultItem(RES_PARATR_LINESPACING);
if( SfxItemState::DEFAULT <= eState &&
static_cast<const SvxLineSpacingItem* >(pItem)->GetLineSpaceRule() == SvxLineSpaceRule::Auto )
{
@@ -583,7 +583,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
SvxCaseMap eCaseMap = SvxCaseMap::NotMapped;
eState = aCoreSet.GetItemState(RES_CHRATR_CASEMAP, false, &pItem);
if (eState == SfxItemState::DEFAULT)
- pItem = &rPool.GetDefaultItem(RES_CHRATR_CASEMAP);
+ pItem = &rPool.GetUserOrPoolDefaultItem(RES_CHRATR_CASEMAP);
if (eState >= SfxItemState::DEFAULT)
eCaseMap = static_cast<const SvxCaseMapItem*>(pItem)->GetCaseMap();
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 2756fa246af0..d1e9d36b0c86 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -123,7 +123,7 @@ void Scheduler::ImplDeInitScheduler()
SAL_INFO( "vcl.schedule.deinit",
"DeInit the scheduler - pending tasks: " << nTasks );
- // clean up all the sfx::SfxItemDisruptor_Impl Idles
+ // clean up all Idles
Unlock();
ProcessEventsToIdle();
Lock();