[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - 2 commits - cui/source sw/source
Michael Stahl
mstahl at redhat.com
Thu Nov 27 15:06:34 PST 2014
cui/source/tabpages/paragrph.cxx | 2 +-
sw/source/uibase/utlui/uitool.cxx | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit f89fa7ab44b05decebc9280696948f7df77414c5
Author: Michael Stahl <mstahl at 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
(cherry picked from commit 9c1a1b98776ca2216d82af303394a09f2bac0471)
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 c083c5a3b358f7d2ec4807ced5e96530d461fe7d
Author: Michael Stahl <mstahl at 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
(cherry picked from commit a69ef2d84c3562da5e3bfda34e643c5044b4584a)
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index b354bb2..07e8a77 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 );
}
More information about the Libreoffice-commits
mailing list