[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source
sd/source/ui/unoidl/unomodel.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 2c3db408256b3e2d4011af751b123dd086fb8622 Author: Pranam Lashkari AuthorDate: Tue Mar 30 21:52:13 2021 +0530 Commit: Pranam Lashkari CommitDate: Thu Apr 1 15:37:15 2021 +0200 LOK: getPartInfo now returns master page count master page count will be used when switching to master view to know how many slide previews to be shown Change-Id: I11735797d16538a9f667a85b90a86b1e6cf9b5aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113383 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113449 Reviewed-by: Pranam Lashkari diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index a1fda6f82652..c874c52f22ee 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2309,11 +2309,14 @@ OUString SdXImpressDocument::getPartInfo(int nPart) OUString aPartInfo; const bool bIsVisible = pViewSh->IsVisible(nPart); const bool bIsSelected = pViewSh->IsSelected(nPart); +const sal_Int16 nMasterPageCount= pViewSh->GetDoc()->GetMasterSdPageCount(pViewSh->GetPageKind()); aPartInfo += "{ \"visible\": \""; aPartInfo += OUString::number(static_cast(bIsVisible)); aPartInfo += "\", \"selected\": \""; aPartInfo += OUString::number(static_cast(bIsSelected)); +aPartInfo += "\", \"masterPageCount\": \""; +aPartInfo += OUString::number(nMasterPageCount); aPartInfo += "\" }"; return aPartInfo; } ___ 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' - sd/source
sd/source/ui/view/drviews7.cxx | 14 ++ sd/source/ui/view/drviewsf.cxx | 35 ++- 2 files changed, 32 insertions(+), 17 deletions(-) New commits: commit 2608bbd931b4fcbeeb517b8e6afb5a126e41ba72 Author: Samuel Mehrbrodt AuthorDate: Mon Jul 8 08:22:33 2019 +0200 Commit: Pranam Lashkari CommitDate: Fri Feb 5 09:11:23 2021 +0100 Related tdf#98575 Allow editing link even when URL field is not selected When the cursor is directly before or behind the URL field, just extend the selection so that the link is editable. Change-Id: I80afe40a1c40e2a02ec6adb18dbdb27b6e39c7d1 Reviewed-on: https://gerrit.libreoffice.org/75190 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110054 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index bff0ceea6f29..bf7e6a426231 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1446,16 +1446,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView(); if (pOLV) { -const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection(); +const SvxFieldItem* pFieldItem = pOLV->GetFieldUnderMousePointer(); +if (!pFieldItem) +pFieldItem = pOLV->GetFieldAtSelection(); if (pFieldItem) { -ESelection aSel = pOLV->GetSelection(); -if ( abs( aSel.nEndPos - aSel.nStartPos ) == 1 ) -{ -const SvxFieldData* pField = pFieldItem->GetField(); -if ( dynamic_cast< const SvxURLField *>( pField ) != nullptr ) -bDisableEditHyperlink = false; -} +const SvxFieldData* pField = pFieldItem->GetField(); +if (dynamic_cast(pField)) +bDisableEditHyperlink = false; } } } diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index f9f941e78cf5..24edd1887ad9 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -99,17 +99,34 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection(); if (pFieldItem) { +// Make sure the whole field is selected ESelection aSel = pOLV->GetSelection(); -if ( abs( aSel.nEndPos - aSel.nStartPos ) == 1 ) +if (aSel.nStartPos == aSel.nEndPos) { -const SvxFieldData* pField = pFieldItem->GetField(); -if( auto pUrlField = dynamic_cast< const SvxURLField *>( pField ) ) -{ -aHLinkItem.SetName(pUrlField->GetRepresentation()); -aHLinkItem.SetURL(pUrlField->GetURL()); -aHLinkItem.SetTargetFrame(pUrlField->GetTargetFrame()); -bField = true; -} +aSel.nEndPos++; +pOLV->SetSelection(aSel); +} +} +if (!pFieldItem) +{ +// Cursor probably behind the field - extend selection to select the field +ESelection aSel = pOLV->GetSelection(); +if (aSel.nStartPos == aSel.nEndPos) +{ +aSel.nStartPos--; +pOLV->SetSelection(aSel); +pFieldItem = pOLV->GetFieldAtSelection(); +} +} +if (pFieldItem) +{ +const SvxFieldData* pField = pFieldItem->GetField(); +if( auto pUrlField = dynamic_cast< const SvxURLField *>( pField ) ) +{ +aHLinkItem.SetName(pUrlField->GetRepresentation()); +aHLinkItem.SetURL(pUrlField->GetURL()); +aHLinkItem.SetTargetFrame(pUrlField->GetTargetFrame()); +bField = true; } } if (!bField) ___ 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' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 873759184cc8728af0cdea4d8b689ef6da23375c Author: Tamás Zolnai AuthorDate: Thu Jan 28 12:20:29 2021 +0100 Commit: Tamás Zolnai CommitDate: Fri Jan 29 10:15:49 2021 +0100 tdf#139965: Broken master slide list after switching mode. Let's update the master slide combobox by context change. populateMasterSlideDropdown() will fill the list when we switch to normal view. The same method is called when the sidebar created in normal view. mpMasterSlide->Clear() will clean the list when we switch to master view. The same happens, when the sidebar is created in a master view context (the list is empty). Change-Id: I322619e409a5352ddcd59a249dd0c874054c1e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110075 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai (cherry picked from commit 2be52f741e283b5f172ae536f0e99ce0f38df9e1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110113 diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index bf1914465bac..31b91379a86f 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -283,6 +283,7 @@ void SlideBackground::HandleContextChange( mpCloseMaster->Show(); mpEditMaster->Hide(); mpMasterSlide->Disable(); +mpMasterSlide->Clear(); mpDspMasterBackground->Disable(); mpDspMasterObjects->Disable(); mpFillStyle->Hide(); @@ -299,6 +300,7 @@ void SlideBackground::HandleContextChange( mpCloseMaster->Hide(); mpEditMaster->Hide(); mpMasterSlide->Disable(); +mpMasterSlide->Clear(); mpDspMasterBackground->Disable(); mpDspMasterObjects->Disable(); mpFillStyle->Hide(); @@ -310,6 +312,7 @@ void SlideBackground::HandleContextChange( mpCloseMaster->Hide(); mpEditMaster->Show(); mpMasterSlide->Enable(); +populateMasterSlideDropdown(); mpDspMasterBackground->Enable(); mpDspMasterObjects->Enable(); mpFillStyle->Show(); ___ 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' - sd/source
sd/source/ui/view/drviews1.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 6476f82aaf7ca6eabdc89ccb9aaca32e89335cff Author: Tamás Zolnai AuthorDate: Tue Jan 26 11:17:40 2021 +0100 Commit: Tamás Zolnai CommitDate: Tue Jan 26 13:47:36 2021 +0100 Revert "LOK: allow slide switching in mobile even if it is same slide" This reverts commit 6693717155cc3f4ab998c5b77b839bb72cbc7236. The reverted commit lead to shape deselection by view switch. Change-Id: I51867e60f0e9e495e2ccf54016d181f4049ad520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109936 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109949 diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 05c7b43d777e..d853f8edb4ac 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -932,8 +931,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) SdPage* pCurrentPage = pPV ? dynamic_cast(pPV->GetPage()) : nullptr; if (pCurrentPage && pNewPage == pCurrentPage -&& maTabControl->GetPageText(maTabControl->GetPageId(nSelectedPage)) == pNewPage->GetName() -&& SfxLokHelper::getDeviceFormFactor() != LOKDeviceFormFactor::MOBILE) +&& maTabControl->GetPageText(maTabControl->GetPageId(nSelectedPage)) == pNewPage->GetName()) { // this slide is already visible return true; ___ 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' - sd/source
sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 35 ++-- 1 file changed, 31 insertions(+), 4 deletions(-) New commits: commit 2a2e1bcfbeffbed39a90ea61486f95041579c6d4 Author: Tamás Zolnai AuthorDate: Fri Jan 22 11:55:06 2021 +0100 Commit: Tamás Zolnai CommitDate: Mon Jan 25 15:21:46 2021 +0100 tdf#139830: keep the right context for chart after view switch (impress). Change-Id: Ida345dd884a09b88e35e0df6f9520528c910d9d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109791 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109902 diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 4811c360b4b4..2659fa475469 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -61,10 +61,8 @@ #include #include #include -#include -#include -#include -#include +#include +#include using namespace ::sd::slidesorter; #define ShellClass_SlideSorterViewShell @@ -79,6 +77,24 @@ using ::vcl::EnumContext; namespace sd { namespace slidesorter { +namespace { + +bool inChartContext(sd::View* pView) +{ +if (!pView) +return false; + +SfxViewShell* pViewShell = pView->GetSfxViewShell(); +sfx2::sidebar::SidebarController* pSidebar = sfx2::sidebar::Tools::GetSidebarController(pViewShell); +if (pSidebar) +return pSidebar->hasChartContextCurrently(); + +return false; +} + +} // anonymous namespace + + SFX_IMPL_INTERFACE(SlideSorterViewShell, SfxShell) void SlideSorterViewShell::InitInterface_Impl() @@ -449,6 +465,17 @@ void SlideSorterViewShell::ArrangeGUIElements() void SlideSorterViewShell::Activate (bool bIsMDIActivate) { +if(inChartContext(GetView())) +{ +// Avoid context changes for chart during activation / deactivation. +const bool bIsContextBroadcasterEnabled (SfxShell::SetContextBroadcasterEnabled(false)); + +ViewShell::Activate(bIsMDIActivate); + +SfxShell::SetContextBroadcasterEnabled(bIsContextBroadcasterEnabled); +return; +} + ViewShell::Activate(bIsMDIActivate); if (mbIsArrangeGUIElementsPending) ArrangeGUIElements(); ___ 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' - sd/source
sd/source/ui/animations/SlideTransitionPane.cxx |6 -- 1 file changed, 6 deletions(-) New commits: commit 65c17466a65e88f7133af08323e0cff4764f8e11 Author: Pranam Lashkari AuthorDate: Wed Dec 9 15:57:59 2020 +0530 Commit: Andras Timar CommitDate: Fri Dec 11 11:40:13 2020 +0100 impress: Difficulty to enter text in Duration field problem: when erasing data in from duration field if we remove decimal point remaining numbers before decimal are multiplied by 100 Change-Id: Id060cc702df9d8365f38c261020cae31f95883d1 Signed-off-by: Pranam Lashkari Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107479 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index c5a7f3c58da9..5ae00d6aa267 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -1127,12 +1127,6 @@ IMPL_LINK_NOARG(SlideTransitionPane, VariantListBoxSelected, ListBox&, void) IMPL_LINK_NOARG(SlideTransitionPane, DurationModifiedHdl, Edit&, void) { -double duration_value = static_cast(mpCBX_duration->GetValue()); -if(duration_value <= 0.0) -mpCBX_duration->SetValue(0); -else -mpCBX_duration->SetValue(duration_value); - applyToSelectedPages(); } ___ 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' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 962bd10e456d95c7579ffb380b3e69f67cf5ea11 Author: Pranam Lashkari AuthorDate: Fri Nov 20 09:44:25 2020 +0530 Commit: Andras Timar CommitDate: Wed Dec 9 18:14:43 2020 +0100 hide background options in master slide view in sidebar Change-Id: Idecf4c849f9f5ac338ea24ca04cbbf9afe5cad5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106213 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 9182f6984056..bf1914465bac 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -288,6 +288,11 @@ void SlideBackground::HandleContextChange( mpFillStyle->Hide(); mpBackgroundLabel->Hide(); mpInsertImage->Show(); + +mpFillLB->Hide(); +mpFillAttr->Hide(); +mpFillGrad1->Hide(); +mpFillGrad2->Hide(); } else if ( maContext == maImpressHandoutContext || maContext == maImpressNotesContext ) { ___ 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' - sd/source
sd/source/ui/view/drviewse.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 3e94f095c4f5db0a132e94de471ba82b6cc1380f Author: Szymon Kłos AuthorDate: Wed Sep 30 11:28:02 2020 +0200 Commit: Andras Timar CommitDate: Mon Oct 5 21:56:00 2020 +0200 Don't insert hyperlink outside the page Change-Id: Ida562bdf4eab479b4df2bba7917466d5da788a6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103673 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index df63acc9e107..189f789457bf 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1511,8 +1511,11 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText, ::tools::Rectangle aRect(aPos, GetActiveWindow()->GetOutputSizePixel() ); aPos = aRect.Center(); aPos = GetActiveWindow()->PixelToLogic(aPos); -aPos.AdjustX( -(aSize.Width() / 2) ); -aPos.AdjustY( -(aSize.Height() / 2) ); + +if (aPos.getX() - (aSize.Width() / 2) >= 0) +aPos.AdjustX( -(aSize.Width() / 2) ); +if (aPos.getY() - (aSize.Height() / 2) >= 0) +aPos.AdjustY( -(aSize.Height() / 2) ); ::tools::Rectangle aLogicRect(aPos, aSize); pRectObj->SetLogicRect(aLogicRect); ___ 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' - sd/source
sd/source/ui/view/drviews1.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 0629280e4811e8c85eae8b00a3827102cf9110bd Author: Pranam Lashkari AuthorDate: Wed Aug 26 22:50:56 2020 +0530 Commit: Andras Timar CommitDate: Wed Sep 2 10:18:20 2020 +0200 LOK: allow slide switching in mobile even if it is same slide problem: In the mobile view taping on the selected slide preview would open the wizard but when some object is selected on the slide wizard would open for that object this patch helps us to set the Page as selection and as result mobile wizard opens for the slide even when some object on slide is selected Change-Id: I99cbece8b18ec8766956157c0231e5a0f600d993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101364 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index d853f8edb4ac..05c7b43d777e 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -931,7 +932,8 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) SdPage* pCurrentPage = pPV ? dynamic_cast(pPV->GetPage()) : nullptr; if (pCurrentPage && pNewPage == pCurrentPage -&& maTabControl->GetPageText(maTabControl->GetPageId(nSelectedPage)) == pNewPage->GetName()) +&& maTabControl->GetPageText(maTabControl->GetPageId(nSelectedPage)) == pNewPage->GetName() +&& SfxLokHelper::getDeviceFormFactor() != LOKDeviceFormFactor::MOBILE) { // this slide is already visible return true; ___ 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' - sd/source
sd/source/ui/docshell/docshel3.cxx | 82 + sd/source/ui/docshell/docshell.cxx | 19 ++- sd/source/ui/func/fusearch.cxx |9 ++- sd/source/ui/inc/DrawDocShell.hxx |3 - sd/source/ui/inc/View.hxx | 32 ++-- sd/source/ui/inc/fusearch.hxx |2 sd/source/ui/unoidl/DrawController.cxx |6 +- sd/source/ui/view/Outliner.cxx | 12 +++- 8 files changed, 108 insertions(+), 57 deletions(-) New commits: commit 2b026da90155b07c23becaacd493e1fcbab4a2d1 Author: Tomaž Vajngerl AuthorDate: Sat Aug 22 21:45:44 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Sep 1 09:25:35 2020 +0200 sd: Make search bound to a view - to allow independent searching Before if two windows are open, the search is not independent because Outline class is not independent for a view (because of FuSearch which remembers the view from when the it was created and then an instance is stored in the DocShell). This creates a SearchContext class stored on a View, which stores the actual View bound FuSearch instance, fix us the calls. Also move the VectorGraphicSearchContext back into Outline::Impl, because it doesn't need to be bound to the view anymore. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101224 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 2ebc26aeefefe33ee6180862509e4971ff2dfc6f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101693 Tested-by: Tomaž Vajngerl Reviewed-by: Tomaž Vajngerl (cherry picked from commit 714767b3d521eefc46dd8158ee67610347863f9f) Change-Id: I6a5ce71efafa378845eee4ac9574e2e4301138d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101762 Tested-by: Tomaž Vajngerl Reviewed-by: Tomaž Vajngerl diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 3d51bf023858..16dbcd36a5c3 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -175,30 +175,37 @@ void DrawDocShell::Execute( SfxRequest& rReq ) case FID_SEARCH_OFF: { -if( dynamic_cast< FuSearch* >(mxDocShellFunction.get()) ) +if (mpViewShell) { -// End Search&Replace in all docshells -SfxObjectShell* pFirstShell = SfxObjectShell::GetFirst(); -SfxObjectShell* pShell = pFirstShell; - -while (pShell) +sd::View* pView = mpViewShell->GetView(); +if (pView) { -if( dynamic_cast< const DrawDocShell *>( pShell ) != nullptr) +auto& rFunctionContext = pView->getSearchContext(); +rtl::Reference& xFuSearch(rFunctionContext.getFunctionSearch()); + +if (xFuSearch.is()) { -static_cast(pShell)->CancelSearching(); -} +// End Search&Replace in all docshells +SfxObjectShell* pFirstShell = SfxObjectShell::GetFirst(); +SfxObjectShell* pShell = pFirstShell; -pShell = SfxObjectShell::GetNext(*pShell); +while (pShell) +{ +auto pDrawDocShell = dynamic_cast(pShell); +if (pDrawDocShell) +pDrawDocShell->CancelSearching(); -if (pShell == pFirstShell) -{ -pShell = nullptr; +pShell = SfxObjectShell::GetNext(*pShell); + +if (pShell == pFirstShell) +pShell = nullptr; +} + +rFunctionContext.resetSearchFunction(); +Invalidate(); +rReq.Done(); } } - -SetDocShellFunction(nullptr); -Invalidate(); -rReq.Done(); } } break; @@ -207,23 +214,30 @@ void DrawDocShell::Execute( SfxRequest& rReq ) { const SfxItemSet* pReqArgs = rReq.GetArgs(); -if ( pReqArgs ) +if (pReqArgs && mpViewShell) { -rtl::Reference< FuSearch > xFuSearch( dynamic_cast< FuSearch* >( GetDocShellFunction().get() ) ); - -if( !xFuSearch.is() && mpViewShell ) +sd::View* pView = mpViewShell->GetView(); +if (pView) { -::sd::View* pView = mpViewShell->GetView(); -SetDocShellFunction( FuSearch::Create( mpViewShell, mpViewShell->GetActiveWindow(), pView, mpDoc, rReq ) ); -xFuSearch.set( dynamic_cast<
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source
sd/source/ui/view/Outliner.cxx | 45 - 1 file changed, 23 insertions(+), 22 deletions(-) New commits: commit dead431f4197a278a16782762371a617c5c468f8 Author: Tomaž Vajngerl AuthorDate: Sun May 31 09:58:26 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Jul 30 22:36:19 2020 +0200 sd: PDF search - reset mpVectorGraphicSearch at more places and simplify the case when the search doesn't find a match in the vector graphic. Change-Id: I3e086e8e36f8a578711eed6d4dcca65c0c4c6268 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95456 Tested-by: Tomaž Vajngerl Reviewed-by: Tomaž Vajngerl (cherry picked from commit f60caab2c867a578b6e6b963ebd5a72b5a12463e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95942 Tested-by: Jenkins CollaboraOffice (cherry picked from commit f0ef50cbfe6039dc9dd00f89af8596f309223cb7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99811 diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 801acc7c6859..441a0d3ac242 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1187,6 +1187,7 @@ void SdOutliner::ProvideNextTextObject() mbFoundObject = false; // reset the vector search +mpImpl->mbCurrentIsVectorGraphic = false; mpImpl->mpVectorGraphicSearch.reset(); mpView->UnmarkAllObj (mpView->GetSdrPageView()); @@ -1222,6 +1223,7 @@ void SdOutliner::ProvideNextTextObject() bool bForbiddenPage = comphelper::LibreOfficeKit::isActive() && (maCurrentPosition.mePageKind != PageKind::Standard || maCurrentPosition.meEditMode != EditMode::Page); mpImpl->mbCurrentIsVectorGraphic = false; +mpImpl->mpVectorGraphicSearch.reset(); if (!bForbiddenPage) { @@ -1255,34 +1257,30 @@ void SdOutliner::ProvideNextTextObject() OUString const & rString = mpSearchItem->GetSearchString(); mpImpl->mpVectorGraphicSearch = std::make_unique(pGraphicObject->GetGraphic()); -if (mpImpl->mpVectorGraphicSearch->search(rString)) + +bool bResult = mpImpl->mpVectorGraphicSearch->search(rString); +if (bResult) +bResult = mpImpl->mpVectorGraphicSearch->next(); + +if (bResult) { -bool bResult = mpImpl->mpVectorGraphicSearch->next(); -if (bResult) -{ -mpObj = SetObject(maCurrentPosition); +mpObj = SetObject(maCurrentPosition); -mbStringFound = true; -mbMatchMayExist = true; -mbFoundObject = true; +mbStringFound = true; +mbMatchMayExist = true; +mbFoundObject = true; -SdrPageView* pPageView = mpView->GetSdrPageView(); -mpView->UnmarkAllObj(pPageView); +SdrPageView* pPageView = mpView->GetSdrPageView(); +mpView->UnmarkAllObj(pPageView); -std::vector aSubSelections; -basegfx::B2DRectangle aSubSelection = getPDFSelection(mpImpl->mpVectorGraphicSearch, mpObj); -if (!aSubSelection.isEmpty()) -aSubSelections.push_back(aSubSelection); +std::vector aSubSelections; +basegfx::B2DRectangle aSubSelection = getPDFSelection(mpImpl->mpVectorGraphicSearch, mpObj); +if (!aSubSelection.isEmpty()) +aSubSelections.push_back(aSubSelection); -mpView->MarkObj(mpObj, pPageView, false, false, aSubSelections); +mpView->MarkObj(mpObj, pPageView, false, false, aSubSelections); -mpDrawDocument->GetDocSh()->SetWaitCursor( false ); -} -else -{ -mpImpl->mbCurrentIsVectorGraphic = false; -mpImpl->mpVectorGraphicSearch.reset(); -} +mpDrawDocument->GetDocSh()->SetWaitCursor( false ); } else { @@ -1315,6 +1313,9 @@ void SdOutliner::ProvideNextTextObject() } else { +mpImpl->mbCurrentIsVectorGraphic = false; +mpImpl->mpVectorGraphicSearch.reset(); + if (meMode == SEARCH) // Instead of doing a full-blown SetObject(), which would do the same -- but would also possibly switch pages. mbStringFound = false; _
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source
sd/source/core/sdpage.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 31b595c0785c6991c55f8aa647efb2eab27fb0b8 Author: Marco Cecchetti AuthorDate: Thu Jul 23 14:08:47 2020 +0200 Commit: Marco Cecchetti CommitDate: Mon Jul 27 20:36:21 2020 +0200 lok: fix-up: isLOKMobilePhone -> isLOKTablet That was the actual intention. Change-Id: I2967cea8ae3099e8523438a68c076a786042e15a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99286 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 91ad345e8edf..22dadc5072a7 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2613,7 +2613,7 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const #else bool isMobileDevice = false; if (const SfxViewShell* pCurrentViewShell = SfxViewShell::Current()) -isMobileDevice = pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKMobilePhone(); +isMobileDevice = pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKTablet(); #endif if (eObjKind == PRESOBJ_TITLE) ___ 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' - sd/source svx/source
sd/source/ui/func/futext.cxx |3 --- svx/source/svdraw/svdedxv.cxx |7 +++ 2 files changed, 7 insertions(+), 3 deletions(-) New commits: commit d2c960e731c3689a510425a778b2e51e6180ab05 Author: Mike Kaganski AuthorDate: Fri Jul 3 16:25:03 2020 +0300 Commit: Mike Kaganski CommitDate: Sun Jul 26 23:37:20 2020 +0200 Re-implement 481e686a66e550229ec0b600a785452f0d753342 Marking documents modified simply on entry to an edit box created a problem, when using search in a read-only Online session made the document modified, and then auto-save failed, displaying a warning: Document cannot be saved. Check your permissions or contact the storage server administrator. The original problem, that 481e686a66e550229ec0b600a785452f0d753342 fixed, was that entering a box in Impress in browser, typing, then pressing Save without exiting the box did not save the edits. Yet, the same sequence works outside of Online. In that case, the doc is marked modified in SdrObjEditView::KeyInput, which obviously is not called from Online, where SdrObjEditView::Command is called instead with CommandEventId::ExtTextInput. So just make sure that we mark the document modified also in this case, making sure that only the actual edits set the "modified" flag. This reverts 481e686a66e550229ec0b600a785452f0d753342. Change-Id: Ib05bc0492616a306dd328bcb8f2e1c9d7e7aa191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97870 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98137 Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 6fca64946b08..deb140146511 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -70,7 +70,6 @@ #include #include #include -#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -204,8 +203,6 @@ void FuText::DoExecute( SfxRequest& ) SdrViewEvent aVEvt; mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); mpView->MarkObj(aVEvt.pRootObj, pPV); -if (comphelper::LibreOfficeKit::isActive() && mpViewShell && mpViewShell->GetDocSh()) -mpViewShell->GetDocSh()->SetModified(); mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.pObj ) ); } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index c38ebfa75505..70eddab0210f 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1911,6 +1911,13 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin) else { pTextEditOutlinerView->Command(rCEvt); +if (mpModel && comphelper::LibreOfficeKit::isActive()) +{ +// It could execute CommandEventId::ExtTextInput, while SdrObjEditView::KeyInput +// isn't called +if (pTextEditOutliner && pTextEditOutliner->IsModified()) +mpModel->SetChanged(); +} return true; } } ___ 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' - sd/source
sd/source/ui/view/drviews2.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 77f7b1ba3ccb8b43abde5ac873723909676b65a7 Author: Pranam Lashkari AuthorDate: Thu Jun 18 23:14:59 2020 +0530 Commit: Andras Timar CommitDate: Thu Jun 18 23:20:38 2020 +0200 LOK: hyperlink were inserted as button instead of text object Change-Id: I393e5cb34d90fc6def6c62be9216df1acd9b5f4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96624 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 374ec6508342..2806de91bf46 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -2232,7 +2233,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView(); -if (pOlView) +if (pOlView || comphelper::LibreOfficeKit::isActive()) { InsertURLField(pHLItem->GetURL(), pHLItem->GetName(), pHLItem->GetTargetFrame()); ___ 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' - sd/source
sd/source/ui/inc/DrawViewShell.hxx |2 + sd/source/ui/view/drviews2.cxx | 69 - 2 files changed, 70 insertions(+), 1 deletion(-) New commits: commit 55392f9c7283903e487a4989a119ab2bf60abf20 Author: Pranam Lashkari AuthorDate: Tue May 26 21:15:13 2020 +0530 Commit: Andras Timar CommitDate: Wed Jun 10 12:31:33 2020 +0200 LOK: duplicating multiple slides Change-Id: Ic2e870bf2ec3b236e2babf6c090bf3ec1978776e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94814 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index df118b58ef1f..64fc215017d3 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -451,6 +451,8 @@ private: SdPage* pPage, const sal_Int32 nInsertPosition = -1) override; +void DuplicateSelectedSlides (SfxRequest& rRequest); + css::uno::Reference< css::scanner::XScannerManager2 > mxScannerManager; css::uno::Reference< css::lang::XEventListener > mxScannerListener; rtl::Reference mxClipEvtLstnr; diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 3945bf1bf550..374ec6508342 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -186,6 +186,14 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -754,7 +762,6 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_INSERTPAGE: case SID_INSERTPAGE_QUICK: -case SID_DUPLICATE_PAGE: { SdPage* pNewPage = CreateOrDuplicatePage (rReq, mePageKind, GetActualPage()); Cancel(); @@ -766,6 +773,16 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } break; +case SID_DUPLICATE_PAGE: +{ +DuplicateSelectedSlides(rReq); +Cancel(); +if(HasCurrentFunction(SID_BEZIER_EDIT) ) +GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON); +rReq.Done(); +} +break; + case SID_INSERT_MASTER_PAGE: { // Use the API to create a new page. @@ -3604,6 +3621,56 @@ SdPage* DrawViewShell::CreateOrDuplicatePage ( return pNewPage; } +void DrawViewShell::DuplicateSelectedSlides (SfxRequest& rRequest) +{ +// Create a list of the pages that are to be duplicated. The process of +// duplication alters the selection. +sal_Int32 nInsertPosition (0); +::std::vector aPagesToDuplicate; +sd::slidesorter::SlideSorter &mrSlideSorter = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase())->GetSlideSorter(); +sd::slidesorter::model::PageEnumeration aSelectedPages ( + sd::slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel())); +while (aSelectedPages.HasMoreElements()) +{ +sd::slidesorter::model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement()); +if (pDescriptor && pDescriptor->GetPage()) +{ +aPagesToDuplicate.push_back(pDescriptor->GetPage()); +nInsertPosition = pDescriptor->GetPage()->GetPageNum()+2; +} +} + +// Duplicate the pages in aPagesToDuplicate and collect the newly +// created pages in aPagesToSelect. +const bool bUndo (aPagesToDuplicate.size()>1 && mrSlideSorter.GetView().IsUndoEnabled()); +if (bUndo) +mrSlideSorter.GetView().BegUndo(SdResId(STR_INSERTPAGE)); + +::std::vector aPagesToSelect; +for(::std::vector::const_iterator +iPage(aPagesToDuplicate.begin()), +iEnd(aPagesToDuplicate.end()); +iPage!=iEnd; +++iPage, nInsertPosition+=2) +{ +aPagesToSelect.push_back( +mrSlideSorter.GetViewShell()->CreateOrDuplicatePage( +rRequest, PageKind::Standard, *iPage, nInsertPosition)); +} +aPagesToDuplicate.clear(); + +if (bUndo) +mrSlideSorter.GetView().EndUndo(); + +// Set the selection to the pages in aPagesToSelect. +sd::slidesorter::controller::PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector()); +rSelector.DeselectAllPages(); +for (auto const& it: aPagesToSelect) +{ +rSelector.SelectPage(it); +} +} + void DrawViewShell::ExecutePropPanelAttr (SfxRequest const & rReq) { if(SlideShow::IsRunning( GetViewShellBase() )) ___ 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' - sd/source
sd/source/ui/view/drviews4.cxx | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) New commits: commit 6f43db55ab72a3a538bf9ca0aeecb31fc1abbee1 Author: Pranam Lashkari AuthorDate: Tue May 26 10:20:07 2020 +0530 Commit: Andras Timar CommitDate: Wed Jun 10 12:31:13 2020 +0200 LOK: Allow deleting multiple slides from slidesorter Change-Id: Ie371e7eb5a96655fd281b4137243aa8628b6283b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94714 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 70d49670ea7d..20ec54212c5a 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -73,16 +73,33 @@ using namespace ::com::sun::star::drawing; void DrawViewShell::DeleteActualPage() { -sal_uInt16 nPage = maTabControl->GetCurPagePos(); - mpDrawView->SdrEndTextEdit(); try { Reference xDrawPagesSupplier( GetDoc()->getUnoModel(), UNO_QUERY_THROW ); -Reference xPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); -Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW ); -xPages->remove( xPage ); +Reference xPages( xDrawPagesSupplier->getDrawPages(), UNO_SET_THROW ); +sal_uInt16 nPageCount = GetDoc()->GetSdPageCount(mePageKind); +SdPage* pPage = nullptr; +std::vector> pagesToDelete; + +GetView()->BegUndo(SdResId(STR_UNDO_DELETEPAGES)); + +for (sal_uInt16 i = 0; i < nPageCount; i++) +{ +pPage = GetDoc()->GetSdPage(i, mePageKind); +if(pPage->IsSelected()) +{ +Reference< XDrawPage > xPage( xPages->getByIndex( maTabControl->GetPagePos(pPage->getPageId()) ), UNO_QUERY_THROW ); +pagesToDelete.push_back(xPage); +} +} +for (auto &xPage: pagesToDelete) +{ +xPages->remove(xPage); +} + +GetView()->EndUndo(); } catch( Exception& ) { ___ 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' - sd/source
sd/source/ui/view/drviews1.cxx | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) New commits: commit 95eb7561d7dbbfcb36460115712992172b93c13b Author: Pranam Lashkari AuthorDate: Tue May 26 10:17:40 2020 +0530 Commit: Andras Timar CommitDate: Wed Jun 10 12:30:55 2020 +0200 LOK: slide sorter: update the model on selecting multiple slides Change-Id: I17bdd8e39c960a81d4bef2a8cffd42103adb5341 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94713 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index cf8f73d21819..d853f8edb4ac 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -776,15 +776,36 @@ bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) bool DrawViewShell::SelectPage(sal_uInt16 nPage, sal_uInt16 nSelect) { SdPage* pPage = GetDoc()->GetSdPage(nPage, PageKind::Standard); + +//page selector marks pages to selected in view +auto &pageSelector = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase())->GetSlideSorter().GetController().GetPageSelector(); + if (pPage) { if (nSelect == 0) -pPage->SetSelected(false); // Deselect. +{ +GetDoc()->SetSelected(pPage, false); // Deselect. +pageSelector.DeselectPage(nPage); +} else if (nSelect == 1) -pPage->SetSelected(true); // Select. +{ +GetDoc()->SetSelected(pPage, true);// Select. +pageSelector.SelectPage(nPage); +} else -pPage->SetSelected(!pPage->IsSelected()); // Toggle. - +{ +// Toggle. +if (pPage->IsSelected()) +{ +GetDoc()->SetSelected(pPage, false); +pageSelector.DeselectPage(nPage); +} +else +{ +GetDoc()->SetSelected(pPage, true); +pageSelector.SelectPage(nPage); +} +} return true; } ___ 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' - sd/source sw/source
sd/source/ui/func/fuinsert.cxx |6 +- sw/source/uibase/table/tablemgr.cxx |7 +-- 2 files changed, 10 insertions(+), 3 deletions(-) New commits: commit 67c09ed54c8a01d8d02a08e4380780e30db35df5 Author: Jan Holesovsky AuthorDate: Wed May 29 15:42:20 2019 +0200 Commit: Michael Meeks CommitDate: Thu Jun 4 18:32:34 2020 +0200 sw sd lok: Don't enter the OLE editing mode right after inserting a chart. Turns out that it is confusing for the users that they can edit the properties of the chart rather than its position just after inserting it in the browser. Let's change it accordingly. When the user wants to edit the chart itself, they have to double-click. Calc is not handled in this patch. Change-Id: If5661b843a06ebaeb8d4cd1b2c469aeedda4257e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95524 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 013b1c5aa829..22f3e26b81ce 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -89,6 +89,8 @@ #include #include +#include + using namespace com::sun::star; namespace sd { @@ -407,8 +409,10 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) else bRet = mpView->InsertObjectAtView(pOleObj, *pPV, SdrInsertFlags::SETDEFLAYER); -if( bRet ) +if (bRet && !comphelper::LibreOfficeKit::isActive()) { +// Let the chart be activated after the inserting (unless +// via LibreOfficeKit) if (nSlotId == SID_INSERT_DIAGRAM) { pOleObj->SetProgName( "StarChart"); diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx index da16e077bad8..38cf44e9c142 100644 --- a/sw/source/uibase/table/tablemgr.cxx +++ b/sw/source/uibase/table/tablemgr.cxx @@ -47,6 +47,8 @@ #include #include +#include + using namespace ::com::sun::star; // Adjust line height (dialogue) @@ -247,9 +249,10 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( } pSh->EndAllAction(); -if ( xObj.is() ) +if (xObj.is() && !comphelper::LibreOfficeKit::isActive()) { -// Let the chart be activated after the inserting +// Let the chart be activated after the inserting (unless +// via LibreOfficeKit) SfxInPlaceClient* pClient = pSh->GetView().FindIPClient( xObj, &pSh->GetView().GetEditWin() ); if ( !pClient ) { ___ 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' - sd/source
sd/source/ui/view/drtxtob1.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 2ab871e806595d555c0460652b52a3f369f95b57 Author: Pranam Lashkari AuthorDate: Tue May 5 23:17:29 2020 +0530 Commit: Andras Timar CommitDate: Sun May 10 21:32:19 2020 +0200 resolved: Strange behavior of Paragraph Spacing controls Increase Paragraph Spacing on the sidebar paragraph Spacing spinners aren't increased Change-Id: Icc1ae684ff607909f87646c69e9acebf8f3d8000 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93511 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 0aa28f6f4997..4d3124643d06 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -268,6 +268,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) Invalidate(); // to refresh preview (in outline mode), slot has to be invalidated: mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, true ); +mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_PARA_ULSPACE, true ); } break; ___ 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' - sd/source
sd/source/ui/view/drtxtob1.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 8f445c709458bb5cae706f189589228a5c68d36a Author: Jim Raykowski AuthorDate: Sat Dec 28 21:20:05 2019 -0900 Commit: Andras Timar CommitDate: Tue May 5 15:47:00 2020 +0200 tdf#129680 Make text edit outliner view show cursor Better placement of tdf#50530 fix 80f18e7e028e9ca431aef281ab98bea99ad19fa3 Change-Id: If6a83d94ebd52ada34d800f8270fa82b4260fdbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86099 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit 1840ed1ede481d28c1a75e2767357866f6f1c55a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86957 Reviewed-by: Xisco Faulí (cherry picked from commit 9b4ffa3a111dd91842ae53e74454f0c752ba4ffe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93425 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 92926a075393..0aa28f6f4997 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -742,6 +742,12 @@ void TextObjectBar::Execute( SfxRequest &rReq ) break; } +if ( pOLV ) +{ +pOLV->ShowCursor(); +pOLV->GetWindow()->GrabFocus(); +} + Invalidate( SID_OUTLINE_LEFT ); Invalidate( SID_OUTLINE_RIGHT ); Invalidate( SID_OUTLINE_UP ); ___ 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' - sd/source
sd/source/ui/view/drviews7.cxx | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) New commits: commit cf557c0c2e79810dd957ffeb48513e3731ae533c Author: Pranam Lashkari AuthorDate: Fri Apr 24 10:23:43 2020 +0530 Commit: Andras Timar CommitDate: Sat Apr 25 09:55:44 2020 +0200 resolved: page gradient reset on reopening doc in mobile phone Slide background set to gradient becomes black/white after reopening Change-Id: Ib579856c3df8b89c74b381f3d79870c467802848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92830 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index cdf81cdfe364..318a36af8856 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1805,9 +1805,15 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq) if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem)) { const SfxStringItem* pJSON = static_cast(pItem); -XFillGradientItem aGradient( XGradient::fromJSON(pJSON->GetValue()) ); +XFillGradientItem aGradientItem( XGradient::fromJSON(pJSON->GetValue()) ); + +// MigrateItemSet guarantees unique gradient names +SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items{} ); +aMigrateSet.Put( aGradientItem ); +SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() ); + rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); -rPageProperties.PutItem( aGradient ); +rPageProperties.PutItemSet( *pTempSet ); } else { @@ -1818,8 +1824,8 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq) aMigrateSet.Put( aGradientItem ); SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() ); -rPageProperties.PutItemSet( *pTempSet ); rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); +rPageProperties.PutItemSet( *pTempSet ); } } break; ___ 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' - sd/source sd/uiconfig
sd/source/ui/sidebar/SlideBackground.cxx | 34 +- sd/source/ui/sidebar/SlideBackground.hxx |3 + sd/uiconfig/simpress/ui/sidebarslidebackground.ui | 14 + 3 files changed, 37 insertions(+), 14 deletions(-) New commits: commit 5c2958a0a49b493e23f75f2f96f96fd2ed327fc2 Author: Pranam Lashkari AuthorDate: Thu Apr 23 12:54:23 2020 +0530 Commit: Szymon Kłos CommitDate: Thu Apr 23 13:29:38 2020 +0200 Added separate color picker for slide background gradient Change-Id: I27b60244f011cb482affa5f47cde170daf3fc309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92741 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index c644d38ec226..9182f6984056 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -148,7 +148,8 @@ SlideBackground::SlideBackground( mpMasterSlide->set_width_request(0); get(mpBackgroundLabel, "label3"); get(mpFillAttr, "fillattr1"); -get(mpFillGrad, "fillattr2"); +get(mpFillGrad1, "fillattr2"); +get(mpFillGrad2, "fillattr3"); get(mpFillStyle, "fillstyle"); get(mpFillLB, "fillattr"); get(mpInsertImage, "button2"); @@ -217,7 +218,8 @@ void SlideBackground::Initialize() mpFillStyle->SetSelectHdl(LINK(this, SlideBackground, FillStyleModifyHdl)); mpFillLB->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl)); -mpFillGrad->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl)); +mpFillGrad1->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl)); +mpFillGrad2->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl)); mpFillAttr->SetSelectHdl(LINK(this, SlideBackground, FillBackgroundHdl)); ViewShell* pMainViewShell = mrBase.GetMainViewShell().get(); @@ -358,13 +360,15 @@ void SlideBackground::Update() { mpFillLB->Hide(); mpFillAttr->Hide(); -mpFillGrad->Hide(); +mpFillGrad1->Hide(); +mpFillGrad2->Hide(); } break; case SOLID: { mpFillAttr->Hide(); -mpFillGrad->Hide(); +mpFillGrad1->Hide(); +mpFillGrad2->Hide(); mpFillLB->Show(); const Color aColor = GetColorSetOrDefault(); mpFillLB->SelectEntry(aColor); @@ -372,15 +376,16 @@ void SlideBackground::Update() break; case GRADIENT: { -mpFillLB->Show(); +mpFillLB->Hide(); mpFillAttr->Hide(); -mpFillGrad->Show(); +mpFillGrad1->Show(); +mpFillGrad2->Show(); const XGradient xGradient = GetGradientSetOrDefault(); const Color aStartColor = xGradient.GetStartColor(); -mpFillLB->SelectEntry(aStartColor); +mpFillGrad1->SelectEntry(aStartColor); const Color aEndColor = xGradient.GetEndColor(); -mpFillGrad->SelectEntry(aEndColor); +mpFillGrad2->SelectEntry(aEndColor); } break; @@ -390,7 +395,8 @@ void SlideBackground::Update() mpFillAttr->Show(); mpFillAttr->Clear(); mpFillAttr->Fill(pSh->GetItem(SID_HATCH_LIST)->GetHatchList()); -mpFillGrad->Hide(); +mpFillGrad1->Hide(); +mpFillGrad2->Hide(); const OUString aHatchName = GetHatchingSetOrDefault(); mpFillAttr->SelectEntry( aHatchName ); @@ -403,7 +409,8 @@ void SlideBackground::Update() mpFillLB->Hide(); mpFillAttr->Show(); mpFillAttr->Clear(); -mpFillGrad->Hide(); +mpFillGrad1->Hide(); +mpFillGrad2->Hide(); OUString aName; if(nPos == BITMAP) { @@ -653,7 +660,8 @@ void SlideBackground::dispose() mpMasterSlide.clear(); mpBackgroundLabel.clear(); mpFillAttr.clear(); -mpFillGrad.clear(); +mpFillGrad1.clear(); +mpFillGrad2.clear(); mpFillStyle.clear(); mpFillLB.clear(); mpInsertImage.clear(); @@ -1058,8 +1066,8 @@ IMPL_LINK_NOARG(SlideBackground, FillColorHdl, SvxColorListBox&, void) case drawing::FillStyle_GRADIENT: { XGradient aGradient; -aGradient.SetStartColor(mpFillLB->GetSelectEntryColor()); -aGradient.SetEndColor(mpFillGrad->GetSelectEntryColor()); +aGradient.SetStartColor(mpFillGrad1->GetSelectEntryColor()); +aGradient.SetEndColor(mpFillGrad2->GetSelectEntryColor()); // the name doesn't really matter, it'll be converted to unique one eventually, // but it has to be non-empty diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx index 81e335b30580..dcdab6927ebb 100644 --- a/sd/source/ui/
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source
sd/source/ui/view/drviews5.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 3bd5dcc02b84da14286af4492f28bc776d765146 Author: Mert Tumer AuthorDate: Tue Apr 7 15:36:34 2020 +0300 Commit: Andras Timar CommitDate: Tue Apr 7 19:27:49 2020 +0200 fix ODP roundtripped in online opens with huge zoom in desktop Change-Id: Ia3192cfeaab8ac643bba7b499240882f403b6388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91822 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 2266c7981d06..dea2c58d795f 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -61,6 +61,7 @@ #include #include #include +#include namespace sd { @@ -343,6 +344,12 @@ void DrawViewShell::WriteFrameViewData() Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); +if (comphelper::LibreOfficeKit::isActive()) +{ +// aVisArea is nonsensical in the LOK case, use the slide size +aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize()); +} + mpFrameView->SetVisArea(aVisArea); if( mePageKind == PageKind::Handout ) ___ 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' - sd/source
sd/source/filter/pdf/sdpdffilter.cxx | 36 --- 1 file changed, 9 insertions(+), 27 deletions(-) New commits: commit 44cf3b61538990608fcfe72c727d35e43cbef5f5 Author: Tomaž Vajngerl AuthorDate: Thu Mar 26 21:40:36 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Wed Apr 1 08:47:16 2020 +0200 clean-up SdPdfFilter implementation Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91156 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 52a06aeb4d8b58245fa0363fe22c7f255bcfc310) Change-Id: I17f76ac8eaf8781deef076ca99c21bab7b62569e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91444 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx index e40bd98b5799..810ee907bbdb 100644 --- a/sd/source/filter/pdf/sdpdffilter.cxx +++ b/sd/source/filter/pdf/sdpdffilter.cxx @@ -75,17 +75,7 @@ #include #include -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::graphic; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::ucb; -using namespace com::sun::star::ui::dialogs; -using namespace ::sfx2; - -SdPdfFilter::SdPdfFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell) +SdPdfFilter::SdPdfFilter(SfxMedium& rMedium, sd::DrawDocShell& rDocShell) : SdFilter(rMedium, rDocShell) { } @@ -94,14 +84,11 @@ SdPdfFilter::~SdPdfFilter() {} bool SdPdfFilter::Import() { -//FIXME: Replace with parsing the PDF elements to allow editing. -//FIXME: For now we import as images for simplicity. - const OUString aFileName( mrMedium.GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::NONE)); // Rendering resolution. -const double dResolutionDPI = 96.; +const double dResolutionDPI = 96.0; std::vector> aGraphics; if (vcl::ImportPDFUnloaded(aFileName, aGraphics, dResolutionDPI) == 0) @@ -124,25 +111,20 @@ bool SdPdfFilter::Import() // Create the page and insert the Graphic. SdPage* pPage = mrDocument.GetSdPage(nPageNumber, PageKind::Standard); -Size aGrfSize(OutputDevice::LogicToLogic(aSize, rGraphic.GetPrefMapMode(), - MapMode(MapUnit::Map100thMM))); +Size aGraphicSize(OutputDevice::LogicToLogic(aSize, rGraphic.GetPrefMapMode(), + MapMode(MapUnit::Map100thMM))); // Resize to original size based on 72 dpi to preserve page size. -aGrfSize = Size(aGrfSize.Width() * 72. / dResolutionDPI, -aGrfSize.Height() * 72. / dResolutionDPI); +aGraphicSize = Size(aGraphicSize.Width() * 72.0 / dResolutionDPI, +aGraphicSize.Height() * 72.0 / dResolutionDPI); // Make the page size match the rendered image. -pPage->SetSize(aGrfSize); -Point aPos(0, 0); +pPage->SetSize(aGraphicSize); +Point aPosition(0, 0); SdrGrafObj* pSdrGrafObj = new SdrGrafObj(pPage->getSdrModelFromSdrPage(), rGraphic, - tools::Rectangle(aPos, aGrfSize)); + tools::Rectangle(aPosition, aGraphicSize)); pPage->InsertObject(pSdrGrafObj); - -// we know that the initial bitmap we provided was just a placeholder, -// we need to swap it out, so that on the next swap in, we render the -// correct one -// const_cast(pSdrGrafObj->GetGraphicObject()).SwapOut(); } return true; ___ 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' - sd/source vcl/source
sd/source/filter/pdf/sdpdffilter.cxx | 10 -- vcl/source/filter/ipdf/pdfread.cxx | 11 --- vcl/source/gdi/impgraph.cxx | 10 ++ 3 files changed, 26 insertions(+), 5 deletions(-) New commits: commit 53a2ff7260b61242c7e29af11c2e24c89857c233 Author: Jan Holesovsky AuthorDate: Fri Jun 22 12:58:12 2018 +0200 Commit: Tomaž Vajngerl CommitDate: Sat Mar 21 15:50:09 2020 +0100 pdfium: Delay the swap out. If we swap out too early, the constructor of GraphicObject forces a swap in, so we'd render everything during the load anyway. Change-Id: I0ea1a755242fd57ef28d082ce4bf534a32199f87 Reviewed-on: https://gerrit.libreoffice.org/56286 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 242c7663e275a712430a8c4ac8eeacbb8b3bd440) Reviewed-on: https://gerrit.libreoffice.org/77690 Tested-by: Jenkins (cherry picked from commit 81f73f1c1706d790c010e8fc0abcb2a0e9e86ace) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90840 Tested-by: Tomaž Vajngerl Reviewed-by: Tomaž Vajngerl diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx index 9274cb3b3730..e40bd98b5799 100644 --- a/sd/source/filter/pdf/sdpdffilter.cxx +++ b/sd/source/filter/pdf/sdpdffilter.cxx @@ -135,8 +135,14 @@ bool SdPdfFilter::Import() pPage->SetSize(aGrfSize); Point aPos(0, 0); -pPage->InsertObject(new SdrGrafObj(pPage->getSdrModelFromSdrPage(), rGraphic, - tools::Rectangle(aPos, aGrfSize))); +SdrGrafObj* pSdrGrafObj = new SdrGrafObj(pPage->getSdrModelFromSdrPage(), rGraphic, + tools::Rectangle(aPos, aGrfSize)); +pPage->InsertObject(pSdrGrafObj); + +// we know that the initial bitmap we provided was just a placeholder, +// we need to swap it out, so that on the next swap in, we render the +// correct one +// const_cast(pSdrGrafObj->GetGraphicObject()).SwapOut(); } return true; diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index 3687f301b2e9..b7b43c1d0d4d 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -312,6 +312,9 @@ size_t ImportPDFUnloaded(const OUString& rURL, std::vector(nPageCount); ++nPageIndex) { double fPageWidth = 0; @@ -323,9 +326,11 @@ size_t ImportPDFUnloaded(const OUString& rURL, std::vectorgetVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()); } +else if (rGraphic.hasPdfData()) +{ +std::shared_ptr> pPdfData = rGraphic.getPdfData(); +const BitmapEx& rBmpEx = rGraphic.ImplGetBitmapExRef(); + +mnID1 |= (rGraphic.mnPageNumber & 0x0fff); +mnID2 = rBmpEx.GetSizePixel().Width(); +mnID3 = rBmpEx.GetSizePixel().Height(); +mnID4 = vcl_get_checksum(0, pPdfData->getConstArray(), pPdfData->getLength()); +} else if (rGraphic.ImplIsAnimated()) { const Animation aAnimation(rGraphic.ImplGetAnimation()); ___ 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' - sd/source vcl/source
sd/source/filter/pdf/sdpdffilter.cxx |3 +-- vcl/source/filter/ipdf/pdfread.cxx | 12 +--- 2 files changed, 6 insertions(+), 9 deletions(-) New commits: commit 79e5c37b754efb03e3946f05957ac49586a3acd6 Author: Jan Holesovsky AuthorDate: Fri Jun 22 10:28:42 2018 +0200 Commit: Tomaž Vajngerl CommitDate: Sat Mar 21 15:49:47 2020 +0100 pdfium: Avoid unnecessary copying + some warning fixes. Reviewed-on: https://gerrit.libreoffice.org/56285 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit 4ab8dde71c8580bcf2b222ae2d1f68bbe339c754) Change-Id: I114fa6b2d3dda86c55eb245d31ca3a1019197ae9 Reviewed-on: https://gerrit.libreoffice.org/77689 Tested-by: Jenkins Reviewed-by: Ashod Nakashian (cherry picked from commit 7fc0ddd9b725e3ea955bb06ef82f6a99de706210) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90839 Tested-by: Tomaž Vajngerl Reviewed-by: Tomaž Vajngerl diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx index acb811ae2063..9274cb3b3730 100644 --- a/sd/source/filter/pdf/sdpdffilter.cxx +++ b/sd/source/filter/pdf/sdpdffilter.cxx @@ -120,8 +120,7 @@ bool SdPdfFilter::Import() const Size& aSize = aPair.second; const sal_Int32 nPageNumber = rGraphic.getPageNumber(); -if (nPageNumber < 0 || static_cast(nPageNumber) >= aGraphics.size()) -continue; // Page is out of range +assert(nPageNumber >= 0 && static_cast(nPageNumber) < aGraphics.size()); // Create the page and insert the Graphic. SdPage* pPage = mrDocument.GetSdPage(nPageNumber, PageKind::Standard); diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index d9c197bffd77..3687f301b2e9 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -283,19 +283,17 @@ size_t ImportPDFUnloaded(const OUString& rURL, std::vector aPdfData; aMemoryStream.Seek(STREAM_SEEK_TO_END); -aPdfData = css::uno::Sequence(aMemoryStream.Tell()); +auto pPdfData = std::make_shared>(aMemoryStream.Tell()); aMemoryStream.Seek(STREAM_SEEK_TO_BEGIN); -aMemoryStream.ReadBytes(aPdfData.getArray(), aPdfData.getLength()); +aMemoryStream.ReadBytes(pPdfData->getArray(), pPdfData->getLength()); // Prepare the link with the PDF stream. -const size_t nGraphicContentSize = aPdfData.getLength(); +const size_t nGraphicContentSize = pPdfData->getLength(); std::unique_ptr pGraphicContent(new sal_uInt8[nGraphicContentSize]); -memcpy(pGraphicContent.get(), aPdfData.get(), nGraphicContentSize); +memcpy(pGraphicContent.get(), pPdfData->get(), nGraphicContentSize); std::shared_ptr pGfxLink(std::make_shared( std::move(pGraphicContent), nGraphicContentSize, GfxLinkType::NativePdf)); -auto pPdfData = std::make_shared>(aPdfData); FPDF_LIBRARY_CONFIG aConfig; aConfig.version = 2; @@ -306,7 +304,7 @@ size_t ImportPDFUnloaded(const OUString& rURL, std::vectorgetArray(), pPdfData->getLength(), /*password=*/nullptr); if (!pPdfDocument) return 0; ___ 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' - sd/source
sd/source/ui/func/fusel.cxx | 16 1 file changed, 8 insertions(+), 8 deletions(-) New commits: commit 18ac91043d2e90b89ac56e3230d687fffeeb25a9 Author: Mert Tumer AuthorDate: Wed Mar 18 13:17:32 2020 +0300 Commit: Andras Timar CommitDate: Wed Mar 18 11:59:54 2020 +0100 mobile: fix hyperlinks are not clickable on impress Change-Id: I77a0ef263814359607d9c1d863f93c55f3493dbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90687 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 81988e00a351..b5e49ef8112f 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -269,6 +269,14 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { mpWindow->ReleaseMouse(); +// If tiled rendering, let client handles URL execution and early returns. +if (comphelper::LibreOfficeKit::isActive()) +{ +SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); + rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.pURLField->GetURL().toUtf8().getStr()); +return true; +} + SvtSecurityOptions aSecOpt; if (!rMEvt.IsMod1() && aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink)) return true; @@ -281,14 +289,6 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SfxViewFrame* pFrame = mpViewShell->GetViewFrame(); mpWindow->ReleaseMouse(); -// If tiled rendering, let client handles URL execution and early returns. -if (comphelper::LibreOfficeKit::isActive()) -{ -SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); - rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.pURLField->GetURL().toUtf8().getStr()); -return true; -} - if (rMEvt.IsMod1()) { // Open in new frame ___ 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' - sd/source
sd/source/ui/app/sdxfer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 18d2e641a839f730d2db7a61f010281280d5cf96 Author: Mike Kaganski AuthorDate: Mon Mar 2 12:37:17 2020 +0300 Commit: Andras Timar CommitDate: Thu Mar 5 16:48:39 2020 +0100 tdf#118893: avoid nullptr dereference Change-Id: I56ada18348ed1b1ebe5e1d6f000391965d822b4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89815 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 788ffc0360e44c54947bdead6d1eb368e5283915) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89911 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 14543f4f1a76..1e1b234fdcc0 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -247,7 +247,7 @@ void SdTransferable::CreateData() SdPage* pPage = mpSdDrawDocument->GetSdPage(0, PageKind::Standard); -if( 1 == pPage->GetObjCount() ) +if( pPage && 1 == pPage->GetObjCount() ) CreateObjectReplacement( pPage->GetObj( 0 ) ); mpVDev = VclPtr::Create( *Application::GetDefaultDevice() ); ___ 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' - sd/source
sd/source/ui/func/futext.cxx | 22 ++ 1 file changed, 22 insertions(+) New commits: commit 5512ac595eb87fffda43f4dd91eaaa1ba90aac74 Author: Szymon Kłos AuthorDate: Wed Jun 5 15:44:15 2019 +0200 Commit: Szymon Kłos CommitDate: Mon Mar 2 08:07:47 2020 +0100 Open links when editing the text in impress Change-Id: Ibfead6dce019400ad5fa32a5f5351fa3e8fdea7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89538 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index b8beb4e50408..8b2b1108119b 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -262,6 +262,28 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); +// handle URL also during the text editing +if (rMEvt.GetClicks() == 1 && rMEvt.IsLeft() && rMEvt.IsMod1()) +{ +OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); + +if (mxTextObj.is() && pOLV && pOLV->GetFieldUnderMousePointer()) +{ +const SvxFieldItem* pFieldItem = pOLV->GetFieldUnderMousePointer(); +if (pFieldItem) +{ +const SvxFieldData* pField = pFieldItem->GetField(); + +if (pField && dynamic_cast< const SvxURLField *>( pField ) != nullptr) +{ +eHit = SdrHitKind::MarkedObject; +aVEvt.eEvent = SdrEventKind::ExecuteUrl; +aVEvt.pURLField = static_cast(pField); +} +} +} +} + if (eHit == SdrHitKind::TextEdit) { // hit text -> SdrView handles event ___ 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' - sd/source
sd/source/core/sdpage.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 4098608ea21d4737fdd640fd57c2417e56426fbb Author: Tor Lillqvist AuthorDate: Mon Feb 3 13:53:11 2020 +0200 Commit: Jan Holesovsky CommitDate: Mon Feb 3 23:05:46 2020 +0100 Use the "Double-tap" term instead of "click" on all iOS devices (also iPad) In general, the term "mobile," when used in APIs related to Online and the mobile apps, means "mobile phone but not tablet". Which is sad, but it is too late to change that convention now. Thus comphelper::LibreOfficeKit::isMobile() returns false on iPad, apparently intentionally. But surely we want to use the "double tap" term instead of "click" also on iPad. Change-Id: I8f7186ea6590f2a21b885549751346edad09eb8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87858 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 63c78998b3cd..cc590e35aafc 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2621,7 +2621,11 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const aString = SdResId( STR_PRESOBJ_MPNOTESTITLE ); } } -else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) +#ifdef IOS + || true +#endif + ) aString = SdResId(STR_PRESOBJ_TITLE_MOBILE); else aString = SdResId(STR_PRESOBJ_TITLE); ___ 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' - sd/source
sd/source/ui/slidesorter/view/SlideSorterView.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 577d0e71233eb00d459eb56163491bcb3a583bb4 Author: Tor Lillqvist AuthorDate: Tue Jan 21 13:52:31 2020 +0200 Commit: Tor Lillqvist CommitDate: Wed Jan 22 14:51:24 2020 +0100 tdf#129388: Avoid any actual painting of the slide sorter in the LOKit case The JS code in Online creates its own slides sorter thing anyway, the one is core is only needed as a data structure. Change-Id: I0eeb79c523b72f7b616f11443198d5af82b70643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87184 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index ede6c7e5a702..f1fc5f602bb2 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -591,14 +592,18 @@ void SlideSorterView::CompleteRedraw ( sdr::contact::ViewObjectContactRedirector* pRedirector) { (void)pRedirector; + +if (comphelper::LibreOfficeKit::isActive()) +return; + +if (pDevice == nullptr || pDevice!=mrSlideSorter.GetContentWindow()) +return; + #ifdef DEBUG_TIMING const double nStartTime (gaTimer.getElapsedTime()); SAL_INFO("sd.timing", "SlideSorterView::CompleteRedraw start" << (mnLockRedrawSmph ? " locked" : "")); #endif -if (pDevice == nullptr || pDevice!=mrSlideSorter.GetContentWindow()) -return; - // The parent implementation of CompleteRedraw is called only when // painting is locked. We do all the painting ourself. When painting // is locked the parent implementation keeps track of the repaint ___ 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' - sd/source
sd/source/ui/slidesorter/view/SlideSorterView.cxx | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) New commits: commit b81aa8a9930da5f93c074e7dd349c32ce49268de Author: Tor Lillqvist AuthorDate: Tue Jan 21 13:43:07 2020 +0200 Commit: Tor Lillqvist CommitDate: Wed Jan 22 12:04:35 2020 +0100 Unbreak code compiled conditionally with DEBUG_TIMING But it will no doubt break eventually again, and not be noticed until next time somebody wants to try to see the information that defining DEBUG_TIMING produces in this file. This kind of conditionally compiled debug code is IMHO counter-productive. It is trivial to temporarily add timing information output to any function just locally in your own build. So I am not opposed to killing this DEBUG_TIMING stuff here. Change-Id: I940e0a40cf2bd9f319c53a6ccff7a2413d1323e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87183 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 0e87021d7155..ede6c7e5a702 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -581,7 +581,7 @@ static const size_t gFrameTimeCount (10); static size_t gFrameTimeIndex (0); static ::std::vector gFrameTimes (gFrameTimeCount, 0); static double gFrameTimeSum (0); -static const Rectangle gFrameTimeBox (10,10,150,20); +static const ::tools::Rectangle gFrameTimeBox (10,10,150,20); static double gnLastFrameStart = 0; #endif @@ -593,9 +593,7 @@ void SlideSorterView::CompleteRedraw ( (void)pRedirector; #ifdef DEBUG_TIMING const double nStartTime (gaTimer.getElapsedTime()); -SAL_INFO("sd",("SlideSorterView::CompleteRedraw start at %f, %s", -nStartTime, -mnLockRedrawSmph ? "locked" : ""); +SAL_INFO("sd.timing", "SlideSorterView::CompleteRedraw start" << (mnLockRedrawSmph ? " locked" : "")); #endif if (pDevice == nullptr || pDevice!=mrSlideSorter.GetContentWindow()) @@ -620,16 +618,16 @@ void SlideSorterView::CompleteRedraw ( #ifdef DEBUG_TIMING const double nEndTime (gaTimer.getElapsedTime()); -SAL_INFO("sd",("SlideSorterView::CompleteRedraw end at %f after %fms", nEndTime, (nEndTime-nStartTime)*1000); +SAL_INFO("sd.timing", "SlideSorterView::CompleteRedraw end after " << (nEndTime-nStartTime)*1000 << " ms"); gFrameTimeSum -= gFrameTimes[gFrameTimeIndex]; gFrameTimes[gFrameTimeIndex] = nStartTime - gnLastFrameStart; gnLastFrameStart = nStartTime; gFrameTimeSum += gFrameTimes[gFrameTimeIndex]; gFrameTimeIndex = (gFrameTimeIndex+1) % gFrameTimeCount; -mrSlideSorter.GetContentWindow()->SetFillCOL_BLUE); +mrSlideSorter.GetContentWindow()->SetFillColor(COL_BLUE); mrSlideSorter.GetContentWindow()->DrawRect(gFrameTimeBox); -mrSlideSorter.GetContentWindow()->SetTextCOL_WHITE); +mrSlideSorter.GetContentWindow()->SetTextColor(COL_WHITE); mrSlideSorter.GetContentWindow()->DrawText( gFrameTimeBox, OUString::number(1 / (gFrameTimeSum / gFrameTimeCount)), ___ 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' - sd/source svtools/source
sd/source/ui/unoidl/unomodel.cxx|4 svtools/source/config/slidesorterbaropt.cxx |3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 372854e1de4678607d25b76e6c4bae0476fded07 Author: Tor Lillqvist AuthorDate: Tue Jan 21 12:43:51 2020 +0200 Commit: Tor Lillqvist CommitDate: Wed Jan 22 11:59:18 2020 +0100 tdf#129388: Do as kendy suggested in 7e291eedbad335bf8bbc8a17cc3d633bf66d0e90 Keep the behaviour as before when a unit test is running, though. Otherwise CppunitTest_sd_tiledrendering fails. (Yes, I know, this is the wrong thing to do, so sue me.) Change-Id: Iae969eee800994b937d32646cfdf50f8132ae185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87131 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index dd6d74568045..723adf7ab7d5 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -2503,6 +2504,9 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequencem_bVisibleImpressView && !comphelper::LibreOfficeKit::isActive(); +static const bool bRunningUnitTest = getenv("LO_TESTNAME"); +return m_pImpl->m_bVisibleImpressView && (!bRunningUnitTest || !comphelper::LibreOfficeKit::isActive()); } void SvtSlideSorterBarOptions::SetVisibleImpressView(bool bVisible) ___ 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' - sd/source
sd/source/ui/func/fuolbull.cxx | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) New commits: commit fb842a3daf5c6b9dcbf88a57bf7bf24d87ffbcca Author: Noel Grandin AuthorDate: Wed Jan 16 08:56:44 2019 +0200 Commit: Aron Budea CommitDate: Tue Jan 14 19:15:49 2020 +0100 fix crash in draw Format->Bullets and Numbering dialog regression from commit a2b78c131db2bbe3555a89dfae32aefcd00949f5 make Format->Bullets and Numbering dialog async Change-Id: Ia726612a492e644f5e40e78a3b537c5ed539aef8 Reviewed-on: https://gerrit.libreoffice.org/66423 Reviewed-by: Katarina Behrens Tested-by: Jenkins (cherry picked from commit 84acbfd2ef8a895d8689fccfffce03df02240b4e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86784 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea Tested-by: Aron Budea diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 14dc697e71be..e695eaad8c70 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -95,20 +95,23 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) std::shared_ptr xRequest(new SfxRequest(rReq)); rReq.Ignore(); // the 'old' request is not relevant any more -pDlg->StartExecuteAsync([this, pDlg, xRequest](sal_Int32 nResult){ +// do not capture this, because this will go way before the dialog finishes executing +auto pView = mpView; +auto pViewShell = mpViewShell; +pDlg->StartExecuteAsync([pView, pViewShell, pDlg, xRequest](sal_Int32 nResult){ if( nResult == RET_OK ) { SfxItemSet aSet( *pDlg->GetOutputItemSet() ); -OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); +OutlinerView* pOLV = pView->GetTextEditOutlinerView(); std::unique_ptr> aGuard; -if (OutlineView* pView = dynamic_cast(mpView)) +if (OutlineView* pOutlineView = dynamic_cast(pView)) { -pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow()); -aGuard.reset(new OutlineViewModelChangeGuard(*pView)); +pOLV = pOutlineView->GetViewByWindow(pViewShell->GetActiveWindow()); +aGuard.reset(new OutlineViewModelChangeGuard(*pOutlineView)); } if( pOLV ) @@ -118,7 +121,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) /* not direct to pOlView; therefore, SdDrawView::SetAttributes can catch changes to master page and redirect to a template */ -mpView->SetAttributes(*xRequest->GetArgs()); +pView->SetAttributes(*xRequest->GetArgs()); } pDlg->disposeOnce(); }); ___ 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' - sd/source
sd/source/ui/func/fupage.cxx |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) New commits: commit 44b4a697826814bf5223a407a5373809a18436f8 Author: Aron Budea AuthorDate: Sun Dec 22 08:10:25 2019 +0100 Commit: Ashod Nakashian CommitDate: Sun Dec 22 22:10:24 2019 +0100 tdf#128449 Set graphic when setting background in Impress Regression from 905e6bd3ae0ca5c5ac7083430d7aa126c6526fd7 Change-Id: If0510967a339b6b46da2b7f798f478a46bd10b48 Reviewed-on: https://gerrit.libreoffice.org/85688 Tested-by: Jenkins Reviewed-by: Ashod Nakashian (cherry picked from commit 8304c671b19365e61d88a9133631775846a172a5) Reviewed-on: https://gerrit.libreoffice.org/85704 Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index a8f31373d8fb..b73f91e5ccde 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -304,8 +304,6 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, SfxRequest& rReq) } else if (nId == SID_SELECT_BACKGROUND) { -OUString aFileName; -OUString aFilterName; Graphic aGraphic; ErrCode nError = ERRCODE_GRFILTER_OPENERROR; @@ -314,7 +312,8 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, SfxRequest& rReq) if (pArgs && pArgs->GetItemState(SID_SELECT_BACKGROUND, true, &pItem) == SfxItemState::SET) { -aFileName = static_cast(pItem)->GetValue(); +OUString aFileName(static_cast(pItem)->GetValue()); +OUString aFilterName; if (pArgs->GetItemState(FN_PARAM_FILTER, true, &pItem) == SfxItemState::SET) aFilterName = static_cast(pItem)->GetValue(); @@ -327,11 +326,9 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, SfxRequest& rReq) SvxOpenGraphicDialog aDlg(SdResId(STR_SET_BACKGROUND_PICTURE), pParent); nError = aDlg.Execute(); -if (nError != ERRCODE_NONE) +if (nError == ERRCODE_NONE) { nError = aDlg.GetGraphic(aGraphic); -aFileName = aDlg.GetPath(); -aFilterName = aDlg.GetDetectedFilter(); } } ___ 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' - sd/source sw/source
sd/source/ui/view/drviewsf.cxx | 53 +--- sw/source/uibase/shells/drawdlg.cxx | 53 +--- 2 files changed, 28 insertions(+), 78 deletions(-) New commits: commit c1f2ffa3e3abcb3b5709197a1e0ee0a5d3f2b1cf Author: Szymon Kłos AuthorDate: Mon Nov 25 17:10:41 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Nov 27 19:58:02 2019 +0100 jsdialog: send generic fill items also in writer and impress Change-Id: I656ee47fff4e43f77caef62c071a5aa3b867f444 Reviewed-on: https://gerrit.libreoffice.org/83747 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 07ba0a76df72..fea9c35e5a20 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -74,54 +74,29 @@ using namespace svx::sidebar; using namespace ::com::sun::star; namespace { -OUString lcl_fillStyleEnumToString(FillStyle eStyle) -{ -switch (eStyle) -{ -case FillStyle_NONE: -return "NONE"; - -case FillStyle_SOLID: -return "SOLID"; - -case FillStyle_GRADIENT: -return "GRADIENT"; - -case FillStyle_HATCH: -return "HATCH"; - -case FillStyle_BITMAP: -return "BITMAP"; - -default: -return ""; -} -} - void lcl_sendAttrUpdatesForLOK(SfxViewShell* pShell, const SfxItemSet& rSet) { if (!pShell) return; -OUString sPayload; -const SfxPoolItem* pItem = rSet.GetItem(SID_ATTR_FILL_STYLE); +boost::property_tree::ptree aTree; +boost::property_tree::ptree anArray; -if (pItem) +for(int i = 0; i < rSet.Count(); i++) { -const XFillStyleItem* pFillStyleItem = static_cast(pItem); -FillStyle eStyle; -css::uno::Any aAny; - -pFillStyleItem->QueryValue(aAny); -aAny >>= eStyle; -sPayload = ".uno:FillStyle=" + lcl_fillStyleEnumToString(eStyle); +sal_uInt16 nWhich = rSet.GetWhichByPos(i); +if (rSet.HasItem(nWhich) && SfxItemState::SET >= rSet.GetItemState(nWhich)) +{ +boost::property_tree::ptree aItem = rSet.Get(nWhich).dumpAsJSON(); +if (!aItem.empty()) +anArray.push_back(std::make_pair("", aItem)); +} } +aTree.add_child("items", anArray); -if (!sPayload.isEmpty()) -{ -pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, -OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); -} +std::stringstream aStream; +boost::property_tree::write_json(aStream, aTree); +pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aStream.str().c_str()); } } diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index aa0218193456..4e31cf1097f4 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -255,54 +255,29 @@ namespace } } -OUString lcl_fillStyleEnumToString(FillStyle eStyle) -{ -switch (eStyle) -{ -case FillStyle_NONE: -return "NONE"; - -case FillStyle_SOLID: -return "SOLID"; - -case FillStyle_GRADIENT: -return "GRADIENT"; - -case FillStyle_HATCH: -return "HATCH"; - -case FillStyle_BITMAP: -return "BITMAP"; - -default: -return ""; -} -} - void lcl_sendAttrUpdatesForLOK(SfxViewShell* pShell, const SfxItemSet& rSet) { if (!pShell) return; -OUString sPayload; -const SfxPoolItem* pItem = rSet.GetItem(SID_ATTR_FILL_STYLE); +boost::property_tree::ptree aTree; +boost::property_tree::ptree anArray; -if (pItem) +for(int i = 0; i < rSet.Count(); i++) { -const XFillStyleItem* pFillStyleItem = static_cast(pItem); -FillStyle eStyle; -css::uno::Any aAny; - -pFillStyleItem->QueryValue(aAny); -aAny >>= eStyle; -sPayload = ".uno:FillStyle=" + lcl_fillStyleEnumToString(eStyle); +sal_uInt16 nWhich = rSet.GetWhichByPos(i); +if (rSet.HasItem(nWhich) && SfxItemState::SET >= rSet.GetItemState(nWhich)) +{ +boost::property_tree::ptree aItem = rSet.Get(nWhich).dumpAsJSON(); +if (!aItem.empty()) +anArray.push_back(std::make_pair("", aItem)); +} } +aTree.add_child("items", anArray); -if (!sPayload.isEmpty()) -{ -pShell-
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source
sd/source/ui/view/Outliner.cxx | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) New commits: commit 188ff24ee209d4f5f8ec6a6ae82241e56f0be6d5 Author: Ashod Nakashian AuthorDate: Sat May 25 12:15:00 2019 -0400 Commit: Ashod Nakashian CommitDate: Mon Nov 25 13:40:01 2019 +0100 sd: LOK: don't access null dispatcher With SpellDialog invoked from multiple views the dispatcher can indeed be null in some cases. (cherry picked from commit b18c12f4dbe91379cef795d559c2d84341e32a75) Change-Id: Ic2950e70383a77d63438341fac174d369748b36a Reviewed-on: https://gerrit.libreoffice.org/83631 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index ed25f27e2d34..5d9181475d45 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1418,23 +1418,29 @@ void SdOutliner::EnterEditMode (bool bGrabFocus) // Make FuText the current function. SfxUInt16Item aItem (SID_TEXTEDIT, 1); std::shared_ptr pViewShell (mpWeakViewShell.lock()); -pViewShell->GetDispatcher()->ExecuteList(SID_TEXTEDIT, -SfxCallMode::SYNCHRON | SfxCallMode::RECORD, { &aItem }); +if (pViewShell && pViewShell->GetDispatcher()) +{ +pViewShell->GetDispatcher()->ExecuteList( +SID_TEXTEDIT, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, { &aItem }); -// To be consistent with the usual behaviour in the Office the text -// object that is put into edit mode would have also to be selected. -// Starting the text edit mode is not enough so we do it here by -// hand. -mpView->UnmarkAllObj (pPV); -mpView->MarkObj (mpSearchSpellTextObj, pPV); +// To be consistent with the usual behaviour in the Office the text +// object that is put into edit mode would have also to be selected. +// Starting the text edit mode is not enough so we do it here by +// hand. +mpView->UnmarkAllObj (pPV); +mpView->MarkObj (mpSearchSpellTextObj, pPV); -mpSearchSpellTextObj->setActiveText( mnText ); +mpSearchSpellTextObj->setActiveText( mnText ); -// Turn on the edit mode for the text object. -mpView->SdrBeginTextEdit(mpSearchSpellTextObj, pPV, mpWindow, true, this, pOutlinerView, true, true, bGrabFocus); +// Make sure we aren't editing already. +mpView->SdrEndTextEdit(); -SetUpdateMode(true); -mbFoundObject = true; +// Turn on the edit mode for the text object. +mpView->SdrBeginTextEdit(mpSearchSpellTextObj, pPV, mpWindow, true, this, pOutlinerView, true, true, bGrabFocus); + +SetUpdateMode(true); +mbFoundObject = true; +} } } ___ 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' - sd/source
sd/source/ui/view/drviewsf.cxx | 62 + 1 file changed, 62 insertions(+) New commits: commit 94fbb1dafaf691e4582ca51426074da3aa469a65 Author: Szymon Kłos AuthorDate: Thu Nov 21 12:59:17 2019 +0100 Commit: Szymon Kłos CommitDate: Thu Nov 21 13:58:46 2019 +0100 jsdialogs: send .uno:FillStyle updates in Impress Change-Id: I9b266d9134678e98a5540ec3681d24b3ea43506a Reviewed-on: https://gerrit.libreoffice.org/83382 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 5261ff37d6d2..07ba0a76df72 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -63,10 +63,68 @@ #include #include #include +#include +#include +#include +#include + +using namespace com::sun::star::drawing; using namespace svx::sidebar; using namespace ::com::sun::star; +namespace { +OUString lcl_fillStyleEnumToString(FillStyle eStyle) +{ +switch (eStyle) +{ +case FillStyle_NONE: +return "NONE"; + +case FillStyle_SOLID: +return "SOLID"; + +case FillStyle_GRADIENT: +return "GRADIENT"; + +case FillStyle_HATCH: +return "HATCH"; + +case FillStyle_BITMAP: +return "BITMAP"; + +default: +return ""; +} +} + +void lcl_sendAttrUpdatesForLOK(SfxViewShell* pShell, const SfxItemSet& rSet) +{ +if (!pShell) +return; + +OUString sPayload; +const SfxPoolItem* pItem = rSet.GetItem(SID_ATTR_FILL_STYLE); + +if (pItem) +{ +const XFillStyleItem* pFillStyleItem = static_cast(pItem); +FillStyle eStyle; +css::uno::Any aAny; + +pFillStyleItem->QueryValue(aAny); +aAny >>= eStyle; +sPayload = ".uno:FillStyle=" + lcl_fillStyleEnumToString(eStyle); +} + +if (!sPayload.isEmpty()) +{ +pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, +OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); +} +} +} + namespace sd { /** @@ -697,6 +755,10 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } nWhich = aNewIter.NextWhich(); } + +SfxViewShell* pViewShell = GetDrawView()->GetSfxViewShell(); +if (pViewShell && comphelper::LibreOfficeKit::isActive()) +lcl_sendAttrUpdatesForLOK( pViewShell, *pSet ); } SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE ); ___ 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' - sd/source
sd/source/ui/animations/SlideTransitionPane.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 58a3e6ad29eb7b616f03737265ef7a25afe83a36 Author: Henry Castro AuthorDate: Thu Aug 22 16:43:54 2019 -0400 Commit: Henry Castro CommitDate: Thu Nov 14 13:14:15 2019 +0100 sd: define three columns for the slide transition pane Instead of calculating extra space Change-Id: I26e763e5db0ff05fb1bd6f64f3054d8ef88a2156 Reviewed-on: https://gerrit.libreoffice.org/82526 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 144735d9aaa8..9da8963f91ab 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -388,7 +388,7 @@ public: EnableFullItemMode( false ); set_hexpand( true ); set_vexpand( true ); -SetExtraSpacing( 2 ); +SetColCount(3); } virtual ~TransitionPane() override { disposeOnce(); } ___ 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' - sd/source
sd/source/ui/view/drtxtob.cxx | 50 ++ 1 file changed, 50 insertions(+) New commits: commit 29733bb39a16fc0e1398a7c18781226cfe755ff3 Author: Szymon Kłos AuthorDate: Thu Nov 14 11:05:40 2019 +0100 Commit: Szymon Kłos CommitDate: Thu Nov 14 12:20:08 2019 +0100 jsdialog: send paragraph margins for impress Change-Id: Ie0d4d3dc33de66609c005b77c1ef9802446ad57c Reviewed-on: https://gerrit.libreoffice.org/82658 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 28903c556424..b1faba5c269d 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -48,6 +48,9 @@ #include #include #include +#include +#include +#include #include @@ -457,14 +460,38 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1; } long nUpper = 0; +OUString sUpper, sLower; +// TODO: set correct unit +MapUnit eTargetUnit = MapUnit::MapInch; + for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( nPara ); const SvxULSpaceItem& rItem = rItems.Get( EE_PARA_ULSPACE ); nUpper = std::max( nUpper, static_cast(rItem.GetUpper()) ); + +if (nPara == nStartPara) +{ +sUpper = GetMetricText(rItem.GetUpper(), +MapUnit::MapTwip, eTargetUnit, nullptr); +} +if (nPara == nEndPara) +{ +sLower = GetMetricText(rItem.GetLower(), +MapUnit::MapTwip, eTargetUnit, nullptr); +} } if( nUpper == 0 ) rSet.DisableItem( SID_PARASPACE_DECREASE ); + +if (comphelper::LibreOfficeKit::isActive()) +{ +OUString sPayload = ".uno:ULSpacing={\"upper\": \"" + sUpper + +"\", \"lower\": \"" + sLower + "\"}"; + + GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, +OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); +} } else { @@ -567,6 +594,29 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE); rSet.Put(aLRSpace); Invalidate(SID_ATTR_PARA_LRSPACE); + +if (comphelper::LibreOfficeKit::isActive()) +{ +// TODO: set correct unit +MapUnit eTargetUnit = MapUnit::MapInch; + +OUString sLeft = GetMetricText(aLRSpace.GetLeft(), +MapUnit::MapTwip, eTargetUnit, nullptr); + +OUString sRight = GetMetricText(aLRSpace.GetRight(), +MapUnit::MapTwip, eTargetUnit, nullptr); + +OUString sFirstline = GetMetricText(aLRSpace.GetTextFirstLineOfst(), +MapUnit::MapTwip, eTargetUnit, nullptr); + +OUString sPayload = ".uno:LeftRightParaMargin={\"left\": \"" + sLeft + +"\", \"right\": \"" + sRight + +"\", \"firstline\": \"" + sFirstline + "\"}"; + + GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, +OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); +} + //Added by xuxu SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE ); if ( eState == SfxItemState::DONTCARE ) ___ 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' - sd/source
sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) New commits: commit cd78158694a2cd6ea482f86eed99204d4b669b92 Author: Ashod Nakashian AuthorDate: Sun Nov 11 23:35:03 2018 -0500 Commit: Ashod Nakashian CommitDate: Mon Nov 11 02:35:50 2019 +0100 sd: for_each -> range-for Simpler, more readable, and sensible stacktraces. Change-Id: I8e8a9903e3bf2ce5f31b841db9cb68fe4edc3fb6 (cherry picked from commit a00490bf0d2ee2c94f494978ebfeb8012a02e678) Reviewed-on: https://gerrit.libreoffice.org/82403 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx index 51b648a959cf..5246a73663ec 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx @@ -67,12 +67,8 @@ void ConfigurationControllerResourceManager::ActivateResources ( // Iterate in normal order over the resources that are to be // activated so that resources on which others depend are activated // before the depending resources are activated. -::std::for_each( -rResources.begin(), -rResources.end(), -[&] (Reference const& xResource) { -return ActivateResource(xResource, rxConfiguration); -} ); +for (const Reference& xResource : rResources) +ActivateResource(xResource, rxConfiguration); } void ConfigurationControllerResourceManager::DeactivateResources ( ___ 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' - sd/source
sd/source/ui/view/drviews2.cxx | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) New commits: commit 5086d318b4c737814086e8a28ebe8311f1d08eee Author: Szymon Kłos AuthorDate: Fri Nov 8 13:19:38 2019 +0100 Commit: Szymon Kłos CommitDate: Fri Nov 8 14:27:45 2019 +0100 jsdialogs: apply .uno:FillColor in Impress Change-Id: Ic85233716998f3a88792501266c4d8214c4ab1a2 Reviewed-on: https://gerrit.libreoffice.org/82292 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 77f63e1894b5..5b10ea013a04 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -547,7 +547,7 @@ public: namespace { -void lcl_convertStringArguments(std::unique_ptr& pArgs) +void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr& pArgs) { Color aColor; OUString sColor; @@ -563,7 +563,7 @@ namespace XLineWidthItem aItem(nValue); pArgs->Put(aItem); } -else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem)) +if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem)) { sColor = static_cast(pItem)->GetValue(); @@ -572,8 +572,22 @@ namespace else aColor = Color(sColor.toInt32(16)); -XLineColorItem aLineColorItem(OUString(), aColor); -pArgs->Put(aLineColorItem); +switch (nSlot) +{ +case SID_ATTR_LINE_COLOR: +{ +XLineColorItem aLineColorItem(OUString(), aColor); +pArgs->Put(aLineColorItem); +break; +} + +case SID_ATTR_FILL_COLOR: +{ +XFillColorItem aFillColorItem(OUString(), aColor); +pArgs->Put(aFillColorItem); +break; +} +} } } } @@ -664,7 +678,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if( rReq.GetArgs() ) { std::unique_ptr pNewArgs = rReq.GetArgs()->Clone(); -lcl_convertStringArguments(pNewArgs); +lcl_convertStringArguments(rReq.GetSlot(), pNewArgs); mpDrawView->SetAttributes(*pNewArgs); rReq.Done(); } ___ 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' - sd/source
sd/source/ui/view/drviews2.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit 4bc42437cabf22a1351f485578e43f8fc0d21de3 Author: Szymon Kłos AuthorDate: Fri Nov 8 11:49:55 2019 +0100 Commit: Szymon Kłos CommitDate: Fri Nov 8 13:22:52 2019 +0100 jsdialog: apply .uno:XLineColor in Impress Change-Id: I02bd0ce5d3b71e6acf28f56aead41abc76b42465 Reviewed-on: https://gerrit.libreoffice.org/82280 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 24f41a3e81fa..77f63e1894b5 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -90,6 +90,7 @@ #include #include #include +#include #include @@ -548,6 +549,8 @@ namespace { void lcl_convertStringArguments(std::unique_ptr& pArgs) { +Color aColor; +OUString sColor; const SfxPoolItem* pItem = nullptr; if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem)) @@ -560,6 +563,18 @@ namespace XLineWidthItem aItem(nValue); pArgs->Put(aItem); } +else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem)) +{ +sColor = static_cast(pItem)->GetValue(); + +if (sColor == "transparent") +aColor = COL_TRANSPARENT; +else +aColor = Color(sColor.toInt32(16)); + +XLineColorItem aLineColorItem(OUString(), aColor); +pArgs->Put(aLineColorItem); +} } } ___ 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' - sd/source
sd/source/ui/view/drviews2.cxx | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) New commits: commit b17aeee00f0dce7124dc8a2e6100e10b6ef3a39e Author: Szymon Kłos AuthorDate: Fri Nov 8 11:13:11 2019 +0100 Commit: Szymon Kłos CommitDate: Fri Nov 8 11:51:12 2019 +0100 jsdialog: apply .uno:LineWidth in Impress Change-Id: I7b9a3e5d6af5ccf9e9be28c5a1460fbf8553ff08 Reviewed-on: https://gerrit.libreoffice.org/82275 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index c98532f34f42..24f41a3e81fa 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -89,6 +89,7 @@ #include #include #include +#include #include @@ -543,6 +544,25 @@ public: } }; +namespace +{ +void lcl_convertStringArguments(std::unique_ptr& pArgs) +{ +const SfxPoolItem* pItem = nullptr; + +if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem)) +{ +double fValue = static_cast(pItem)->GetValue(); +// FIXME: different units... +int nPow = 100; +int nValue = fValue * nPow; + +XLineWidthItem aItem(nValue); +pArgs->Put(aItem); +} +} +} + /** * SfxRequests for temporary actions */ @@ -628,7 +648,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if( rReq.GetArgs() ) { -mpDrawView->SetAttributes(*rReq.GetArgs()); +std::unique_ptr pNewArgs = rReq.GetArgs()->Clone(); +lcl_convertStringArguments(pNewArgs); +mpDrawView->SetAttributes(*pNewArgs); rReq.Done(); } else ___ 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' - sd/source svx/sdi
sd/source/ui/view/drtxtob1.cxx | 22 ++ svx/sdi/svx.sdi|2 +- 2 files changed, 19 insertions(+), 5 deletions(-) New commits: commit 8fbb4923d1477ba019478c34e3d370f05844ea47 Author: Szymon Kłos AuthorDate: Tue Nov 5 10:35:49 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Nov 5 12:51:46 2019 +0100 jsdialogs: .uno:ChartBackColor with string argument Change-Id: I2f28a0ba957548b020eacf3d630dccef6ebbf5ed Reviewed-on: https://gerrit.libreoffice.org/82057 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit 78d81c2e6ee4eb7caf2d4822657bc4eaa57bfc79) Reviewed-on: https://gerrit.libreoffice.org/82060 Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 5d3e109e688c..92926a075393 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -79,7 +79,7 @@ namespace { -void lcl_convertStringArguments(std::unique_ptr& pArgs) +void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr& pArgs) { Color aColor; OUString sColor; @@ -94,8 +94,22 @@ namespace else aColor = Color(sColor.toInt32(16)); -SvxColorItem aColorItem(aColor, EE_CHAR_COLOR); -pArgs->Put(aColorItem); +switch (nSlot) +{ +case SID_ATTR_CHAR_COLOR: +{ +SvxColorItem aColorItem(aColor, EE_CHAR_COLOR); +pArgs->Put(aColorItem); +break; +} + +case SID_ATTR_CHAR_BACK_COLOR: +{ +SvxBackgroundColorItem pBackgroundItem(aColor, EE_CHAR_BKGCOLOR); +pArgs->Put(pBackgroundItem); +break; +} +} } } } @@ -715,7 +729,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) } std::unique_ptr pNewArgs = pArgs->Clone(); -lcl_convertStringArguments(pNewArgs); +lcl_convertStringArguments(nSlot, pNewArgs); mpView->SetAttributes(*pNewArgs); // invalidate entire shell because of performance and diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 74e30f53dcfa..2a9794185910 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1507,7 +1507,7 @@ SvxColorItem Color SID_ATTR_CHAR_COLOR ] SvxBackgroundColorItem CharBackColor SID_ATTR_CHAR_BACK_COLOR - +(SfxStringItem Color SID_ATTR_COLOR_STR, SvxBackgroundColorItem CharBackColor SID_ATTR_CHAR_BACK_COLOR) [ AutoUpdate = TRUE, FastCall = FALSE, ___ 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' - sd/source svx/sdi
sd/source/ui/view/drtxtob1.cxx | 29 - svx/sdi/svx.sdi|2 +- 2 files changed, 29 insertions(+), 2 deletions(-) New commits: commit d0691fd2f57c1ed2927b3c3e78d0ce59558eb3a7 Author: Szymon Kłos AuthorDate: Mon Nov 4 17:17:58 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Nov 5 11:57:50 2019 +0100 jsdialogs: .uno:Color with string argument Change-Id: Ifdc95ff8c6a71340de3ed66cf58bc937e3730810 Reviewed-on: https://gerrit.libreoffice.org/82038 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit 780d83771af89e6b27b3618d9c033c3fb29ba803) Reviewed-on: https://gerrit.libreoffice.org/82058 Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index eb00b2d08ae6..5d3e109e688c 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -72,9 +72,34 @@ #include #include #include +#include +#include #include +namespace +{ +void lcl_convertStringArguments(std::unique_ptr& pArgs) +{ +Color aColor; +OUString sColor; +const SfxPoolItem* pColorStringItem = nullptr; + +if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem)) +{ +sColor = static_cast(pColorStringItem)->GetValue(); + +if (sColor == "transparent") +aColor = COL_TRANSPARENT; +else +aColor = Color(sColor.toInt32(16)); + +SvxColorItem aColorItem(aColor, EE_CHAR_COLOR); +pArgs->Put(aColorItem); +} +} +} + namespace sd { /** @@ -689,7 +714,9 @@ void TextObjectBar::Execute( SfxRequest &rReq ) pArgs = rReq.GetArgs(); } -mpView->SetAttributes(*pArgs); +std::unique_ptr pNewArgs = pArgs->Clone(); +lcl_convertStringArguments(pNewArgs); +mpView->SetAttributes(*pNewArgs); // invalidate entire shell because of performance and // extension reasons diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 09c127c2340f..74e30f53dcfa 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1489,7 +1489,7 @@ SfxVoidItem ClearOutline SID_OUTLINE_DELETEALL SvxColorItem Color SID_ATTR_CHAR_COLOR - +(SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem Color SID_ATTR_CHAR_COLOR) [ AutoUpdate = TRUE, FastCall = FALSE, ___ 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' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 593c3c39606383ed70680eeb029203c4506d6030 Author: Henry Castro AuthorDate: Fri Oct 25 17:51:30 2019 -0400 Commit: Henry Castro CommitDate: Tue Oct 29 16:15:23 2019 +0100 lok: simplify the function "SlideBackground::DumpAsPropertyTree" Change-Id: I288bcfa2f6ba82e83c541430d3782f2001645396 Reviewed-on: https://gerrit.libreoffice.org/81537 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 1b25b1bcdbe7..c644d38ec226 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -255,8 +255,7 @@ boost::property_tree::ptree SlideBackground::DumpAsPropertyTree() mpBindings->Update(SID_ATTR_PAGE_SIZE); } -boost::property_tree::ptree aTree(Control::DumpAsPropertyTree()); -return aTree; +return Control::DumpAsPropertyTree(); } void SlideBackground::HandleContextChange( ___ 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' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx | 11 +++ sd/source/ui/sidebar/SlideBackground.hxx |1 + 2 files changed, 12 insertions(+) New commits: commit 1512734da8a1b3a447ea92da280e7a802e09ff74 Author: Henry Castro AuthorDate: Thu Oct 24 16:46:09 2019 -0400 Commit: Henry Castro CommitDate: Fri Oct 25 02:30:54 2019 +0200 lok: ensure that the paper size list box control has selected items in the slide background panel. When a client side request the property tree data on the background panel the paper size list control has no selected items yet. I was tempted to force update the selected item in "Slide Background:: Initialize", however, I am not sure why it is not initialized the list box. This is done after an asynchronous update, maybe it is because the impress document is not initialized yet. anybody knows?. I prefer not to have side effects, so let's force initialization on in the tiled rendering case when the function SlideBackground::DumpAsPropertyTree is called. Change-Id: I596b75da46f2180342cb50bde03ee0ff1d414f05 Reviewed-on: https://gerrit.libreoffice.org/81481 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 5628d851597d..1b25b1bcdbe7 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -248,6 +248,17 @@ void SlideBackground::Initialize() UpdateMarginBox(); } +boost::property_tree::ptree SlideBackground::DumpAsPropertyTree() +{ +if (mpPaperSizeBox->GetSelectedEntryCount() == 0) +{ +mpBindings->Update(SID_ATTR_PAGE_SIZE); +} + +boost::property_tree::ptree aTree(Control::DumpAsPropertyTree()); +return aTree; +} + void SlideBackground::HandleContextChange( const vcl::EnumContext& rContext) { diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx index 136e8cbdc556..4c09bdaca757 100644 --- a/sd/source/ui/sidebar/SlideBackground.hxx +++ b/sd/source/ui/sidebar/SlideBackground.hxx @@ -77,6 +77,7 @@ public: const bool bIsEnabled) override; virtual void HandleContextChange( const vcl::EnumContext& rContext) override; +virtual boost::property_tree::ptree DumpAsPropertyTree() override; private: ___ 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' - sd/source
sd/source/ui/sidebar/LayoutMenu.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 7e43a5376647723071e7d212fc90f2caacde439f Author: Henry Castro AuthorDate: Sun Oct 20 09:50:48 2019 -0400 Commit: Henry Castro CommitDate: Tue Oct 22 17:52:36 2019 +0200 sd: sidebar: force to set the id of the LayoutMenu control Otherwise, the function std::unique_ptr WindowUIObject::get_child(const OUString& rID) will not find the control with the rID. Change-Id: Ie571eb351bb0c59654f577cef1961247273d7608 Reviewed-on: https://gerrit.libreoffice.org/81166 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index c336dcd1cfaa..02957cd56f88 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -135,6 +135,7 @@ LayoutMenu::LayoutMenu ( mxSidebar(rxSidebar), mbIsDisposed(false) { +set_id("sd::LayoutMenu"); implConstruct( *mrBase.GetDocument()->GetDocSh() ); SAL_INFO("sd.ui", "created LayoutMenu at " << this); ___ 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' - sd/source
sd/source/core/TransitionPreset.cxx | 136 +++- 1 file changed, 135 insertions(+), 1 deletion(-) New commits: commit faceae77f6d1a11b9d7647be2dee876f4b30fc83 Author: Marco Cecchetti AuthorDate: Mon May 27 12:53:30 2019 +0200 Commit: Michael Meeks CommitDate: Sat Oct 12 04:30:32 2019 +0200 lok: impress: show only supported transitions in the side pane Change-Id: I631ee8b101bacc4dec075100aa25158b71fbae40 Reviewed-on: https://gerrit.libreoffice.org/80688 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index ac6f7ad79598..ce373f55dd27 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -24,7 +24,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -104,6 +105,128 @@ bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList, // import transition presets Reference< XAnimationNode > xAnimationNode; +const std::set LOKSupportedTransitionTypes = { +TransitionType::BARWIPE, +TransitionType::BOXWIPE, +TransitionType::FOURBOXWIPE, +TransitionType::ELLIPSEWIPE, +TransitionType::CLOCKWIPE, +TransitionType::PINWHEELWIPE, +TransitionType::PUSHWIPE, +TransitionType::SLIDEWIPE, +TransitionType::FADE, +TransitionType::RANDOMBARWIPE, +TransitionType::CHECKERBOARDWIPE, +TransitionType::DISSOLVE, +TransitionType::SNAKEWIPE, +TransitionType::PARALLELSNAKESWIPE, +TransitionType::IRISWIPE, +TransitionType::BARNDOORWIPE, +TransitionType::VEEWIPE, +TransitionType::ZIGZAGWIPE, +TransitionType::BARNZIGZAGWIPE, +TransitionType::FANWIPE, +TransitionType::SINGLESWEEPWIPE, +TransitionType::WATERFALLWIPE, +TransitionType::SPIRALWIPE, +TransitionType::MISCDIAGONALWIPE, +TransitionType::BOXSNAKESWIPE +}; + +const std::set LOKSupportedTransitionSubTypes = { +TransitionSubType::DEFAULT, +TransitionSubType::LEFTTORIGHT, +TransitionSubType::TOPTOBOTTOM, +TransitionSubType::CORNERSIN, +TransitionSubType::CORNERSOUT, +TransitionSubType::VERTICAL, +TransitionSubType::HORIZONTAL, +TransitionSubType::DOWN, +TransitionSubType::CIRCLE, +TransitionSubType::CLOCKWISETWELVE, +TransitionSubType::CLOCKWISETHREE, +TransitionSubType::CLOCKWISESIX, +TransitionSubType::CLOCKWISENINE, +TransitionSubType::TWOBLADEVERTICAL, +TransitionSubType::TWOBLADEHORIZONTAL, +TransitionSubType::FOURBLADE, +TransitionSubType::FROMLEFT, +TransitionSubType::FROMTOP, +TransitionSubType::FROMRIGHT, +TransitionSubType::FROMBOTTOM, +TransitionSubType::CROSSFADE, +TransitionSubType::FADETOCOLOR, +TransitionSubType::FADEFROMCOLOR, +TransitionSubType::FADEOVERCOLOR, +TransitionSubType::THREEBLADE, +TransitionSubType::EIGHTBLADE, +TransitionSubType::ONEBLADE, +TransitionSubType::ACROSS, +TransitionSubType::TOPLEFTVERTICAL, +TransitionSubType::TOPLEFTHORIZONTAL, +TransitionSubType::TOPLEFTDIAGONAL, +TransitionSubType::TOPRIGHTDIAGONAL, +TransitionSubType::BOTTOMRIGHTDIAGONAL, +TransitionSubType::BOTTOMLEFTDIAGONAL, +TransitionSubType::RECTANGLE, +TransitionSubType::DIAMOND, +TransitionSubType::TOPLEFT, +TransitionSubType::TOPRIGHT, +TransitionSubType::BOTTOMRIGHT, +TransitionSubType::BOTTOMLEFT, +TransitionSubType::TOPCENTER, +TransitionSubType::RIGHTCENTER, +TransitionSubType::BOTTOMCENTER, +TransitionSubType::LEFTCENTER, +TransitionSubType::LEFT, +TransitionSubType::UP, +TransitionSubType::RIGHT, +TransitionSubType::DIAGONALBOTTOMLEFT, +TransitionSubType::DIAGONALTOPLEFT, +TransitionSubType::CENTERTOP, +TransitionSubType::CENTERRIGHT, +TransitionSubType::TOP, +TransitionSubType::BOTTOM, +TransitionSubType::CLOCKWISETOP, +TransitionSubType::CLOCKWISERIGHT, +TransitionSubType::CLOCKWISEBOTTOM, +TransitionSubType::CLOCKWISELEFT, +TransitionSubType::CLOCKWISETOPLEFT, +TransitionSubType::COUNTERCLOCKWISEBOTTOMLEFT, +TransitionSubType::CLOCKWISEBOTTOMRIGHT, +TransitionSubT
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source solenv/bin
sd/source/ui/animations/CustomAnimationDialog.cxx |4 solenv/bin/native-code.py |1 + 2 files changed, 5 insertions(+) New commits: commit a52f8c9e0a279303436b9dc427cd693caf1e13c7 Author: Tomaž Vajngerl AuthorDate: Wed Oct 9 09:31:52 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed Oct 9 12:46:07 2019 +0200 make impress sidebar work on iOS - missing PanelFactory add org_openoffice_comp_Draw_framework_PanelFactory_get_implementation make it build Reviewed-on: https://gerrit.libreoffice.org/80514 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl (cherry picked from commit 400cc072ab8498048aad7d07930e1503bb1a0406) Change-Id: I738fe4c2d08437986976eaa29483c30a5ba42e62 Reviewed-on: https://gerrit.libreoffice.org/80531 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index d8b2baa6e533..09552e8cbf27 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -2243,6 +2245,7 @@ void CustomAnimationEffectTabPage::openSoundFileDialog() void CustomAnimationEffectTabPage::onSoundPreview() { +#if HAVE_FEATURE_AVMEDIA const auto nPos = mxLBSound->get_active(); if( nPos >= 2 ) try @@ -2255,6 +2258,7 @@ void CustomAnimationEffectTabPage::onSoundPreview() { OSL_FAIL("CustomAnimationEffectTabPage::onSoundPreview(), exception caught!" ); } +#endif } class CustomAnimationDurationTabPage diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 794f236ddd86..b5fbdfbfc5d0 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -383,6 +383,7 @@ draw_constructor_list = [ "com_sun_star_comp_Draw_framework_ResourceID_get_implementation", "com_sun_star_comp_Draw_framework_configuration_ConfigurationController_get_implementation", "com_sun_star_comp_Draw_framework_module_ModuleController_get_implementation", +"org_openoffice_comp_Draw_framework_PanelFactory_get_implementation", # sd/util/sdd.component "com_sun_star_comp_draw_FormatDetector_get_implementation", # sd/util/sdfilt.component ___ 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' - sd/source
sd/source/ui/view/drviewse.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 24aa2ec5ac0701b183371815d710a105f192b711 Author: Jan Holesovsky AuthorDate: Thu Nov 22 12:34:06 2018 +0100 Commit: Andras Timar CommitDate: Sun Oct 6 19:13:38 2019 +0200 lok sd: Insert the new shapes in the center of the slide. Change-Id: I134f86dc0c49ddf26e7a3cfe790c49ab200de9e9 Reviewed-on: https://gerrit.libreoffice.org/80239 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 520e29bfb47a..233e627208fe 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -615,6 +615,12 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) // calc position and size ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); +if (comphelper::LibreOfficeKit::isActive()) +{ +// aVisArea is nonsensical in the LOK case, use the slide size +aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize()); +} + Point aPagePos = aVisArea.Center(); aPagePos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) ); aPagePos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) ); ___ 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' - sd/source
sd/source/ui/dlg/sdabstdlg.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 67bac7a8469145c522e7c52a16123e55aa9d36ae Author: Tor Lillqvist AuthorDate: Mon Feb 25 15:34:13 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Sep 20 11:45:19 2019 +0200 Make SdAbstractDialogFactory::Create() do its job also on non-DESKTOP Change-Id: Ife76336dbdeaadf08f631e3542be73a8568f5368 (cherry picked from commit 056be933ea041939401f945df7f6e0a23e53a616) Reviewed-on: https://gerrit.libreoffice.org/79170 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx index 57dd6e3c53e4..4b56b82c61fd 100644 --- a/sd/source/ui/dlg/sdabstdlg.cxx +++ b/sd/source/ui/dlg/sdabstdlg.cxx @@ -39,7 +39,6 @@ extern "C" SdAbstractDialogFactory* SdCreateDialogFactory(); SdAbstractDialogFactory* SdAbstractDialogFactory::Create() { SdFuncPtrCreateDialogFactory fp = nullptr; -#if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING static ::osl::Module aDialogLibrary; static const OUString sLibName(SDUI_DLL_NAME); @@ -49,7 +48,6 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create() #else fp = SdCreateDialogFactory; #endif -#endif if ( fp ) return fp(); return nullptr; ___ 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' - sd/source
sd/source/ui/dlg/sdabstdlg.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f3601d420f90c1f7af0c701d796d2e2988933d4c Author: Tor Lillqvist AuthorDate: Mon Feb 25 15:33:01 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Sep 20 11:21:49 2019 +0200 We want the function pointer here, but not call it yet We will call it just a few lines later. Change-Id: I967ff4eec2cfb1dcc7e8b02f32232be65b6366db (cherry picked from commit 895573518e84e319655877baadda1adc54003435) Reviewed-on: https://gerrit.libreoffice.org/79169 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx index d5bed9b764fc..57dd6e3c53e4 100644 --- a/sd/source/ui/dlg/sdabstdlg.cxx +++ b/sd/source/ui/dlg/sdabstdlg.cxx @@ -47,7 +47,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create() fp = reinterpret_cast( aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" )); #else -fp = SdCreateDialogFactory(); +fp = SdCreateDialogFactory; #endif #endif if ( fp ) ___ 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' - sd/source
sd/source/ui/dlg/filedlg.cxx |4 1 file changed, 4 insertions(+) New commits: commit 2b09926c939187097c66321ab9026eee4c726aa5 Author: Tor Lillqvist AuthorDate: Tue Nov 6 11:58:33 2018 +0200 Commit: Tor Lillqvist CommitDate: Thu Sep 19 18:02:20 2019 +0200 Some !HAVE_FEATURE_AVMEDIA fallout Change-Id: Ie7c2f75ec66ae4c1f8dc49075624617c294cbc25 Reviewed-on: https://gerrit.libreoffice.org/62945 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/79131 diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index 268c0f4a9f9d..75b7a5783b1a 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -96,6 +98,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl, void*, void) mxPlayer.clear(); } +#if HAVE_FEATURE_AVMEDIA if( mbLabelPlaying ) { try @@ -144,6 +147,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl, void*, void) } } } +#endif } IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl, Timer *, void) ___ 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' - sd/source
sd/source/ui/func/fuolbull.cxx | 73 + 1 file changed, 39 insertions(+), 34 deletions(-) New commits: commit 6f8a882665f73811e877284a8dea98c33ec75257 Author: Noel Grandin AuthorDate: Thu Jan 10 14:54:02 2019 +0200 Commit: Andras Timar CommitDate: Thu Sep 19 16:16:06 2019 +0200 make Format->Bullets and Numbering dialog async Change-Id: Ib69c2be7c8ddaa616c08796ad2b8c8cf20ee2db9 Reviewed-on: https://gerrit.libreoffice.org/66098 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit a2b78c131db2bbe3555a89dfae32aefcd00949f5) Reviewed-on: https://gerrit.libreoffice.org/79122 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 286d95a8cd1a..14dc697e71be 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -70,53 +70,58 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxStringItem* pPageItem = SfxItemSet::GetItem(pArgs, FN_PARAM_1, false); -if ( !pArgs || pPageItem ) +if ( pArgs && !pPageItem ) { -// fill ItemSet for Dialog -SfxItemSet aEditAttr( mpDoc->GetPool() ); -mpView->GetAttributes( aEditAttr ); +/* not direct to pOlView; therefore, SdDrawView::SetAttributes can catch + changes to master page and redirect to a template */ +mpView->SetAttributes(*pArgs); +return; +} -SfxItemSet aNewAttr( mpViewShell->GetPool(), +// fill ItemSet for Dialog +SfxItemSet aEditAttr( mpDoc->GetPool() ); +mpView->GetAttributes( aEditAttr ); + +SfxItemSet aNewAttr( mpViewShell->GetPool(), svl::Items{} ); -aNewAttr.Put( aEditAttr, false ); +aNewAttr.Put( aEditAttr, false ); -// create and execute dialog -SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); -ScopedVclPtr pDlg( pFact->CreateSdOutlineBulletTabDlg(mpViewShell->GetFrameWeld(), &aNewAttr, mpView) ); -if ( pPageItem ) -pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) ); -sal_uInt16 nResult = pDlg->Execute(); +// create and execute dialog +SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); +VclPtr pDlg( pFact->CreateSdOutlineBulletTabDlg(mpViewShell->GetFrameWeld(), &aNewAttr, mpView) ); +if ( pPageItem ) +pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) ); -if( nResult != RET_OK ) -return; +std::shared_ptr xRequest(new SfxRequest(rReq)); +rReq.Ignore(); // the 'old' request is not relevant any more -SfxItemSet aSet( *pDlg->GetOutputItemSet() ); +pDlg->StartExecuteAsync([this, pDlg, xRequest](sal_Int32 nResult){ -OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); +if( nResult == RET_OK ) +{ +SfxItemSet aSet( *pDlg->GetOutputItemSet() ); -std::unique_ptr> aGuard; +OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); -if (OutlineView* pView = dynamic_cast(mpView)) -{ -pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow()); -aGuard.reset(new OutlineViewModelChangeGuard(*pView)); -} +std::unique_ptr> aGuard; -if( pOLV ) -pOLV->EnableBullets(); +if (OutlineView* pView = dynamic_cast(mpView)) +{ +pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow()); +aGuard.reset(new OutlineViewModelChangeGuard(*pView)); +} -rReq.Done( aSet ); -pArgs = rReq.GetArgs(); -} +if( pOLV ) +pOLV->EnableBullets(); -/* not direct to pOlView; therefore, SdDrawView::SetAttributes can catch - changes to master page and redirect to a template */ -mpView->SetAttributes(*pArgs); +xRequest->Done( aSet ); -/* #i35937# -// invalidate possible affected fields -mpViewShell->Invalidate( FN_NUM_BULLET_ON ); -*/ +/* not direct to pOlView; therefore, SdDrawView::SetAttributes can catch + changes to master page and redirect to a template */ +mpView->SetAttributes(*xRequest->GetArgs()); +} +pDlg->disposeOnce(); +}); } void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) ___ 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' - sd/source
sd/source/ui/func/futext.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit c6df1c5bbfdfd94e5deb5a21eea42d10273b51e9 Author: Szymon Kłos AuthorDate: Wed Aug 14 18:58:16 2019 +0200 Commit: Andras Timar CommitDate: Tue Aug 27 12:26:29 2019 +0200 Set text field modified on edit in Impress To avoid not saved changes when user enters text field and then closes the browser. Change-Id: Iee06392eedcf8c1875017dbfb2059f94bba3 Reviewed-on: https://gerrit.libreoffice.org/77504 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index d68d55e09ec4..7acef29be39a 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -69,6 +69,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -200,6 +201,8 @@ void FuText::DoExecute( SfxRequest& ) SdrViewEvent aVEvt; mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); mpView->MarkObj(aVEvt.pRootObj, pPV); +if (comphelper::LibreOfficeKit::isActive() && mpViewShell && mpViewShell->GetDocSh()) +mpViewShell->GetDocSh()->SetModified(); mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.pObj ) ); } ___ 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' - sd/source sd/uiconfig svx/sdi
sd/source/ui/func/fuconbez.cxx | 86 +++-- sd/source/ui/inc/fuconbez.hxx | 10 +++ sd/uiconfig/sdraw/toolbar/redactionbar.xml |2 svx/sdi/svx.sdi|3 - 4 files changed, 96 insertions(+), 5 deletions(-) New commits: commit 39c94811a6a3630deae81812f05cde7717e8dfef Author: Muhammet Kara AuthorDate: Fri Jan 25 14:24:42 2019 +0300 Commit: Muhammet Kara CommitDate: Mon Jun 17 21:21:18 2019 +0200 Forge the freeform redaction tool out of the Freeform Line tool in Draw. * Replace .uno:LineToolbox with .uno:Freeline_Unfilled in Redaction toolbar * Add new parameters to .uno:Freeline_Unfilled - SfxUInt16Item Transparence, SfxStringItem Color, SfxUInt16Item Width, SfxBoolItem IsSticky * Handle the params in FuConstructBezierPolygon * Now the freeform line draw tool on the Redaction toolbar works with a default width of 5mm, color of COL_GRAY7, and a transparency of 50%; and it sticks when it is clicked/selected once until user deliberately deselects it by clicking on another tool or by clicking outside of the page. * Known problem: icon is not displayed on the toolbar after adding the params Change-Id: I6b09276ca82782dbf214aab8d2ba3b407fb0d81c Reviewed-on: https://gerrit.libreoffice.org/66916 Tested-by: Jenkins Reviewed-by: Muhammet Kara Reviewed-on: https://gerrit.libreoffice.org/74199 Tested-by: Muhammet Kara diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index ebc57cb87ebc..1acc46a41f9c 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -31,6 +31,9 @@ #include #include +#include +#include +#include #include #include @@ -50,7 +53,10 @@ using namespace ::com::sun::star::uno; namespace sd { - +/*//Extra attributes coming from parameters +sal_uInt16 mnTransparence; // Default: 0 +OUStringmsColor; // Default: "" +sal_uInt16 mnWidth; // Default: 0*/ FuConstructBezierPolygon::FuConstructBezierPolygon ( ViewShell* pViewSh, ::sd::Window* pWin, @@ -58,8 +64,29 @@ FuConstructBezierPolygon::FuConstructBezierPolygon ( SdDrawDocument* pDoc, SfxRequest& rReq) : FuConstruct(pViewSh, pWin, pView, pDoc, rReq), - nEditMode(SID_BEZIER_MOVE) + nEditMode(SID_BEZIER_MOVE), + mnTransparence(0), + mnWidth(0) +{ +} + +namespace{ + +/// Checks to see if the request has a parameter of IsSticky:bool=true +/// It means that the selected command/button will stay selected after use +bool isSticky(SfxRequest& rReq) { +const SfxItemSet *pArgs = rReq.GetArgs (); +if (pArgs) +{ +const SfxBoolItem* pIsSticky = rReq.GetArg(FN_PARAM_4); +if (pIsSticky && pIsSticky->GetValue()) +return true; +} + +return false; +} + } rtl::Reference FuConstructBezierPolygon::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent ) @@ -67,7 +94,7 @@ rtl::Reference FuConstructBezierPolygon::Create( ViewShell* pViewSh, ::s FuConstructBezierPolygon* pFunc; rtl::Reference xFunc( pFunc = new FuConstructBezierPolygon( pViewSh, pWin, pView, pDoc, rReq ) ); xFunc->DoExecute(rReq); -pFunc->SetPermanent(bPermanent); +pFunc->SetPermanent(bPermanent || isSticky(rReq)); return xFunc; } @@ -76,11 +103,32 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq ) FuConstruct::DoExecute( rReq ); const SfxItemSet* pArgs = rReq.GetArgs(); + if( pArgs ) { const SfxPoolItem* pPoolItem = nullptr; if( SfxItemState::SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) ) maTargets = static_cast( pPoolItem )->GetValue(); + +if (nSlotId == SID_DRAW_FREELINE_NOFILL) +{ +const SfxUInt16Item* pTransparence = rReq.GetArg(FN_PARAM_1); +const SfxStringItem* pColor = rReq.GetArg(FN_PARAM_2); +const SfxUInt16Item* pWidth = rReq.GetArg(FN_PARAM_3); + +if (pTransparence && pTransparence->GetValue() > 0) +{ +mnTransparence = pTransparence->GetValue(); +} +if (pColor && !pColor->GetValue().isEmpty()) +{ +msColor = pColor->GetValue(); +} +if (pWidth && pWidth->GetValue() > 0) +{ +mnWidth = pWidth->GetValue(); +} +} } } @@ -126,6 +174,7 @@ bool FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt) { SfxItemSet aAttr(mpDoc->GetPool()); SetStyleSheet(aAttr, pObj); +SetAttributes(aAttr); pObj->SetMergedItemSet(aAttr); } } @@ -285,6 +334,37 @@ void FuConstructBezierPolygon: