summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-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
21 files changed, 63 insertions, 63 deletions
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! :-/" );