diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-01-14 05:46:26 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-01-14 06:04:25 -0800 |
commit | b17863d3e4995520edb63b0aa77843eefd775eee (patch) | |
tree | d8c7713b62a18aa7049fd42514a6a53e6f23cc60 | |
parent | 6aa4b5522518c7bb69cf29465842a8a14ea5a87a (diff) |
Additional fix to Remove DECLARE_LIST(SfxStyleFilter, SfxFilterTupel*)
Thanks Lubos Lunak for pointing this out.
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 26 |
2 files changed, 14 insertions, 18 deletions
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index a757b97214e7..8d52b9295e1c 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -437,11 +437,9 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) // geht nur bei Benutzervorlagen #if OSL_DEBUG_LEVEL > 1 USHORT nIdx = (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx ); - SfxFilterTupel* p; - p = pItem->GetFilterList().GetObject( nIdx ); + SfxFilterTupel* p = pItem->GetFilterList()[ nIdx ]; #endif - USHORT nMask = pItem->GetFilterList().at( - (size_t)aFilterLb.GetEntryData( nFilterIdx ) )->nFlags | SFXSTYLEBIT_USERDEF; + USHORT nMask = pItem->GetFilterList()[ (size_t)aFilterLb.GetEntryData( nFilterIdx ) ]->nFlags | SFXSTYLEBIT_USERDEF; pStyle->SetMask( nMask ); } if(aAutoCB.IsVisible() && diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 6621092fb5e8..bee817beb79d 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1252,7 +1252,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags const SfxStyleFamily eFam = pItem->GetFamily(); - SfxFilterTupel *pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList().at(nActFilter) : NULL ); + SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : NULL ); USHORT nFilter = pT ? pT->nFlags : 0; if(!nFilter) // automatisch nFilter = nAppFilter; @@ -1283,8 +1283,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags { nActFilter = 0; aFilterLb.SelectEntryPos(1); - SfxFilterTupel *pActT = rFilter[ nActFilter ]; - USHORT nFilterFlags = pActT ? rFilter[ nActFilter ]->nFlags : 0; + SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : NULL; + USHORT nFilterFlags = pActT ? pActT->nFlags : 0; pStyleSheetPool->SetSearchMask(eFam, nFilterFlags); } @@ -1511,9 +1511,9 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl(); #if OSL_DEBUG_LEVEL > 1 SfxFilterTupel *pT; - pT = pStyleItem->GetFilterList().GetObject(nActFilter); + pT = pStyleItem->GetFilterList()[ nActFilter ]; #endif - if(0 == pStyleItem->GetFilterList().at(nActFilter)->nFlags + if ( 0 == pStyleItem->GetFilterList()[ nActFilter ]->nFlags && nAppFilter != pItem->GetValue()) { nAppFilter = pItem->GetValue(); @@ -1737,8 +1737,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl( for ( size_t i = 0; i < nFilterCount; ++i ) { - const SfxFilterTupel *pTupel = - pFamilyItem->GetFilterList().at( i ); + const SfxFilterTupel *pTupel = pFamilyItem->GetFilterList()[ i ]; if ( ( pTupel->nFlags & nFilterFlags ) == nFilterFlags && pIdx ) *pIdx = i; @@ -1863,7 +1862,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) USHORT nFilter; if( pItem && nActFilter != 0xffff ) { - nFilter = pItem->GetFilterList().at( nActFilter )->nFlags; + nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags; if(!nFilter) // automatisch nFilter = nAppFilter; } @@ -1871,9 +1870,8 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) nFilter=pStyleSheetPool->GetSearchMask(); pStyleSheetPool->SetSearchMask( eFam, SFXSTYLEBIT_USERDEF ); - SfxNewStyleDlg *pDlg = + SfxNewStyleDlg *pDlg = new SfxNewStyleDlg(pWindow, *pStyleSheetPool); // why? : FloatingWindow must not be parent of a modal dialog - new SfxNewStyleDlg(pWindow, *pStyleSheetPool); if(RET_OK == pDlg->Execute()) { pStyleSheetPool->SetSearchMask(eFam, nFilter); @@ -1994,7 +1992,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *) USHORT nMask; if( pItem && nActFilter != 0xffff ) { - nMask = pItem->GetFilterList().at( nActFilter )->nFlags; + nMask = pItem->GetFilterList()[ nActFilter ]->nFlags; if(!nMask) // automatisch nMask = nAppFilter; } @@ -2097,12 +2095,12 @@ void SfxCommonTemplateDialog_Impl::EnableDelete() const SfxStyleFamily eFam = pItem->GetFamily(); USHORT nFilter = 0; if(pItem->GetFilterList().size() > nActFilter) - nFilter = pItem->GetFilterList().at( nActFilter )->nFlags; + nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags; if(!nFilter) // automatisch nFilter = nAppFilter; const SfxStyleSheetBase *pStyle = - pStyleSheetPool->Find(aTemplName,eFam, - pTreeBox? SFXSTYLEBIT_ALL: nFilter); + pStyleSheetPool->Find(aTemplName,eFam, pTreeBox? SFXSTYLEBIT_ALL: nFilter); + DBG_ASSERT(pStyle, "Style nicht gefunden"); if(pStyle && pStyle->IsUserDefined()) { |