[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/doc/iframe.cxx | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) New commits: commit 789155b523b384df020d86228ac200a63a68b154 Author: Caolán McNamara AuthorDate: Tue Apr 11 10:13:37 2023 +0100 Commit: Caolán McNamara CommitDate: Wed May 24 17:28:58 2023 +0200 set Referer on loading IFrames so tools, options, security, options, "block any links from document not..." applies to their contents. Change-Id: I04839aea6b07a4a76ac147a85045939ccd9c3c79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150221 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150751 Reviewed-by: Stephan Bergmann (cherry picked from commit acff9ca0579333b45d10ae5f8cd48172f563) (cherry picked from commit 04c8176fb40d2eb983aa0bd0a6ce65804d3f6ecd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152094 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index aea851894286..5a0ea96a234d 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -32,12 +32,14 @@ #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -166,14 +168,19 @@ sal_Bool SAL_CALL IFrameObject::load( uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) ); xTrans->parseStrict( aTargetURL ); +uno::Reference xParentFrame = xFrame->getCreator(); +SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); + if (INetURLObject(aTargetURL.Complete).GetProtocol() == INetProtocol::Macro) { -uno::Reference xParentFrame = xFrame->getCreator(); -SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); if (pDoc && !pDoc->AdjustMacroMode()) return false; } +OUString sReferer; +if (pDoc && pDoc->HasName()) +sReferer = pDoc->GetMedium()->GetName(); + DBG_ASSERT( !mxFrame.is(), "Frame already existing!" ); VclPtr pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); VclPtr pWin = VclPtr::Create( pParent, maFrmDescr.IsFrameBorderOn() ); @@ -196,11 +203,11 @@ sal_Bool SAL_CALL IFrameObject::load( if ( xFramesSupplier.is() ) mxFrame->setCreator( xFramesSupplier ); -uno::Sequence < beans::PropertyValue > aProps(2); -aProps[0].Name = "PluginMode"; -aProps[0].Value <<= sal_Int16(2); -aProps[1].Name = "ReadOnly"; -aProps[1].Value <<= true; +uno::Sequence < beans::PropertyValue > aProps{ +comphelper::makePropertyValue("PluginMode", sal_Int16(2)), +comphelper::makePropertyValue("ReadOnly", true), +comphelper::makePropertyValue("Referer", sReferer) +}; uno::Reference < frame::XDispatch > xDisp = mxFrame->queryDispatch( aTargetURL, "_self", 0 ); if ( xDisp.is() ) xDisp->dispatch( aTargetURL, aProps );
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source sw/source
sfx2/source/appl/macroloader.cxx |9 +++-- sfx2/source/doc/iframe.cxx | 20 +++- sfx2/source/inc/macroloader.hxx|2 ++ sw/source/filter/html/htmlplug.cxx |7 ++- sw/source/filter/xml/xmltexti.cxx |9 +++-- 5 files changed, 37 insertions(+), 10 deletions(-) New commits: commit 2bb39d95caf3e119d908abc176f52864d7dc7c3e Author: Caolán McNamara AuthorDate: Tue Aug 30 17:01:08 2022 +0100 Commit: Andras Timar CommitDate: Wed Sep 7 14:41:29 2022 +0200 check IFrame "FrameURL" target similiar to commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627 Date: Wed Aug 7 17:37:11 2019 +0100 warn on load when a document binds an event to a macro Conflicts: sfx2/source/doc/iframe.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/xml/xmltexti.cxx Change-Id: Iea888b1c083d2dc69ec322309ac9ae8c5e5eb315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139059 Tested-by: Jenkins Reviewed-by: Stephan Bergmann Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139246 Tested-by: Thorsten Behrens Reviewed-by: Thorsten Behrens (cherry picked from commit 6ae9c760e7e05e104adf84944b711e99e15bee7e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139508 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 98e036e0a7ea..b50d1e63c789 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -76,10 +76,10 @@ css::uno::Sequence SAL_CALL SfxMacroLoader::getSupportedServiceNames() return aSeq; } -SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl() +SfxObjectShell* SfxMacroLoader::GetObjectShell(const Reference & xFrame) { SfxObjectShell* pDocShell = nullptr; -Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY ); + if ( xFrame.is() ) { SfxFrame* pFrame=nullptr; @@ -96,6 +96,11 @@ SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl() return pDocShell; } +SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl() +{ +Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY ); +return SfxMacroLoader::GetObjectShell(xFrame); +} uno::Reference SAL_CALL SfxMacroLoader::queryDispatch( const util::URL& aURL, diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 8b1271545dfb..aea851894286 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -39,11 +39,13 @@ #include #include #include +#include #include #include #include #include #include +#include using namespace ::com::sun::star; @@ -159,6 +161,19 @@ sal_Bool SAL_CALL IFrameObject::load( { if ( SvtMiscOptions().IsPluginsEnabled() ) { +util::URL aTargetURL; +aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ); +uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) ); +xTrans->parseStrict( aTargetURL ); + +if (INetURLObject(aTargetURL.Complete).GetProtocol() == INetProtocol::Macro) +{ +uno::Reference xParentFrame = xFrame->getCreator(); +SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); +if (pDoc && !pDoc->AdjustMacroMode()) +return false; +} + DBG_ASSERT( !mxFrame.is(), "Frame already existing!" ); VclPtr pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); VclPtr pWin = VclPtr::Create( pParent, maFrmDescr.IsFrameBorderOn() ); @@ -181,11 +196,6 @@ sal_Bool SAL_CALL IFrameObject::load( if ( xFramesSupplier.is() ) mxFrame->setCreator( xFramesSupplier ); -util::URL aTargetURL; -aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ); -uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) ); -xTrans->parseStrict( aTargetURL ); - uno::Sequence < beans::PropertyValue > aProps(2); aProps[0].Name = "PluginMode"; aProps[0].Value <<= sal_Int16(2); diff --git a/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx index 9e1dfba18ed0..b3e7a5ec1abc 100644 --- a/sfx2/source/inc/macroloader.hxx +++ b/sfx2/source/inc/macroloader.hxx @@ -82,6 +82,8 @@ public: virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override; virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override; + +static SfxObjectShell* GetObjectShell(const css::uno::Reference& xFrame); }; #endif diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filt
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/doc/objstor.cxx | 31 --- 1 file changed, 31 deletions(-) New commits: commit 0293f34b57b5de76d52b69899653a84d80786eda Author: Aron Budea AuthorDate: Tue May 31 14:25:24 2022 +0200 Commit: Aron Budea CommitDate: Tue May 31 14:26:08 2022 +0200 Revert "sw: restore UI language to en while saving" This reverts commit 01a9f402db5840801e0eb004112bf19d5225f32c. Reason: T35383 Writer: Page breaks saved in German UI/locale turn into line breaks Change-Id: I95d23aeb26fe0177e24db81f3dc55fb6ef30cd0f diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index e456f5ea951a..8d101e8aac04 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -105,7 +105,6 @@ #include #include #include -#include #include #include @@ -3159,11 +3158,6 @@ bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium ) return false; } -namespace -{ -static LanguageTag g_defaultLanguageTag("en-US", true); -} - bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) { uno::Reference< embed::XStorage > xStorage = rMedium.GetStorage(); @@ -3186,31 +3180,6 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) pImpl->aBasicManager.storeLibrariesToStorage( xStorage ); } #endif - -// Because XMLTextFieldExport::ExportFieldDeclarations (called from SwXMLExport) -// calls SwXTextFieldMasters::getByName, which in turn maps property names by -// calling SwStyleNameMapper::GetTextUINameArray, which uses -// SvtSysLocale().GetUILanguageTag() to do the mapping, saving indirectly depends -// on the UI language. This is an unfortunate depenency. -// Here we restore to English -const auto viewLanguage = comphelper::LibreOfficeKit::getLanguageTag(); - -// Use the default language for saving and restore later if necessary. -bool restoreLanguage = false; -if (comphelper::LibreOfficeKit::isActive() && viewLanguage != g_defaultLanguageTag) -{ -restoreLanguage = true; -comphelper::LibreOfficeKit::setLanguageTag(g_defaultLanguageTag); -} - -// Restore the view's original language automatically and as necessary. -const ::comphelper::ScopeGuard aGuard( -[&viewLanguage, restoreLanguage]() -{ -if (restoreLanguage && viewLanguage != comphelper::LibreOfficeKit::getLanguageTag()) -comphelper::LibreOfficeKit::setLanguageTag(viewLanguage); -}); - return SaveAs( rMedium ); } else return false;
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/doc/objstor.cxx | 31 +++ 1 file changed, 31 insertions(+) New commits: commit 01a9f402db5840801e0eb004112bf19d5225f32c Author: Ashod Nakashian AuthorDate: Sun May 1 16:52:30 2022 -0400 Commit: Michael Meeks CommitDate: Mon May 2 20:02:03 2022 +0200 sw: restore UI language to en while saving Because the XML writer used in sw invokes the translation logic, which uses the UI language, saving can fail in case there are multiple views with different langauges. This restores the default language before saving to avoid such issues and to make sure the document xml is generated in the default language. Signed-off-by: Ashod Nakashian Change-Id: Ibc0813de33cf7cf3528b0ff1d95560e799903fb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133676 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks (cherry picked from commit f4ef1e3e580f7a590496d62aaa3dc7e092510a9c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133611 diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 8d101e8aac04..e456f5ea951a 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -105,6 +105,7 @@ #include #include #include +#include #include #include @@ -3158,6 +3159,11 @@ bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium ) return false; } +namespace +{ +static LanguageTag g_defaultLanguageTag("en-US", true); +} + bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) { uno::Reference< embed::XStorage > xStorage = rMedium.GetStorage(); @@ -3180,6 +3186,31 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) pImpl->aBasicManager.storeLibrariesToStorage( xStorage ); } #endif + +// Because XMLTextFieldExport::ExportFieldDeclarations (called from SwXMLExport) +// calls SwXTextFieldMasters::getByName, which in turn maps property names by +// calling SwStyleNameMapper::GetTextUINameArray, which uses +// SvtSysLocale().GetUILanguageTag() to do the mapping, saving indirectly depends +// on the UI language. This is an unfortunate depenency. +// Here we restore to English +const auto viewLanguage = comphelper::LibreOfficeKit::getLanguageTag(); + +// Use the default language for saving and restore later if necessary. +bool restoreLanguage = false; +if (comphelper::LibreOfficeKit::isActive() && viewLanguage != g_defaultLanguageTag) +{ +restoreLanguage = true; +comphelper::LibreOfficeKit::setLanguageTag(g_defaultLanguageTag); +} + +// Restore the view's original language automatically and as necessary. +const ::comphelper::ScopeGuard aGuard( +[&viewLanguage, restoreLanguage]() +{ +if (restoreLanguage && viewLanguage != comphelper::LibreOfficeKit::getLanguageTag()) +comphelper::LibreOfficeKit::setLanguageTag(viewLanguage); +}); + return SaveAs( rMedium ); } else return false;
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source vcl/source
sfx2/source/view/lokhelper.cxx | 13 - vcl/source/window/window2.cxx |2 +- 2 files changed, 9 insertions(+), 6 deletions(-) New commits: commit 2ac23d25f0670c3274603deb88aef352def635a1 Author: Michael Meeks AuthorDate: Mon Jan 3 14:15:49 2022 + Commit: Michael Meeks CommitDate: Tue Jan 4 17:08:27 2022 +0100 lokit: double check for disposed windows & fix leak. it seems we can get windows disposed before we get to the emission. vcl::Window::IsTracking() const vcl/source/window/window2.cxx:341 (anonymous namespace)::LOKPostAsyncEvent(void*, void*) sfx2/source/view/lokhelper.cxx:725 LokChartHelper::postMouseEvent(int, int, int, int, int, int, double, double) include/rtl/ref.hxx:112 SwXTextDocument::postMouseEvent(int, int, int, int, int, int) sw/source/uibase/uno/unotxdoc.cxx:3561 Change-Id: I93aea931dad1e7f43d3d610568424c53d2b22fbc Signed-off-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127939 diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 1641811af86d..bbfbc58f835f 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -627,7 +627,7 @@ namespace void LOKPostAsyncEvent(void* pEv, void*) { -LOKAsyncEventData* pLOKEv = static_cast(pEv); +std::unique_ptr pLOKEv(static_cast(pEv)); if (pLOKEv->mpWindow->IsDisposed()) return; @@ -648,6 +648,9 @@ namespace if (!pFocusWindow) pFocusWindow = pLOKEv->mpWindow; +if (pLOKEv->mpWindow->IsDisposed()) +return; + switch (pLOKEv->mnEvent) { case VclEventId::WindowKeyInput: @@ -656,11 +659,13 @@ namespace KeyEvent singlePress(pLOKEv->maKeyEvent.GetCharCode(), pLOKEv->maKeyEvent.GetKeyCode()); for (sal_uInt16 i = 0; i <= nRepeat; ++i) -pFocusWindow->KeyInput(singlePress); +if (!pFocusWindow->IsDisposed()) +pFocusWindow->KeyInput(singlePress); break; } case VclEventId::WindowKeyUp: -pFocusWindow->KeyUp(pLOKEv->maKeyEvent); +if (!pFocusWindow->IsDisposed()) +pFocusWindow->KeyUp(pLOKEv->maKeyEvent); break; case VclEventId::WindowMouseButtonDown: pLOKEv->mpWindow->LogicMouseButtonDown(pLOKEv->maMouseEvent); @@ -691,8 +696,6 @@ namespace assert(false); break; } - -delete pLOKEv; } void postEventAsync(LOKAsyncEventData *pEvent) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 88bf838cf846..8282396af932 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -312,7 +312,7 @@ void Window::EndTracking( TrackingEventFlags nFlags ) bool Window::IsTracking() const { -return (ImplGetSVData()->mpWinData->mpTrackWin == this); +return mpWindowImpl && (ImplGetSVData()->mpWinData->mpTrackWin == this); } void Window::StartAutoScroll( StartAutoScrollFlags nFlags )
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/appl/appserv.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 5f67ef053f7543d20d80669a4b3eba15f44fbeb4 Author: Szymon Kłos AuthorDate: Mon Jul 26 11:59:39 2021 +0200 Commit: Szymon Kłos CommitDate: Thu Oct 21 19:22:05 2021 +0200 online: keep sidebar opened when we switch mode in online keep sidebar in opened state. For example when switching from notebookbar to classic mode - sidebar is set to "Tabs" what makes sidebar hidden in online. The same happened when crash occured. Change-Id: I5d0d1dba4c89b5e380a0bf717fabf4337016894c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119496 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos (cherry picked from commit 2d9c05d615c2bf8dc494f4eec1213d27c74d24ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123975 diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 47fb7a5f92c7..4f9af60cb981 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -955,6 +955,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) // Sidebar pViewFrame->ShowChildWindow( SID_SIDEBAR ); +if (comphelper::LibreOfficeKit::isActive()) +aSidebarMode = "Opened"; + sfx2::sidebar::SidebarController* pSidebar = sfx2::sidebar::SidebarController::GetSidebarControllerForFrame( xFrame ); if ( pSidebar )
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit ecc4ed4086ba37eb1b9649ef9a15427cf6df361f Author: Szymon Kłos AuthorDate: Mon Jul 12 12:24:09 2021 +0200 Commit: Pranam Lashkari CommitDate: Fri Jul 16 11:57:46 2021 +0200 Revert "Notebookbar: skip early init in all apps" This reverts commit 6af0a488a059982a8b5d72fe399c7e8841a2e9b4. Delayed notebookbar init in Calc causes "number format" combobox to not work. (it works after some number is typed into document only). Original problem fixed by reverted change doesn't exist anymore because new shortcuts for paste special and paste unformatted text were introduced Change-Id: Ie112ae0df7b6d3782916b98c96f1a17b15396115 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118771 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 0fdb739cd3f0..cc06c280f71a 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -382,7 +382,8 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, // * in LOK: Paste Special feature was incorrectly initialized // Skip first request so Notebookbar will be initialized after document was loaded static std::map bSkippedFirstInit; -if (comphelper::LibreOfficeKit::isActive() && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end()) +if (comphelper::LibreOfficeKit::isActive() && eApp == vcl::EnumContext::Application::Writer +&& bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end()) { bSkippedFirstInit[pViewShell] = true; return 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.4' - sfx2/source
sfx2/source/view/viewsh.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit e3bbc3c712c9e7eab603fcea0882b154f9b3dfc6 Author: Miklos Vajna AuthorDate: Thu Jul 8 11:49:13 2021 +0200 Commit: Miklos Vajna CommitDate: Fri Jul 9 10:15:28 2021 +0200 sfx2: fix uninitialized SfxViewShell::mbLOKIsFreemiumView Introduced in commit 1b9fe58acb7b5bbbc83ecca30e17663fff7f0db4 (LOK: introduced Freemium LOK API, 2021-06-02). Change-Id: Ifdd6c13a64a167fa00b0305441c52340167f3809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118632 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari (cherry picked from commit d6811bd47a255d40aeb4509c7011fa7d9e75e3f3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118639 Reviewed-by: Miklos Vajna diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index d7790fcdb6f5..2b97061fa8da 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1087,6 +1087,7 @@ SfxViewShell::SfxViewShell , maLOKLanguageTag(LANGUAGE_NONE) , maLOKLocale(LANGUAGE_NONE) , maLOKDeviceFormFactor(LOKDeviceFormFactor::UNKNOWN) +, mbLOKIsFreemiumView(false) { SetMargin( pViewFrame->GetMargin_Impl() ); ___ 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.4' - sfx2/source
sfx2/source/control/unoctitm.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 8bac13f3295f5403a6ea26bba6437d707d1bdbbc Author: Gabriel Masei AuthorDate: Wed Apr 7 12:46:27 2021 +0300 Commit: Szymon Kłos CommitDate: Mon Apr 12 09:42:23 2021 +0200 lok: intercept indentation and decimals state change events This solves some toolbar buttons enabling issues in online when dynamically changing UI mode to classic. Change-Id: I3301b92c35effce905f1283ae645d8ad2b168ece Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113723 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit 8859e62d7dfaa71c35f80b5eff99b0788b49c9fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113766 Reviewed-by: Gabriel Masei Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index dc1e80cbf1b4..694959d327e6 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1169,7 +1169,11 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "Substract" || aEvent.FeatureURL.Path == "DistributeSelection" || aEvent.FeatureURL.Path == "Intersect" || - aEvent.FeatureURL.Path == "ResetAttributes") + aEvent.FeatureURL.Path == "ResetAttributes" || + aEvent.FeatureURL.Path == "IncrementIndent" || + aEvent.FeatureURL.Path == "DecrementIndent" || + aEvent.FeatureURL.Path == "NumberFormatDecDecimals" || + aEvent.FeatureURL.Path == "NumberFormatIncDecimals") { aBuffer.append(aEvent.IsEnabled ? OUStringLiteral("enabled") : OUStringLiteral("disabled")); } ___ 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.4' - sfx2/source
sfx2/source/sidebar/SidebarController.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit d0c90bb1124a4a9f8335bcf8d02cd01ad13c8356 Author: Henry Castro AuthorDate: Mon Mar 29 09:18:07 2021 -0400 Commit: Jan Holesovsky CommitDate: Wed Mar 31 10:23:56 2021 +0200 lok: fix nullptr de-reference Change-Id: I8a9a7444d66e5e6449a0215bde174253a41f09b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113317 Tested-by: Jenkins Reviewed-by: Henry Castro (cherry picked from commit 949085b12a8a57b2257f4e59cc597e4c59b42f76) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113285 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index c132b9e506d0..d8975e1744dd 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -248,7 +248,8 @@ void SidebarController::disposeDecks() (hide + "=false").c_str()); } -mpParentWindow->ReleaseLOKNotifier(); +if (mpParentWindow) +mpParentWindow->ReleaseLOKNotifier(); } mpCurrentDeck.clear(); ___ 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.4' - sfx2/source
sfx2/source/view/ipclient.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit f3ede41837dfaafe3ca9c4aa2e84c31b79aafe8f Author: Szymon Kłos AuthorDate: Wed Mar 24 11:45:51 2021 +0100 Commit: Jan Holesovsky CommitDate: Mon Mar 29 14:16:34 2021 +0200 SfxInPlaceClient: avoid crash when chart deleted by other view Be sure m_pClient still is valid. In case when one view was in the chart editing mode and other view deleted the slide, m_pClient was cleared in the meantime what caused a crash Change-Id: Ie433946799abef4c75af7b96f3e5cf9ba0e7ec47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113032 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index cefe1586ab9e..e178e5338eb7 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -313,7 +313,8 @@ void SAL_CALL SfxInPlaceClient_Impl::visibilityChanged( sal_Bool bVisible ) throw uno::RuntimeException(); m_pClient->GetViewShell()->OutplaceActivated( bVisible ); -m_pClient->Invalidate(); +if (m_pClient) // it can change in the above code +m_pClient->Invalidate(); } ___ 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.4' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 6af0a488a059982a8b5d72fe399c7e8841a2e9b4 Author: Pranam Lashkari AuthorDate: Tue Mar 23 15:41:49 2021 +0530 Commit: Szymon Kłos CommitDate: Tue Mar 23 13:34:31 2021 +0100 Notebookbar: skip early init in all apps for more details 42cc32c95db2484961a65c906af1a899c1a6aa2b Change-Id: I64f1ce22f7e1cbdbab3aea17841030a6313c1c0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112978 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index e854a5e047d7..36346b22c21b 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -377,8 +377,7 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, // * in LOK: Paste Special feature was incorrectly initialized // Skip first request so Notebookbar will be initialized after document was loaded static std::map bSkippedFirstInit; -if (comphelper::LibreOfficeKit::isActive() && eApp == vcl::EnumContext::Application::Writer -&& bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end()) +if (comphelper::LibreOfficeKit::isActive() && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end()) { bSkippedFirstInit[pViewShell] = true; return 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.4' - sfx2/source
sfx2/source/appl/app.cxx | 21 + 1 file changed, 21 insertions(+) New commits: commit 5b81748d9ef6c57b45bfbd7e4c5790491a97c294 Author: Henry Castro AuthorDate: Tue Mar 2 19:35:01 2021 -0400 Commit: Jan Holesovsky CommitDate: Mon Mar 8 16:50:55 2021 +0100 lok: show error message dialog for VBA macros It creates and exclusive message dialog to show the VBA errors to client side. Otherwise the IDE window to show the source code and the error message is not supported yet. Change-Id: Ie74f911b109cb13aebd39de2cb8e899d779c1cf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111854 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 14885d95710d..d2e437b758b6 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -433,7 +433,28 @@ IMPL_STATIC_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBas return false; #else +if (comphelper::LibreOfficeKit::isActive()) +{ +OUString aError; +std::unique_ptr pErrorInfo = ErrorInfo::GetErrorInfo(StarBASIC::GetErrorCode()); +if (ErrorStringFactory::CreateString(pErrorInfo.get(), aError)) +{ +const SfxViewFrame* pViewFrame = SfxViewFrame::Current(); +std::shared_ptr xBox( +Application::CreateMessageDialog( +pViewFrame->GetWindow().GetFrameWeld(), +VclMessageType::Error, +VclButtonsType::Ok, +aError, +true)); + +xBox->runAsync(xBox, [](sal_Int32 /*nResult*/) {}); +} +return true; +} + #ifndef DISABLE_DYNLOADING + // load basctl module osl::Module aMod; aMod.loadRelative(&thisModule, SVLIBRARY("basctl")); ___ 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.4' - sfx2/source
sfx2/source/sidebar/SidebarPanelBase.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 1299ca78262c0c2eac1ceeb518af6f7bd0f9b8dd Author: Szymon Kłos AuthorDate: Fri Feb 12 17:18:51 2021 +0100 Commit: Jan Holesovsky CommitDate: Thu Mar 4 10:56:56 2021 +0100 sidebar: use real height to determine preffered size There was a bug causing to crop the sidebar in online: 1. open odt file in 2 sessions 2. select image in session A 3. move mouse over sidebar in session B 4. move mouse over sidebar in session A Result: sidebar A was cropped PosSizePropertyPanel on context change did some windows visibility changes in the meantime. get_preffered_size() returned lower height than real value in SidebarPanelBase::getHeightForWidth call queue_resize to invalidate cached optimal size Change-Id: I8080259ffb12ae3f6613e7749e908d6ef55c1f3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110894 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx index 0906dc962d57..13287fe3a6f2 100644 --- a/sfx2/source/sidebar/SidebarPanelBase.cxx +++ b/sfx2/source/sidebar/SidebarPanelBase.cxx @@ -161,6 +161,7 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi if (isLayoutEnabled(mpControl)) { // widget layout-based sidebar +mpControl->queue_resize(); Size aSize(mpControl->get_preferred_size()); return ui::LayoutSize(aSize.Height(), aSize.Height(), aSize.Height()); } ___ 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.4' - sfx2/source
sfx2/source/view/lokhelper.cxx | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) New commits: commit d4aaf8f699233d4e63a9293d0ac7ffbe2cface14 Author: mert AuthorDate: Mon Feb 22 11:17:27 2021 +0300 Commit: Mert Tumer CommitDate: Wed Feb 24 08:39:37 2021 +0100 Fix non-valid json generation on NotifyOtherViews Change-Id: I82aa0aefcd1de14b4c1bb2bbe3f087b60d691beb Signed-off-by: mert Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111299 Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 3c1ecd207159..9208c6e35476 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -303,7 +303,11 @@ void SfxLokHelper::setDeviceFormFactor(const OUString& rDeviceFormFactor) g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN; } -static OString lcl_escapeQuotes(const OString &rStr) +/* +* Used for putting a whole JSON string into a string value +* e.g { key: "{JSON}" } +*/ +static OString lcl_sanitizeJSONAsValue(const OString &rStr) { if (rStr.getLength() < 1) return rStr; @@ -313,7 +317,9 @@ static OString lcl_escapeQuotes(const OString &rStr) { if (rStr[i] == '"' || rStr[i] == '\\') aBuf.append('\\'); -aBuf.append(rStr[i]); + +if (rStr[i] != '\n') +aBuf.append(rStr[i]); } return aBuf.makeStringAndClear(); } @@ -336,7 +342,7 @@ static inline OString lcl_generateJSON(const SfxViewShell* pView, const OString& assert(pView != nullptr && "pView must be valid"); return OStringLiteral("{ \"viewId\": \"") + OString::number(SfxLokHelper::getView(pView)) + "\", \"part\": \"" + OString::number(pView->getPart()) + "\", \"" + rKey + "\": \"" - + lcl_escapeQuotes(rPayload) + "\" }"; + + lcl_sanitizeJSONAsValue(rPayload) + "\" }"; } void SfxLokHelper::notifyOtherView(const SfxViewShell* pThisView, SfxViewShell const* pOtherView, ___ 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.4' - sfx2/source
sfx2/source/appl/sfxhelp.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 391f6cbf804f0a2bbd5e22cd3626d7af9a2e8cfa Author: Szymon Kłos AuthorDate: Mon Feb 8 19:01:00 2021 +0100 Commit: Henry Castro CommitDate: Tue Feb 9 14:30:35 2021 +0100 lok: send help even when document not ready Change-Id: I44855ef00a6c54a774965b3c951a4476ed5c8b01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110593 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 3df45642a5df..67e268e27103 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -722,6 +722,13 @@ static bool impl_showOnlineHelp( const OUString& rURL ) aHelpLink.toUtf8().getStr()); return true; } +else if (GetpApp()) +{ + GetpApp()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, + aHelpLink.toUtf8().getStr()); +return true; +} + return 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.4' - sfx2/source
sfx2/source/view/lokhelper.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 4fab953fe24943152cfdbbc88b0d904be73c8514 Author: Michael Meeks AuthorDate: Sun Jan 24 04:10:41 2021 + Commit: Michael Meeks CommitDate: Thu Jan 28 15:38:13 2021 +0100 lok: avoid a set of invalidations per view on re-size. Unfortunate to have N^2 invalidations in the number of views on resize - particularly for calc, when you re-size/wrap-text on a row during editing. Change-Id: I93f75c4543ad072684e5575a2cbe0e8abcab0d80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109913 Reviewed-by: Jan Holesovsky Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 4928dd3102e9..3c1ecd207159 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -530,7 +530,10 @@ void SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc // Should we then do this for all views of all open documents // or not? if (pCurrentViewShell == nullptr || pViewShell->GetDocId() == pCurrentViewShell-> GetDocId()) +{ SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, bInvalidateAll); +bInvalidateAll = false; // we direct invalidations to all views anyway. +} pViewShell = SfxViewShell::GetNext(*pViewShell); } } ___ 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.4' - sfx2/source
sfx2/source/appl/appserv.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bfe856e7cb191888b723e6bb115242dc6d73d334 Author: Andras Timar AuthorDate: Thu Jan 21 21:27:38 2021 +0100 Commit: Andras Timar CommitDate: Thu Jan 21 21:29:04 2021 +0100 Use the he...@collaboraoffice.com for user feedback Change-Id: I8a779b98e60a9037188674a0ad6fd60aa8ea32ee diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 07f56777b5af..47fb7a5f92c7 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -562,7 +562,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SEND_FEEDBACK: { OUString module = SfxHelp::GetCurrentModuleIdentifier(); -OUString sURL("mailto:supp...@collaboraoffice.com?Subject=Version:%20"; + utl::ConfigManager::getAboutBoxProductVersion() + +OUString sURL("mailto:he...@collaboraoffice.com?Subject=Version:%20"; + utl::ConfigManager::getAboutBoxProductVersion() + ",%20Locale:%20" + utl::ConfigManager::getUILocale() + ",%20Module:%20" + module.copy(module.lastIndexOf('.') + 1 ) ); sfx2::openUriExternally(sURL, false); 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.4' - sfx2/source
sfx2/source/sidebar/DeckLayouter.cxx |7 ++- sfx2/source/sidebar/SidebarController.cxx |6 +- sfx2/source/sidebar/TabBar.cxx|5 + 3 files changed, 16 insertions(+), 2 deletions(-) New commits: commit e8b98ef6c2b4e8cbcb83309fdcafb1cb8289dfa6 Author: Michael Meeks AuthorDate: Sat Jan 16 17:56:34 2021 + Commit: Andras Timar CommitDate: Mon Jan 18 15:53:31 2021 +0100 sidebar: avoid invalidation thrash with LOK. Avoids complete sidebar invalidate when entering text into a cell and hitting enter. Change-Id: I88ee3792589a1c0a16ae555da77ed7c12ca5f296 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109455 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index bc1bf6e93986..71d732f48cbc 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -613,7 +613,12 @@ void UpdateFiller ( vcl::Window& rFiller, const tools::Rectangle& rBox) { -if (rBox.GetHeight() > 0) +if (comphelper::LibreOfficeKit::isActive()) +{ +// Not shown on LOK, and causes invalidation thrash +rFiller.Hide(); +} +else if (rBox.GetHeight() > 0) { // Show the filler. rFiller.SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index d6c1103850e2..bb1592627c94 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -797,7 +797,11 @@ void SidebarController::SwitchToDeck ( msCurrentDeckId = rDeckDescriptor.msId; } -mpTabBar->Invalidate(); + +// invisible with LOK, so avoid invalidations +if (!comphelper::LibreOfficeKit::isActive()) +mpTabBar->Invalidate(); + mpTabBar->HighlightDeck(msCurrentDeckId); // Determine the panels to display in the deck. diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 96b00f54939e..3dd2af4b7874 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -30,6 +30,7 @@ #include +#include #include #include #include @@ -108,6 +109,10 @@ sal_Int32 TabBar::GetDefaultWidth() void TabBar::SetDecks(const ResourceManager::DeckContextDescriptorContainer& rDecks) { +// invisible with LOK, so keep empty to avoid invalidations +if (comphelper::LibreOfficeKit::isActive()) +return; + // Remove the current buttons. { for (auto & item : maItems) ___ 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.4' - sfx2/source
sfx2/source/sidebar/Deck.cxx |7 +-- sfx2/source/sidebar/TitleBar.cxx | 14 ++ 2 files changed, 15 insertions(+), 6 deletions(-) New commits: commit 077eb097fd0b0429286c2a61eef923c56ad9685e Author: Michael Meeks AuthorDate: Sat Jan 16 17:56:06 2021 + Commit: Andras Timar CommitDate: Mon Jan 18 15:53:17 2021 +0100 sidebar: only invalidate when things change. Change-Id: Icc9c5bcde224cc979b834585531b847f1c5f7d0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109454 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index f25d5015fe8f..a2c092157008 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -444,8 +444,11 @@ void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, cons void Deck::ScrollContainerWindow::SetSeparators (const ::std::vector& rSeparators) { -maSeparators = rSeparators; -Invalidate(); +if (rSeparators != maSeparators) +{ +maSeparators = rSeparators; +Invalidate(); +} } } } // end of namespace sfx2::sidebar diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index 8f45bb751c0c..d8e0aef1a48c 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -61,14 +61,20 @@ void TitleBar::dispose() void TitleBar::SetTitle(const OUString& rsTitle) { -msTitle = rsTitle; -Invalidate(); +if (msTitle != rsTitle) +{ +msTitle = rsTitle; +Invalidate(); +} } void TitleBar::SetIcon(const Image& rIcon) { -maIcon = rIcon; -Invalidate(); +if (maIcon != rIcon) +{ +maIcon = rIcon; +Invalidate(); +} } void TitleBar::ApplySettings(vcl::RenderContext& rRenderContext) ___ 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.4' - sfx2/source
sfx2/source/control/unoctitm.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit f696a09bf97880c0d2850ae7b7c137c00c323da0 Author: Szymon Kłos AuthorDate: Wed Jan 6 17:19:50 2021 +0100 Commit: Andras Timar CommitDate: Wed Jan 6 19:45:05 2021 +0100 lok: send linespacing updates Change-Id: I2dd123b04a2d6a03eac92aca5db5a4413b386e7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108877 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 8ccf6c71ad11..dc1e80cbf1b4 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1019,7 +1019,10 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "FormatPaintbrush" || aEvent.FeatureURL.Path == "FreezePanes" || aEvent.FeatureURL.Path == "Sidebar" || -aEvent.FeatureURL.Path == "SheetRightToLeft") +aEvent.FeatureURL.Path == "SheetRightToLeft" || +aEvent.FeatureURL.Path == "SpacePara1" || +aEvent.FeatureURL.Path == "SpacePara15" || +aEvent.FeatureURL.Path == "SpacePara2") { bool bTemp = false; aEvent.State >>= bTemp; ___ 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.4' - sfx2/source
sfx2/source/control/unoctitm.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0b1fb051d1bcbfc9f08f288193cff8b039558afd Author: Tamás Zolnai AuthorDate: Wed Dec 30 12:07:10 2020 +0100 Commit: Tamás Zolnai CommitDate: Wed Dec 30 14:41:03 2020 +0100 lok: send uno command state update to the right view. We get the correct view as a parameter(pViewFrame). Change-Id: I36e99a7660fee69c6c7cb10977763b1136eb6e22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108511 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index c31064988113..8ccf6c71ad11 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1324,7 +1324,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra else { // Try to send JSON state version -SfxLokHelper::sendUnoStatus(SfxViewShell::Current(), pState); +SfxLokHelper::sendUnoStatus(pViewFrame->GetViewShell(), pState); return; } ___ 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.4' - sfx2/source
sfx2/source/sidebar/SidebarDockingWindow.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit a6a3b9b665a874e98cedebbb2566d57285a40772 Author: Tamás Zolnai AuthorDate: Tue Dec 29 08:59:54 2020 +0100 Commit: Tamás Zolnai CommitDate: Tue Dec 29 12:25:37 2020 +0100 lok: send sidebar dialog update to the right view. SfxViewShell::Current() might point to wrong client, not the actual owner of the sidebar. Better to use the LOKNotifier which points to the correct view. Change-Id: I2a3f18eaf51e4bf9a9f811595ec4fc02ce86fa7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108444 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 8bb1f164c125..1ef2ed8fc107 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -63,8 +63,12 @@ public: try { -auto pMobileNotifier = SfxViewShell::Current(); -if (pMobileNotifier && pMobileNotifier->isLOKMobilePhone()) +auto pNotifier = m_rSidebarDockingWin.GetLOKNotifier(); +if (!pNotifier) +return; + +const SfxViewShell* pOwnerView = dynamic_cast(pNotifier); +if (pOwnerView && pOwnerView->isLOKMobilePhone()) { // Mobile. std::stringstream aStream; @@ -75,16 +79,12 @@ public: if (message != m_LastNotificationMessage) { m_LastNotificationMessage = message; - pMobileNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str()); + pOwnerView->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str()); } } // Notify the sidebar is created, and its LOKWindowId, which // is needed on mobile phones, tablets, and desktop. -auto pNotifier = m_rSidebarDockingWin.GetLOKNotifier(); -if (!pNotifier) -return; - const Point pos(m_rSidebarDockingWin.GetOutOffXPixel(), m_rSidebarDockingWin.GetOutOffYPixel()); const OString posMessage = pos.toString(); ___ 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.4' - sfx2/source
sfx2/source/sidebar/SidebarController.cxx | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit 49b7d99af0edc46793c9955061eaee78e7f7822f Author: Aron Budea AuthorDate: Wed Dec 9 18:39:54 2020 +0100 Commit: Andras Timar CommitDate: Fri Dec 18 12:04:22 2020 +0100 tdf#138762: crash when trying to open sidebar w chart in Writer In Writer when in chart edit mode, and the chart is deselected, the object selection remains. Opening Properties sidebar at this point crashed. Calc and Impress were unaffected. Regression from b5fdb148fe87a90f3e586efcea7aa6ef865fa42a Change-Id: I356c3a42c41dd38e4739df27c72c6d67722b1dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107500 Tested-by: Jenkins Reviewed-by: Aron Budea (cherry picked from commit 7e5991dc695d1e590483615c2907811ce4117834) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107544 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index ba61d0c23a11..d6c1103850e2 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -622,10 +622,13 @@ void SidebarController::OpenThenToggleDeck ( SwitchToDeck(rsDeckId); // Make sure the sidebar is wide enough to fit the requested content -sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth()) -* mpTabBar->GetDPIScaleFactor(); -if (mnSavedSidebarWidth < nRequestedWidth) -SetChildWindowWidth(nRequestedWidth); +if (mpCurrentDeck && mpTabBar) +{ +sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth()) +* mpTabBar->GetDPIScaleFactor(); +if (mnSavedSidebarWidth < nRequestedWidth) +SetChildWindowWidth(nRequestedWidth); +} collectUIInformation(rsDeckId); } ___ 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.4' - sfx2/source sw/qa sw/source
sfx2/source/view/viewsh.cxx | 14 - sw/qa/extras/tiledrendering/data/table-paint-invalidate.odt |binary sw/qa/extras/tiledrendering/tiledrendering.cxx | 33 sw/source/uibase/docvw/edtwin2.cxx | 11 4 files changed, 56 insertions(+), 2 deletions(-) New commits: commit 2d18f5e3fb0ea44b538db9ccea3c87a16693e6b2 Author: Miklos Vajna AuthorDate: Tue Nov 24 17:26:32 2020 +0100 Commit: Miklos Vajna CommitDate: Wed Nov 25 09:13:35 2020 +0100 sw tiled rendering: fix paint->invalidation loop when paint is started by vcl SwViewShell::PaintTile() already calls comphelper::LibreOfficeKit::setTiledPainting(), so by the time it would rearch SwViewShell::Paint(), callbacks (e.g. invalidations) are ignored during paint. Do the same for SwEditWin::Paint(), where we processed invalidations during paint, potentially leading to paint->invalidation loops. Conflicts: sw/qa/extras/tiledrendering/tiledrendering.cxx sw/source/uibase/docvw/edtwin2.cxx Change-Id: I8280f5c2571beeae6c0f2986d275dde3c2d33161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106543 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 14cbd2c10a08..d7790fcdb6f5 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1474,8 +1474,18 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) c if (!comphelper::LibreOfficeKit::isActive()) return; -if (comphelper::LibreOfficeKit::isTiledPainting() && nType != LOK_CALLBACK_FORM_FIELD_BUTTON) -return; +if (comphelper::LibreOfficeKit::isTiledPainting()) +{ +switch (nType) +{ +case LOK_CALLBACK_FORM_FIELD_BUTTON: +case LOK_CALLBACK_TEXT_SELECTION: +break; +default: +// Reject e.g. invalidate during paint. +return; +} +} if (pImpl->m_bTiledSearching) { diff --git a/sw/qa/extras/tiledrendering/data/table-paint-invalidate.odt b/sw/qa/extras/tiledrendering/data/table-paint-invalidate.odt new file mode 100644 index ..b42c5cc51588 Binary files /dev/null and b/sw/qa/extras/tiledrendering/data/table-paint-invalidate.odt differ diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 1f48de38d086..2f52c97efec1 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -131,6 +131,7 @@ public: void testDropDownFormFieldButtonNoSelection(); void testDropDownFormFieldButtonNoItem(); void testSpellOnlineRenderParameter(); +void testTablePaintInvalidate(); CPPUNIT_TEST_SUITE(SwTiledRenderingTest); CPPUNIT_TEST(testRegisterCallback); @@ -200,6 +201,7 @@ public: CPPUNIT_TEST(testDropDownFormFieldButtonNoSelection); CPPUNIT_TEST(testDropDownFormFieldButtonNoItem); CPPUNIT_TEST(testSpellOnlineRenderParameter); +CPPUNIT_TEST(testTablePaintInvalidate); CPPUNIT_TEST_SUITE_END(); private: @@ -2760,6 +2762,37 @@ void SwTiledRenderingTest::testSpellOnlineRenderParameter() CPPUNIT_ASSERT_EQUAL(!bSet, pOpt->IsOnlineSpell()); } +void SwTiledRenderingTest::testTablePaintInvalidate() +{ +// Load a document with a table in it. +SwXTextDocument* pXTextDocument = createDoc("table-paint-invalidate.odt"); +SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); + pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(&SwTiledRenderingTest::callback, this); +// Enter the table. +pWrtShell->Down(/*bSelect=*/false); +Scheduler::ProcessEventsToIdle(); +m_nInvalidations = 0; + +// Paint a tile. +size_t nCanvasWidth = 256; +size_t nCanvasHeight = 256; +std::vector aPixmap(nCanvasWidth * nCanvasHeight * 4, 0); +ScopedVclPtrInstance pDevice(DeviceFormat::DEFAULT); +pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); +pDevice->SetOutputSizePixelScaleOffsetAndBuffer(Size(nCanvasWidth, nCanvasHeight), +Fraction(1.0), Point(), aPixmap.data()); +pXTextDocument->paintTile(*pDevice, nCanvasWidth, nCanvasHeight, m_aInvalidation.getX(), + m_aInvalidation.getY(), /*nTileWidth=*/1000, + /*nTileHeight=*/1000); +Scheduler::ProcessEventsToIdle(); + +// Without the accompanying fix in place, this test would have failed with +// - Expected: 0 +// - Actual : 5 +// i.e. paint generated an invalidation, which caused a loop. +CPPUNIT_ASSERT_EQUAL(0, m_nInvalidations); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/uibase/d
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/doc/objserv.cxx | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) New commits: commit 61abda685e2bc1ec4b108614799b8bc1c01183ec Author: Szymon Kłos AuthorDate: Thu Nov 19 11:33:12 2020 +0100 Commit: Andras Timar CommitDate: Thu Nov 19 20:55:28 2020 +0100 lok: don't log warnings Change-Id: If0ecee7d01eb0efc8b1096a9097c7d0d7ef0fd27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106129 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 3ebb1feb5f70..b7e8abdc823e 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -458,20 +458,23 @@ uno::Reference SfxObjectShell::GetSignPDFCertificate() c static void sendErrorToLOK(ErrCode error) { -boost::property_tree::ptree aTree; -aTree.put("code", error); -aTree.put("kind", ""); -aTree.put("cmd", ""); +if (error.GetClass() != ErrCodeClass::NONE) +{ +boost::property_tree::ptree aTree; +aTree.put("code", error); +aTree.put("kind", ""); +aTree.put("cmd", ""); -std::unique_ptr pInfo = ErrorInfo::GetErrorInfo(error); -OUString aErr; -if (ErrorStringFactory::CreateString(pInfo.get(), aErr)) -aTree.put("message", aErr.toUtf8()); +std::unique_ptr pInfo = ErrorInfo::GetErrorInfo(error); +OUString aErr; +if (ErrorStringFactory::CreateString(pInfo.get(), aErr)) +aTree.put("message", aErr.toUtf8()); -std::stringstream aStream; -boost::property_tree::write_json(aStream, aTree); +std::stringstream aStream; +boost::property_tree::write_json(aStream, aTree); -SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, aStream.str().c_str()); + SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, aStream.str().c_str()); +} } void SfxObjectShell::ExecFile_Impl(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.4' - sfx2/source
sfx2/source/doc/docfile.cxx | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit f40016cd86a3af93d83e3baf0473fa010492f721 Author: Tor Lillqvist AuthorDate: Mon Nov 16 00:43:37 2020 + Commit: Tor Lillqvist CommitDate: Mon Nov 16 22:28:54 2020 +0100 Avoid unused parameter 'pImpl' Change-Id: I8dd30ed3a0e5340b32ce4399dd05cc57e2b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105962 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 81005e08790f..ae24bf153ea2 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -3639,10 +3639,12 @@ OUString GetLogicBase(std::unique_ptr const & pImpl) { OUString aLogicBase; -// In a sandboxed environment we don't want to attempt to create temporary files in the same -// directory where the user has selected an output file to be stored. The sandboxed process has -// permission only to create the specifically named output file in that directory. -#if !HAVE_FEATURE_MACOSX_SANDBOX +#if HAVE_FEATURE_MACOSX_SANDBOX +// In a sandboxed environment we don't want to attempt to create temporary files in the same +// directory where the user has selected an output file to be stored. The sandboxed process has +// permission only to create the specifically named output file in that directory. +(void) pImpl; +#else if (comphelper::isFileUrl(pImpl->m_aLogicName) && !pImpl->m_pInStream) { ___ 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.4' - sfx2/source
sfx2/source/appl/app.cxx |3 +-- sfx2/source/sidebar/ContextChangeBroadcaster.cxx |9 +++-- 2 files changed, 4 insertions(+), 8 deletions(-) New commits: commit 61ebfff3f5bdbd2ed8b1b62ee3ff246c22ba5a7b Author: Henry Castro AuthorDate: Fri Oct 9 07:01:17 2020 -0400 Commit: Andras Timar CommitDate: Sun Nov 8 22:24:26 2020 +0100 lok: sidebar: disable context deactivation In the Collabora Online, for every SfxViewFrame instance, it has a relationship with a user name, and it is not allowed to deactivate the sidebar of the other user. However, in the Desktop case, a user name has a relationship to many SfxViewFrame instances and it can deactivate the sidebar when a SfxViewFrame instance receives the input focus. Change-Id: If1936f1dc3779664970bd584e2b9d6f595c4b072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104115 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit 663de10f95bb72630658a5a06501e37d1810e0c7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105451 diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index d240b6acecec..14885d95710d 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -297,8 +297,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) if ( bTaskActivate ) NotifyEvent( SfxViewEventHint( SfxEventHintId::DeactivateDoc, GlobalEventConfig::GetEventName(GlobalEventId::DEACTIVATEDOC), pOldFrame->GetObjectShell(), pOldFrame->GetFrame().GetController() ) ); -if ( !comphelper::LibreOfficeKit::isDialogPainting() ) -pOldFrame->DoDeactivate( bTaskActivate, pFrame ); +pOldFrame->DoDeactivate( bTaskActivate, pFrame ); if( pOldFrame->GetProgress() ) pOldFrame->GetProgress()->Suspend(); diff --git a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx index aece2861fcf2..b5213abff335 100644 --- a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx +++ b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx @@ -55,13 +55,10 @@ void ContextChangeBroadcaster::Activate (const css::uno::Reference& rxFrame) { -if (msContextName.getLength() > 0) +if (msContextName.getLength() > 0 && !comphelper::LibreOfficeKit::isActive()) { -BroadcastContextChange( -rxFrame, -GetModuleName(rxFrame), -(comphelper::LibreOfficeKit::isActive() ? msContextName: - vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Default))); +BroadcastContextChange(rxFrame, GetModuleName(rxFrame), + vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Default)); } } ___ 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.4' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d711d4430e6c44ef362928f1c1d7179bc3db1471 Author: Szymon Kłos AuthorDate: Tue Nov 3 11:59:09 2020 +0100 Commit: Szymon Kłos CommitDate: Tue Nov 3 13:19:04 2020 +0100 notebookbar: don't block init in calc Change-Id: I7fdebcf317c8ebd3e322c1f73d9a4e7df30ecd27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105240 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index a50db24cc07b..e854a5e047d7 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -377,7 +377,7 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, // * in LOK: Paste Special feature was incorrectly initialized // Skip first request so Notebookbar will be initialized after document was loaded static std::map bSkippedFirstInit; -if (comphelper::LibreOfficeKit::isActive() +if (comphelper::LibreOfficeKit::isActive() && eApp == vcl::EnumContext::Application::Writer && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end()) { bSkippedFirstInit[pViewShell] = 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.4' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 68a4433598057e69c30263da94b3d3ca20a1481e Author: Szymon Kłos AuthorDate: Mon Oct 12 14:19:54 2020 +0200 Commit: Andras Timar CommitDate: Tue Oct 13 22:50:58 2020 +0200 notebookbar: set language before creating Change-Id: I04243667b564670096d2c8db0352ab179e1b0151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104212 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 10c60065641e..a50db24cc07b 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -397,6 +397,13 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, aNotebookBarAddonsItem.aImageValues = aImageValues; // setup if necessary +if (comphelper::LibreOfficeKit::isActive()) +{ +// update the current LOK language and locale for the dialog tunneling + comphelper::LibreOfficeKit::setLanguageTag(pViewShell->GetLOKLanguageTag()); + comphelper::LibreOfficeKit::setLocale(pViewShell->GetLOKLocale()); +} + pSysWindow->SetNotebookBar(aBuf, xFrame, aNotebookBarAddonsItem , bReloadNotebookbar); pNotebookBar = pSysWindow->GetNotebookBar(); pNotebookBar->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.4' - sfx2/source
sfx2/source/appl/app.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 0566520049f561bc1e222ed78a3dc84214f65ff3 Author: Henry Castro AuthorDate: Wed Sep 23 10:59:44 2020 -0400 Commit: Henry Castro CommitDate: Mon Oct 5 17:10:30 2020 +0200 lok: sidebar: avoid deactivation when the sidebar is painting When two views (SfxViewFrame) get activated and deactivated frequently when one view grab the focus and lose focus (respectively), in multiple user this is not true, both users have the view active at the same time. The patch removes the overhead when painting a sidebar window to avoid unnecessary deactivation. Change-Id: Ica5837c9f2eda5db1bee69ec2297e54c4845d467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103263 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103550 diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 33750b95b4ca..d240b6acecec 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -74,6 +74,7 @@ #include #include #include +#include #include #include @@ -295,7 +296,9 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) { if ( bTaskActivate ) NotifyEvent( SfxViewEventHint( SfxEventHintId::DeactivateDoc, GlobalEventConfig::GetEventName(GlobalEventId::DEACTIVATEDOC), pOldFrame->GetObjectShell(), pOldFrame->GetFrame().GetController() ) ); -pOldFrame->DoDeactivate( bTaskActivate, pFrame ); + +if ( !comphelper::LibreOfficeKit::isDialogPainting() ) +pOldFrame->DoDeactivate( bTaskActivate, pFrame ); if( pOldFrame->GetProgress() ) pOldFrame->GetProgress()->Suspend(); ___ 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.4' - sfx2/source
sfx2/source/sidebar/ContextChangeBroadcaster.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 716f308bcaa961109027bf26a44fd4dfc4b24702 Author: Henry Castro AuthorDate: Wed Sep 16 16:51:23 2020 -0400 Commit: Andras Timar CommitDate: Tue Sep 22 14:52:03 2020 +0200 lok:sidebar: deactivate the shell with no default context When a different view deactivates to current shell, then it is set to default context that cause a side effect into another view with different panels in the sidebar. Change-Id: Ie99cde89bdfdb08e1ac93aed947cf13048800c0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102887 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro (cherry picked from commit e7c3678e309b59479be24be2b7c57f8b20dce4dd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102942 Reviewed-by: Andras Timar diff --git a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx index 3a182d14f368..aece2861fcf2 100644 --- a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx +++ b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx @@ -60,7 +60,8 @@ void ContextChangeBroadcaster::Deactivate (const css::uno::Referencehttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 02cde0be4fec9f4c77f535e5053888ef1e37fad6 Author: Ashod Nakashian AuthorDate: Sat Jul 25 16:51:47 2020 -0400 Commit: Ashod Nakashian CommitDate: Mon Aug 10 04:44:41 2020 +0200 sfx2: lok: more informative warning Include the LOK callback even type as readable name instead of its numeric ID. Change-Id: I7865ae24878124b850468bcaa630ca444f4b2a96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99971 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 978c1cca5d20..b9abc8833573 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1496,7 +1496,7 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) c SAL_WARN( "sfx.view", "SfxViewShell::libreOfficeKitViewCallback no callback set! Dropped payload of type " -<< nType << ": [" << pPayload << ']'); +<< lokCallbackTypeToString(nType) << ": [" << pPayload << ']'); } void SfxViewShell::afterCallbackRegistered() ___ 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.4' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit fddfeb653dfd5dd73cbccb4433678d397f092df9 Author: Szymon Kłos AuthorDate: Mon Aug 3 09:40:31 2020 +0200 Commit: Szymon Kłos CommitDate: Mon Aug 3 10:15:05 2020 +0200 notebookbar: control early init per view Change-Id: I9b743bc6d62256289549cd8002b76bcb918222b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99986 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index e15f18cc5764..10c60065641e 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include using namespace sfx2; @@ -370,13 +371,16 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, if ((!sFile.isEmpty() && bChangedFile) || !pNotebookBar || !pNotebookBar->IsVisible() || bReloadNotebookbar || comphelper::LibreOfficeKit::isActive()) { +const SfxViewShell* pViewShell = SfxViewShell::Current(); + // Notebookbar was loaded too early what caused: // * in LOK: Paste Special feature was incorrectly initialized // Skip first request so Notebookbar will be initialized after document was loaded -static bool bSkipFirstInit = true; -if (comphelper::LibreOfficeKit::isActive() && bSkipFirstInit) +static std::map bSkippedFirstInit; +if (comphelper::LibreOfficeKit::isActive() +&& bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end()) { -bSkipFirstInit = false; +bSkippedFirstInit[pViewShell] = true; return false; } @@ -397,7 +401,6 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, pNotebookBar = pSysWindow->GetNotebookBar(); pNotebookBar->Show(); -const SfxViewShell* pViewShell = SfxViewShell::Current(); bool hasWeldedWrapper = m_pNotebookBarWeldedWrapper.find(pViewShell) != m_pNotebookBarWeldedWrapper.end(); if ((!hasWeldedWrapper || bReloadNotebookbar) && pNotebookBar->IsWelded()) ___ 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.4' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 7e02d0e4f22aa362184a5ac634eb916383f3f3d5 Author: Szymon Kłos AuthorDate: Fri Jul 31 12:19:34 2020 +0200 Commit: Szymon Kłos CommitDate: Fri Jul 31 12:53:49 2020 +0200 notebookbar: early init on desktop prevent from showing menubar before notebookbar Change-Id: I3ad7d24e8d8fa342872d49b24e6636d15457b598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99861 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 5bd8e03f698b..e15f18cc5764 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -371,11 +371,10 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, || bReloadNotebookbar || comphelper::LibreOfficeKit::isActive()) { // Notebookbar was loaded too early what caused: -// * little hang in the start center on desktop // * in LOK: Paste Special feature was incorrectly initialized // Skip first request so Notebookbar will be initialized after document was loaded static bool bSkipFirstInit = true; -if (bSkipFirstInit) +if (comphelper::LibreOfficeKit::isActive() && bSkipFirstInit) { bSkipFirstInit = false; return 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.4' - sfx2/source
sfx2/source/notebookbar/SfxNotebookBar.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 5ca41b36d8d49882d51386da9f41135bfdc9257a Author: Szymon Kłos AuthorDate: Fri Jul 31 11:30:21 2020 +0200 Commit: Szymon Kłos CommitDate: Fri Jul 31 12:14:43 2020 +0200 Notebookbar: skip early init This will prevent us from hanging in the start center during notebookbar initialization. Also prevents from bugs due to uno state querying too early: eg. Paste Special was not working in LOK. Change-Id: I0ac619a4c8b629eced0eb6ba6992897569f7263a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99856 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index a3ef7e7aa2fd..5bd8e03f698b 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -370,6 +370,17 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, if ((!sFile.isEmpty() && bChangedFile) || !pNotebookBar || !pNotebookBar->IsVisible() || bReloadNotebookbar || comphelper::LibreOfficeKit::isActive()) { +// Notebookbar was loaded too early what caused: +// * little hang in the start center on desktop +// * in LOK: Paste Special feature was incorrectly initialized +// Skip first request so Notebookbar will be initialized after document was loaded +static bool bSkipFirstInit = true; +if (bSkipFirstInit) +{ +bSkipFirstInit = false; +return false; +} + RemoveListeners(pSysWindow); OUString aBuf = rUIFile + sFile; ___ 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.4' - sfx2/source
sfx2/source/control/unoctitm.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 91ee7efe49581b774d4be116888b490eb132ac5d Author: Pranam Lashkari AuthorDate: Fri Jul 10 22:24:02 2020 +0530 Commit: Szymon Kłos CommitDate: Fri Jul 17 11:07:31 2020 +0200 LOK: send state of FormatPaintbrush Change-Id: I61057adff79e072aa4dc12e9c8943abd7166a260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98540 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 5d7ed29ac9f7..caf91b81c420 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1011,7 +1011,8 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "DocumentRepair" || aEvent.FeatureURL.Path == "ObjectAlignLeft" || aEvent.FeatureURL.Path == "ObjectAlignRight" || -aEvent.FeatureURL.Path == "AlignCenter") +aEvent.FeatureURL.Path == "AlignCenter" || +aEvent.FeatureURL.Path == "FormatPaintbrush") { bool bTemp = false; aEvent.State >>= bTemp; @@ -1113,7 +1114,6 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "SplitTable" || aEvent.FeatureURL.Path == "DeleteNote" || aEvent.FeatureURL.Path == "AcceptChanges" || - aEvent.FeatureURL.Path == "FormatPaintbrush" || aEvent.FeatureURL.Path == "SetDefault" || aEvent.FeatureURL.Path == "ParaLeftToRight" || aEvent.FeatureURL.Path == "ParaRightToLeft" || ___ 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.4' - sfx2/source
sfx2/source/view/lokhelper.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit db934da2f3d6b9ae3a1f62579a173098e3c15742 Author: Tor Lillqvist AuthorDate: Fri Jun 26 13:07:40 2020 +0300 Commit: Tor Lillqvist CommitDate: Mon Jun 29 14:28:56 2020 +0200 tdf#128502: Fix (haha) for a crash with multiple docs open in the iOS app Just a band-aid to avoid a crash. The LibreOfficeKit-related code would need a thorough re-factoring to properly be prepared for multiple open documents. Change-Id: I8c31e2badd747f3086526f89638fa495f4dcf295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97205 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97403 diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 1bdb9c9898ea..0b92060785bb 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -427,7 +427,10 @@ void SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) { -if (pViewShell->GetDocId() == pCurrentViewShell-> GetDocId()) +// FIXME: What if SfxViewShell::Current() returned null? +// Should we then do this for all views of all open documents +// or not? +if (pCurrentViewShell == nullptr || pViewShell->GetDocId() == pCurrentViewShell-> GetDocId()) SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, bInvalidateAll); pViewShell = SfxViewShell::GetNext(*pViewShell); } ___ 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.4' - sfx2/source
sfx2/source/view/lokhelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a84cb21d5bd0a3e2a640f7e9e3b1e4a418f9a2e1 Author: Tor Lillqvist AuthorDate: Wed Jun 24 22:16:52 2020 +0300 Commit: Tor Lillqvist CommitDate: Wed Jun 24 21:42:54 2020 +0200 tdf#128502: Try to fix UnitCalc after 984bd2d5e4e1277cab47f8c1053bdf9369b23935 The logic in SfxLokHelper::notifyOtherViews() apparently needs to be a bit more lenient in selecting which views are relevant. Change-Id: I34b24fcb684f155b189c4e89100da3ee6bf6326a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97079 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 0226cb09060d..1bdb9c9898ea 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -308,7 +308,7 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) { -if (pViewShell != pThisView && pViewShell->GetDocId() == pThisView-> GetDocId()) +if (pViewShell != pThisView && (pThisView->GetDocId() == ViewShellDocId(-1) || pViewShell->GetDocId() == pThisView->GetDocId())) notifyOtherView(pThisView, pViewShell, nType, rKey, rPayload); pViewShell = SfxViewShell::GetNext(*pViewShell); ___ 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.4' - sfx2/source
sfx2/source/notebookbar/PriorityHBox.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 0ab5bfd495cf7ea1cab99321ff031ae390247825 Author: Szymon Kłos AuthorDate: Tue Jun 16 10:37:02 2020 +0200 Commit: Szymon Kłos CommitDate: Tue Jun 23 10:11:40 2020 +0200 notebookbar: don't hide elements for online Change-Id: Icbef09e9e012d88372b164d2f69f80b06161772b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96920 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx index cb4a1be51d8c..70ef4c596eb4 100644 --- a/sfx2/source/notebookbar/PriorityHBox.cxx +++ b/sfx2/source/notebookbar/PriorityHBox.cxx @@ -23,6 +23,7 @@ #include #include "DropdownBox.hxx" #include "PriorityHBox.hxx" +#include namespace { @@ -115,7 +116,7 @@ void PriorityHBox::Resize() if (!m_bInitialized && SfxViewFrame::Current()) Initialize(); -if (!m_bInitialized) +if (!m_bInitialized || comphelper::LibreOfficeKit::isActive()) { return VclHBox::Resize(); } ___ 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.4' - sfx2/source sw/source sw/uiconfig
sfx2/source/doc/objstor.cxx | 28 + sw/source/ui/dbui/mmresultdialogs.cxx | 77 -- sw/source/ui/inc/mmresultdialogs.hxx |4 + sw/uiconfig/swriter/ui/mmresultemaildialog.ui | 45 +++ 4 files changed, 149 insertions(+), 5 deletions(-) New commits: commit cb9c51b958c3cfacc969c2ca7c9d2585d1d5b968 Author: Gülşah Köse AuthorDate: Sun Jun 14 19:21:22 2020 +0300 Commit: Gülşah Köse CommitDate: Tue Jun 16 22:25:03 2020 +0200 Add an option to send email encrypted PDF files via mailmerge. Change-Id: I002e054b685bd3367c4183014adc1dbd0843a365 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96303 Reviewed-by: Gülşah Köse Tested-by: Gülşah Köse Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96479 Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 41019d1bdc0f..5a19ecab91cf 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2819,7 +2819,35 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& // set filter; if no filter is given, take the default filter of the factory if ( !aFilterName.isEmpty() ) +{ pNewFile->SetFilter( GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName ) ); + +if(aFilterName == "writer_pdf_Export" && pNewFile->GetItemSet()) +{ +uno::Sequence< beans::PropertyValue > aSaveToFilterDataOptions(2); +bool bRet = false; + +for(int i = 0 ; i< rArgs.getLength() ; ++i) +{ +auto aProp = rArgs[i]; +if(aProp.Name == "EncryptFile") +{ +aSaveToFilterDataOptions[0].Name = aProp.Name; +aSaveToFilterDataOptions[0].Value = aProp.Value; +bRet = true; +} +if(aProp.Name == "DocumentOpenPassword") +{ +aSaveToFilterDataOptions[1].Name = aProp.Name; +aSaveToFilterDataOptions[1].Value = aProp.Value; +bRet = true; +} +} + +if( bRet ) +pNewFile->GetItemSet()->Put( SfxUnoAnyItem(SID_FILTER_DATA, uno::makeAny(aSaveToFilterDataOptions))); +} +} else pNewFile->SetFilter( GetFactory().GetFilterContainer()->GetAnyFilter( SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT ) ); diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 9d507f204ce9..bbc88ebb30bc 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -322,6 +322,9 @@ SwMMResultEmailDialog::SwMMResultEmailDialog(weld::Window* pParent) , m_xSendAsPB(m_xBuilder->weld_button("sendassettings")) , m_xAttachmentGroup(m_xBuilder->weld_widget("attachgroup")) , m_xAttachmentED(m_xBuilder->weld_entry("attach")) +, m_xPasswordFT(m_xBuilder->weld_label("passwordft")) +, m_xPasswordLB(m_xBuilder->weld_combo_box("password")) +, m_xPasswordCB(m_xBuilder->weld_check_button("passwordcb")) , m_xSendAllRB(m_xBuilder->weld_radio_button("sendallrb")) , m_xFromRB(m_xBuilder->weld_radio_button("fromrb")) , m_xFromNF(m_xBuilder->weld_spin_button("from")) @@ -332,6 +335,7 @@ SwMMResultEmailDialog::SwMMResultEmailDialog(weld::Window* pParent) m_xCopyToPB->connect_clicked(LINK(this, SwMMResultEmailDialog, CopyToHdl_Impl)); m_xSendAsPB->connect_clicked(LINK(this, SwMMResultEmailDialog, SendAsHdl_Impl)); m_xSendAsLB->connect_changed(LINK(this, SwMMResultEmailDialog, SendTypeHdl_Impl)); +m_xPasswordCB->connect_toggled( LINK( this, SwMMResultEmailDialog, CheckHdl )); Link aLink = LINK(this, SwMMResultEmailDialog, DocumentSelectionHdl_Impl); m_xSendAllRB->connect_toggled(aLink); @@ -341,6 +345,10 @@ SwMMResultEmailDialog::SwMMResultEmailDialog(weld::Window* pParent) m_xOKButton->connect_clicked(LINK(this, SwMMResultEmailDialog, SendDocumentsHdl_Impl)); +m_xPasswordCB->hide(); +m_xPasswordFT->hide(); +m_xPasswordLB->hide(); + FillInEmailSettings(); } @@ -419,9 +427,14 @@ void SwMMResultEmailDialog::FillInEmailSettings() if (xColAccess.is()) aFields = xColAccess->getElementNames(); for (const OUString& rField : std::as_const(aFields)) +{ m_xMailToLB->append_text(rField); +m_xPasswordLB->append_text(rField); +} m_xMailToLB->set_active(0); +m_xPasswordLB->set_active(0); + // then select the right one - may not be available const std::vector>& rHeaders = xConfigItem->GetDefaultAddressHeaders(); OUString sEMailColumn = rHeaders[MM_PART_E_MAIL].first; @@ -444,6 +457,14 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, weld::ToggleBut m_xToNF->set_sensitive(bEnableF
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
sfx2/source/doc/objserv.cxx |4 1 file changed, 4 insertions(+) New commits: commit 52dcafffc26a5dfbce4987cde0ec104b34dce3e1 Author: Miklos Vajna AuthorDate: Tue Jun 2 16:45:44 2020 +0200 Commit: Miklos Vajna CommitDate: Fri Jun 5 09:31:31 2020 +0200 tdf#130354 sfx2: make PDF signing UI work again Regression from commit 9112c18524c9f5e67d6cbb282586a439e3020cdb (Don't create unnecessary tempfiles for opened doc, 2019-10-18), restore the temporary file creation for the PDF case, as it's needed for PDF signing to work. (cherry picked from commit 058caeef45f9abf12e4e243aafbbb1c2ebcbc057) Change-Id: I945f04f6ab90d0e04fb14a7634ec877fb0af1a0f diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index ba76289818aa..b2c7d07be18f 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1593,6 +1593,10 @@ uno::Sequence< security::DocumentSignatureInformation > SfxObjectShell::GetDocum else { // Not ZIP-based, e.g. PDF. + +// Create temp file if needed. +GetMedium()->CreateTempFile(/*bReplace=*/false); + std::unique_ptr pStream(utl::UcbStreamHelper::CreateStream(GetMedium()->GetName(), StreamMode::READ)); uno::Reference xStream(new utl::OStreamWrapper(*pStream)); uno::Reference xInputStream(xStream, uno::UNO_QUERY); ___ 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.4' - sfx2/source
sfx2/source/view/viewsh.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 61b2927122ff2ae3bd70025377b782359300bfdf Author: Henry Castro AuthorDate: Wed Dec 18 21:17:29 2019 -0400 Commit: Henry Castro CommitDate: Thu May 21 00:35:46 2020 +0200 lok: ReleaseLOKNotifier only if view shell is assigned to a view frame There is an interesting case with the dialog SwMultiTOXTabDialog it creates a temporary frame-controller-view and when closing the dialog the LOKNotifier was already released, and of course the "close" message is not sent to the client side. Change-Id: Ie6877d077f8fad3e5893be9e1d5f7a337a38c9c8 Reviewed-on: https://gerrit.libreoffice.org/85461 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94508 Tested-by: Henry Castro diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index eee24a00d0ff..bf14212fa289 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1124,7 +1124,7 @@ SfxViewShell::~SfxViewShell() } vcl::Window* pFrameWin = GetViewFrame()->GetWindow().GetFrameWindow(); -if (pFrameWin && pFrameWin->GetLOKNotifier()) +if (pFrameWin && pFrameWin->GetLOKNotifier() == this) pFrameWin->ReleaseLOKNotifier(); } @@ -1133,7 +1133,7 @@ bool SfxViewShell::PrepareClose bool bUI // TRUE: Allow Dialog and so on, FALSE: silent-mode ) { -if (GetViewFrame()->GetWindow().GetLOKNotifier()) +if (GetViewFrame()->GetWindow().GetLOKNotifier() == this) GetViewFrame()->GetWindow().ReleaseLOKNotifier(); SfxPrinter *pPrinter = GetPrinter(); ___ 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.4' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 02063f5f500444761d46d4a405c17527fcff4c5b Author: Henry Castro AuthorDate: Wed Dec 18 16:09:36 2019 -0400 Commit: Henry Castro CommitDate: Thu May 21 00:34:59 2020 +0200 lok: ensure assign one parent LOK notifier The frame window is unique that are parents of different view shells (windows) Change-Id: I0f5e76c0c0d9844c2bd642354ac93d368dc2af38 Reviewed-on: https://gerrit.libreoffice.org/85426 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94507 Tested-by: Henry Castro diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index e62a87b06b14..eee24a00d0ff 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1096,7 +1096,7 @@ SfxViewShell::SfxViewShell if (comphelper::LibreOfficeKit::isActive()) { vcl::Window* pFrameWin = pViewFrame->GetWindow().GetFrameWindow(); -if (pFrameWin) +if (pFrameWin && !pFrameWin->GetLOKNotifier()) pFrameWin->SetLOKNotifier(this, 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.4' - sfx2/source
sfx2/source/control/unoctitm.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit b21aa3508b0ae2bf747c0453df279c0cbdcc5867 Author: Pranam Lashkari AuthorDate: Thu May 14 19:18:40 2020 +0530 Commit: Andras Timar CommitDate: Fri May 15 22:02:03 2020 +0200 LOK: sending status of paragraph outline buttons status of: OutlineRight, OutlineLeft, OutlineDown, OutlineUp Change-Id: I28dd805e1a620831c4092523969e1c4825b568f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94272 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index ee44b0bc7639..ddd11ebf29d8 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1116,7 +1116,11 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c aEvent.FeatureURL.Path == "InsertIndexesEntry" || aEvent.FeatureURL.Path == "TransformDialog" || aEvent.FeatureURL.Path == "EditRegion" || - aEvent.FeatureURL.Path == "ThesaurusDialog") + aEvent.FeatureURL.Path == "ThesaurusDialog" || + aEvent.FeatureURL.Path == "OutlineRight" || + aEvent.FeatureURL.Path == "OutlineLeft" || + aEvent.FeatureURL.Path == "OutlineDown" || + aEvent.FeatureURL.Path == "OutlineUp") { aBuffer.append(aEvent.IsEnabled ? OUStringLiteral("enabled") : OUStringLiteral("disabled")); ___ 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.4' - sfx2/source
sfx2/source/sidebar/SidebarController.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 0e9f41e24abcba5fe1fefc9cdee17bc0ca05057d Author: Aron Budea AuthorDate: Sun Feb 16 23:46:57 2020 +0100 Commit: Aron Budea CommitDate: Fri May 1 23:57:54 2020 +0200 sidebar: Distinguish between Impress and the rest for LOK The parameter introduced in 26bcfbe48b30e0a525a0f25b73ddcacdd158256b was unused. Change-Id: Iee928520bb1a4033cf10f0ca60c687b73d09aaf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88829 Tested-by: Jenkins Reviewed-by: Ashod Nakashian (cherry picked from commit 99751473531c6d022c2089bf162901b41a616895) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93141 Tested-by: Aron Budea Reviewed-by: Aron Budea diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 5c69f97d0b59..081835fd6f91 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -74,13 +74,13 @@ namespace const static sal_Int32 gnWidthCloseThreshold (70); const static sal_Int32 gnWidthOpenThreshold (40); -std::string UnoNameFromDeckId(const OUString& rsDeckId) +std::string UnoNameFromDeckId(const OUString& rsDeckId, bool isImpress = false) { if (rsDeckId == "SdCustomAnimationDeck") return ".uno:CustomAnimation"; if (rsDeckId == "PropertyDeck") -return ".uno:Sidebar"; +return isImpress ? ".uno:ModifyPage" : ".uno:Sidebar"; if (rsDeckId == "SdLayoutsDeck") return ".uno:ModifyPage"; @@ -240,7 +240,7 @@ void SidebarController::disposeDecks() { if (const SfxViewShell* pViewShell = mpViewFrame->GetViewShell()) { -const std::string hide = UnoNameFromDeckId(msCurrentDeckId); +const std::string hide = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication)); if (!hide.empty()) pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, (hide + "=false").c_str()); @@ -757,13 +757,13 @@ void SidebarController::SwitchToDeck ( { if (msCurrentDeckId != rDeckDescriptor.msId) { -const std::string hide = UnoNameFromDeckId(msCurrentDeckId); +const std::string hide = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication)); if (!hide.empty()) pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, (hide + "=false").c_str()); } -const std::string show = UnoNameFromDeckId(rDeckDescriptor.msId); +const std::string show = UnoNameFromDeckId(rDeckDescriptor.msId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication)); if (!show.empty()) pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, (show + "=true").c_str()); @@ -1287,7 +1287,7 @@ void SidebarController::UpdateDeckOpenState() if (const SfxViewShell* pViewShell = mpViewFrame->GetViewShell()) { -const std::string uno = UnoNameFromDeckId(msCurrentDeckId); +const std::string uno = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication)); if (!uno.empty()) pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, (uno + "=true").c_str()); @@ -1325,7 +1325,7 @@ void SidebarController::UpdateDeckOpenState() if (const SfxViewShell* pViewShell = mpViewFrame->GetViewShell()) { -const std::string uno = UnoNameFromDeckId(msCurrentDeckId); +const std::string uno = UnoNameFromDeckId(msCurrentDeckId, vcl::EnumContext::Application::Impress == vcl::EnumContext::GetApplicationEnum(GetCurrentContext().msApplication)); if (!uno.empty()) pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, (uno + "=false").c_str()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits