summaryrefslogtreecommitdiff
path: root/svx/source/cui/numpages.cxx
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-12-10 17:46:18 +0100
committersb <sb@openoffice.org>2009-12-10 17:46:18 +0100
commitd9164f354a8951ad220d5ae937517228296d1922 (patch)
tree17bcc6282d3708c3331a59513fb40ccefeaaad4b /svx/source/cui/numpages.cxx
parentb069d0fabfa30848596bdc106380f75a725b686e (diff)
parent875ac20478f16e5107acb222c0b851b99d2e0f27 (diff)
sb111: merged in DEV300_m67
Diffstat (limited to 'svx/source/cui/numpages.cxx')
-rw-r--r--svx/source/cui/numpages.cxx111
1 files changed, 91 insertions, 20 deletions
diff --git a/svx/source/cui/numpages.cxx b/svx/source/cui/numpages.cxx
index 6454b3dd7c2a..92b5934baed7 100644
--- a/svx/source/cui/numpages.cxx
+++ b/svx/source/cui/numpages.cxx
@@ -378,12 +378,24 @@ int SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet )
{
- nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
-
- const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ const SfxPoolItem* pItem;
+// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
- pSaveNum = new SvxNumRule(*rItem.GetNumRule());
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
if(!pActNum)
pActNum = new SvxNumRule(*pSaveNum);
@@ -564,12 +576,24 @@ int SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet)
void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet )
{
- nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
- pSaveNum = new SvxNumRule(*rItem.GetNumRule());
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
@@ -789,12 +813,24 @@ int SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
void SvxNumPickTabPage::Reset( const SfxItemSet& rSet )
{
- nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
- pSaveNum = new SvxNumRule(*rItem.GetNumRule());
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
if(!pActNum)
@@ -1089,12 +1125,24 @@ BOOL SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet )
void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet )
{
- nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
- pSaveNum = new SvxNumRule(*rItem.GetNumRule());
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
if(!pActNum)
pActNum = new SvxNumRule(*pSaveNum);
@@ -1516,12 +1564,24 @@ BOOL SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
{
- nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
- pSaveNum = new SvxNumRule(*rItem.GetNumRule());
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
// Ebenen einfuegen
if(!aLevelLB.GetEntryCount())
@@ -1565,7 +1625,6 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
pPreviewWIN->SetNumRule(pActNum);
aSameLevelCB.Check(pActNum->IsContinuousNumbering());
- const SfxPoolItem* pItem = 0;
//ColorListBox bei Bedarf fuellen
if ( pActNum->IsFeatureSupported( NUM_BULLET_COLOR ) )
{
@@ -3409,12 +3468,24 @@ BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
{
- nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
- pSaveNum = new SvxNumRule(*rItem.GetNumRule());
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
// Ebenen einfuegen
if(!aLevelLB.GetEntryCount())