[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/source
sw/source/ui/table/instable.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 1e472f9b0191bbde8f63b26b4d739cc97293a99b Author: Mert Tumer AuthorDate: Fri Mar 25 17:56:30 2022 +0300 Commit: Szymon Kłos CommitDate: Thu Feb 9 19:12:34 2023 + make default selected table style to Default Table Style for only online unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails because tables that have pre-applied style resets the style of the elements in their cells when a new row is inserted and the ui test above relies on that. For now this is LOK only Signed-off-by: Mert Tumer Change-Id: I2f60376fc2d929498aef45259a5ef291922ccdcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132124 Tested-by: Jenkins CollaboraOffice Reviewed-by: Gökay ŞATIR Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146723 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit 8620b204b51a9e0552a0002f7f06292bdfad37a7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146702 Tested-by: Szymon Kłos diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 7383da93bdef..a5aa4cd83853 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -148,8 +148,13 @@ void SwInsTableDlg::InitAutoTableFormat() // Change this min variable if you add autotable manually. minTableIndexInLb = 1; maxTableIndexInLb = minTableIndexInLb + static_cast(m_xTableTable->size()); -m_xLbFormat->select( minTableIndexInLb ); -m_tbIndex = lbIndexToTableIndex( minTableIndexInLb ); +// 1 means default table style +// unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails +// because tables that have pre-applied style resets the style of the elements in their cells +// when a new row is inserted and the ui test above relies on that. For now this is LOK only +m_lbIndex = comphelper::LibreOfficeKit::isActive() ? 1 : 0; +m_xLbFormat->select(m_lbIndex); +m_tbIndex = lbIndexToTableIndex(m_lbIndex); SelFormatHdl( *m_xLbFormat ); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/source
sw/source/ui/table/instable.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 51cea0559c373d54f65e0630c0eda1eaf0ac2fe2 Author: Mert Tumer AuthorDate: Wed Mar 23 14:23:23 2022 +0300 Commit: Szymon Kłos CommitDate: Thu Feb 9 19:12:05 2023 + sw: change inserttable style option default to 1 Right now it is default to NONE in the list if the user explicitly choses otherwise but that does not align with inserttable option on the toolbar there it is defaulted to "Default Table Style" 1 means "Default Table Style" Signed-off-by: Mert Tumer Change-Id: I1db19f0292ac6775653b0db3f2860fea9e3b0adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131971 Tested-by: Andras Timar Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146722 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos (cherry picked from commit ef46afe71751929b8b17d278d83c8e3ceefc862f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146701 diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index e10279add315..7383da93bdef 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -148,9 +148,8 @@ void SwInsTableDlg::InitAutoTableFormat() // Change this min variable if you add autotable manually. minTableIndexInLb = 1; maxTableIndexInLb = minTableIndexInLb + static_cast(m_xTableTable->size()); -m_lbIndex = 0; -m_xLbFormat->select( m_lbIndex ); -m_tbIndex = lbIndexToTableIndex(m_lbIndex); +m_xLbFormat->select( minTableIndexInLb ); +m_tbIndex = lbIndexToTableIndex( minTableIndexInLb ); SelFormatHdl( *m_xLbFormat ); }
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/table/instable.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 8620b204b51a9e0552a0002f7f06292bdfad37a7 Author: Mert Tumer AuthorDate: Fri Mar 25 17:56:30 2022 +0300 Commit: Szymon Kłos CommitDate: Thu Feb 9 19:11:09 2023 + make default selected table style to Default Table Style for only online unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails because tables that have pre-applied style resets the style of the elements in their cells when a new row is inserted and the ui test above relies on that. For now this is LOK only Signed-off-by: Mert Tumer Change-Id: I2f60376fc2d929498aef45259a5ef291922ccdcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132124 Tested-by: Jenkins CollaboraOffice Reviewed-by: Gökay ŞATIR Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146723 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 7383da93bdef..a5aa4cd83853 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -148,8 +148,13 @@ void SwInsTableDlg::InitAutoTableFormat() // Change this min variable if you add autotable manually. minTableIndexInLb = 1; maxTableIndexInLb = minTableIndexInLb + static_cast(m_xTableTable->size()); -m_xLbFormat->select( minTableIndexInLb ); -m_tbIndex = lbIndexToTableIndex( minTableIndexInLb ); +// 1 means default table style +// unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails +// because tables that have pre-applied style resets the style of the elements in their cells +// when a new row is inserted and the ui test above relies on that. For now this is LOK only +m_lbIndex = comphelper::LibreOfficeKit::isActive() ? 1 : 0; +m_xLbFormat->select(m_lbIndex); +m_tbIndex = lbIndexToTableIndex(m_lbIndex); SelFormatHdl( *m_xLbFormat ); } commit ef46afe71751929b8b17d278d83c8e3ceefc862f Author: Mert Tumer AuthorDate: Wed Mar 23 14:23:23 2022 +0300 Commit: Szymon Kłos CommitDate: Thu Feb 9 19:10:58 2023 + sw: change inserttable style option default to 1 Right now it is default to NONE in the list if the user explicitly choses otherwise but that does not align with inserttable option on the toolbar there it is defaulted to "Default Table Style" 1 means "Default Table Style" Signed-off-by: Mert Tumer Change-Id: I1db19f0292ac6775653b0db3f2860fea9e3b0adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131971 Tested-by: Andras Timar Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146722 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index e10279add315..7383da93bdef 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -148,9 +148,8 @@ void SwInsTableDlg::InitAutoTableFormat() // Change this min variable if you add autotable manually. minTableIndexInLb = 1; maxTableIndexInLb = minTableIndexInLb + static_cast(m_xTableTable->size()); -m_lbIndex = 0; -m_xLbFormat->select( m_lbIndex ); -m_tbIndex = lbIndexToTableIndex(m_lbIndex); +m_xLbFormat->select( minTableIndexInLb ); +m_tbIndex = lbIndexToTableIndex( minTableIndexInLb ); SelFormatHdl( *m_xLbFormat ); }
[Libreoffice-commits] core.git: cui/source cui/uiconfig desktop/source include/sal include/svtools lingucomponent/source officecfg/registry svtools/source
cui/source/options/optlanguagetool.cxx|4 cui/source/options/optlanguagetool.hxx|1 cui/uiconfig/ui/langtoolconfigpage.ui | 239 +- desktop/source/lib/init.cxx |3 include/sal/log-areas.dox |4 include/svtools/languagetoolcfg.hxx |3 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx | 19 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs|7 svtools/source/config/languagetoolcfg.cxx | 24 - 9 files changed, 183 insertions(+), 121 deletions(-) New commits: commit 1fb964276c184b0fb052503fe7dbc05bf0331211 Author: Mert Tumer AuthorDate: Mon Jul 4 19:52:49 2022 +0300 Commit: Henry Castro CommitDate: Mon Jan 30 22:12:03 2023 + Added option to disable ssl verification for languagetool This will allow to use self-signed certificates with local run languagetool APIs Signed-off-by: Mert Tumer Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136811 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145594 Tested-by: Jenkins Reviewed-by: Henry Castro diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx index 309ff2a09b52..f0006d1dd0e0 100644 --- a/cui/source/options/optlanguagetool.cxx +++ b/cui/source/options/optlanguagetool.cxx @@ -31,6 +31,7 @@ OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage, , m_xUsernameED(m_xBuilder->weld_entry("username")) , m_xApiKeyED(m_xBuilder->weld_entry("apikey")) , m_xActivateBox(m_xBuilder->weld_check_button("activate")) +, m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl")) , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings")) { m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, CheckHdl)); @@ -51,6 +52,7 @@ void OptLanguageToolTabPage::EnableControls(bool bEnable) rLanguageOpts.setEnabled(bEnable); m_xApiSettingsFrame->set_visible(bEnable); m_xActivateBox->set_active(bEnable); + m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != true); } IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, weld::Toggleable&, void) @@ -71,6 +73,7 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*) m_xUsernameED->set_text(rLanguageOpts.getUsername()); m_xApiKeyED->set_text(rLanguageOpts.getApiKey()); + m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != true); } bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*) @@ -86,6 +89,7 @@ bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*) rLanguageOpts.setUsername(m_xUsernameED->get_text()); rLanguageOpts.setApiKey(m_xApiKeyED->get_text()); + rLanguageOpts.setSSLVerification(m_xSSLDisableVerificationBox->get_active() != true); return false; } diff --git a/cui/source/options/optlanguagetool.hxx b/cui/source/options/optlanguagetool.hxx index 8ee83ed4e367..666512804c62 100644 --- a/cui/source/options/optlanguagetool.hxx +++ b/cui/source/options/optlanguagetool.hxx @@ -39,6 +39,7 @@ private: std::unique_ptr m_xUsernameED; std::unique_ptr m_xApiKeyED; std::unique_ptr m_xActivateBox; +std::unique_ptr m_xSSLDisableVerificationBox; std::unique_ptr m_xApiSettingsFrame; void EnableControls(bool bEnable); diff --git a/cui/uiconfig/ui/langtoolconfigpage.ui b/cui/uiconfig/ui/langtoolconfigpage.ui index 38aa184c2469..237040fa76b7 100644 --- a/cui/uiconfig/ui/langtoolconfigpage.ui +++ b/cui/uiconfig/ui/langtoolconfigpage.ui @@ -76,16 +76,130 @@ True False -5 -12 - + True False -start -Base URL: -True -baseurl +5 +12 + + +True +False +start +Base URL: +True +baseurl + + +0 +0 + + + + +True +True +True + +
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx | 33 + 1 file changed, 33 insertions(+) New commits: commit 080d39e6832b0ebbf588b6d02ad00bba968d1360 Author: Mert Tumer AuthorDate: Fri Jun 10 13:09:51 2022 +0300 Commit: Henry Castro CommitDate: Mon Jan 30 17:23:24 2023 + lok: set LanguageTool config parameters from environment Signed-off-by: Mert Tumer Change-Id: Ic7343439536abee626c269d2a824bb36f9abc40f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135583 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145573 Tested-by: Jenkins Reviewed-by: Henry Castro diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index db9a9632e4c3..78f03b8a0d43 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -136,6 +136,7 @@ #include #include #include +#include #include #ifdef IOS #include @@ -7036,6 +7037,37 @@ void setDeeplConfig() } } +void setLanguageToolConfig() +{ +const char* pEnabled = ::getenv("LANGUAGETOOL_ENABLED"); +const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL"); +const char* pUsername = ::getenv("LANGUAGETOOL_USERNAME"); +const char* pApikey = ::getenv("LANGUAGETOOL_APIKEY"); +if (pEnabled && pBaseUrlString) +{ +OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8); +if (aEnabled != "true") +return; +OUString aBaseUrl = OStringToOUString(pBaseUrlString, RTL_TEXTENCODING_UTF8); +try +{ +SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get(); +rLanguageOpts.setBaseURL(aBaseUrl); +rLanguageOpts.setEnabled(true); +if (pUsername && pApikey) +{ +OUString aUsername = OStringToOUString(pUsername, RTL_TEXTENCODING_UTF8); +OUString aApiKey = OStringToOUString(pApikey, RTL_TEXTENCODING_UTF8); +rLanguageOpts.setUsername(aUsername); +rLanguageOpts.setApiKey(aApiKey); +} +} +catch(uno::Exception const& rException) +{ +SAL_WARN("lok", "Failed to set LanguageTool API settings: " << rException.Message); +} +} +} } @@ -7359,6 +7391,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char setCertificateDir(); setDeeplConfig(); +setLanguageToolConfig(); if (bNotebookbar) {
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source
desktop/source/lib/init.cxx | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) New commits: commit 08ab67125bf1b88c3d4aea81c90d87da5bc30feb Author: Mert Tumer AuthorDate: Fri Jun 10 13:09:51 2022 +0300 Commit: Andras Timar CommitDate: Sat Jan 28 09:22:22 2023 + lok: set LanguageTool config parameters from environment Signed-off-by: Mert Tumer Change-Id: Ic7343439536abee626c269d2a824bb36f9abc40f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135583 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145603 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fdb420dfb13d..e562099082d3 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -131,6 +131,7 @@ #include #include #include +#include #include #ifdef IOS #include @@ -7016,7 +7017,36 @@ void setDeeplConfig() } } - +void setLanguageToolConfig() +{ +const char* pEnabled = ::getenv("LANGUAGETOOL_ENABLED"); +const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL"); +const char* pUsername = ::getenv("LANGUAGETOOL_USERNAME"); +const char* pApikey = ::getenv("LANGUAGETOOL_APIKEY"); +if (pEnabled && pBaseUrlString) +{ +OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8); +if (aEnabled != "true") +return; +OUString aBaseUrl = OStringToOUString(pBaseUrlString, RTL_TEXTENCODING_UTF8); +try +{ +SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get(); +rLanguageOpts.setBaseURL(aBaseUrl); +rLanguageOpts.setEnabled(true); +if (pUsername && pApikey) +{ +OUString aUsername = OStringToOUString(pUsername, RTL_TEXTENCODING_UTF8); +OUString aApiKey = OStringToOUString(pApikey, RTL_TEXTENCODING_UTF8); +rLanguageOpts.setUsername(aUsername); +rLanguageOpts.setApiKey(aApiKey); +} +} +catch(uno::Exception const& rException) +{ +SAL_WARN("lok", "Failed to set LanguageTool API settings: " << rException.Message); +} +} } static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char* pUserProfileUrl) @@ -7332,6 +7362,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char setCertificateDir(); setDeeplConfig(); +setLanguageToolConfig(); if (bNotebookbar) {
[Libreoffice-commits] core.git: cui/source include/sfx2 include/vcl sfx2/source vcl/jsdialog
cui/source/dialogs/passwdomdlg.cxx | 47 + cui/source/factory/dlgfact.cxx |7 + cui/source/factory/dlgfact.hxx |3 cui/source/inc/passwdomdlg.hxx |2 include/sfx2/dinfdlg.hxx |2 include/sfx2/filedlghelper.hxx |4 include/vcl/abstdlg.hxx |1 sfx2/source/dialog/dinfdlg.cxx | 31 + sfx2/source/dialog/filedlghelper.cxx | 182 +++ vcl/jsdialog/enabled.cxx |2 10 files changed, 173 insertions(+), 108 deletions(-) New commits: commit 67eb60672936a10fba840078e6aca918c3331f52 Author: Mert Tumer AuthorDate: Mon Sep 12 12:58:20 2022 +0300 Commit: Szymon Kłos CommitDate: Mon Nov 21 11:45:10 2022 +0100 lok: make properties>change password dialog async * We now can set a password through properties->change password without having to have a password initially only for online because it needs a created file already, online works with files that are created before loading but the desktop does not need this. * The same dialog is still used as non-async for desktop version because it goes through an InteractionHandler and the result is expected not from the dialog but from the interaction handler. Therefore, making it async there did not make sense. Signed-off-by: Mert Tumer Change-Id: I3d02822be0b71836b1592abca191b3b1c5f6374e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139884 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142991 Tested-by: Jenkins diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 8a8fcb35842f..163f3961f22e 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -29,10 +29,10 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void) m_xPasswdToModifyED->get_text().isEmpty(); if (bInvalidState) { -std::unique_ptr xErrorBox(Application::CreateMessageDialog(m_xDialog.get(), +m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Warning, VclButtonsType::Ok, m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2)); -xErrorBox->run(); +m_xErrorBox->runAsync(m_xErrorBox, [](sal_Int32 /*nResult*/) {}); } else // check for mismatched passwords... { @@ -41,26 +41,27 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void) const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1); if (nMismatch > 0) { -std::unique_ptr xErrorBox(Application::CreateMessageDialog(m_xDialog.get(), +m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Warning, VclButtonsType::Ok, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch)); -xErrorBox->run(); - -weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : m_xPasswdToModifyED.get(); -weld::Entry* pRepeatEdit = !bToOpenMatch? m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get(); -if (nMismatch == 1) -{ -pEdit->set_text( "" ); -pRepeatEdit->set_text( "" ); -} -else if (nMismatch == 2) +m_xErrorBox->runAsync(m_xErrorBox, [this, bToOpenMatch, nMismatch](sal_Int32 /*nResult*/) { -m_xPasswdToOpenED->set_text( "" ); -m_xReenterPasswdToOpenED->set_text( "" ); -m_xPasswdToModifyED->set_text( "" ); -m_xReenterPasswdToModifyED->set_text( "" ); -} -pEdit->grab_focus(); +weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : m_xPasswdToModifyED.get(); +weld::Entry* pRepeatEdit = !bToOpenMatch? m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get(); +if (nMismatch == 1) +{ +pEdit->set_text( "" ); +pRepeatEdit->set_text( "" ); +} +else if (nMismatch == 2) +{ +m_xPasswdToOpenED->set_text( "" ); +m_xReenterPasswdToOpenED->set_text( "" ); +m_xPasswdToModifyED->set_text( "" ); +m_xReenterPasswdToModifyED->set_text( "" ); +} +pEdit->grab_focus(); +}); } else { @@ -136,6 +137,14 @@
[Libreoffice-commits] core.git: sc/source
sc/source/ui/docshell/docsh.cxx | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) New commits: commit 2550835bde036a2809d693d9633b8b736c035ecb Author: Mert Tumer AuthorDate: Mon Mar 21 14:07:13 2022 +0300 Commit: Aron Budea CommitDate: Tue Nov 15 20:12:12 2022 +0100 android: Fix tab name on CSV still becomes tempfile name Unfortunately, in order for isLOKMObilePhone to work we need to send deviceFormFactor on document load but at this stage the document is still not loaded and the control does not work here Signed-off-by: Mert Tumer Change-Id: I5388cf4a049dbf007a1fd79abefb64bed580eea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131900 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142607 Tested-by: Jenkins diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index cb5c9e11606e..df55d056f7f2 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -1296,23 +1298,21 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) sc::SetFormulaDirtyContext aCxt; m_pDocument->SetAllFormulasDirty(aCxt); -bool bIsMobile = comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() -&& SfxViewShell::Current()->isLOKMobilePhone(); // for mobile case, we use a copy of the original document and give it a temporary name before editing // Therefore, the sheet name becomes ugly, long and nonsensical. -if (!bIsMobile) -// The same resulting name has to be handled in -// ScExternalRefCache::initializeDoc() and related, hence -// pass 'true' for RenameTab()'s bExternalDocument for a -// composed name so ValidTabName() will not be checked, -// which could veto the rename in case it contained -// characters that Excel does not handle. If we wanted to -// change that then it needed to be handled in all -// corresponding places of the external references -// manager/cache. Likely then we'd also need a method to -// compose a name excluding such characters. -m_pDocument->RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); - +#if !(defined ANDROID) +// The same resulting name has to be handled in +// ScExternalRefCache::initializeDoc() and related, hence +// pass 'true' for RenameTab()'s bExternalDocument for a +// composed name so ValidTabName() will not be checked, +// which could veto the rename in case it contained +// characters that Excel does not handle. If we wanted to +// change that then it needed to be handled in all +// corresponding places of the external references +// manager/cache. Likely then we'd also need a method to +// compose a name excluding such characters. +m_pDocument->RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); +#endif bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol(); bOverflowCell = aImpEx.IsOverflowCell();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/source include/sfx2 include/vcl sfx2/source vcl/jsdialog
cui/source/dialogs/passwdomdlg.cxx | 47 + cui/source/factory/dlgfact.cxx |7 + cui/source/factory/dlgfact.hxx |3 cui/source/inc/passwdomdlg.hxx |2 include/sfx2/dinfdlg.hxx |2 include/sfx2/filedlghelper.hxx |3 include/vcl/abstdlg.hxx |1 sfx2/source/dialog/dinfdlg.cxx | 31 + sfx2/source/dialog/filedlghelper.cxx | 182 +++ vcl/jsdialog/enabled.cxx |1 10 files changed, 172 insertions(+), 107 deletions(-) New commits: commit fc9c654b7f4ba7cfc92eeefe8b5dfcb515b0b800 Author: Mert Tumer AuthorDate: Mon Sep 12 12:58:20 2022 +0300 Commit: Gökay ŞATIR CommitDate: Tue Oct 18 14:37:58 2022 +0200 lok: make properties>change password dialog async * We now can set a password through properties->change password without having to have a password initially only for online because it needs a created file already, online works with files that are created before loading but the desktop does not need this. * The same dialog is still used as non-async for desktop version because it goes through an InteractionHandler and the result is expected not from the dialog but from the interaction handler. Therefore, making it async there did not make sense. Signed-off-by: Mert Tumer Change-Id: I3d02822be0b71836b1592abca191b3b1c5f6374e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139884 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index d84595ac89a7..31a69d3259e0 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -29,10 +29,10 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void) m_xPasswdToModifyED->get_text().isEmpty(); if (bInvalidState) { -std::unique_ptr xErrorBox(Application::CreateMessageDialog(m_xDialog.get(), +m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Warning, VclButtonsType::Ok, m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2)); -xErrorBox->run(); +m_xErrorBox->runAsync(m_xErrorBox, [](sal_Int32 /*nResult*/) {}); } else // check for mismatched passwords... { @@ -41,26 +41,27 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void) const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1); if (nMismatch > 0) { -std::unique_ptr xErrorBox(Application::CreateMessageDialog(m_xDialog.get(), +m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Warning, VclButtonsType::Ok, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch)); -xErrorBox->run(); - -weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : m_xPasswdToModifyED.get(); -weld::Entry* pRepeatEdit = !bToOpenMatch? m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get(); -if (nMismatch == 1) -{ -pEdit->set_text( "" ); -pRepeatEdit->set_text( "" ); -} -else if (nMismatch == 2) +m_xErrorBox->runAsync(m_xErrorBox, [this, bToOpenMatch, bToModifyMatch, nMismatch](sal_Int32 /*nResult*/) { -m_xPasswdToOpenED->set_text( "" ); -m_xReenterPasswdToOpenED->set_text( "" ); -m_xPasswdToModifyED->set_text( "" ); -m_xReenterPasswdToModifyED->set_text( "" ); -} -pEdit->grab_focus(); +weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : m_xPasswdToModifyED.get(); +weld::Entry* pRepeatEdit = !bToOpenMatch? m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get(); +if (nMismatch == 1) +{ +pEdit->set_text( "" ); +pRepeatEdit->set_text( "" ); +} +else if (nMismatch == 2) +{ +m_xPasswdToOpenED->set_text( "" ); +m_xReenterPasswdToOpenED->set_text( "" ); +m_xPasswdToModifyED->set_text( "" ); +m_xReenterPasswdToModifyED->set_text( "" ); +} +pEdit->grab_focus(); +}); } else { @@ -136,6 +137,14 @@ PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, s ReadonlyOnOffHdl(*m_xOpenReadonlyCB); }
[Libreoffice-commits] core.git: cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/linguistic include/sfx2 include/svtools include/svx include/vcl linguistic
cui/Library_cui.mk |1 cui/UIConfig_cui.mk |1 cui/inc/treeopt.hrc |3 cui/source/options/optdeepl.cxx | 53 ++ cui/source/options/optdeepl.hxx | 37 + cui/source/options/treeopt.cxx |2 cui/uiconfig/ui/deepltabpage.ui | 124 + desktop/source/lib/init.cxx | 24 + include/linguistic/translate.hxx|9 include/sfx2/pageids.hxx|1 include/sfx2/sfxsids.hrc|1 include/svtools/deeplcfg.hxx| 50 ++ include/svx/svxids.hrc |2 include/vcl/htmltransferable.hxx| 51 ++ linguistic/Library_lng.mk |2 linguistic/source/translate.cxx | 71 +++ officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs | 22 + svtools/Library_svt.mk |1 svtools/source/config/deeplcfg.cxx | 124 + svx/sdi/svx.sdi | 17 sw/Library_sw.mk|1 sw/Library_swui.mk |2 sw/UIConfig_swriter.mk |1 sw/inc/strings.hrc |1 sw/inc/swabstdlg.hxx| 13 sw/sdi/_textsh.sdi |6 sw/source/ui/dialog/swdlgfact.cxx | 12 sw/source/ui/dialog/swdlgfact.hxx | 14 sw/source/ui/misc/translatelangselect.cxx | 153 +++ sw/source/uibase/inc/translatehelper.hxx| 42 ++ sw/source/uibase/inc/translatelangselect.hxx| 69 +++ sw/source/uibase/shells/textsh1.cxx | 29 + sw/source/uibase/shells/translatehelper.cxx | 208 ++ sw/uiconfig/sglobal/menubar/menubar.xml |2 sw/uiconfig/swriter/menubar/menubar.xml |2 sw/uiconfig/swriter/ui/translationdialog.ui | 104 + vcl/Library_vcl.mk |1 vcl/jsdialog/enabled.cxx|1 vcl/source/app/htmltransferable.cxx | 78 +++ 40 files changed, 1341 insertions(+), 2 deletions(-) New commits: commit e20d2de7836da52dbf9e528d1043b1e188097bfd Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Miklos Vajna CommitDate: Wed Oct 12 16:52:03 2022 +0200 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140624 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index cb26653b395d..5918be60972c 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -188,6 +188,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/linguistic include/sfx2 include/svtoo
cui/Library_cui.mk |1 cui/UIConfig_cui.mk |1 cui/inc/treeopt.hrc |3 cui/source/options/optdeepl.cxx | 55 ++ cui/source/options/optdeepl.hxx | 37 + cui/source/options/treeopt.cxx |2 cui/uiconfig/ui/deepltabpage.ui | 124 + desktop/source/lib/init.cxx | 24 + include/linguistic/translate.hxx|9 include/sfx2/pageids.hxx|1 include/sfx2/sfxsids.hrc|1 include/svtools/deeplcfg.hxx| 50 ++ include/svx/svxids.hrc |2 include/vcl/htmltransferable.hxx| 51 ++ linguistic/Library_lng.mk |2 linguistic/source/translate.cxx | 70 +++ officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs | 22 + svtools/Library_svt.mk |1 svtools/source/config/deeplcfg.cxx | 128 ++ svx/sdi/svx.sdi | 17 sw/Library_sw.mk|1 sw/Library_swui.mk |2 sw/UIConfig_swriter.mk |1 sw/inc/strings.hrc |1 sw/inc/swabstdlg.hxx| 13 sw/sdi/_textsh.sdi |6 sw/source/ui/dialog/swdlgfact.cxx | 12 sw/source/ui/dialog/swdlgfact.hxx | 14 sw/source/ui/misc/translatelangselect.cxx | 157 +++ sw/source/uibase/inc/translatehelper.hxx| 42 ++ sw/source/uibase/inc/translatelangselect.hxx| 69 +++ sw/source/uibase/shells/textsh1.cxx | 29 + sw/source/uibase/shells/translatehelper.cxx | 208 ++ sw/uiconfig/sglobal/menubar/menubar.xml |2 sw/uiconfig/swriter/menubar/menubar.xml |2 sw/uiconfig/swriter/ui/translationdialog.ui | 104 + vcl/Library_vcl.mk |1 vcl/jsdialog/enabled.cxx|1 vcl/source/app/htmltransferable.cxx | 78 +++ 40 files changed, 1350 insertions(+), 2 deletions(-) New commits: commit f0b4db7355cffa1f22ed5063db829b1f1f285a72 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Tue Sep 13 00:02:16 2022 +0200 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137199 Tested-by: Jenkins CollaboraOffice diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \
[Libreoffice-commits] core.git: desktop/source filter/source
desktop/source/lib/init.cxx|6 +- filter/source/storagefilterdetect/filterdetect.cxx |7 +++ 2 files changed, 12 insertions(+), 1 deletion(-) New commits: commit b1560344c4ff2d1c5065eccdde31a8d4669510e4 Author: Mert Tumer AuthorDate: Wed Apr 6 16:59:53 2022 +0300 Commit: Henry Castro CommitDate: Thu Aug 11 14:59:00 2022 +0200 lok: load template documents as regular documents otherwise lok cannot save them directly because libreoffice will try to open a save-as dialog For odg, change the draw8_template type draw8 Signed-off-by: Mert Tumer Change-Id: I34b0ed03adcac89eaa926f8ae6c57e6f622a90f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132633 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138074 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138098 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6f1135248675..7f27f96d9efa 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2563,10 +2563,14 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, document::MacroExecMode::NEVER_EXECUTE; #endif +// set AsTemplate explicitly false to be able to load template files +// as regular files, otherwise we cannot save them; it will try +// to bring saveas dialog which cannot work with LOK case uno::Sequence aFilterOptions{ comphelper::makePropertyValue("FilterOptions", sFilterOptions), comphelper::makePropertyValue("InteractionHandler", xInteraction), -comphelper::makePropertyValue("MacroExecutionMode", nMacroExecMode) +comphelper::makePropertyValue("MacroExecutionMode", nMacroExecMode), +comphelper::makePropertyValue("AsTemplate", false) }; /* TODO diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx index 05eb74769b60..8312726e11da 100644 --- a/filter/source/storagefilterdetect/filterdetect.cxx +++ b/filter/source/storagefilterdetect/filterdetect.cxx @@ -33,6 +33,8 @@ #include #include +#include + using namespace ::com::sun::star; using utl::MediaDescriptor; @@ -103,6 +105,11 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::SequencegetPropertyValue( "MediaType" ) >>= aMediaType; aTypeName = getInternalFromMediaType( aMediaType ); +if (comphelper::LibreOfficeKit::isActive() && aTypeName == "draw8_template") +{ +// save it as draw8 instead of template format +aTypeName = "draw8"; +} } catch( const lang::WrappedTargetException& aWrap )
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source filter/source
desktop/source/lib/init.cxx|6 +- filter/source/storagefilterdetect/filterdetect.cxx |7 +++ 2 files changed, 12 insertions(+), 1 deletion(-) New commits: commit 35883e33fdc482862ea00ec0c74d5d253799ecb1 Author: Mert Tumer AuthorDate: Wed Apr 6 16:59:53 2022 +0300 Commit: Henry Castro CommitDate: Wed Aug 10 16:00:13 2022 +0200 lok: load template documents as regular documents otherwise lok cannot save them directly because libreoffice will try to open a save-as dialog For odg, change the draw8_template type draw8 Signed-off-by: Mert Tumer Change-Id: I34b0ed03adcac89eaa926f8ae6c57e6f622a90f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132633 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138074 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2847e64621b2..1533021c56a9 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2575,10 +2575,14 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, document::MacroExecMode::NEVER_EXECUTE; #endif +// set AsTemplate explicitly false to be able to load template files +// as regular files, otherwise we cannot save them; it will try +// to bring saveas dialog which cannot work with LOK case uno::Sequence aFilterOptions{ comphelper::makePropertyValue("FilterOptions", sFilterOptions), comphelper::makePropertyValue("InteractionHandler", xInteraction), -comphelper::makePropertyValue("MacroExecutionMode", nMacroExecMode) +comphelper::makePropertyValue("MacroExecutionMode", nMacroExecMode), +comphelper::makePropertyValue("AsTemplate", false) }; /* TODO diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx index f45edd6cb5b6..d8e5df13b874 100644 --- a/filter/source/storagefilterdetect/filterdetect.cxx +++ b/filter/source/storagefilterdetect/filterdetect.cxx @@ -32,6 +32,8 @@ #include #include +#include + using namespace ::com::sun::star; using utl::MediaDescriptor; @@ -102,6 +104,11 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::SequencegetPropertyValue( "MediaType" ) >>= aMediaType; aTypeName = getInternalFromMediaType( aMediaType ); +if (comphelper::LibreOfficeKit::isActive() && aTypeName == "draw8_template") +{ +// save it as draw8 instead of template format +aTypeName = "draw8"; +} } catch( const lang::WrappedTargetException& aWrap )
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/linguistic include/sfx2 include/svtools
Rebased ref, commits from common ancestor: commit 3597348af55ec3c066067a2376289fbde2f62a95 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jul 26 19:56:03 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - 12 commits - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source drawinglayer/source include/sfx2 in
Rebased ref, commits from common ancestor: commit 799a381452337bb007b6efd4d366cf5c4d5ea74e Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Mon Jul 25 19:11:26 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/sfx2 include/svtools include/svx include
Rebased ref, commits from common ancestor: commit 4407e3ce7334b179f777b043931ec071dbd7d3b0 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Fri Jul 22 16:22:48 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/sfx2 include/svtools include/svx include
Rebased ref, commits from common ancestor: commit dcd9ddaa3f9d5f379fd4d786da825debdbb43db6 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Fri Jul 22 16:13:10 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/sfx2 include/svtools include/svx include
Rebased ref, commits from common ancestor: commit c7da5fa2929433652b5007eecc0655011f43a3e6 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Fri Jul 22 15:50:26 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/sfx2 include/svtools include/svx include
Rebased ref, commits from common ancestor: commit f2e65b98ebb000faad71e7f1b6794d6f590c20a4 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Fri Jul 22 12:56:30 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/sfx2 include/svtools include/svx include
Rebased ref, commits from common ancestor: commit e8225b1022a0f0f199f864b136da7383e7f63b7a Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Fri Jul 22 10:38:56 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/sfx2 include/svtools include/svx include
Rebased ref, commits from common ancestor: commit 0b9cd43517787804e8a11899f2f4776b38fc0b4e Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Thu Jul 21 22:21:10 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - 29 commits - configure.ac cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source drawinglayer/source ic
Rebased ref, commits from common ancestor: commit 140ac17f44f51edf5929d617bc0d10a8ee4c5588 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Wed Jul 20 22:25:26 2022 +0300 new uno command uno:Translate with deepl api New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions =
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svtools include/svx include/vcl officecfg/
Rebased ref, commits from common ancestor: commit 45b74b4b7e61751b350fcbc2526d482a2ad1b18b Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Thu Jul 14 18:45:31 2022 +0300 wip translate Signed-off-by: Mert Tumer diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..94b48ccc2f43 --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +, m_xAPIUrl(m_xBuilder->weld_entry("apiurl")) +, m_xAuthKey(m_xBuilder->weld_entry("authkey")) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl()); +m_xAuthKey->set_text(rDeeplOptions.getAuthKey()); +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); +rDeeplOptions.setAPIUrl(m_xAPIUrl->get_text()); +rDeeplOptions.setAuthKey(m_xAuthKey->get_text()); +return false; +} + +std::unique_ptr OptDeeplTabPage::Create(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet* rAttrSet) +{ +return std::make_unique(pPage, pController, *rAttrSet); +} diff --git a/cui/source/options/optdeepl.hxx b/cui/source/options/optdeepl.hxx new file mode 100644 index ..124f9494c4aa --- /dev/null +++ b/cui/source/options/optdeepl.hxx @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svx include/vcl officecfg/registry svx/sdi
Rebased ref, commits from common ancestor: commit cc0a4ed042b1ce484250dbb101d0a5f48f640153 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Wed Jul 13 22:58:43 2022 +0300 wip translate Signed-off-by: Mert Tumer diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..5b3538530cce --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +return false; +} + +std::unique_ptr OptDeeplTabPage::Create(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet* rAttrSet) +{ +return std::make_unique(pPage, pController, *rAttrSet); +} diff --git a/cui/source/options/optdeepl.hxx b/cui/source/options/optdeepl.hxx new file mode 100644 index ..15d80b007647 --- /dev/null +++ b/cui/source/options/optdeepl.hxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svx include/vcl officecfg/registry svx/sdi
Rebased ref, commits from common ancestor: commit 2d13c73e198c3d1b462fcc055dfe38b0b361474f Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Wed Jul 13 19:16:35 2022 +0300 wip translate Signed-off-by: Mert Tumer diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index d455a64ab266..c4c0a52b2ef4 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgenrl \ cui/source/options/opthtml \ cui/source/options/optlanguagetool \ +cui/source/options/optdeepl \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 806779daaa9d..0ed879e2b228 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ cui/uiconfig/ui/langtoolconfigpage \ + cui/uiconfig/ui/deepltabpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index 952b79ea92d4..6d5bc4004a53 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"), RID_SVXPAGE_DEEPL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx new file mode 100644 index ..5b3538530cce --- /dev/null +++ b/cui/source/options/optdeepl.cxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "optdeepl.hxx" +#include +#include + +OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet& rSet) +: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", ) +{ + +} + +OptDeeplTabPage::~OptDeeplTabPage() {} + +void OptDeeplTabPage::Reset(const SfxItemSet*) +{ +} + +bool OptDeeplTabPage::FillItemSet(SfxItemSet*) +{ +return false; +} + +std::unique_ptr OptDeeplTabPage::Create(weld::Container* pPage, + weld::DialogController* pController, + const SfxItemSet* rAttrSet) +{ +return std::make_unique(pPage, pController, *rAttrSet); +} diff --git a/cui/source/options/optdeepl.hxx b/cui/source/options/optdeepl.hxx new file mode 100644 index ..15d80b007647 --- /dev/null +++ b/cui/source/options/optdeepl.hxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - include/sfx2 include/svx include/vcl officecfg/registry svx/sdi sw/inc sw/Library_sw.mk sw/Library_swui.mk sw/sdi sw/source sw/uiconfi
Rebased ref, commits from common ancestor: commit 9b7336c3770bbe89674e97e8505167281c9172b4 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jul 12 17:59:52 2022 +0300 wip translate Signed-off-by: Mert Tumer diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 39a3ec5bf9d6..1937368ba2b9 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -208,6 +208,7 @@ class SvxSearchItem; #define SID_VIEW_DATA_SOURCE_BROWSER(SID_SFX_START + 1660) #define SID_UNPACK (SID_SFX_START + 1662) // (SID_SFX_START + 1663) used further down +#define SID_ATTR_TARGETLANG_STR (SID_SFX_START + 1664) // FREE #define SID_OUTPUTSTREAM(SID_SFX_START + 1666) #define SID_IMAGE_ORIENTATION (SID_SFX_START + 1667) diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 573f036128c8..f8e162a973a6 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -570,7 +570,7 @@ class SdrAngleItem; #define SID_FM_FILECONTROL ( SID_SVX_START + 605 ) //( SID_SVX_START + 606 ) is used by SID_DRAWTBX_REDACTED_EXPORT #define SID_FM_NAVIGATIONBAR( SID_SVX_START + 607 ) -//FREE +#define SID_FM_TRANSLATE( SID_SVX_START + 608 ) //FREE #define SID_FM_DELETEROWS ( SID_SVX_START + 610 ) //FREE diff --git a/include/vcl/unohelp3.hxx b/include/vcl/unohelp3.hxx new file mode 100644 index ..2d3bfb4e5f28 --- /dev/null +++ b/include/vcl/unohelp3.hxx @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace vcl::unohelper { + +class VCL_DLLPUBLIC HtmlTransferable final : +public css::datatransfer::XTransferable, +public ::cppu::OWeakObject +{ +private: +OStringdata; + +public: +HtmlTransferable( OString sData ); +virtual ~HtmlTransferable() override; + +// css::uno::XInterface +css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; +void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } +void SAL_CALL release() noexcept override { OWeakObject::release(); } + +// css::datatransfer::XTransferable +css::uno::Any SAL_CALL getTransferData( const css::datatransfer::DataFlavor& aFlavor ) override; +css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) override; +sal_Bool SAL_CALL isDataFlavorSupported( const css::datatransfer::DataFlavor& aFlavor ) override; +}; + +} // namespace vcl::unohelper diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 37996759a90d..2f82b9f1711f 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -1333,6 +1333,14 @@ 1 + + + Translate Page... + + + 1 + + Co~lumns... diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 9ab00de7e881..ac886aaa0cd4 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1596,6 +1596,23 @@ SfxBoolItem NavigationBar SID_FM_NAVIGATIONBAR GroupId = SfxGroupId::Controls; ] +SfxBoolItem Translate SID_FM_TRANSLATE +(SfxStringItem TargetLang SID_ATTR_TARGETLANG_STR) +[ +AutoUpdate = FALSE, +FastCall = TRUE, +ReadOnlyDoc = FALSE, +Toggle = FALSE, +Container = FALSE, +RecordAbsolute = FALSE, +RecordPerSet; + +AccelConfig = FALSE, +MenuConfig = FALSE, +ToolBoxConfig = FALSE, +GroupId = SfxGroupId::Format; +] + SfxBoolItem Combobox
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - include/svx include/vcl officecfg/registry svx/sdi sw/inc sw/Library_sw.mk sw/Library_swui.mk sw/sdi sw/source sw/uiconfig sw/UIConfig
Rebased ref, commits from common ancestor: commit 9ab279dbb665c2ac60c5b0de45158f17b4118483 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jul 12 16:26:31 2022 +0300 wip translate Signed-off-by: Mert Tumer diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 573f036128c8..f8e162a973a6 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -570,7 +570,7 @@ class SdrAngleItem; #define SID_FM_FILECONTROL ( SID_SVX_START + 605 ) //( SID_SVX_START + 606 ) is used by SID_DRAWTBX_REDACTED_EXPORT #define SID_FM_NAVIGATIONBAR( SID_SVX_START + 607 ) -//FREE +#define SID_FM_TRANSLATE( SID_SVX_START + 608 ) //FREE #define SID_FM_DELETEROWS ( SID_SVX_START + 610 ) //FREE diff --git a/include/vcl/unohelp3.hxx b/include/vcl/unohelp3.hxx new file mode 100644 index ..2d3bfb4e5f28 --- /dev/null +++ b/include/vcl/unohelp3.hxx @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace vcl::unohelper { + +class VCL_DLLPUBLIC HtmlTransferable final : +public css::datatransfer::XTransferable, +public ::cppu::OWeakObject +{ +private: +OStringdata; + +public: +HtmlTransferable( OString sData ); +virtual ~HtmlTransferable() override; + +// css::uno::XInterface +css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; +void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } +void SAL_CALL release() noexcept override { OWeakObject::release(); } + +// css::datatransfer::XTransferable +css::uno::Any SAL_CALL getTransferData( const css::datatransfer::DataFlavor& aFlavor ) override; +css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) override; +sal_Bool SAL_CALL isDataFlavorSupported( const css::datatransfer::DataFlavor& aFlavor ) override; +}; + +} // namespace vcl::unohelper diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 37996759a90d..2f82b9f1711f 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -1333,6 +1333,14 @@ 1 + + + Translate Page... + + + 1 + + Co~lumns... diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 9ab00de7e881..6b5fb5021370 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1596,6 +1596,22 @@ SfxBoolItem NavigationBar SID_FM_NAVIGATIONBAR GroupId = SfxGroupId::Controls; ] +SfxBoolItem Translate SID_FM_TRANSLATE +[ +AutoUpdate = FALSE, +FastCall = TRUE, +ReadOnlyDoc = FALSE, +Toggle = FALSE, +Container = FALSE, +RecordAbsolute = FALSE, +RecordPerSet; + +AccelConfig = FALSE, +MenuConfig = FALSE, +ToolBoxConfig = FALSE, +GroupId = SfxGroupId::Format; +] + SfxBoolItem Combobox SID_INSERT_COMBOBOX diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index a49d53d0509f..5408e28b867a 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -91,6 +91,7 @@ $(eval $(call gb_Library_use_externals,sw,\ icuuc \ icu_headers \ libxml2 \ +curl \ )) $(eval $(call gb_Library_add_exception_objects,sw,\ diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index 4c1d9614f56c..f4cd9cbf5432 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -150,6 +150,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\ sw/source/ui/misc/pgfnote \ sw/source/ui/misc/pggrid \ sw/source/ui/misc/srtdlg \ +
[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - 60 commits - binaryurp/source chart2/source config_host.mk.in configure.ac connectivity/source cui/Library_cui.mk cui/Module_cui.mk cu
Rebased ref, commits from common ancestor: commit fe2d708d32cf04bb3da22fdbd9806fb8b5b8f7d7 Author: Mert Tumer AuthorDate: Tue Jul 5 12:03:27 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jul 12 14:06:04 2022 +0300 wip translate Signed-off-by: Mert Tumer diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 573f036128c8..f8e162a973a6 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -570,7 +570,7 @@ class SdrAngleItem; #define SID_FM_FILECONTROL ( SID_SVX_START + 605 ) //( SID_SVX_START + 606 ) is used by SID_DRAWTBX_REDACTED_EXPORT #define SID_FM_NAVIGATIONBAR( SID_SVX_START + 607 ) -//FREE +#define SID_FM_TRANSLATE( SID_SVX_START + 608 ) //FREE #define SID_FM_DELETEROWS ( SID_SVX_START + 610 ) //FREE diff --git a/include/vcl/unohelp3.hxx b/include/vcl/unohelp3.hxx new file mode 100644 index ..2d3bfb4e5f28 --- /dev/null +++ b/include/vcl/unohelp3.hxx @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace vcl::unohelper { + +class VCL_DLLPUBLIC HtmlTransferable final : +public css::datatransfer::XTransferable, +public ::cppu::OWeakObject +{ +private: +OStringdata; + +public: +HtmlTransferable( OString sData ); +virtual ~HtmlTransferable() override; + +// css::uno::XInterface +css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; +void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } +void SAL_CALL release() noexcept override { OWeakObject::release(); } + +// css::datatransfer::XTransferable +css::uno::Any SAL_CALL getTransferData( const css::datatransfer::DataFlavor& aFlavor ) override; +css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) override; +sal_Bool SAL_CALL isDataFlavorSupported( const css::datatransfer::DataFlavor& aFlavor ) override; +}; + +} // namespace vcl::unohelper diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 37996759a90d..2f82b9f1711f 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -1333,6 +1333,14 @@ 1 + + + Translate Page... + + + 1 + + Co~lumns... diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 9ab00de7e881..6b5fb5021370 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1596,6 +1596,22 @@ SfxBoolItem NavigationBar SID_FM_NAVIGATIONBAR GroupId = SfxGroupId::Controls; ] +SfxBoolItem Translate SID_FM_TRANSLATE +[ +AutoUpdate = FALSE, +FastCall = TRUE, +ReadOnlyDoc = FALSE, +Toggle = FALSE, +Container = FALSE, +RecordAbsolute = FALSE, +RecordPerSet; + +AccelConfig = FALSE, +MenuConfig = FALSE, +ToolBoxConfig = FALSE, +GroupId = SfxGroupId::Format; +] + SfxBoolItem Combobox SID_INSERT_COMBOBOX diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index a49d53d0509f..5408e28b867a 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -91,6 +91,7 @@ $(eval $(call gb_Library_use_externals,sw,\ icuuc \ icu_headers \ libxml2 \ +curl \ )) $(eval $(call gb_Library_add_exception_objects,sw,\ diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index 4c1d9614f56c..f4cd9cbf5432 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -150,6 +150,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\ sw/source/ui/misc/pgfnote \ sw/source/ui/misc/pggrid \ sw/source/ui/misc/srtdlg \ +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/source cui/uiconfig desktop/source include/svtools lingucomponent/source officecfg/registry svtools/source
cui/source/options/optlanguagetool.cxx|4 cui/source/options/optlanguagetool.hxx|1 cui/uiconfig/ui/langtoolconfigpage.ui | 227 +- desktop/source/lib/init.cxx |3 include/svtools/languagetoolcfg.hxx |3 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx | 16 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs|7 svtools/source/config/languagetoolcfg.cxx | 16 8 files changed, 172 insertions(+), 105 deletions(-) New commits: commit 3a7a58d8b86bffed074bee56ad96fd3e673ef040 Author: Mert Tumer AuthorDate: Mon Jul 4 19:52:49 2022 +0300 Commit: Andras Timar CommitDate: Tue Jul 5 11:28:39 2022 +0200 Added option to disable ssl verification for languagetool This will allow to use self-signed certificates with local run languagetool APIs Signed-off-by: Mert Tumer Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136811 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx index 38807bc337d3..fc7a42536051 100644 --- a/cui/source/options/optlanguagetool.cxx +++ b/cui/source/options/optlanguagetool.cxx @@ -29,6 +29,7 @@ OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage, , m_xUsernameED(m_xBuilder->weld_entry("username")) , m_xApiKeyED(m_xBuilder->weld_entry("apikey")) , m_xActivateBox(m_xBuilder->weld_check_button("activate")) +, m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl")) , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings")) { m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, CheckHdl)); @@ -44,6 +45,7 @@ void OptLanguageToolTabPage::EnableControls(bool bEnable) rLanguageOpts.setEnabled(bEnable); m_xApiSettingsFrame->set_visible(bEnable); m_xActivateBox->set_active(bEnable); + m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != true); } IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, weld::Toggleable&, void) @@ -57,6 +59,7 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*) m_xBaseURLED->set_text(rLanguageOpts.getBaseURL()); m_xUsernameED->set_text(rLanguageOpts.getUsername()); m_xApiKeyED->set_text(rLanguageOpts.getApiKey()); + m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != true); } bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*) @@ -65,6 +68,7 @@ bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*) rLanguageOpts.setBaseURL(m_xBaseURLED->get_text()); rLanguageOpts.setUsername(m_xUsernameED->get_text()); rLanguageOpts.setApiKey(m_xApiKeyED->get_text()); + rLanguageOpts.setSSLVerification(m_xSSLDisableVerificationBox->get_active() != true); return false; } diff --git a/cui/source/options/optlanguagetool.hxx b/cui/source/options/optlanguagetool.hxx index 46a60ecbe103..85e0238b0318 100644 --- a/cui/source/options/optlanguagetool.hxx +++ b/cui/source/options/optlanguagetool.hxx @@ -36,6 +36,7 @@ private: std::unique_ptr m_xUsernameED; std::unique_ptr m_xApiKeyED; std::unique_ptr m_xActivateBox; +std::unique_ptr m_xSSLDisableVerificationBox; std::unique_ptr m_xApiSettingsFrame; void EnableControls(bool bEnable); diff --git a/cui/uiconfig/ui/langtoolconfigpage.ui b/cui/uiconfig/ui/langtoolconfigpage.ui index 7b822325e3f1..237040fa76b7 100644 --- a/cui/uiconfig/ui/langtoolconfigpage.ui +++ b/cui/uiconfig/ui/langtoolconfigpage.ui @@ -76,16 +76,130 @@ True False -5 -12 - + True False -start -Base URL: -True -baseurl +5 +12 + + +True +False +start +Base URL: +True +baseurl + + +0 +0 + + + + +True +True +True + + +1 +0 +
[Libreoffice-commits] core.git: Changes to 'private/mert/wip_deepl'
New branch 'private/mert/wip_deepl' available with the following commits: commit 40175032ec98383a41b5008e56a68d03b486e1ba Author: Mert Tumer Date: Tue Jul 5 12:03:27 2022 +0300 wip translate Signed-off-by: Mert Tumer commit 4fee1409c404d97a7c6e27e06470167d8cf8839a Author: Mert Tumer Date: Mon Jul 4 19:52:49 2022 +0300 Added option to disable ssl verification for languagetool This will allow to use self-signed certificates with local run languagetool APIs Signed-off-by: Mert Tumer Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source
desktop/source/lib/init.cxx | 34 ++ 1 file changed, 34 insertions(+) New commits: commit 2b8d12bae6b1cf83e6f2e65f6d90afe8fc5a3c58 Author: Mert Tumer AuthorDate: Fri Jun 10 13:09:51 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jun 14 16:13:34 2022 +0200 lok: set LanguageTool config parameters from environment Signed-off-by: Mert Tumer Change-Id: Ic7343439536abee626c269d2a824bb36f9abc40f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135583 Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 63ad2bbad39c..ac644c8b02ba 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -127,6 +127,7 @@ #include #include #include +#include #include #include #ifdef IOS @@ -6561,6 +6562,38 @@ void setCertificateDir() } } +void setLanguageToolConfig() +{ +const char* pEnabled = ::getenv("LANGUAGETOOL_ENABLED"); +const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL"); +const char* pUsername = ::getenv("LANGUAGETOOL_USERNAME"); +const char* pApikey = ::getenv("LANGUAGETOOL_APIKEY"); +if (pEnabled && pBaseUrlString) +{ +OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8); +if (aEnabled != "true") +return; +OUString aBaseUrl = OStringToOUString(pBaseUrlString, RTL_TEXTENCODING_UTF8); +try +{ +SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get(); +rLanguageOpts.setBaseURL(aBaseUrl); +rLanguageOpts.setEnabled(true); +if (pUsername && pApikey) +{ +OUString aUsername = OStringToOUString(pUsername, RTL_TEXTENCODING_UTF8); +OUString aApiKey = OStringToOUString(pApikey, RTL_TEXTENCODING_UTF8); +rLanguageOpts.setUsername(aUsername); +rLanguageOpts.setApiKey(aApiKey); +} +} +catch(uno::Exception const& rException) +{ +SAL_WARN("lok", "Failed to set LanguageTool API settings: " << rException.Message); +} +} +} + } static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char* pUserProfileUrl) @@ -6875,6 +6908,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char #endif setCertificateDir(); +setLanguageToolConfig(); if (bNotebookbar) {
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svtools include/unotools lingucomponent
Repository.mk|1 cui/Library_cui.mk |1 cui/UIConfig_cui.mk |1 cui/inc/treeopt.hrc |3 cui/source/options/optlanguagetool.cxx | 76 + cui/source/options/optlanguagetool.hxx | 44 + cui/source/options/treeopt.cxx |2 cui/uiconfig/ui/langtoolconfigpage.ui| 240 ++ include/sfx2/pageids.hxx |1 include/svtools/languagetoolcfg.hxx | 59 + include/svtools/strings.hrc |1 include/unotools/lingucfg.hxx|2 lingucomponent/Library_LanguageTool.mk | 48 + lingucomponent/Module_lingucomponent.mk |1 lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu | 30 lingucomponent/source/spellcheck/languagetool/LanguageTool.component | 26 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx| 394 ++ lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx| 91 ++ officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs | 30 postprocess/CustomTarget_registry.mk |1 postprocess/Rdb_services.mk |1 scripting/source/stringresource/stringresource.cxx |1 svtools/Library_svt.mk |1 svtools/source/config/languagetoolcfg.cxx| 164 unotools/source/config/lingucfg.cxx | 21 25 files changed, 1239 insertions(+), 1 deletion(-) New commits: commit 7686dceb70881e8a3c4ac7f18ced15e5202de8c7 Author: Mert Tumer AuthorDate: Tue May 10 13:06:06 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jun 14 16:13:22 2022 +0200 LanguageTool Grammar Checker implementation Signed-off-by: Mert Tumer Change-Id: I275cbea668afc5beb5147370119631df8b6a2d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135464 diff --git a/Repository.mk b/Repository.mk index 55a8d77f297d..6dd4aebbe9cd 100644 --- a/Repository.mk +++ b/Repository.mk @@ -319,6 +319,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ acc \ + LanguageTool \ $(call gb_Helper_optional,AVMEDIA,avmedia) \ $(if $(filter MACOSX,$(OS)),\ avmediaMacAVF \ diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 88e75ee1faef..1e8023cc819c 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -180,6 +180,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgdlg \ cui/source/options/optgenrl \ cui/source/options/opthtml \ +cui/source/options/optlanguagetool \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index c70cbd94588c..a4ad452bdfee 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -138,6 +138,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optfontspage \ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ + cui/uiconfig/ui/langtoolconfigpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index c7ee66d7e8d0..952b79ea92d4 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -54,7 +54,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Writing Aids"), RID_SFXPAGE_LINGU }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx new file mode 100644 index ..38807bc337d3 --- /dev/null +++ b/cui/source/options/optlanguagetool.cxx @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the
[Libreoffice-commits] core.git: include/unotools lingucomponent/config lingucomponent/source postprocess/CustomTarget_registry.mk unotools/source
include/unotools/lingucfg.hxx |2 lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu | 30 ++ lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx | 45 +++--- postprocess/CustomTarget_registry.mk |1 unotools/source/config/lingucfg.cxx| 21 5 files changed, 70 insertions(+), 29 deletions(-) New commits: commit c3ed41752237a7a70c856dfb0d618f1c2eacea5a Author: Mert Tumer AuthorDate: Tue May 10 13:06:06 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jun 14 10:04:28 2022 +0200 Load the locales from config file for languagetool Locales needs to be read again in the Preferences/Writing Aids section and since this is a network operation it can cause a problem. Better to list all the supported locales in the xcu and load it right away. Signed-off-by: Mert Tumer Change-Id: Ifff624334627f7be259b677f9b416d6ddedfb2c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135598 Tested-by: Jenkins diff --git a/include/unotools/lingucfg.hxx b/include/unotools/lingucfg.hxx index b4a0b824e127..9117799c2f3a 100644 --- a/include/unotools/lingucfg.hxx +++ b/include/unotools/lingucfg.hxx @@ -192,6 +192,8 @@ public: bool GetDictionaryEntry( const OUString , SvtLinguConfigDictionaryEntry ) const; +bool GetLocaleListFor( const OUString , const OUString , css::uno::Sequence< OUString > ) const; + css::uno::Sequence< OUString > GetDisabledDictionaries() const; std::vector< SvtLinguConfigDictionaryEntry > GetActiveDictionariesByFormat( std::u16string_view rFormatName ) const; diff --git a/lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu b/lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu new file mode 100644 index ..ce3d6033d0c2 --- /dev/null +++ b/lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu @@ -0,0 +1,30 @@ + + +http://openoffice.org/2004/installation; xmlns:oor="http://openoffice.org/2001/registry; xmlns:xs="http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> + + + + +ar ast-ES be-BY br-FR ca-ES ca-ES-valencia zh-CN da-DK nl nl-BE en en-AU en-CA en-CA en-GB en-NZ en-ZA en-US fr gl-ES de de-AT de-DE de-DE de-CH el-GR ga-IE it ja-JP km-KH nb no fa pl-PL pt pt-AO pt-BR pt-MZ pt-PT ro-RO ru-RU de-DE-x-simple-language sk-SK sl-SI es es-AR sv tl-PH ta-IN uk-UA + + + + + + diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx index 06b4fcb64175..d7d53c015860 100644 --- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx +++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx @@ -35,11 +35,12 @@ #include #include #include -#include #include #include #include #include +#include +#include using namespace osl; using namespace com::sun::star; @@ -108,40 +109,26 @@ sal_Bool SAL_CALL LanguageToolGrammarChecker::hasLocale(const Locale& rLocale) Sequence SAL_CALL LanguageToolGrammarChecker::getLocales() { +MutexGuard aGuard(GetLinguMutex()); + if (m_aSuppLocales.hasElements()) return m_aSuppLocales; -SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get(); -OString localeUrl = OUStringToOString(rLanguageOpts.getLocaleListURL(), RTL_TEXTENCODING_UTF8); -if (localeUrl.isEmpty()) -{ -return m_aSuppLocales; -} -tools::Long statusCode = 0; -std::string response = makeHttpRequest(localeUrl, HTTP_METHOD::HTTP_GET, OString(), statusCode); -if (statusCode != 200) -{ -return m_aSuppLocales; -} -if (response.empty()) -{ -return m_aSuppLocales; -} -boost::property_tree::ptree root; -std::stringstream aStream(response); -boost::property_tree::read_json(aStream, root); -size_t length = root.size(); -m_aSuppLocales.realloc(length); +SvtLinguConfig aLinguCfg; +uno::Sequence aLocaleList; +aLinguCfg.GetLocaleListFor("GrammarCheckers", "org.openoffice.lingu.LanguageToolGrammarChecker", + aLocaleList); + +auto nLength = aLocaleList.getLength(); +m_aSuppLocales.realloc(nLength); auto pArray = m_aSuppLocales.getArray(); -int i = 0; -for (auto it = root.begin(); it != root.end(); it++, i++) +auto pLocaleList = aLocaleList.getArray(); + +for (auto i = 0; i < nLength; i++) { -boost::property_tree::ptree& localeItem = it->second; -const std::string longCode = localeItem.get("longCode"); -Locale aLocale = LanguageTag::convertToLocale( -OUString(longCode.c_str(), longCode.length(), RTL_TEXTENCODING_UTF8)); -
[Libreoffice-commits] core.git: cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svtools lingucomponent/Library_LanguageTool.mk lingucomponent/Module_linguco
Repository.mk|1 cui/Library_cui.mk |1 cui/UIConfig_cui.mk |1 cui/inc/treeopt.hrc |3 cui/source/options/optlanguagetool.cxx | 76 + cui/source/options/optlanguagetool.hxx | 44 + cui/source/options/treeopt.cxx |2 cui/uiconfig/ui/langtoolconfigpage.ui| 240 + include/sfx2/pageids.hxx |1 include/svtools/languagetoolcfg.hxx | 59 + include/svtools/strings.hrc |1 lingucomponent/Library_LanguageTool.mk | 48 + lingucomponent/Module_lingucomponent.mk |1 lingucomponent/source/spellcheck/languagetool/LanguageTool.component | 26 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx| 407 ++ lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx| 91 ++ officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs | 30 scripting/source/stringresource/stringresource.cxx |1 svtools/Library_svt.mk |1 svtools/source/config/languagetoolcfg.cxx| 164 20 files changed, 1197 insertions(+), 1 deletion(-) New commits: commit d952df361a5e190246d7a0738ae5347b82cd57b5 Author: Mert Tumer AuthorDate: Tue May 10 13:06:06 2022 +0300 Commit: Christian Lohmaier CommitDate: Fri Jun 10 13:52:17 2022 +0200 LanguageTool Grammar Checker implementation Signed-off-by: Mert Tumer Change-Id: I275cbea668afc5beb5147370119631df8b6a2d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135178 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/Repository.mk b/Repository.mk index 4004cbe142df..5ee1546b2504 100644 --- a/Repository.mk +++ b/Repository.mk @@ -368,6 +368,7 @@ endif $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ avmedia \ + LanguageTool \ $(call gb_Helper_optional,AVMEDIA, \ $(if $(filter MACOSX,$(OS)),\ avmediaMacAVF \ diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 8f8e73afe6cd..cb26653b395d 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -187,6 +187,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/options/optgdlg \ cui/source/options/optgenrl \ cui/source/options/opthtml \ +cui/source/options/optlanguagetool \ cui/source/options/optinet2 \ cui/source/options/optjava \ cui/source/options/optjsearch \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index eda70a1dd29c..cdedcc15a857 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -143,6 +143,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optfontspage \ cui/uiconfig/ui/optgeneralpage \ cui/uiconfig/ui/opthtmlpage \ + cui/uiconfig/ui/langtoolconfigpage \ cui/uiconfig/ui/optionsdialog \ cui/uiconfig/ui/optjsearchpage \ cui/uiconfig/ui/optlanguagespage \ diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc index a3033143983b..f4fc28c5725b 100644 --- a/cui/inc/treeopt.hrc +++ b/cui/inc/treeopt.hrc @@ -55,7 +55,8 @@ const std::pair SID_LANGUAGE_OPTIONS_RES[] = { NC_("SID_LANGUAGE_OPTIONS_RES", "Writing Aids"), RID_SFXPAGE_LINGU }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"), RID_SVXPAGE_JSEARCH_OPTIONS }, { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"), RID_SVXPAGE_ASIAN_LAYOUT }, -{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL } +{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"), RID_SVXPAGE_OPTIONS_CTL }, +{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"), RID_SVXPAGE_LANGTOOL_OPTIONS } }; const std::pair SID_INET_DLG_RES[] = diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx new file mode 100644 index ..38807bc337d3 --- /dev/null +++ b/cui/source/options/optlanguagetool.cxx @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source filter/source
desktop/source/lib/init.cxx|9 - filter/source/storagefilterdetect/filterdetect.cxx |7 +++ 2 files changed, 15 insertions(+), 1 deletion(-) New commits: commit 49f8a7333bddceb3b8bd18d81ff593fa39f5a437 Author: Mert Tumer AuthorDate: Wed Apr 6 16:59:53 2022 +0300 Commit: Andras Timar CommitDate: Wed Apr 6 22:20:14 2022 +0200 lok: load template documents as regular documents otherwise lok cannot save them directly because libreoffice will try to open a save-as dialog For odg, change the draw8_template type draw8 Signed-off-by: Mert Tumer Change-Id: I34b0ed03adcac89eaa926f8ae6c57e6f622a90f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132633 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 5721b56573d6..f3396a3f4bc7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2380,7 +2380,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, Application::SetDialogCancelMode(DialogCancelMode::LOKSilent); } -uno::Sequence aFilterOptions(3); +uno::Sequence aFilterOptions(4); aFilterOptions[0] = css::beans::PropertyValue( "FilterOptions", 0, uno::makeAny(aOptions), @@ -2427,6 +2427,13 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, aFilterOptions[3].Value <<= nUpdateDoc; */ +// set this explicitly false to be able to load template files +// as regular files, otherwise we cannot save them; it will try +// to bring saveas dialog which cannot work with LOK case +aFilterOptions[3].Name = "AsTemplate"; +aFilterOptions[3].Value <<= false; + + const int nThisDocumentId = nDocumentIdCounter++; SfxViewShell::SetCurrentDocId(ViewShellDocId(nThisDocumentId)); uno::Reference xComponent = xComponentLoader->loadComponentFromURL( diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx index 02ed875c6699..694251c389b3 100644 --- a/filter/source/storagefilterdetect/filterdetect.cxx +++ b/filter/source/storagefilterdetect/filterdetect.cxx @@ -33,6 +33,8 @@ #include #include +#include + using namespace ::com::sun::star; using utl::MediaDescriptor; @@ -103,6 +105,11 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::SequencegetPropertyValue( "MediaType" ) >>= aMediaType; aTypeName = getInternalFromMediaType( aMediaType ); +if (comphelper::LibreOfficeKit::isActive() && aTypeName == "draw8_template") +{ +// save it as draw8 instead of template format +aTypeName = "draw8"; +} } catch( const lang::WrappedTargetException& aWrap )
[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.4-60'
Tag 'cp-6.4-60' created by Andras Timar at 2022-04-06 20:47 + cp-6.4-60 Changes since cp-6.4-59-14: --- 0 files changed ---
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source filter/source
desktop/source/lib/init.cxx|9 - filter/source/storagefilterdetect/filterdetect.cxx |7 +++ 2 files changed, 15 insertions(+), 1 deletion(-) New commits: commit 8461a6428c8e0e4e21cd8d340a389e34b64b68de Author: Mert Tumer AuthorDate: Wed Apr 6 16:59:53 2022 +0300 Commit: Gökay ŞATIR CommitDate: Wed Apr 6 18:36:08 2022 +0200 lok: load template documents as regular documents otherwise lok cannot save them directly because libreoffice will try to open a save-as dialog For odg, change the draw8_template type draw8 Signed-off-by: Mert Tumer Change-Id: I34b0ed03adcac89eaa926f8ae6c57e6f622a90f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132633 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fdf93283101f..3e4265969053 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2540,7 +2540,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, Application::SetDialogCancelMode(DialogCancelMode::LOKSilent); } -uno::Sequence aFilterOptions(3); +uno::Sequence aFilterOptions(4); aFilterOptions[0] = css::beans::PropertyValue( "FilterOptions", 0, uno::makeAny(aOptions), @@ -2587,6 +2587,13 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, aFilterOptions[3].Value <<= nUpdateDoc; */ +// set this explicitly false to be able to load template files +// as regular files, otherwise we cannot save them; it will try +// to bring saveas dialog which cannot work with LOK case +aFilterOptions[3].Name = "AsTemplate"; +aFilterOptions[3].Value <<= false; + + const int nThisDocumentId = nDocumentIdCounter++; SfxViewShell::SetCurrentDocId(ViewShellDocId(nThisDocumentId)); uno::Reference xComponent = xComponentLoader->loadComponentFromURL( diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx index f2eba546a4d3..64ee68175473 100644 --- a/filter/source/storagefilterdetect/filterdetect.cxx +++ b/filter/source/storagefilterdetect/filterdetect.cxx @@ -32,6 +32,8 @@ #include #include +#include + using namespace ::com::sun::star; using utl::MediaDescriptor; @@ -102,6 +104,11 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::SequencegetPropertyValue( "MediaType" ) >>= aMediaType; aTypeName = getInternalFromMediaType( aMediaType ); +if (comphelper::LibreOfficeKit::isActive() && aTypeName == "draw8_template") +{ +// save it as draw8 instead of template format +aTypeName = "draw8"; +} } catch( const lang::WrappedTargetException& aWrap )
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/source
sw/source/ui/table/instable.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit a4e7cc2a12ca3ea90ec21de96aa038f2447b40f8 Author: Mert Tumer AuthorDate: Fri Mar 25 17:56:30 2022 +0300 Commit: Gökay ŞATIR CommitDate: Fri Mar 25 19:39:10 2022 +0100 make default selected table style to Default Table Style for only online unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails because tables that have pre-applied style resets the style of the elements in their cells when a new row is inserted and the ui test above relies on that. For now this is LOK only Signed-off-by: Mert Tumer Change-Id: I2f60376fc2d929498aef45259a5ef291922ccdcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132124 Tested-by: Jenkins CollaboraOffice Reviewed-by: Gökay ŞATIR diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 94e29d28665d..1a3bafb14dc2 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -149,8 +149,13 @@ void SwInsTableDlg::InitAutoTableFormat() // Change this min variable if you add autotable manually. minTableIndexInLb = 1; maxTableIndexInLb = minTableIndexInLb + static_cast(pTableTable->size()); -m_xLbFormat->select( minTableIndexInLb ); -tbIndex = lbIndexToTableIndex( minTableIndexInLb ); +// 1 means default table style +// unfortunately when the table has a style sw/qa/uitest/writer_tests4/tdf115573.py fails +// because tables that have pre-applied style resets the style of the elements in their cells +// when a new row is inserted and the ui test above relies on that. For now this is LOK only +lbIndex = comphelper::LibreOfficeKit::isActive() ? 1 : 0; +m_xLbFormat->select( lbIndex ); +tbIndex = lbIndexToTableIndex(lbIndex); SelFormatHdl( *m_xLbFormat ); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/source
sw/source/ui/table/instable.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit f1daf818764ea867fe37670433a4036c5154428e Author: Mert Tumer AuthorDate: Wed Mar 23 14:23:23 2022 +0300 Commit: Andras Timar CommitDate: Wed Mar 23 16:55:14 2022 +0100 sw: change inserttable style option default to 1 Right now it is default to NONE in the list if the user explicitly choses otherwise but that does not align with inserttable option on the toolbar there it is defaulted to "Default Table Style" 1 means "Default Table Style" Signed-off-by: Mert Tumer Change-Id: I1db19f0292ac6775653b0db3f2860fea9e3b0adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131971 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index b700b85d53fc..94e29d28665d 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -149,9 +149,8 @@ void SwInsTableDlg::InitAutoTableFormat() // Change this min variable if you add autotable manually. minTableIndexInLb = 1; maxTableIndexInLb = minTableIndexInLb + static_cast(pTableTable->size()); -lbIndex = 0; -m_xLbFormat->select( lbIndex ); -tbIndex = lbIndexToTableIndex(lbIndex); +m_xLbFormat->select( minTableIndexInLb ); +tbIndex = lbIndexToTableIndex( minTableIndexInLb ); SelFormatHdl( *m_xLbFormat ); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source
sc/source/ui/docshell/docsh.cxx | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) New commits: commit 69deb41027783a8ca43aaf76816446234bc3a0a7 Author: Mert Tumer AuthorDate: Mon Mar 21 14:07:13 2022 +0300 Commit: Szymon Kłos CommitDate: Tue Mar 22 12:44:43 2022 +0100 android: Fix tab name on CSV still becomes tempfile name Unfortunately, in order for isLOKMObilePhone to work we need to send deviceFormFactor on document load but at this stage the document is still not loaded and the control does not work here Signed-off-by: Mert Tumer Change-Id: I5388cf4a049dbf007a1fd79abefb64bed580eea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131900 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index f8258883a98b..cad8403477d9 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + #include + #include #include @@ -1288,23 +1290,21 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) sc::SetFormulaDirtyContext aCxt; m_aDocument.SetAllFormulasDirty(aCxt); -bool bIsMobile = comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() -&& SfxViewShell::Current()->isLOKMobilePhone(); // for mobile case, we use a copy of the original document and give it a temporary name before editing // Therefore, the sheet name becomes ugly, long and nonsensical. -if (!bIsMobile) -// The same resulting name has to be handled in -// ScExternalRefCache::initializeDoc() and related, hence -// pass 'true' for RenameTab()'s bExternalDocument for a -// composed name so ValidTabName() will not be checked, -// which could veto the rename in case it contained -// characters that Excel does not handle. If we wanted to -// change that then it needed to be handled in all -// corresponding places of the external references -// manager/cache. Likely then we'd also need a method to -// compose a name excluding such characters. -m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); - +#if !(defined ANDROID) +// The same resulting name has to be handled in +// ScExternalRefCache::initializeDoc() and related, hence +// pass 'true' for RenameTab()'s bExternalDocument for a +// composed name so ValidTabName() will not be checked, +// which could veto the rename in case it contained +// characters that Excel does not handle. If we wanted to +// change that then it needed to be handled in all +// corresponding places of the external references +// manager/cache. Likely then we'd also need a method to +// compose a name excluding such characters. +m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); +#endif bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol(); bOverflowCell = aImpEx.IsOverflowCell();
[Libreoffice-commits] core.git: sw/source
sw/source/core/crsr/viscrs.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 3a2c156eb8b5e68e9de430e788a57e0c220f7e3a Author: Mert Tumer AuthorDate: Fri Feb 25 13:05:28 2022 +0300 Commit: Mert Tumer CommitDate: Mon Mar 14 11:53:31 2022 +0100 dont send text selection start/end when there is no selection when there is no selection, startrect and endrect get the cursor coordinates, we should not send it. Otherwise this causes selection handles to appear on online Signed-off-by: Mert Tumer Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131520 Tested-by: Jenkins diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 26e43813575d..0501162a2a16 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -521,6 +521,13 @@ OString SwSelPaintRects::getLOKPayload( int nType, int nViewId, bool* ignore ) c SwRect aEndRect; FillStartEnd(aStartRect, aEndRect); +// no selection rect +if (!size()) +{ +*ignore = true; +return OString(); +} + if( nType == LOK_CALLBACK_TEXT_SELECTION_START ) { if (aStartRect.HasArea())
[Libreoffice-commits] core.git: 2 commits - include/svtools sc/source svx/source
include/svtools/ctrlbox.hxx |1 + sc/source/ui/view/gridwin.cxx|7 +++ svx/source/tbxctrls/tbcontrl.cxx |5 - 3 files changed, 12 insertions(+), 1 deletion(-) New commits: commit dc05d912b56751ee53e2ee3d2638d85829b6a2d9 Author: Mert Tumer AuthorDate: Tue Jan 18 12:57:16 2022 +0300 Commit: Mert Tumer CommitDate: Mon Mar 14 11:52:59 2022 +0100 set active element to -1 when no selection for fontnamebox FontNameBox sets the currentVal to emptystring when there's a mixed font-name selection on the text but does not update the active_element which is incorrect whereas other comboboxes such as FontSize does it correctly. Signed-off-by: Mert Tumer Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131518 Tested-by: Jenkins diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 28730d16e85a..ca45b081cf5a 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -368,6 +368,7 @@ public: int get_active() const { return m_xComboBox->get_active(); } OUString get_active_text() const { return m_xComboBox->get_active_text(); } void set_active_or_entry_text(const OUString& rText); +void set_active(int nPos) { m_xComboBox->set_active(nPos); } int get_count() const { return m_xComboBox->get_count(); } OUString get_text(int nIndex) const { return m_xComboBox->get_text(nIndex); } void set_sensitive(bool bSensitive) { m_xComboBox->set_sensitive(bSensitive); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index d9971a2e5f21..70b14ee14bba 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3159,8 +3159,11 @@ void SvxFontNameBox_Base::statusChanged_Impl( const css::frame::FeatureStateEven css::awt::FontDescriptor aFontDesc; if ( rEvent.State >>= aFontDesc ) Update(); -else +else { +// no active element; delete value in the display +m_xWidget->set_active(-1); set_active_or_entry_text(""); +} m_xWidget->save_value(); } } commit 74d24d03afc58a535d3afb7d0c2d172fa1636829 Author: Mert Tumer AuthorDate: Wed Jan 12 19:02:23 2022 +0300 Commit: Mert Tumer CommitDate: Mon Mar 14 11:52:47 2022 +0100 lok: remove residue text selection when there's none in the core Residue selection can stay at the browser even after changing the cellcursor pos make sure to clean it up if there is no selection rectangle in reality to be synced with core. Signed-off-by: Mert Tumer Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351 Tested-by: Jenkins CollaboraOffice Tested-by: Henry Castro Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131517 diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index e676dcfadd42..b5c6965cbcc1 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5932,6 +5932,13 @@ void ScGridWindow::notifyKitCellCursor() const pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_CURSOR, getCellCursor().getStr()); if (bListValButton && aListValPos == mrViewData.GetCurPos()) updateLOKValListButton(true, aListValPos); +std::vector aRects; +GetSelectionRects(aRects); +if (aRects.empty() || !mrViewData.IsActive()) +{ +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, ""); +SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", "EMPTY"); +} } void ScGridWindow::notifyKitCellViewCursor(const SfxViewShell* pForShell) const
[Libreoffice-commits] core.git: 2 commits - desktop/source sc/source sfx2/source
desktop/source/lib/init.cxx |7 ++- sc/source/ui/docshell/docsh.cxx | 29 ++--- sfx2/source/view/viewsh.cxx |1 + 3 files changed, 25 insertions(+), 12 deletions(-) New commits: commit 422fd364934d93ea02a614e8f431bfc1126b5a2d Author: Mert Tumer AuthorDate: Wed Dec 29 16:34:38 2021 +0300 Commit: Mert Tumer CommitDate: Mon Mar 14 11:52:33 2022 +0100 LOK android: Fix csv sheet name becomes temp name Signed-off-by: Mert Tumer Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127684 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131516 diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 4179a0ba5acf..8c64e3a8416f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -137,6 +137,8 @@ #include #include +#include + using namespace com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::lang::XMultiServiceFactory; @@ -1286,17 +1288,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) sc::SetFormulaDirtyContext aCxt; m_aDocument.SetAllFormulasDirty(aCxt); -// The same resulting name has to be handled in -// ScExternalRefCache::initializeDoc() and related, hence -// pass 'true' for RenameTab()'s bExternalDocument for a -// composed name so ValidTabName() will not be checked, -// which could veto the rename in case it contained -// characters that Excel does not handle. If we wanted to -// change that then it needed to be handled in all -// corresponding places of the external references -// manager/cache. Likely then we'd also need a method to -// compose a name excluding such characters. -m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); +bool bIsMobile = comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() +&& SfxViewShell::Current()->isLOKMobilePhone(); +// for mobile case, we use a copy of the original document and give it a temporary name before editing +// Therefore, the sheet name becomes ugly, long and nonsensical. +if (!bIsMobile) +// The same resulting name has to be handled in +// ScExternalRefCache::initializeDoc() and related, hence +// pass 'true' for RenameTab()'s bExternalDocument for a +// composed name so ValidTabName() will not be checked, +// which could veto the rename in case it contained +// characters that Excel does not handle. If we wanted to +// change that then it needed to be handled in all +// corresponding places of the external references +// manager/cache. Likely then we'd also need a method to +// compose a name excluding such characters. +m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol(); commit 2df5a083a83f6e83ac45465d4b65887421ac945d Author: Mert Tumer AuthorDate: Mon Jan 10 13:23:03 2022 +0300 Commit: Mert Tumer CommitDate: Mon Mar 14 11:52:20 2022 +0100 lok: Fix freshly added comments are not displayed Signed-off-by: Mert Tumer Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131515 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b5db7f8cb1e6..0e1c47e9b5dc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1479,13 +1479,18 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() << "] on " << m_queue1.size() << " entries."); bool bIsChartActive = false; +bool bIsComment = false; if (type == LOK_CALLBACK_GRAPHIC_SELECTION) { LokChartHelper aChartHelper(SfxViewShell::Current()); bIsChartActive = aChartHelper.GetWindow() != nullptr; } +else if (type == LOK_CALLBACK_COMMENT) +{ +bIsComment = true; +} -if (callbacksDisabled() &&
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 2 commits - desktop/source sfx2/source sw/source
desktop/source/lib/init.cxx|7 ++- sfx2/source/view/viewsh.cxx|1 + sw/source/core/crsr/viscrs.cxx |7 +++ 3 files changed, 14 insertions(+), 1 deletion(-) New commits: commit 5bd14dff1d20250f52c23a11f8f54da639c072a1 Author: Mert Tumer AuthorDate: Fri Feb 25 13:05:28 2022 +0300 Commit: Mert Tumer CommitDate: Mon Mar 14 11:46:25 2022 +0100 dont send text selection start/end when there is no selection when there is no selection, startrect and endrect get the cursor coordinates, we should not send it. Otherwise this causes selection handles to appear on online Signed-off-by: Mert Tumer Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131522 diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 26e43813575d..0501162a2a16 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -521,6 +521,13 @@ OString SwSelPaintRects::getLOKPayload( int nType, int nViewId, bool* ignore ) c SwRect aEndRect; FillStartEnd(aStartRect, aEndRect); +// no selection rect +if (!size()) +{ +*ignore = true; +return OString(); +} + if( nType == LOK_CALLBACK_TEXT_SELECTION_START ) { if (aStartRect.HasArea()) commit 318e2b0e8dc7901271a121b8fd11e89cbc65d335 Author: Mert Tumer AuthorDate: Mon Jan 10 13:23:03 2022 +0300 Commit: Mert Tumer CommitDate: Mon Mar 14 11:46:14 2022 +0100 lok: Fix freshly added comments are not displayed Signed-off-by: Mert Tumer Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131521 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9720a7a78967..183578df411a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1484,13 +1484,18 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() << "] on " << m_queue1.size() << " entries."); bool bIsChartActive = false; +bool bIsComment = false; if (type == LOK_CALLBACK_GRAPHIC_SELECTION) { LokChartHelper aChartHelper(SfxViewShell::Current()); bIsChartActive = aChartHelper.GetWindow() != nullptr; } +else if (type == LOK_CALLBACK_COMMENT) +{ +bIsComment = true; +} -if (callbacksDisabled() && !bIsChartActive) +if (callbacksDisabled() && !bIsChartActive && !bIsComment) { // We drop notifications when this is set, except for important ones. // When we issue a complex command (such as .uno:InsertAnnotation) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index f4ec9b29b0a1..cbb3749ec737 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1447,6 +1447,7 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, const SfxViewShell_Impl* { case LOK_CALLBACK_FORM_FIELD_BUTTON: case LOK_CALLBACK_TEXT_SELECTION: +case LOK_CALLBACK_COMMENT: break; default: // Reject e.g. invalidate during paint.
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source
sc/source/ui/docshell/docsh.cxx | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) New commits: commit 8363d389fa70fc6a7ab16ce5b71e4ed9c815faa6 Author: Mert Tumer AuthorDate: Wed Dec 29 16:34:38 2021 +0300 Commit: Henry Castro CommitDate: Tue Mar 1 13:41:09 2022 +0100 LOK android: Fix csv sheet name becomes temp name Signed-off-by: Mert Tumer Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127583 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 2bf345635645..551ab8d03f32 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -132,6 +132,8 @@ #include #include +#include + using namespace com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::lang::XMultiServiceFactory; @@ -1305,17 +1307,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) sc::SetFormulaDirtyContext aCxt; m_aDocument.SetAllFormulasDirty(aCxt); -// The same resulting name has to be handled in -// ScExternalRefCache::initializeDoc() and related, hence -// pass 'true' for RenameTab()'s bExternalDocument for a -// composed name so ValidTabName() will not be checked, -// which could veto the rename in case it contained -// characters that Excel does not handle. If we wanted to -// change that then it needed to be handled in all -// corresponding places of the external references -// manager/cache. Likely then we'd also need a method to -// compose a name excluding such characters. -m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); +bool bIsMobile = comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() +&& SfxViewShell::Current()->isLOKMobilePhone(); +// for mobile case, we use a copy of the original document and give it a temporary name before editing +// Therefore, the sheet name becomes ugly, long and nonsensical. +if (!bIsMobile) +// The same resulting name has to be handled in +// ScExternalRefCache::initializeDoc() and related, hence +// pass 'true' for RenameTab()'s bExternalDocument for a +// composed name so ValidTabName() will not be checked, +// which could veto the rename in case it contained +// characters that Excel does not handle. If we wanted to +// change that then it needed to be handled in all +// corresponding places of the external references +// manager/cache. Likely then we'd also need a method to +// compose a name excluding such characters. +m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/source
sw/source/core/crsr/viscrs.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit bc86da350e3b5137a1a3c86b19f5c6c028b67b21 Author: Mert Tumer AuthorDate: Fri Feb 25 13:05:28 2022 +0300 Commit: Mert Tumer CommitDate: Mon Feb 28 17:54:24 2022 +0100 dont send text selection start/end when there is no selection when there is no selection, startrect and endrect get the cursor coordinates, we should not send it. Otherwise this causes selection handles to appear on online Signed-off-by: Mert Tumer Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index f81f9750b312..6b8c3c5b71a2 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -524,6 +524,13 @@ OString SwSelPaintRects::getLOKPayload( int nType, int nViewId, bool* ignore ) c SwRect aEndRect; FillStartEnd(aStartRect, aEndRect); +// no selection rect +if (!size()) +{ +*ignore = true; +return OString(); +} + if( nType == LOK_CALLBACK_TEXT_SELECTION_START ) { if (aStartRect.HasArea())
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/qa svx/source
sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 ++-- svx/source/svdraw/svdxcgv.cxx|5 - 2 files changed, 6 insertions(+), 15 deletions(-) New commits: commit 548e2d4cabda2300aeda3bbf1c686e51a7f952c5 Author: Mert Tumer AuthorDate: Wed Jan 19 14:23:52 2022 +0300 Commit: Mert Tumer CommitDate: Mon Jan 24 19:19:07 2022 +0100 lok: Set pasted text rect pos to 0, 0 Rect size change according to the length of the text however, this can make the text inserted in the negative coordinates and half of it becomes invisible. Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128868 diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index fae683532057..b39321948e32 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2466,21 +2466,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide() SdrTextObj* pTextObj = dynamic_cast(pObject); CPPUNIT_ASSERT(pTextObj); CPPUNIT_ASSERT_EQUAL(static_cast(OBJ_TEXT), pTextObj->GetObjIdentifier()); -// This test is unreliable: it gives alternating results for the following coordinates. -// As a compromise, instead of disabling it altogether, we allow for both sets of values. const Point aPos = pTextObj->GetLastBoundRect().TopLeft(); -if (aPos.getX() < 1) -{ -// We get this with 'make CppunitTest_sd_tiledrendering' -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6739), aPos.getX(), 100); -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6822), aPos.getY(), 100); -} -else -{ -// We get this with 'make check' -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(12990), aPos.getX(), 100); -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(7393), aPos.getY(), 100); -} +CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getX()); +CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getY()); } void SdTiledRenderingTest::testTdf115873() diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 88083f3e93e0..f6f707367768 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -58,6 +58,7 @@ #include #include #include +#include using namespace com::sun::star; @@ -414,7 +415,9 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po nSizY /= aDstFr.GetNumerator(); long xs=nSizX; long ys=nSizY; -Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2); +// set the pos to 0, 0 for online case +bool isLOK = comphelper::LibreOfficeKit::isActive(); +Point aPos(isLOK ? 0 : rCenter.X()-xs/2, isLOK ? 0 : rCenter.Y()-ys/2); tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); pObj->SetLogicRect(aR); rLst.InsertObject(pObj, SAL_MAX_SIZE);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sd/qa svx/source
sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 ++-- svx/source/svdraw/svdxcgv.cxx|5 - 2 files changed, 6 insertions(+), 15 deletions(-) New commits: commit 9ca4bb1e7392347b03887486cad597c0fb7ce774 Author: Mert Tumer AuthorDate: Wed Jan 19 14:23:52 2022 +0300 Commit: Mert Tumer CommitDate: Thu Jan 20 09:55:44 2022 +0100 lok: Set pasted text rect pos to 0, 0 Rect size change according to the length of the text however, this can make the text inserted in the negative coordinates and half of it becomes invisible. Signed-off-by: Mert Tumer Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 917f2eb04038..7934fb8ca34e 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2465,21 +2465,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide() SdrTextObj* pTextObj = dynamic_cast(pObject); CPPUNIT_ASSERT(pTextObj); CPPUNIT_ASSERT_EQUAL(OBJ_TEXT, pTextObj->GetObjIdentifier()); -// This test is unreliable: it gives alternating results for the following coordinates. -// As a compromise, instead of disabling it altogether, we allow for both sets of values. const Point aPos = pTextObj->GetLastBoundRect().TopLeft(); -if (aPos.getX() < 1) -{ -// We get this with 'make CppunitTest_sd_tiledrendering' -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6739), aPos.getX(), 100); -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6822), aPos.getY(), 100); -} -else -{ -// We get this with 'make check' -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(12990), aPos.getX(), 100); -CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(7393), aPos.getY(), 100); -} +CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getX()); +CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getY()); } void SdTiledRenderingTest::testTdf115873() diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 21d0451e7f3c..e53444e9c87c 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -48,6 +48,7 @@ #include #include #include +#include using namespace com::sun::star; @@ -404,7 +405,9 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po nSizY /= aDstFr.GetNumerator(); tools::Long xs=nSizX; tools::Long ys=nSizY; -Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2); +// set the pos to 0, 0 for online case +bool isLOK = comphelper::LibreOfficeKit::isActive(); +Point aPos(isLOK ? 0 : rCenter.X()-xs/2, isLOK ? 0 : rCenter.Y()-ys/2); tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); pObj->SetLogicRect(aR); rLst.InsertObject(pObj, SAL_MAX_SIZE);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/svtools svx/source
include/svtools/ctrlbox.hxx |1 + svx/source/tbxctrls/tbcontrl.cxx |5 - 2 files changed, 5 insertions(+), 1 deletion(-) New commits: commit a9db5edbccf001eec46a76c48c36812930e535a5 Author: Mert Tumer AuthorDate: Tue Jan 18 12:57:16 2022 +0300 Commit: Mert Tumer CommitDate: Tue Jan 18 13:31:24 2022 +0100 set active element to -1 when no selection for fontnamebox FontNameBox sets the currentVal to emptystring when there's a mixed font-name selection on the text but does not update the active_element which is incorrect whereas other comboboxes such as FontSize does it correctly. Signed-off-by: Mert Tumer Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 9cea6647f461..69b5aefac7dd 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -366,6 +366,7 @@ public: int get_active() const { return m_xComboBox->get_active(); } OUString get_active_text() const { return m_xComboBox->get_active_text(); } void set_active_or_entry_text(const OUString& rText); +void set_active(int nPos) { m_xComboBox->set_active(nPos); } int get_count() const { return m_xComboBox->get_count(); } OUString get_text(int nIndex) const { return m_xComboBox->get_text(nIndex); } void set_sensitive(bool bSensitive) { m_xComboBox->set_sensitive(bSensitive); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 8f8055352695..5e9727ddfe3d 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3032,8 +3032,11 @@ void SvxFontNameBox_Base::statusChanged_Impl( const css::frame::FeatureStateEven css::awt::FontDescriptor aFontDesc; if ( rEvent.State >>= aFontDesc ) Update(); -else +else { +// no active element; delete value in the display +m_xWidget->set_active(-1); set_active_or_entry_text(""); +} m_xWidget->save_value(); } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source
sc/source/ui/view/gridwin.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 5b5315073d9c73cc51c039a935ef6a5094f3923f Author: Mert Tumer AuthorDate: Wed Jan 12 19:02:23 2022 +0300 Commit: Henry Castro CommitDate: Fri Jan 14 15:47:18 2022 +0100 lok: remove residue text selection when there's none in the core Residue selection can stay at the browser even after changing the cellcursor pos make sure to clean it up if there is no selection rectangle in reality to be synced with core. Signed-off-by: Mert Tumer Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351 Tested-by: Jenkins CollaboraOffice Tested-by: Henry Castro Reviewed-by: Henry Castro diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index bb0c8bac9fe5..826550e8f391 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5597,6 +5597,13 @@ void ScGridWindow::notifyKitCellCursor() const pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_CURSOR, getCellCursor().getStr()); if (bListValButton && aListValPos == mrViewData.GetCurPos()) updateLOKValListButton(true, aListValPos); +std::vector aRects; +GetSelectionRects(aRects); +if (aRects.empty() || !mrViewData.IsActive()) +{ +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, ""); +SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", "EMPTY"); +} } void ScGridWindow::notifyKitCellViewCursor(const SfxViewShell* pForShell) const
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source sfx2/source
desktop/source/lib/init.cxx |7 ++- sfx2/source/view/viewsh.cxx |1 + 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit 98d897ff144fa97b9b4db3a0e5657630747feca9 Author: Mert Tumer AuthorDate: Mon Jan 10 13:23:03 2022 +0300 Commit: Mert Tumer CommitDate: Wed Jan 12 09:47:09 2022 +0100 lok: Fix freshly added comments are not displayed Signed-off-by: Mert Tumer Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos (cherry picked from commit 09b30a80a3b2a58d981b712f8bd184410c222535) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128229 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 632deac8fd42..0c93a7f9d626 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1477,13 +1477,18 @@ void CallbackFlushHandler::queue(const int type, const char* data) SAL_INFO("lok", "Queue: [" << type << "]: [" << payload << "] on " << m_queue1.size() << " entries."); bool bIsChartActive = false; +bool bIsComment = false; if (type == LOK_CALLBACK_GRAPHIC_SELECTION) { LokChartHelper aChartHelper(SfxViewShell::Current()); bIsChartActive = aChartHelper.GetWindow() != nullptr; } +else if (type == LOK_CALLBACK_COMMENT) +{ +bIsComment = true; +} -if (callbacksDisabled() && !bIsChartActive) +if (callbacksDisabled() && !bIsChartActive && !bIsComment) { // We drop notifications when this is set, except for important ones. // When we issue a complex command (such as .uno:InsertAnnotation) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index c59db5582ea9..f8f4f615966b 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1480,6 +1480,7 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) c { case LOK_CALLBACK_FORM_FIELD_BUTTON: case LOK_CALLBACK_TEXT_SELECTION: +case LOK_CALLBACK_COMMENT: break; default: // Reject e.g. invalidate during paint.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source
sc/source/ui/docshell/docsh.cxx | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) New commits: commit 108a6044debbe0831b7a8309e2a5fba23e384b39 Author: Mert Tumer AuthorDate: Wed Dec 29 16:34:38 2021 +0300 Commit: Andras Timar CommitDate: Tue Jan 11 13:40:44 2022 +0100 LOK android: Fix csv sheet name becomes temp name Signed-off-by: Mert Tumer Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127684 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 6a8e1e477743..f8258883a98b 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -132,6 +132,8 @@ #include #include +#include + using namespace com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::lang::XMultiServiceFactory; @@ -1286,17 +1288,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) sc::SetFormulaDirtyContext aCxt; m_aDocument.SetAllFormulasDirty(aCxt); -// The same resulting name has to be handled in -// ScExternalRefCache::initializeDoc() and related, hence -// pass 'true' for RenameTab()'s bExternalDocument for a -// composed name so ValidTabName() will not be checked, -// which could veto the rename in case it contained -// characters that Excel does not handle. If we wanted to -// change that then it needed to be handled in all -// corresponding places of the external references -// manager/cache. Likely then we'd also need a method to -// compose a name excluding such characters. -m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); +bool bIsMobile = comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() +&& SfxViewShell::Current()->isLOKMobilePhone(); +// for mobile case, we use a copy of the original document and give it a temporary name before editing +// Therefore, the sheet name becomes ugly, long and nonsensical. +if (!bIsMobile) +// The same resulting name has to be handled in +// ScExternalRefCache::initializeDoc() and related, hence +// pass 'true' for RenameTab()'s bExternalDocument for a +// composed name so ValidTabName() will not be checked, +// which could veto the rename in case it contained +// characters that Excel does not handle. If we wanted to +// change that then it needed to be handled in all +// corresponding places of the external references +// manager/cache. Likely then we'd also need a method to +// compose a name excluding such characters. +m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/); bOverflowRow = aImpEx.IsOverflowRow(); bOverflowCol = aImpEx.IsOverflowCol();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source sfx2/source
desktop/source/lib/init.cxx |7 ++- sfx2/source/view/viewsh.cxx |1 + 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit 09b30a80a3b2a58d981b712f8bd184410c222535 Author: Mert Tumer AuthorDate: Mon Jan 10 13:23:03 2022 +0300 Commit: Mert Tumer CommitDate: Mon Jan 10 13:13:40 2022 +0100 lok: Fix freshly added comments are not displayed Signed-off-by: Mert Tumer Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1ef25f2c5dc6..545e7182068e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1585,13 +1585,18 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() << "] on " << m_queue1.size() << " entries."); bool bIsChartActive = false; +bool bIsComment = false; if (type == LOK_CALLBACK_GRAPHIC_SELECTION) { LokChartHelper aChartHelper(SfxViewShell::Current()); bIsChartActive = aChartHelper.GetWindow() != nullptr; } +else if (type == LOK_CALLBACK_COMMENT) +{ +bIsComment = true; +} -if (callbacksDisabled() && !bIsChartActive) +if (callbacksDisabled() && !bIsChartActive && !bIsComment) { // We drop notifications when this is set, except for important ones. // When we issue a complex command (such as .uno:InsertAnnotation) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index d1c0e48ba18e..292f6f4fe096 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1455,6 +1455,7 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, const SfxViewShell_Impl* { case LOK_CALLBACK_FORM_FIELD_BUTTON: case LOK_CALLBACK_TEXT_SELECTION: +case LOK_CALLBACK_COMMENT: break; default: // Reject e.g. invalidate during paint.
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4c5b693267fac35c83e59f3288a1d46b99f02eea Author: Mert Tumer AuthorDate: Fri Oct 1 15:34:33 2021 +0300 Commit: Szymon Kłos CommitDate: Fri Oct 15 07:24:31 2021 +0200 lok: Fix graphicselection INPLACE msg is filtered out INPLACE message is not at the beginning, search it instead Signed-off-by: Mert Tumer Change-Id: I2a09ac5a664c1ff26790aa776d871ac34c3d99dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122919 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123522 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 8156b3b2b40f..1d9c482c8f14 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1667,7 +1667,7 @@ void CallbackFlushHandler::queue(const int type, const char* data) // remove only selection ranges and 'EMPTY' messages // always send 'INPLACE' and 'INPLACE EXIT' messages removeAll(type, [payload] (const CallbackData& elemData) -{ return (elemData.PayloadString[0] != 'I'); }); +{ return (elemData.PayloadString.find("INPLACE") == std::string::npos); }); } break; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e3f45fdc1e6547b35ab69a01e57ee7c926b8b7e7 Author: Mert Tumer AuthorDate: Fri Oct 1 15:34:33 2021 +0300 Commit: Mert Tumer CommitDate: Fri Oct 1 19:45:46 2021 +0200 lok: Fix graphicselection INPLACE msg is filtered out INPLACE message is not at the beginning, search it instead Signed-off-by: Mert Tumer Change-Id: I2a09ac5a664c1ff26790aa776d871ac34c3d99dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122919 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index dab77ee9aa8b..7e92549a7cb9 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1673,7 +1673,7 @@ void CallbackFlushHandler::queue(const int type, const char* data) // remove only selection ranges and 'EMPTY' messages // always send 'INPLACE' and 'INPLACE EXIT' messages removeAll(type, [payload] (const CallbackData& elemData) -{ return (elemData.PayloadString[0] != 'I'); }); +{ return (elemData.PayloadString.find("INPLACE") == std::string::npos); }); } break; }
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/sidebar/SidebarController.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 81055959e06848c917c4df1e4f19e1e5c6e70684 Author: Mert Tumer AuthorDate: Fri Aug 6 12:42:16 2021 +0300 Commit: Mert Tumer CommitDate: Tue Aug 10 12:27:54 2021 +0200 lok: Avoid redundant call to UpdateConfigurations We call doc_setView each time we send an event to LOK such as keystroke and SidebarController::notifyContextChange event is triggered after that UpdateConfigurations() call causes layout reallocating for whole sidebar and we end up keep doing it. It takes significant amount of cpu time for lok case for no reason. Signed-off-by: Mert Tumer Change-Id: I8f456156af841fdeaba1934498863a07a7d4554e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120112 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks (cherry picked from commit b606764ce2a042f2a38c98820d7236661149d20c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120138 Tested-by: Jenkins diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index b81080c546cd..fff93887c3a7 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -355,7 +355,8 @@ void SAL_CALL SidebarController::notifyContextChangeEvent (const css::ui::Contex // calling with held // solarmutex // TODO: this call is redundant but mandatory for unit test to update context on document loading -UpdateConfigurations(); +if (!comphelper::LibreOfficeKit::isActive()) +UpdateConfigurations(); } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sfx2/source
sfx2/source/sidebar/SidebarController.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit b606764ce2a042f2a38c98820d7236661149d20c Author: Mert Tumer AuthorDate: Fri Aug 6 12:42:16 2021 +0300 Commit: Michael Meeks CommitDate: Fri Aug 6 15:26:03 2021 +0200 lok: Avoid redundant call to UpdateConfigurations We call doc_setView each time we send an event to LOK such as keystroke and SidebarController::notifyContextChange event is triggered after that UpdateConfigurations() call causes layout reallocating for whole sidebar and we end up keep doing it. It takes significant amount of cpu time for lok case for no reason. Signed-off-by: Mert Tumer Change-Id: I8f456156af841fdeaba1934498863a07a7d4554e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120112 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 266a69f5dcbe..db4f9679e34a 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -333,7 +333,8 @@ void SAL_CALL SidebarController::notifyContextChangeEvent (const css::ui::Contex // calling with held // solarmutex // TODO: this call is redundant but mandatory for unit test to update context on document loading -UpdateConfigurations(); +if (!comphelper::LibreOfficeKit::isActive()) +UpdateConfigurations(); } }
[Libreoffice-commits] core.git: vcl/jsdialog
vcl/jsdialog/executor.cxx | 19 +++ 1 file changed, 19 insertions(+) New commits: commit 2779e669fd54695ace5a9425280d1efca93729b6 Author: Mert Tumer AuthorDate: Wed Dec 16 23:01:25 2020 +0300 Commit: Mert Tumer CommitDate: Tue Jul 6 09:02:18 2021 +0200 jsdialogs: send click pos for drawingarea Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109216 Tested-by: Jenkins diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index c8659b22158e..39d39601c02f 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -141,6 +141,25 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat { if (sAction == "click") { +int separatorPos = rData["data"].indexOf(';'); +if (separatorPos > 0) +{ +// x;y +std::string_view clickPosX = OUStringToOString( +rData["data"].subView(0, separatorPos), RTL_TEXTENCODING_ASCII_US); +std::string_view clickPosY = OUStringToOString( +rData["data"].subView(separatorPos + 1), RTL_TEXTENCODING_ASCII_US); +if (!clickPosX.empty() && !clickPosY.empty()) +{ +double posX = std::atof(clickPosX.data()); +double posY = std::atof(clickPosY.data()); +Size size = pArea->get_size_request(); +posX = posX * size.Width(); +posY = posY * size.Height(); +LOKTrigger::trigger_click(*pArea, Point(posX, posY)); +return true; +} +} LOKTrigger::trigger_click(*pArea, Point(10, 10)); return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 5 commits - desktop/source sc/qa sc/source sd/qa sd/source sw/qa sw/source vcl/jsdialog vcl/source
desktop/source/lib/init.cxx|3 +++ sc/qa/unit/tiledrendering/tiledrendering.cxx | 17 + sc/source/ui/unoobj/docuno.cxx | 12 +++- sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 sd/source/ui/unoidl/unomodel.cxx |2 ++ sd/source/ui/view/drviewse.cxx |1 + sw/qa/extras/tiledrendering/tiledrendering.cxx | 17 + sw/source/uibase/uno/unotxdoc.cxx |2 ++ vcl/jsdialog/executor.cxx | 17 + vcl/source/app/salvtables.cxx |2 +- 10 files changed, 87 insertions(+), 2 deletions(-) New commits: commit 4c6040c6a59f00f0a2b62d456e809af0c2f3adab Author: Mert Tumer AuthorDate: Wed Dec 16 23:01:25 2020 +0300 Commit: Andras Timar CommitDate: Thu Apr 8 15:17:10 2021 +0200 jsdialogs: send click pos for drawingarea Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index c538371a4f2b..f338cb6830b2 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -119,6 +119,23 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat { if (sAction == "click") { +int separatorPos = rData["data"].indexOf(';'); +if (separatorPos > 0) +{ +// x;y +OString clickPosX = OUStringToOString(rData["data"].copy(0, separatorPos), RTL_TEXTENCODING_ASCII_US); +OString clickPosY = OUStringToOString(rData["data"].copy(separatorPos + 1), RTL_TEXTENCODING_ASCII_US); +if (!clickPosX.isEmpty() && !clickPosY.isEmpty()) +{ +double posX = std::atof(clickPosX.getStr()); +double posY = std::atof(clickPosY.getStr()); +Size size = pArea->get_size_request(); +posX = posX * size.Width(); +posY = posY * size.Height(); +LOKTrigger::trigger_click(*pArea, Point(posX, posY)); +return true; +} +} LOKTrigger::trigger_click(*pArea, Point(10, 10)); return true; } commit 1b7d097d004cc7a629af4d3b8c8ff973a600c704 Author: Mert Tumer AuthorDate: Thu Dec 10 11:59:06 2020 +0300 Commit: Andras Timar CommitDate: Thu Apr 8 15:15:59 2021 +0200 fix rendershapeselection for drawing Change-Id: Id4cb37885bf9b442adc679b895d89cd615ffb2ee Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108681 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109213 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 352dc13d5576..7ea03307b40c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3616,6 +3616,9 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu case LOK_DOCTYPE_PRESENTATION: aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); break; +case LOK_DOCTYPE_DRAWING: +aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export"); +break; case LOK_DOCTYPE_TEXT: aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export"); break; commit 470110a48ce3c975945bd2d3bae2578a65adb6e9 Author: Mert Tumer AuthorDate: Wed Dec 16 21:02:42 2020 +0300 Commit: Andras Timar CommitDate: Thu Apr 8 15:15:46 2021 +0200 Fix MouseClick shoud be MouseLeft for drawing area Change-Id: I4dd0c6862c6473d3cbfcc4535c2d2ebe4a0a238a Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108683 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109215 Tested-by: Jenkins diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index f80d51e605ef..4b7ccce0153c 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5872,7 +5872,7 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device() { return *m_xDrawingArea; void SalInstanceDrawingArea::click(const Point& rPos) { -MouseEvent aEvent(rPos); +MouseEvent aEvent(rPos, 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0); m_xDrawingArea->MouseButtonDown(aEvent); m_xDrawingArea->MouseButtonUp(aEvent); } commit
[Libreoffice-commits] core.git: vcl/source
vcl/source/app/salvtables.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f72c5680b0e10ad59e2abf0ebc1e71c94c41d173 Author: Mert Tumer AuthorDate: Wed Dec 16 21:02:42 2020 +0300 Commit: Mert Tumer CommitDate: Fri Jan 22 05:17:06 2021 +0100 Fix MouseClick shoud be MouseLeft for drawing area Change-Id: I4dd0c6862c6473d3cbfcc4535c2d2ebe4a0a238a Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108683 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109215 Tested-by: Jenkins diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 6183b1a3ac24..fe93e637a823 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5921,7 +5921,7 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device() { return *m_xDrawingArea; void SalInstanceDrawingArea::click(const Point& rPos) { -MouseEvent aEvent(rPos); +MouseEvent aEvent(rPos, 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0); m_xDrawingArea->MouseButtonDown(aEvent); m_xDrawingArea->MouseButtonUp(aEvent); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/ui/view/drviewse.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 5dbdf1d0833eaa5868bff4cef0714ee4cef81cb8 Author: Mert Tumer AuthorDate: Wed Dec 9 14:13:26 2020 +0300 Commit: Mert Tumer CommitDate: Thu Jan 21 08:13:32 2021 +0100 Insert draw connectors directly for online Change-Id: I962a69c142151a43c47efbdb79428760ab07ad98 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108682 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109214 Tested-by: Jenkins diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index db9662bb7650..bd4c3775300d 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -448,6 +448,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) case SID_CONNECTOR_LINES_CIRCLES: case SID_INSERT_SIGNATURELINE: { +bCreateDirectly = comphelper::LibreOfficeKit::isActive(); SetCurrentFunction( FuConstructRectangle::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) ); rReq.Done(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit d2baba68d32fa93e758dcc9c9a890206065ea9ac Author: Mert Tumer AuthorDate: Thu Dec 10 11:59:06 2020 +0300 Commit: Mert Tumer CommitDate: Sun Jan 17 09:18:43 2021 +0100 fix rendershapeselection for drawing Change-Id: Id4cb37885bf9b442adc679b895d89cd615ffb2ee Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108681 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109213 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 86cab63684f9..c8090aeff672 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3619,6 +3619,9 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu case LOK_DOCTYPE_PRESENTATION: aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); break; +case LOK_DOCTYPE_DRAWING: +aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export"); +break; case LOK_DOCTYPE_TEXT: aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export"); break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/builder.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit ca8ba00bb851e9a0c11f3494386cb549e587fcc2 Author: Mert Tumer AuthorDate: Wed Dec 16 23:00:11 2020 +0300 Commit: Szymon Kłos CommitDate: Fri Jan 15 08:37:57 2021 +0100 jsdialogs: Use JS dialog for Fontwork dialog Change-Id: I4d2206550f7d3948f373c803888c7d19034e42c4 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108684 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109217 Tested-by: Szymon Kłos diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 3335296e8128..9371a9b1eca7 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -208,7 +208,8 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString || rUIFile == "uui/ui/macrowarnmedium.ui" || rUIFile == "modules/scalc/ui/datafielddialog.ui" || rUIFile == "modules/scalc/ui/pivotfielddialog.ui" -|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui") +|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui" +|| rUIFile == "svx/ui/fontworkgallerydialog.ui") { bUseJSBuilder = 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' - vcl/source
vcl/source/window/builder.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit eb1a1a2a0f0d0d55e38d212c2165c88c5697eb9e Author: Mert Tumer AuthorDate: Wed Dec 16 23:00:11 2020 +0300 Commit: Szymon Kłos CommitDate: Tue Jan 12 10:59:30 2021 +0100 jsdialogs: Use JS dialog for Fontwork dialog Change-Id: I4d2206550f7d3948f373c803888c7d19034e42c4 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108684 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 97f48ddf545d..b795ea03b629 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -189,7 +189,8 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString || rUIFile == "modules/scalc/ui/fourieranalysisdialog.ui" || rUIFile == "modules/scalc/ui/datafielddialog.ui" || rUIFile == "modules/scalc/ui/pivotfielddialog.ui" -|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui") +|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui" +|| rUIFile == "svx/ui/fontworkgallerydialog.ui") { bUseJSBuilder = 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' - vcl/jsdialog
vcl/jsdialog/executor.cxx | 17 + 1 file changed, 17 insertions(+) New commits: commit a1549c122724733f51096611486a26dcad7321fe Author: Mert Tumer AuthorDate: Wed Dec 16 23:01:25 2020 +0300 Commit: Mert Tumer CommitDate: Tue Jan 12 09:41:31 2021 +0100 jsdialogs: send click pos for drawingarea Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 62e6c2b660fd..f33eeb4b086a 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -118,6 +118,23 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat { if (sAction == "click") { +int separatorPos = rData["data"].indexOf(';'); +if (separatorPos > 0) +{ +// x;y +OString clickPosX = OUStringToOString(rData["data"].copy(0, separatorPos), RTL_TEXTENCODING_ASCII_US); +OString clickPosY = OUStringToOString(rData["data"].copy(separatorPos + 1), RTL_TEXTENCODING_ASCII_US); +if (!clickPosX.isEmpty() && !clickPosY.isEmpty()) +{ +double posX = std::atof(clickPosX.getStr()); +double posY = std::atof(clickPosY.getStr()); +Size size = pArea->get_size_request(); +posX = posX * size.Width(); +posY = posY * size.Height(); +LOKTrigger::trigger_click(*pArea, Point(posX, posY)); +return true; +} +} LOKTrigger::trigger_click(*pArea, Point(10, 10)); return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source
desktop/source/lib/init.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 6fc194b0dafe13b0b841fccc1ac517fb15df616a Author: Mert Tumer AuthorDate: Thu Dec 10 11:59:06 2020 +0300 Commit: Mert Tumer CommitDate: Tue Jan 12 09:39:52 2021 +0100 fix rendershapeselection for drawing Change-Id: Id4cb37885bf9b442adc679b895d89cd615ffb2ee Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108681 Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6fcb2ca02a17..af1161274c37 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3619,6 +3619,9 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu case LOK_DOCTYPE_PRESENTATION: aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); break; +case LOK_DOCTYPE_DRAWING: +aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export"); +break; case LOK_DOCTYPE_TEXT: aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export"); 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' - sd/source
sd/source/ui/view/drviewse.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ed58d457d58cc95a931037f4f574588ab50d22b7 Author: Mert Tumer AuthorDate: Wed Dec 9 14:13:26 2020 +0300 Commit: Jan Holesovsky CommitDate: Tue Jan 5 11:01:30 2021 +0100 Insert draw connectors directly for online Change-Id: I962a69c142151a43c47efbdb79428760ab07ad98 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108682 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 3ae9b37171b0..e330d0416ce8 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -451,6 +451,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) case SID_CONNECTOR_LINES_CIRCLES: case SID_INSERT_SIGNATURELINE: { +bCreateDirectly = comphelper::LibreOfficeKit::isActive(); SetCurrentFunction( FuConstructRectangle::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) ); rReq.Done(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 201edc324fb9c4922ab4aa3c7233676ed43a8e03 Author: Mert Tumer AuthorDate: Fri Nov 27 16:56:53 2020 +0300 Commit: Mert Tumer CommitDate: Sun Nov 29 17:08:13 2020 +0100 Fix unmodified pdf does forced-save This is a problem when dealing with the large pdfs which take long amount of time to save. Adding or removing annotations do change the state of IsModified() Change-Id: I872cb3aec5188986cc13c6659e1bb741a6870409 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106778 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice (cherry picked from commit 455cd8fe00d1c756da1bb50a50bac68a1ad645ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106741 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 8395e81057b9..f53fd96eb609 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3808,7 +3808,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma { // Check if saving a PDF file OUString aMimeType = lcl_getCurrentDocumentMimeType(pDocument); -if (aMimeType == "application/pdf") +if (pDocSh->IsModified() && aMimeType == "application/pdf") { // If we have a PDF file (for saving annotations for example), we need // to run save-as to the same file as the opened document. Plain save ___ 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' - desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 455cd8fe00d1c756da1bb50a50bac68a1ad645ef Author: Mert Tumer AuthorDate: Fri Nov 27 16:56:53 2020 +0300 Commit: Mert Tumer CommitDate: Fri Nov 27 15:31:59 2020 +0100 Fix unmodified pdf does forced-save This is a problem when dealing with the large pdfs which take long amount of time to save. Adding or removing annotations do change the state of IsModified() Change-Id: I872cb3aec5188986cc13c6659e1bb741a6870409 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106778 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b37c85ffbc63..c9d5e7d1d489 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3841,7 +3841,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma { // Check if saving a PDF file OUString aMimeType = lcl_getCurrentDocumentMimeType(pDocument); -if (aMimeType == "application/pdf") +if (pDocSh->IsModified() && aMimeType == "application/pdf") { // If we have a PDF file (for saving annotations for example), we need // to run save-as to the same file as the opened document. Plain save ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa sc/source sd/qa sd/source sw/qa sw/source
sc/qa/unit/tiledrendering/tiledrendering.cxx | 17 + sc/source/ui/unoobj/docuno.cxx | 12 +++- sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 sd/source/ui/unoidl/unomodel.cxx |2 ++ sw/qa/extras/tiledrendering/tiledrendering.cxx | 17 + sw/source/uibase/uno/unotxdoc.cxx |2 ++ 6 files changed, 65 insertions(+), 1 deletion(-) New commits: commit b2f4e18f63457d11a783db939729450ddbe9d594 Author: Mert Tumer AuthorDate: Tue Oct 13 20:16:22 2020 +0300 Commit: Miklos Vajna CommitDate: Thu Nov 26 09:07:10 2020 +0100 Check render parameters for AutoSpellChecking Conflicts: sc/qa/unit/tiledrendering/tiledrendering.cxx sw/qa/extras/tiledrendering/tiledrendering.cxx Change-Id: Ife2551b4023461da26e70ac3de505adf9d7db1e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106602 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index bb34928fef7d..ed6370e1dbe5 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -112,6 +112,7 @@ public: void testSheetGeometryDataCorrectness(); void testDeleteCellMultilineContent(); void testSpellOnlineParameter(); +void testSpellOnlineRenderParameter(); CPPUNIT_TEST_SUITE(ScTiledRenderingTest); CPPUNIT_TEST(testRowColumnHeaders); @@ -157,6 +158,7 @@ public: CPPUNIT_TEST(testSheetGeometryDataCorrectness); CPPUNIT_TEST(testDeleteCellMultilineContent); CPPUNIT_TEST(testSpellOnlineParameter); +CPPUNIT_TEST(testSpellOnlineRenderParameter); CPPUNIT_TEST_SUITE_END(); private: @@ -603,6 +605,21 @@ void ScTiledRenderingTest::testViewCursors() CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated); } +void ScTiledRenderingTest::testSpellOnlineRenderParameter() +{ +ScModelObj* pModelObj = createDoc("empty.ods"); +ScDocument* pDoc = pModelObj->GetDocument(); +bool bSet = pDoc->GetDocOptions().IsAutoSpell(); + +uno::Sequence aPropertyValues = +{ +comphelper::makePropertyValue(".uno:SpellOnline", uno::makeAny(!bSet)), +}; +pModelObj->initializeForTiledRendering(aPropertyValues); + +CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell()); +} + void ScTiledRenderingTest::testTextViewSelection() { comphelper::LibreOfficeKit::setActive(); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index c677e3639fb1..7142e2807cf9 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1163,7 +1163,7 @@ void ScModelObj::completeFunction(const OUString& rFunctionName) } } -void ScModelObj::initializeForTiledRendering(const css::uno::Sequence& /*rArguments*/) +void ScModelObj::initializeForTiledRendering(const css::uno::Sequence& rArguments) { SolarMutexGuard aGuard; @@ -1172,6 +1172,16 @@ void ScModelObj::initializeForTiledRendering(const css::uno::SequenceSetAppOptions(aAppOptions); +for (const beans::PropertyValue& rValue : rArguments) +{ +if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has()) + { +ScDocOptions options = GetDocument()->GetDocOptions(); +options.SetAutoSpell(rValue.Value.get()); +GetDocument()->SetDocOptions(options); + } +} + // show us the text exactly ScInputOptions aInputOptions(SC_MOD()->GetInputOptions()); aInputOptions.SetTextWysiwyg(true); diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index c9bd05d737d4..7464635e5e4d 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -128,6 +128,7 @@ public: void testRegenerateDiagram(); void testLanguageAllText(); void testInsertDeletePageInvalidation(); +void testSpellOnlineRenderParameter(); CPPUNIT_TEST_SUITE(SdTiledRenderingTest); CPPUNIT_TEST(testCreateDestroy); @@ -180,6 +181,7 @@ public: CPPUNIT_TEST(testRegenerateDiagram); CPPUNIT_TEST(testLanguageAllText); CPPUNIT_TEST(testInsertDeletePageInvalidation); +CPPUNIT_TEST(testSpellOnlineRenderParameter); CPPUNIT_TEST_SUITE_END(); @@ -2461,6 +2463,20 @@ void SdTiledRenderingTest::testInsertDeletePageInvalidation() CPPUNIT_ASSERT_EQUAL(size_t(8), aView1.m_aInvalidations.size()); } +void SdTiledRenderingTest::testSpellOnlineRenderParameter() +{ +// Load the document. +SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp"); +bool bSet = pXImpressDocument->GetDoc()->GetOnlineSpell(); + +uno::Sequence aPropertyValues = +{ +comphelper::InitPropertySequence({ { ".uno:SpellOnline", uno::makeAny(!bSet) } }), +}; +
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 49b80617171a348437e62948e128b6b2b8bf Author: Mert Tumer AuthorDate: Sun Nov 15 13:16:53 2020 +0300 Commit: Mert Tumer CommitDate: Sun Nov 15 17:36:49 2020 +0100 Remove Bottom DrawTextFlag on renderFont for Watermark Alignment should be done for watermark in online side this breaks the positioning. Change-Id: I202f671269aaacd266f6443a5e336d987f680a72 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105853 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b31d68dc5391..8f82d577f3cc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5322,7 +5322,6 @@ unsigned char* doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu DrawTextFlags const nStyle = DrawTextFlags::Center | DrawTextFlags::VCenter -| DrawTextFlags::Bottom | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak;// | DrawTextFlags::WordBreakHyphenation ; ___ 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' - desktop/source
desktop/source/lib/init.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 21aa33dff0fe32bdba5ab67f10c7af0fb64b9c88 Author: Mert Tumer AuthorDate: Sun Nov 15 13:16:53 2020 +0300 Commit: Mert Tumer CommitDate: Sun Nov 15 15:52:18 2020 +0100 Remove Bottom DrawTextFlag on renderFont for Watermark Alignment should be done for watermark in online side this breaks the positioning. Change-Id: I202f671269aaacd266f6443a5e336d987f680a72 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105898 Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0d80378f7c31..a36b4aef2052 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5353,7 +5353,6 @@ unsigned char* doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu DrawTextFlags const nStyle = DrawTextFlags::Center | DrawTextFlags::VCenter -| DrawTextFlags::Bottom | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak;// | DrawTextFlags::WordBreakHyphenation ; ___ 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' - sc/qa sc/source sd/qa sd/source sw/qa sw/source
sc/qa/unit/tiledrendering/tiledrendering.cxx | 17 + sc/source/ui/unoobj/docuno.cxx | 12 +++- sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 sd/source/ui/unoidl/unomodel.cxx |2 ++ sw/qa/extras/tiledrendering/tiledrendering.cxx | 17 + sw/source/uibase/uno/unotxdoc.cxx |2 ++ 6 files changed, 65 insertions(+), 1 deletion(-) New commits: commit 5c5fa6597af973ebce48f983af8fdbb87789d03f Author: Mert Tumer AuthorDate: Tue Oct 13 20:16:22 2020 +0300 Commit: Jan Holesovsky CommitDate: Mon Oct 19 09:51:03 2020 +0200 Check render parameters for AutoSpellChecking Change-Id: Ife2551b4023461da26e70ac3de505adf9d7db1e8 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104274 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 33a15349b70b..b6db96dc5473 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -112,6 +112,7 @@ public: void testDeleteCellMultilineContent(); void testFunctionDlg(); void testSpellOnlineParameter(); +void testSpellOnlineRenderParameter(); CPPUNIT_TEST_SUITE(ScTiledRenderingTest); CPPUNIT_TEST(testRowColumnHeaders); @@ -158,6 +159,7 @@ public: CPPUNIT_TEST(testDeleteCellMultilineContent); CPPUNIT_TEST(testFunctionDlg); CPPUNIT_TEST(testSpellOnlineParameter); +CPPUNIT_TEST(testSpellOnlineRenderParameter); CPPUNIT_TEST_SUITE_END(); private: @@ -604,6 +606,21 @@ void ScTiledRenderingTest::testViewCursors() CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated); } +void ScTiledRenderingTest::testSpellOnlineRenderParameter() +{ +ScModelObj* pModelObj = createDoc("empty.ods"); +ScDocument* pDoc = pModelObj->GetDocument(); +bool bSet = pDoc->GetDocOptions().IsAutoSpell(); + +uno::Sequence aPropertyValues = +{ +comphelper::makePropertyValue(".uno:SpellOnline", uno::makeAny(!bSet)), +}; +pModelObj->initializeForTiledRendering(aPropertyValues); + +CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell()); +} + void lcl_dispatchCommand(const uno::Reference& xComponent, const OUString& rCommand, const uno::Sequence& rArguments) { uno::Reference xController = uno::Reference(xComponent, uno::UNO_QUERY_THROW)->getCurrentController(); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index b51e63419f57..9d2539a25bcd 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1173,7 +1173,7 @@ void ScModelObj::completeFunction(const OUString& rFunctionName) } } -void ScModelObj::initializeForTiledRendering(const css::uno::Sequence& /*rArguments*/) +void ScModelObj::initializeForTiledRendering(const css::uno::Sequence& rArguments) { SolarMutexGuard aGuard; @@ -1182,6 +1182,16 @@ void ScModelObj::initializeForTiledRendering(const css::uno::SequenceSetAppOptions(aAppOptions); +for (const beans::PropertyValue& rValue : rArguments) +{ +if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has()) + { +ScDocOptions options = GetDocument()->GetDocOptions(); +options.SetAutoSpell(rValue.Value.get()); +GetDocument()->SetDocOptions(options); + } +} + // show us the text exactly ScInputOptions aInputOptions(SC_MOD()->GetInputOptions()); aInputOptions.SetTextWysiwyg(true); diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index d7c2719e105a..79163b0cea67 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -126,6 +126,7 @@ public: void testRegenerateDiagram(); void testLanguageAllText(); void testInsertDeletePageInvalidation(); +void testSpellOnlineRenderParameter(); CPPUNIT_TEST_SUITE(SdTiledRenderingTest); CPPUNIT_TEST(testCreateDestroy); @@ -177,6 +178,7 @@ public: CPPUNIT_TEST(testRegenerateDiagram); CPPUNIT_TEST(testLanguageAllText); CPPUNIT_TEST(testInsertDeletePageInvalidation); +CPPUNIT_TEST(testSpellOnlineRenderParameter); CPPUNIT_TEST_SUITE_END(); @@ -2429,6 +2431,20 @@ void SdTiledRenderingTest::testInsertDeletePageInvalidation() CPPUNIT_ASSERT_EQUAL(size_t(8), aView1.m_aInvalidations.size()); } +void SdTiledRenderingTest::testSpellOnlineRenderParameter() +{ +// Load the document. +SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp"); +bool bSet = pXImpressDocument->GetDoc()->GetOnlineSpell(); + +uno::Sequence aPropertyValues = +{ +comphelper::InitPropertySequence({ { ".uno:SpellOnline", uno::makeAny(!bSet) } }), +}; +
[Libreoffice-commits] core.git: sc/qa sc/source sd/qa sd/source svx/sdi sw/qa sw/source
sc/qa/unit/tiledrendering/tiledrendering.cxx | 25 + sc/source/ui/app/scmod.cxx |4 +++- sd/qa/unit/uiimpress.cxx | 18 ++ sd/source/ui/view/drviewse.cxx |9 - svx/sdi/svx.sdi |2 +- sw/qa/extras/uiwriter/uiwriter.cxx | 20 sw/source/uibase/uiview/view0.cxx|6 +- 7 files changed, 80 insertions(+), 4 deletions(-) New commits: commit 7aaa9ef2e5edaf468f116449776433e98fb1a2f3 Author: Mert Tumer AuthorDate: Thu Oct 8 13:37:07 2020 +0300 Commit: Mert Tumer CommitDate: Fri Oct 9 21:30:26 2020 +0200 Added optional parameter Enabled for uno:SpellOnline Change-Id: I3578b0a002ea2cdcc7893972607f26732ce545ea Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103982 Tested-by: Jenkins diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 8a0c9f2f637f..8c03a19902d5 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -110,6 +111,7 @@ public: void testSheetGeometryDataInvariance(); void testSheetGeometryDataCorrectness(); void testDeleteCellMultilineContent(); +void testSpellOnlineParameter(); CPPUNIT_TEST_SUITE(ScTiledRenderingTest); CPPUNIT_TEST(testRowColumnHeaders); @@ -154,6 +156,7 @@ public: CPPUNIT_TEST(testSheetGeometryDataInvariance); CPPUNIT_TEST(testSheetGeometryDataCorrectness); CPPUNIT_TEST(testDeleteCellMultilineContent); +CPPUNIT_TEST(testSpellOnlineParameter); CPPUNIT_TEST_SUITE_END(); private: @@ -1632,6 +1635,28 @@ void ScTiledRenderingTest::testFilterDlg() SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, nullptr); } +void ScTiledRenderingTest::testSpellOnlineParameter() +{ +ScModelObj* pModelObj = createDoc("empty.ods"); +ScDocument* pDoc = pModelObj->GetDocument(); +bool bSet = pDoc->GetDocOptions().IsAutoSpell(); + +uno::Sequence params = +{ +comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)), +}; +dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell()); + +// set the same state as now and we don't expect any change (no-toggle) +params = +{ +comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)), +}; +dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell()); +} + void ScTiledRenderingTest::testVbaRangeCopyPaste() { comphelper::LibreOfficeKit::setActive(); diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 7f272e131192..688e52d3f54a 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -343,7 +343,9 @@ void ScModule::Execute( SfxRequest& rReq ) { bool bSet; const SfxPoolItem* pItem; -if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, ) ) +if (pReqArgs->HasItem(FN_PARAM_1, )) +bSet = static_cast(pItem)->GetValue(); +else if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, ) ) bSet = static_cast(pItem)->GetValue(); else { // Toggle diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 56d1f8fc789b..fbd23a24eda0 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -379,6 +379,24 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf134053) CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dot length", 706, fDotLength, 12); CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dash length", 2822, fDashLength, 12); } + +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter) +{ +mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp")); +auto pImpressDocument = dynamic_cast(mxComponent.get()); +bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell(); + +uno::Sequence params( +comphelper::InitPropertySequence({ { "Enable", uno::makeAny(!bSet) } })); +dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell()); + +// set the same state as now and we don't expect any change (no-toggle) +params = comphelper::InitPropertySequence({ { "Enable", uno::makeAny(!bSet) } }); +dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/qa sc/source sd/qa sd/source svx/sdi sw/qa sw/source
sc/qa/unit/tiledrendering/tiledrendering.cxx | 25 + sc/source/ui/app/scmod.cxx |4 +++- sd/qa/unit/uiimpress.cxx | 17 + sd/source/ui/view/drviewse.cxx |9 - svx/sdi/svx.sdi |2 +- sw/qa/extras/uiwriter/uiwriter.cxx | 19 +++ sw/source/uibase/uiview/view0.cxx|6 +- 7 files changed, 78 insertions(+), 4 deletions(-) New commits: commit d90a404a078b9fc1baa98ec0eb3d6a90f869b336 Author: Mert Tumer AuthorDate: Thu Oct 8 13:37:07 2020 +0300 Commit: Jan Holesovsky CommitDate: Fri Oct 9 15:37:51 2020 +0200 Added optional parameter Enabled for uno:SpellOnline Change-Id: I3578b0a002ea2cdcc7893972607f26732ce545ea Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104083 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 4962ebc5fb68..33a15349b70b 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -110,6 +111,7 @@ public: void testSheetGeometryDataCorrectness(); void testDeleteCellMultilineContent(); void testFunctionDlg(); +void testSpellOnlineParameter(); CPPUNIT_TEST_SUITE(ScTiledRenderingTest); CPPUNIT_TEST(testRowColumnHeaders); @@ -155,6 +157,7 @@ public: CPPUNIT_TEST(testSheetGeometryDataCorrectness); CPPUNIT_TEST(testDeleteCellMultilineContent); CPPUNIT_TEST(testFunctionDlg); +CPPUNIT_TEST(testSpellOnlineParameter); CPPUNIT_TEST_SUITE_END(); private: @@ -1684,6 +1687,28 @@ void ScTiledRenderingTest::testFunctionDlg() SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, nullptr); } +void ScTiledRenderingTest::testSpellOnlineParameter() +{ +ScModelObj* pModelObj = createDoc("empty.ods"); +ScDocument* pDoc = pModelObj->GetDocument(); +bool bSet = pDoc->GetDocOptions().IsAutoSpell(); + +uno::Sequence params = +{ +comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)), +}; +lcl_dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell()); + +// set the same state as now and we don't expect any change (no-toggle) +params = +{ +comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)), +}; +lcl_dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell()); +} + void ScTiledRenderingTest::testVbaRangeCopyPaste() { comphelper::LibreOfficeKit::setActive(); diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 739d13322051..59fc059bf5ef 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -342,7 +342,9 @@ void ScModule::Execute( SfxRequest& rReq ) { bool bSet; const SfxPoolItem* pItem; -if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, ) ) +if (pReqArgs->HasItem(FN_PARAM_1, )) +bSet = static_cast(pItem)->GetValue(); +else if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, ) ) bSet = static_cast(pItem)->GetValue(); else { // Toggle diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index ce7a310bc289..738b09a3fd7d 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -275,6 +275,23 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillGradient) CPPUNIT_ASSERT_EQUAL(OUString("ff"), aGradient.GetStartColor().AsRGBHexString()); CPPUNIT_ASSERT_EQUAL(OUString("ff"), aGradient.GetEndColor().AsRGBHexString()); } + +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter) +{ +mxComponent = loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp")); +auto pImpressDocument = dynamic_cast(mxComponent.get()); +bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell(); + +uno::Sequence params(comphelper::InitPropertySequence({{"Enable", uno::makeAny(!bSet)}})); +dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell()); + +// set the same state as now and we don't expect any change (no-toggle) +params = comphelper::InitPropertySequence({{"Enable", uno::makeAny(!bSet)}}); +dispatchCommand(mxComponent, ".uno:SpellOnline", params); +CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - xmlsecurity/source
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0b1b1e90bffd4e8a7647cc01f5529c745ebdb121 Author: Mert Tumer AuthorDate: Wed Sep 30 17:14:59 2020 +0300 Commit: Andras Timar CommitDate: Fri Oct 2 22:55:12 2020 +0200 Fix libnssckbi not found error on Android This error causes Android App to be unable to open Password-protected documents. Change-Id: Iacbacb1c780025752e2447db325b075c58947818 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103659 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index b2fd04423be9..bbdc036395f2 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -415,7 +415,7 @@ bool nsscrypto_initialize(css::uno::Reference const if (true) #else -#if defined SYSTEM_NSS +#if defined SYSTEM_NSS || defined ANDROID OUString rootModule("libnssckbi" SAL_DLLEXTENSION); #else OUString rootModule("${LO_LIB_DIR}/libnssckbi" SAL_DLLEXTENSION); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 16a7f98f99d334ea865b800e0b32d6fed1483942 Author: Mert Tumer AuthorDate: Wed Sep 30 17:14:59 2020 +0300 Commit: Andras Timar CommitDate: Fri Oct 2 22:54:07 2020 +0200 Fix libnssckbi not found error on Android This error causes Android App to be unable to open Password-protected documents. Change-Id: Iacbacb1c780025752e2447db325b075c58947818 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103658 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 1d6dcda2f315..b8acdc059cf8 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -430,7 +430,7 @@ bool nsscrypto_initialize(css::uno::Reference const if (true) #else -#if defined SYSTEM_NSS +#if defined SYSTEM_NSS || defined ANDROID OUString rootModule("libnssckbi" SAL_DLLEXTENSION); #else OUString rootModule("${LO_LIB_DIR}/libnssckbi" SAL_DLLEXTENSION); ___ 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' - xmlsecurity/source
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit da24149ac681555430271f264095e2d8807c55cf Author: Mert Tumer AuthorDate: Wed Sep 30 17:14:59 2020 +0300 Commit: Andras Timar CommitDate: Fri Oct 2 22:53:49 2020 +0200 Fix libnssckbi not found error on Android This error causes Android App to be unable to open Password-protected documents. Change-Id: Iacbacb1c780025752e2447db325b075c58947818 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103708 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 8c71ed12b67d..d5f95d096e91 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -353,7 +353,7 @@ bool nsscrypto_initialize(css::uno::Reference const if (true) #else -#if defined SYSTEM_NSS +#if defined SYSTEM_NSS || defined ANDROID OUString rootModule("libnssckbi" SAL_DLLEXTENSION); #else OUString rootModule("${LO_LIB_DIR}/libnssckbi" SAL_DLLEXTENSION); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source
desktop/source/lib/init.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 7621398ad1b4e25b87d6da709b41966e7e3a9484 Author: Mert Tumer AuthorDate: Mon Aug 17 11:40:38 2020 +0300 Commit: Andras Timar CommitDate: Wed Aug 19 08:58:44 2020 +0200 Fix hyperlink popup does not show up The popup does not show up when double clicking same cell after first one when the cell has a hyperlink. This is because LOK_CALLBACK_INVALIDATE _VISIBLE_CURSOR message is filtered out when it is duplicate and hyperlink is inside this callback. Selecting different cell after editing one does not make calc to send another invalidate cursor message because it is only sent if the selected cell is being edited. This confuses the ui experience, so this patch prevents the callback from being filtered out if only it contains a hyperlink. If there is not a hyperlink on the cursor position the duplicate callbacks will still be filtered out. Signed-off-by: Mert Tumer Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851 Tested-by: Jenkins Reviewed-by: Andras Timar (cherry picked from commit 06bed3046b4ca62a50566f42d3a7079f0b563935) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100935 Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d33454297cf8..d0982e0bdcf1 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1519,10 +1519,15 @@ void CallbackFlushHandler::queue(const int type, const char* data) case LOK_CALLBACK_VIEW_CURSOR_VISIBLE: case LOK_CALLBACK_CALC_FUNCTION_LIST: { +// deleting the duplicate of visible cursor message can cause hyperlink popup not to show up on second/or more click on the same place. +// If the hyperlink is not empty we can bypass that to show the popup +const bool hyperLinkException = type == LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR && +payload.find("\"hyperlink\":\"\"") == std::string::npos && +payload.find("\"hyperlink\": {}") == std::string::npos; const int nViewId = lcl_getViewId(payload); removeAll( -[type, nViewId] (const queue_type::value_type& elem) { -return (elem.Type == type && nViewId == lcl_getViewId(elem)); +[type, nViewId, hyperLinkException] (const queue_type::value_type& elem) { +return (elem.Type == type && nViewId == lcl_getViewId(elem) && !hyperLinkException); } ); } ___ 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' - desktop/source
desktop/source/lib/init.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 021d17006c970bbd784bc3a5474d56fff02fdca0 Author: Mert Tumer AuthorDate: Mon Aug 17 11:40:38 2020 +0300 Commit: Andras Timar CommitDate: Tue Aug 18 23:01:25 2020 +0200 Fix hyperlink popup does not show up The popup does not show up when double clicking same cell after first one when the cell has a hyperlink. This is because LOK_CALLBACK_INVALIDATE _VISIBLE_CURSOR message is filtered out when it is duplicate and hyperlink is inside this callback. Selecting different cell after editing one does not make calc to send another invalidate cursor message because it is only sent if the selected cell is being edited. This confuses the ui experience, so this patch prevents the callback from being filtered out if only it contains a hyperlink. If there is not a hyperlink on the cursor position the duplicate callbacks will still be filtered out. Signed-off-by: Mert Tumer Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851 Tested-by: Jenkins Reviewed-by: Andras Timar (cherry picked from commit 06bed3046b4ca62a50566f42d3a7079f0b563935) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100934 Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 02bf19602150..4d96e34333ea 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1554,10 +1554,15 @@ void CallbackFlushHandler::queue(const int type, const char* data) case LOK_CALLBACK_CALC_FUNCTION_LIST: case LOK_CALLBACK_JSDIALOG: { +// deleting the duplicate of visible cursor message can cause hyperlink popup not to show up on second/or more click on the same place. +// If the hyperlink is not empty we can bypass that to show the popup +const bool hyperLinkException = type == LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR && +payload.find("\"hyperlink\":\"\"") == std::string::npos && +payload.find("\"hyperlink\": {}") == std::string::npos; const int nViewId = lcl_getViewId(payload); removeAll( -[type, nViewId] (const queue_type::value_type& elem) { -return (elem.Type == type && nViewId == lcl_getViewId(elem)); +[type, nViewId, hyperLinkException] (const queue_type::value_type& elem) { +return (elem.Type == type && nViewId == lcl_getViewId(elem) && !hyperLinkException); } ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 06bed3046b4ca62a50566f42d3a7079f0b563935 Author: Mert Tumer AuthorDate: Mon Aug 17 11:40:38 2020 +0300 Commit: Andras Timar CommitDate: Tue Aug 18 22:29:25 2020 +0200 Fix hyperlink popup does not show up The popup does not show up when double clicking same cell after first one when the cell has a hyperlink. This is because LOK_CALLBACK_INVALIDATE _VISIBLE_CURSOR message is filtered out when it is duplicate and hyperlink is inside this callback. Selecting different cell after editing one does not make calc to send another invalidate cursor message because it is only sent if the selected cell is being edited. This confuses the ui experience, so this patch prevents the callback from being filtered out if only it contains a hyperlink. If there is not a hyperlink on the cursor position the duplicate callbacks will still be filtered out. Signed-off-by: Mert Tumer Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 78f152166acd..beb35b4e5fcc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1546,10 +1546,15 @@ void CallbackFlushHandler::queue(const int type, const char* data) case LOK_CALLBACK_CALC_FUNCTION_LIST: case LOK_CALLBACK_JSDIALOG: { +// deleting the duplicate of visible cursor message can cause hyperlink popup not to show up on second/or more click on the same place. +// If the hyperlink is not empty we can bypass that to show the popup +const bool hyperLinkException = type == LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR && +payload.find("\"hyperlink\":\"\"") == std::string::npos && +payload.find("\"hyperlink\": {}") == std::string::npos; const int nViewId = lcl_getViewId(payload); removeAll( -[type, nViewId] (const queue_type::value_type& elem) { -return (elem.Type == type && nViewId == lcl_getViewId(elem)); +[type, nViewId, hyperLinkException] (const queue_type::value_type& elem) { +return (elem.Type == type && nViewId == lcl_getViewId(elem) && !hyperLinkException); } ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source include/sfx2
desktop/source/lib/init.cxx| 20 include/sfx2/sidebar/SidebarController.hxx |1 + 2 files changed, 17 insertions(+), 4 deletions(-) New commits: commit ff23d87cb00388095a94b90e061564fc179e1823 Author: Mert Tumer AuthorDate: Fri May 8 17:23:12 2020 +0300 Commit: Mert Tumer CommitDate: Tue Aug 4 12:44:31 2020 +0200 mobile: fix calc chart wizard properties is not shown Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97061 Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98248 Tested-by: Jenkins Reviewed-by: Mert Tumer diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 346c5174accd..db6dc07262a0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -907,10 +907,24 @@ void setupSidebar(bool bShow, const OUString& sidebarDeckId = "") if (!pDockingWin) return; +OUString currentDeckId = pDockingWin->GetSidebarController()->GetCurrentDeckId(); + +// check if it is the chart deck id, if it is, don't switch to default deck +bool switchToDefault = true; + +if (currentDeckId == "ChartDeck") +switchToDefault = false; + if (!sidebarDeckId.isEmpty()) { pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId); } +else +{ +if (switchToDefault) +pDockingWin->GetSidebarController()->SwitchToDefaultDeck(); +} + pDockingWin->SyncUpdate(); } else @@ -3750,7 +3764,6 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma SfxObjectShell* pDocSh = SfxObjectShell::Current(); OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8); LibLODocument_Impl* pDocument = static_cast(pThis); -OUString sidebarDeckId = "PropertyDeck"; std::vector aPropertyValuesVector(jsonToPropertyValuesVector(pArguments)); @@ -3906,13 +3919,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") { -sidebarDeckId = "WriterPageDeck"; -setupSidebar(true, sidebarDeckId); +setupSidebar(true, "WriterPageDeck"); return; } else if (gImpl && aCommand == ".uno:SidebarShow") { -setupSidebar(true, sidebarDeckId); +setupSidebar(true); return; } else if (gImpl && aCommand == ".uno:SidebarHide") diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index d03576b3416d..e9b653762e82 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -134,6 +134,7 @@ public: FocusManager& GetFocusManager() { return maFocusManager;} ResourceManager* GetResourceManager() { return mpResourceManager.get();} +auto& GetCurrentDeckId() const { return msCurrentDeckId; } // std::unique_ptr GetResourceManager() { return mpResourceManager;} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source include/sfx2 sfx2/source
desktop/source/lib/init.cxx | 19 --- include/sfx2/sidebar/SidebarDockingWindow.hxx |2 +- sfx2/source/sidebar/ResourceManager.cxx |9 + 3 files changed, 26 insertions(+), 4 deletions(-) New commits: commit 87c58f6a9351f2a2ec40fd99c4e5a63bfe29d0b8 Author: Mert Tumer AuthorDate: Wed Apr 29 16:29:57 2020 +0300 Commit: Mert Tumer CommitDate: Tue Aug 4 12:43:29 2020 +0200 added ability to switch sidebar deck on init.cxx for mobilewizard Change-Id: I532398bc41e1c984c24b1d39e4844315a0a69847 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93162 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97062 Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98247 Tested-by: Jenkins Reviewed-by: Mert Tumer diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index dc1b6b1664fc..346c5174accd 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -111,6 +111,7 @@ #include #include #include +#include #include #include #include @@ -883,10 +884,10 @@ void ExecuteOrientationChange() mxUndoManager->leaveUndoContext(); } -void setupSidebar(bool bShow) +void setupSidebar(bool bShow, const OUString& sidebarDeckId = "") { SfxViewShell* pViewShell = SfxViewShell::Current(); -SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr; +SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : nullptr; if (pViewFrame) { if (bShow && !pViewFrame->GetChildWindow(SID_SIDEBAR)) @@ -905,6 +906,11 @@ void setupSidebar(bool bShow) auto pDockingWin = dynamic_cast(pChild->GetWindow()); if (!pDockingWin) return; + +if (!sidebarDeckId.isEmpty()) +{ +pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId); +} pDockingWin->SyncUpdate(); } else @@ -3744,6 +3750,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma SfxObjectShell* pDocSh = SfxObjectShell::Current(); OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8); LibLODocument_Impl* pDocument = static_cast(pThis); +OUString sidebarDeckId = "PropertyDeck"; std::vector aPropertyValuesVector(jsonToPropertyValuesVector(pArguments)); @@ -3897,9 +3904,15 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma return; } } +else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") +{ +sidebarDeckId = "WriterPageDeck"; +setupSidebar(true, sidebarDeckId); +return; +} else if (gImpl && aCommand == ".uno:SidebarShow") { -setupSidebar(true); +setupSidebar(true, sidebarDeckId); return; } else if (gImpl && aCommand == ".uno:SidebarHide") diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx b/include/sfx2/sidebar/SidebarDockingWindow.hxx index 6d726ddd1260..f156ab0cb0fb 100644 --- a/include/sfx2/sidebar/SidebarDockingWindow.hxx +++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx @@ -49,7 +49,7 @@ public: void SyncUpdate(); void NotifyResize(); - +auto& GetSidebarController() const { return mpSidebarController; } using SfxDockingWindow::Close; private: diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index f3440e6dcb46..c61781643f49 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -429,6 +429,15 @@ void ResourceManager::ReadPanelList() if (!aPanelNode.isValid()) continue; +if (comphelper::LibreOfficeKit::isActive()) +{ +// Hide these panels in LOK as they aren't fully functional. +OUString aPanelId = getString(aPanelNode, "Id"); +if (aPanelId == "PageStylesPanel" || aPanelId == "PageHeaderPanel" +|| aPanelId == "PageFooterPanel") +continue; +} + maPanels.push_back(std::make_shared()); PanelDescriptor& rPanelDescriptor(*maPanels.back()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit 34decd703e880a04634585e20651a2f9b7fef393 Author: Mert Tumer AuthorDate: Wed Jun 10 14:41:41 2020 +0300 Commit: Mert Tumer CommitDate: Tue Aug 4 12:42:50 2020 +0200 Fix .uno:SidebarHide command works for online Signed-off-by: Mert Tumer Change-Id: I03743d15300687b1da947d3c44be6a42aab83107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96513 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index e844243207d8..dc1b6b1664fc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -911,6 +911,16 @@ void setupSidebar(bool bShow) SetLastExceptionMsg("No view shell or sidebar"); } +void hideSidebar() +{ +SfxViewShell* pViewShell = SfxViewShell::Current(); +SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr; +if (pViewFrame) +pViewFrame->SetChildWindow(SID_SIDEBAR, false , false ); +else +SetLastExceptionMsg("No view shell or sidebar"); +} + VclPtr getSidebarWindow() { VclPtr xRet; @@ -3894,7 +3904,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:SidebarHide") { -setupSidebar(false); +hideSidebar(); return; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/ui/view/drviews5.cxx |8 1 file changed, 8 insertions(+) New commits: commit 15d3b2521e3df1ea0a659f82aeb67a2fc1f0 Author: Mert Tumer AuthorDate: Tue Apr 7 15:36:34 2020 +0300 Commit: Mert Tumer CommitDate: Thu Jul 16 21:54:12 2020 +0200 fix ODP roundtripped in online opens with huge zoom in desktop Change-Id: Ia3192cfeaab8ac643bba7b499240882f403b6388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91822 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98246 Tested-by: Jenkins Reviewed-by: Mert Tumer diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 110e7756225f..d632d24a46d0 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -49,11 +49,13 @@ #include #include #include +#include #include #include #include #include #include +#include namespace sd { @@ -336,6 +338,12 @@ void DrawViewShell::WriteFrameViewData() Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); +if (comphelper::LibreOfficeKit::isActive()) +{ +// aVisArea is nonsensical in the LOK case, use the slide size +aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize()); +} + mpFrameView->SetVisArea(aVisArea); if( mePageKind == PageKind::Handout ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source include/sfx2 sfx2/source
desktop/source/lib/init.cxx | 19 --- include/sfx2/sidebar/SidebarDockingWindow.hxx |1 + sfx2/source/sidebar/ResourceManager.cxx |9 + 3 files changed, 26 insertions(+), 3 deletions(-) New commits: commit e80c47b42dd1c9ae869d241c327def8b4a0b1ad4 Author: Mert Tumer AuthorDate: Wed Apr 29 16:29:57 2020 +0300 Commit: Jan Holesovsky CommitDate: Fri Jun 26 11:30:04 2020 +0200 added ability to switch sidebar deck on init.cxx for mobilewizard Change-Id: I532398bc41e1c984c24b1d39e4844315a0a69847 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93162 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97062 Reviewed-by: Jan Holesovsky diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0434818c7845..2190c7d49e6a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -112,6 +112,7 @@ #include #include #include +#include #include #include #include @@ -862,10 +863,10 @@ void ExecuteOrientationChange() mxUndoManager->leaveUndoContext(); } -void setupSidebar(bool bShow) +void setupSidebar(bool bShow, OUString sidebarDeckId = "") { SfxViewShell* pViewShell = SfxViewShell::Current(); -SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr; +SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : nullptr; if (pViewFrame) { if (bShow && !pViewFrame->GetChildWindow(SID_SIDEBAR)) @@ -884,6 +885,11 @@ void setupSidebar(bool bShow) auto pDockingWin = dynamic_cast(pChild->GetWindow()); if (!pDockingWin) return; + +if (!sidebarDeckId.isEmpty()) +{ +pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId); +} pDockingWin->SyncUpdate(); } else @@ -3795,6 +3801,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma SfxObjectShell* pDocSh = SfxObjectShell::Current(); OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8); LibLODocument_Impl* pDocument = static_cast(pThis); +OUString sidebarDeckId = "PropertyDeck"; std::vector aPropertyValuesVector(jsonToPropertyValuesVector(pArguments)); @@ -3925,9 +3932,15 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma return; } } +else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") +{ +sidebarDeckId = "WriterPageDeck"; +setupSidebar(true, sidebarDeckId); +return; +} else if (gImpl && aCommand == ".uno:SidebarShow") { -setupSidebar(true); +setupSidebar(true, sidebarDeckId); return; } else if (gImpl && aCommand == ".uno:SidebarHide") diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx b/include/sfx2/sidebar/SidebarDockingWindow.hxx index 37f6532c7dd7..48afc8f19751 100644 --- a/include/sfx2/sidebar/SidebarDockingWindow.hxx +++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx @@ -45,6 +45,7 @@ public: void SetReadyToDrag( bool bStartDrag ) { mbIsReadyToDrag = bStartDrag; } bool IsReadyToDrag() const { return mbIsReadyToDrag; } +auto& GetSidebarController() const { return mpSidebarController; } /// Force generation of all panels by completion. void SyncUpdate(); diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index e1e011422da7..9cd9543eb2f0 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -429,6 +429,15 @@ void ResourceManager::ReadPanelList() if (!aPanelNode.isValid()) continue; +if (comphelper::LibreOfficeKit::isActive()) +{ +// Hide these panels in LOK as they aren't fully functional. +OUString aPanelId = getString(aPanelNode, "Id"); +if (aPanelId == "PageStylesPanel" || aPanelId == "PageHeaderPanel" +|| aPanelId == "PageFooterPanel") +continue; +} + maPanels.push_back(std::make_shared()); PanelDescriptor& rPanelDescriptor(*maPanels.back()); ___ 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' - desktop/source
desktop/source/lib/init.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit 2f283b44c708f3b30cef25ebd8e04a5b4c48c626 Author: Mert Tumer AuthorDate: Wed Jun 10 14:41:41 2020 +0300 Commit: Jan Holesovsky CommitDate: Fri Jun 26 11:30:51 2020 +0200 Fix .uno:SidebarHide command works for online Change-Id: I03743d15300687b1da947d3c44be6a42aab83107 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96618 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97059 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 69e8073b0bd0..51a8c80ad049 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -910,6 +910,16 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "") SetLastExceptionMsg("No view shell or sidebar"); } +void hideSidebar() +{ +SfxViewShell* pViewShell = SfxViewShell::Current(); +SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr; +if (pViewFrame) +pViewFrame->SetChildWindow(SID_SIDEBAR, false, false); +else +SetLastExceptionMsg("No view shell or sidebar"); +} + VclPtr getSidebarWindow() { VclPtr xRet; @@ -3957,7 +3967,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:SidebarHide") { -setupSidebar(false); +hideSidebar(); 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' - desktop/source include/sfx2
desktop/source/lib/init.cxx| 20 include/sfx2/sidebar/SidebarController.hxx |1 + 2 files changed, 17 insertions(+), 4 deletions(-) New commits: commit 3e8917702642595526a43f3d6866ba9b0446e50b Author: Mert Tumer AuthorDate: Fri May 8 17:23:12 2020 +0300 Commit: Jan Holesovsky CommitDate: Fri Jun 26 11:30:31 2020 +0200 mobile: fix calc chart wizard properties is not shown Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97061 Reviewed-by: Jan Holesovsky diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2190c7d49e6a..69e8073b0bd0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -886,10 +886,24 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "") if (!pDockingWin) return; +OUString currentDeckId = pDockingWin->GetSidebarController()->GetCurrentDeckId(); + +// check if it is the chart deck id, if it is, don't switch to default deck +bool switchToDefault = true; + +if (currentDeckId == "ChartDeck") +switchToDefault = false; + if (!sidebarDeckId.isEmpty()) { pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId); } +else +{ +if (switchToDefault) +pDockingWin->GetSidebarController()->SwitchToDefaultDeck(); +} + pDockingWin->SyncUpdate(); } else @@ -3801,7 +3815,6 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma SfxObjectShell* pDocSh = SfxObjectShell::Current(); OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8); LibLODocument_Impl* pDocument = static_cast(pThis); -OUString sidebarDeckId = "PropertyDeck"; std::vector aPropertyValuesVector(jsonToPropertyValuesVector(pArguments)); @@ -3934,13 +3947,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") { -sidebarDeckId = "WriterPageDeck"; -setupSidebar(true, sidebarDeckId); +setupSidebar(true, "WriterPageDeck"); return; } else if (gImpl && aCommand == ".uno:SidebarShow") { -setupSidebar(true, sidebarDeckId); +setupSidebar(true); return; } else if (gImpl && aCommand == ".uno:SidebarHide") diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index eb459b1a708f..440ff55b7bfc 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -134,6 +134,7 @@ public: FocusManager& GetFocusManager() { return maFocusManager;} ResourceManager* GetResourceManager() { return mpResourceManager.get();} +auto& GetCurrentDeckId() const { return msCurrentDeckId; } // std::unique_ptr GetResourceManager() { return mpResourceManager;} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source
desktop/source/lib/init.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit d046bad4fad89b1afeed78703afa695528338299 Author: Mert Tumer AuthorDate: Wed Jun 10 14:41:41 2020 +0300 Commit: Jan Holesovsky CommitDate: Wed Jun 24 13:31:30 2020 +0200 Fix .uno:SidebarHide command works for online Change-Id: I03743d15300687b1da947d3c44be6a42aab83107 Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96618 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b34f814ff472..568363fea289 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1172,6 +1172,16 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "") SetLastExceptionMsg("No view shell or sidebar"); } +void hideSidebar() +{ +SfxViewShell* pViewShell = SfxViewShell::Current(); +SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr; +if (pViewFrame) +pViewFrame->SetChildWindow(SID_SIDEBAR, false, false); +else +SetLastExceptionMsg("No view shell or sidebar"); +} + VclPtr getSidebarWindow() { VclPtr xRet; @@ -3921,7 +3931,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:SidebarHide") { -setupSidebar(false); +hideSidebar(); 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' - 5 commits - android/source sal/osl sc/inc sc/source svx/source
android/source/build.gradle |7 +++ sal/osl/unx/file.cxx | 24 +--- sc/inc/document.hxx |2 +- sc/inc/table.hxx |2 +- sc/source/core/data/document.cxx |4 ++-- sc/source/core/data/table2.cxx | 31 +++ sc/source/ui/view/viewdata.cxx | 29 +++-- sc/source/ui/view/viewfun5.cxx |3 ++- svx/source/unodraw/unoprov.cxx | 22 +- 9 files changed, 85 insertions(+), 39 deletions(-) New commits: commit e2bdf124eca37cdcac62224269cdc6792126638c Author: Mert Tumer AuthorDate: Mon Jan 20 22:08:40 2020 +0300 Commit: Michael Meeks CommitDate: Wed May 13 20:12:30 2020 +0100 Fix csv dialog pops up on mobile when copy/paste Change-Id: I9e4b154090ad9da0d10a368656f6f63fe335cecf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87132 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice (cherry picked from commit f99605b6df506d51411d22d377eafd722685edbd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88397 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 0e61a2a8a072..c80d6b059735 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -336,7 +337,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, { // Do CSV dialog if more than one line. But not if invoked from Automation. sal_Int32 nDelim = pStrBuffer->indexOf('\n'); -if (!comphelper::Automation::AutomationInvokedZone::isActive() +if (!comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) && !comphelper::Automation::AutomationInvokedZone::isActive() && nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1) { vcl::Window* pParent = GetActiveWin(); commit 935c46c4e65b30486daac27c5bfd4c0532c8fcb8 Author: Noel Grandin AuthorDate: Mon Nov 18 15:35:18 2019 +0200 Commit: Michael Meeks CommitDate: Wed May 13 20:07:04 2020 +0100 crashtesting fdo78617-2.ods as a consequence of commit feec8e3c34e08b621098a17f1011dccd0b4f7f4c Date: Tue Nov 12 16:00:55 2019 +0200 reduce iteration in ScViewData::GetScrPos Change-Id: Iec539c33bd80b9ad2d2a3698d443c5cec81f8f85 Reviewed-on: https://gerrit.libreoffice.org/83093 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index e4ca4479bd3b..b5939dbbc83e 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -3282,17 +3282,20 @@ sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fS // round-down a single height value, multiply resulting (pixel) values const sal_uLong nOneHeight = static_cast( aData.mnValue * fScale ); -SCROW nRowsInSegment = nSegmentEnd + 1 - nRow; -if (pnMaxHeight) +// sometimes scaling results in zero height +if (nOneHeight) { -nRowsInSegment = std::min(nRowsInSegment, static_cast(*pnMaxHeight / nOneHeight + 1)); -nHeight += nOneHeight * nRowsInSegment; -if (nHeight > *pnMaxHeight) -return nHeight; +SCROW nRowsInSegment = nSegmentEnd + 1 - nRow; +if (pnMaxHeight) +{ +nRowsInSegment = std::min(nRowsInSegment, static_cast(*pnMaxHeight / nOneHeight + 1)); +nHeight += nOneHeight * nRowsInSegment; +if (nHeight > *pnMaxHeight) +return nHeight; +} +else +nHeight += nOneHeight * nRowsInSegment; } -else -nHeight += nOneHeight * nRowsInSegment; - nRow = nSegmentEnd + 1; } commit 50cf5641eda91337015ae0ec34fd24ce22e9583b Author: Noel Grandin AuthorDate: Tue Nov 12 16:00:55 2019 +0200 Commit: Michael Meeks CommitDate: Wed May 13 20:06:32 2020 +0100 reduce iteration in ScViewData::GetScrPos we already have a ScTable::GetRowHeightScaled method that uses spans, so use that. Change-Id: I126292b4a8b37ebf2d4f737dcbfdadc31226531e Reviewed-on: https://gerrit.libreoffice.org/82520 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source include/sfx2
desktop/source/lib/init.cxx| 20 include/sfx2/sidebar/SidebarController.hxx |1 + 2 files changed, 17 insertions(+), 4 deletions(-) New commits: commit 3ea23d3b13e08f2ac9d83446acc588bbf1d4ad74 Author: Mert Tumer AuthorDate: Fri May 8 17:23:12 2020 +0300 Commit: Andras Timar CommitDate: Sun May 10 16:38:58 2020 +0200 mobile: fix calc chart wizard properties is not shown Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 40c19ca439fd..203ece44ef51 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1147,10 +1147,24 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "") if (!pDockingWin) return; +OUString currentDeckId = pDockingWin->GetSidebarController()->GetCurrentDeckId(); + +// check if it is the chart deck id, if it is, don't switch to default deck +bool switchToDefault = true; + +if (currentDeckId == "ChartDeck") +switchToDefault = false; + if (!sidebarDeckId.isEmpty()) { pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId); } +else +{ +if (switchToDefault) +pDockingWin->GetSidebarController()->SwitchToDefaultDeck(); +} + pDockingWin->SyncUpdate(); } else @@ -3661,7 +3675,6 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma SfxObjectShell* pDocSh = SfxObjectShell::Current(); OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8); LibLODocument_Impl* pDocument = static_cast(pThis); -OUString sidebarDeckId = "PropertyDeck"; std::vector aPropertyValuesVector(jsonToPropertyValuesVector(pArguments)); @@ -3795,13 +3808,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") { -sidebarDeckId = "WriterPageDeck"; -setupSidebar(true, sidebarDeckId); +setupSidebar(true, "WriterPageDeck"); return; } else if (gImpl && aCommand == ".uno:SidebarShow") { -setupSidebar(true, sidebarDeckId); +setupSidebar(true); return; } else if (gImpl && aCommand == ".uno:SidebarHide") diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index e65bbae42537..92a063c9f403 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -140,6 +140,7 @@ public: FocusManager& GetFocusManager() { return maFocusManager;} ResourceManager* GetResourceManager() { return mpResourceManager.get();} +auto& GetCurrentDeckId() const { return msCurrentDeckId; } // std::unique_ptr GetResourceManager() { return mpResourceManager;} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source include/sfx2 sfx2/source
desktop/source/lib/init.cxx | 17 +++-- include/sfx2/sidebar/SidebarDockingWindow.hxx |1 + sfx2/source/sidebar/ResourceManager.cxx |9 + 3 files changed, 25 insertions(+), 2 deletions(-) New commits: commit 7f578ebe3cd824c05492c8fce9a1ed60bb5cfdfa Author: Mert Tumer AuthorDate: Wed Apr 29 16:29:57 2020 +0300 Commit: Andras Timar CommitDate: Thu May 7 07:06:26 2020 +0200 added ability to switch sidebar deck on init.cxx for mobilewizard Change-Id: I532398bc41e1c984c24b1d39e4844315a0a69847 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93162 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 7c3a86ca5878..e6c2d6630a58 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -113,6 +113,7 @@ #include #include #include +#include #include #include #include @@ -1120,7 +1121,7 @@ rtl::Reference forceSetClipboardForCurrentView(LibreOfficeKitDocum #endif -void setupSidebar(bool bShow) +void setupSidebar(bool bShow, OUString sidebarDeckId = "") { SfxViewShell* pViewShell = SfxViewShell::Current(); SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : nullptr; @@ -1142,6 +1143,11 @@ void setupSidebar(bool bShow) auto pDockingWin = dynamic_cast(pChild->GetWindow()); if (!pDockingWin) return; + +if (!sidebarDeckId.isEmpty()) +{ +pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId); +} pDockingWin->SyncUpdate(); } else @@ -3625,6 +3631,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma SfxObjectShell* pDocSh = SfxObjectShell::Current(); OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8); LibLODocument_Impl* pDocument = static_cast(pThis); +OUString sidebarDeckId = "PropertyDeck"; std::vector aPropertyValuesVector(jsonToPropertyValuesVector(pArguments)); @@ -3756,9 +3763,15 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma return; } } +else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage") +{ +sidebarDeckId = "WriterPageDeck"; +setupSidebar(true, sidebarDeckId); +return; +} else if (gImpl && aCommand == ".uno:SidebarShow") { -setupSidebar(true); +setupSidebar(true, sidebarDeckId); return; } else if (gImpl && aCommand == ".uno:SidebarHide") diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx b/include/sfx2/sidebar/SidebarDockingWindow.hxx index 049cf241aacd..64287cfe74a5 100644 --- a/include/sfx2/sidebar/SidebarDockingWindow.hxx +++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx @@ -47,6 +47,7 @@ public: void SetReadyToDrag( bool bStartDrag ) { mbIsReadyToDrag = bStartDrag; } bool IsReadyToDrag() const { return mbIsReadyToDrag; } +auto& GetSidebarController() const { return mpSidebarController; } /// Force generation of all panels by completion. void SyncUpdate(); diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index f563943e150d..0642109b1dd2 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -430,6 +430,15 @@ void ResourceManager::ReadPanelList() if (!aPanelNode.isValid()) continue; +if (comphelper::LibreOfficeKit::isActive()) +{ +// Hide these panels in LOK as they aren't fully functional. +OUString aPanelId = getString(aPanelNode, "Id"); +if (aPanelId == "PageStylesPanel" || aPanelId == "PageHeaderPanel" +|| aPanelId == "PageFooterPanel") +continue; +} + maPanels.push_back(std::make_shared()); PanelDescriptor& rPanelDescriptor(*maPanels.back()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source sc/uiconfig
sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |2 - sc/uiconfig/scalc/ui/sidebarnumberformat.ui| 28 ++--- 2 files changed, 15 insertions(+), 15 deletions(-) New commits: commit 666bbf736381396647db69f97c753ffb8bddf693 Author: Mert Tumer AuthorDate: Tue Apr 14 18:15:59 2020 +0300 Commit: Andras Timar CommitDate: Fri Apr 17 11:13:05 2020 +0200 Added unique id for number format combobox This will allow us to control it for the mobilewizard easily rather than using the id of 'category' which is not unique. Change-Id: I61b612d5355584597a16942b7151a82376033a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92202 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92309 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index ec9e665287b2..36dd8f129347 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -35,7 +35,7 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel( const css::uno::Reference& rxFrame, SfxBindings* pBindings) : PanelLayout(pParent,"NumberFormatPropertyPanel", "modules/scalc/ui/sidebarnumberformat.ui", rxFrame, true) -, mxLbCategory(m_xBuilder->weld_combo_box("category")) +, mxLbCategory(m_xBuilder->weld_combo_box("numberformatcombobox")) , mxTBCategory(m_xBuilder->weld_toolbar("numberformat")) , mxCatagoryDispatch(new ToolbarUnoDispatcher(*mxTBCategory, *m_xBuilder, rxFrame)) , mxFtDecimals(m_xBuilder->weld_label("decimalplaceslabel")) diff --git a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui index 09704d6ef5d0..60a6185aac8f 100644 --- a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui +++ b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui @@ -67,27 +67,27 @@ - + True False -Select a category of contents. +Select a category of contents. center True - General - Number - Percent - Currency - Date - Time - Scientific - Fraction - Boolean Value - Text + General + Number + Percent + Currency + Date + Time + Scientific + Fraction + Boolean Value + Text - -Category + +Category ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source sfx2/source
desktop/source/lib/init.cxx |1 + sfx2/source/control/unoctitm.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit df619066c1c20d757cb6d2a5b29a566787b9173f Author: Mert Tumer AuthorDate: Tue Apr 14 18:19:09 2020 +0300 Commit: Andras Timar CommitDate: Wed Apr 15 23:20:06 2020 +0200 send state changes of .uno:NumberFormatDecimal command to LOK Change-Id: I7872c0a0c123865c77d3aa8937775116368f1ffa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92203 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit 2f6cbb67099edde535a81e7b0a32c1418805d6d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92290 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 8f42bd2883a4..b8228bfe8639 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2647,6 +2647,7 @@ static void doc_iniUnoCommands () OUString(".uno:ToggleMergeCells"), OUString(".uno:NumberFormatCurrency"), OUString(".uno:NumberFormatPercent"), +OUString(".uno:NumberFormatDecimal"), OUString(".uno:NumberFormatDate"), OUString(".uno:FrameLineColor"), OUString(".uno:SortAscending"), diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index d6e6c8673e38..9d4bc6612be0 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1153,6 +1153,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "WrapText" || aEvent.FeatureURL.Path == "NumberFormatCurrency" || aEvent.FeatureURL.Path == "NumberFormatPercent" || + aEvent.FeatureURL.Path == "NumberFormatDecimal" || aEvent.FeatureURL.Path == "NumberFormatDate") { bool aBool; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/drawfunc/fudraw.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 2e6753fc764c9c5f36c623e4bdf0f3dfc7229391 Author: Mert Tumer AuthorDate: Thu Apr 9 19:36:53 2020 +0300 Commit: Andras Timar CommitDate: Wed Apr 15 20:05:05 2020 +0200 mobile: fix double tap on chart doesn't get into editmode Sometimes double tapping on a chart when it is not selected in the beginning, starts the input mode instead of chart editing. Change-Id: Iee2a01c1ac909ac4060e91cdacfa9161dc4f1c3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91992 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92291 Tested-by: Jenkins diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index bd6ac3c96c09..eb05faccc730 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,7 @@ #include #include #include +#include // base class for draw module specific functions FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP, @@ -244,6 +246,15 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); +bool isMobilePhone = comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()); +// Double tapping on charts on phone may result in activating the edit mode which is not wanted. +// It happens due to the delay of selection message of the object from kit to javascript +// in that case F2 is sent instead of double click +if (isMobilePhone && ScDocument::IsChart(pObj)) +{ +rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 ); +break; +} if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) ) // start text edit for suitable object bReturn = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source
sc/source/ui/drawfunc/fudraw.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b Author: Mert Tumer AuthorDate: Thu Apr 9 19:36:53 2020 +0300 Commit: Andras Timar CommitDate: Wed Apr 15 15:37:42 2020 +0200 mobile: fix double tap on chart doesn't get into editmode Sometimes double tapping on a chart when it is not selected in the beginning, starts the input mode instead of chart editing. Change-Id: Iee2a01c1ac909ac4060e91cdacfa9161dc4f1c3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91992 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 65a3f0b843da..c60890c23c15 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,7 @@ #include #include #include +#include // base class for draw module specific functions FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP, @@ -248,6 +250,15 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); +bool isMobilePhone = comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()); +// Double tapping on charts on phone may result in activating the edit mode which is not wanted. +// It happens due to the delay of selection message of the object from kit to javascript +// in that case F2 is sent instead of double click +if (isMobilePhone && ScDocument::IsChart(pObj)) +{ +rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 ); +break; +} if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) ) // start text edit for suitable object bReturn = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source
sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 3d407fff18e6c612fe4f63559a600ddcce7c3e94 Author: Mert Tumer AuthorDate: Tue Apr 14 18:15:59 2020 +0300 Commit: Andras Timar CommitDate: Wed Apr 15 11:44:03 2020 +0200 Added unique id for number format combobox This will allow us to control it for the mobilewizard easily rather than using the id of 'category' which is not unique. Change-Id: I61b612d5355584597a16942b7151a82376033a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92202 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 28eb0ab05ffc..ec4da5d0823f 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -91,6 +91,7 @@ void NumberFormatPropertyPanel::Initialize() mpLbCategory->SetSelectHdl ( LINK(this, NumberFormatPropertyPanel, NumFormatSelectHdl) ); mpLbCategory->SelectEntryPos(0); mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount()); +mpLbCategory->set_id("numberformatcombobox"); Link aLink = LINK(this, NumberFormatPropertyPanel, NumFormatValueHdl); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source sfx2/source
desktop/source/lib/init.cxx |1 + sfx2/source/control/unoctitm.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit 2f6cbb67099edde535a81e7b0a32c1418805d6d6 Author: Mert Tumer AuthorDate: Tue Apr 14 18:19:09 2020 +0300 Commit: Andras Timar CommitDate: Wed Apr 15 11:44:20 2020 +0200 send state changes of .uno:NumberFormatDecimal command to LOK Change-Id: I7872c0a0c123865c77d3aa8937775116368f1ffa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92203 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 612b6a51ceac..146f65889a1a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2648,6 +2648,7 @@ static void doc_iniUnoCommands () OUString(".uno:ToggleMergeCells"), OUString(".uno:NumberFormatCurrency"), OUString(".uno:NumberFormatPercent"), +OUString(".uno:NumberFormatDecimal"), OUString(".uno:NumberFormatDate"), OUString(".uno:FrameLineColor"), OUString(".uno:SortAscending"), diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 3f84d441562a..cedf079234ff 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1152,6 +1152,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "WrapText" || aEvent.FeatureURL.Path == "NumberFormatCurrency" || aEvent.FeatureURL.Path == "NumberFormatPercent" || + aEvent.FeatureURL.Path == "NumberFormatDecimal" || aEvent.FeatureURL.Path == "NumberFormatDate") { bool aBool; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/uitest/uiobject.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 7a5b499dd25d7d1e077974053b52b72ee7f44ebc Author: Mert Tumer AuthorDate: Fri Apr 3 15:34:37 2020 +0300 Commit: Andras Timar CommitDate: Tue Apr 14 23:28:49 2020 +0200 mobile: cannot change linestyle on impress Change-Id: I6e63c951f7a7d4fc70eed424cc2f7da60dbad9b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91632 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit e4f28d0642e4663d558a55e99ec1cc2ea9ad27ed) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92172 Tested-by: Jenkins diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 206b6a32e3b3..737979b29a82 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -995,7 +996,11 @@ ListBoxUIObject::~ListBoxUIObject() void ListBoxUIObject::execute(const OUString& rAction, const StringMap& rParameters) { -if (!mxListBox->IsEnabled() || !mxListBox->IsReallyVisible()) +if (!mxListBox->IsEnabled()) +return; + +bool isTiledRendering = comphelper::LibreOfficeKit::isActive(); +if (!isTiledRendering && !mxListBox->IsReallyVisible()) return; if (rAction == "SELECT") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/ui/func/fusel.cxx | 16 1 file changed, 8 insertions(+), 8 deletions(-) New commits: commit 895c47abc7fbd56f04b9f5d295885ea60403d62c Author: Mert Tumer AuthorDate: Wed Mar 18 13:17:32 2020 +0300 Commit: Andras Timar CommitDate: Tue Apr 14 19:40:23 2020 +0200 mobile: fix hyperlinks are not clickable on impress Change-Id: I77a0ef263814359607d9c1d863f93c55f3493dbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90687 Tested-by: Andras Timar Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92211 Tested-by: Jenkins diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index b425727b67af..18616775ac9e 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -266,6 +266,14 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { mpWindow->ReleaseMouse(); +// If tiled rendering, let client handles URL execution and early returns. +if (comphelper::LibreOfficeKit::isActive()) +{ +SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); + rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.pURLField->GetURL().toUtf8().getStr()); +return true; +} + if (!lcl_followHyperlinkAllowed(rMEvt)) return true; @@ -275,14 +283,6 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SfxViewFrame* pFrame = mpViewShell->GetViewFrame(); mpWindow->ReleaseMouse(); -// If tiled rendering, let client handles URL execution and early returns. -if (comphelper::LibreOfficeKit::isActive()) -{ -SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); - rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.pURLField->GetURL().toUtf8().getStr()); -return true; -} - if (rMEvt.IsMod1()) { // Open in new frame ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits