summaryrefslogtreecommitdiff
path: root/sw/source
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 /sw/source
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>
Diffstat (limited to 'sw/source')
-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
45 files changed, 84 insertions, 84 deletions
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();