[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/app/sdmod1.cxx | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) New commits: commit 402fd49351123c476650c7280471d05d4de85d5d Author: Caolán McNamara AuthorDate: Wed Nov 22 21:14:41 2023 + Commit: Miklos Vajna CommitDate: Thu Nov 23 15:50:36 2023 +0100 reuse AllowedLinkProtocolFromDocument in impress/draw Change-Id: I73ca4f087946a45dbf92d69a0dc1e769de9b5690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159843 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit f0942eed2eb328b04856f20613f5226d66b66a20) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159759 Reviewed-by: Michael Stahl Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159859 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 573ee853069b..b22feb2d1f21 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -192,26 +193,32 @@ void SdModule::Execute(SfxRequest& rReq) { bool bIntercept = false; ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); -if (pDocShell) +::sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : nullptr; +if (pViewShell) { -::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); -if (pViewShell) +if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) { -if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) +// Prevent documents from opening while the slide +// show is running, except when this request comes +// from a shape interaction. +if (rReq.GetArgs() == nullptr) { -// Prevent documents from opening while the slide -// show is running, except when this request comes -// from a shape interaction. -if (rReq.GetArgs() == nullptr) -{ -bIntercept = true; -} +bIntercept = true; } } } if (!bIntercept) { +if (const SfxStringItem* pURLItem = rReq.GetArg(SID_FILE_NAME)) +{ +if (!pViewShell || !SfxObjectShell::AllowedLinkProtocolFromDocument(pURLItem->GetValue(), + pViewShell->GetObjectShell(), + pViewShell->GetFrameWeld())) +{ +return; +} +} SfxGetpApp()->ExecuteSlot(rReq, SfxGetpApp()->GetInterface()); } else
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/dlg/prltempl.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 15b36c09d1deff6a5bf387c01ae1983816486da4 Author: Caolán McNamara AuthorDate: Sun Oct 1 15:49:27 2023 +0100 Commit: Miklos Vajna CommitDate: Mon Oct 2 16:49:22 2023 +0200 Resolves: tdf#157515 only remove RID_SVXPAGE_PARA_ASIAN once Change-Id: I65faa99444636c5bc5b21008d4cfb144fbcafb83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157452 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 869f13c837d4..e7b77a46608b 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -141,7 +141,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr ); AddTabPage( "RID_SVXPAGE_BKG", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), nullptr); -if( !SvtCJKOptions::IsAsianTypographyEnabled() ) +if (!SvtCJKOptions::IsAsianTypographyEnabled() || bBackground) RemoveTabPage( "RID_SVXPAGE_PARA_ASIAN" ); if (bBackground) @@ -160,7 +160,6 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, RemoveTabPage( "RID_SVXPAGE_NUM_OPTIONS"); RemoveTabPage( "RID_SVXPAGE_TABULATOR"); RemoveTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH"); -RemoveTabPage( "RID_SVXPAGE_PARA_ASIAN" ); RemoveTabPage( "RID_SVXPAGE_BKG" ); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source svx/source
sd/source/core/ThemeColorChanger.cxx | 42 ++- svx/source/theme/ThemeColorChangerCommon.cxx | 17 +- 2 files changed, 32 insertions(+), 27 deletions(-) New commits: commit e3a9b09ffdb6fd3bf9f1d14c11d87468c3fab92c Author: Tomaž Vajngerl AuthorDate: Thu Aug 31 08:11:18 2023 +0200 Commit: Miklos Vajna CommitDate: Mon Sep 4 09:11:35 2023 +0200 sd: set the theme for all master pages It can be annoying for the user to set the theme one by one for each master page. The reason for this is that in MSO the master slide (which contains the theme) has multiple layouts, which are converted to master pages in LO. As LO doesn't group master pages together the theme is defined on each master page, so it is needed to change each master page one by one. Change-Id: I94d75246ca012005ab376446c0941b8f57ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156361 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 70663f464b24f223c4174681b9a469d9f554bcee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156454 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sd/source/core/ThemeColorChanger.cxx b/sd/source/core/ThemeColorChanger.cxx index 573a5f085dd4..3a5c7804ae57 100644 --- a/sd/source/core/ThemeColorChanger.cxx +++ b/sd/source/core/ThemeColorChanger.cxx @@ -154,31 +154,35 @@ void ThemeColorChanger::apply(std::shared_ptr const& pColorSet) { SdrPage* pCurrentPage = rModel.GetPage(nPage); -// Skip pages that are usign a different master page -if (!pCurrentPage->TRG_HasMasterPage() -|| >TRG_GetMasterPage() != mpMasterPage) -continue; - -for (size_t nObject = 0; nObject < pCurrentPage->GetObjCount(); ++nObject) +// TODO - for now change all the objects regardless to which master page it belongs to. +// Currently we don't have a concept of master slide with a group of layouts as in MSO, but we always only +// have master pages, which aren't grouped together. In MSO the theme is defined per master slide, so when +// changing a theme, all the layouts get the new theme, as layouts are synonomus to master pages in LibreOffise, +// this is not possible to do and we would need to change the theme for each master page separately, which +// is just annoying for the user. + +// if (!pCurrentPage->TRG_HasMasterPage() || >TRG_GetMasterPage() != mpMasterPage) +// continue; + +SdrObjListIter aIter(pCurrentPage, SdrIterMode::DeepWithGroups); +while (aIter.IsMore()) { -SdrObject* pObject = pCurrentPage->GetObj(nObject); -svx::theme::updateSdrObject(*pColorSet, pObject, pView, pUndoManager); - -// update child objects -SdrObjList* pList = pObject->GetSubList(); -if (pList) -{ -SdrObjListIter aIter(pList, SdrIterMode::DeepWithGroups); -while (aIter.IsMore()) -{ -svx::theme::updateSdrObject(*pColorSet, aIter.Next(), pView, pUndoManager); -} -} +svx::theme::updateSdrObject(*pColorSet, aIter.Next(), pView, pUndoManager); } } changeThemeColors(mpDocShell, mpMasterPage, pColorSet); +// See the TODO comment a couple of line above for the explanation - need to change the ThemeColors for all master +// pages for now, but the following code will need to be changed in the future when we have the concept similar to +// master slide and layouts +for (sal_uInt16 nPage = 0; nPage < rModel.GetPageCount(); ++nPage) +{ +SdrPage* pCurrentPage = rModel.GetPage(nPage); +if (pCurrentPage->IsMasterPage() && pCurrentPage != mpMasterPage) +changeThemeColors(mpDocShell, pCurrentPage, pColorSet); +} + pUndoManager->LeaveListAction(); } diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx b/svx/source/theme/ThemeColorChangerCommon.cxx index fab4835684a1..5ff1a0de8cd6 100644 --- a/svx/source/theme/ThemeColorChangerCommon.cxx +++ b/svx/source/theme/ThemeColorChangerCommon.cxx @@ -105,13 +105,8 @@ bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObj bool updateObjectAttributes(model::ColorSet const& rColorSet, SdrObject& rObject, SfxUndoManager* pUndoManager) { -if (pUndoManager) -{ -pUndoManager->AddUndoAction( - rObject.getSdrModelFromSdrObject().GetSdrUndoFactory().CreateUndoAttrObject( -rObject, true, true)); -} bool bChanged = false; + auto aItemSet = rObject.GetMergedItemSet(); if (const XFillColorItem* pItem = aItemSet.GetItemIfSet(XATTR_FILLCOLOR, false)) @@ -152,6 +147,13 @@ bool updateObjectAttributes(model::ColorSet const&
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/view/drviewsf.cxx | 15 --- 1 file changed, 15 deletions(-) New commits: commit 62804da3c0ab9443cf36f2e02387a2e9c272d5dc Author: Tomaž Vajngerl AuthorDate: Wed Aug 30 09:15:56 2023 +0200 Commit: Miklos Vajna CommitDate: Wed Aug 30 11:16:05 2023 +0200 sd: remove condition to only show ThemeDialog in master view Change-Id: I09ce07f7b520688aa54dd30107b5ab2218b12894 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156277 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index e25ebed52dd3..8f75b9f8081c 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -469,21 +469,6 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) } break; -case SID_THEME_DIALOG: -{ -bool bDisable = true; -SdrPageView* pPageView = mpDrawView->GetSdrPageView(); -if (pPageView) -{ -SdPage* pPage = dynamic_cast(pPageView->GetPage()); -if (pPage && pPage->IsMasterPage()) -bDisable = false; -} -if (bDisable) -rSet.DisableItem(nWhich); -} -break; - case SID_STYLE_FAMILY2: case SID_STYLE_FAMILY3: case SID_STYLE_FAMILY5:
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/inc/DrawViewShell.hxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 77f5cf7e360ecfcc199451faaa598a3885351e77 Author: Paris Oplopoios AuthorDate: Mon Jul 3 00:24:27 2023 +0300 Commit: Paris Oplopoios CommitDate: Wed Jul 5 10:02:27 2023 +0200 Delete DrawViewShell copy constructors DrawViewShell does not get copied so best to set these to deleted to highlight this. Change-Id: I3d35d3a47137b15346d54a08d3d7af480b0872bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153864 Tested-by: Jenkins Reviewed-by: Paris Oplopoios (cherry picked from commit 7f1012806f5cf2cd53e52d8f2a95c09a2215efbc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153907 Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index beb2bec08c0a..4e4482980a11 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -398,6 +398,9 @@ protected: voidGetMenuStateSel(SfxItemSet& rSet); private: +DrawViewShell(const DrawViewShell&) = delete; +DrawViewShell& operator=(const DrawViewShell&) = delete; + void Construct (DrawDocShell* pDocSh, PageKind ePageKind); /** Depending on the given request create a new page or duplicate an
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/filter/eppt/pptx-epptooxml.cxx | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) New commits: commit a56040d28fb19187ac34abcce37ef337e5a8593d Author: Tomaž Vajngerl AuthorDate: Tue Jun 20 17:39:40 2023 +0900 Commit: Aron Budea CommitDate: Tue Jun 20 17:54:48 2023 +0200 sd: fix setting theme for notes master Notes master also needs a theme set or the document will not load properly. For now we don't save the theme for the notes master on import, so we can only set the default "LibreOffice" theme instead. Change-Id: Ia9e5db53d4e1a4ca06b10d147cc879475166dfd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153314 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit b13733de130e2f1ca029315e977dc01bd196b05b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153321 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 1b784e1e5fa5..f56a04c04750 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -2042,12 +2043,23 @@ void PowerPointExport::WriteNotesMaster() "application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"); // write theme per master -WriteTheme(mnMasterPages, nullptr); +// TODO: Need to implement theme support for note master, so the +// note master has his own theme associated. -// add implicit relation to the presentation theme -addRelation(pFS->getOutputStream(), -oox::getRelationship(Relationship::THEME), -Concat2View("../theme/theme" + OUString::number(mnMasterPages + 1) + ".xml")); +// For now just use the default theme +auto const* pDefaultColorSet = svx::ColorSets::get().getColorSet(u"LibreOffice"); +if (pDefaultColorSet) +{ +auto pTheme = std::make_shared("Office Theme"); + pTheme->setColorSet(std::make_shared(*pDefaultColorSet)); + +WriteTheme(mnMasterPages, pTheme.get()); + +// add implicit relation to the presentation theme +addRelation(pFS->getOutputStream(), +oox::getRelationship(Relationship::THEME), +Concat2View("../theme/theme" + OUString::number(mnMasterPages + 1) + ".xml")); +} pFS->startElementNS(XML_p, XML_notesMaster, PNMSS);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/unoidl/unomodel.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fe79008f70e7a790e4f78c1714c27ea223512327 Author: Pranam Lashkari AuthorDate: Wed Jun 7 03:59:31 2023 +0700 Commit: Pranam Lashkari CommitDate: Tue Jun 13 13:29:09 2023 +0200 sd: send correct slide visibility status The term visible may be a bit aambiguous here, we try trying to send info about if the slide is hidden or visible in the slide show. The correct property for that is "exclude" Change-Id: Ic505036181b71686656bd2338b9d0329c12d9e74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152688 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 5a88fe21c8f8..92879fcd770a 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2362,7 +2362,7 @@ OUString SdXImpressDocument::getPartInfo(int nPart) if (!pViewSh) return OUString(); -const bool bIsVisible = pViewSh->IsVisible(nPart); +const bool bIsVisible = !pViewSh->GetDoc()->GetSdPage(nPart, pViewSh->GetPageKind())->IsExcluded(); const bool bIsSelected = pViewSh->IsSelected(nPart); const sal_Int16 nMasterPageCount= pViewSh->GetDoc()->GetMasterSdPageCount(pViewSh->GetPageKind());
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/view/drviewsk.cxx | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) New commits: commit 3875619ecce202bc9c6b504d6ce46a8aac770d53 Author: Caolán McNamara AuthorDate: Fri May 12 21:17:57 2023 +0100 Commit: Caolán McNamara CommitDate: Tue Jun 13 11:08:59 2023 +0200 cid#1530046 Unchecked dynamic_cast Change-Id: Iaeec0f90e6faae8f7c5ab8e1745c8bdb62925ca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151714 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 439a78496a9a45c6e412fa93edb537727ab7862a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152871 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx index 3a20691afa54..6e73a87d0ee4 100644 --- a/sd/source/ui/view/drviewsk.cxx +++ b/sd/source/ui/view/drviewsk.cxx @@ -23,19 +23,21 @@ void DrawViewShell::ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, Co { svtools::ColorConfig *pColorConfig = dynamic_cast(pCb); ConfigureAppBackgroundColor(pColorConfig); -SfxViewShell* pCurrentShell = SfxViewShell::Current(); -if (comphelper::LibreOfficeKit::isActive() && pCurrentShell) +if (comphelper::LibreOfficeKit::isActive()) { -DrawViewShell* pCurrentDrawShell = nullptr; +SfxViewShell* pCurrentShell = SfxViewShell::Current(); ViewShellBase* pShellBase = dynamic_cast(pCurrentShell); -if(pShellBase) -pCurrentDrawShell = dynamic_cast(pShellBase->GetMainViewShell().get()); -pCurrentDrawShell->maViewOptions.mnDocBackgroundColor = pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor; -pCurrentDrawShell->maViewOptions.msColorSchemeName = pColorConfig->GetCurrentSchemeName(); +if (!pShellBase) +return; +if (DrawViewShell* pCurrentDrawShell = dynamic_cast(pShellBase->GetMainViewShell().get())) +{ +pCurrentDrawShell->maViewOptions.mnDocBackgroundColor = pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor; +pCurrentDrawShell->maViewOptions.msColorSchemeName = pColorConfig->GetCurrentSchemeName(); +} SdXImpressDocument* pDoc = comphelper::getFromUnoTunnel(pCurrentShell->GetCurrentDocument()); SfxLokHelper::notifyViewRenderState(pCurrentShell, pDoc); Color aFillColor(pColorConfig->GetColorValue(svtools::APPBACKGROUND).nColor); - SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR, + pCurrentShell->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR, aFillColor.AsRGBHexString().toUtf8().getStr()); } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/unoidl/unomodel.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit ac8b4ad344c23c31392444f66843b4ccf2073dde Author: Miklos Vajna AuthorDate: Mon May 22 09:15:50 2023 +0200 Commit: Andras Timar CommitDate: Thu May 25 09:06:27 2023 +0200 sd: fix crash in SdXImpressDocument::postMouseEvent() Crashreport signature: program/libsdlo.so SdXImpressDocument::postMouseEvent(int, int, int, int, int, int) sd/source/ui/unoidl/unomodel.cxx:2615 program/libmergedlo.so doc_postMouseEvent desktop/source/lib/init.cxx:5007 Change-Id: I321f39b284f5917048925bf45c9a6417ac9cb2ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152079 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152187 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index b0c45ea1913b..93e941dfeee9 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2622,6 +2622,11 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount, i SdrPageView* pPageView = pDrawView->GetSdrPageView(); SdrPage* pPage = pPageView->GetPage(); ::sd::Window* pActiveWin = pViewShell->GetActiveWindow(); +if (!pActiveWin) +{ +return; +} + if (LokControlHandler::postMouseEvent(pPage, pDrawView, *pActiveWin, nType, aPointHMM, nCount, nButtons, nModifier)) return;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source sfx2/source vcl/jsdialog
sd/source/ui/view/drviews2.cxx | 29 - sfx2/source/sidebar/ResourceManager.cxx |3 +-- sfx2/source/view/viewfrm.cxx| 11 +++ vcl/jsdialog/enabled.cxx|6 +++--- vcl/jsdialog/jsdialogbuilder.cxx|9 ++--- 5 files changed, 41 insertions(+), 17 deletions(-) New commits: commit 6b734f99a1ca9165b86f6588a720de6dc90d3f7b Author: Attila Szűcs AuthorDate: Wed May 3 04:24:35 2023 +0200 Commit: Szymon Kłos CommitDate: Fri May 5 12:14:04 2023 +0200 LOK: Navi-1 open/close on sidebar Enabling Navigator sidebar in case of LOKit. Change-Id: I3a656fa12822e5866c2cd4fbf82627a88f26903a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151307 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 94207a01653e..d5bcbec91eaa 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -3350,16 +3350,27 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_NAVIGATOR: { -if ( rReq.GetArgs() ) -GetViewFrame()->SetChildWindow(SID_NAVIGATOR, -static_cast(rReq.GetArgs()-> -Get(SID_NAVIGATOR)).GetValue()); -else -GetViewFrame()->ToggleChildWindow( SID_NAVIGATOR ); +if (comphelper::LibreOfficeKit::isActive()) +{ +GetViewFrame()->ShowChildWindow(SID_SIDEBAR); +OUString panelId = "SdNavigatorPanel"; +::sfx2::sidebar::Sidebar::TogglePanel( +panelId, GetViewFrame()->GetFrame().GetFrameInterface()); -GetViewFrame()->GetBindings().Invalidate(SID_NAVIGATOR); -Cancel(); -rReq.Ignore (); +Cancel(); +rReq.Done(); +} else { +if ( rReq.GetArgs() ) +GetViewFrame()->SetChildWindow(SID_NAVIGATOR, +static_cast(rReq.GetArgs()-> +Get(SID_NAVIGATOR)).GetValue()); +else +GetViewFrame()->ToggleChildWindow( SID_NAVIGATOR ); + +GetViewFrame()->GetBindings().Invalidate(SID_NAVIGATOR); +Cancel(); +rReq.Ignore (); +} } break; diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index cfc5437037cc..5974e20af488 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -260,8 +260,7 @@ void ResourceManager::ReadDeckList() if (comphelper::LibreOfficeKit::isActive()) { // Hide these decks in LOK as they aren't fully functional. -if (aDeckName == "GalleryDeck" || aDeckName == "NavigatorDeck" -|| aDeckName == "StyleListDeck") +if (aDeckName == "GalleryDeck" || aDeckName == "StyleListDeck") continue; } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 6ac5653db267..e082d651073e 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3335,6 +3335,17 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest ) rReq.Done(); return; } +if (nSID == SID_NAVIGATOR) +{ +if (comphelper::LibreOfficeKit::isActive()) +{ +ShowChildWindow(SID_SIDEBAR); +OUString panelId = "SdNavigatorPanel"; +::sfx2::sidebar::Sidebar::TogglePanel(panelId, GetFrame().GetFrameInterface()); +rReq.Done(); +return; +} +} bool bHasChild = HasChildWindow(nSID); bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 0fd8f6e94293..807f1d14a580 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -292,7 +292,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile) { if (// scalc rUIFile == u"modules/scalc/ui/functionpanel.ui" -//|| rUIFile == u"modules/scalc/ui/navigatorpanel.ui" +|| rUIFile == u"modules/scalc/ui/navigatorpanel.ui" || rUIFile == u"modules/scalc/ui/sidebaralignment.ui" || rUIFile == u"modules/scalc/ui/sidebarcellappearance.ui" || rUIFile == u"modules/scalc/ui/sidebarnumberformat.ui" @@ -309,7 +309,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile) || rUIFile == u"modules/simpress/ui/masterpagepanel.ui" || rUIFile == u"modules/simpress/ui/masterpagepanelall.ui" || rUIFile == u"modules/simpress/ui/masterpagepanelrecent.ui" -//|| rUIFile == u"modules/simpress/ui/navigatorpanel.ui" +|| rUIFile ==
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/view/ViewTabBar.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit a5fdacc5e4b6939d9c820a0a7b3a68bc2a0a59c1 Author: Miklos Vajna AuthorDate: Wed Mar 8 08:58:52 2023 +0100 Commit: Miklos Vajna CommitDate: Thu Mar 16 08:59:30 2023 + sd: fix crash in ViewTabBar::dispose() Crashreport signature: program/libsdlo.so sd::ViewTabBar::disposing() sd/source/ui/view/ViewTabBar.cxx:113 (discriminator 1) program/libuno_cppuhelpergcc3.so.3 cppu::WeakComponentImplHelperBase::dispose() cppuhelper/source/implbase.cxx:104 program/libuno_cppuhelpergcc3.so.3 cppu::WeakComponentImplHelperBase::release() cppuhelper/source/implbase.cxx:84 program/libsdlo.so sd::ViewTabBar::ViewTabBar(com::sun::star::uno::Reference const&, com::sun::star::uno::Reference const&) [clone .cold] include/cppuhelper/compbase.hxx:65 program/libsdlo.so sd::framework::BasicToolBarFactory::createResource(com::sun::star::uno::Reference const&) sd/source/ui/framework/factories/BasicToolBarFactory.cxx:129 (discriminator 2) I.e. the ViewTabBar got deleted by a smart pointer before its ctor finished, guard against this. (cherry picked from commit a224948ef44eadfb32aee002d5f0e9f10c9e47de) Change-Id: I3d6ccc21167355047e3752316c8d0b9b02470f57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148947 Tested-by: Miklos Vajna Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 588b55eaee8b..e30796d5b7b2 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -66,6 +66,9 @@ ViewTabBar::ViewTabBar ( mpViewShellBase(nullptr), mnNoteBookWidthPadding(0) { +// Do this manually instead of via uno::Reference, so we don't delete ourselves. +osl_atomic_increment(_refCount); + // Tunnel through the controller and use the ViewShellBase to obtain the // view frame. try @@ -100,6 +103,8 @@ ViewTabBar::ViewTabBar ( { mpViewShellBase->SetViewTabBar(this); } + +osl_atomic_decrement(_refCount); } ViewTabBar::~ViewTabBar()
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sd/source
sd/source/ui/app/sddll.cxx | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) New commits: commit 55e82ed855c18e5e6a830e3a80160c6a8e0c8a6a Author: Henry Castro AuthorDate: Wed Feb 15 11:25:19 2023 -0400 Commit: Andras Timar CommitDate: Sun Mar 12 20:11:32 2023 + sd: lok: only register supported views The Presentation ViewShells: SlideSorter, Outline, Presentation They are not supported in tiled rendering case, so switch to default view. Signed-off-by: Henry Castro Change-Id: I33b255e0ca530734af6490d14fe48a2512272afc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147095 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index c195869b790e..b4734310a39b 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -91,12 +91,24 @@ void SdDLL::RegisterFactorys() { ::sd::ImpressViewShellBase::RegisterFactory ( ::sd::IMPRESS_FACTORY_ID); -::sd::SlideSorterViewShellBase::RegisterFactory ( -::sd::SLIDE_SORTER_FACTORY_ID); -::sd::OutlineViewShellBase::RegisterFactory ( -::sd::OUTLINE_FACTORY_ID); -::sd::PresentationViewShellBase::RegisterFactory ( -::sd::PRESENTATION_FACTORY_ID); +if (comphelper::LibreOfficeKit::isActive()) +{ +::sd::ImpressViewShellBase::RegisterFactory ( +::sd::SLIDE_SORTER_FACTORY_ID); +::sd::ImpressViewShellBase::RegisterFactory ( +::sd::OUTLINE_FACTORY_ID); +::sd::ImpressViewShellBase::RegisterFactory ( +::sd::PRESENTATION_FACTORY_ID); +} +else +{ +::sd::SlideSorterViewShellBase::RegisterFactory ( +::sd::SLIDE_SORTER_FACTORY_ID); +::sd::OutlineViewShellBase::RegisterFactory ( +::sd::OUTLINE_FACTORY_ID); +::sd::PresentationViewShellBase::RegisterFactory ( +::sd::PRESENTATION_FACTORY_ID); +} } if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw()) {