summaryrefslogtreecommitdiff
path: root/sd/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 /sd/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 'sd/source')
-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
11 files changed, 20 insertions, 20 deletions
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));