[Libreoffice-commits] core.git: 2 commits - editeng/source svx/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 22 15:24:23 UTC 2019
editeng/source/editeng/impedit.cxx | 6 +-
svx/source/dialog/hdft.cxx | 79 +++++++++++++++++++------------------
2 files changed, 46 insertions(+), 39 deletions(-)
New commits:
commit 2f8b3ef21cb66470c2774a5dc0cccbaf7d22681c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Jul 24 13:16:35 2019 -0400
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sun Dec 22 16:23:44 2019 +0100
editeng: detect invalid paragraphs when drawing
This prevents live-lock (endless loop) in case
the paragraphs are invalid.
Change-Id: I77cc7818dabc8e518bd7ca3f5161d46ba3fe50b4
(cherry picked from commit deab77cb71c01171d0f8284339627ed33798c3a1)
Reviewed-on: https://gerrit.libreoffice.org/85002
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 3592d49eff0d063b26250ce32eea138af3108b79)
Reviewed-on: https://gerrit.libreoffice.org/85678
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 2c398703bc74..6107f950608a 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -272,8 +272,10 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion,
ContentNode* pStartNode = aTmpSel.Min().GetNode();
ContentNode* pEndNode = aTmpSel.Max().GetNode();
- sal_Int32 nStartPara = pEditEngine->GetEditDoc().GetPos( pStartNode );
- sal_Int32 nEndPara = pEditEngine->GetEditDoc().GetPos( pEndNode );
+ const sal_Int32 nStartPara = pEditEngine->GetEditDoc().GetPos(pStartNode);
+ const sal_Int32 nEndPara = pEditEngine->GetEditDoc().GetPos(pEndNode);
+ if (nStartPara == EE_PARA_NOT_FOUND || nEndPara == EE_PARA_NOT_FOUND)
+ return;
for ( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
ParaPortion* pTmpPortion = pEditEngine->GetParaPortions().SafeGetObject( nPara );
commit 11efaea763bbbb9016ab39d53e191381444791f9
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun May 26 14:59:53 2019 -0400
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sun Dec 22 16:23:17 2019 +0100
svx: LOK: convert background child-dialogs to async
(cherry picked from commit 625a8c33bd95b4068838caef19af28c5404c59ce)
Reviewed-on: https://gerrit.libreoffice.org/83633
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 46a1c0a733f1e664823dcb483796dbcc8a743f4a)
Change-Id: I682ab039ce3732aa973e0fe371c191f1ca1b9ef7
Reviewed-on: https://gerrit.libreoffice.org/85677
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index c936e91ee740..b92dc46e8deb 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -624,54 +624,59 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, weld::Button&, void)
*pBBSet,
mbEnableDrawingLayerFillStyles));
- if(RET_OK == pDlg->Execute() && pDlg->GetOutputItemSet())
- {
- SfxItemIter aIter(*pDlg->GetOutputItemSet());
-
- for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
+ pDlg->StartExecuteAsync([&](sal_Int32 nResult) {
+ if (nResult == RET_OK && pDlg->GetOutputItemSet())
{
- if(!IsInvalidItem(pItem))
- {
- pBBSet->Put(*pItem);
- }
- }
+ SfxItemIter aIter(*pDlg->GetOutputItemSet());
- {
- drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes;
-
- if(mbEnableDrawingLayerFillStyles)
+ for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
{
- // create FillAttributes directly from DrawingLayer FillStyle entries
- aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(*pBBSet));
+ if(!IsInvalidItem(pItem))
+ {
+ pBBSet->Put(*pItem);
+ }
}
- else
+
{
- const sal_uInt16 nWhich = GetWhich(SID_ATTR_BRUSH);
+ drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes;
- if(pBBSet->GetItemState(nWhich) == SfxItemState::SET)
+ if (mbEnableDrawingLayerFillStyles)
{
- // create FillAttributes from SvxBrushItem
- const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(pBBSet->Get(nWhich));
- SfxItemSet aTempSet(*pBBSet->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
-
- setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
- aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+ // create FillAttributes directly from DrawingLayer FillStyle entries
+ aFillAttributes.reset(
+ new drawinglayer::attribute::SdrAllFillAttributesHelper(*pBBSet));
+ }
+ else
+ {
+ const sal_uInt16 nWhich = GetWhich(SID_ATTR_BRUSH);
+
+ if (pBBSet->GetItemState(nWhich) == SfxItemState::SET)
+ {
+ // create FillAttributes from SvxBrushItem
+ const SvxBrushItem& rItem
+ = static_cast<const SvxBrushItem&>(pBBSet->Get(nWhich));
+ SfxItemSet aTempSet(*pBBSet->GetPool(),
+ svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
+
+ setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
+ aFillAttributes.reset(
+ new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+ }
}
- }
- if(SID_ATTR_PAGE_HEADERSET == nId)
- {
- //m_aBspWin.SetHdColor(rItem.GetColor());
- m_aBspWin.setHeaderFillAttributes(aFillAttributes);
- }
- else
- {
- //m_aBspWin.SetFtColor(rItem.GetColor());
- m_aBspWin.setFooterFillAttributes(aFillAttributes);
+ if (SID_ATTR_PAGE_HEADERSET == nId)
+ {
+ //m_aBspWin.SetHdColor(rItem.GetColor());
+ m_aBspWin.setHeaderFillAttributes(aFillAttributes);
+ }
+ else
+ {
+ //m_aBspWin.SetFtColor(rItem.GetColor());
+ m_aBspWin.setFooterFillAttributes(aFillAttributes);
+ }
}
}
-
- }
+ });
UpdateExample();
}
More information about the Libreoffice-commits
mailing list