[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sfx2/source
sfx2/source/control/thumbnailview.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 3b79c7347d14756e072265b39081bc3866e1196d Author: Katarina Behrens AuthorDate: Fri Jan 28 18:03:58 2022 +0100 Commit: Caolán McNamara CommitDate: Tue Feb 1 20:39:05 2022 +0100 tdf#122708: on GetFocus, select something also when items are filtered Previously if nothing was selected, we picked item with ID 1 to select/highlight. But if a filter is active, such item may not match the active filter (case in point: document template no. 1 matches 'Writer templates' filter, but not 'Impress templates' one) Try harder to find an item to select by looking at the list of filtered items too Change-Id: I9cb053b884dc724c7a6199ec002d83024ed83976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129117 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 4bb0ffa4684dada708ecdf727f4fc9f500a9bced) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129081 Reviewed-by: Caolán McNamara diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 04de9a437550..217694520427 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -923,7 +923,14 @@ void ThumbnailView::GetFocus() if (nSelected == -1 && !mItemList.empty()) { -SelectItem(1); +ThumbnailViewItem* pFirst = nullptr; +if (!mFilteredItemList.empty()) { +pFirst = mFilteredItemList[0]; +} else { +pFirst = mItemList[0].get(); +} + +SelectItem(pFirst->mnId); } }
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/control/thumbnailview.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 4bb0ffa4684dada708ecdf727f4fc9f500a9bced Author: Katarina Behrens AuthorDate: Fri Jan 28 18:03:58 2022 +0100 Commit: Katarina Behrens CommitDate: Sat Jan 29 09:58:54 2022 +0100 tdf#122708: on GetFocus, select something also when items are filtered Previously if nothing was selected, we picked item with ID 1 to select/highlight. But if a filter is active, such item may not match the active filter (case in point: document template no. 1 matches 'Writer templates' filter, but not 'Impress templates' one) Try harder to find an item to select by looking at the list of filtered items too Change-Id: I9cb053b884dc724c7a6199ec002d83024ed83976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129117 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 37043f8767c0..3e85c4c911fc 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -924,7 +924,14 @@ void ThumbnailView::GetFocus() if (nSelected == -1 && !mItemList.empty()) { -SelectItem(1); +ThumbnailViewItem* pFirst = nullptr; +if (!mFilteredItemList.empty()) { +pFirst = mFilteredItemList[0]; +} else { +pFirst = mItemList[0].get(); +} + +SelectItem(pFirst->mnId); } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sd/source
sd/source/ui/animations/CustomAnimationPane.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 41b679f73e2001cd2840dd1256911e0b79bacaf8 Author: Katarina Behrens AuthorDate: Fri Nov 12 14:32:34 2021 +0100 Commit: Xisco Fauli CommitDate: Wed Nov 17 13:27:14 2021 +0100 tdf#135033: Make undo of adding and editing animations possible weird this somehow sneaked out when converting custom animation pane to sidebar when undoing other operations (delete etc.) stayed in place Change-Id: I6287682839d0e0401cc60bf82257d86765f3a858 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125110 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 71a186aedc6060bb4fb834c847f74c657d700f1e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125357 Reviewed-by: Xisco Fauli diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 4585fd335bdc..d17f1460b91f 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1832,6 +1832,7 @@ void CustomAnimationPane::onAdd() updateMotionPathTags(); } +addUndo(); mrBase.GetDocShell()->SetModified(); updateControls(); @@ -2133,6 +2134,7 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, Timer*, void) pEffectSequence->replace( pEffect, pDescriptor, fDuration ); } +addUndo(); onPreview(false); }
[Libreoffice-commits] core.git: sd/source
sd/source/ui/animations/CustomAnimationPane.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 71a186aedc6060bb4fb834c847f74c657d700f1e Author: Katarina Behrens AuthorDate: Fri Nov 12 14:32:34 2021 +0100 Commit: Katarina Behrens CommitDate: Tue Nov 16 11:09:42 2021 +0100 tdf#135033: Make undo of adding and editing animations possible weird this somehow sneaked out when converting custom animation pane to sidebar when undoing other operations (delete etc.) stayed in place Change-Id: I6287682839d0e0401cc60bf82257d86765f3a858 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125110 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index b604824f694f..3fe62f843f15 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1833,6 +1833,7 @@ void CustomAnimationPane::onAdd() updateMotionPathTags(); } +addUndo(); mrBase.GetDocShell()->SetModified(); updateControls(); @@ -2134,6 +2135,7 @@ IMPL_LINK_NOARG(CustomAnimationPane, SelectionHandler, Timer*, void) pEffectSequence->replace( pEffect, pDescriptor, fDuration ); } +addUndo(); onPreview(false); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/tbxctrls/fillctrl.cxx | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) New commits: commit 36baacbf86f81de457af40a4a91b294136bf8ddc Author: Katarina Behrens AuthorDate: Wed Aug 18 22:21:41 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Thu Aug 26 03:45:19 2021 +0200 tdf#143567: Distinguish bitmap vs. pattern fill style By the time fill style state change (SID_ATTR_FILL_STYLE) happens, the actual bitmap fill may or may not be known. If it is not known, it is impossible to tell whether it is a regular bitmap or a pattern. That's why this toolbar sometimes incorrectly reports bitmap fill instead of pattern one To solve the problem, we adjust fill style listbox selection only later, by the time we know for sure the fill IS a pattern Change-Id: I0aa95c49601d77dca29ab54ad4c056a76a90e049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120687 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 1b06e7e9e8c467de3450077fe8b90be6b7f73e4b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120991 Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index ed86f9f3bda1..948a89f6d3d2 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -142,13 +142,6 @@ void SvxFillToolBoxControl::StateChanged( mpLbFillType->set_sensitive(true); drawing::FillStyle eXFS = mpStyleItem->GetValue(); mnLastXFS = sal::static_int_cast< sal_Int32 >(eXFS); - -if (eXFS == drawing::FillStyle_BITMAP && -mpBitmapItem && mpBitmapItem->isPattern() ) -{ -mnLastXFS = sal::static_int_cast(PATTERN); -} - mpLbFillType->set_active(mnLastXFS); if(drawing::FillStyle_NONE == eXFS) @@ -555,6 +548,9 @@ void SvxFillToolBoxControl::Update() } else if (mpBitmapItem && mpBitmapItem->isPattern() && pSh->GetItem(SID_PATTERN_LIST)) { +mnLastXFS = sal::static_int_cast(PATTERN); +mpLbFillType->set_active(mnLastXFS); + SvxFillAttrBox::Fill(*mpLbFillAttr, pSh->GetItem(SID_PATTERN_LIST)->GetPatternList()); const OUString aString(mpBitmapItem->GetName());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - include/svx svx/source
include/svx/fillctrl.hxx |3 svx/source/tbxctrls/fillctrl.cxx | 165 +-- 2 files changed, 142 insertions(+), 26 deletions(-) New commits: commit a7062af6bfb821c5b8e7d110476332d84d17f624 Author: Katarina Behrens AuthorDate: Mon Jul 19 17:42:02 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Aug 25 21:41:14 2021 +0200 tdf#128612: Support applying pattern fill from toolbar List available pattern fills and add 'pattern' case to state and execute functions This is likely not perfect and there's still boatloads of code duplication that should be cleaned up eventually, but hey, it fixes the bug Change-Id: I3381a4271bb32a63c048cbecb0b54ebabe12ef51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119229 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit c1a8ff837e3e369561150c0022c6ab02aab27c2c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120241 Reviewed-by: Xisco Fauli diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx index ad428a10529f..e935fc7cc403 100644 --- a/include/svx/fillctrl.hxx +++ b/include/svx/fillctrl.hxx @@ -54,10 +54,11 @@ private: weld::Toolbar* mpToolBoxColor; weld::ComboBox* mpLbFillAttr; -css::drawing::FillStylemeLastXFS; +sal_Int32 mnLastXFS; sal_Int32 mnLastPosGradient; sal_Int32 mnLastPosHatch; sal_Int32 mnLastPosBitmap; +sal_Int32 mnLastPosPattern; DECL_LINK(SelectFillTypeHdl, weld::ComboBox&, void); DECL_LINK(SelectFillAttrHdl, weld::ComboBox&, void); diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index c8187454888e..ed86f9f3bda1 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -49,6 +49,30 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; +namespace { + +enum eFillStyle +{ +NONE, +SOLID, +GRADIENT, +HATCH, +BITMAP, +PATTERN +}; + +drawing::FillStyle toCssFillStyle( eFillStyle eXFS ) +{ +if (eXFS == PATTERN) +{ +return drawing::FillStyle_BITMAP; +} + +return static_cast(eXFS); +} + +} + SFX_IMPL_TOOLBOX_CONTROL( SvxFillToolBoxControl, XFillStyleItem ); SvxFillToolBoxControl::SvxFillToolBoxControl( @@ -65,10 +89,11 @@ SvxFillToolBoxControl::SvxFillToolBoxControl( , mpLbFillType(nullptr) , mpToolBoxColor(nullptr) , mpLbFillAttr(nullptr) -, meLastXFS(static_cast(-1)) +, mnLastXFS(-1) , mnLastPosGradient(0) , mnLastPosHatch(0) , mnLastPosBitmap(0) +, mnLastPosPattern(0) { addStatusListener( ".uno:FillColor"); addStatusListener( ".uno:FillGradient"); @@ -103,7 +128,7 @@ void SvxFillToolBoxControl::StateChanged( mpLbFillAttr->set_sensitive(false); mpLbFillAttr->set_active(-1); mpToolBoxColor->hide(); -meLastXFS = static_cast(-1); +mnLastXFS = -1; mpStyleItem.reset(); } @@ -116,8 +141,15 @@ void SvxFillToolBoxControl::StateChanged( mpStyleItem.reset(pItem->Clone()); mpLbFillType->set_sensitive(true); drawing::FillStyle eXFS = mpStyleItem->GetValue(); -meLastXFS = eXFS; -mpLbFillType->set_active(sal::static_int_cast< sal_Int32 >(eXFS)); +mnLastXFS = sal::static_int_cast< sal_Int32 >(eXFS); + +if (eXFS == drawing::FillStyle_BITMAP && +mpBitmapItem && mpBitmapItem->isPattern() ) +{ +mnLastXFS = sal::static_int_cast(PATTERN); +} + +mpLbFillType->set_active(mnLastXFS); if(drawing::FillStyle_NONE == eXFS) { @@ -135,7 +167,7 @@ void SvxFillToolBoxControl::StateChanged( mpLbFillAttr->set_sensitive(false); mpLbFillAttr->set_active(-1); mpToolBoxColor->hide(); -meLastXFS = static_cast(-1); +mnLastXFS = -1; mpStyleItem.reset(); mxFillControl->Resize(); break; @@ -480,14 +512,15 @@ void SvxFillToolBoxControl::Update() mpToolBoxColor->hide(); mxFillControl->Resize(); -if(pSh && pSh->GetItem(SID_BITMAP_LIST)) +if(pSh) { mpLbFillAttr->set_sensitive(true); mpLbFillAttr->clear(); -SvxFillAttrBox::Fill(*mpLbFillAttr, pSh->GetItem(SID_BITMAP_LIST)->GetBitmapList()); -if(mpBitmapItem) +if(mpBitmapItem && !mpBitmapItem->isPattern() && pSh->GetItem(SID_BITMAP_LIST)) { +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sd/source
sd/source/core/CustomAnimationEffect.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit e793eb0acc8f95941eaf6bf82f39a3a6185d7142 Author: Katarina Behrens AuthorDate: Mon Jul 26 08:34:38 2021 +0200 Commit: Xisco Fauli CommitDate: Mon Aug 9 22:02:57 2021 +0200 tdf#142817: Correctly replace animation effect that comes with a command As effect1 with command (e.g. the one from misc/MEDIACALL category) is created, 'mnCommand' member var is set. But when it is replaced by command-less effect2 via CustomAnnimationEffect::replaceNode, this var is never reset (simply because the relevant if-else branch is never hit) so it looks as if the command was still there. This causes UI glitch in sidebar: setting incorrect category of the next selected effect To fix that, we reset 'mnCommand' in ::setNode function, just as it is done with resetting audio associated w/ the effect Change-Id: I86016dd1acadfb31f460bde749bbe15164f1eb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119492 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 6146b185ab2a335de39d0562a8d34e53d3e742e0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120236 Reviewed-by: Xisco Fauli diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index b28b9c512fa3..ed61bed5cb72 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -156,6 +156,7 @@ void CustomAnimationEffect::setNode( const css::uno::Reference< css::animations: { mxNode = xNode; mxAudio.clear(); +mnCommand = 0; const Sequence< NamedValue > aUserData( mxNode->getUserData() );
[Libreoffice-commits] core.git: sd/source
sd/source/core/CustomAnimationEffect.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 6146b185ab2a335de39d0562a8d34e53d3e742e0 Author: Katarina Behrens AuthorDate: Mon Jul 26 08:34:38 2021 +0200 Commit: Katarina Behrens CommitDate: Thu Jul 29 21:12:36 2021 +0200 tdf#142817: Correctly replace animation effect that comes with a command As effect1 with command (e.g. the one from misc/MEDIACALL category) is created, 'mnCommand' member var is set. But when it is replaced by command-less effect2 via CustomAnnimationEffect::replaceNode, this var is never reset (simply because the relevant if-else branch is never hit) so it looks as if the command was still there. This causes UI glitch in sidebar: setting incorrect category of the next selected effect To fix that, we reset 'mnCommand' in ::setNode function, just as it is done with resetting audio associated w/ the effect Change-Id: I86016dd1acadfb31f460bde749bbe15164f1eb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119492 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index b28b9c512fa3..ed61bed5cb72 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -156,6 +156,7 @@ void CustomAnimationEffect::setNode( const css::uno::Reference< css::animations: { mxNode = xNode; mxAudio.clear(); +mnCommand = 0; const Sequence< NamedValue > aUserData( mxNode->getUserData() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - svx/source svx/uiconfig
svx/source/sidebar/possize/PosSizePropertyPanel.cxx |2 +- svx/uiconfig/ui/sidebarpossize.ui |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit 5a15f6dc15449fd83949fbff296fe2f72c20639f Author: Katarina Behrens AuthorDate: Fri Jun 18 09:48:25 2021 +0200 Commit: Xisco Fauli CommitDate: Mon Jun 21 12:31:59 2021 +0200 tdf#141311: Rotation spinbox in sidebar used to have 2 decimal places regression from weld-ing (c85fcc6e1994eb8e079aaca85066ab4d67149c15) Change-Id: Iad0725fd4542ecdddb65092846dbf9d103016d9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117408 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 7a717c8b9319edcc12e50ab78554b8e0e7049cbf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117419 Reviewed-by: Adolfo Jayme Barrientos (cherry picked from commit 1bec8a3d3b16bb8881bd49f58d8786421ff5f839) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117554 Reviewed-by: Xisco Fauli diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index aac8619a448e..b1ac16b96643 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -213,7 +213,7 @@ void PosSizePropertyPanel::Initialize() mxCbxScale->connect_toggled( LINK( this, PosSizePropertyPanel, ClickAutoHdl ) ); //rotation control -mxCtrlDial->SetLinkedField(mxMtrAngle.get()); +mxCtrlDial->SetLinkedField(mxMtrAngle.get(), 2); mxCtrlDial->SetModifyHdl(LINK( this, PosSizePropertyPanel, RotationHdl)); //use same logic as DialControl_Impl::SetSize diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index b507f2bca7fa..94dade3d1f89 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -400,6 +400,7 @@ True Select the angle for rotation. True +2 adjustmentSpinDegrees True True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source svx/uiconfig
svx/source/sidebar/possize/PosSizePropertyPanel.cxx |2 +- svx/uiconfig/ui/sidebarpossize.ui |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit 1bec8a3d3b16bb8881bd49f58d8786421ff5f839 Author: Katarina Behrens AuthorDate: Fri Jun 18 09:48:25 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Jun 21 05:33:28 2021 +0200 tdf#141311: Rotation spinbox in sidebar used to have 2 decimal places regression from weld-ing (c85fcc6e1994eb8e079aaca85066ab4d67149c15) Change-Id: Iad0725fd4542ecdddb65092846dbf9d103016d9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117408 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 7a717c8b9319edcc12e50ab78554b8e0e7049cbf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117419 Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 8139b3dc4d69..943117f9a57d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -218,7 +218,7 @@ void PosSizePropertyPanel::Initialize() mxCbxScale->connect_toggled( LINK( this, PosSizePropertyPanel, ClickAutoHdl ) ); //rotation control -mxCtrlDial->SetLinkedField(mxMtrAngle.get()); +mxCtrlDial->SetLinkedField(mxMtrAngle.get(), 2); mxCtrlDial->SetModifyHdl(LINK( this, PosSizePropertyPanel, RotationHdl)); //use same logic as DialControl_Impl::SetSize diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index f608be61a963..f6d92e15c7e6 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -388,6 +388,7 @@ True Select the angle for rotation. True +2 adjustmentSpinDegrees True True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source svx/uiconfig
svx/source/sidebar/possize/PosSizePropertyPanel.cxx |2 +- svx/uiconfig/ui/sidebarpossize.ui |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit 7a717c8b9319edcc12e50ab78554b8e0e7049cbf Author: Katarina Behrens AuthorDate: Fri Jun 18 09:48:25 2021 +0200 Commit: Katarina Behrens CommitDate: Fri Jun 18 13:34:38 2021 +0200 tdf#141311: Rotation spinbox in sidebar used to have 2 decimal places regression from weld-ing (c85fcc6e1994eb8e079aaca85066ab4d67149c15) Change-Id: Iad0725fd4542ecdddb65092846dbf9d103016d9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117408 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 8139b3dc4d69..943117f9a57d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -218,7 +218,7 @@ void PosSizePropertyPanel::Initialize() mxCbxScale->connect_toggled( LINK( this, PosSizePropertyPanel, ClickAutoHdl ) ); //rotation control -mxCtrlDial->SetLinkedField(mxMtrAngle.get()); +mxCtrlDial->SetLinkedField(mxMtrAngle.get(), 2); mxCtrlDial->SetModifyHdl(LINK( this, PosSizePropertyPanel, RotationHdl)); //use same logic as DialControl_Impl::SetSize diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index f608be61a963..f6d92e15c7e6 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -388,6 +388,7 @@ True Select the angle for rotation. True +2 adjustmentSpinDegrees True True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0-6' - sd/uiconfig
sd/uiconfig/simpress/ui/sidebarslidebackground.ui | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit 231ce4e8058d4885ef3975dbbde556c47a6161fb Author: Katarina Behrens AuthorDate: Tue May 4 10:06:26 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Wed May 5 23:45:30 2021 +0200 tdf#139329: Shift widgets down and make hatch list visible regression from commit cbe86ee37018dc4bf04783ecf70fef2863e61ad7 which inserted additional gradient colour picker but didn't adjust the positions of widgets below accordingly so in effect there were 2 widgets at position y=4 Sad that neither glade nor our own code detects this condition and e.g. asserts or warns this is the case Change-Id: I4c635eeb8b740765542631a5f0319bfe1a5d94d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115056 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit c46a231b987b92bd866b415d1a0ba0d3a26a2457) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115074 Reviewed-by: Xisco Fauli (cherry picked from commit 4956d637401e07e9d562233d963739ec16d0d929) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115081 (cherry picked from commit 154811f493df51e4cf90598aec86d992340f0e11) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115084 Reviewed-by: Christian Lohmaier Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui index 644c443fb966..1e8afd46dcbb 100644 --- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui +++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui @@ -114,7 +114,7 @@ 1 -10 +11 @@ -125,7 +125,7 @@ 1 -8 +9 @@ -137,7 +137,7 @@ 0 -8 +9 @@ -150,7 +150,7 @@ 1 -6 +7 @@ -195,7 +195,7 @@ 1 -4 +5 @@ -214,7 +214,7 @@ 1 -5 +6 @@ -230,7 +230,7 @@ 1 -9 +10 @@ -292,7 +292,7 @@ 1 -11 +12 @@ -302,7 +302,7 @@ 1 -7 +8 @@ -316,7 +316,7 @@ 0 -7 +8 @@ -327,7 +327,7 @@ 1 -12 +13 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sd/uiconfig
sd/uiconfig/simpress/ui/sidebarslidebackground.ui | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit 154811f493df51e4cf90598aec86d992340f0e11 Author: Katarina Behrens AuthorDate: Tue May 4 10:06:26 2021 +0200 Commit: Xisco Fauli CommitDate: Wed May 5 16:26:16 2021 +0200 tdf#139329: Shift widgets down and make hatch list visible regression from commit cbe86ee37018dc4bf04783ecf70fef2863e61ad7 which inserted additional gradient colour picker but didn't adjust the positions of widgets below accordingly so in effect there were 2 widgets at position y=4 Sad that neither glade nor our own code detects this condition and e.g. asserts or warns this is the case Change-Id: I4c635eeb8b740765542631a5f0319bfe1a5d94d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115056 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit c46a231b987b92bd866b415d1a0ba0d3a26a2457) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115074 Reviewed-by: Xisco Fauli (cherry picked from commit 4956d637401e07e9d562233d963739ec16d0d929) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115081 diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui index 644c443fb966..1e8afd46dcbb 100644 --- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui +++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui @@ -114,7 +114,7 @@ 1 -10 +11 @@ -125,7 +125,7 @@ 1 -8 +9 @@ -137,7 +137,7 @@ 0 -8 +9 @@ -150,7 +150,7 @@ 1 -6 +7 @@ -195,7 +195,7 @@ 1 -4 +5 @@ -214,7 +214,7 @@ 1 -5 +6 @@ -230,7 +230,7 @@ 1 -9 +10 @@ -292,7 +292,7 @@ 1 -11 +12 @@ -302,7 +302,7 @@ 1 -7 +8 @@ -316,7 +316,7 @@ 0 -7 +8 @@ -327,7 +327,7 @@ 1 -12 +13 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/uiconfig
sd/uiconfig/simpress/ui/sidebarslidebackground.ui | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit 4956d637401e07e9d562233d963739ec16d0d929 Author: Katarina Behrens AuthorDate: Tue May 4 10:06:26 2021 +0200 Commit: Xisco Fauli CommitDate: Wed May 5 12:19:47 2021 +0200 tdf#139329: Shift widgets down and make hatch list visible regression from commit cbe86ee37018dc4bf04783ecf70fef2863e61ad7 which inserted additional gradient colour picker but didn't adjust the positions of widgets below accordingly so in effect there were 2 widgets at position y=4 Sad that neither glade nor our own code detects this condition and e.g. asserts or warns this is the case Change-Id: I4c635eeb8b740765542631a5f0319bfe1a5d94d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115056 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit c46a231b987b92bd866b415d1a0ba0d3a26a2457) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115074 Reviewed-by: Xisco Fauli diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui index 11141c29f827..9f5cd9958174 100644 --- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui +++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui @@ -116,7 +116,7 @@ 1 -10 +11 @@ -127,7 +127,7 @@ 1 -8 +9 @@ -139,7 +139,7 @@ 0 -8 +9 @@ -152,7 +152,7 @@ 1 -6 +7 @@ -197,7 +197,7 @@ 1 -4 +5 @@ -216,7 +216,7 @@ 1 -5 +6 @@ -232,7 +232,7 @@ 1 -9 +10 @@ -294,7 +294,7 @@ 1 -11 +12 @@ -304,7 +304,7 @@ 1 -7 +8 @@ -318,7 +318,7 @@ 0 -7 +8 @@ -329,7 +329,7 @@ 1 -12 +13 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/uiconfig
sd/uiconfig/simpress/ui/sidebarslidebackground.ui | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit c46a231b987b92bd866b415d1a0ba0d3a26a2457 Author: Katarina Behrens AuthorDate: Tue May 4 10:06:26 2021 +0200 Commit: Katarina Behrens CommitDate: Tue May 4 15:09:03 2021 +0200 tdf#139329: Shift widgets down and make hatch list visible regression from commit cbe86ee37018dc4bf04783ecf70fef2863e61ad7 which inserted additional gradient colour picker but didn't adjust the positions of widgets below accordingly so in effect there were 2 widgets at position y=4 Sad that neither glade nor our own code detects this condition and e.g. asserts or warns this is the case Change-Id: I4c635eeb8b740765542631a5f0319bfe1a5d94d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115056 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui index 9ee6a428ed07..13163da28e95 100644 --- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui +++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui @@ -115,7 +115,7 @@ 1 -10 +11 @@ -126,7 +126,7 @@ 1 -8 +9 @@ -138,7 +138,7 @@ 0 -8 +9 @@ -151,7 +151,7 @@ 1 -6 +7 @@ -196,7 +196,7 @@ 1 -4 +5 @@ -215,7 +215,7 @@ 1 -5 +6 @@ -230,7 +230,7 @@ 1 -9 +10 @@ -292,7 +292,7 @@ 1 -11 +12 @@ -302,7 +302,7 @@ 1 -7 +8 @@ -316,7 +316,7 @@ 0 -7 +8 @@ -327,7 +327,7 @@ 1 -12 +13 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/uiconfig
svx/uiconfig/ui/docking3deffects.ui |5 - 1 file changed, 5 deletions(-) New commits: commit b38fd085608a44cf3a2d181e2720c758356647d7 Author: Katarina Behrens AuthorDate: Fri Apr 23 20:35:11 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat Apr 24 01:15:53 2021 +0200 tdf#139699: remove stray image that is not used anywhere Tool button using the image was removed by 5da3ae08596c2465532e662537f5292454a84a3e and with no other tool button using it, it accounts for blue 'decoration' at the top of 3D effects dialog Change-Id: Id5705832614315316433e38e0c8635e1b4a3d906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114569 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/uiconfig/ui/docking3deffects.ui b/svx/uiconfig/ui/docking3deffects.ui index 123ca1fe63c4..50ef7d358a12 100644 --- a/svx/uiconfig/ui/docking3deffects.ui +++ b/svx/uiconfig/ui/docking3deffects.ui @@ -234,11 +234,6 @@ False svx/res/colordlg.png - -True -False -svx/res/blend3d.png - True False ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/xml
sd/xml/effects.xml | 24 1 file changed, 12 insertions(+), 12 deletions(-) New commits: commit aa0b23a89dfd12dcd0de8f0ba6d302707a6b628c Author: Katarina Behrens AuthorDate: Sat Apr 17 14:10:56 2021 +0200 Commit: Xisco Fauli CommitDate: Tue Apr 20 17:17:55 2021 +0200 tdf#48551: change preset subtype of Fly Out and Crawl Out exit animations so that they match the behaviour (it is fly out 'to left', 'to right' etc. instead of 'from left', 'from right') This change only affects animation direction choices in GUI (sidebar) and doesn't modify the animation itself in any way Change-Id: Id5dd8013f388243c1c862177cfa7c6f106b9d09c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114226 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 398c13f84b1977acf2c63f2159cf0255b3494bdc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114190 Reviewed-by: Xisco Fauli diff --git a/sd/xml/effects.xml b/sd/xml/effects.xml index 08a874d6a8c9..973cac85b65f 100644 --- a/sd/xml/effects.xml +++ b/sd/xml/effects.xml @@ -1406,7 +1406,7 @@ - + @@ -1415,7 +1415,7 @@ - + @@ -1424,7 +1424,7 @@ - + @@ -1433,7 +1433,7 @@ - + @@ -1481,7 +1481,7 @@ - + @@ -1490,7 +1490,7 @@ - + @@ -1499,7 +1499,7 @@ - + @@ -1508,7 +1508,7 @@ - + @@ -1517,7 +1517,7 @@ - + @@ -1526,7 +1526,7 @@ - + @@ -1535,7 +1535,7 @@ - + @@ -1544,7 +1544,7 @@ - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - officecfg/registry
officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0b9b5849643d9ff42fea3db8156a05d4c6d67cad Author: Katarina Behrens AuthorDate: Thu Apr 15 17:16:19 2021 +0200 Commit: Xisco Fauli CommitDate: Mon Apr 19 12:48:31 2021 +0200 tdf#133419: Put Left and Right motion path effects into single category Somehow those two effects ended up both in Basic and in Lines and Curves category. Remove them from Basic, it makes more sense to have these in Lines and Curves as both are very simple linear motion effects Change-Id: Iec32370095f4fc1069abe97b944a4b36e121f6cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114158 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit d0c7afcce3016759a1371be361ce8b39dfc7fc17) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114180 Reviewed-by: Xisco Fauli diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu index 4626826a40aa..93782f92effd 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu @@ -2564,7 +2564,7 @@ Basic - ooo-motionpath-4-point-star;ooo-motionpath-5-point-star;ooo-motionpath-6-point-star;ooo-motionpath-8-point-star;ooo-motionpath-circle;ooo-motionpath-crescent-moon;ooo-motionpath-diamond;ooo-motionpath-equal-triangle;ooo-motionpath-oval;ooo-motionpath-heart;ooo-motionpath-left;ooo-motionpath-right;ooo-motionpath-hexagon;ooo-motionpath-octagon;ooo-motionpath-parallelogram;ooo-motionpath-pentagon;ooo-motionpath-right-triangle;ooo-motionpath-square;ooo-motionpath-teardrop;ooo-motionpath-trapezoid + ooo-motionpath-4-point-star;ooo-motionpath-5-point-star;ooo-motionpath-6-point-star;ooo-motionpath-8-point-star;ooo-motionpath-circle;ooo-motionpath-crescent-moon;ooo-motionpath-diamond;ooo-motionpath-equal-triangle;ooo-motionpath-oval;ooo-motionpath-heart;;ooo-motionpath-hexagon;ooo-motionpath-octagon;ooo-motionpath-parallelogram;ooo-motionpath-pentagon;ooo-motionpath-right-triangle;ooo-motionpath-square;ooo-motionpath-teardrop;ooo-motionpath-trapezoid ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/xml
sd/xml/effects.xml | 24 1 file changed, 12 insertions(+), 12 deletions(-) New commits: commit 398c13f84b1977acf2c63f2159cf0255b3494bdc Author: Katarina Behrens AuthorDate: Sat Apr 17 14:10:56 2021 +0200 Commit: Katarina Behrens CommitDate: Sat Apr 17 16:45:55 2021 +0200 tdf#48551: change preset subtype of Fly Out and Crawl Out exit animations so that they match the behaviour (it is fly out 'to left', 'to right' etc. instead of 'from left', 'from right') This change only affects animation direction choices in GUI (sidebar) and doesn't modify the animation itself in any way Change-Id: Id5dd8013f388243c1c862177cfa7c6f106b9d09c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114226 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/xml/effects.xml b/sd/xml/effects.xml index 08a874d6a8c9..973cac85b65f 100644 --- a/sd/xml/effects.xml +++ b/sd/xml/effects.xml @@ -1406,7 +1406,7 @@ - + @@ -1415,7 +1415,7 @@ - + @@ -1424,7 +1424,7 @@ - + @@ -1433,7 +1433,7 @@ - + @@ -1481,7 +1481,7 @@ - + @@ -1490,7 +1490,7 @@ - + @@ -1499,7 +1499,7 @@ - + @@ -1508,7 +1508,7 @@ - + @@ -1517,7 +1517,7 @@ - + @@ -1526,7 +1526,7 @@ - + @@ -1535,7 +1535,7 @@ - + @@ -1544,7 +1544,7 @@ - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry
officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d0c7afcce3016759a1371be361ce8b39dfc7fc17 Author: Katarina Behrens AuthorDate: Thu Apr 15 17:16:19 2021 +0200 Commit: Katarina Behrens CommitDate: Thu Apr 15 20:32:50 2021 +0200 tdf#133419: Put Left and Right motion path effects into single category Somehow those two effects ended up both in Basic and in Lines and Curves category. Remove them from Basic, it makes more sense to have these in Lines and Curves as both are very simple linear motion effects Change-Id: Iec32370095f4fc1069abe97b944a4b36e121f6cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114158 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu index 4626826a40aa..93782f92effd 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Effects.xcu @@ -2564,7 +2564,7 @@ Basic - ooo-motionpath-4-point-star;ooo-motionpath-5-point-star;ooo-motionpath-6-point-star;ooo-motionpath-8-point-star;ooo-motionpath-circle;ooo-motionpath-crescent-moon;ooo-motionpath-diamond;ooo-motionpath-equal-triangle;ooo-motionpath-oval;ooo-motionpath-heart;ooo-motionpath-left;ooo-motionpath-right;ooo-motionpath-hexagon;ooo-motionpath-octagon;ooo-motionpath-parallelogram;ooo-motionpath-pentagon;ooo-motionpath-right-triangle;ooo-motionpath-square;ooo-motionpath-teardrop;ooo-motionpath-trapezoid + ooo-motionpath-4-point-star;ooo-motionpath-5-point-star;ooo-motionpath-6-point-star;ooo-motionpath-8-point-star;ooo-motionpath-circle;ooo-motionpath-crescent-moon;ooo-motionpath-diamond;ooo-motionpath-equal-triangle;ooo-motionpath-oval;ooo-motionpath-heart;;ooo-motionpath-hexagon;ooo-motionpath-octagon;ooo-motionpath-parallelogram;ooo-motionpath-pentagon;ooo-motionpath-right-triangle;ooo-motionpath-square;ooo-motionpath-teardrop;ooo-motionpath-trapezoid ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/xml
sd/xml/effects.xml | 16 1 file changed, 8 insertions(+), 8 deletions(-) New commits: commit d72a592e222097146f5f4e76d6135af60ef9 Author: Katarina Behrens AuthorDate: Mon Apr 12 14:56:12 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Tue Apr 13 20:47:41 2021 +0200 tdf#131171: make Diagonal Squares animations behave as described All of these animations map to Waterfall transition left-to-bottom: horizontal left rotated 90° clockwise right-to-top: reverse of left-to-bottom right-to-bottom: horizontal right rotated 90° counterclockwise left-to-top: reverse of right-to-bottom This holds for entrance animations. For exit it is the same but reversed see also: https://www.w3.org/TR/SMIL2/smil-transitions.html#Table%205:%20SMPTE%20Matrix%20Wipes Change-Id: I9d1b05485727bb6f0e93ba78f10094055bfbaa70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113985 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 46fe595379a898ee7e537cbffd5d215d4a58aca5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113997 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sd/xml/effects.xml b/sd/xml/effects.xml index 2846caaa9450..08a874d6a8c9 100644 --- a/sd/xml/effects.xml +++ b/sd/xml/effects.xml @@ -349,7 +349,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -373,7 +373,7 @@ - + @@ -1655,7 +1655,7 @@ - + @@ -1663,7 +1663,7 @@ - + @@ -1671,7 +1671,7 @@ - + @@ -1679,7 +1679,7 @@ - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/xml
sd/xml/effects.xml | 16 1 file changed, 8 insertions(+), 8 deletions(-) New commits: commit 46fe595379a898ee7e537cbffd5d215d4a58aca5 Author: Katarina Behrens AuthorDate: Mon Apr 12 14:56:12 2021 +0200 Commit: Katarina Behrens CommitDate: Mon Apr 12 19:22:41 2021 +0200 tdf#131171: make Diagonal Squares animations behave as described All of these animations map to Waterfall transition left-to-bottom: horizontal left rotated 90° clockwise right-to-top: reverse of left-to-bottom right-to-bottom: horizontal right rotated 90° counterclockwise left-to-top: reverse of right-to-bottom This holds for entrance animations. For exit it is the same but reversed see also: https://www.w3.org/TR/SMIL2/smil-transitions.html#Table%205:%20SMPTE%20Matrix%20Wipes Change-Id: I9d1b05485727bb6f0e93ba78f10094055bfbaa70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113985 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/xml/effects.xml b/sd/xml/effects.xml index 2846caaa9450..08a874d6a8c9 100644 --- a/sd/xml/effects.xml +++ b/sd/xml/effects.xml @@ -349,7 +349,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -373,7 +373,7 @@ - + @@ -1655,7 +1655,7 @@ - + @@ -1663,7 +1663,7 @@ - + @@ -1671,7 +1671,7 @@ - + @@ -1679,7 +1679,7 @@ - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source
chart2/source/controller/sidebar/ChartAreaPanel.cxx | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) New commits: commit ce520a95c246769ab41a83f8a0fc5e48c5352466 Author: Katarina Behrens AuthorDate: Tue Jul 16 09:48:12 2019 +0200 Commit: Aron Budea CommitDate: Wed Sep 23 13:00:35 2020 +0200 tdf#94300: custom gradients apply also from chart sidebar Change-Id: Id6ba90b404ad97cdfc4091bcb4028677f1600fa2 Reviewed-on: https://gerrit.libreoffice.org/75693 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 0e15fb798a0d1fc8cc221ae2334411fac144f173) Reviewed-on: https://gerrit.libreoffice.org/77035 Reviewed-by: Thorsten Behrens (cherry picked from commit dda72e5088a20360ebf18900e608994311fa0f5c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103233 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx index 023d14127922..959ba2657675 100644 --- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx @@ -101,30 +101,26 @@ DrawModelWrapper* getDrawModelWrapper(const css::uno::ReferenceGetDrawModelWrapper(); } -XGradient getXGradientForName(const css::uno::Reference& xModel, +XFillGradientItem getXGradientForName(const css::uno::Reference& xModel, const OUString& rName) { -try -{ -ViewElementListProvider aProvider = getViewElementListProvider(xModel); -XGradientListRef aRef = aProvider.GetGradientList(); -size_t n = aRef->Count(); -for (size_t i = 0; i < n; ++i) -{ -const XGradientEntry* pGradient = aRef->GetGradient(i); -if (!pGradient) -continue; +css::uno::Reference xFact(xModel, css::uno::UNO_QUERY); +css::uno::Reference xNameAccess( +xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY); +if (!xNameAccess.is()) +return XFillGradientItem(); -if (pGradient->GetName() == rName) -return pGradient->GetGradient(); -} -} -catch (...) -{ -// ignore exception -} +if (!xNameAccess->hasByName(rName)) +return XFillGradientItem(); + +css::uno::Any aAny = xNameAccess->getByName(rName); + +XFillGradientItem aItem; +aItem.SetName(rName); +aItem.PutValue(aAny, MID_FILLGRADIENT); + +return aItem; -return XGradient(); } XFillFloatTransparenceItem getXTransparencyGradientForName(const css::uno::Reference& xModel, @@ -370,7 +366,12 @@ void ChartAreaPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem, if (pStyleItem) xPropSet->setPropertyValue("FillStyle", css::uno::Any(pStyleItem->GetValue())); -xPropSet->setPropertyValue("FillGradientName", css::uno::Any(rGradientItem.GetValue())); + +const OUString& aName = rGradientItem.GetName(); +css::uno::Any aGradientVal; +rGradientItem.QueryValue(aGradientVal, MID_FILLGRADIENT); +OUString aNewName = PropertyHelper::addGradientUniqueNameToTable(aGradientVal, css::uno::Reference(mxModel, css::uno::UNO_QUERY_THROW), aName); +xPropSet->setPropertyValue("FillGradientName", css::uno::Any(aNewName)); } void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem, @@ -436,11 +437,10 @@ void ChartAreaPanel::updateData() if (xInfo->hasPropertyByName("FillGradientName")) { - OUString aGradientName; - xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; - XGradient aGradient = getXGradientForName(mxModel, aGradientName); - XFillGradientItem aGradientItem(aGradientName, aGradient); - updateFillGradient(false, true, ); +OUString aGradientName; +xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; +XFillGradientItem aGradientItem = getXGradientForName(mxModel, aGradientName); +updateFillGradient(false, true, ); } if (xInfo->hasPropertyByName("FillHatchName")) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 5 commits - sw/inc sw/source
sw/inc/IDocumentMarkAccess.hxx|3 sw/inc/IDocumentSettingAccess.hxx |2 sw/source/core/crsr/pam.cxx | 41 +++ sw/source/core/doc/DocumentSettingManager.cxx | 12 +- sw/source/core/doc/docbm.cxx | 149 +- sw/source/core/inc/DocumentSettingManager.hxx |2 sw/source/core/inc/MarkManager.hxx|1 sw/source/ui/misc/bookmark.cxx| 15 +- sw/source/uibase/inc/bookmark.hxx |1 sw/source/uibase/shells/textsh1.cxx |2 sw/source/uibase/uno/SwXDocumentSettings.cxx | 36 ++ sw/source/uibase/utlui/content.cxx| 26 ++-- sw/source/uibase/wrtsh/delete.cxx | 12 ++ 13 files changed, 235 insertions(+), 67 deletions(-) New commits: commit c322064eac9a7d562f1a4501df7bb1ddd3ab843f Author: Katarina Behrens AuthorDate: Fri Jan 24 18:40:24 2020 +0100 Commit: Michael Stahl CommitDate: Wed Mar 25 20:50:17 2020 +0100 sw: Optionally disable bookmark manipulation GUIs If the ProtectBookmarks bit is set, don't allow bookmark changes, neither via the bookmark dialog nor the navigator. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87361 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit cb5d18871b46ef4f7bc47eb4d71df5374d712575) Omit new strings for backport to 6.1 branch, was only shown as disabled context menu item anyway. Change-Id: I035faaf3871c7107dd1aac38c4e6867291827346 diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 309892627b47..3372dd3eb375 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -36,6 +36,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -84,12 +85,12 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, Edit&, void) } // allow to add new bookmark only if one name provided and it's not taken -m_pInsertBtn->Enable(nEntries == 1 && nSelectedEntries == 0); +m_pInsertBtn->Enable(nEntries == 1 && nSelectedEntries == 0 && !m_bAreProtected); // allow to delete only if all bookmarks are recognized -m_pDeleteBtn->Enable(nEntries > 0 && nSelectedEntries == nEntries); +m_pDeleteBtn->Enable(nEntries > 0 && nSelectedEntries == nEntries && !m_bAreProtected); m_pGotoBtn->Enable(nEntries == 1 && nSelectedEntries == 1); -m_pRenameBtn->Enable(nEntries == 1 && nSelectedEntries == 1); +m_pRenameBtn->Enable(nEntries == 1 && nSelectedEntries == 1 && !m_bAreProtected); } // callback to delete a text mark @@ -161,13 +162,13 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, SvTreeListBox*, void) { m_pInsertBtn->Disable(); m_pGotoBtn->Enable(m_pBookmarksBox->GetSelectionCount() == 1); -m_pRenameBtn->Enable(m_pBookmarksBox->GetSelectionCount() == 1); -m_pDeleteBtn->Enable(); +m_pRenameBtn->Enable(m_pBookmarksBox->GetSelectionCount() == 1 && !m_bAreProtected); +m_pDeleteBtn->Enable(!m_bAreProtected); m_pEditBox->SetText(sEditBoxText); } else { -m_pInsertBtn->Enable(); +m_pInsertBtn->Enable(!m_bAreProtected); m_pGotoBtn->Disable(); m_pRenameBtn->Disable(); m_pDeleteBtn->Disable(); @@ -327,6 +328,8 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(vcl::Window* pParent, SwWrtShell& rS, S m_pEditBox->SetCursorAtLast(); sRemoveWarning = SwResId(STR_REMOVE_WARNING); + +m_bAreProtected = rSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS); } SwInsertBookmarkDlg::~SwInsertBookmarkDlg() diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx index e8554052b9aa..5f94efd7bb01 100644 --- a/sw/source/uibase/inc/bookmark.hxx +++ b/sw/source/uibase/inc/bookmark.hxx @@ -60,6 +60,7 @@ class SwInsertBookmarkDlg: public SvxStandardDialog SfxRequest& rReq; std::vector> aTableBookmarks; sal_Int32 m_nLastBookmarksCount; +bool m_bAreProtected; DECL_LINK(ModifyHdl, Edit&, void); DECL_LINK(InsertHdl, Button*, void); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 503f52b502fc..f19ff11b9af8 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -715,7 +715,7 @@ void SwTextShell::Execute(SfxRequest ) } case FN_DELETE_BOOKMARK: { -if ( pItem ) +if (pItem && !rWrtSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS)) { IDocumentMarkAccess* const pMarkAccess = rWrtSh.getIDocumentMarkAccess(); pMarkAccess->deleteMark( pMarkAccess->findMark(static_cast(pItem)->GetValue()) ); diff --git a/sw/source/uibase/utlui/content.cxx
[Libreoffice-commits] core.git: desktop/source
desktop/source/deployment/manager/dp_extensionmanager.cxx | 27 -- 1 file changed, 27 deletions(-) New commits: commit 675295d7e18c1505835893e51a853a5b4ce37ed6 Author: Katarina Behrens AuthorDate: Fri Dec 20 15:00:58 2019 +0100 Commit: Samuel Mehrbrodt CommitDate: Thu Feb 27 10:09:10 2020 +0100 Drop checking for user extensions w/ the same ID on every synchronization the question in 2012 was, is this still necessary? It slows down every warm start so let's assume it is not, remove it and see what happens Change-Id: Ia185fd18433d4145c0f33df8d7f60ba734f8504a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85609 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 708c40215fa5..558ebe02fdfd 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -1224,33 +1224,6 @@ sal_Bool ExtensionManager::synchronize( bModified |= static_cast(getBundledRepository()->synchronize(xAbortChannel, xCmdEnv)); progressBundled.update("\n\n"); -//Always determine the active extension. -//TODO: Is this still necessary? (It used to be necessary for the -// first-start optimization: The setup created the registration data -// for the bundled extensions (share/prereg/bundled) which was copied to -// the user installation when a user started OOo for the first time -// after running setup. All bundled extensions were registered at that -// moment. However, extensions with the same identifier could be in the -// shared or user repository, in which case the respective bundled -// extensions had to be revoked.) -try -{ -const uno::Sequence > > -seqSeqExt = getAllExtensions(xAbortChannel, xCmdEnv); -for (sal_Int32 i = 0; i < seqSeqExt.getLength(); i++) -{ -uno::Sequence > const & seqExt = -seqSeqExt[i]; -activateExtension(seqExt, isUserDisabled(seqExt), true, - xAbortChannel, xCmdEnv); -} -} -catch (...) -{ -//We catch the exception, so we can write the lastmodified file -//so we will no repeat this every time OOo starts. -OSL_FAIL("Extensions Manager: synchronize"); -} OUString lastSyncBundled("$BUNDLED_EXTENSIONS_USER/lastsynchronized"); writeLastModified(lastSyncBundled, xCmdEnv, m_xContext); OUString lastSyncShared("$SHARED_EXTENSIONS_USER/lastsynchronized"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/strings.hrc |1 + sw/source/ui/misc/bookmark.cxx | 13 +++-- sw/source/uibase/inc/bookmark.hxx |1 + sw/source/uibase/inc/conttree.hxx |1 + sw/source/uibase/shells/textsh1.cxx |2 +- sw/source/uibase/utlui/content.cxx | 32 ++-- 6 files changed, 33 insertions(+), 17 deletions(-) New commits: commit cb5d18871b46ef4f7bc47eb4d71df5374d712575 Author: Katarina Behrens AuthorDate: Fri Jan 24 18:40:24 2020 +0100 Commit: Michael Stahl CommitDate: Mon Feb 3 13:13:21 2020 +0100 sw: Optionally disable bookmark manipulation GUIs If the ProtectBookmarks bit is set, don't allow bookmark changes, neither via the bookmark dialog nor the navigator. Change-Id: I035faaf3871c7107dd1aac38c4e6867291827346 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87361 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 755bcc58e47c..a1297ed14d6e 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -684,6 +684,7 @@ #define STR_POSTIT_HIDE NC_("STR_POSTIT_HIDE", "Hide All") #define STR_POSTIT_DELETE NC_("STR_POSTIT_DELETE", "Delete All") #define STR_RESOLVEDNC_("STR_RESOLVED", "RESOLVED") +#define STR_PROTECTED NC_("STR_PROTECTED", "Protected") #define STR_MARGIN_TOOLTIP_LEFT NC_("STR_MARGIN_TOOLTIP_LEFT", "Left: ") #define STR_MARGIN_TOOLTIP_RIGHT NC_("STR_MARGIN_TOOLTIP_RIGHT", ". Right: ") diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 9243f6c02c34..d480068b1865 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -32,6 +32,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -78,12 +79,12 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void) } // allow to add new bookmark only if one name provided and it's not taken -m_xInsertBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 0 && !bHasForbiddenChars); +m_xInsertBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 0 && !bHasForbiddenChars && !m_bAreProtected); // allow to delete only if all bookmarks are recognized -m_xDeleteBtn->set_sensitive(nEntries > 0 && nSelectedEntries == nEntries); +m_xDeleteBtn->set_sensitive(nEntries > 0 && nSelectedEntries == nEntries && !m_bAreProtected); m_xGotoBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1); -m_xRenameBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1); +m_xRenameBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1 && !m_bAreProtected); } // callback to delete a text mark @@ -160,13 +161,12 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, weld::TreeView&, void) { m_xInsertBtn->set_sensitive(false); m_xGotoBtn->set_sensitive(nSelectedRows == 1); -m_xRenameBtn->set_sensitive(nSelectedRows == 1); -m_xDeleteBtn->set_sensitive(true); +m_xRenameBtn->set_sensitive(nSelectedRows == 1 && !m_bAreProtected); m_xEditBox->set_text(sEditBoxText.makeStringAndClear()); } else { -m_xInsertBtn->set_sensitive(true); +m_xInsertBtn->set_sensitive(!m_bAreProtected); m_xGotoBtn->set_sensitive(false); m_xRenameBtn->set_sensitive(false); m_xDeleteBtn->set_sensitive(false); @@ -340,6 +340,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS, m_xConditionED->set_visible( false ); } +m_bAreProtected = rSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS); } IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void) diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx index 7522dbe9bc12..3a8ee1506d58 100644 --- a/sw/source/uibase/inc/bookmark.hxx +++ b/sw/source/uibase/inc/bookmark.hxx @@ -69,6 +69,7 @@ class SwInsertBookmarkDlg : public SfxDialogController std::vector> aTableBookmarks; sal_Int32 m_nLastBookmarksCount; boolm_bSorted; +bool m_bAreProtected; std::unique_ptr m_xEditBox; std::unique_ptr m_xInsertBtn; diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 89333bf5f228..e9c227875c22 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -88,6 +88,7 @@ class SwContentTree final OUString const m_sPostItShow; OUString const m_sPostItHide; OUString const m_sPostItDelete; +OUString const m_sProtected; SwWrtShell* m_pHiddenShell; // dropped Doc SwWrtShell* m_pActiveShell; // the active or a const. open view diff --git
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/IDocumentSettingAccess.hxx |1 + sw/source/core/doc/DocumentSettingManager.cxx | 10 +++--- sw/source/core/inc/DocumentSettingManager.hxx |1 + sw/source/uibase/uno/SwXDocumentSettings.cxx | 18 ++ 4 files changed, 27 insertions(+), 3 deletions(-) New commits: commit a5cd4d39f09c3658c2b7cfff4ab6a74449d4f0c0 Author: Katarina Behrens AuthorDate: Fri Jan 24 17:05:53 2020 +0100 Commit: Michael Stahl CommitDate: Mon Feb 3 12:03:29 2020 +0100 Add ProtectBookmarksAndFields per-document option Change-Id: I8dac403ddea59026b5f52c132c8accc1bd0ada92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87360 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 56ff3ab04234..39ca9a52c87b 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -103,6 +103,7 @@ enum class DocumentSettingId EMBED_SYSTEM_FONTS, APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, CONTINUOUS_ENDNOTES, +PROTECT_BOOKMARKS_AND_FIELDS, }; /** Provides access to settings of a document diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index dc77c84f05cf..2b1330201e5b 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -93,7 +93,8 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc ) mbSubtractFlys(false), mApplyParagraphMarkFormatToNumbering(false), mbLastBrowseMode( false ), -mbDisableOffPagePositioning ( false ) +mbDisableOffPagePositioning ( false ), +mbProtectBookmarksAndFields( false ) // COMPATIBILITY FLAGS END { @@ -217,8 +218,8 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const case DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: return mApplyParagraphMarkFormatToNumbering; case DocumentSettingId::DISABLE_OFF_PAGE_POSITIONING: return mbDisableOffPagePositioning; case DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA: return mbEmptyDbFieldHidesPara; -case DocumentSettingId::CONTINUOUS_ENDNOTES: -return mbContinuousEndnotes; +case DocumentSettingId::CONTINUOUS_ENDNOTES: return mbContinuousEndnotes; +case DocumentSettingId::PROTECT_BOOKMARKS_AND_FIELDS: return mbProtectBookmarksAndFields; default: OSL_FAIL("Invalid setting id"); } @@ -454,6 +455,9 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo case DocumentSettingId::CONTINUOUS_ENDNOTES: mbContinuousEndnotes = value; break; +case DocumentSettingId::PROTECT_BOOKMARKS_AND_FIELDS: +mbProtectBookmarksAndFields = value; +break; default: OSL_FAIL("Invalid setting id"); } diff --git a/sw/source/core/inc/DocumentSettingManager.hxx b/sw/source/core/inc/DocumentSettingManager.hxx index be639b1f3421..9ed267e70669 100644 --- a/sw/source/core/inc/DocumentSettingManager.hxx +++ b/sw/source/core/inc/DocumentSettingManager.hxx @@ -162,6 +162,7 @@ class DocumentSettingManager : bool mbDisableOffPagePositioning; // tdf#112443 bool mbEmptyDbFieldHidesPara; bool mbContinuousEndnotes = false; +bool mbProtectBookmarksAndFields; public: diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index 5327dae31000..238c7d8dd7c7 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -140,6 +140,7 @@ enum SwDocumentSettingsPropertyHandles HANDLE_DISABLE_OFF_PAGE_POSITIONING, HANDLE_EMPTY_DB_FIELD_HIDES_PARA, HANDLE_CONTINUOUS_ENDNOTES, +HANDLE_PROTECT_BOOKMARKS_AND_FIELDS, }; } @@ -227,6 +228,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo() { OUString("DisableOffPagePositioning"), HANDLE_DISABLE_OFF_PAGE_POSITIONING, cppu::UnoType::get(), 0}, { OUString("EmptyDbFieldHidesPara"), HANDLE_EMPTY_DB_FIELD_HIDES_PARA, cppu::UnoType::get(), 0 }, { OUString("ContinuousEndnotes"), HANDLE_CONTINUOUS_ENDNOTES, cppu::UnoType::get(), 0 }, +{ OUString("ProtectBookmarksAndFields"), HANDLE_PROTECT_BOOKMARKS_AND_FIELDS, cppu::UnoType::get(), 0 }, /* * As OS said, we don't have a view when we need to set this, so I have to * find another solution before adding them to this property set - MTG @@ -935,6 +937,16 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf } } break; +case HANDLE_PROTECT_BOOKMARKS_AND_FIELDS: +{ +bool bTmp; +if (rValue >>= bTmp) +{ + mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_BOOKMARKS_AND_FIELDS,
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - slideshow/source
slideshow/source/engine/shapes/viewmediashape.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 59edd056643125978483e7292bfb4b7be707cf3d Author: Katarina Behrens AuthorDate: Tue Jan 21 13:16:09 2020 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sun Jan 26 14:35:01 2020 +0100 tdf#126459: Consider translated origin of the view also on resize use-case is the presenter console on 2nd screen, media shape must be placed relative to the window w/ slide preview, not relative to the main window Change-Id: I120f86e399563d2aafc31d88d0a7f9d357f4840c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87135 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit d4561921dde7d350b3b4d5f793871bea8ba4546d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87258 Reviewed-by: Adolfo Jayme Barrientos diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index 057b508437ae..c17b550372b1 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -244,8 +244,13 @@ namespace slideshow if( rRangePix.isEmpty() ) return true; -const Point aPosPixel( rRangePix.getMinX() + maWindowOffset.X, - rRangePix.getMinY() + maWindowOffset.Y ); +awt::Rectangle aCanvasArea; +UnoViewSharedPtr xUnoView(std::dynamic_pointer_cast(mpViewLayer)); +if (xUnoView) +aCanvasArea = xUnoView->getUnoView()->getCanvasArea(); + +const Point aPosPixel( rRangePix.getMinX() + maWindowOffset.X + aCanvasArea.X, + rRangePix.getMinY() + maWindowOffset.Y + aCanvasArea.Y ); const Size aSizePixel( rRangePix.getMaxX() - rRangePix.getMinX(), rRangePix.getMaxY() - rRangePix.getMinY() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - editeng/source sd/qa
editeng/source/editeng/impedit2.cxx |6 -- editeng/source/xml/xmltxtimp.cxx |5 - sd/qa/unit/tiledrendering/tiledrendering.cxx | 14 ++ 3 files changed, 18 insertions(+), 7 deletions(-) New commits: commit 9699108e60698355054d68a3da5a3e84913248cf Author: Katarina Behrens AuthorDate: Fri Jan 17 14:30:56 2020 +0100 Commit: Michael Stahl CommitDate: Fri Jan 24 11:02:29 2020 +0100 tdf#128046: preserve list levels on paste done in two steps: 1) bullet and numbering properties must be included in the property list of SvxUnoText on import from ODF clipboard (SvxReadXML) 2) in ConnectParagraphs, don't merge para attributes if the paragraph to be deleted is empty. Paragraph breaks are inserted before paste so this would make the last list level of the pasted text take the properties of the empty paragraph and thus lose its indentation Also updated tdf#103083 unit test to be more specific and test that bullet properties don't get lost after paste. Previously only count of SfxItems was tested which is somehow fragile and fails bc paste adds a paragraph style Change-Id: Ia162adb7abf145a8217f21c7ebfe06b69731e2a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86983 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 66ed51712bb323bba7d1a0b0d21b256e5f5f9ccf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87284 Reviewed-by: Michael Stahl diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index c65dc164ea4a..c92cbe85cf98 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -2251,7 +2251,9 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR if ( bBackward ) { pLeft->SetStyleSheet( pRight->GetStyleSheet() ); -pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() ); +// it feels wrong to set pLeft's attribs if pRight is empty, tdf#128046 +if ( pRight->Len() ) +pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() ); pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont(); } @@ -3508,7 +3510,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( std::filebuf afilebuf; afilebuf.open ("gsoc17_clipboard_test.xml",std::ios::out); std::ostream os(); -os.write((const char*)(pDataObj->GetODFStream().GetBuffer()), pDataObj->GetODFStream().remainingSize()); +os.write((const char*)(pDataObj->GetODFStream().GetData()), pDataObj->GetODFStream().remainingSize()); afilebuf.close(); */ //dumping ends diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 51994a323080..7a6b0b494786 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -147,7 +147,10 @@ EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection { SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_FONT_PROPERTIES, -// SVX_UNOEDIT_OUTLINER_PROPERTIES, +// bullets & numbering props, tdf#128046 +{ OUString(UNO_NAME_NUMBERING_RULES),EE_PARA_NUMBULLET, cppu::UnoType::get(), 0, 0 }, +{ OUString(UNO_NAME_NUMBERING), EE_PARA_BULLETSTATE,cppu::UnoType::get(), 0, 0 }, +{ OUString(UNO_NAME_NUMBERING_LEVEL),EE_PARA_OUTLLEVEL, ::cppu::UnoType::get(), 0, 0 }, SVX_UNOEDIT_PARA_PROPERTIES, { OUString(), 0, css::uno::Type(), 0, 0 } }; diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index cfcf3241e2b9..ff379531338f 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -1424,8 +1425,9 @@ void SdTiledRenderingTest::testTdf103083() SdrOutliner* pOutliner = pView->GetTextEditOutliner(); CPPUNIT_ASSERT_EQUAL(OUString("No-Logo Content~LT~Gliederung 2"), pOutliner->GetStyleSheet(2)->GetName()); -const SfxItemSet& rParagraphItemSet1 = pTextObject->GetOutlinerParaObject()->GetTextObject().GetParaAttribs(2); -CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rParagraphItemSet1.Count()); +const EditTextObject& aEdit = pTextObject->GetOutlinerParaObject()->GetTextObject(); +const SvxNumBulletItem* pNumFmt = aEdit.GetParaAttribs(2).GetItem(EE_PARA_NUMBULLET); +SvxNumberFormat aNumFmt(pNumFmt->GetNumRule()->GetLevel(2)); // cut contents of bullet item comphelper::dispatchCommand(".uno:Cut", uno::Sequence()); @@ -1452,8 +1454,12 @@ void SdTiledRenderingTest::testTdf103083() CPPUNIT_ASSERT_EQUAL(OUString("No-Logo Content~LT~Gliederung
[Libreoffice-commits] core.git: editeng/source sd/qa
editeng/source/editeng/impedit2.cxx |6 -- editeng/source/xml/xmltxtimp.cxx |5 - sd/qa/unit/tiledrendering/tiledrendering.cxx | 14 ++ 3 files changed, 18 insertions(+), 7 deletions(-) New commits: commit 66ed51712bb323bba7d1a0b0d21b256e5f5f9ccf Author: Katarina Behrens AuthorDate: Fri Jan 17 14:30:56 2020 +0100 Commit: Katarina Behrens CommitDate: Thu Jan 23 15:01:33 2020 +0100 tdf#128046: preserve list levels on paste done in two steps: 1) bullet and numbering properties must be included in the property list of SvxUnoText on import from ODF clipboard (SvxReadXML) 2) in ConnectParagraphs, don't merge para attributes if the paragraph to be deleted is empty. Paragraph breaks are inserted before paste so this would make the last list level of the pasted text take the properties of the empty paragraph and thus lose its indentation Also updated tdf#103083 unit test to be more specific and test that bullet properties don't get lost after paste. Previously only count of SfxItems was tested which is somehow fragile and fails bc paste adds a paragraph style Change-Id: Ia162adb7abf145a8217f21c7ebfe06b69731e2a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86983 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 64c9f10f5135..30e12bec9a56 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -2232,7 +2232,9 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR if ( bBackward ) { pLeft->SetStyleSheet( pRight->GetStyleSheet() ); -pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() ); +// it feels wrong to set pLeft's attribs if pRight is empty, tdf#128046 +if ( pRight->Len() ) +pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() ); pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont(); } @@ -3489,7 +3491,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( std::filebuf afilebuf; afilebuf.open ("gsoc17_clipboard_test.xml",std::ios::out); std::ostream os(); -os.write((const char*)(pDataObj->GetODFStream().GetBuffer()), pDataObj->GetODFStream().remainingSize()); +os.write((const char*)(pDataObj->GetODFStream().GetData()), pDataObj->GetODFStream().remainingSize()); afilebuf.close(); */ //dumping ends diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index acd86b77cfee..f0bb5d171ceb 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -138,7 +138,10 @@ EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection { SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_FONT_PROPERTIES, -// SVX_UNOEDIT_OUTLINER_PROPERTIES, +// bullets & numbering props, tdf#128046 +{ OUString(UNO_NAME_NUMBERING_RULES),EE_PARA_NUMBULLET, cppu::UnoType::get(), 0, 0 }, +{ OUString(UNO_NAME_NUMBERING), EE_PARA_BULLETSTATE,cppu::UnoType::get(), 0, 0 }, +{ OUString(UNO_NAME_NUMBERING_LEVEL),EE_PARA_OUTLLEVEL, ::cppu::UnoType::get(), 0, 0 }, SVX_UNOEDIT_PARA_PROPERTIES, { OUString(), 0, css::uno::Type(), 0, 0 } }; diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 1e40d9645627..2fe192f66de9 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -1428,8 +1429,9 @@ void SdTiledRenderingTest::testTdf103083() SdrOutliner* pOutliner = pView->GetTextEditOutliner(); CPPUNIT_ASSERT_EQUAL(OUString("No-Logo Content~LT~Gliederung 2"), pOutliner->GetStyleSheet(2)->GetName()); -const SfxItemSet& rParagraphItemSet1 = pTextObject->GetOutlinerParaObject()->GetTextObject().GetParaAttribs(2); -CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rParagraphItemSet1.Count()); +const EditTextObject& aEdit = pTextObject->GetOutlinerParaObject()->GetTextObject(); +const SvxNumBulletItem* pNumFmt = aEdit.GetParaAttribs(2).GetItem(EE_PARA_NUMBULLET); +SvxNumberFormat aNumFmt(pNumFmt->GetNumRule()->GetLevel(2)); // cut contents of bullet item comphelper::dispatchCommand(".uno:Cut", uno::Sequence()); @@ -1456,8 +1458,12 @@ void SdTiledRenderingTest::testTdf103083() CPPUNIT_ASSERT_EQUAL(OUString("No-Logo Content~LT~Gliederung 2"), pOutliner->GetStyleSheet(2)->GetName()); -const SfxItemSet& rParagraphItemSet2 =
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - include/vcl vcl/unx
include/vcl/sysdata.hxx |2 +- vcl/unx/generic/window/salframe.cxx |2 ++ vcl/unx/generic/window/salobj.cxx |2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) New commits: commit 95339c04fa242628e7b3cae3d4aecee0cb75e017 Author: Katarina Behrens AuthorDate: Wed Jan 22 11:06:59 2020 +0100 Commit: Stephan Bergmann CommitDate: Thu Jan 23 13:06:54 2020 +0100 Related tdf#126459: fix crash in presenter console using gen vclplug A slide with video is needed to reproduce Regression from commit ac87cfdf263d2abd97b32857534d0f749b7c4479, 'toolkit' and 'platform' bits were never set (bc irrelevant) in gen vclplug but now if not set, values mapping to 0 (Gtk3, Wayland) will be used and things go down the drain in avmedia/gstplayer then Just between us girls, nobody in their right mind would use gen vclplug for presentation, but crash is not nice so let's fix this Change-Id: If318ab93897f9f4854f7316e630c35aaec2480fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87185 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 13bc1ec30c5adf05ff987c25634b845bab7bc4ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87237 Reviewed-by: Michael Stahl diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index 393116d98c70..9c4e271a2963 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -61,7 +61,7 @@ struct SystemEnvData #elif defined( IOS ) // Nothing #elif defined( UNX ) -enum class Toolkit { Gtk3, Qt5 }; +enum class Toolkit { Gtk3, Qt5, Gen }; enum class Platform { Wayland, Xcb }; void* pDisplay; // the relevant display connection diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 83dfaf35e434..95e1bf2f23b8 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -955,6 +955,8 @@ const SystemEnvData* X11SalFrame::GetSystemData() const pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nXScreen ).GetVisual(); pFrame->maSystemChildData.nScreen = m_nXScreen.getXScreen(); pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow(); +pFrame->maSystemChildData.toolkit = SystemEnvData::Toolkit::Gen; +pFrame->maSystemChildData.platform = SystemEnvData::Platform::Xcb; return } diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index c5719362af3d..b19dd61fa3de 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -225,6 +225,8 @@ X11SalObject::X11SalObject() maSystemChildData.pWidget = nullptr; maSystemChildData.pVisual = nullptr; maSystemChildData.aShellWindow = 0; +maSystemChildData.toolkit = SystemEnvData::Toolkit::Gen; +maSystemChildData.platform = SystemEnvData::Platform::Xcb; std::list< SalObject* >& rObjects = vcl_sal::getSalDisplay(GetGenericUnixSalData())->getSalObjects(); rObjects.push_back( this ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: slideshow/source
slideshow/source/engine/shapes/viewmediashape.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit d4561921dde7d350b3b4d5f793871bea8ba4546d Author: Katarina Behrens AuthorDate: Tue Jan 21 13:16:09 2020 +0100 Commit: Katarina Behrens CommitDate: Thu Jan 23 10:17:44 2020 +0100 tdf#126459: Consider translated origin of the view also on resize use-case is the presenter console on 2nd screen, media shape must be placed relative to the window w/ slide preview, not relative to the main window Change-Id: I120f86e399563d2aafc31d88d0a7f9d357f4840c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87135 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index e68cdf2b543a..3e8056fa8539 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -227,8 +227,13 @@ namespace slideshow if( rRangePix.isEmpty() ) return true; -const Point aPosPixel( rRangePix.getMinX() + maWindowOffset.X, - rRangePix.getMinY() + maWindowOffset.Y ); +awt::Rectangle aCanvasArea; +UnoViewSharedPtr xUnoView(std::dynamic_pointer_cast(mpViewLayer)); +if (xUnoView) +aCanvasArea = xUnoView->getUnoView()->getCanvasArea(); + +const Point aPosPixel( rRangePix.getMinX() + maWindowOffset.X + aCanvasArea.X, + rRangePix.getMinY() + maWindowOffset.Y + aCanvasArea.Y ); const Size aSizePixel( rRangePix.getMaxX() - rRangePix.getMinX(), rRangePix.getMaxY() - rRangePix.getMinY() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/vcl vcl/unx
include/vcl/sysdata.hxx |2 +- vcl/unx/generic/window/salframe.cxx |2 ++ vcl/unx/generic/window/salobj.cxx |2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) New commits: commit 13bc1ec30c5adf05ff987c25634b845bab7bc4ae Author: Katarina Behrens AuthorDate: Wed Jan 22 11:06:59 2020 +0100 Commit: Stephan Bergmann CommitDate: Thu Jan 23 09:10:15 2020 +0100 Related tdf#126459: fix crash in presenter console using gen vclplug A slide with video is needed to reproduce Regression from commit ac87cfdf263d2abd97b32857534d0f749b7c4479, 'toolkit' and 'platform' bits were never set (bc irrelevant) in gen vclplug but now if not set, values mapping to 0 (Gtk3, Wayland) will be used and things go down the drain in avmedia/gstplayer then Just between us girls, nobody in their right mind would use gen vclplug for presentation, but crash is not nice so let's fix this Change-Id: If318ab93897f9f4854f7316e630c35aaec2480fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87185 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index 41277c5b9587..89122f51c75d 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -61,7 +61,7 @@ struct SystemEnvData #elif defined( IOS ) // Nothing #elif defined( UNX ) -enum class Toolkit { Gtk3, Qt5 }; +enum class Toolkit { Gtk3, Qt5, Gen }; enum class Platform { Wayland, Xcb }; void* pDisplay; // the relevant display connection diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 0275d1e053d2..b618ab8c8a7a 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -956,6 +956,8 @@ const SystemEnvData* X11SalFrame::GetSystemData() const pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nXScreen ).GetVisual(); pFrame->maSystemChildData.nScreen = m_nXScreen.getXScreen(); pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow(); +pFrame->maSystemChildData.toolkit = SystemEnvData::Toolkit::Gen; +pFrame->maSystemChildData.platform = SystemEnvData::Platform::Xcb; return } diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index c5719362af3d..b19dd61fa3de 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -225,6 +225,8 @@ X11SalObject::X11SalObject() maSystemChildData.pWidget = nullptr; maSystemChildData.pVisual = nullptr; maSystemChildData.aShellWindow = 0; +maSystemChildData.toolkit = SystemEnvData::Toolkit::Gen; +maSystemChildData.platform = SystemEnvData::Platform::Xcb; std::list< SalObject* >& rObjects = vcl_sal::getSalDisplay(GetGenericUnixSalData())->getSalObjects(); rObjects.push_back( this ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sd/source
sd/source/ui/func/fupage.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 308249b43f8d62967f7bfa974f3e4f3f6182a010 Author: Katarina Behrens AuthorDate: Tue Nov 12 00:08:25 2019 +0100 Commit: Xisco Faulí CommitDate: Wed Nov 20 23:46:06 2019 +0100 tdf#125449 follow-up: unique gradient names in Impress area dlg as seen in tdf#94300 chart prefers to name anonymous (non-preset) gradients all by itself However tdf#99908 shows that ODF import doesn't like anonymous gradients. This is a bug in xmloff style import and should eventually be fixed there. Here we implement the same band-aid solution tdf#99908 implements for Impress sidebar Change-Id: Ia39f581aee875ac95faa5c502a3479ed5d7974d8 Reviewed-on: https://gerrit.libreoffice.org/82522 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 34a3afecaaab3dc4898b33e0981d8b231351fe37) Reviewed-on: https://gerrit.libreoffice.org/83185 Reviewed-by: Xisco Faulí (cherry picked from commit c00775925325b04b3d707df0d494464f864f6fc0) Reviewed-on: https://gerrit.libreoffice.org/83286 diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index ba77b29c54ef..b5d73efa4367 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -347,6 +348,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent) ( aMergedAttr.GetItem( XATTR_FILLSTYLE )->GetValue() == drawing::FillStyle_NONE ) ) ) mbPageBckgrdDeleted = true; +const XFillGradientItem* pTempGradItem = pTempSet->GetItem(XATTR_FILLGRADIENT); +if (pTempGradItem && pTempGradItem->GetName().isEmpty()) +{ +// MigrateItemSet guarantees unique gradient names +SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items{} ); +aMigrateSet.Put( XFillGradientItem("gradient", pTempGradItem->GetGradientValue()) ); +SdrModel::MigrateItemSet( , pTempSet.get(), mpDoc); +} + if( !mbMasterPage && bChanges && mbPageBckgrdDeleted ) { mpBackgroundObjUndoAction.reset( new SdBackgroundObjUndoAction( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sd/source
sd/source/ui/func/fupage.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit c00775925325b04b3d707df0d494464f864f6fc0 Author: Katarina Behrens AuthorDate: Tue Nov 12 00:08:25 2019 +0100 Commit: Xisco Faulí CommitDate: Tue Nov 19 17:47:28 2019 +0100 tdf#125449 follow-up: unique gradient names in Impress area dlg as seen in tdf#94300 chart prefers to name anonymous (non-preset) gradients all by itself However tdf#99908 shows that ODF import doesn't like anonymous gradients. This is a bug in xmloff style import and should eventually be fixed there. Here we implement the same band-aid solution tdf#99908 implements for Impress sidebar Change-Id: Ia39f581aee875ac95faa5c502a3479ed5d7974d8 Reviewed-on: https://gerrit.libreoffice.org/82522 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 34a3afecaaab3dc4898b33e0981d8b231351fe37) Reviewed-on: https://gerrit.libreoffice.org/83185 Reviewed-by: Xisco Faulí diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index bad262357f47..7c2654e0bba0 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -387,6 +388,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest& } } +const XFillGradientItem* pTempGradItem = pTempSet->GetItem(XATTR_FILLGRADIENT); +if (pTempGradItem && pTempGradItem->GetName().isEmpty()) +{ +// MigrateItemSet guarantees unique gradient names +SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items{} ); +aMigrateSet.Put( XFillGradientItem("gradient", pTempGradItem->GetGradientValue()) ); +SdrModel::MigrateItemSet( , pTempSet.get(), mpDoc); +} + if( !mbMasterPage && bChanges && mbPageBckgrdDeleted ) { mpBackgroundObjUndoAction.reset( new SdBackgroundObjUndoAction( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/ui/func/fupage.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 34a3afecaaab3dc4898b33e0981d8b231351fe37 Author: Katarina Behrens AuthorDate: Tue Nov 12 00:08:25 2019 +0100 Commit: Katarina Behrens CommitDate: Tue Nov 19 10:23:12 2019 +0100 tdf#125449 follow-up: unique gradient names in Impress area dlg as seen in tdf#94300 chart prefers to name anonymous (non-preset) gradients all by itself However tdf#99908 shows that ODF import doesn't like anonymous gradients. This is a bug in xmloff style import and should eventually be fixed there. Here we implement the same band-aid solution tdf#99908 implements for Impress sidebar Change-Id: Ia39f581aee875ac95faa5c502a3479ed5d7974d8 Reviewed-on: https://gerrit.libreoffice.org/82522 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index bad262357f47..7c2654e0bba0 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -387,6 +388,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest& } } +const XFillGradientItem* pTempGradItem = pTempSet->GetItem(XATTR_FILLGRADIENT); +if (pTempGradItem && pTempGradItem->GetName().isEmpty()) +{ +// MigrateItemSet guarantees unique gradient names +SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items{} ); +aMigrateSet.Put( XFillGradientItem("gradient", pTempGradItem->GetGradientValue()) ); +SdrModel::MigrateItemSet( , pTempSet.get(), mpDoc); +} + if( !mbMasterPage && bChanges && mbPageBckgrdDeleted ) { mpBackgroundObjUndoAction.reset( new SdBackgroundObjUndoAction( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdpage.cxx | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) New commits: commit 5727f7262d48864ec27aa190631284af7d2a7ce8 Author: Katarina Behrens AuthorDate: Wed Oct 30 14:32:17 2019 +0100 Commit: Michael Stahl CommitDate: Fri Nov 1 10:30:09 2019 +0100 crashtesting: fix creating increments array in tdf106848-1.odt else duplicate indexes happen and sort algorithm falls flat on its face Change-Id: I2b79e8df0f0a8e68117029630c0e026b8c202b02 Reviewed-on: https://gerrit.libreoffice.org/81775 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index a6cef0633542..ea99495edc24 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -627,29 +627,25 @@ void SdrObjList::sort( std::vector& sortOrder) // example aShapesWithTextbox [0 2] } -aIncrements.push_back(0); -aDuplicates.push_back(sortOrder[0]); +for (size_t i = 0; i< sortOrder.size(); ++i) +{ -// corner case: 1st shape is a textbox, add it twice -// otherwise sortOrder loop below will skip it -if (aShapesWithTextbox.count(sortOrder[0]) > 0) -aDuplicates.push_back(sortOrder[0]); + if (aShapesWithTextbox.count(sortOrder[i]) > 0) + aDuplicates.push_back(sortOrder[i]); -for (size_t i = 1; i< sortOrder.size(); ++i) -{ aDuplicates.push_back(sortOrder[i]); - if (aShapesWithTextbox.count(sortOrder[i]) > 0) - { + // example aDuplicates [2 2 0 0 1] +} + +aIncrements.push_back(0); +for (size_t i = 1; i< sortOrder.size(); ++i) +{ + if (aShapesWithTextbox.count(i)) aIncrements.push_back(aIncrements[i-1] + 1 ); - aDuplicates.push_back(sortOrder[i]); - } else - { aIncrements.push_back(aIncrements[i-1]); - } - // example aDuplicates [2 2 0 0 1] // example aIncrements [0 1 1] } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svx offapi/com offapi/UnoApi_offapi.mk svx/source xmloff/source
include/svx/svdpage.hxx |1 include/svx/unopage.hxx |9 ++ offapi/UnoApi_offapi.mk |1 offapi/com/sun/star/drawing/XShapes3.idl | 43 + svx/source/svdraw/svdpage.cxx| 96 +++ svx/source/unodraw/unopage.cxx |7 ++ xmloff/source/draw/shapeimport.cxx | 37 +++ 7 files changed, 192 insertions(+), 2 deletions(-) New commits: commit a8b1699ca9c7e8c43eff79467451fd1fcb4fde9b Author: Katarina Behrens AuthorDate: Mon Jul 1 18:20:02 2019 +0200 Commit: Katarina Behrens CommitDate: Fri Oct 25 16:27:04 2019 +0200 speed-up shape import if shapes need z-order rearranging setting z-order individually on each shape and broadcasting is O(n^2) (remaining shapes also need reordering) and this is bad bad bad for performance Change-Id: Ic9c9137a097f6ff524192693910f221885f77cc4 Reviewed-on: https://gerrit.libreoffice.org/75055 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index 5ab621ccbd4c..60cf0bb49004 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -108,6 +108,7 @@ public: bool IsObjOrdNumsDirty() const{ return mbObjOrdNumsDirty; } virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE); virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE); +virtual void sort( std::vector& sortOrder ); /// remove from list without delete virtual SdrObject* NbcRemoveObject(size_t nObjNum); diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx index 50b54a62c754..6814f859904a 100644 --- a/include/svx/unopage.hxx +++ b/include/svx/unopage.hxx @@ -24,12 +24,13 @@ #include #include #include +#include #include #include #include #include -#include +#include #include #include @@ -50,9 +51,10 @@ enum class SdrInventor : sal_uInt32; #define TWIPS_TO_MM(val) ((val * 127 + 36) / 72) #define MM_TO_TWIPS(val) ((val * 72 + 63) / 127) -class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawing::XDrawPage, +class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper7< css::drawing::XDrawPage, css::drawing::XShapeGrouper, css::drawing::XShapes2, + css::drawing::XShapes3, css::lang::XServiceInfo, css::lang::XUnoTunnel, css::lang::XComponent>, @@ -109,6 +111,9 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin virtual void SAL_CALL addTop( const css::uno::Reference< css::drawing::XShape >& xShape ) override; virtual void SAL_CALL addBottom( const css::uno::Reference< css::drawing::XShape >& xShape ) override; +// XShapes3 +virtual void SAL_CALL sort( const css::uno::Sequence< sal_Int32 >& sortOrder ) override; + // XElementAccess virtual css::uno::Type SAL_CALL getElementType() override; virtual sal_Bool SAL_CALL hasElements() override; diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 4e36995a7d53..5fa55f8f191d 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -2376,6 +2376,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/drawing,\ XShapeMirror \ XShapes \ XShapes2 \ + XShapes3 \ XSlidePreviewCache \ XSlidePreviewCacheListener \ XSlideRenderer \ diff --git a/offapi/com/sun/star/drawing/XShapes3.idl b/offapi/com/sun/star/drawing/XShapes3.idl new file mode 100644 index ..ebb23e7d3a11 --- /dev/null +++ b/offapi/com/sun/star/drawing/XShapes3.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_drawing_XShapes3_idl__ +#define __com_sun_star_drawing_XShapes3_idl__ + +#include + +module com { module sun { module star { module drawing { + +/** + * Yet another XShapes interface, enables sorting shapes with + * some extra attention paid to shapes with textboxes and overall + * performance + * + * @since LibreOffice 6.4 + */ +interface XShapes3 +{ +/** + * Sort shapes according to given sort order, for perf reason + * just rearrange and don't broadcast + * + * @param desired order of the shapes + * + * @since LibreOffice 6.4 + */ + +void sort( [in] sequence< long> sortOrder ) +
[Libreoffice-commits] core.git: sw/source
sw/source/core/draw/dflyobj.cxx |9 ++--- sw/source/core/inc/dflyobj.hxx |4 +++- sw/source/core/layout/atrfrm.cxx | 10 ++ 3 files changed, 15 insertions(+), 8 deletions(-) New commits: commit 0648aba5740a9ab62a98695a493ea9d1edbc7207 Author: Katarina Behrens AuthorDate: Wed Aug 7 13:48:19 2019 +0200 Commit: Miklos Vajna CommitDate: Thu Oct 24 16:55:16 2019 +0200 ODF-imported textboxes identify themselves as such at least those that are created by SwTextBoxHelper::create Change-Id: I252ba397570eec2d3b240d0ac388f4391e1bb930 Reviewed-on: https://gerrit.libreoffice.org/77103 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 423b41ed64e9..72f62d3ff101 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -126,7 +126,8 @@ std::unique_ptr SwFlyDrawObj::CreateObjectSpecificVie } SwFlyDrawObj::SwFlyDrawObj(SdrModel& rSdrModel) -: SdrObject(rSdrModel) +: SdrObject(rSdrModel), +mbIsTextBox(false) { } @@ -145,12 +146,6 @@ sal_uInt16 SwFlyDrawObj::GetObjIdentifier() const return SwFlyDrawObjIdentifier; } -bool SwFlyDrawObj::IsTextBox() const -{ -const SwFrameFormat* pFrameFormat = FindFrameFormat(this); -return SwTextBoxHelper::isTextBox(pFrameFormat, RES_FLYFRMFMT); -} - // TODO: Need own primitive to get the FlyFrame paint working namespace drawinglayer { diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index d96029be3eeb..b5a0357187f6 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -35,6 +35,7 @@ class SwFlyDrawObj : public SdrObject { private: virtual std::unique_ptr CreateObjectSpecificProperties() override; +bool mbIsTextBox; protected: // #i95264# SwFlyDrawObj needs an own VC since createViewIndependentPrimitive2DSequence() @@ -50,7 +51,8 @@ public: // for instantiation of this class while loading (via factory) virtual SdrInventor GetObjInventor() const override; virtual sal_uInt16 GetObjIdentifier() const override; -bool IsTextBox() const override; +virtual bool IsTextBox() const override { return mbIsTextBox; } +virtual void SetTextBox(bool bIsTextBox) { mbIsTextBox = bIsTextBox; } }; // virtual objects for Flys diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index f657bf55db93..0014d84249b0 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2490,6 +2490,16 @@ void SwFrameFormat::SetOtherTextBoxFormat( SwFrameFormat *pFormat ) assert( nullptr != m_pOtherTextBoxFormat ); } m_pOtherTextBoxFormat = pFormat; + +SdrObject* pObj = FindSdrObject(); + +if (pObj) +{ +SwFlyDrawObj* pSwFlyDraw = dynamic_cast(pObj); + +if (pSwFlyDraw) +pSwFlyDraw->SetTextBox(true); +} } bool SwFrameFormat::supportsFullDrawingLayerFillAttributeSet() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - include/vcl vcl/inc vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win
include/vcl/outdev.hxx |2 vcl/inc/PhysicalFontFace.hxx |2 vcl/inc/fontinstance.hxx |9 + vcl/inc/fontselect.hxx |3 vcl/inc/impfontcache.hxx | 20 ++- vcl/inc/qt5/Qt5Font.hxx|3 vcl/inc/qt5/Qt5FontFace.hxx|3 vcl/inc/qt5/Qt5Graphics.hxx|2 vcl/inc/quartz/salgdi.h|6 - vcl/inc/sallayout.hxx |2 vcl/inc/salwtype.hxx |3 vcl/inc/unx/freetype_glyphcache.hxx|4 vcl/inc/unx/glyphcache.hxx |5 vcl/inc/win/salgdi.h |7 - vcl/inc/win/winlayout.hxx |2 vcl/qt5/Qt5FontFace.cxx|3 vcl/qt5/Qt5Graphics.cxx|2 vcl/qt5/Qt5Graphics_Text.cxx |8 - vcl/quartz/ctfonts.cxx |2 vcl/quartz/salgdi.cxx | 10 + vcl/source/font/PhysicalFontFace.cxx |2 vcl/source/font/fontcache.cxx | 148 +++-- vcl/source/font/fontinstance.cxx | 22 +++ vcl/source/font/fontselect.cxx |1 vcl/source/gdi/CommonSalLayout.cxx |2 vcl/source/gdi/pdfwriter_impl.cxx | 12 +- vcl/source/gdi/print.cxx | 25 +++- vcl/source/gdi/virdev.cxx |6 - vcl/source/outdev/font.cxx | 26 ++-- vcl/source/outdev/outdev.cxx |3 vcl/source/outdev/outdevstate.cxx |7 + vcl/source/outdev/textline.cxx |8 - vcl/source/window/window.cxx |5 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |9 - vcl/win/gdi/salfont.cxx| 29 +++- vcl/win/gdi/salgdi.cxx |1 vcl/win/gdi/winlayout.cxx |5 37 files changed, 293 insertions(+), 116 deletions(-) New commits: commit cb63178ec92253c502710fce044700d2a6b86851 Author: Katarina Behrens AuthorDate: Wed Oct 2 11:32:06 2019 +0200 Commit: Thorsten Behrens CommitDate: Mon Oct 7 04:13:36 2019 +0200 Revert series of LogicalFontInstance refactorings that cripple MM on Windows. They were backported in anticipation of backporting kde5 vclplug to 6.1 but otherwise add ~no value. Those are the reverted changes: e1266add9454 qt5: hold LogicalFontInstance with rtl::Reference ef759d03610b fixup 3eb3f0d9bc7fa94510 dbc1d2fe423b hold LogicalFontInstance with rtl::Reference Change-Id: Ieb0790797630c59ba233145c2ec075cf99725f8c Reviewed-on: https://gerrit.libreoffice.org/80247 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index d0231e78a18e..59780f9f5e2f 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -332,7 +332,7 @@ private: mutable VclPtrmpPrevGraphics; ///< Previous output device in list mutable VclPtrmpNextGraphics; ///< Next output device in list GDIMetaFile*mpMetaFile; -mutable rtl::Reference mpFontInstance; +mutable LogicalFontInstance*mpFontInstance; mutable ImplFontCache* mpFontCache; mutable PhysicalFontCollection* mpFontCollection; mutable std::unique_ptr mpDeviceFontList; diff --git a/vcl/inc/PhysicalFontFace.hxx b/vcl/inc/PhysicalFontFace.hxx index e289345716ca..2406b6cf41da 100644 --- a/vcl/inc/PhysicalFontFace.hxx +++ b/vcl/inc/PhysicalFontFace.hxx @@ -54,7 +54,7 @@ public: class VCL_PLUGIN_PUBLIC PhysicalFontFace : public FontAttributes, public salhelper::SimpleReferenceObject { public: -virtual rtl::Reference CreateFontInstance(const FontSelectPattern&) const; +virtual LogicalFontInstance* CreateFontInstance(const FontSelectPattern&) const; virtual rtl::Reference Clone() const = 0; int GetHeight() const { return mnHeight; } diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx index 149bb553c3eb..317b7181198d 100644 --- a/vcl/inc/fontinstance.hxx +++ b/vcl/inc/fontinstance.hxx @@ -24,7 +24,6 @@ #include "impfontmetricdata.hxx" #include -#include #include #include @@ -36,7 +35,7 @@ class PhysicalFontFace; // TODO: allow sharing of metrics for related fonts -class VCL_PLUGIN_PUBLIC LogicalFontInstance : public salhelper::SimpleReferenceObject +class VCL_PLUGIN_PUBLIC LogicalFontInstance { // just declaring the factory function doesn't work AKA // friend LogicalFontInstance* PhysicalFontFace::CreateFontInstance(const FontSelectPattern&) const; @@ -44,7 +43,7 @@ class VCL_PLUGIN_PUBLIC LogicalFontInstance : public
[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - chart2/source
chart2/source/controller/sidebar/ChartAreaPanel.cxx | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) New commits: commit dda72e5088a20360ebf18900e608994311fa0f5c Author: Katarina Behrens AuthorDate: Tue Jul 16 09:48:12 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Aug 7 23:29:38 2019 +0200 tdf#94300: custom gradients apply also from chart sidebar Change-Id: Id6ba90b404ad97cdfc4091bcb4028677f1600fa2 Reviewed-on: https://gerrit.libreoffice.org/75693 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 0e15fb798a0d1fc8cc221ae2334411fac144f173) Reviewed-on: https://gerrit.libreoffice.org/77035 Reviewed-by: Thorsten Behrens diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx index 3c0f55ed0ea3..843c4e720e0d 100644 --- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx @@ -100,30 +100,26 @@ DrawModelWrapper* getDrawModelWrapper(const css::uno::ReferenceGetDrawModelWrapper(); } -XGradient getXGradientForName(const css::uno::Reference& xModel, +XFillGradientItem getXGradientForName(const css::uno::Reference& xModel, const OUString& rName) { -try -{ -ViewElementListProvider aProvider = getViewElementListProvider(xModel); -XGradientListRef aRef = aProvider.GetGradientList(); -size_t n = aRef->Count(); -for (size_t i = 0; i < n; ++i) -{ -const XGradientEntry* pGradient = aRef->GetGradient(i); -if (!pGradient) -continue; +css::uno::Reference xFact(xModel, css::uno::UNO_QUERY); +css::uno::Reference xNameAccess( +xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY); +if (!xNameAccess.is()) +return XFillGradientItem(); -if (pGradient->GetName() == rName) -return pGradient->GetGradient(); -} -} -catch (...) -{ -// ignore exception -} +if (!xNameAccess->hasByName(rName)) +return XFillGradientItem(); + +css::uno::Any aAny = xNameAccess->getByName(rName); + +XFillGradientItem aItem; +aItem.SetName(rName); +aItem.PutValue(aAny, MID_FILLGRADIENT); + +return aItem; -return XGradient(); } XFillFloatTransparenceItem getXTransparencyGradientForName(const css::uno::Reference& xModel, @@ -369,7 +365,12 @@ void ChartAreaPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem, if (pStyleItem) xPropSet->setPropertyValue("FillStyle", css::uno::Any(pStyleItem->GetValue())); -xPropSet->setPropertyValue("FillGradientName", css::uno::Any(rGradientItem.GetValue())); + +const OUString& aName = rGradientItem.GetName(); +css::uno::Any aGradientVal; +rGradientItem.QueryValue(aGradientVal, MID_FILLGRADIENT); +OUString aNewName = PropertyHelper::addGradientUniqueNameToTable(aGradientVal, css::uno::Reference(mxModel, css::uno::UNO_QUERY_THROW), aName); +xPropSet->setPropertyValue("FillGradientName", css::uno::Any(aNewName)); } void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem, @@ -435,11 +436,10 @@ void ChartAreaPanel::updateData() if (xInfo->hasPropertyByName("FillGradientName")) { - OUString aGradientName; - xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; - XGradient aGradient = getXGradientForName(mxModel, aGradientName); - XFillGradientItem aGradientItem(aGradientName, aGradient); - updateFillGradient(false, true, ); +OUString aGradientName; +xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; +XFillGradientItem aGradientItem = getXGradientForName(mxModel, aGradientName); +updateFillGradient(false, true, ); } if (xInfo->hasPropertyByName("FillHatchName")) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source
chart2/source/controller/sidebar/ChartAreaPanel.cxx | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) New commits: commit 0e15fb798a0d1fc8cc221ae2334411fac144f173 Author: Katarina Behrens AuthorDate: Tue Jul 16 09:48:12 2019 +0200 Commit: Katarina Behrens CommitDate: Wed Jul 17 11:03:49 2019 +0200 tdf#94300: custom gradients apply also from chart sidebar Change-Id: Id6ba90b404ad97cdfc4091bcb4028677f1600fa2 Reviewed-on: https://gerrit.libreoffice.org/75693 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx index 3c0f55ed0ea3..843c4e720e0d 100644 --- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx @@ -100,30 +100,26 @@ DrawModelWrapper* getDrawModelWrapper(const css::uno::ReferenceGetDrawModelWrapper(); } -XGradient getXGradientForName(const css::uno::Reference& xModel, +XFillGradientItem getXGradientForName(const css::uno::Reference& xModel, const OUString& rName) { -try -{ -ViewElementListProvider aProvider = getViewElementListProvider(xModel); -XGradientListRef aRef = aProvider.GetGradientList(); -size_t n = aRef->Count(); -for (size_t i = 0; i < n; ++i) -{ -const XGradientEntry* pGradient = aRef->GetGradient(i); -if (!pGradient) -continue; +css::uno::Reference xFact(xModel, css::uno::UNO_QUERY); +css::uno::Reference xNameAccess( +xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY); +if (!xNameAccess.is()) +return XFillGradientItem(); -if (pGradient->GetName() == rName) -return pGradient->GetGradient(); -} -} -catch (...) -{ -// ignore exception -} +if (!xNameAccess->hasByName(rName)) +return XFillGradientItem(); + +css::uno::Any aAny = xNameAccess->getByName(rName); + +XFillGradientItem aItem; +aItem.SetName(rName); +aItem.PutValue(aAny, MID_FILLGRADIENT); + +return aItem; -return XGradient(); } XFillFloatTransparenceItem getXTransparencyGradientForName(const css::uno::Reference& xModel, @@ -369,7 +365,12 @@ void ChartAreaPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem, if (pStyleItem) xPropSet->setPropertyValue("FillStyle", css::uno::Any(pStyleItem->GetValue())); -xPropSet->setPropertyValue("FillGradientName", css::uno::Any(rGradientItem.GetValue())); + +const OUString& aName = rGradientItem.GetName(); +css::uno::Any aGradientVal; +rGradientItem.QueryValue(aGradientVal, MID_FILLGRADIENT); +OUString aNewName = PropertyHelper::addGradientUniqueNameToTable(aGradientVal, css::uno::Reference(mxModel, css::uno::UNO_QUERY_THROW), aName); +xPropSet->setPropertyValue("FillGradientName", css::uno::Any(aNewName)); } void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem, @@ -435,11 +436,10 @@ void ChartAreaPanel::updateData() if (xInfo->hasPropertyByName("FillGradientName")) { - OUString aGradientName; - xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; - XGradient aGradient = getXGradientForName(mxModel, aGradientName); - XFillGradientItem aGradientItem(aGradientName, aGradient); - updateFillGradient(false, true, ); +OUString aGradientName; +xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; +XFillGradientItem aGradientItem = getXGradientForName(mxModel, aGradientName); +updateFillGradient(false, true, ); } if (xInfo->hasPropertyByName("FillHatchName")) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sc/inc sc/source
sc/inc/strings.hrc |1 + sc/source/ui/miscdlgs/linkarea.cxx |9 - 2 files changed, 9 insertions(+), 1 deletion(-) New commits: commit b3c11020b7e54a258b2d4ebe20c6b5256f9401cf Author: Katarina Behrens AuthorDate: Thu May 9 20:46:45 2019 +0200 Commit: Thorsten Behrens CommitDate: Fri Jun 21 12:13:48 2019 +0200 Make it more obvious that there are no named ranges and thus the selected doc can't be used as the source of external data for this sheet. In other words, help the user figure out why is OK button disabled Change-Id: Ie1b999c9c3640397e9f6f6ee321d3a5a5d63fa3b Reviewed-on: https://gerrit.libreoffice.org/72075 Tested-by: Jenkins Reviewed-by: Katarina Behrens Reviewed-on: https://gerrit.libreoffice.org/74432 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index ed0fc8df5663..1b52acabdd12 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -334,6 +334,7 @@ #define STR_ANCHOR_TO_CELL NC_("STR_ANCHOR_TO_CELL", "To cell") #define STR_ANCHOR_TO_CELL_RESIZE NC_("STR_ANCHOR_TO_CELL_RESIZE", "To cell (resize with cell)") #define STR_ANCHOR_TO_PAGE NC_("STR_ANCHOR_TO_PAGE", "To page") +#define STR_NO_NAMED_RANGES_AVAILABLE NC_("STR_NO_NAMED_RANGES_AVAILABLE", "No named ranges available in the selected document") #endif diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 002bf482fd7e..6d413ad91146 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -35,6 +35,8 @@ #include #include #include +#include +#include ScLinkedAreaDlg::ScLinkedAreaDlg(weld::Window* pParent) : GenericDialogController(pParent, "modules/scalc/ui/externaldata.ui", "ExternalDataDialog") @@ -257,8 +259,13 @@ void ScLinkedAreaDlg::UpdateSourceRanges() m_xLbRanges->thaw(); -if (m_xLbRanges->n_children() == 1) +if (m_xLbRanges->n_children() >= 1) m_xLbRanges->select(0); +else +{ +m_xLbRanges->append_text(ScResId(STR_NO_NAMED_RANGES_AVAILABLE)); +m_xLbRanges->set_sensitive(false); +} } void ScLinkedAreaDlg::UpdateEnable() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - cui/source
cui/source/dialogs/about.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 62af57f74a4e66bb22e1a171fd0019afc91f85f6 Author: Katarina Behrens AuthorDate: Thu Jun 20 15:53:38 2019 +0200 Commit: Katarina Behrens CommitDate: Thu Jun 20 15:59:43 2019 +0200 Always use git hash as a link to the changelog instead of build version (--with-build-version) which can be an arbitrary string, unrelated to git commit hashes Change-Id: I5b2f3d951de6a8da6b7146aae6ed7a5fafb78aca diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index df8a0b131319..af4242f7a98a 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -153,7 +153,8 @@ IMPL_LINK( AboutDialog, HandleClick, Button*, pButton, void ) void AboutDialog::SetBuildIdLink() { -const OUString buildId = GetBuildId(); +OUString sDefault; +OUString buildId(utl::Bootstrap::getBuildIdData(sDefault)); if (IsStringValidGitHash(buildId)) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - include/vcl sw/qa sw/source vcl/source
include/vcl/vclevent.hxx |1 - sw/qa/uitest/writer_tests/xwindow.py |2 -- sw/source/core/layout/calcmove.cxx |4 vcl/source/window/event.cxx |3 +-- vcl/source/window/window.cxx |3 --- 5 files changed, 5 insertions(+), 8 deletions(-) New commits: commit 4ecc5059be10999ef940885bc5d331cbda881530 Author: Katarina Behrens AuthorDate: Thu Jun 6 18:00:02 2019 +0200 Commit: Thorsten Behrens CommitDate: Thu Jun 6 23:20:54 2019 +0200 Revert temp fix of Basic editor crash and fix properly to do that, backport part of commit 0adbc69c81cc287386b31b25b2dc89780933e2b1 Turns out that this particular VclEventId (WindowChildCreated) is unused i.e. listeners for such event type don't exist and an attempt to find them via GetComponentInterface was causing the crash Change-Id: I57c59bde021cf802f01eaa6fd14e2ce3f6c73a1c Reviewed-on: https://gerrit.libreoffice.org/73623 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx index 8f15df2228c4..d8c8cc285173 100644 --- a/include/vcl/vclevent.hxx +++ b/include/vcl/vclevent.hxx @@ -143,7 +143,6 @@ enum class VclEventId ToolboxItemWindowChanged, ToolboxSelect, WindowActivate, -WindowChildCreated, // pData = vcl::Window* WindowChildDestroyed, // pData = vcl::Window* WindowClose, WindowCommand, // pData = CommandEvent* diff --git a/sw/qa/uitest/writer_tests/xwindow.py b/sw/qa/uitest/writer_tests/xwindow.py index b263ebff33d3..a1be89bf2981 100644 --- a/sw/qa/uitest/writer_tests/xwindow.py +++ b/sw/qa/uitest/writer_tests/xwindow.py @@ -78,8 +78,6 @@ class XKeyListenerExtended(unohelper.Base, XKeyListener): # Test that registered mouse/key listeners for top window receive mouse/key events class XWindow(UITestCase): def test_listeners(self): -# Disabled until basic editor crash is fixed -return global mouseListenerCount global keyListenerCount diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 1e4d47b8f647..6f092ce3729a 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -216,9 +216,8 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData ) // If maEventListeners is empty, the XVCLWindow has not yet been initialized. // Calling GetComponentInterface will do that. -/* FIXME: This leads to a crash in Basic Editor if (mpWindowImpl->maEventListeners.empty() && pData) -xWindow->GetComponentInterface();*/ +xWindow->GetComponentInterface(); if (!mpWindowImpl->maEventListeners.empty()) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 12182b2c3f1f..3d7a5323227f 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1171,9 +1171,6 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p // calculate app font res (except for the Intro Window or the default window) if ( mpWindowImpl->mbFrame && !pSVData->maGDIData.mnAppFontX && ! (nStyle & (WB_INTROWIN|WB_DEFAULTWIN)) ) ImplInitAppFontData( this ); - -if ( GetAccessibleParentWindow() && GetParent() != Application::GetDefDialogParent() ) -GetAccessibleParentWindow()->CallEventListeners( VclEventId::WindowChildCreated, this ); } void Window::ImplInitAppFontData( vcl::Window const * pWindow ) commit 80c23583140248c9e3bfd0ff645163b6191c Author: Michael Stahl AuthorDate: Sun Jun 2 13:58:01 2019 +0200 Commit: Thorsten Behrens CommitDate: Thu Jun 6 23:20:39 2019 +0200 tdf#119109 sw: tweak assertion in PrepareMake() Empty section frames cause trouble for the assert added in e14056e6e88d9b8d988b7b88b2776a8fc952031b: * existing ones may be skipped by MoveBwd(), so a SwTextFrame moves to the previous page but the SwSectionFrame that was its mpPrev remains on this page; e.g. ooo110854-1.rtf * a SwSectionFrame moves backward, then some SwTextFrame in it splits and the follow tries to move forward, resulting in *new* SwSectionFrames on this page that are empty (because the follow is eventually joined again); e.g. abi3213-1.rtf So if there's a section frame, assume it's SNAFU and don't assert. Change-Id: Ibdca2aa39fae123583e5edf5173f80e8b70ef335 Reviewed-on: https://gerrit.libreoffice.org/7 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 1416c5426a757d32f223cab46bf9038bd7f21d48) Reviewed-on: https://gerrit.libreoffice.org/73617 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 8a5271dbad3e..3e31a0e66b81 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sd/source
sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 102 -- sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx |2 2 files changed, 51 insertions(+), 53 deletions(-) New commits: commit 901a356a4e2ce7b598fb600025baa1c09267a2bc Author: Katarina Behrens AuthorDate: Mon Jun 3 18:14:31 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Jun 4 00:56:03 2019 +0200 tdf#120774: in 6.2, restrict workaround to kde4 vclplug only Fix of tdf#41996 is a workaround of kde4-specific condition and has been since disabled on OS X (as tdf#51023). kde5 comes with a new implementation of DnD and slide sorter in Impress now exhibits exactly the same symptoms as on OS X in tdf#51023 Assuming that in 6.2 kde5 doesn't need this workaround anymore and remaining platforms -- gtk[23] and Win -- never had issues with DnD in slide sorter, keep it active only for kde4 vclplug. We can't kill it with fire in its entirety, because kde4 has been obsoleted only post-6.2 Change-Id: I1fd8bb9e5142ebd43f3a8bead417832c808c Reviewed-on: https://gerrit.libreoffice.org/73403 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 4a3b05b1..2505486e5a8a 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include @@ -225,17 +226,12 @@ public: MultiSelectionModeHandler ( SlideSorter& rSlideSorter, SelectionFunction& rSelectionFunction, -#ifndef MACOSX -const Point& rMouseModelPosition); -#else const Point& rMouseModelPosition, -const sal_uInt32 nEventCode); -#endif +const sal_uInt32 nEventCode, +bool bKDE4); virtual ~MultiSelectionModeHandler() override; -#ifndef MACOSX void Initialize(const sal_uInt32 nEventCode); -#endif virtual SelectionFunction::Mode GetMode() const override; virtual void Abort() override; @@ -258,6 +254,7 @@ private: bool mbAutoScrollInstalled; sal_Int32 mnAnchorIndex; sal_Int32 mnSecondIndex; +bool mbKDE4; void UpdateModelPosition (const Point& rMouseModelPosition); void UpdateSelection(); @@ -281,18 +278,13 @@ class DragAndDropModeHandler : public SelectionFunction::ModeHandler public: DragAndDropModeHandler ( SlideSorter& rSlideSorter, -#ifndef MACOSX -SelectionFunction& rSelectionFunction); -#else SelectionFunction& rSelectionFunction, const Point& rMousePosition, -vcl::Window* pWindow); -#endif +vcl::Window* pWindow, +bool bKDE4); virtual ~DragAndDropModeHandler() override; -#ifndef MACOSX void Initialize(const Point& rMousePosition, vcl::Window* pWindow); -#endif virtual SelectionFunction::Mode GetMode() const override; virtual void Abort() override; @@ -303,6 +295,7 @@ protected: private: std::unique_ptr> mpDragAndDropContext; +bool mbKDE4; }; //= SelectionFunction = @@ -322,6 +315,7 @@ SelectionFunction::SelectionFunction ( mnShiftKeySelectionAnchor(-1), mpModeHandler(new NormalModeHandler(rSlideSorter, *this)) { +mbKDE4 = Application::GetToolkitName() == "kde4"; } SelectionFunction::~SelectionFunction() @@ -684,18 +678,21 @@ void SelectionFunction::SwitchToDragAndDropMode (const Point& rMousePosition) { if (mpModeHandler->GetMode() != DragAndDropMode) { -#ifndef MACOSX -std::shared_ptr handler( -new DragAndDropModeHandler(mrSlideSorter, *this)); -SwitchMode(handler); -// Delayed initialization, only after mpModeHanler is set, otherwise DND initialization -// could already trigger DND events, which would recursively trigger this code again, -// and without mpModeHandler set it would again try to set a new handler. -handler->Initialize(rMousePosition, mpWindow); -#else -SwitchMode(std::shared_ptr( -new DragAndDropModeHandler(mrSlideSorter, *this, rMousePosition, mpWindow))); -#endif +if (mbKDE4) +{ +std::shared_ptr handler( +new DragAndDropModeHandler(mrSlideSorter, *this, rMousePosition, mpWindow, mbKDE4)); +SwitchMode(handler); +// Delayed initialization, only after mpModeHanler is set, otherwise DND initialization +// could already trigger DND events, which would recursively trigger this code again, +// and without mpModeHandler set it would again try to set a new handler. +handler->Initialize(rMousePosition, mpWindow); +} +else +{ +
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - formula/source
formula/source/ui/dlg/formula.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e5a4746378202f8b599de11632b7c8772b735ea2 Author: Katarina Behrens AuthorDate: Thu May 23 18:23:31 2019 +0200 Commit: Eike Rathke CommitDate: Sat Jun 1 20:24:17 2019 +0200 tdf#124279: consider also functions with no arguments such as PI() or TRUE() Change-Id: I1243e6d6da7ac884d93d5d46058d94eb35f848ab Reviewed-on: https://gerrit.libreoffice.org/73242 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit ad2acdfa36db00678f44f5cd69d687183f02a0bd) Reviewed-on: https://gerrit.libreoffice.org/73295 diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index a8e0c02f1f8f..72cb0987479f 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -657,7 +657,7 @@ void FormulaDlg_Impl::MakeTree( StructPage* _pTree, SvTreeListEntry* pParent, co const table::CellAddress aRefPos(m_pHelper->getReferencePosition()); const OUString aResult = m_pHelper->getFormulaParser()->printFormula( aArgs, aRefPos); -if ( nParas > 0 ) +if ( nParas > 0 || (nParas == 0 && _pToken->IsFunction()) ) { SvTreeListEntry* pEntry; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - formula/source
formula/source/ui/dlg/formula.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bf34e08f8d0d90939fea24d17f94434b0cd66439 Author: Katarina Behrens AuthorDate: Thu May 23 18:23:31 2019 +0200 Commit: Eike Rathke CommitDate: Sat Jun 1 01:00:35 2019 +0200 tdf#124279: consider also functions with no arguments such as PI() or TRUE() Change-Id: I1243e6d6da7ac884d93d5d46058d94eb35f848ab Reviewed-on: https://gerrit.libreoffice.org/73242 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit ad2acdfa36db00678f44f5cd69d687183f02a0bd) Reviewed-on: https://gerrit.libreoffice.org/73294 Tested-by: Eike Rathke diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 269b4c301c41..aba185426e5f 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -615,7 +615,7 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree, weld::TreeIter* pParent, cons const table::CellAddress aRefPos(m_pHelper->getReferencePosition()); const OUString aResult = m_pHelper->getFormulaParser()->printFormula( aArgs, aRefPos); -if ( nParas > 0 ) +if ( nParas > 0 || (nParas == 0 && _pToken->IsFunction()) ) { std::unique_ptr xEntry; weld::TreeIter* pEntry; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: formula/source
formula/source/ui/dlg/formula.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ad2acdfa36db00678f44f5cd69d687183f02a0bd Author: Katarina Behrens AuthorDate: Thu May 23 18:23:31 2019 +0200 Commit: Eike Rathke CommitDate: Sat Jun 1 00:57:54 2019 +0200 tdf#124279: consider also functions with no arguments such as PI() or TRUE() Change-Id: I1243e6d6da7ac884d93d5d46058d94eb35f848ab Reviewed-on: https://gerrit.libreoffice.org/73242 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 269b4c301c41..aba185426e5f 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -615,7 +615,7 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree, weld::TreeIter* pParent, cons const table::CellAddress aRefPos(m_pHelper->getReferencePosition()); const OUString aResult = m_pHelper->getFormulaParser()->printFormula( aArgs, aRefPos); -if ( nParas > 0 ) +if ( nParas > 0 || (nParas == 0 && _pToken->IsFunction()) ) { std::unique_ptr xEntry; weld::TreeIter* pEntry; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - 2 commits - vcl/inc vcl/qt5
vcl/inc/qt5/Qt5Frame.hxx |2 + vcl/qt5/Qt5Frame.cxx | 91 ++- 2 files changed, 77 insertions(+), 16 deletions(-) New commits: commit ae5b453eb63d08f8aba471d8263bff84be80c8aa Author: Katarina Behrens AuthorDate: Wed May 29 19:01:28 2019 +0200 Commit: Thorsten Behrens CommitDate: Fri May 31 23:28:43 2019 +0200 tdf#124484: resize slideshow window so it spans all displays Change-Id: I55b4ab8ec5059110525c5194e1133c65bbd07fec Reviewed-on: https://gerrit.libreoffice.org/73183 Tested-by: Jenkins Reviewed-by: Katarina Behrens Reviewed-on: https://gerrit.libreoffice.org/73257 Reviewed-by: Thorsten Behrens diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx index 0e94657d092b..07a53972ee9b 100644 --- a/vcl/inc/qt5/Qt5Frame.hxx +++ b/vcl/inc/qt5/Qt5Frame.hxx @@ -81,6 +81,8 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame bool m_bDefaultSize; bool m_bDefaultPos; bool m_bFullScreen; +bool m_bFullScreenSpanAll; +sal_uInt32 m_nRestoreScreen; QRect m_aRestoreGeometry; void Center(); diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index f9fded67de59..27d0828539f5 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -59,6 +59,28 @@ static void SvpDamageHandler(void* handle, sal_Int32 nExtentsX, sal_Int32 nExten pThis->Damage(nExtentsX, nExtentsY, nExtentsWidth, nExtentsHeight); } +namespace +{ +sal_Int32 screenNumber(const QScreen* pScreen) +{ +const QList screens = QApplication::screens(); + +sal_Int32 nScreen = 0; +bool bFound = false; +for (const QScreen* pCurScreen : screens) +{ +if (pScreen == pCurScreen) +{ +bFound = true; +break; +} +nScreen++; +} + +return bFound ? nScreen : -1; +} +} + Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) : m_pTopLevel(nullptr) , m_bUseCairo(bUseCairo) @@ -72,6 +94,7 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) , m_bDefaultSize(true) , m_bDefaultPos(true) , m_bFullScreen(false) +, m_bFullScreenSpanAll(false) { Qt5Instance* pInst = static_cast(GetSalData()->m_pInstance); pInst->insertFrame(this); @@ -143,6 +166,7 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) // fake an initial geometry, gets updated via configure event or SetPosSize if (m_bDefaultPos || m_bDefaultSize) { +maGeometry.nDisplayScreenNumber = 0; Size aDefSize = CalcDefaultSize(); maGeometry.nX = -1; maGeometry.nY = -1; @@ -420,16 +444,25 @@ void Qt5Frame::Center() Size Qt5Frame::CalcDefaultSize() { assert(isWindow()); -QSize qSize(0, 0); -QScreen* pScreen = screen(); -if (pScreen) -qSize = pScreen->size(); -else -qSize = QApplication::desktop()->screenGeometry(0).size(); -Size aSize = toSize(qSize); +Size aSize; if (!m_bFullScreen) -aSize = bestmaxFrameSizeForScreenSize(aSize); +{ +const QScreen* pScreen = screen(); +aSize = bestmaxFrameSizeForScreenSize( +toSize(pScreen ? pScreen->size() : QApplication::desktop()->screenGeometry(0).size())); +} +else +{ +if (!m_bFullScreenSpanAll) +aSize = toSize( + QApplication::desktop()->screenGeometry(maGeometry.nDisplayScreenNumber).size()); +else +{ +int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 0)); +aSize = toSize(QApplication::screens()[nLeftScreen]->availableVirtualGeometry().size()); +} +} return aSize; } @@ -633,7 +666,11 @@ void Qt5Frame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen) // only top-level windows can go fullscreen assert(m_pTopLevel); +if (m_bFullScreen == bFullScreen) +return; + m_bFullScreen = bFullScreen; +m_bFullScreenSpanAll = m_bFullScreen && (nScreen < 0); // show it if it isn't shown yet if (!isWindow()) @@ -642,15 +679,18 @@ void Qt5Frame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen) if (m_bFullScreen) { m_aRestoreGeometry = m_pTopLevel->geometry(); -// do that before going fullscreen -SetScreenNumber(nScreen); -windowHandle()->showFullScreen(); +m_nRestoreScreen = maGeometry.nDisplayScreenNumber; +SetScreenNumber(m_bFullScreenSpanAll ? m_nRestoreScreen : nScreen); +if (!m_bFullScreenSpanAll) +windowHandle()->showFullScreen(); +else +windowHandle()->showNormal(); } else { +SetScreenNumber(m_nRestoreScreen); windowHandle()->showNormal(); m_pTopLevel->setGeometry(m_aRestoreGeometry); -m_aRestoreGeometry = QRect(); } } @@ -1081,23 +1121,25 @@
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/Qt5Frame.hxx |2 + vcl/qt5/Qt5Frame.cxx | 75 +-- 2 files changed, 62 insertions(+), 15 deletions(-) New commits: commit 6f613f973dcb86dbebc212bc466fbaa2b002655b Author: Katarina Behrens AuthorDate: Wed May 29 19:01:28 2019 +0200 Commit: Katarina Behrens CommitDate: Fri May 31 13:22:10 2019 +0200 tdf#124484: resize slideshow window so it spans all displays Change-Id: I55b4ab8ec5059110525c5194e1133c65bbd07fec Reviewed-on: https://gerrit.libreoffice.org/73183 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx index a42a95aac3bd..16743edc0fc6 100644 --- a/vcl/inc/qt5/Qt5Frame.hxx +++ b/vcl/inc/qt5/Qt5Frame.hxx @@ -83,6 +83,8 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame bool m_bDefaultSize; bool m_bDefaultPos; bool m_bFullScreen; +bool m_bFullScreenSpanAll; +sal_uInt32 m_nRestoreScreen; QRect m_aRestoreGeometry; void Center(); diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 386fa08052c7..6d19d825fa1c 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -60,6 +60,28 @@ static void SvpDamageHandler(void* handle, sal_Int32 nExtentsX, sal_Int32 nExten pThis->Damage(nExtentsX, nExtentsY, nExtentsWidth, nExtentsHeight); } +namespace +{ +sal_Int32 screenNumber(const QScreen* pScreen) +{ +const QList screens = QApplication::screens(); + +sal_Int32 nScreen = 0; +bool bFound = false; +for (const QScreen* pCurScreen : screens) +{ +if (pScreen == pCurScreen) +{ +bFound = true; +break; +} +nScreen++; +} + +return bFound ? nScreen : -1; +} +} + Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) : m_pTopLevel(nullptr) , m_bUseCairo(bUseCairo) @@ -74,6 +96,7 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) , m_bDefaultSize(true) , m_bDefaultPos(true) , m_bFullScreen(false) +, m_bFullScreenSpanAll(false) { Qt5Instance* pInst = static_cast(GetSalData()->m_pInstance); pInst->insertFrame(this); @@ -145,6 +168,7 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) // fake an initial geometry, gets updated via configure event or SetPosSize if (m_bDefaultPos || m_bDefaultSize) { +maGeometry.nDisplayScreenNumber = 0; Size aDefSize = CalcDefaultSize(); maGeometry.nX = -1; maGeometry.nY = -1; @@ -431,16 +455,25 @@ void Qt5Frame::Center() Size Qt5Frame::CalcDefaultSize() { assert(isWindow()); -QSize qSize(0, 0); -QScreen* pScreen = screen(); -if (pScreen) -qSize = pScreen->size(); -else -qSize = QApplication::desktop()->screenGeometry(0).size(); -Size aSize = toSize(qSize); +Size aSize; if (!m_bFullScreen) -aSize = bestmaxFrameSizeForScreenSize(aSize); +{ +const QScreen* pScreen = screen(); +aSize = bestmaxFrameSizeForScreenSize( +toSize(pScreen ? pScreen->size() : QApplication::desktop()->screenGeometry(0).size())); +} +else +{ +if (!m_bFullScreenSpanAll) +aSize = toSize( + QApplication::desktop()->screenGeometry(maGeometry.nDisplayScreenNumber).size()); +else +{ +int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 0)); +aSize = toSize(QApplication::screens()[nLeftScreen]->availableVirtualGeometry().size()); +} +} return aSize; } @@ -644,7 +677,11 @@ void Qt5Frame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen) // only top-level windows can go fullscreen assert(m_pTopLevel); +if (m_bFullScreen == bFullScreen) +return; + m_bFullScreen = bFullScreen; +m_bFullScreenSpanAll = m_bFullScreen && (nScreen < 0); // show it if it isn't shown yet if (!isWindow()) @@ -653,15 +690,18 @@ void Qt5Frame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen) if (m_bFullScreen) { m_aRestoreGeometry = m_pTopLevel->geometry(); -// do that before going fullscreen -SetScreenNumber(nScreen); -windowHandle()->showFullScreen(); +m_nRestoreScreen = maGeometry.nDisplayScreenNumber; +SetScreenNumber(m_bFullScreenSpanAll ? m_nRestoreScreen : nScreen); +if (!m_bFullScreenSpanAll) +windowHandle()->showFullScreen(); +else +windowHandle()->showNormal(); } else { +SetScreenNumber(m_nRestoreScreen); windowHandle()->showNormal(); m_pTopLevel->setGeometry(m_aRestoreGeometry); -m_aRestoreGeometry = QRect(); } } @@ -1101,23 +1141,25 @@ void Qt5Frame::SetScreenNumber(unsigned int nScreen) if (pWindow) {
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/Qt5Frame.hxx |5 +++-- vcl/qt5/Qt5Frame.cxx | 29 - vcl/qt5/Qt5Widget.cxx|5 +++-- 3 files changed, 30 insertions(+), 9 deletions(-) New commits: commit c58487251272b390e9c56a880fa4788d0a5b5a7f Author: Katarina Behrens AuthorDate: Thu May 23 18:11:43 2019 +0200 Commit: Katarina Behrens CommitDate: Fri May 24 09:42:35 2019 +0200 tdf#125160: honour keyboard modifiers if used during DnD e.g. copy-DnD with Ctrl held down. This is qt5 remix of tdf#109227 Change-Id: Ib0794c7468cc04d3d50686952305717e10c90c9a Reviewed-on: https://gerrit.libreoffice.org/72878 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx index 6fe1333bd138..9b9c13b4b7fa 100644 --- a/vcl/inc/qt5/Qt5Frame.hxx +++ b/vcl/inc/qt5/Qt5Frame.hxx @@ -140,8 +140,9 @@ public: virtual void registerDropTarget(Qt5DropTarget* pDropTarget); virtual void deregisterDropTarget(Qt5DropTarget const* pDropTarget); void draggingStarted(const int x, const int y, Qt::DropActions eActions, - const QMimeData* pQMimeData); -void dropping(const int x, const int y, const QMimeData* pQMimeData); + Qt::KeyboardModifiers eKeyMod, const QMimeData* pQMimeData); +void dropping(const int x, const int y, Qt::KeyboardModifiers eKeyMod, + const QMimeData* pQMimeData); virtual void SetExtendedFrameStyle(SalExtStyle nExtStyle) override; virtual void Show(bool bVisible, bool bNoActivate = false) override; diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 3cfb5d5d9e33..41a4544b4acb 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -1159,16 +1159,30 @@ void Qt5Frame::deregisterDropTarget(Qt5DropTarget const* pDropTarget) } void Qt5Frame::draggingStarted(const int x, const int y, Qt::DropActions eActions, - const QMimeData* pQMimeData) + Qt::KeyboardModifiers eKeyMod, const QMimeData* pQMimeData) { assert(m_pDropTarget); +sal_Int8 nUserDropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; +if ((eKeyMod & Qt::ShiftModifier) && !(eKeyMod & Qt::ControlModifier)) +nUserDropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; +else if ((eKeyMod & Qt::ControlModifier) && !(eKeyMod & Qt::ShiftModifier)) +nUserDropAction = css::datatransfer::dnd::DNDConstants::ACTION_COPY; +else if ((eKeyMod & Qt::ShiftModifier) && (eKeyMod & Qt::ControlModifier)) +nUserDropAction = css::datatransfer::dnd::DNDConstants::ACTION_LINK; + css::datatransfer::dnd::DropTargetDragEnterEvent aEvent; aEvent.Source = static_cast(m_pDropTarget); aEvent.Context = static_cast(m_pDropTarget); aEvent.LocationX = x; aEvent.LocationY = y; -aEvent.DropAction = getPreferredDropAction(eActions); + +// system drop action if neither Shift nor Control is held +if (!(eKeyMod & (Qt::ShiftModifier | Qt::ControlModifier))) +aEvent.DropAction = getPreferredDropAction(eActions); +// otherwise user-preferred action +else +aEvent.DropAction = nUserDropAction; aEvent.SourceActions = toVclDropActions(eActions); css::uno::Reference xTransferable; @@ -1190,7 +1204,8 @@ void Qt5Frame::draggingStarted(const int x, const int y, Qt::DropActions eAction m_pDropTarget->fire_dragOver(aEvent); } -void Qt5Frame::dropping(const int x, const int y, const QMimeData* pQMimeData) +void Qt5Frame::dropping(const int x, const int y, Qt::KeyboardModifiers eKeyMod, +const QMimeData* pQMimeData) { assert(m_pDropTarget); @@ -1199,8 +1214,12 @@ void Qt5Frame::dropping(const int x, const int y, const QMimeData* pQMimeData) aEvent.Context = static_cast(m_pDropTarget); aEvent.LocationX = x; aEvent.LocationY = y; -aEvent.DropAction = m_pDropTarget->proposedDragAction() -| css::datatransfer::dnd::DNDConstants::ACTION_DEFAULT; + +if (!(eKeyMod & (Qt::ShiftModifier | Qt::ControlModifier))) +aEvent.DropAction = m_pDropTarget->proposedDragAction() +| css::datatransfer::dnd::DNDConstants::ACTION_DEFAULT; +else +aEvent.DropAction = m_pDropTarget->proposedDragAction(); aEvent.SourceActions = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; css::uno::Reference xTransferable; diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index a388bf941672..4d620767472f 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -221,7 +221,8 @@ void Qt5Widget::dragMoveEvent(QDragMoveEvent* event) { QPoint point = event->pos(); -m_rFrame.draggingStarted(point.x(), point.y(), event->possibleActions(), event->mimeData()); +m_rFrame.draggingStarted(point.x(), point.y(), event->possibleActions(), +
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Object.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 01b885420a227c2610f00cd5569212a507f48d27 Author: Katarina Behrens AuthorDate: Fri May 17 11:28:35 2019 +0200 Commit: Michael Weghorn CommitDate: Thu May 23 19:07:02 2019 +0200 tdf#124027: use ID of the embedded window after many trials and errors what LibO apparently expects here is the ID of QWindow parent of [embedded] system child window (the rest of the original commit bbe1ede0fada499fd49b60bdc7964e311b331454 is not relevant for LibO 6.2) Change-Id: Ie4c6d14a50959c0fdd04e745918d4889c9da45ec Reviewed-on: https://gerrit.libreoffice.org/72458 Tested-by: Jenkins Reviewed-by: Katarina Behrens Reviewed-on: https://gerrit.libreoffice.org/72769 Reviewed-by: Michael Weghorn Tested-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx index 3787bc715976..499cf190b4db 100644 --- a/vcl/qt5/Qt5Object.cxx +++ b/vcl/qt5/Qt5Object.cxx @@ -40,7 +40,7 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow) m_pQWidget->show(); m_aSystemData.nSize = sizeof(SystemEnvData); -m_aSystemData.aWindow = pParent->GetQWidget()->winId(); +m_aSystemData.aWindow = m_pQWindow->winId(); // ID of the embedded window m_aSystemData.aShellWindow = reinterpret_cast(this); //m_aSystemData.pSalFrame = this; //m_aSystemData.pWidget = m_pQWidget; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/inc vcl/qt5
vcl/inc/qt5/Qt5AccessibleWidget.hxx |1 vcl/qt5/Qt5AccessibleWidget.cxx | 285 +--- 2 files changed, 201 insertions(+), 85 deletions(-) New commits: commit 74df5affeba4c5deb443e7974b1693a7c12561bc Author: Katarina Behrens AuthorDate: Thu Mar 21 22:16:42 2019 +0100 Commit: Thorsten Behrens CommitDate: Wed May 22 08:12:42 2019 +0200 tdf#122056: Catch DisposedExceptions everywhere Change-Id: I6bdb9aa89a8a5181b096f47f90ab6fb5711e7447 Reviewed-on: https://gerrit.libreoffice.org/69541 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 9e37ab4e650481f8bf03d1469815299b8ef1fb5f) Reviewed-on: https://gerrit.libreoffice.org/72661 Reviewed-by: Thorsten Behrens diff --git a/vcl/inc/qt5/Qt5AccessibleWidget.hxx b/vcl/inc/qt5/Qt5AccessibleWidget.hxx index 19478586ea42..6b0d71cba9f5 100644 --- a/vcl/inc/qt5/Qt5AccessibleWidget.hxx +++ b/vcl/inc/qt5/Qt5AccessibleWidget.hxx @@ -136,6 +136,7 @@ public: private: css::uno::Reference m_xAccessible; +css::uno::Reference getAccessibleContextImpl() const; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index efafab17f3cf..b76acb4a1c57 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -71,11 +71,41 @@ Qt5AccessibleWidget::Qt5AccessibleWidget(const Reference xAccessibl } } +Reference Qt5AccessibleWidget::getAccessibleContextImpl() const +{ +Reference xAc; + +if (m_xAccessible.is()) +{ +try +{ +xAc = m_xAccessible->getAccessibleContext(); +} +catch (css::lang::DisposedException /*ex*/) +{ +SAL_WARN("vcl.qt5", "Accessible context disposed already"); +} +// sometimes getAccessibleContext throws also RuntimeException if context is no longer alive +catch (css::uno::RuntimeException /*ex*/) +{ +// so let's catch it here, cuz otherwise soffice falls flat on its face +// with FatalError and nothing else +SAL_WARN("vcl.qt5", "Accessible context no longer alive"); +} +} + +return xAc; +} + QWindow* Qt5AccessibleWidget::window() const { return nullptr; } int Qt5AccessibleWidget::childCount() const { -return m_xAccessible->getAccessibleContext()->getAccessibleChildCount(); +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) +return 0; + +return xAc->getAccessibleChildCount(); } int Qt5AccessibleWidget::indexOfChild(const QAccessibleInterface* /* child */) const { return 0; } @@ -144,25 +174,29 @@ QVector> Qt5AccessibleWidget::relations(QAccessible::Relation match) const { QVector> relations; -Reference xRelationSet -= m_xAccessible->getAccessibleContext()->getAccessibleRelationSet(); -if (!xRelationSet.is()) + +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) return relations; -if (match == QAccessible::AllRelations) +Reference xRelationSet = xAc->getAccessibleRelationSet(); +if (xRelationSet.is()) { -int count = xRelationSet->getRelationCount(); -for (int i = 0; i < count; i++) +if (match == QAccessible::AllRelations) +{ +int count = xRelationSet->getRelationCount(); +for (int i = 0; i < count; i++) +{ +AccessibleRelation aRelation = xRelationSet->getRelation(i); +lcl_appendRelation(, aRelation); +} +} +else { -AccessibleRelation aRelation = xRelationSet->getRelation(i); +AccessibleRelation aRelation = xRelationSet->getRelation(lcl_matchQtRelation(match)); lcl_appendRelation(, aRelation); } } -else -{ -AccessibleRelation aRelation = xRelationSet->getRelation(lcl_matchQtRelation(match)); -lcl_appendRelation(, aRelation); -} return relations; } @@ -177,8 +211,11 @@ QAccessibleInterface* Qt5AccessibleWidget::focusChild() const QRect Qt5AccessibleWidget::rect() const { -Reference xAccessibleComponent(m_xAccessible->getAccessibleContext(), - UNO_QUERY); +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) +return QRect(); + +Reference xAccessibleComponent(xAc, UNO_QUERY); awt::Point aPoint = xAccessibleComponent->getLocation(); awt::Size aSize = xAccessibleComponent->getSize(); @@ -187,24 +224,35 @@ QRect Qt5AccessibleWidget::rect() const QAccessibleInterface* Qt5AccessibleWidget::parent() const { -return QAccessible::queryAccessibleInterface( -new Qt5XAccessible(m_xAccessible->getAccessibleContext()->getAccessibleParent())); +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) +return nullptr; +
[Libreoffice-commits] core.git: avmedia/source vcl/qt5
avmedia/source/gstreamer/gstplayer.cxx | 24 vcl/qt5/Qt5Object.cxx |2 +- 2 files changed, 17 insertions(+), 9 deletions(-) New commits: commit bbe1ede0fada499fd49b60bdc7964e311b331454 Author: Katarina Behrens AuthorDate: Fri May 17 11:28:35 2019 +0200 Commit: Katarina Behrens CommitDate: Tue May 21 11:31:58 2019 +0200 tdf#124027: use ID of the embedded window and fix position of overlay 1) after many trials and errors what LibO apparently expects here is the ID of QWindow parent of [embedded] system child window 2) the position of the embedded window for video overlay has already been translated relative to the top-left corner of the slide (see bugfix of tdf#42873 how) in gen, gtk and kde5 vclplugs. So let's limit translating it 2nd time only to gtk3 vclplug which for some reason behaves differently (regression from 18138417485aeba6c52d935c616dba829b24ffd8) Change-Id: Ie4c6d14a50959c0fdd04e745918d4889c9da45ec Reviewed-on: https://gerrit.libreoffice.org/72458 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index 78928cddcc45..6303bc53bb68 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -926,19 +926,27 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co rArguments[ 2 ] >>= pIntPtr; SystemChildWindow *pParentWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr ); -if (pParentWindow) -{ -Point aPoint = pParentWindow->GetPosPixel(); -maArea.X = aPoint.getX(); -maArea.Y = aPoint.getY(); -} - const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : nullptr; OSL_ASSERT(pEnvData); if (pEnvData) { +OUString aToolkit = OUString::createFromAscii(pEnvData->pToolkit); + +// tdf#124027: the position of embedded window is identical w/ the position +// of media object in all other vclplugs (gtk, kde5, gen), in gtk3 w/o gtksink it +// needs to be translated +if (aToolkit == "gtk3") +{ +if (pParentWindow) +{ +Point aPoint = pParentWindow->GetPosPixel(); +maArea.X = aPoint.getX(); +maArea.Y = aPoint.getY(); +} +} + #if defined(ENABLE_GTKSINK) -GstElement *pVideosink = g_strcmp0(pEnvData->pToolkit, "gtk3") == 0 ? +GstElement *pVideosink = (aToolkit == "gtk3") ? gst_element_factory_make("gtksink", "gtksink") : nullptr; if (pVideosink) { diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx index b1952727c3a2..0f3a4f29750a 100644 --- a/vcl/qt5/Qt5Object.cxx +++ b/vcl/qt5/Qt5Object.cxx @@ -40,7 +40,7 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow) m_pQWidget->show(); m_aSystemData.nSize = sizeof(SystemEnvData); -m_aSystemData.aWindow = pParent->GetQWidget()->winId(); +m_aSystemData.aWindow = m_pQWindow->winId(); // ID of the embedded window m_aSystemData.aShellWindow = reinterpret_cast(this); //m_aSystemData.pSalFrame = this; //m_aSystemData.pWidget = m_pQWidget; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - dbaccess/source
dbaccess/source/ui/dlg/generalpage.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 21e1aa9d6b13b39b87435f8998c7ea6123a069fd Author: Katarina Behrens AuthorDate: Wed May 15 20:12:23 2019 +0200 Commit: Thorsten Behrens CommitDate: Sat May 18 00:25:51 2019 +0200 tdf#125267: relax the requirement of fixed value of current filter In a filepicker, user can select any file filter ('All files' for example) and still choose to open .odb file. Specific UIName of the current filter ('ODF Database' in this case) shouldn't therefore be a hard requirement, the correct file extension is enough. Change-Id: I641a267c545c66aa4d34954922783cc5ff7efd24 Reviewed-on: https://gerrit.libreoffice.org/72377 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit dc17f247daeb281dda531ff335873d563db5b653) Reviewed-on: https://gerrit.libreoffice.org/72453 Reviewed-by: Michael Stahl diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 9f1c2c6f58a6..06a6e7d8b720 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -701,7 +701,10 @@ namespace dbaui if ( aFileDlg.Execute() == ERRCODE_NONE ) { OUString sPath = aFileDlg.GetPath(); -if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) ) +// check for aFileDlg.GetCurrentFilter used to be here but current fpicker filter +// can be set to anything, see tdf#125267 how this breaks if other value +// than 'ODF Database' is selected. Let's therefore check only if wildcard matches +if ( !pFilter->GetWildcard().Matches(sPath) ) { OUString sMessage(DBA_RES(STR_ERR_USE_CONNECT_TO)); std::unique_ptr xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/dlg/generalpage.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit dc17f247daeb281dda531ff335873d563db5b653 Author: Katarina Behrens AuthorDate: Wed May 15 20:12:23 2019 +0200 Commit: Katarina Behrens CommitDate: Fri May 17 10:51:28 2019 +0200 tdf#125267: relax the requirement of fixed value of current filter In a filepicker, user can select any file filter ('All files' for example) and still choose to open .odb file. Specific UIName of the current filter ('ODF Database' in this case) shouldn't therefore be a hard requirement, the correct file extension is enough. Change-Id: I641a267c545c66aa4d34954922783cc5ff7efd24 Reviewed-on: https://gerrit.libreoffice.org/72377 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 829333294d05..8f3fb2e79943 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -709,7 +709,10 @@ namespace dbaui if ( aFileDlg.Execute() == ERRCODE_NONE ) { OUString sPath = aFileDlg.GetPath(); -if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) ) +// check for aFileDlg.GetCurrentFilter used to be here but current fpicker filter +// can be set to anything, see tdf#125267 how this breaks if other value +// than 'ODF Database' is selected. Let's therefore check only if wildcard matches +if ( !pFilter->GetWildcard().Matches(sPath) ) { OUString sMessage(DBA_RES(STR_ERR_USE_CONNECT_TO)); std::unique_ptr xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/source
framework/source/loadenv/loadenv.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 12679b370f7ec0a73c4c10c7de5c255a7d2cfca0 Author: Katarina Behrens AuthorDate: Wed May 15 10:58:30 2019 +0200 Commit: Katarina Behrens CommitDate: Wed May 15 12:33:09 2019 +0200 tdf#83722: Restrict the condition only to File > New referrer =~ private:user Change-Id: Ic67b0285ab7f49546499e4a9d90d9061c9d1274c Reviewed-on: https://gerrit.libreoffice.org/72346 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index f37f267733b3..0fb25aa126b8 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1519,8 +1519,8 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() OUString sReferrer = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), OUString()); // tdf#83722: valid but unmodified document, either from template -// or opened by the user (File > New) -if (bFromTemplate || !sReferrer.isEmpty()) +// or opened by the user (via File > New, referrer is set to private:user) +if (bFromTemplate || (sReferrer == "private:user")) return css::uno::Reference< css::frame::XFrame >(); bReactivateOldControllerOnError = xOldDoc->suspend(true); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/cib_contract57c' - framework/source
framework/source/loadenv/loadenv.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit f2d963236d7f44e935ba30e5ac2f26564f03e10d Author: Katarina Behrens AuthorDate: Wed May 15 10:58:30 2019 +0200 Commit: Katarina Behrens CommitDate: Wed May 15 11:40:33 2019 +0200 tdf#83722: Restrict the condition only to File > New referrer =~ private:user Change-Id: Ic67b0285ab7f49546499e4a9d90d9061c9d1274c diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 4f9cfe71d567..f05eb8de1112 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1517,8 +1517,8 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() OUString sReferrer = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), OUString()); // tdf#83722: valid but unmodified document, either from template -// or opened by the user (File > New) -if (bFromTemplate || !sReferrer.isEmpty()) +// or opened by the user (via File > New, referrer is set to private:user) +if (bFromTemplate || (sReferrer == "private:user")) return css::uno::Reference< css::frame::XFrame >(); bReactivateOldControllerOnError = xOldDoc->suspend(true); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 124d6bd1e14eac32b8df93880288e8e937fa335e Author: Katarina Behrens AuthorDate: Thu May 9 20:53:36 2019 +0200 Commit: Gerrit Code Review CommitDate: Mon May 13 16:45:11 2019 +0200 Update git submodules * Update helpcontent2 from branch 'master' - More detailed help of Calc's Sheet > Link to external data Make it more clear there has to be at least 1 named range in Excel of Calc documents Change-Id: I782c4d2c10ee52320bfdf147652883f5e7b4751a Reviewed-on: https://gerrit.libreoffice.org/72076 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 2f8fbb8c0aa8..8ba1c1976c65 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 2f8fbb8c0aa867e8986a496820cf79d75a5d5ea1 +Subproject commit 8ba1c1976c652b804a02267a8035606b10db2682 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/cib_contract57c' - framework/source
framework/source/loadenv/loadenv.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit 367dfe659802bd46edad1b046a8651bfe26d87b0 Author: Katarina Behrens AuthorDate: Tue May 7 16:27:22 2019 +0200 Commit: Katarina Behrens CommitDate: Mon May 13 15:07:31 2019 +0200 tdf#83722: don't recycle frame with unmodified template a frame that contained valid but unmodified document opened from template or explicitly opened by the user (File > New) was treated the same as blank document i.e. it was reused and the content was overwritten by newly opened document (even if it already had non-empty content provided by the template). So let's not do that and let's open a new document in a new frame instead Change-Id: I10252d114e8cc5fcad3c98194ef07fd59873d6da Reviewed-on: https://gerrit.libreoffice.org/71919 Tested-by: Jenkins Reviewed-by: Michael Stahl Reviewed-by: Katarina Behrens diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index b527d0259e77..4f9cfe71d567 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1072,7 +1072,7 @@ bool LoadEnv::impl_loadContent() // if it will be run out of scope. // Note further: ignore if this internal guard already contains a resource. -// Might impl_searchRecylcTarget() set it before. But in case this impl-method wasn't used +// Might impl_searchRecycleTarget() set it before. But in case this impl-method wasn't used // and the target frame was new created ... this lock here must be set! css::uno::Reference< css::document::XActionLockable > xTargetLock(xTargetFrame, css::uno::UNO_QUERY); m_aTargetLock.setResource(xTargetLock); @@ -1512,6 +1512,15 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() css::uno::Reference< css::frame::XController > xOldDoc = xTask->getController(); if (xOldDoc.is()) { +utl::MediaDescriptor lOldDocDescriptor(xModel->getArgs()); +bool bFromTemplate = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , false); +OUString sReferrer = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), OUString()); + +// tdf#83722: valid but unmodified document, either from template +// or opened by the user (File > New) +if (bFromTemplate || !sReferrer.isEmpty()) +return css::uno::Reference< css::frame::XFrame >(); + bReactivateOldControllerOnError = xOldDoc->suspend(true); if (! bReactivateOldControllerOnError) return css::uno::Reference< css::frame::XFrame >(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/strings.hrc |1 + sc/source/ui/miscdlgs/linkarea.cxx |9 - 2 files changed, 9 insertions(+), 1 deletion(-) New commits: commit 022deeb79ef693550ea762c9cc899806ae4b374c Author: Katarina Behrens AuthorDate: Thu May 9 20:46:45 2019 +0200 Commit: Katarina Behrens CommitDate: Mon May 13 11:11:46 2019 +0200 Make it more obvious that there are no named ranges and thus the selected doc can't be used as the source of external data for this sheet. In other words, help the user figure out why is OK button disabled Change-Id: Ie1b999c9c3640397e9f6f6ee321d3a5a5d63fa3b Reviewed-on: https://gerrit.libreoffice.org/72075 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index 3a5e2710aed0..d5685ed3c626 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -370,6 +370,7 @@ #define STR_NO_USER_DATA_AVAILABLE NC_("sharedocumentdlg|nouserdata", "No user data available.") #define STR_EXCLUSIVE_ACCESS NC_("sharedocumentdlg|exclusive", "(exclusive access)") +#define STR_NO_NAMED_RANGES_AVAILABLE NC_("STR_NO_NAMED_RANGES_AVAILABLE", "No named ranges available in the selected document") #endif diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index eedb528c704e..1ad934835b26 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -32,6 +32,8 @@ #include #include #include +#include +#include ScLinkedAreaDlg::ScLinkedAreaDlg(weld::Window* pParent) : GenericDialogController(pParent, "modules/scalc/ui/externaldata.ui", "ExternalDataDialog") @@ -260,8 +262,13 @@ void ScLinkedAreaDlg::UpdateSourceRanges() m_xLbRanges->thaw(); -if (m_xLbRanges->n_children() == 1) +if (m_xLbRanges->n_children() >= 1) m_xLbRanges->select(0); +else +{ +m_xLbRanges->append_text(ScResId(STR_NO_NAMED_RANGES_AVAILABLE)); +m_xLbRanges->set_sensitive(false); +} } void ScLinkedAreaDlg::UpdateEnable() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/source
framework/source/loadenv/loadenv.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit acd820fd39394acc9829836a597c277d8965242e Author: Katarina Behrens AuthorDate: Tue May 7 16:27:22 2019 +0200 Commit: Katarina Behrens CommitDate: Mon May 13 10:57:24 2019 +0200 tdf#83722: don't recycle frame with unmodified template a frame that contained valid but unmodified document opened from template or explicitly opened by the user (File > New) was treated the same as blank document i.e. it was reused and the content was overwritten by newly opened document (even if it already had non-empty content provided by the template). So let's not do that and let's open a new document in a new frame instead Change-Id: I10252d114e8cc5fcad3c98194ef07fd59873d6da Reviewed-on: https://gerrit.libreoffice.org/71919 Tested-by: Jenkins Reviewed-by: Michael Stahl Reviewed-by: Katarina Behrens diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 2ddfd34492d0..f37f267733b3 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1076,7 +1076,7 @@ bool LoadEnv::impl_loadContent() // if it will be run out of scope. // Note further: ignore if this internal guard already contains a resource. -// Might impl_searchRecylcTarget() set it before. But in case this impl-method wasn't used +// Might impl_searchRecycleTarget() set it before. But in case this impl-method wasn't used // and the target frame was new created ... this lock here must be set! css::uno::Reference< css::document::XActionLockable > xTargetLock(xTargetFrame, css::uno::UNO_QUERY); m_aTargetLock.setResource(xTargetLock); @@ -1514,6 +1514,15 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() css::uno::Reference< css::frame::XController > xOldDoc = xTask->getController(); if (xOldDoc.is()) { +utl::MediaDescriptor lOldDocDescriptor(xModel->getArgs()); +bool bFromTemplate = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , false); +OUString sReferrer = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER(), OUString()); + +// tdf#83722: valid but unmodified document, either from template +// or opened by the user (File > New) +if (bFromTemplate || !sReferrer.isEmpty()) +return css::uno::Reference< css::frame::XFrame >(); + bReactivateOldControllerOnError = xOldDoc->suspend(true); if (! bReactivateOldControllerOnError) return css::uno::Reference< css::frame::XFrame >(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5Frame.cxx | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) New commits: commit 758c44f69f0a0ed4a501695de4f065824325e750 Author: Katarina Behrens AuthorDate: Wed May 8 14:02:37 2019 +0200 Commit: Katarina Behrens CommitDate: Fri May 10 17:24:44 2019 +0200 tdf#124484: avoid crash in fullscreen slideshow spanning all displays This just stops the bleeding (crash) in a special case when screen number argument of SalFrame::ShowFullScreen is -1 (meaning 'fullscreen spanning all available displays') It doesn't yet extend the fullscreen window over all screens, this will be done in a follow-up fix Change-Id: I2cf48096a1fe1ec33c943f10acb41c59585b325f Reviewed-on: https://gerrit.libreoffice.org/71965 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 05e17932a93c..5ed722aad391 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -1069,12 +1069,26 @@ void Qt5Frame::SetScreenNumber(unsigned int nScreen) QList screens = QApplication::screens(); if (static_cast(nScreen) < screens.size()) { -QWidget* const pWidget = m_pTopLevel ? m_pTopLevel : m_pQWidget; -pWindow->setScreen(QApplication::screens()[nScreen]); +bool bSpanAllScreens = (nScreen == static_cast(-1)); +QRect screenGeo; + +if (!bSpanAllScreens) +{ +screenGeo = QApplication::desktop()->screenGeometry(nScreen); +pWindow->setScreen(QApplication::screens()[nScreen]); +} +else // special case: fullscreen over all available screens +{ +// left-most screen +int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 0)); +// entire virtual desktop +screenGeo = QApplication::screens()[nLeftScreen]->availableVirtualGeometry(); +pWindow->setScreen(QApplication::screens()[nLeftScreen]); +} // setScreen by itself has no effect, explicitly move the widget to // the new screen -QRect screenGeo = QApplication::desktop()->screenGeometry(nScreen); +QWidget* const pWidget = m_pTopLevel ? m_pTopLevel : m_pQWidget; pWidget->move(screenGeo.topLeft()); } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/headless vcl/inc
vcl/headless/svpgdi.cxx | 29 +++-- vcl/inc/headless/svpgdi.hxx |2 +- 2 files changed, 8 insertions(+), 23 deletions(-) New commits: commit 7f3b76ab45b70fe8465a432cd82e0d9d2a4c3eb6 Author: Katarina Behrens AuthorDate: Thu May 2 18:24:10 2019 +0200 Commit: Christian Lohmaier CommitDate: Sat May 4 10:30:58 2019 +0200 tdf#120585: use applyColor and make it transparency-aware An overloaded drawPolyPolygon for zero transparency case used to exist and it used applyColor to fill cairo path. It was removed by commit 7034311dce663c895577267110baadbec312d491 and the new transparency-aware drawPolyPolygon missed cairo_set_operator call that is present in applyColor. This works OK most of the time but breaks sometimes when no transparency (~no antialiasing) is involved. To fix that add transparency argument to applyColor and use it where applicable Change-Id: Ib1b077e38e7f5d30778434d45be67284407a7d16 Reviewed-on: https://gerrit.libreoffice.org/71759 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 2e29518a7dac..c8f179bd0066 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -550,7 +550,7 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, cairo_t* cr = getCairoContext(false); clipRegion(cr); -const double fTransparency = (100 - nTransparency) * (1.0/100); +const double fTransparency = nTransparency * (1.0/100); // To make releaseCairoContext work, use empty extents basegfx::B2DRange extents; @@ -559,10 +559,7 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, if (bHasFill) { -cairo_set_source_rgba(cr, m_aFillColor.GetRed()/255.0, - m_aFillColor.GetGreen()/255.0, - m_aFillColor.GetBlue()/255.0, - fTransparency); +applyColor(cr, m_aFillColor, fTransparency); // set FillDamage extents = getClippedFillDamage(cr); @@ -578,10 +575,7 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, cairo_matrix_init_translate(, 0.5, 0.5); cairo_set_matrix(cr, ); -cairo_set_source_rgba(cr, m_aLineColor.GetRed()/255.0, - m_aLineColor.GetGreen()/255.0, - m_aLineColor.GetBlue()/255.0, - fTransparency); +applyColor(cr, m_aLineColor, fTransparency); // expand with possible StrokeDamage extents.expand(getClippedStrokeDamage(cr)); @@ -1450,11 +1444,7 @@ bool SvpSalGraphics::drawPolyPolygon( if (bHasFill) { -cairo_set_source_rgba(cr, m_aFillColor.GetRed()/255.0, - m_aFillColor.GetGreen()/255.0, - m_aFillColor.GetBlue()/255.0, - 1.0-fTransparency); - +applyColor(cr, m_aFillColor, fTransparency); // Get FillDamage (will be extended for LineDamage below) extents = getClippedFillDamage(cr); @@ -1468,12 +1458,7 @@ bool SvpSalGraphics::drawPolyPolygon( cairo_matrix_init_translate(, 0.5, 0.5); cairo_set_matrix(cr, ); -// Note: Other methods use applyColor(...) to set the Color. That -// seems to do some more. Maybe it should be used here, too (?) -cairo_set_source_rgba(cr, m_aLineColor.GetRed()/255.0, - m_aLineColor.GetGreen()/255.0, - m_aLineColor.GetBlue()/255.0, - 1.0-fTransparency); +applyColor(cr, m_aLineColor, fTransparency); // expand with possible StrokeDamage extents.expand(getClippedStrokeDamage(cr)); @@ -1489,14 +1474,14 @@ bool SvpSalGraphics::drawPolyPolygon( return true; } -void SvpSalGraphics::applyColor(cairo_t *cr, Color aColor) +void SvpSalGraphics::applyColor(cairo_t *cr, Color aColor, double fTransparency) { if (cairo_surface_get_content(m_pSurface) == CAIRO_CONTENT_COLOR_ALPHA) { cairo_set_source_rgba(cr, aColor.GetRed()/255.0, aColor.GetGreen()/255.0, aColor.GetBlue()/255.0, - 1.0); + 1.0 - fTransparency); } else { diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 855421d671d3..c33dd9dfb827 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -126,7 +126,7 @@ public: private: void invert(const basegfx::B2DPolygon , SalInvert nFlags); -void applyColor(cairo_t *cr, Color rColor); +void applyColor(cairo_t *cr, Color rColor, double fTransparency =
[Libreoffice-commits] core.git: vcl/headless vcl/inc
vcl/headless/svpgdi.cxx | 29 +++-- vcl/inc/headless/svpgdi.hxx |2 +- 2 files changed, 8 insertions(+), 23 deletions(-) New commits: commit 8d902026dc45af7b239fc6f68096a3dd31279dc9 Author: Katarina Behrens AuthorDate: Thu May 2 18:24:10 2019 +0200 Commit: Caolán McNamara CommitDate: Fri May 3 17:09:08 2019 +0200 tdf#120585: use applyColor and make it transparency-aware An overloaded drawPolyPolygon for zero transparency case used to exist and it used applyColor to fill cairo path. It was removed by commit 7034311dce663c895577267110baadbec312d491 and the new transparency-aware drawPolyPolygon missed cairo_set_operator call that is present in applyColor. This works OK most of the time but breaks sometimes when no transparency (~no antialiasing) is involved. To fix that add transparency argument to applyColor and use it where applicable Change-Id: Ib1b077e38e7f5d30778434d45be67284407a7d16 Reviewed-on: https://gerrit.libreoffice.org/71700 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 6f70ec6edaa0..74c27e9ba960 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -548,7 +548,7 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, cairo_t* cr = getCairoContext(false); clipRegion(cr); -const double fTransparency = (100 - nTransparency) * (1.0/100); +const double fTransparency = nTransparency * (1.0/100); // To make releaseCairoContext work, use empty extents basegfx::B2DRange extents; @@ -557,10 +557,7 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, if (bHasFill) { -cairo_set_source_rgba(cr, m_aFillColor.GetRed()/255.0, - m_aFillColor.GetGreen()/255.0, - m_aFillColor.GetBlue()/255.0, - fTransparency); +applyColor(cr, m_aFillColor, fTransparency); // set FillDamage extents = getClippedFillDamage(cr); @@ -576,10 +573,7 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, cairo_matrix_init_translate(, 0.5, 0.5); cairo_set_matrix(cr, ); -cairo_set_source_rgba(cr, m_aLineColor.GetRed()/255.0, - m_aLineColor.GetGreen()/255.0, - m_aLineColor.GetBlue()/255.0, - fTransparency); +applyColor(cr, m_aLineColor, fTransparency); // expand with possible StrokeDamage extents.expand(getClippedStrokeDamage(cr)); @@ -1451,11 +1445,7 @@ bool SvpSalGraphics::drawPolyPolygon( if (bHasFill) { -cairo_set_source_rgba(cr, m_aFillColor.GetRed()/255.0, - m_aFillColor.GetGreen()/255.0, - m_aFillColor.GetBlue()/255.0, - 1.0-fTransparency); - +applyColor(cr, m_aFillColor, fTransparency); // Get FillDamage (will be extended for LineDamage below) extents = getClippedFillDamage(cr); @@ -1469,12 +1459,7 @@ bool SvpSalGraphics::drawPolyPolygon( cairo_matrix_init_translate(, 0.5, 0.5); cairo_set_matrix(cr, ); -// Note: Other methods use applyColor(...) to set the Color. That -// seems to do some more. Maybe it should be used here, too (?) -cairo_set_source_rgba(cr, m_aLineColor.GetRed()/255.0, - m_aLineColor.GetGreen()/255.0, - m_aLineColor.GetBlue()/255.0, - 1.0-fTransparency); +applyColor(cr, m_aLineColor, fTransparency); // expand with possible StrokeDamage extents.expand(getClippedStrokeDamage(cr)); @@ -1490,14 +1475,14 @@ bool SvpSalGraphics::drawPolyPolygon( return true; } -void SvpSalGraphics::applyColor(cairo_t *cr, Color aColor) +void SvpSalGraphics::applyColor(cairo_t *cr, Color aColor, double fTransparency) { if (cairo_surface_get_content(m_pSurface) == CAIRO_CONTENT_COLOR_ALPHA) { cairo_set_source_rgba(cr, aColor.GetRed()/255.0, aColor.GetGreen()/255.0, aColor.GetBlue()/255.0, - 1.0); + 1.0 - fTransparency); } else { diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 51b53f794cc9..73d80da6deb8 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -126,7 +126,7 @@ public: private: void invert(const basegfx::B2DPolygon , SalInvert nFlags); -void applyColor(cairo_t *cr, Color rColor); +void applyColor(cairo_t *cr, Color rColor,
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - avmedia/inc avmedia/source
avmedia/inc/mediacontrol.hxx |1 + avmedia/source/framework/MediaControlBase.cxx |2 +- avmedia/source/framework/mediacontrol.cxx | 22 +- 3 files changed, 19 insertions(+), 6 deletions(-) New commits: commit b787fb79ecc03713ac87e954def681d144295e2b Author: Katarina Behrens AuthorDate: Tue Apr 30 22:03:37 2019 +0200 Commit: Thorsten Behrens CommitDate: Fri May 3 09:53:25 2019 +0200 tdf#101524: seeking position shouldn't pause video playback Change-Id: I846043815cdd41620f96c31843a77bea3d2db82f Reviewed-on: https://gerrit.libreoffice.org/71596 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 1eac5fa2fd661f9572fb9f9b30e2785c0d5b513a) Reviewed-on: https://gerrit.libreoffice.org/71699 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx index 22d2b8896d3b..e7e51da44387 100644 --- a/avmedia/source/framework/MediaControlBase.cxx +++ b/avmedia/source/framework/MediaControlBase.cxx @@ -162,7 +162,7 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem) mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false ); mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_STOP, false ); } -else if( aMediaItem.getTime() > 0.0 && ( aMediaItem.getTime() < aMediaItem.getDuration() ) ) +else if( aMediaItem.getState() == MediaState::Pause ) { mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, false ); mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE ); diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 1b7f7045862b..896184deea50 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -274,6 +274,8 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p, void ) MediaItem aExecItem; aExecItem.setTime( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE ); +// keep state (if the media was playing, keep it playing) +aExecItem.setState(maItem.getState()); execute( aExecItem ); update(); maIdle.Start(); commit 2a00e1cf3773bd2264fca11fc1c116bf22dc86d6 Author: Katarina Behrens AuthorDate: Mon Apr 1 14:45:42 2019 +0200 Commit: Thorsten Behrens CommitDate: Fri May 3 09:53:13 2019 +0200 tdf#17: slider and time field update during video playback To make this happen, restart idle in timeout handler (also start it when user bonks Play button and stop it when they bonk Pause or Stop button). The idle also needs a lower prio than TaskPriority::Repaint, otherwise the higher-prio events from our idle are going to starve UI repaints in the scheduler queue Change-Id: I4c767c3533e0e2ee9015c48b17075db5e0dc7ade Reviewed-on: https://gerrit.libreoffice.org/70068 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit b2ccf5efae5261886a5aadf3f72ff095cb3b3d5b) Reviewed-on: https://gerrit.libreoffice.org/71698 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index 99ad5ef91a01..bdf0ce35 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -77,6 +77,7 @@ private: SizemaMinSize; boolmbLocked; MediaControlStyle meControlStyle; +double mfTime; }; } diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index dd9a02cb5c89..1b7f7045862b 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -44,7 +44,8 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl maIdle( "avmedia MediaControl Idle" ), maItem( 0, AVMediaSetMask::ALL ), mbLocked( false ), -meControlStyle( eControlStyle ) +meControlStyle( eControlStyle ), +mfTime(0.0) { mpPlayToolBox = VclPtr::Create(this, WB_3DLOOK) ; mpTimeSlider = VclPtr::Create(this, WB_HORZ | WB_DRAG | WB_3DLOOK) ; @@ -116,10 +117,10 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl mpZoomToolBox->SetBackground(); mpZoomToolBox->SetPaintTransparent( true ); } - -maIdle.SetPriority( TaskPriority::HIGH_IDLE ); +// we want time field + progress slider to update as the media plays +// give this task a lower prio than REPAINT so that UI updates are not starved +maIdle.SetPriority( TaskPriority::POST_PAINT ); maIdle.SetInvokeHandler( LINK( this, MediaControl, implTimeoutHdl ) ); -maIdle.Start(); } void MediaControl::InitializeWidgets() @@ -245,8 +246,10 @@ void MediaControl::Resize() void MediaControl::setState( const MediaItem&
[Libreoffice-commits] core.git: avmedia/source
avmedia/source/framework/MediaControlBase.cxx |2 +- avmedia/source/framework/mediacontrol.cxx |2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit 1eac5fa2fd661f9572fb9f9b30e2785c0d5b513a Author: Katarina Behrens AuthorDate: Tue Apr 30 22:03:37 2019 +0200 Commit: Katarina Behrens CommitDate: Thu May 2 20:16:40 2019 +0200 tdf#101524: seeking position shouldn't pause video playback Change-Id: I846043815cdd41620f96c31843a77bea3d2db82f Reviewed-on: https://gerrit.libreoffice.org/71596 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx index 9cd55282226a..4caedac9db2b 100644 --- a/avmedia/source/framework/MediaControlBase.cxx +++ b/avmedia/source/framework/MediaControlBase.cxx @@ -163,7 +163,7 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem) mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false ); mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_STOP, false ); } -else if( aMediaItem.getTime() > 0.0 && ( aMediaItem.getTime() < aMediaItem.getDuration() ) ) +else if( aMediaItem.getState() == MediaState::Pause ) { mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, false ); mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE ); diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 0988c88c0d13..e194a2296fef 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -274,6 +274,8 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p, void ) MediaItem aExecItem; aExecItem.setTime( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE ); +// keep state (if the media was playing, keep it playing) +aExecItem.setState(maItem.getState()); execute( aExecItem ); update(); maIdle.Start(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/inc vcl/qt5
vcl/inc/qt5/Qt5DragAndDrop.hxx |2 ++ vcl/qt5/Qt5DragAndDrop.cxx | 26 -- 2 files changed, 26 insertions(+), 2 deletions(-) New commits: commit 058537c95d172b4cb1256c1c6542860f4712cf21 Author: Katarina Behrens AuthorDate: Mon Apr 29 14:50:32 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Apr 30 23:46:20 2019 +0200 tdf#124990: DnD operation can be set to fail in dropComplete thus we reimplement it for Qt5DropTarget. This is qt5 remix of tdf#118302 (in Calc drop into the same tab should cancel DnD, instead of causing data loss) Change-Id: Ib37ea5a018133779e85e8e131d81bb6cee7d9206 Reviewed-on: https://gerrit.libreoffice.org/71531 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit cc6c1798b8d6d9d27dc40145e1ec71dd480c788a) Reviewed-on: https://gerrit.libreoffice.org/71569 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/vcl/inc/qt5/Qt5DragAndDrop.hxx b/vcl/inc/qt5/Qt5DragAndDrop.hxx index 099ba444ea15..3547131587f3 100644 --- a/vcl/inc/qt5/Qt5DragAndDrop.hxx +++ b/vcl/inc/qt5/Qt5DragAndDrop.hxx @@ -75,6 +75,8 @@ public: void fire_dragEnd(sal_Int8 nAction); static Qt5DragSource* m_ActiveDragSource; +static bool m_bDropSuccessSet; +static bool m_bDropSuccess; css::uno::Reference const& GetTransferable() const { diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx index adc7a94fa0c2..42e61074a824 100644 --- a/vcl/qt5/Qt5DragAndDrop.cxx +++ b/vcl/qt5/Qt5DragAndDrop.cxx @@ -94,6 +94,9 @@ std::vector Qt5DnDTransferable::getTransferDataFl return aVector; } +bool Qt5DragSource::m_bDropSuccessSet = false; +bool Qt5DragSource::m_bDropSuccess = false; + Qt5DragSource::~Qt5DragSource() { //if (m_pFrame) @@ -140,6 +143,8 @@ void Qt5DragSource::startDrag( { Qt5Widget* qw = static_cast(m_pFrame->GetQWidget()); m_ActiveDragSource = this; +m_bDropSuccessSet = false; +m_bDropSuccess = false; qw->startDrag(sourceActions); } else @@ -165,7 +170,14 @@ void Qt5DragSource::fire_dragEnd(sal_Int8 nAction) { datatransfer::dnd::DragSourceDropEvent aEv; aEv.DropAction = nAction; -aEv.DropSuccess = true; // FIXME: what if drop didn't work out? + +// internal DnD can accept the drop +// but still fail in Qt5DropTarget::dropComplete +if (m_bDropSuccessSet) +aEv.DropSuccess = m_bDropSuccess; +else +aEv.DropSuccess = true; + auto xListener = m_xListener; m_xListener.clear(); xListener->dragDropEnd(aEv); @@ -341,6 +353,16 @@ void Qt5DropTarget::rejectDrop() return; } -void Qt5DropTarget::dropComplete(sal_Bool /*success*/) { return; } +void Qt5DropTarget::dropComplete(sal_Bool success) +{ +// internal DnD +if (Qt5DragSource::m_ActiveDragSource) +{ +Qt5DragSource::m_bDropSuccessSet = true; +Qt5DragSource::m_bDropSuccess = success; +} + +return; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
vcl/qt5/Qt5Frame.cxx |1 + vcl/qt5/Qt5Widget.cxx |1 - 2 files changed, 1 insertion(+), 1 deletion(-) New commits: commit 69582a4afcc2d8f0da602d319b5785609c0292ad Author: Katarina Behrens AuthorDate: Mon Apr 29 15:42:40 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Apr 30 23:44:25 2019 +0200 tdf#123859: only accept drops when drop target was registered some hard to reliably reproduce crashes when drag'n'dropping slides in slide sorter in Impress can be tracked down to null drop target. Not every SalFrame is registered as drop target, so let's accept drops (QWidget::setAcceptDrops) only for those frames that are. Change-Id: I01f006d619209c558e8d9976116daad65f51d7d9 Reviewed-on: https://gerrit.libreoffice.org/71533 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 6a67ecd9b12e68031b5dbacb591955b59f476b86) Reviewed-on: https://gerrit.libreoffice.org/71583 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index b1ad0f93d561..62d3808ba572 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -1100,6 +1100,7 @@ void Qt5Frame::registerDropTarget(Qt5DropTarget* pDropTarget) { assert(!m_pDropTarget); m_pDropTarget = pDropTarget; +m_pQWidget->setAcceptDrops(true); } void Qt5Frame::deregisterDropTarget(Qt5DropTarget const* pDropTarget) diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 8f7cb8756c25..62fae3736247 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -445,7 +445,6 @@ Qt5Widget::Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f) { create(); setMouseTracking(true); -setAcceptDrops(true); setFocusPolicy(Qt::StrongFocus); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - vcl/headless
vcl/headless/svpgdi.cxx | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) New commits: commit 70ecf4bb6d300e02e8765754ef2bb41bd2d851c2 Author: Katarina Behrens AuthorDate: Fri Apr 26 17:12:41 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Apr 30 10:19:46 2019 +0200 tdf#120797: Apply transformation also to the extents of damage since 7034311dce663c895577267110baadbec312d491 affine transformation is passed down to drawPolyPolygon and drawPolyLine functions. The transformation was correctly applied to cairo context, but not the extents of damage so those had old, untransformed coordinates and were therefore not redrawn Change-Id: I61ce005ef8770ce5c4560a9d953cd92f440043be Reviewed-on: https://gerrit.libreoffice.org/71383 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara remove comment in light of fix for tdf#120797 Change-Id: I3093f764a26abdbdb651596352ba74b7fa1c3306 Reviewed-on: https://gerrit.libreoffice.org/71399 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/71534 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 0e5a07ec7d61..7efb9423359c 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1136,6 +1136,9 @@ bool SvpSalGraphics::drawPolyLine( fMiterMinimumAngle, bPixelSnapHairline)); +// if transformation has been applied, transform also extents (ranges) +// of damage so they can be correctly redrawn +aExtents.transform(rObjectToDevice); releaseCairoContext(cr, false, aExtents); return bRetval; @@ -1336,21 +1339,9 @@ bool SvpSalGraphics::drawPolyLine( } // extract extents -if(nullptr != pExtents) -{ -// This uses cairo_stroke_extents and combines with cairo_clip_extents, so -// referring to Cairo-documentation: -// "Computes a bounding box in user coordinates covering the area that would -// be affected, (the "inked" area), by a cairo_stroke() operation given the -// current path and stroke parameters." -// It *should* use the current set cairo_matrix_t. +if (pExtents) *pExtents = getClippedStrokeDamage(cr); -// If not - the following code needs to be used to correct that: -// if(!pExtents->isEmpty() && !bObjectToDeviceIsIdentity) -// pExtents->transform(rObjectToDevice); -} - // draw and consume cairo_stroke(cr); @@ -1483,6 +1474,9 @@ bool SvpSalGraphics::drawPolyPolygon( cairo_stroke_preserve(cr); } +// if transformation has been applied, transform also extents (ranges) +// of damage so they can be correctly redrawn +extents.transform(rObjectToDevice); releaseCairoContext(cr, true, extents); return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5Frame.cxx |1 + vcl/qt5/Qt5Widget.cxx |1 - 2 files changed, 1 insertion(+), 1 deletion(-) New commits: commit 6a67ecd9b12e68031b5dbacb591955b59f476b86 Author: Katarina Behrens AuthorDate: Mon Apr 29 15:42:40 2019 +0200 Commit: Katarina Behrens CommitDate: Tue Apr 30 10:08:09 2019 +0200 tdf#123859: only accept drops when drop target was registered some hard to reliably reproduce crashes when drag'n'dropping slides in slide sorter in Impress can be tracked down to null drop target. Not every SalFrame is registered as drop target, so let's accept drops (QWidget::setAcceptDrops) only for those frames that are. Change-Id: I01f006d619209c558e8d9976116daad65f51d7d9 Reviewed-on: https://gerrit.libreoffice.org/71533 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 93c37f7a426f..b07ea360a1cc 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -,6 +,7 @@ void Qt5Frame::registerDropTarget(Qt5DropTarget* pDropTarget) { assert(!m_pDropTarget); m_pDropTarget = pDropTarget; +m_pQWidget->setAcceptDrops(true); } void Qt5Frame::deregisterDropTarget(Qt5DropTarget const* pDropTarget) diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index c04564a75e06..f2c574a99655 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -446,7 +446,6 @@ Qt5Widget::Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f) { create(); setMouseTracking(true); -setAcceptDrops(true); setFocusPolicy(Qt::StrongFocus); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/Qt5DragAndDrop.hxx |2 ++ vcl/qt5/Qt5DragAndDrop.cxx | 26 -- 2 files changed, 26 insertions(+), 2 deletions(-) New commits: commit cc6c1798b8d6d9d27dc40145e1ec71dd480c788a Author: Katarina Behrens AuthorDate: Mon Apr 29 14:50:32 2019 +0200 Commit: Katarina Behrens CommitDate: Mon Apr 29 21:21:42 2019 +0200 tdf#124990: DnD operation can be set to fail in dropComplete thus we reimplement it for Qt5DropTarget. This is qt5 remix of tdf#118302 (in Calc drop into the same tab should cancel DnD, instead of causing data loss) Change-Id: Ib37ea5a018133779e85e8e131d81bb6cee7d9206 Reviewed-on: https://gerrit.libreoffice.org/71531 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/inc/qt5/Qt5DragAndDrop.hxx b/vcl/inc/qt5/Qt5DragAndDrop.hxx index 099ba444ea15..3547131587f3 100644 --- a/vcl/inc/qt5/Qt5DragAndDrop.hxx +++ b/vcl/inc/qt5/Qt5DragAndDrop.hxx @@ -75,6 +75,8 @@ public: void fire_dragEnd(sal_Int8 nAction); static Qt5DragSource* m_ActiveDragSource; +static bool m_bDropSuccessSet; +static bool m_bDropSuccess; css::uno::Reference const& GetTransferable() const { diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx index adc7a94fa0c2..42e61074a824 100644 --- a/vcl/qt5/Qt5DragAndDrop.cxx +++ b/vcl/qt5/Qt5DragAndDrop.cxx @@ -94,6 +94,9 @@ std::vector Qt5DnDTransferable::getTransferDataFl return aVector; } +bool Qt5DragSource::m_bDropSuccessSet = false; +bool Qt5DragSource::m_bDropSuccess = false; + Qt5DragSource::~Qt5DragSource() { //if (m_pFrame) @@ -140,6 +143,8 @@ void Qt5DragSource::startDrag( { Qt5Widget* qw = static_cast(m_pFrame->GetQWidget()); m_ActiveDragSource = this; +m_bDropSuccessSet = false; +m_bDropSuccess = false; qw->startDrag(sourceActions); } else @@ -165,7 +170,14 @@ void Qt5DragSource::fire_dragEnd(sal_Int8 nAction) { datatransfer::dnd::DragSourceDropEvent aEv; aEv.DropAction = nAction; -aEv.DropSuccess = true; // FIXME: what if drop didn't work out? + +// internal DnD can accept the drop +// but still fail in Qt5DropTarget::dropComplete +if (m_bDropSuccessSet) +aEv.DropSuccess = m_bDropSuccess; +else +aEv.DropSuccess = true; + auto xListener = m_xListener; m_xListener.clear(); xListener->dragDropEnd(aEv); @@ -341,6 +353,16 @@ void Qt5DropTarget::rejectDrop() return; } -void Qt5DropTarget::dropComplete(sal_Bool /*success*/) { return; } +void Qt5DropTarget::dropComplete(sal_Bool success) +{ +// internal DnD +if (Qt5DragSource::m_ActiveDragSource) +{ +Qt5DragSource::m_bDropSuccessSet = true; +Qt5DragSource::m_bDropSuccess = success; +} + +return; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/headless
vcl/headless/svpgdi.cxx | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) New commits: commit dc37b4babc3234df7e2bde67ac662324925f0e61 Author: Katarina Behrens AuthorDate: Fri Apr 26 17:12:41 2019 +0200 Commit: Caolán McNamara CommitDate: Mon Apr 29 18:30:05 2019 +0200 tdf#120797: Apply transformation also to the extents of damage since 7034311dce663c895577267110baadbec312d491 affine transformation is passed down to drawPolyPolygon and drawPolyLine functions. The transformation was correctly applied to cairo context, but not the extents of damage so those had old, untransformed coordinates and were therefore not redrawn Change-Id: I61ce005ef8770ce5c4560a9d953cd92f440043be Reviewed-on: https://gerrit.libreoffice.org/71383 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara remove comment in light of fix for tdf#120797 Change-Id: I3093f764a26abdbdb651596352ba74b7fa1c3306 Reviewed-on: https://gerrit.libreoffice.org/71399 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/71511 diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 3a785d642301..2e29518a7dac 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1143,6 +1143,9 @@ bool SvpSalGraphics::drawPolyLine( fMiterMinimumAngle, bPixelSnapHairline)); +// if transformation has been applied, transform also extents (ranges) +// of damage so they can be correctly redrawn +aExtents.transform(rObjectToDevice); releaseCairoContext(cr, false, aExtents); return bRetval; @@ -1343,21 +1346,9 @@ bool SvpSalGraphics::drawPolyLine( } // extract extents -if(nullptr != pExtents) -{ -// This uses cairo_stroke_extents and combines with cairo_clip_extents, so -// referring to Cairo-documentation: -// "Computes a bounding box in user coordinates covering the area that would -// be affected, (the "inked" area), by a cairo_stroke() operation given the -// current path and stroke parameters." -// It *should* use the current set cairo_matrix_t. +if (pExtents) *pExtents = getClippedStrokeDamage(cr); -// If not - the following code needs to be used to correct that: -// if(!pExtents->isEmpty() && !bObjectToDeviceIsIdentity) -// pExtents->transform(rObjectToDevice); -} - // draw and consume cairo_stroke(cr); @@ -1490,6 +1481,9 @@ bool SvpSalGraphics::drawPolyPolygon( cairo_stroke_preserve(cr); } +// if transformation has been applied, transform also extents (ranges) +// of damage so they can be correctly redrawn +extents.transform(rObjectToDevice); releaseCairoContext(cr, true, extents); return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/Library_vclplug_gtk3_kde5.mk
vcl/Library_vclplug_gtk3_kde5.mk |1 - 1 file changed, 1 deletion(-) New commits: commit d6f80cff1c92a6941e53b0ceea2a83cc5d2b452c Author: Katarina Behrens AuthorDate: Fri Apr 26 17:04:32 2019 +0200 Commit: Caolán McNamara CommitDate: Sat Apr 27 17:36:27 2019 +0200 No need to link gtk3_kde5 with generic vclplug like this since initial commit but prolly just copy'n'pasta error Change-Id: Id61c2d8ef1df496738575e4ee4879d71a40b4934 Reviewed-on: https://gerrit.libreoffice.org/71381 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/Library_vclplug_gtk3_kde5.mk b/vcl/Library_vclplug_gtk3_kde5.mk index d7f9b9d11107..089d6ee31a1f 100644 --- a/vcl/Library_vclplug_gtk3_kde5.mk +++ b/vcl/Library_vclplug_gtk3_kde5.mk @@ -59,7 +59,6 @@ $(eval $(call gb_Library_add_libs,vclplug_gtk3_kde5,\ $(eval $(call gb_Library_use_libraries,vclplug_gtk3_kde5,\ svl \ -vclplug_gen \ vcl \ tl \ utl \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/headless
vcl/headless/svpgdi.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 95e9b7b2d1a5bb6776eef89461b63ab3dc01f34f Author: Katarina Behrens AuthorDate: Fri Apr 26 17:12:41 2019 +0200 Commit: Caolán McNamara CommitDate: Fri Apr 26 22:51:25 2019 +0200 tdf#120797: Apply transformation also to the extents of damage since 7034311dce663c895577267110baadbec312d491 affine transformation is passed down to drawPolyPolygon and drawPolyLine functions. The transformation was correctly applied to cairo context, but not the extents of damage so those had old, untransformed coordinates and were therefore not redrawn Change-Id: I61ce005ef8770ce5c4560a9d953cd92f440043be Reviewed-on: https://gerrit.libreoffice.org/71383 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 2cf49ca17696..1c36f351b538 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1144,6 +1144,9 @@ bool SvpSalGraphics::drawPolyLine( fMiterMinimumAngle, bPixelSnapHairline)); +// if transformation has been applied, transform also extents (ranges) +// of damage so they can be correctly redrawn +aExtents.transform(rObjectToDevice); releaseCairoContext(cr, false, aExtents); return bRetval; @@ -1491,6 +1494,9 @@ bool SvpSalGraphics::drawPolyPolygon( cairo_stroke_preserve(cr); } +// if transformation has been applied, transform also extents (ranges) +// of damage so they can be correctly redrawn +extents.transform(rObjectToDevice); releaseCairoContext(cr, true, extents); return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/source
sc/source/core/data/document.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 26984ec23769404496e5898b2cbbaeabc6ac6a4b Author: Katarina Behrens AuthorDate: Tue Apr 23 11:59:40 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Apr 24 13:33:38 2019 +0200 Skip clipboard queries while the document is still loading Use-case here is .ods document with 16k tracked changes. For every tracked change, Calc generates a formula cell. For every formula cell, clipboard content is queried (via ScDocument::IsClipboardSource, ScModule::GetClipDoc respectively). This is dog-slow on Windows Therefore don't query clipboard content while the document is in the process of being loaded. Instead return from ScDocument:: IsClipboardSource early and return 'false' because at this point of time it can't be reliably determined whether this doc is a clipboard source anyway Change-Id: If5aa62cbfb62fb326a3c73b4d9be839127d3c03b Reviewed-on: https://gerrit.libreoffice.org/71121 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens (cherry picked from commit 9c8aa1c217f016fae9a57c6a4feca43551e5068e) Reviewed-on: https://gerrit.libreoffice.org/71146 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index dae92c818b37..b54ef92a1410 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2564,7 +2564,8 @@ void ScDocument::SetClipParam(const ScClipParam& rParam) bool ScDocument::IsClipboardSource() const { -if (bIsClip || mpShell == nullptr) +if (bIsClip || mpShell == nullptr || +(mpShell && mpShell->IsLoading())) return false; ScDocument* pClipDoc = ScModule::GetClipDoc(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'feature/cib_contract935b'
New branch 'feature/cib_contract935b' available with the following commits: commit 489cb0662ce4c58ee4467942a117c9f54bc3eca7 Author: Katarina Behrens Date: Tue Apr 23 11:59:40 2019 +0200 Skip clipboard queries while the document is still loading Use-case here is .ods document with 16k tracked changes. For every tracked change, Calc generates a formula cell. For every formula cell, clipboard content is queried (via ScDocument::IsClipboardSource, ScModule::GetClipDoc respectively). This is dog-slow on Windows Therefore don't query clipboard content while the document is in the process of being loaded. Instead return from ScDocument:: IsClipboardSource early and return 'false' because at this point of time it can't be reliably determined whether this doc is a clipboard source anyway Change-Id: If5aa62cbfb62fb326a3c73b4d9be839127d3c03b Reviewed-on: https://gerrit.libreoffice.org/71121 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens (cherry picked from commit 9c8aa1c217f016fae9a57c6a4feca43551e5068e) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/data/document.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 9c8aa1c217f016fae9a57c6a4feca43551e5068e Author: Katarina Behrens AuthorDate: Tue Apr 23 11:59:40 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Apr 23 23:32:46 2019 +0200 Skip clipboard queries while the document is still loading Use-case here is .ods document with 16k tracked changes. For every tracked change, Calc generates a formula cell. For every formula cell, clipboard content is queried (via ScDocument::IsClipboardSource, ScModule::GetClipDoc respectively). This is dog-slow on Windows Therefore don't query clipboard content while the document is in the process of being loaded. Instead return from ScDocument:: IsClipboardSource early and return 'false' because at this point of time it can't be reliably determined whether this doc is a clipboard source anyway Change-Id: If5aa62cbfb62fb326a3c73b4d9be839127d3c03b Reviewed-on: https://gerrit.libreoffice.org/71121 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 9c1875869099..134e5998ef22 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2570,7 +2570,8 @@ void ScDocument::SetClipParam(const ScClipParam& rParam) bool ScDocument::IsClipboardSource() const { -if (bIsClip || mpShell == nullptr) +if (bIsClip || mpShell == nullptr || +(mpShell && mpShell->IsLoading())) return false; ScDocument* pClipDoc = ScModule::GetClipDoc(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - shell/source
shell/source/backends/kde5be/kde5backend.cxx | 56 --- 1 file changed, 42 insertions(+), 14 deletions(-) New commits: commit a912915ddfe6ba908cce5fff7817806a29d3a368 Author: Katarina Behrens AuthorDate: Tue Apr 16 09:47:31 2019 +0200 Commit: Michael Weghorn CommitDate: Tue Apr 23 08:15:31 2019 +0200 Stop qt event loop after KDE settings have been read Two use-cases here in kde5backend 1) kde or qt vclplug has already started qt event loop => just use this loop to read KDE settings 2) no qt event loop runs (we're most likely in gtk3_kde5 vclplug) => start a new event loop, read the settings and stop it In case 2) letting qt event loop run means subsequently all UI ops need to happen in main thread. This is problematic to enforce in non-qt-based vclplugs In both cases, cache those settings for future use - the assumption is, most of them are static during a session anyway. Change-Id: Ifa203f4cdb9a753db808f945762fb131ee83393c Reviewed-on: https://gerrit.libreoffice.org/70808 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 5a64bc2b1214e6ad8424f57576aa5752a09815d4) Reviewed-on: https://gerrit.libreoffice.org/71105 Reviewed-by: Michael Weghorn Tested-by: Michael Weghorn diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx index e2f6e25c0764..101a21387a4c 100644 --- a/shell/source/backends/kde5be/kde5backend.cxx +++ b/shell/source/backends/kde5be/kde5backend.cxx @@ -120,7 +120,7 @@ private: { } -bool enabled_; +std::map> m_KDESettings; }; OString getDisplayArg() @@ -148,10 +148,28 @@ OString getExecutable() return OUStringToOString(aBin, osl_getThreadTextEncoding()); } +void readKDESettings(std::map>& rSettings) +{ +const std::vector aKeys += { "EnableATToolSupport", "ExternalMailer", "SourceViewFontHeight", +"SourceViewFontName", "WorkPathVariable", "ooInetFTPProxyName", +"ooInetFTPProxyPort", "ooInetHTTPProxyName", "ooInetHTTPProxyPort", +"ooInetHTTPSProxyName", "ooInetHTTPSProxyPort", "ooInetNoProxy", +"ooInetProxyType" }; + +for (const OUString& aKey : aKeys) +{ +css::beans::Optional aValue = kde5access::getValue(aKey); +std::pair> elem += std::make_pair(aKey, aValue); +rSettings.insert(elem); +} +} + // init the QApplication when we load the kde5backend into a non-Qt vclplug (e.g. Gtk3KDE5) // TODO: use a helper process to read these values without linking to Qt directly? // TODO: share this code somehow with Qt5Instance.cxx? -void initQApp() +void initQApp(std::map>& rSettings) { const auto aDisplay = getDisplayArg(); int nFakeArgc = aDisplay.isEmpty() ? 2 : 3; @@ -169,36 +187,42 @@ void initQApp() unsetenv("SESSION_MANAGER"); } -auto app = new QApplication(nFakeArgc, pFakeArgv); -QObject::connect(app, ::destroyed, app, [nFakeArgc, pFakeArgv]() { +std::unique_ptr app(new QApplication(nFakeArgc, pFakeArgv)); +QObject::connect(app.get(), ::destroyed, app.get(), [nFakeArgc, pFakeArgv]() { for (int i = 0; i < nFakeArgc; ++i) delete pFakeArgv[i]; delete[] pFakeArgv; }); +readKDESettings(rSettings); + if (session_manager != nullptr) { // coverity[tainted_string] - trusted source for setenv setenv("SESSION_MANAGER", session_manager, 1); free(session_manager); } - -QApplication::setQuitOnLastWindowClosed(false); } Service::Service() -: enabled_(false) { css::uno::Reference context(css::uno::getCurrentContext()); if (context.is()) { -if (!qApp) -{ -initQApp(); -} OUString desktop; context->getValueByName("system.desktop-environment") >>= desktop; -enabled_ = desktop == "KDE5" && qApp != nullptr; + +if (desktop == "KDE5") +{ +if (!qApp) // no qt event loop yet +{ +// so we start one and read KDE settings +initQApp(m_KDESettings); +} +else // someone else (most likely kde/qt vclplug) has started qt event loop +// all that is left to do is to read KDE settings +readKDESettings(m_KDESettings); +} } } @@ -218,8 +242,12 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName) || PropertyName == "ooInetHTTPSProxyPort" || PropertyName == "ooInetNoProxy" || PropertyName == "ooInetProxyType") { -return css::uno::makeAny(enabled_ ? kde5access::getValue(PropertyName) - : css::beans::Optional()); +std::map>::iterator it += m_KDESettings.find(PropertyName); +if (it !=
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - shell/source
shell/source/backends/kde5be/kde5backend.cxx | 56 --- 1 file changed, 42 insertions(+), 14 deletions(-) New commits: commit 15acea305b93833babe2064b9dab25acb7fcbff6 Author: Katarina Behrens AuthorDate: Tue Apr 16 09:47:31 2019 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 18 12:34:40 2019 +0200 Stop qt event loop after KDE settings have been read Two use-cases here in kde5backend 1) kde or qt vclplug has already started qt event loop => just use this loop to read KDE settings 2) no qt event loop runs (we're most likely in gtk3_kde5 vclplug) => start a new event loop, read the settings and stop it In case 2) letting qt event loop run means subsequently all UI ops need to happen in main thread. This is problematic to enforce in non-qt-based vclplugs In both cases, cache those settings for future use - the assumption is, most of them are static during a session anyway. Change-Id: Ifa203f4cdb9a753db808f945762fb131ee83393c Reviewed-on: https://gerrit.libreoffice.org/70808 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 5a64bc2b1214e6ad8424f57576aa5752a09815d4) Reviewed-on: https://gerrit.libreoffice.org/70895 Reviewed-by: Michael Weghorn diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx index e2f6e25c0764..101a21387a4c 100644 --- a/shell/source/backends/kde5be/kde5backend.cxx +++ b/shell/source/backends/kde5be/kde5backend.cxx @@ -120,7 +120,7 @@ private: { } -bool enabled_; +std::map> m_KDESettings; }; OString getDisplayArg() @@ -148,10 +148,28 @@ OString getExecutable() return OUStringToOString(aBin, osl_getThreadTextEncoding()); } +void readKDESettings(std::map>& rSettings) +{ +const std::vector aKeys += { "EnableATToolSupport", "ExternalMailer", "SourceViewFontHeight", +"SourceViewFontName", "WorkPathVariable", "ooInetFTPProxyName", +"ooInetFTPProxyPort", "ooInetHTTPProxyName", "ooInetHTTPProxyPort", +"ooInetHTTPSProxyName", "ooInetHTTPSProxyPort", "ooInetNoProxy", +"ooInetProxyType" }; + +for (const OUString& aKey : aKeys) +{ +css::beans::Optional aValue = kde5access::getValue(aKey); +std::pair> elem += std::make_pair(aKey, aValue); +rSettings.insert(elem); +} +} + // init the QApplication when we load the kde5backend into a non-Qt vclplug (e.g. Gtk3KDE5) // TODO: use a helper process to read these values without linking to Qt directly? // TODO: share this code somehow with Qt5Instance.cxx? -void initQApp() +void initQApp(std::map>& rSettings) { const auto aDisplay = getDisplayArg(); int nFakeArgc = aDisplay.isEmpty() ? 2 : 3; @@ -169,36 +187,42 @@ void initQApp() unsetenv("SESSION_MANAGER"); } -auto app = new QApplication(nFakeArgc, pFakeArgv); -QObject::connect(app, ::destroyed, app, [nFakeArgc, pFakeArgv]() { +std::unique_ptr app(new QApplication(nFakeArgc, pFakeArgv)); +QObject::connect(app.get(), ::destroyed, app.get(), [nFakeArgc, pFakeArgv]() { for (int i = 0; i < nFakeArgc; ++i) delete pFakeArgv[i]; delete[] pFakeArgv; }); +readKDESettings(rSettings); + if (session_manager != nullptr) { // coverity[tainted_string] - trusted source for setenv setenv("SESSION_MANAGER", session_manager, 1); free(session_manager); } - -QApplication::setQuitOnLastWindowClosed(false); } Service::Service() -: enabled_(false) { css::uno::Reference context(css::uno::getCurrentContext()); if (context.is()) { -if (!qApp) -{ -initQApp(); -} OUString desktop; context->getValueByName("system.desktop-environment") >>= desktop; -enabled_ = desktop == "KDE5" && qApp != nullptr; + +if (desktop == "KDE5") +{ +if (!qApp) // no qt event loop yet +{ +// so we start one and read KDE settings +initQApp(m_KDESettings); +} +else // someone else (most likely kde/qt vclplug) has started qt event loop +// all that is left to do is to read KDE settings +readKDESettings(m_KDESettings); +} } } @@ -218,8 +242,12 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName) || PropertyName == "ooInetHTTPSProxyPort" || PropertyName == "ooInetNoProxy" || PropertyName == "ooInetProxyType") { -return css::uno::makeAny(enabled_ ? kde5access::getValue(PropertyName) - : css::beans::Optional()); +std::map>::iterator it += m_KDESettings.find(PropertyName); +if (it != m_KDESettings.end()) +
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - shell/source
shell/source/backends/kde5be/kde5backend.cxx | 56 --- 1 file changed, 42 insertions(+), 14 deletions(-) New commits: commit cf034c3db6aaf1417ab979fb97cf6068d3406c6c Author: Katarina Behrens AuthorDate: Tue Apr 16 09:47:31 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Apr 17 18:18:06 2019 +0200 Stop qt event loop after KDE settings have been read Two use-cases here in kde5backend 1) kde or qt vclplug has already started qt event loop => just use this loop to read KDE settings 2) no qt event loop runs (we're most likely in gtk3_kde5 vclplug) => start a new event loop, read the settings and stop it In case 2) letting qt event loop run means subsequently all UI ops need to happen in main thread. This is problematic to enforce in non-qt-based vclplugs In both cases, cache those settings for future use - the assumption is, most of them are static during a session anyway. Change-Id: Ifa203f4cdb9a753db808f945762fb131ee83393c Reviewed-on: https://gerrit.libreoffice.org/70872 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx index 9f9fb6f5c23b..a0093ed08039 100644 --- a/shell/source/backends/kde5be/kde5backend.cxx +++ b/shell/source/backends/kde5be/kde5backend.cxx @@ -120,7 +120,7 @@ private: { } -bool enabled_; +std::map> m_KDESettings; }; OString getDisplayArg() @@ -148,10 +148,28 @@ OString getExecutable() return OUStringToOString(aBin, osl_getThreadTextEncoding()); } +void readKDESettings(std::map>& rSettings) +{ +const std::vector aKeys += { "EnableATToolSupport", "ExternalMailer", "SourceViewFontHeight", +"SourceViewFontName", "WorkPathVariable", "ooInetFTPProxyName", +"ooInetFTPProxyPort", "ooInetHTTPProxyName", "ooInetHTTPProxyPort", +"ooInetHTTPSProxyName", "ooInetHTTPSProxyPort", "ooInetNoProxy", +"ooInetProxyType" }; + +for (const OUString& aKey : aKeys) +{ +css::beans::Optional aValue = kde5access::getValue(aKey); +std::pair> elem += std::make_pair(aKey, aValue); +rSettings.insert(elem); +} +} + // init the QApplication when we load the kde5backend into a non-Qt vclplug (e.g. Gtk3KDE5) // TODO: use a helper process to read these values without linking to Qt directly? // TODO: share this code somehow with Qt5Instance.cxx? -void initQApp() +void initQApp(std::map>& rSettings) { const auto aDisplay = getDisplayArg(); int nFakeArgc = aDisplay.isEmpty() ? 2 : 3; @@ -169,36 +187,42 @@ void initQApp() unsetenv("SESSION_MANAGER"); } -auto app = new QApplication(nFakeArgc, pFakeArgv); -QObject::connect(app, ::destroyed, app, [nFakeArgc, pFakeArgv]() { +std::unique_ptr app(new QApplication(nFakeArgc, pFakeArgv)); +QObject::connect(app.get(), ::destroyed, app.get(), [nFakeArgc, pFakeArgv]() { for (int i = 0; i < nFakeArgc; ++i) delete pFakeArgv[i]; delete[] pFakeArgv; }); +readKDESettings(rSettings); + if (session_manager != nullptr) { // coverity[tainted_string] - trusted source for setenv setenv("SESSION_MANAGER", session_manager, 1); free(session_manager); } - -QApplication::setQuitOnLastWindowClosed(false); } Service::Service() -: enabled_(false) { css::uno::Reference context(css::uno::getCurrentContext()); if (context.is()) { -if (!qApp) -{ -initQApp(); -} OUString desktop; context->getValueByName("system.desktop-environment") >>= desktop; -enabled_ = desktop == "KDE5" && qApp != nullptr; + +if (desktop == "KDE5") +{ +if (!qApp) // no qt event loop yet +{ +// so we start one and read KDE settings +initQApp(m_KDESettings); +} +else // someone else (most likely kde/qt vclplug) has started qt event loop +// all that is left to do is to read KDE settings +readKDESettings(m_KDESettings); +} } } @@ -218,8 +242,12 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName) throw (com || PropertyName == "ooInetHTTPSProxyPort" || PropertyName == "ooInetNoProxy" || PropertyName == "ooInetProxyType") { -return css::uno::makeAny(enabled_ ? kde5access::getValue(PropertyName) - : css::beans::Optional()); +std::map>::iterator it += m_KDESettings.find(PropertyName); +if (it != m_KDESettings.end()) +return css::uno::makeAny(it->second); +else +return css::uno::makeAny(css::beans::Optional()); } else if
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - 2 commits - include/svtools sfx2/source svtools/source
include/svtools/prnsetup.hxx|1 - sfx2/source/doc/guisaveas.cxx | 11 +-- svtools/source/dialogs/prnsetup.cxx |7 +-- 3 files changed, 2 insertions(+), 17 deletions(-) New commits: commit dedd3c0b67d67c34bfe9418ba0356a3ba096974f Author: Katarina Behrens AuthorDate: Wed Apr 17 12:02:13 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Apr 17 18:17:53 2019 +0200 Revert "Redirect filter options dialog to the main thread" This reverts commit c2b4dcc46680db854fa1e5f3c490b88bd53b7f5e. Change-Id: Ifa22f188dfd7e8d7aa2d09a0180b4220c69a3578 Reviewed-on: https://gerrit.libreoffice.org/70871 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 9c1c9192b96a..a6219aa3947d 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -94,7 +94,6 @@ #include #include -#include #include #include @@ -267,8 +266,6 @@ class ModelData_Impl bool m_bRecommendReadOnly; -bool solar_execute(uno::Reference< ui::dialogs::XExecutableDialog > xFilterDialog); - public: ModelData_Impl( SfxStoringHelper& aOwner, const uno::Reference< frame::XModel >& xModel, @@ -561,10 +558,6 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( return aFilterProps; } -bool ModelData_Impl::solar_execute( uno::Reference xFilterDialog) -{ -return xFilterDialog->execute(); -} bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName ) { @@ -601,9 +594,7 @@ bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName ) GetMediaDescr() >> aPropsForDialog; xFilterProperties->setPropertyValues( aPropsForDialog ); -bool bRet = vcl::solarthread::syncExecute(std::bind(_Impl::solar_execute, this, xFilterDialog)); - -if( bRet ) +if( xFilterDialog->execute() ) { uno::Sequence< beans::PropertyValue > aPropsFromDialog = xFilterProperties->getPropertyValues(); commit fae1a1e8be1122104bcfba5f5b19d7ab6a39a743 Author: Katarina Behrens AuthorDate: Wed Apr 17 11:48:53 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Apr 17 18:17:44 2019 +0200 Revert "Redirect printer setup into the main thread" This reverts commit eaaf6f4f925bf04833a464176d376efe92cdcd69. Change-Id: Iece7a447207f19e454e6d7c74702d829754a8074 Reviewed-on: https://gerrit.libreoffice.org/70870 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/include/svtools/prnsetup.hxx b/include/svtools/prnsetup.hxx index 267274d8d61a..007294e52656 100644 --- a/include/svtools/prnsetup.hxx +++ b/include/svtools/prnsetup.hxx @@ -47,7 +47,6 @@ private: AutoTimer maStatusTimer; VclPtrmpPrinter; VclPtrmpTempPrinter; -short solar_execute(); SVT_DLLPRIVATE void ImplSetInfo(); diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index e7362e7bc44c..cf8a3f5c5eb9 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -21,7 +21,6 @@ #include #include #include -#include void ImplFillPrnDlgListBox( const Printer* pPrinter, @@ -332,10 +331,6 @@ void PrinterSetupDialog::DataChanged( const DataChangedEvent& rDCEvt ) ModalDialog::DataChanged( rDCEvt ); } -short PrinterSetupDialog::solar_execute() -{ -return ModalDialog::Execute(); -} short PrinterSetupDialog::Execute() { @@ -352,7 +347,7 @@ short PrinterSetupDialog::Execute() maStatusTimer.Start(); // start dialog -short nRet = vcl::solarthread::syncExecute(std::bind(::solar_execute, this)); +short nRet = ModalDialog::Execute(); // update data if the dialog was terminated with OK if ( nRet == RET_OK ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: shell/source
shell/source/backends/kde5be/kde5backend.cxx | 56 --- 1 file changed, 42 insertions(+), 14 deletions(-) New commits: commit 5a64bc2b1214e6ad8424f57576aa5752a09815d4 Author: Katarina Behrens AuthorDate: Tue Apr 16 09:47:31 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Apr 17 17:37:52 2019 +0200 Stop qt event loop after KDE settings have been read Two use-cases here in kde5backend 1) kde or qt vclplug has already started qt event loop => just use this loop to read KDE settings 2) no qt event loop runs (we're most likely in gtk3_kde5 vclplug) => start a new event loop, read the settings and stop it In case 2) letting qt event loop run means subsequently all UI ops need to happen in main thread. This is problematic to enforce in non-qt-based vclplugs In both cases, cache those settings for future use - the assumption is, most of them are static during a session anyway. Change-Id: Ifa203f4cdb9a753db808f945762fb131ee83393c Reviewed-on: https://gerrit.libreoffice.org/70808 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx index e2f6e25c0764..101a21387a4c 100644 --- a/shell/source/backends/kde5be/kde5backend.cxx +++ b/shell/source/backends/kde5be/kde5backend.cxx @@ -120,7 +120,7 @@ private: { } -bool enabled_; +std::map> m_KDESettings; }; OString getDisplayArg() @@ -148,10 +148,28 @@ OString getExecutable() return OUStringToOString(aBin, osl_getThreadTextEncoding()); } +void readKDESettings(std::map>& rSettings) +{ +const std::vector aKeys += { "EnableATToolSupport", "ExternalMailer", "SourceViewFontHeight", +"SourceViewFontName", "WorkPathVariable", "ooInetFTPProxyName", +"ooInetFTPProxyPort", "ooInetHTTPProxyName", "ooInetHTTPProxyPort", +"ooInetHTTPSProxyName", "ooInetHTTPSProxyPort", "ooInetNoProxy", +"ooInetProxyType" }; + +for (const OUString& aKey : aKeys) +{ +css::beans::Optional aValue = kde5access::getValue(aKey); +std::pair> elem += std::make_pair(aKey, aValue); +rSettings.insert(elem); +} +} + // init the QApplication when we load the kde5backend into a non-Qt vclplug (e.g. Gtk3KDE5) // TODO: use a helper process to read these values without linking to Qt directly? // TODO: share this code somehow with Qt5Instance.cxx? -void initQApp() +void initQApp(std::map>& rSettings) { const auto aDisplay = getDisplayArg(); int nFakeArgc = aDisplay.isEmpty() ? 2 : 3; @@ -169,36 +187,42 @@ void initQApp() unsetenv("SESSION_MANAGER"); } -auto app = new QApplication(nFakeArgc, pFakeArgv); -QObject::connect(app, ::destroyed, app, [nFakeArgc, pFakeArgv]() { +std::unique_ptr app(new QApplication(nFakeArgc, pFakeArgv)); +QObject::connect(app.get(), ::destroyed, app.get(), [nFakeArgc, pFakeArgv]() { for (int i = 0; i < nFakeArgc; ++i) delete pFakeArgv[i]; delete[] pFakeArgv; }); +readKDESettings(rSettings); + if (session_manager != nullptr) { // coverity[tainted_string] - trusted source for setenv setenv("SESSION_MANAGER", session_manager, 1); free(session_manager); } - -QApplication::setQuitOnLastWindowClosed(false); } Service::Service() -: enabled_(false) { css::uno::Reference context(css::uno::getCurrentContext()); if (context.is()) { -if (!qApp) -{ -initQApp(); -} OUString desktop; context->getValueByName("system.desktop-environment") >>= desktop; -enabled_ = desktop == "KDE5" && qApp != nullptr; + +if (desktop == "KDE5") +{ +if (!qApp) // no qt event loop yet +{ +// so we start one and read KDE settings +initQApp(m_KDESettings); +} +else // someone else (most likely kde/qt vclplug) has started qt event loop +// all that is left to do is to read KDE settings +readKDESettings(m_KDESettings); +} } } @@ -218,8 +242,12 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName) || PropertyName == "ooInetHTTPSProxyPort" || PropertyName == "ooInetNoProxy" || PropertyName == "ooInetProxyType") { -return css::uno::makeAny(enabled_ ? kde5access::getValue(PropertyName) - : css::beans::Optional()); +std::map>::iterator it += m_KDESettings.find(PropertyName); +if (it != m_KDESettings.end()) +return css::uno::makeAny(it->second); +else +return css::uno::makeAny(css::beans::Optional()); } else if (PropertyName == "givenname"
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - shell/source
shell/source/backends/kde5be/kde5access.cxx | 32 ++-- 1 file changed, 12 insertions(+), 20 deletions(-) New commits: commit 37dd169a54ec1c8e0298ce0f839b1e53ab3dbc51 Author: Katarina Behrens AuthorDate: Tue Apr 16 08:58:38 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Apr 17 01:00:10 2019 +0200 Fix wrong proxy setting URLs in kde5backend this copy'n'pasta blunder looks innocuous but can slow down loading of JVM (which reads proxy settings among others) in KDE environment significantly Change-Id: I98f0fb107a2ee825bcd47731a5a9d15017ba63bc Reviewed-on: https://gerrit.libreoffice.org/70806 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit cc191e4f5da18c3b223316f39aac23003ca54671) Reviewed-on: https://gerrit.libreoffice.org/70849 Tested-by: Thorsten Behrens diff --git a/shell/source/backends/kde5be/kde5access.cxx b/shell/source/backends/kde5be/kde5access.cxx index 0f2218551d5f..6147c8f0a83d 100644 --- a/shell/source/backends/kde5be/kde5access.cxx +++ b/shell/source/backends/kde5be/kde5access.cxx @@ -106,8 +106,7 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. @@ -134,8 +133,7 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. @@ -162,13 +160,12 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. aHTTPProxy = KProtocolManager::proxyForUrl( -QUrl(QStringLiteral("ftp://ftp.libreoffice.org;))); +QUrl(QStringLiteral("http://www.libreoffice.org;))); break; default: // No proxy is used break; @@ -190,13 +187,12 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. aHTTPProxy = KProtocolManager::proxyForUrl( -QUrl(QStringLiteral("ftp://ftp.libreoffice.org;))); +QUrl(QStringLiteral("http://www.libreoffice.org;))); break;
[Libreoffice-commits] core.git: shell/source
shell/source/backends/kde5be/kde5access.cxx | 32 ++-- 1 file changed, 12 insertions(+), 20 deletions(-) New commits: commit cc191e4f5da18c3b223316f39aac23003ca54671 Author: Katarina Behrens AuthorDate: Tue Apr 16 08:58:38 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed Apr 17 00:58:50 2019 +0200 Fix wrong proxy setting URLs in kde5backend this copy'n'pasta blunder looks innocuous but can slow down loading of JVM (which reads proxy settings among others) in KDE environment significantly Change-Id: I98f0fb107a2ee825bcd47731a5a9d15017ba63bc Reviewed-on: https://gerrit.libreoffice.org/70806 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/shell/source/backends/kde5be/kde5access.cxx b/shell/source/backends/kde5be/kde5access.cxx index 0f2218551d5f..6147c8f0a83d 100644 --- a/shell/source/backends/kde5be/kde5access.cxx +++ b/shell/source/backends/kde5be/kde5access.cxx @@ -106,8 +106,7 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. @@ -134,8 +133,7 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. @@ -162,13 +160,12 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. aHTTPProxy = KProtocolManager::proxyForUrl( -QUrl(QStringLiteral("ftp://ftp.libreoffice.org;))); +QUrl(QStringLiteral("http://www.libreoffice.org;))); break; default: // No proxy is used break; @@ -190,13 +187,12 @@ css::beans::Optional getValue(OUString const& id) break; case KProtocolManager::PACProxy: // A proxy configuration URL has been given case KProtocolManager::WPADProxy: // A proxy should be automatically discovered -case KProtocolManager:: -EnvVarProxy: // Use the proxy values set through environment variables +case KProtocolManager::EnvVarProxy: // Proxy values set through environment variables // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. aHTTPProxy = KProtocolManager::proxyForUrl( -QUrl(QStringLiteral("ftp://ftp.libreoffice.org;))); +QUrl(QStringLiteral("http://www.libreoffice.org;))); break; default: // No proxy is used break; @@ -218,13 +214,12 @@ css::beans::Optional getValue(OUString const& id)
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - sfx2/source
sfx2/source/doc/guisaveas.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit c2b4dcc46680db854fa1e5f3c490b88bd53b7f5e Author: Katarina Behrens AuthorDate: Tue Apr 9 15:17:17 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Apr 9 16:07:32 2019 +0200 Redirect filter options dialog to the main thread again avoid deadlock when called from an extension in a non-main thread Change-Id: I534c41dc2bd4f2ee44e82a619a10da797915e020 Reviewed-on: https://gerrit.libreoffice.org/70461 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index a6219aa3947d..9c1c9192b96a 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -94,6 +94,7 @@ #include #include +#include #include #include @@ -266,6 +267,8 @@ class ModelData_Impl bool m_bRecommendReadOnly; +bool solar_execute(uno::Reference< ui::dialogs::XExecutableDialog > xFilterDialog); + public: ModelData_Impl( SfxStoringHelper& aOwner, const uno::Reference< frame::XModel >& xModel, @@ -558,6 +561,10 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( return aFilterProps; } +bool ModelData_Impl::solar_execute( uno::Reference xFilterDialog) +{ +return xFilterDialog->execute(); +} bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName ) { @@ -594,7 +601,9 @@ bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName ) GetMediaDescr() >> aPropsForDialog; xFilterProperties->setPropertyValues( aPropsForDialog ); -if( xFilterDialog->execute() ) +bool bRet = vcl::solarthread::syncExecute(std::bind(_Impl::solar_execute, this, xFilterDialog)); + +if( bRet ) { uno::Sequence< beans::PropertyValue > aPropsFromDialog = xFilterProperties->getPropertyValues(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - 2 commits - vcl/qt5
vcl/qt5/Qt5Data.cxx | 13 ++--- vcl/qt5/Qt5Frame.cxx |4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) New commits: commit 7963a389dea1ff1a0c3a1910ae05ecc562597b13 Author: Katarina Behrens AuthorDate: Mon Apr 1 09:41:39 2019 +0200 Commit: Thorsten Behrens CommitDate: Fri Apr 5 00:05:08 2019 +0200 tdf#120865: preserve cursor shape on repositioning the cursor i.e. don't recreate cursor with new (default) arrow shape in SalFrame::SetPointerPos, but simply move the existing one Change-Id: I3406ceff25a53de6f2afa318114370c318e6a500 Reviewed-on: https://gerrit.libreoffice.org/70049 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 330df37c7e2af0564bcd2de1f171bed4befcc074) Reviewed-on: https://gerrit.libreoffice.org/70238 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 3172b769f550..b1ad0f93d561 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -682,9 +682,9 @@ void Qt5Frame::CaptureMouse(bool bMouse) void Qt5Frame::SetPointerPos(long nX, long nY) { -QCursor aCursor = m_pQWidget->cursor(); +// some cursor already exists (and it has m_ePointerStyle shape) +// so here we just reposition it QCursor::setPos(m_pQWidget->mapToGlobal(QPoint(nX, nY))); -m_pQWidget->setCursor(aCursor); } void Qt5Frame::Flush() commit 0ff90fd5cb698ef78fc15e3073eaaacd599beae7 Author: Katarina Behrens AuthorDate: Wed Mar 27 09:32:47 2019 +0100 Commit: Thorsten Behrens CommitDate: Fri Apr 5 00:04:53 2019 +0200 tdf#124026: map window resizing-related cursors to their Qt equivalents there is no direct Qt equivalent of X11 xc_[top|bottom|left|right]_side cursors, but those come at least close Change-Id: Ifd442c46c08c71b1e1b9ddac42628b38eefee47f Reviewed-on: https://gerrit.libreoffice.org/69797 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 167812fe0d77b993427e7dca112f319a92942a3c) Reviewed-on: https://gerrit.libreoffice.org/70245 Reviewed-by: Thorsten Behrens diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx index 1830dab0e523..597a0a4d0a77 100644 --- a/vcl/qt5/Qt5Data.cxx +++ b/vcl/qt5/Qt5Data.cxx @@ -204,12 +204,10 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle) MAP_BUILTIN(PointerStyle::NESize, Qt::SizeBDiagCursor); MAP_BUILTIN(PointerStyle::SWSize, Qt::SizeBDiagCursor); MAP_BUILTIN(PointerStyle::SESize, Qt::SizeFDiagCursor); -#if 0 -MAP_BUILTIN( PointerStyle::WindowNSize, GDK_TOP_SIDE ); -MAP_BUILTIN( PointerStyle::WindowSSize, GDK_BOTTOM_SIDE ); -MAP_BUILTIN( PointerStyle::WindowWSize, GDK_LEFT_SIDE ); -MAP_BUILTIN( PointerStyle::WindowESize, GDK_RIGHT_SIDE ); -#endif +MAP_BUILTIN(PointerStyle::WindowNSize, Qt::SizeVerCursor); +MAP_BUILTIN(PointerStyle::WindowSSize, Qt::SizeVerCursor); +MAP_BUILTIN(PointerStyle::WindowWSize, Qt::SizeHorCursor); +MAP_BUILTIN(PointerStyle::WindowESize, Qt::SizeHorCursor); MAP_BUILTIN(PointerStyle::WindowNWSize, Qt::SizeFDiagCursor); MAP_BUILTIN(PointerStyle::WindowNESize, Qt::SizeBDiagCursor); MAP_BUILTIN(PointerStyle::WindowSWSize, Qt::SizeBDiagCursor); @@ -299,7 +297,8 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle) if (!pCursor) { pCursor = new QCursor(Qt::ArrowCursor); -SAL_WARN("vcl.qt5", "pointer " << static_cast(ePointerStyle) << "not implemented"); +SAL_WARN("vcl.qt5", + "pointer " << static_cast(ePointerStyle) << " not implemented"); } m_aCursors[ePointerStyle].reset(pCursor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - include/svtools svtools/source
include/svtools/prnsetup.hxx|1 + svtools/source/dialogs/prnsetup.cxx |7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit eaaf6f4f925bf04833a464176d376efe92cdcd69 Author: Katarina Behrens AuthorDate: Thu Apr 4 12:27:23 2019 +0200 Commit: Thorsten Behrens CommitDate: Thu Apr 4 14:34:13 2019 +0200 Redirect printer setup into the main thread and avoid deadlock when called from extension in a non-main thread Change-Id: I9fc0c02f580655015d583219b886c6b24af59c18 Reviewed-on: https://gerrit.libreoffice.org/70256 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/include/svtools/prnsetup.hxx b/include/svtools/prnsetup.hxx index 007294e52656..267274d8d61a 100644 --- a/include/svtools/prnsetup.hxx +++ b/include/svtools/prnsetup.hxx @@ -47,6 +47,7 @@ private: AutoTimer maStatusTimer; VclPtrmpPrinter; VclPtrmpTempPrinter; +short solar_execute(); SVT_DLLPRIVATE void ImplSetInfo(); diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index cf8a3f5c5eb9..e7362e7bc44c 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -21,6 +21,7 @@ #include #include #include +#include void ImplFillPrnDlgListBox( const Printer* pPrinter, @@ -331,6 +332,10 @@ void PrinterSetupDialog::DataChanged( const DataChangedEvent& rDCEvt ) ModalDialog::DataChanged( rDCEvt ); } +short PrinterSetupDialog::solar_execute() +{ +return ModalDialog::Execute(); +} short PrinterSetupDialog::Execute() { @@ -347,7 +352,7 @@ short PrinterSetupDialog::Execute() maStatusTimer.Start(); // start dialog -short nRet = ModalDialog::Execute(); +short nRet = vcl::solarthread::syncExecute(std::bind(::solar_execute, this)); // update data if the dialog was terminated with OK if ( nRet == RET_OK ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: avmedia/inc avmedia/source
avmedia/inc/mediacontrol.hxx |1 + avmedia/source/framework/mediacontrol.cxx | 20 +++- 2 files changed, 16 insertions(+), 5 deletions(-) New commits: commit b2ccf5efae5261886a5aadf3f72ff095cb3b3d5b Author: Katarina Behrens AuthorDate: Mon Apr 1 14:45:42 2019 +0200 Commit: Katarina Behrens CommitDate: Tue Apr 2 12:05:17 2019 +0200 tdf#17: slider and time field update during video playback To make this happen, restart idle in timeout handler (also start it when user bonks Play button and stop it when they bonk Pause or Stop button). The idle also needs a lower prio than TaskPriority::Repaint, otherwise the higher-prio events from our idle are going to starve UI repaints in the scheduler queue Change-Id: I4c767c3533e0e2ee9015c48b17075db5e0dc7ade Reviewed-on: https://gerrit.libreoffice.org/70068 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index 99ad5ef91a01..bdf0ce35 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -77,6 +77,7 @@ private: SizemaMinSize; boolmbLocked; MediaControlStyle meControlStyle; +double mfTime; }; } diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index f9c645ba15c9..0988c88c0d13 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -44,7 +44,8 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl maIdle( "avmedia MediaControl Idle" ), maItem( 0, AVMediaSetMask::ALL ), mbLocked( false ), -meControlStyle( eControlStyle ) +meControlStyle( eControlStyle ), +mfTime(0.0) { mpPlayToolBox = VclPtr::Create(this, WB_3DLOOK) ; mpTimeSlider = VclPtr::Create(this, WB_HORZ | WB_DRAG | WB_3DLOOK) ; @@ -116,10 +117,10 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl mpZoomToolBox->SetBackground(); mpZoomToolBox->SetPaintTransparent( true ); } - -maIdle.SetPriority( TaskPriority::HIGH_IDLE ); +// we want time field + progress slider to update as the media plays +// give this task a lower prio than REPAINT so that UI updates are not starved +maIdle.SetPriority( TaskPriority::POST_PAINT ); maIdle.SetInvokeHandler( LINK( this, MediaControl, implTimeoutHdl ) ); -maIdle.Start(); } void MediaControl::InitializeWidgets() @@ -245,8 +246,10 @@ void MediaControl::Resize() void MediaControl::setState( const MediaItem& rItem ) { -if( !mbLocked ) +double fTime = rItem.getTime(); +if( !mbLocked && fTime != mfTime) { +mfTime = fTime; maItem.merge( rItem ); if( rItem.getURL().isEmpty() && meControlStyle == MEDIACONTROLSTYLE_SINGLELINE ) mpPlayToolBox->Disable(); @@ -310,6 +313,12 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p, void ) else SelectPlayToolBoxItem( aExecItem, maItem, p->GetCurItemId() ); +if (aExecItem.getState() == MediaState::Play) +maIdle.Start(); +else if (aExecItem.getState() == MediaState::Pause || + aExecItem.getState() == MediaState::Stop) +maIdle.Stop(); + if( aExecItem.getMaskSet() != AVMediaSetMask::NONE ) execute( aExecItem ); } @@ -347,6 +356,7 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox&, p, void ) IMPL_LINK_NOARG(MediaControl, implTimeoutHdl, Timer *, void) { update(); +maIdle.Start(); } } // namespace avmedia ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5Frame.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 330df37c7e2af0564bcd2de1f171bed4befcc074 Author: Katarina Behrens AuthorDate: Mon Apr 1 09:41:39 2019 +0200 Commit: Katarina Behrens CommitDate: Mon Apr 1 15:19:40 2019 +0200 tdf#120865: preserve cursor shape on repositioning the cursor i.e. don't recreate cursor with new (default) arrow shape in SalFrame::SetPointerPos, but simply move the existing one Change-Id: I3406ceff25a53de6f2afa318114370c318e6a500 Reviewed-on: https://gerrit.libreoffice.org/70049 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 65055e8546a1..4f5d18c7eb85 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -687,9 +687,9 @@ void Qt5Frame::CaptureMouse(bool bMouse) void Qt5Frame::SetPointerPos(long nX, long nY) { -QCursor aCursor = m_pQWidget->cursor(); +// some cursor already exists (and it has m_ePointerStyle shape) +// so here we just reposition it QCursor::setPos(m_pQWidget->mapToGlobal(QPoint(nX, nY))); -m_pQWidget->setCursor(aCursor); } void Qt5Frame::Flush() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/Qt5AccessibleWidget.hxx |1 vcl/qt5/Qt5AccessibleWidget.cxx | 285 +--- 2 files changed, 201 insertions(+), 85 deletions(-) New commits: commit 9e37ab4e650481f8bf03d1469815299b8ef1fb5f Author: Katarina Behrens AuthorDate: Thu Mar 21 22:16:42 2019 +0100 Commit: Katarina Behrens CommitDate: Sat Mar 30 09:20:29 2019 +0100 tdf#122056: Catch DisposedExceptions everywhere Change-Id: I6bdb9aa89a8a5181b096f47f90ab6fb5711e7447 Reviewed-on: https://gerrit.libreoffice.org/69541 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/inc/qt5/Qt5AccessibleWidget.hxx b/vcl/inc/qt5/Qt5AccessibleWidget.hxx index 19478586ea42..6b0d71cba9f5 100644 --- a/vcl/inc/qt5/Qt5AccessibleWidget.hxx +++ b/vcl/inc/qt5/Qt5AccessibleWidget.hxx @@ -136,6 +136,7 @@ public: private: css::uno::Reference m_xAccessible; +css::uno::Reference getAccessibleContextImpl() const; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index efafab17f3cf..b76acb4a1c57 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -71,11 +71,41 @@ Qt5AccessibleWidget::Qt5AccessibleWidget(const Reference xAccessibl } } +Reference Qt5AccessibleWidget::getAccessibleContextImpl() const +{ +Reference xAc; + +if (m_xAccessible.is()) +{ +try +{ +xAc = m_xAccessible->getAccessibleContext(); +} +catch (css::lang::DisposedException /*ex*/) +{ +SAL_WARN("vcl.qt5", "Accessible context disposed already"); +} +// sometimes getAccessibleContext throws also RuntimeException if context is no longer alive +catch (css::uno::RuntimeException /*ex*/) +{ +// so let's catch it here, cuz otherwise soffice falls flat on its face +// with FatalError and nothing else +SAL_WARN("vcl.qt5", "Accessible context no longer alive"); +} +} + +return xAc; +} + QWindow* Qt5AccessibleWidget::window() const { return nullptr; } int Qt5AccessibleWidget::childCount() const { -return m_xAccessible->getAccessibleContext()->getAccessibleChildCount(); +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) +return 0; + +return xAc->getAccessibleChildCount(); } int Qt5AccessibleWidget::indexOfChild(const QAccessibleInterface* /* child */) const { return 0; } @@ -144,25 +174,29 @@ QVector> Qt5AccessibleWidget::relations(QAccessible::Relation match) const { QVector> relations; -Reference xRelationSet -= m_xAccessible->getAccessibleContext()->getAccessibleRelationSet(); -if (!xRelationSet.is()) + +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) return relations; -if (match == QAccessible::AllRelations) +Reference xRelationSet = xAc->getAccessibleRelationSet(); +if (xRelationSet.is()) { -int count = xRelationSet->getRelationCount(); -for (int i = 0; i < count; i++) +if (match == QAccessible::AllRelations) +{ +int count = xRelationSet->getRelationCount(); +for (int i = 0; i < count; i++) +{ +AccessibleRelation aRelation = xRelationSet->getRelation(i); +lcl_appendRelation(, aRelation); +} +} +else { -AccessibleRelation aRelation = xRelationSet->getRelation(i); +AccessibleRelation aRelation = xRelationSet->getRelation(lcl_matchQtRelation(match)); lcl_appendRelation(, aRelation); } } -else -{ -AccessibleRelation aRelation = xRelationSet->getRelation(lcl_matchQtRelation(match)); -lcl_appendRelation(, aRelation); -} return relations; } @@ -177,8 +211,11 @@ QAccessibleInterface* Qt5AccessibleWidget::focusChild() const QRect Qt5AccessibleWidget::rect() const { -Reference xAccessibleComponent(m_xAccessible->getAccessibleContext(), - UNO_QUERY); +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) +return QRect(); + +Reference xAccessibleComponent(xAc, UNO_QUERY); awt::Point aPoint = xAccessibleComponent->getLocation(); awt::Size aSize = xAccessibleComponent->getSize(); @@ -187,24 +224,35 @@ QRect Qt5AccessibleWidget::rect() const QAccessibleInterface* Qt5AccessibleWidget::parent() const { -return QAccessible::queryAccessibleInterface( -new Qt5XAccessible(m_xAccessible->getAccessibleContext()->getAccessibleParent())); +Reference xAc = getAccessibleContextImpl(); +if (!xAc.is()) +return nullptr; + +return QAccessible::queryAccessibleInterface(new Qt5XAccessible(xAc->getAccessibleParent())); } QAccessibleInterface* Qt5AccessibleWidget::child(int
[Libreoffice-commits] core.git: drawinglayer/source
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 71 ++--- drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx |7 + 2 files changed, 62 insertions(+), 16 deletions(-) New commits: commit 67adfc89585f242b69a91050ac9cb8197c2dff1c Author: Katarina Behrens AuthorDate: Thu Mar 21 13:27:03 2019 +0100 Commit: Katarina Behrens CommitDate: Wed Mar 27 18:14:24 2019 +0100 Nested list L must be a child of parent's LBody Implement this as https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#G13.2259746 describes. The example implementation in Annex H8.2 https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#G21.1021285 where nested L is a sibling of its parent LI contradicts the specification and is prolly wrong Change-Id: I2bd4a6692ac0cbe02ff6f1746656f104de3fe1f2 Reviewed-on: https://gerrit.libreoffice.org/69506 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 43676ae674f7..3b0af02df486 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -554,6 +554,27 @@ namespace drawinglayer } } +void VclMetafileProcessor2D::popStructureElement(vcl::PDFWriter::StructElement eElem) +{ + if (!maListElements.empty() && maListElements.top() == eElem) + { + maListElements.pop(); + mpPDFExtOutDevData->EndStructureElement(); + } +} + +void VclMetafileProcessor2D::popListItem() +{ +popStructureElement(vcl::PDFWriter::LIBody); +popStructureElement(vcl::PDFWriter::ListItem); +} + +void VclMetafileProcessor2D::popList() +{ +popListItem(); +popStructureElement(vcl::PDFWriter::List); +} + // init static break iterator uno::Reference< css::i18n::XBreakIterator > VclMetafileProcessor2D::mxBreakIterator; @@ -1232,7 +1253,10 @@ namespace drawinglayer // this is a part of list item, start LILabel ( = bullet) if(mbInListItem) +{ +maListElements.push(vcl::PDFWriter::LILabel); mpPDFExtOutDevData->BeginStructureElement(vcl::PDFWriter::LILabel); +} // process recursively and add MetaFile comment process(rBulletPrimitive); @@ -1240,8 +1264,12 @@ namespace drawinglayer if(mbInListItem) { -mpPDFExtOutDevData->EndStructureElement(); // end LILabel -mbBulletPresent = true; +if (maListElements.top() == vcl::PDFWriter::LILabel) +{ +maListElements.pop(); +mpPDFExtOutDevData->EndStructureElement(); // end LILabel +mbBulletPresent = true; +} } } @@ -1285,29 +1313,41 @@ namespace drawinglayer if(nNewOutlineLevel > mnCurrentOutlineLevel) { // increase List level -for(sal_Int16 a(mnCurrentOutlineLevel); a != nNewOutlineLevel; a++) +for(sal_Int16 a(mnCurrentOutlineLevel); a != nNewOutlineLevel; ++a) { +maListElements.push(vcl::PDFWriter::List); mpPDFExtOutDevData->BeginStructureElement( vcl::PDFWriter::List ); } } else // if(nNewOutlineLevel < mnCurrentOutlineLevel) { -// decrease List level -for(sal_Int16 a(mnCurrentOutlineLevel); a != nNewOutlineLevel; a--) +// close list levels below nNewOutlineLevel completely by removing +// list items as well as list tag itself +for(sal_Int16 a(nNewOutlineLevel); a < mnCurrentOutlineLevel; ++a) { -mpPDFExtOutDevData->EndStructureElement(); +popList(); // end LBody LI and L } -} + +// on nNewOutlineLevel close the previous list item (LBody and LI) +popListItem(); + + } // Remember new current OutlineLevel mnCurrentOutlineLevel = nNewOutlineLevel; } +else // the same list level +{ +// close the previous list item (LBody and LI) +popListItem(); +} const bool bDumpAsListItem(-1 != mnCurrentOutlineLevel); if(bDumpAsListItem) { // Dump as ListItem +
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5Data.cxx | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) New commits: commit 167812fe0d77b993427e7dca112f319a92942a3c Author: Katarina Behrens AuthorDate: Wed Mar 27 09:32:47 2019 +0100 Commit: Katarina Behrens CommitDate: Wed Mar 27 12:33:20 2019 +0100 tdf#124026: map window resizing-related cursors to their Qt equivalents there is no direct Qt equivalent of X11 xc_[top|bottom|left|right]_side cursors, but those come at least close Change-Id: Ifd442c46c08c71b1e1b9ddac42628b38eefee47f Reviewed-on: https://gerrit.libreoffice.org/69797 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx index 1830dab0e523..597a0a4d0a77 100644 --- a/vcl/qt5/Qt5Data.cxx +++ b/vcl/qt5/Qt5Data.cxx @@ -204,12 +204,10 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle) MAP_BUILTIN(PointerStyle::NESize, Qt::SizeBDiagCursor); MAP_BUILTIN(PointerStyle::SWSize, Qt::SizeBDiagCursor); MAP_BUILTIN(PointerStyle::SESize, Qt::SizeFDiagCursor); -#if 0 -MAP_BUILTIN( PointerStyle::WindowNSize, GDK_TOP_SIDE ); -MAP_BUILTIN( PointerStyle::WindowSSize, GDK_BOTTOM_SIDE ); -MAP_BUILTIN( PointerStyle::WindowWSize, GDK_LEFT_SIDE ); -MAP_BUILTIN( PointerStyle::WindowESize, GDK_RIGHT_SIDE ); -#endif +MAP_BUILTIN(PointerStyle::WindowNSize, Qt::SizeVerCursor); +MAP_BUILTIN(PointerStyle::WindowSSize, Qt::SizeVerCursor); +MAP_BUILTIN(PointerStyle::WindowWSize, Qt::SizeHorCursor); +MAP_BUILTIN(PointerStyle::WindowESize, Qt::SizeHorCursor); MAP_BUILTIN(PointerStyle::WindowNWSize, Qt::SizeFDiagCursor); MAP_BUILTIN(PointerStyle::WindowNESize, Qt::SizeBDiagCursor); MAP_BUILTIN(PointerStyle::WindowSWSize, Qt::SizeBDiagCursor); @@ -299,7 +297,8 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle) if (!pCursor) { pCursor = new QCursor(Qt::ArrowCursor); -SAL_WARN("vcl.qt5", "pointer " << static_cast(ePointerStyle) << "not implemented"); +SAL_WARN("vcl.qt5", + "pointer " << static_cast(ePointerStyle) << " not implemented"); } m_aCursors[ePointerStyle].reset(pCursor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits