desktop/source/lib/init.cxx | 6 editeng/source/editeng/editview.cxx | 3 sw/source/ui/dbui/mmdocselectpage.cxx | 29 ++- sw/source/ui/dbui/mmdocselectpage.hxx | 2 sw/uiconfig/swriter/ui/mmselectpage.ui | 319 ++++++++++++++++----------------- 5 files changed, 199 insertions(+), 160 deletions(-)
New commits: commit ec1c01901bdc22a29a8fc40d08864bf66665771a Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue Apr 6 10:41:40 2021 -0400 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat May 1 22:10:52 2021 +0200 lok: remove popup auto correct item The auto correct options and auto correct menu item are no longer need it. Change-Id: I0a5e624c3393151cf80a06961f96d6a5fb8891ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113680 Tested-by: Jenkins Reviewed-by: Henry Castro <hcas...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index c19706fbe85b..5478803fc72e 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1108,6 +1108,9 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo if (comphelper::LibreOfficeKit::isActive()) { + aPopupMenu->RemoveItem(nAutoCorrId); + aPopupMenu->RemoveItem(nAutoCorrectDlgId); + // For mobile phones, send the context menu structure const SfxViewShell* pViewShell = SfxViewShell::Current(); if (pViewShell && pViewShell->isLOKMobilePhone()) commit 2d68d93114a5773168c55157fc4348568fb16439 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Tue Apr 13 08:48:32 2021 +0300 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat May 1 21:32:49 2021 +0200 tdf#139906 Add an option to change data source from mail merge wizard dialog. Change-Id: I52dfd9be82813a1b01c725eab97a7534ae9a05d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114079 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com> diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index a83a7e727f7b..26e3a34d3a84 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -29,7 +29,7 @@ #include <mailmergewizard.hxx> #include <swabstdlg.hxx> #include <mmconfigitem.hxx> - +#include <swuiexp.hxx> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/XFilePicker3.hpp> @@ -50,6 +50,7 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(weld::Container* pPage, SwMai , m_xBrowseTemplatePB(m_xBuilder->weld_button("browsetemplate")) , m_xRecentDocLB(m_xBuilder->weld_combo_box("recentdoclb")) , m_xDataSourceWarningFT(m_xBuilder->weld_label("datasourcewarning")) + , m_xExchangeDatabasePB(m_xBuilder->weld_button("exchangedatabase")) { m_xCurrentDocRB->set_active(true); DocSelectHdl(*m_xNewDocRB); @@ -65,6 +66,9 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(weld::Container* pPage, SwMai m_xBrowseDocPB->connect_clicked(aFileSelectHdl); m_xBrowseTemplatePB->connect_clicked(aFileSelectHdl); + Link<weld::Button&,void> aExchangeDatabaseHdl = LINK(this, SwMailMergeDocSelectPage, ExchangeDatabaseHdl); + m_xExchangeDatabasePB->connect_clicked(aExchangeDatabaseHdl); + const uno::Sequence< OUString >& rDocs = m_pWizard->GetConfigItem().GetSavedDocuments(); for(const auto& rDoc : rDocs) @@ -100,6 +104,11 @@ IMPL_LINK_NOARG(SwMailMergeDocSelectPage, DocSelectHdl, weld::ToggleButton&, voi m_xDataSourceWarningFT->hide(); m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); } + + if(m_xCurrentDocRB->get_active()) + m_xExchangeDatabasePB->set_sensitive(true); + else + m_xExchangeDatabasePB->set_sensitive(false); } IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, weld::Button&, rButton, void) @@ -155,6 +164,24 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, weld::Button&, rButton, void) m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); } +IMPL_LINK_NOARG(SwMailMergeDocSelectPage, ExchangeDatabaseHdl, weld::Button&, void) +{ + + SwAbstractDialogFactory& rFact = ::swui::GetFactory(); + ScopedVclPtr<VclAbstractDialog> pDlg(rFact.CreateSwChangeDBDlg(*m_pWizard->GetSwView())); + pDlg->Execute(); + + OUString sDataSourceName = m_pWizard->GetSwView()->GetDataSourceName(); + + if(m_xCurrentDocRB->get_active() && + !sDataSourceName.isEmpty() && + SwView::IsDataSourceAvailable(sDataSourceName)) + { + m_xDataSourceWarningFT->hide(); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, true); + } +} + bool SwMailMergeDocSelectPage::commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) { bool bReturn = false; diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 67cea59b6450..5220c3fd7fe2 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -40,9 +40,11 @@ class SwMailMergeDocSelectPage : public vcl::OWizardPage std::unique_ptr<weld::Button> m_xBrowseTemplatePB; std::unique_ptr<weld::ComboBox> m_xRecentDocLB; std::unique_ptr<weld::Label> m_xDataSourceWarningFT; + std::unique_ptr<weld::Button> m_xExchangeDatabasePB; DECL_LINK(DocSelectHdl, weld::ToggleButton&, void); DECL_LINK(FileSelectHdl, weld::Button&, void); + DECL_LINK(ExchangeDatabaseHdl, weld::Button&, void); virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override; diff --git a/sw/uiconfig/swriter/ui/mmselectpage.ui b/sw/uiconfig/swriter/ui/mmselectpage.ui index dd2f71529348..cb8b5dae430c 100644 --- a/sw/uiconfig/swriter/ui/mmselectpage.ui +++ b/sw/uiconfig/swriter/ui/mmselectpage.ui @@ -15,196 +15,201 @@ <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <object class="GtkAlignment" id="alignment1"> + <!-- n-columns=1 n-rows=1 --> + <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <child> - <!-- n-columns=1 n-rows=1 --> - <object class="GtkGrid" id="grid1"> + <object class="GtkRadioButton" id="currentdoc"> + <property name="label" translatable="yes" context="mmselectpage|currentdoc">Use the current _document</property> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <child> - <object class="GtkRadioButton" id="currentdoc"> - <property name="label" translatable="yes" context="mmselectpage|currentdoc">Use the current _document</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="currentdoc-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|currentdoc">Uses the current Writer document as the base for the mail merge document.</property> - </object> - </child> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="currentdoc-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|currentdoc">Uses the current Writer document as the base for the mail merge document.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> </child> - <child> - <object class="GtkRadioButton" id="newdoc"> - <property name="label" translatable="yes" context="mmselectpage|newdoc">Create a ne_w document</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - <property name="group">currentdoc</property> - <child internal-child="accessible"> - <object class="AtkObject" id="newdoc-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|newdoc">Creates a new Writer document to use for the mail merge.</property> - </object> - </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="newdoc"> + <property name="label" translatable="yes" context="mmselectpage|newdoc">Create a ne_w document</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + <property name="group">currentdoc</property> + <child internal-child="accessible"> + <object class="AtkObject" id="newdoc-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|newdoc">Creates a new Writer document to use for the mail merge.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> </child> - <child> - <object class="GtkRadioButton" id="loaddoc"> - <property name="label" translatable="yes" context="mmselectpage|loaddoc">Start from _existing document</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="hexpand">True</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - <property name="group">currentdoc</property> - <child internal-child="accessible"> - <object class="AtkObject" id="loaddoc-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|loaddoc">Select an existing Writer document to use as the base for the mail merge document.</property> - </object> - </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="loaddoc"> + <property name="label" translatable="yes" context="mmselectpage|loaddoc">Start from _existing document</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="hexpand">True</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + <property name="group">currentdoc</property> + <child internal-child="accessible"> + <object class="AtkObject" id="loaddoc-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|loaddoc">Select an existing Writer document to use as the base for the mail merge document.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> </child> - <child> - <object class="GtkRadioButton" id="template"> - <property name="label" translatable="yes" context="mmselectpage|template">Start from a t_emplate</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="hexpand">True</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - <property name="group">currentdoc</property> - <child internal-child="accessible"> - <object class="AtkObject" id="template-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|template">Select the template that you want to create your mail merge document with.</property> - </object> - </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="template"> + <property name="label" translatable="yes" context="mmselectpage|template">Start from a t_emplate</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="hexpand">True</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + <property name="group">currentdoc</property> + <child internal-child="accessible"> + <object class="AtkObject" id="template-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|template">Select the template that you want to create your mail merge document with.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">4</property> - </packing> </child> - <child> - <object class="GtkRadioButton" id="recentdoc"> - <property name="label" translatable="yes" context="mmselectpage|recentdoc">Start fro_m a recently saved starting document</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - <property name="group">currentdoc</property> - <child internal-child="accessible"> - <object class="AtkObject" id="recentdoc-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|recentdoc">Use an existing mail merge document as the base for a new mail merge document.</property> - </object> - </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">6</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="recentdoc"> + <property name="label" translatable="yes" context="mmselectpage|recentdoc">Start fro_m a recently saved starting document</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + <property name="group">currentdoc</property> + <child internal-child="accessible"> + <object class="AtkObject" id="recentdoc-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|recentdoc">Use an existing mail merge document as the base for a new mail merge document.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">6</property> - </packing> </child> - <child> - <object class="GtkComboBoxText" id="recentdoclb"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">18</property> - <child internal-child="accessible"> - <object class="AtkObject" id="recentdoclb-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|recentdoclb">Select the document.</property> - </object> - </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">8</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="recentdoclb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin-start">18</property> + <child internal-child="accessible"> + <object class="AtkObject" id="recentdoclb-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|recentdoclb">Select the document.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">7</property> - </packing> </child> - <child> - <object class="GtkButton" id="browsedoc"> - <property name="label" translatable="yes" context="mmselectpage|browsedoc">B_rowse...</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="halign">start</property> - <property name="margin_left">18</property> - <property name="use_underline">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="browsedoc-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|browsedoc">Locate the Writer document that you want to use, and then click Open.</property> - </object> - </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">9</property> + </packing> + </child> + <child> + <object class="GtkButton" id="browsedoc"> + <property name="label" translatable="yes" context="mmselectpage|browsedoc">B_rowse...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="halign">start</property> + <property name="margin-start">18</property> + <property name="use_underline">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="browsedoc-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|browsedoc">Locate the Writer document that you want to use, and then click Open.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> - </packing> </child> - <child> - <object class="GtkButton" id="browsetemplate"> - <property name="label" translatable="yes" context="mmselectpage|browsetemplate">B_rowse...</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="halign">start</property> - <property name="margin_left">18</property> - <property name="use_underline">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="browsetemplate-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|browsetemplate">Opens a template selector dialog.</property> - </object> - </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + </packing> + </child> + <child> + <object class="GtkButton" id="browsetemplate"> + <property name="label" translatable="yes" context="mmselectpage|browsetemplate">B_rowse...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="halign">start</property> + <property name="margin-start">18</property> + <property name="use_underline">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="browsetemplate-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="mmselectpage|extended_tip|browsetemplate">Opens a template selector dialog.</property> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">5</property> - </packing> </child> </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">7</property> + </packing> </child> <child> <object class="GtkLabel" id="datasourcewarning"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes" context="mmselectpage|extended_tip|datasourcewarning">Data source of the current document is not registered.</property> + <property name="margin-start">18</property> + <property name="label" translatable="yes" context="mmselectpage|extended_tip|datasourcewarning">Data source of the current document is not registered. Please exchange database.</property> <attributes> <attribute name="foreground" value="#cccc00000000"/> </attributes> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">8</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="exchangedatabase"> + <property name="label" translatable="yes" context="mmselectpage|extended_tip|exchangedatabase">Exchange Database...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="halign">start</property> + <property name="margin-start">18</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> </packing> </child> </object> commit 6d03ab40de87ae533caf01a670929d5de7e025cd Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Fri Mar 26 17:03:49 2021 +0000 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat May 1 21:01:44 2021 +0200 lok: mark strings static after pre-init, not after the fork. Change-Id: I1fbd4a9ef1e07ec87ca194128ed35de1dc429993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113127 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fcc260ee66a0..0c0ca3f9b362 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -6200,8 +6200,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char if (eStage == PRE_INIT) rtl_alloc_preInit(true); - else if (eStage == SECOND_INIT) - rtl_alloc_preInit(false); if (eStage != SECOND_INIT) comphelper::LibreOfficeKit::setActive(); @@ -6455,6 +6453,10 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char activateNotebookbar("Draw"); } + // staticize all strings. + if (eStage == PRE_INIT) + rtl_alloc_preInit(false); + return bInitialized; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits