summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/editeng/editdoc.cxx2
-rw-r--r--include/svl/style.hxx2
-rw-r--r--sc/source/core/data/stlsheet.cxx10
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx2
-rw-r--r--sd/source/core/stlfamily.cxx2
-rw-r--r--sd/source/core/stlsheet.cxx16
-rw-r--r--sd/source/filter/xml/sdtransform.cxx4
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx8
-rw-r--r--svx/source/svdraw/svdxcgv.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx4
11 files changed, 28 insertions, 26 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index fd22c598f1b9..97656d378576 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2278,7 +2278,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, bool bKeepEndingAttribs )
OUString aFollow( pStyle->GetFollow() );
if ( !aFollow.isEmpty() && ( aFollow != pStyle->GetName() ) )
{
- SfxStyleSheetBase* pNext = pStyle->GetPool().Find( aFollow, pStyle->GetFamily() );
+ SfxStyleSheetBase* pNext = pStyle->GetPool()->Find( aFollow, pStyle->GetFamily() );
pNode->SetStyleSheet( static_cast<SfxStyleSheet*>(pNext) );
}
}
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index b30ddfe82ab1..40e673463386 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -139,7 +139,7 @@ public:
virtual bool IsUsed() const; // Default true
virtual OUString GetDescription( MapUnit eMetric );
- SfxStyleSheetBasePool& GetPool() { return *m_pPool; }
+ SfxStyleSheetBasePool* GetPool() { return m_pPool; }
SfxStyleFamily GetFamily() const { return nFamily; }
sal_uInt16 GetMask() const { return nMask; }
void SetMask( sal_uInt16 mask) { nMask = mask; }
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 596a703b5c5f..f57939773372 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -113,7 +113,7 @@ bool ScStyleSheet::SetParent( const OUString& rParentName )
// #i113491# Drag&Drop in the stylist's hierarchical view doesn't execute a slot,
// so the repaint has to come from here (after modifying the ItemSet).
// RepaintRange checks the document's IsVisible flag and locked repaints.
- ScDocument* pDoc = static_cast<ScStyleSheetPool&>(GetPool()).GetDocument();
+ ScDocument* pDoc = static_cast<ScStyleSheetPool*>(GetPool())->GetDocument();
if (pDoc)
pDoc->RepaintRange( ScRange( 0,0,0, MAXCOL,MAXROW,MAXTAB ) );
}
@@ -139,7 +139,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
// therefore suitable values are set at this point.
// (== Standard page template)
- SfxItemPool& rItemPool = GetPool().GetPool();
+ SfxItemPool& rItemPool = GetPool()->GetPool();
pSet = new SfxItemSet(
rItemPool,
svl::Items<
@@ -154,7 +154,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
// GetPrinter would then also create a new printer,
// because the stored Printer is not loaded yet!
- ScDocument* pDoc = static_cast<ScStyleSheetPool&>(GetPool()).GetDocument();
+ ScDocument* pDoc = static_cast<ScStyleSheetPool*>(GetPool())->GetDocument();
if ( pDoc )
{
// Setting reasonable default values:
@@ -224,7 +224,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
case SfxStyleFamily::Para:
default:
- pSet = new SfxItemSet( GetPool().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
+ pSet = new SfxItemSet( GetPool()->GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
break;
}
bMySet = true;
@@ -237,7 +237,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
// ~ScStyleSheetPool -> ~SfxStyleSheetPool, GetPool() is no longer
// an ScStyleSheetPool:
ScStyleSheetPool * pool = dynamic_cast<ScStyleSheetPool *>(
- &GetPool());
+ GetPool());
if (pool != nullptr) {
ScDocument* pDoc = pool->GetDocument();
if ( pDoc )
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 1aa7ec0bd385..dff130e33925 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -101,7 +101,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP,
while (pStyle)
{
- const SfxItemPool& rPagePool(pStyle->GetPool().GetPool());
+ const SfxItemPool& rPagePool(pStyle->GetPool()->GetPool());
for (sal_uInt16 nPageWhichId : aPageWhichIds)
{
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 7c995c4cbe37..413699e3a533 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -122,7 +122,7 @@ SdStyleSheet* SdStyleFamily::GetValidNewSheet( const Any& rElement )
Reference< XStyle > xStyle( rElement, UNO_QUERY );
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( xStyle.get() );
- if( pStyle == nullptr || (pStyle->GetFamily() != mnFamily) || (&pStyle->GetPool() != mxPool.get()) || (mxPool->Find( pStyle->GetName(), mnFamily) != nullptr) )
+ if( pStyle == nullptr || (pStyle->GetFamily() != mnFamily) || (pStyle->GetPool() != mxPool.get()) || (mxPool->Find( pStyle->GetName(), mnFamily) != nullptr) )
throw IllegalArgumentException();
return pStyle;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 7b5ef91a07fc..012546b6b7e2 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -214,7 +214,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
if (!pSet)
{
pSet = new SfxItemSet(
- GetPool().GetPool(),
+ GetPool()->GetPool(),
svl::Items<
XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
@@ -234,7 +234,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
if (!pSet)
{
pSet = new SfxItemSet(
- GetPool().GetPool(),
+ GetPool()->GetPool(),
svl::Items<
XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
@@ -265,7 +265,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
if (!pSet)
{
pSet = new SfxItemSet(
- GetPool().GetPool(),
+ GetPool()->GetPool(),
svl::Items<
XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
@@ -974,7 +974,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
throw IllegalArgumentException();
}
- SfxItemSet aSet( GetPool().GetPool(), {{pEntry->nWID, pEntry->nWID}});
+ SfxItemSet aSet( GetPool()->GetPool(), {{pEntry->nWID, pEntry->nWID}});
aSet.Put( rStyleSet );
if( !aSet.Count() )
@@ -987,7 +987,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
}
else
{
- aSet.Put( GetPool().GetPool().GetDefaultItem( pEntry->nWID ) );
+ aSet.Put( GetPool()->GetPool().GetDefaultItem( pEntry->nWID ) );
}
}
@@ -1080,7 +1080,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
}
else
{
- SfxItemSet aSet( GetPool().GetPool(), {{pEntry->nWID, pEntry->nWID}});
+ SfxItemSet aSet( GetPool()->GetPool(), {{pEntry->nWID, pEntry->nWID}});
const SfxPoolItem* pItem;
SfxItemSet& rStyleSet = GetItemSet();
@@ -1089,7 +1089,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
aSet.Put( *pItem );
if( !aSet.Count() )
- aSet.Put( GetPool().GetPool().GetDefaultItem( pEntry->nWID ) );
+ aSet.Put( GetPool()->GetPool().GetDefaultItem( pEntry->nWID ) );
if(SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pEntry, aAny ))
return aAny;
@@ -1267,7 +1267,7 @@ Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName )
}
else
{
- SfxItemPool& rMyPool = GetPool().GetPool();
+ SfxItemPool& rMyPool = GetPool()->GetPool();
SfxItemSet aSet( rMyPool, {{pEntry->nWID, pEntry->nWID}});
aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
aRet = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx
index e7d1ca8cc7a1..f496e353be0e 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -146,7 +146,7 @@ void SdTransformOOo2xDocument::transformStyle( SfxStyleSheetBase& rSheet )
SfxItemSet& rSet = rSheet.GetItemSet();
bool bState = false;
- getBulletState( rSheet.GetItemSet(), rSheet.GetPool().Find( rSheet.GetParent(), rSheet.GetFamily() ), bState );
+ getBulletState( rSheet.GetItemSet(), rSheet.GetPool()->Find( rSheet.GetParent(), rSheet.GetFamily() ), bState );
transformItemSet( rSet, bState );
removeAlienAttributes( rSet );
@@ -266,7 +266,7 @@ bool SdTransformOOo2xDocument::getBulletState( const SfxItemSet& rSet, SfxStyleS
if( getBulletState( rSet, SDRATTR_XMLATTRIBUTES, rState ) )
return true;
- if( pSheet && getBulletState( pSheet->GetItemSet(), pSheet->GetPool().Find( pSheet->GetParent(), pSheet->GetFamily() ), rState ) )
+ if( pSheet && getBulletState( pSheet->GetItemSet(), pSheet->GetPool()->Find( pSheet->GetParent(), pSheet->GetFamily() ), rState ) )
return true;
return false;
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index d14b7ffd6b2f..a30b818fd706 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -115,7 +115,7 @@ namespace sdr
if(HasSfxItemSet())
{
// register as listener
- StartListening(pNewStyleSheet->GetPool());
+ StartListening(*pNewStyleSheet->GetPool());
StartListening(*pNewStyleSheet);
// only apply the following when we have an SfxItemSet already, else
@@ -133,7 +133,9 @@ namespace sdr
if(GetStyleSheet() && dynamic_cast<const SfxStyleSheet *>(mpStyleSheet) != nullptr)
{
EndListening(*mpStyleSheet);
- EndListening(mpStyleSheet->GetPool());
+ if (auto const pool = mpStyleSheet->GetPool()) { // TTTT
+ EndListening(*pool);
+ }
// reset parent of ItemSet
if(HasSfxItemSet())
@@ -391,7 +393,7 @@ namespace sdr
// prepare forgetting the current stylesheet like in RemoveStyleSheet()
EndListening(*mpStyleSheet);
- EndListening(mpStyleSheet->GetPool());
+ EndListening(*mpStyleSheet->GetPool());
// prepare the iter; use the mpObjectItemSet which may have less
// WhichIDs than the style.
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 58fc73351181..d6a807414286 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -220,7 +220,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, EETextFormat eFormat, const Point&
if(pCandidate)
{
- if(pObj->getSdrModelFromSdrObject().GetStyleSheetPool() == &pCandidate->GetPool())
+ if(pObj->getSdrModelFromSdrObject().GetStyleSheetPool() == pCandidate->GetPool())
{
pObj->NbcSetStyleSheet(pCandidate, true);
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index dcbdf4a79d76..b7f60b5dcc7f 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -947,7 +947,7 @@ void XStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement)
m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
SfxStyleSheetBase* pParentBase = m_pBasePool->Find(sParentStyleName);
if(pParentBase && pParentBase->GetFamily() == m_rEntry.m_eFamily &&
- &pParentBase->GetPool() == m_pBasePool)
+ pParentBase->GetPool() == m_pBasePool)
m_pBasePool->SetParent(m_rEntry.m_eFamily, sStyleName, sParentStyleName);
}
// after all, we still need to apply the properties of the descriptor
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index fc55b14ecfdb..f3e46b3f2ca0 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -464,7 +464,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
pBoxFormat(nullptr),
rDoc(rDocument),
aCoreSet(
- GetPool().GetPool(),
+ GetPool()->GetPool(),
svl::Items<
RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
RES_PARATR_BEGIN, RES_FRMATR_END - 1,
@@ -2651,7 +2651,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
SwStyleSheetIterator::~SwStyleSheetIterator()
{
- EndListening( mxIterSheet->GetPool() );
+ EndListening( *mxIterSheet->GetPool() );
}
sal_uInt16 SwStyleSheetIterator::Count()