summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-01-14 05:46:26 -0800
committerJoseph Powers <jpowers27@cox.net>2011-01-14 06:04:25 -0800
commitb2015dfa3600594460e3b7c4b510f1dbf011c131 (patch)
treea84802a237a928b9072f4c0f0d8d3c2d8ec91974 /sfx2/source/dialog
parent6bd4de8aa3b00b5880bae267ca2eca1685631d22 (diff)
Additional fix to Remove DECLARE_LIST(SfxStyleFilter, SfxFilterTupel*)
Thanks Lubos Lunak for pointing this out.
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/mgetempl.cxx6
-rw-r--r--sfx2/source/dialog/templdlg.cxx26
2 files changed, 14 insertions, 18 deletions
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index b76fddfad9..56bf5c6cce 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 bf68676b68..3783eedce9 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())
{