summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/tabpages/chardlg.cxx3
-rw-r--r--sfx2/inc/sfx2/bindings.hxx3
2 files changed, 5 insertions, 1 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 7048be1bf667..b7f0e7f701b4 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1359,7 +1359,7 @@ void SvxCharEffectsPage::Initialize()
m_pFontColorLB->SetUpdateMode( sal_False );
{
- SfxPoolItem* pDummy;
+ SfxPoolItem* pDummy = NULL;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh );
if ( !pFrame ||
SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) )
@@ -1368,6 +1368,7 @@ void SvxCharEffectsPage::Initialize()
m_pOverlineColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) );
m_pFontColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) );
}
+ delete pDummy;
}
for ( long i = 0; i < pColorTable->Count(); i++ )
{
diff --git a/sfx2/inc/sfx2/bindings.hxx b/sfx2/inc/sfx2/bindings.hxx
index a13497566aa0..73fce08a118e 100644
--- a/sfx2/inc/sfx2/bindings.hxx
+++ b/sfx2/inc/sfx2/bindings.hxx
@@ -151,6 +151,9 @@ public:
const SfxSlot* GetSlot( sal_uInt16 nMsgId );
SfxStateCache* GetStateCache( sal_uInt16 nId, sal_uInt16 *pPos = 0 );
SAL_DLLPRIVATE SfxStateCache* GetAnyStateCache_Impl( sal_uInt16 nId );
+ /**
+ * @param rpState the caller has to delete the pointer
+ */
SfxItemState QueryState( sal_uInt16 nSID, SfxPoolItem* &rpState );
const SfxPoolItem* ExecuteSynchron( sal_uInt16 nSlot,