cui/source/tabpages/paragrph.cxx | 2 +- svl/source/items/itempool.cxx | 2 +- svl/source/items/poolio.cxx | 2 +- sw/source/uibase/utlui/uitool.cxx | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-)
New commits: commit c865da007a8d781801ef73612be27f129dd0989b Author: Michael Stahl <mst...@redhat.com> Date: Thu Nov 27 23:41:20 2014 +0100 svl: deploy some asserts in SfxItemPool, those are bugs Change-Id: Ifa28f3b02640720855a6e40ddd7a5f752904e8bd diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 8550543..2cfcb31 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -878,7 +878,7 @@ const SfxPoolItem& SfxItemPool::GetDefaultItem( sal_uInt16 nWhich ) const { if ( pImp->mpSecondary ) return pImp->mpSecondary->GetDefaultItem( nWhich ); - SFX_ASSERT( false, nWhich, "unknown which - dont ask me for defaults" ); + assert(!"unknown which - dont ask me for defaults"); } DBG_ASSERT( pImp->ppStaticDefaults, "no defaults known - dont ask me for defaults" ); diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index cf71978..4a026cf 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -695,7 +695,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream) sal_uInt16 SfxItemPool::GetIndex_Impl(sal_uInt16 nWhich) const { - DBG_ASSERT(nWhich >= pImp->mnStart && nWhich <= pImp->mnEnd, "WhichId not within the Pool range"); + assert(nWhich >= pImp->mnStart && nWhich <= pImp->mnEnd); return nWhich - pImp->mnStart; } commit 9c1a1b98776ca2216d82af303394a09f2bac0471 Author: Michael Stahl <mst...@redhat.com> Date: Thu Nov 27 23:38:38 2014 +0100 fdo#70861: cui: fix crash in SvxExtParagraphTabPage SvxExtParagraphTabPage::Reset() must not request a pool default for SID_ATTR_PARA_PAGENUM because it simply does not exist; the item is backed by a member of SwPageDesc in Writer. Change-Id: I9b157f048cd986566f9b01f3677b53d5974b6c8d diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index f5b2148..09a3894 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1552,7 +1552,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet ) _nWhich = GetWhich( SID_ATTR_PARA_PAGENUM ); - if ( rSet->GetItemState(_nWhich) >= SfxItemState::DEFAULT ) + if (rSet->GetItemState(_nWhich) >= SfxItemState::SET) { const sal_uInt16 nPageNum = static_cast<const SfxUInt16Item&>(rSet->Get( _nWhich ) ).GetValue(); commit a69ef2d84c3562da5e3bfda34e643c5044b4584a Author: Michael Stahl <mst...@redhat.com> Date: Thu Nov 27 22:30:15 2014 +0100 fdo#79303: Revert "fdo#70861 SwToSfxPageDescAttr: fix call to ... ... SvxExtParagraphTabPage" This reverts commit 5ce19ddcb6595c71980aecfa1e8c0827343159a4. It is now simply wrong to claim that a SID_ATTR_PARA_PAGENUM item with value 0 is set, when that is a valid offset value. SwTxtShell::Execute() will call SfxToSwPageDescAttr() which pulls the SID_ATTR_PARA_PAGENUM out of the item set and sets it. Change-Id: If5a155c2874486b3ef7d01883fe73f8e5fca46fe diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 6eedf32..2b8c718 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -650,10 +650,9 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet ) bPut = false; } - // TODO for now always pass a page number to cui, it can't make a - // difference between 0 and no page number at the moment. + if (oNumOffset) { - SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, oNumOffset ? oNumOffset.get() : 0 ); + SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, oNumOffset.get() ); rCoreSet.Put( aPageNum ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits