[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/tabpages/numpages.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e155c38e75dff41d7e80ade3c7aa9e8e69572ad4 Author: Xisco Fauli AuthorDate: Mon Oct 3 19:40:22 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Oct 10 11:34:42 2022 +0200 cui: avoid divide by zero in SvxNumberingPreview::Paint Just check for pActNum->GetLevelCount() > 1 as done later for nYStep See https://crashreport.libreoffice.org/stats/signature/SvxNumberingPreview::Paint(OutputDevice%20&,tools::Rectangle%20const%20&) Change-Id: I0e9518dafe50b2b10a83487e9247e2fd46f9decd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140888 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit f171d9af9bb13ec037841d7c8aa11fcc628c303c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141056 Reviewed-by: Xisco Fauli diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 7d2683ab3ed4..1195417a95ce 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2212,7 +2212,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool tools::Long nWidthRelation = 30; // chapter dialog // height per level -tools::Long nXStep = aSize.Width() / (3 * pActNum->GetLevelCount()); +tools::Long nXStep = aSize.Width() / (pActNum->GetLevelCount() > 1 ? 3 * pActNum->GetLevelCount() : 3); if (pActNum->GetLevelCount() < 10) nXStep /= 2; tools::Long nYStart = 4;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/dialogs/SpellDialog.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 2f2f39309c33800f6b751062f26b645d4fd9b050 Author: Miklos Vajna AuthorDate: Wed Sep 28 09:09:03 2022 +0200 Commit: Caolán McNamara CommitDate: Sun Oct 2 20:42:02 2022 +0200 cui: fix crash in SpellDialog::SpellContinue_Impl Crashreport signature: Fatal signal received: SIGSEGV code: 128 for address: 0x0 program/libcuilo.so svx::SpellDialog::GetNextSentence_Impl(std::unique_ptr >*, bool, bool) include/com/sun/star/uno/Reference.hxx:114 program/libcuilo.so svx::SpellDialog::SpellContinue_Impl(std::unique_ptr >*, bool, bool) cui/source/dialogs/SpellDialog.cxx:355 program/libcuilo.so svx::SpellDialog::ChangeHdl(weld::Button&) include/rtl/ustring.hxx:527 program/libmergedlo.so Control::ImplCallEventListenersAndHandler(VclEventId, std::function const&) include/rtl/ref.hxx:208 program/libmergedlo.so Button::Click() /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/std_function.h:244 Change-Id: I2c7267118213ea7d915a28d77badf93f8ff75683 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140586 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140689 Tested-by: Jenkins (cherry picked from commit 9be24f694d42fc9cae55ed911e0dff7f729803f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140611 Reviewed-by: Caolán McNamara (cherry picked from commit ae1f8a426338770f0dd46c72553c405158415e65) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140761 diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 329b20d54e29..9f110c6a5aa1 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -351,6 +351,11 @@ void SpellDialog::SpellContinue_Impl(std::unique_ptr* pGua //then GetNextSentence() has to be called followed again by MarkNextError() //MarkNextError is not initially called if the UndoEdit mode is active bool bNextSentence = false; +if (!m_xSentenceED) +{ +return; +} + if(!((!m_xSentenceED->IsUndoEditMode() && m_xSentenceED->MarkNextError( bIgnoreCurrentError, xSpell )) || ( bNextSentence = GetNextSentence_Impl(pGuard, bUseSavedSentence, m_xSentenceED->IsUndoEditMode()) && m_xSentenceED->MarkNextError( false, xSpell return;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/tabpages/measure.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit f60240494420b590d00c064a2469922a921a4a19 Author: Julien Nabet AuthorDate: Thu Jul 28 11:21:42 2022 +0200 Commit: Xisco Fauli CommitDate: Tue Aug 9 17:07:08 2022 +0200 tdf#119246: Dimensions dialog has wrong values in several fields Regression from a8dd49b9fc59371ff8edb31082bbd4f1b6179b1c Convert dimension lines tab page to widget UI Min and max should be -1 and 1 (in mm). Change-Id: I936857f4c10bd2b6fec7b0e492c069b88cc071dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137553 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-by: Julien Nabet (cherry picked from commit d39a6726b8583086215a4452ce6867eb20c118d8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137524 Reviewed-by: Xisco Fauli diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 027f52a77d18..c3eed0e4ece2 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -110,11 +110,16 @@ SvxMeasurePage::SvxMeasurePage(weld::Container* pPage, weld::DialogController* p m_xTsbAutoPosH->connect_toggled(LINK(this, SvxMeasurePage, ClickAutoPosHdl_Impl)); Link aLink(LINK(this, SvxMeasurePage, ChangeAttrEditHdl_Impl)); +m_xMtrFldLineDist->set_range(-1, 1, FieldUnit::MM); m_xMtrFldLineDist->connect_value_changed(aLink); m_xMtrFldHelplineOverhang->connect_value_changed(aLink); +m_xMtrFldHelplineOverhang->set_range(-1, 1, FieldUnit::MM); m_xMtrFldHelplineDist->connect_value_changed(aLink); +m_xMtrFldHelplineDist->set_range(-1, 1, FieldUnit::MM); m_xMtrFldHelpline1Len->connect_value_changed(aLink); +m_xMtrFldHelpline1Len->set_range(-1, 1, FieldUnit::MM); m_xMtrFldHelpline2Len->connect_value_changed(aLink); +m_xMtrFldHelpline2Len->set_range(-1, 1, FieldUnit::MM); m_xMtrFldDecimalPlaces->connect_value_changed(LINK(this, SvxMeasurePage, ChangeAttrSpinHdl_Impl)); m_xTsbBelowRefEdge->connect_toggled(LINK(this, SvxMeasurePage, ChangeAttrClickHdl_Impl)); m_xTsbParallel->connect_toggled( LINK( this, SvxMeasurePage, ChangeAttrClickHdl_Impl));
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/customize/SvxMenuConfigPage.cxx|2 +- cui/source/customize/SvxToolbarConfigPage.cxx |6 -- 2 files changed, 5 insertions(+), 3 deletions(-) New commits: commit 816435e4c2d52615462670464c48689bebdf1e55 Author: Caolán McNamara AuthorDate: Wed May 4 11:52:58 2022 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Fri May 6 12:56:13 2022 +0200 Resolves: rhbz#2081661 gtk-critical gtk_tree_view_scroll_to_cell assertion Change-Id: I4c7c4caed907072ef3a73ccfafabe882d618fa0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133730 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx index 34cee1368d7a..bf7457193f5c 100644 --- a/cui/source/customize/SvxMenuConfigPage.cxx +++ b/cui/source/customize/SvxMenuConfigPage.cxx @@ -136,7 +136,7 @@ void SvxMenuConfigPage::Init() ReloadTopLevelListBox(); -m_xTopLevelListBox->set_active(0); +m_xTopLevelListBox->set_active(m_xTopLevelListBox->get_count() ? 0 : -1); SelectElement(); m_xCommandCategoryListBox->Init(comphelper::getProcessComponentContext(), m_xFrame, diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index 99a85d82f96e..d2284428d8f1 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -246,10 +246,12 @@ void SvxToolbarConfigPage::Init() ReloadTopLevelListBox(); -sal_Int32 nPos = 0; +sal_Int32 nCount = m_xTopLevelListBox->get_count(); +sal_Int32 nPos = nCount > 0 ? 0 : -1; + if (!m_aURLToSelect.isEmpty()) { -for (sal_Int32 i = 0, nCount = m_xTopLevelListBox->get_count(); i < nCount; ++i) +for (sal_Int32 i = 0; i < nCount; ++i) { SvxConfigEntry* pData = reinterpret_cast(m_xTopLevelListBox->get_id(i).toInt64());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/tabpages/numpages.cxx |8 1 file changed, 8 insertions(+) New commits: commit 524cddada9707305e08daa9a6940a70c0539761e Author: Julien Nabet AuthorDate: Sat Apr 23 18:17:57 2022 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Tue Apr 26 09:40:38 2022 +0200 tdf#136429: use FieldUnit value for min/max of some fields of numbering dialog Change-Id: I01428703a7bdb2090fd145e5373c37aff0d386ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133348 (cherry picked from commit 176021427fece6363df56022b63813e93505fdc2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133399 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index ade080a1436a..7d2683ab3ed4 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -2506,6 +2507,13 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(weld::Container* pPage, weld::Dialo { SetExchangeSupport(); +// set metric +FieldUnit eFUnit = GetModuleFieldUnit(rSet); + +SetFieldUnit( *m_xDistBorderMF, eFUnit ); +SetFieldUnit( *m_xIndentMF, eFUnit ); +SetFieldUnit( *m_xDistNumMF, eFUnit ); + m_xAlignedAtMF->set_range(0, SAL_MAX_INT32, FieldUnit::NONE); m_xListtabMF->set_range(0, SAL_MAX_INT32, FieldUnit::NONE); m_xIndentAtMF->set_range(0, SAL_MAX_INT32, FieldUnit::NONE);
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/dialogs/FontFeaturesDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a6b7356fbf49e07428262fa0b510d8d4c03eadd0 Author: Julien Nabet AuthorDate: Tue Apr 5 22:10:57 2022 +0200 Commit: Xisco Fauli CommitDate: Wed Apr 6 11:19:47 2022 +0200 tdf#148397: Crash on font features dialog opening with EB Garamond bt: 0 0x7f7ba5ef549c in rtl::str::acquire<_rtl_uString>(_rtl_uString*) (pThis=0x0) at sal/rtl/strtmpl.hxx:825 1 0x7f7ba5ef8d45 in rtl_uString_acquire(rtl_uString*) (pThis=0x0) at sal/rtl/ustring.cxx:1199 2 0x7f7b485757e3 in rtl::OUString::OUString(_rtl_uString*) (this=0x7ffc345a9f20, str=0x0) at include/rtl/ustring.hxx:252 3 0x7f7b485fd1da in cui::FontFeaturesDialog::fillGrid(std::__debug::vector > const&) (this= 0x7ffc345aa538, rFontFeatures=std::__debug::vector of length 43, capacity 64 = {...}) at cui/source/dialogs/FontFeaturesDialog.cxx:98 4 0x7f7b485fcc83 in cui::FontFeaturesDialog::initialize() (this=0x7ffc345aa538) at cui/source/dialogs/FontFeaturesDialog.cxx:66 5 0x7f7b485fc8b9 in cui::FontFeaturesDialog::FontFeaturesDialog(weld::Window*, rtl::OUString const&) (this=0x7ffc345aa538, pParent=0x6f2f748, rFontName="EB Garamond 12") at cui/source/dialogs/FontFeaturesDialog.cxx:28 6 0x7f7b488f3165 in SvxCharNamePage::FontFeatureButtonClicked(weld::Button&) (this=0x6f0a620, rButton=...) at cui/source/tabpages/chardlg.cxx:1157 Revealed with 5afdcad4c0e7850b18996c549892b9360cd8973f Pass context and resource string down to boost::locale separately because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: I20b18c8f46014feb453f81d66dd7cb490124efa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132590 Reviewed-by: Julien Nabet Tested-by: Jenkins (cherry picked from commit ad3d2d1bc7e07f79a26841d89a85e94999a7c8ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132600 Reviewed-by: Xisco Fauli diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx index 4735de194255..d41afa809984 100644 --- a/cui/source/dialogs/FontFeaturesDialog.cxx +++ b/cui/source/dialogs/FontFeaturesDialog.cxx @@ -96,7 +96,7 @@ int FontFeaturesDialog::fillGrid(std::vector const& rFontFea if (rFontFeature.m_aDefinition) aDefinition = rFontFeature.m_aDefinition; if (!aDefinition) -aDefinition = { nFontFeatureCode, nullptr }; +aDefinition = { nFontFeatureCode, "" }; m_aFeatureItems.emplace_back(m_xContentGrid.get());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/dialogs/SpellDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5aa42d256fa5081d79da3eb21ddd8000d7b6cc1c Author: Michael Weghorn AuthorDate: Thu Mar 17 08:26:59 2022 +0100 Commit: Xisco Fauli CommitDate: Mon Mar 21 13:34:58 2022 +0100 Call corresponding base class method in SpellDialog::Deactivate At a quick glance, the fact that `SpellDialog::Deactivate` previously did the same as `SpellDialog::Activate` looks like a copy-paste mistake; both were added in commit 5261417cbb3051b812164838d19c0f748573df45 Date: Fri Jun 14 21:56:44 2019 +0100 weld SpellDialog Change-Id: Ib06d19e46470141d5bfcfc7e790160c1879b6a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131598 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dae7b92c9155..329b20d54e29 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -945,7 +945,7 @@ void SpellDialog::Activate() void SpellDialog::Deactivate() { -SfxModelessDialogController::Activate(); +SfxModelessDialogController::Deactivate(); ToplevelFocusChanged(); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source sw/Module_sw.mk sw/qa sw/source sw/UITest_sw_uibase_shells.mk
cui/source/tabpages/macroass.cxx | 11 ++--- sw/Module_sw.mk |1 sw/UITest_sw_uibase_shells.mk | 16 + sw/qa/uitest/data/image-rel-size.fodt | 40 ++ sw/qa/uitest/uibase/shells/shells.py | 32 +++ sw/source/uibase/shells/grfsh.cxx | 10 6 files changed, 107 insertions(+), 3 deletions(-) New commits: commit 03df3e2d107ac8fb2a01c5a536a095466f641bb5 Author: Miklos Vajna AuthorDate: Thu Mar 17 17:36:18 2022 +0100 Commit: Xisco Fauli CommitDate: Mon Mar 21 13:01:26 2022 +0100 sw image dialog: fix fallback width/height for images with relative sizes Make sure that we work with the up to date layout size of the image in the dialog, otherwise 80% shows up as 237%. Also fix SfxMacroTabPage::FillItemSet() to not put anything to the output item set when the macro table is empty, this way clicking OK in the image dialog results in an unmodified document when the user doesn't change anything. Change-Id: I4b987bd3e3818ee737e37ea10861f9043c25bc93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131714 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 9e8712ed6f9fb5dbd971e352a5709bd45fadc74f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131860 Reviewed-by: Xisco Fauli diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 94143e310ebd..d752a043077b 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -155,9 +155,14 @@ bool SfxMacroTabPage::FillItemSet( SfxItemSet* rSet ) SvxMacroItem aItem( GetWhich( aPageRg[0] ) ); const_cast(aItem.GetMacroTable()) = aTbl; -const SfxPoolItem* pItem; -if( SfxItemState::SET != GetItemSet().GetItemState( aItem.Which(), true, ) -|| aItem != *static_cast(pItem) ) +const SfxPoolItem* pItem = nullptr; +SfxItemState eState = GetItemSet().GetItemState(aItem.Which(), true, ); +if (eState == SfxItemState::DEFAULT && aTbl.empty()) +{ +// Don't touch the item set if there was no input and our table is empty. +return false; +} +if (SfxItemState::SET != eState || aItem != *static_cast(pItem)) { rSet->Put( aItem ); return true; diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index da25613e7ace..05a07c427841 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -195,6 +195,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sw,\ UITest_sw_styleInspector \ UITest_sw_ui_fmtui \ UITest_sw_ui_index \ + UITest_sw_uibase_shells \ UITest_classification \ UITest_writer_macro_tests \ UITest_writer_dialogs \ diff --git a/sw/UITest_sw_uibase_shells.mk b/sw/UITest_sw_uibase_shells.mk new file mode 100644 index ..de9cb7c8a9d9 --- /dev/null +++ b/sw/UITest_sw_uibase_shells.mk @@ -0,0 +1,16 @@ +# 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/. +# + +$(eval $(call gb_UITest_UITest,sw_uibase_shells)) + +$(eval $(call gb_UITest_add_modules,sw_uibase_shells,$(SRCDIR)/sw/qa/uitest,\ + uibase/shells/ \ +)) + +$(eval $(call gb_UITest_set_defs,sw_uibase_shells, \ +TDOC="$(SRCDIR)/sw/qa/uitest/data" \ +)) diff --git a/sw/qa/uitest/data/image-rel-size.fodt b/sw/qa/uitest/data/image-rel-size.fodt new file mode 100644 index ..9df285861616 --- /dev/null +++ b/sw/qa/uitest/data/image-rel-size.fodt @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + iVBORw0KGgoNSUhEUgAAAEBACAQAYLlVBGdBTUEAALGPC/xhBQFz + UkdCAK7OHOkgY0hSTQAAeiYAAICEAAD6gOgAAHUwAADqYAAAOpgAABdwnLpRPAAA + AAJiS0dEAACqjSMyCW9GRnMGAAAMc1XTCXBIWXMAAA3XAAAN1wFCKJt4 + CXZwQWcAAABMQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+ + BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49 + cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn + /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF + QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo + YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo + 2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A + cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA + AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A + hOCNQr34oD4ldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6 +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/dialogs/AdditionsDialog.cxx | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit 9862ce925429e5a2f7f75f654f798f55b33e8bcf Author: Gabor Kelemen AuthorDate: Wed Jan 12 23:49:37 2022 +0100 Commit: Xisco Fauli CommitDate: Fri Jan 14 16:38:47 2022 +0100 tdf#146703 Rework previous fix to query extension metadata to limit its error potential by encoding only the category string Change-Id: Ia3d3bfa6981ec46b71b500980abda9ad7f606cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128361 Reviewed-by: Stephan Bergmann Tested-by: Jenkins (cherry picked from commit b1ec326619f7b91e56252b992159fd00bbff2ba7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128428 Reviewed-by: Xisco Fauli diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index aa36bf49de87..c4247c29b516 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -80,9 +80,7 @@ std::string ucbGet(const OUString& rURL) { try { -OUString sEncodedUrl = INetURLObject::encode(rURL, INetURLObject::PART_FPATH, - INetURLObject::EncodeMechanism::All); -auto const s = utl::UcbStreamHelper::CreateStream(sEncodedUrl, StreamMode::STD_READ); +auto const s = utl::UcbStreamHelper::CreateStream(rURL, StreamMode::STD_READ); if (!s) { SAL_WARN("cui.dialogs", "CreateStream <" << rURL << "> failed"); @@ -460,8 +458,12 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, const OUString& sAdditio this->set_title(titlePrefix); m_sTag = "allextensions"; // Means empty parameter } + +OUString sEncodedURLPart = INetURLObject::encode(m_sTag, INetURLObject::PART_PCHAR, + INetURLObject::EncodeMechanism::All); + //FIXME: Temporary URL - v0 is not using actual api -OUString rURL = "https://extensions.libreoffice.org/api/v0/; + m_sTag + ".json"; +OUString rURL = "https://extensions.libreoffice.org/api/v0/; + sEncodedURLPart + ".json"; m_sURL = rURL; m_xExtensionManager
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/dialogs/AdditionsDialog.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit b444c8394ab57203cefe25d8cbb4dbe08e5ee19c Author: Gabor Kelemen AuthorDate: Tue Jan 11 23:37:43 2022 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Wed Jan 12 18:10:38 2022 +0100 tdf#146703 Fix URL encoding when querying extensions so that extension information files are properly downloaded such as: https://extensions.libreoffice.org/api/v0/Color Palette.json Change-Id: Ifb2688b1f09d91277b7d5fe065b0d0f8533310b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128306 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 348e0651cc5add15ac03b11dde08057cf33f9b16) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128246 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index ec173740bc63..aa36bf49de87 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -80,7 +80,9 @@ std::string ucbGet(const OUString& rURL) { try { -auto const s = utl::UcbStreamHelper::CreateStream(rURL, StreamMode::STD_READ); +OUString sEncodedUrl = INetURLObject::encode(rURL, INetURLObject::PART_FPATH, + INetURLObject::EncodeMechanism::All); +auto const s = utl::UcbStreamHelper::CreateStream(sEncodedUrl, StreamMode::STD_READ); if (!s) { SAL_WARN("cui.dialogs", "CreateStream <" << rURL << "> failed");
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/options/optgdlg.cxx | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) New commits: commit 1b0095f174beae396355753de873b52c86cdc8a3 Author: Noel Grandin AuthorDate: Sat Jan 8 14:20:52 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jan 10 12:19:44 2022 +0100 fix Options->LibreOffice->View->Visibility->Menu on Windows, impossible to set to Hide, regression from commit 131759a3db51140c21594308ed99c71aa7aba43a Date: Sun Jul 25 16:21:39 2021 +0200 use officecfg for menu options Change-Id: I5312be2963d15ab85c267ece073e52984b1a34de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128137 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 31872a382342060d6e1ecd9168b2a8c7a57d4717) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128152 Reviewed-by: Xisco Fauli diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 43b529a82718..e0b0bfdf8c5d 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -775,13 +775,8 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) if (m_xMenuIconsLB->get_value_changed_from_saved()) { -TriState eMenuIcons = m_xMenuIconsLB->get_active() == 0 ? -TRISTATE_INDET : -static_cast(m_xMenuIconsLB->get_active() - 1); -// Output cache of current setting as possibly modified by System Theme for older version -bool bMenuIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus(); - officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(eMenuIcons == TRISTATE_INDET, xChanges); - officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(bMenuIcons, xChanges); + officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(m_xMenuIconsLB->get_active() == 0, xChanges); + officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(m_xMenuIconsLB->get_active() == 2, xChanges); bModified = true; bMenuOptModified = true; bAppearanceChanged = true; @@ -931,10 +926,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) // WorkingSet m_xFontShowCB->set_active(officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::get()); -bool bMenuIcons = officecfg::Office::Common::View::Menu::ShowIconsInMenues::get(); bool bSystemMenuIcons = officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::get(); -TriState eMenuIcons = bSystemMenuIcons ? TRISTATE_INDET : static_cast(bMenuIcons); -m_xMenuIconsLB->set_active(eMenuIcons == 2 ? 0 : eMenuIcons + 1); +bool bMenuIcons = officecfg::Office::Common::View::Menu::ShowIconsInMenues::get(); +m_xMenuIconsLB->set_active(bSystemMenuIcons ? 0 : (bMenuIcons ? 2 : 1)); m_xMenuIconsLB->save_value(); TriState eContextMenuShortcuts = static_cast(officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::get());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source cui/uiconfig
cui/source/options/optcolor.cxx | 60 +-- cui/source/options/optcolor.hxx |5 ++ cui/uiconfig/ui/colorconfigwin.ui|1 cui/uiconfig/ui/optappearancepage.ui |4 -- 4 files changed, 44 insertions(+), 26 deletions(-) New commits: commit 0d373003a6a63c3e7e8928ebc0b42eb2d294 Author: Caolán McNamara AuthorDate: Thu Jan 6 14:21:38 2022 + Commit: Adolfo Jayme Barrientos CommitDate: Sun Jan 9 13:39:46 2022 +0100 tdf#146423 don't set a size-request during a size-alloc and use a better width calculation Change-Id: Ib873a8ed9e6424c09630650af352ba5a20c674b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128077 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index ebe066b1073e..8024adbf4201 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -188,7 +188,10 @@ public: return *m_xBox; } -void AdjustExtraWidths(int nTextWidth); +int GetLabelIndent() const +{ +return m_nCheckBoxLabelOffset; +} private: // Chapter -- horizontal group separator stripe with text @@ -207,10 +210,9 @@ private: { public: Entry(weld::Window* pTopLevel, weld::Builder& rBuilder, const char* pTextWidget, const char* pColorWidget, - const Color& rColor, tools::Long nCheckBoxLabelOffset, bool bCheckBox, bool bShow); + const Color& rColor, int nCheckBoxLabelOffset, bool bCheckBox, bool bShow); public: void SetText(const OUString& rLabel) { dynamic_cast(*m_xText).set_label(rLabel); } -void set_width_request(int nTextWidth) { m_xText->set_size_request(nTextWidth, -1); } int get_height_request() const { return std::max(m_xText->get_preferred_size().Height(), @@ -239,6 +241,7 @@ private: private: weld::Window* m_pTopLevel; +int m_nCheckBoxLabelOffset; std::unique_ptr m_xBuilder; std::unique_ptr m_xBox; std::unique_ptr m_xWidget1; @@ -280,7 +283,7 @@ ColorConfigWindow_Impl::Chapter::Chapter(weld::Builder& rBuilder, const char* pL ColorConfigWindow_Impl::Entry::Entry(weld::Window* pTopLevel, weld::Builder& rBuilder, const char* pTextWidget, const char* pColorWidget, const Color& rColor, - tools::Long nCheckBoxLabelOffset, bool bCheckBox, bool bShow) + int nCheckBoxLabelOffset, bool bCheckBox, bool bShow) : m_xColorList(new ColorListBox(rBuilder.weld_menu_button(pColorWidget), [pTopLevel]{ return pTopLevel; })) , m_aDefaultColor(rColor) { @@ -365,8 +368,8 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(weld::Window* pTopLevel, weld::Co : m_pTopLevel(pTopLevel) , m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/colorconfigwin.ui")) , m_xBox(m_xBuilder->weld_box("ColorConfigWindow")) -, m_xWidget1(m_xBuilder->weld_widget("doccolor")) -, m_xWidget2(m_xBuilder->weld_widget("doccolor_lb")) +, m_xWidget1(m_xBuilder->weld_widget("docboundaries")) +, m_xWidget2(m_xBuilder->weld_widget("docboundaries_lb")) { CreateEntries(); } @@ -384,9 +387,8 @@ void ColorConfigWindow_Impl::CreateEntries() // Here we want to get the amount to add to the position of a FixedText to // get it to align its contents with that of a CheckBox -tools::Long nCheckBoxLabelOffset = 0; { -OUString sSampleText("X"); +OUString sSampleText("XX"); std::unique_ptr xCheckBox(m_xBuilder->weld_check_button("docboundaries")); std::unique_ptr xFixedText(m_xBuilder->weld_label("doccolor")); OUString sOrigCheck(xCheckBox->get_label()); @@ -397,7 +399,7 @@ void ColorConfigWindow_Impl::CreateEntries() Size aFixedSize(xFixedText->get_preferred_size()); xCheckBox->set_label(sOrigCheck); xFixedText->set_label(sOrigFixed); -nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width(); +m_nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width(); } // creating entries @@ -407,7 +409,7 @@ void ColorConfigWindow_Impl::CreateEntries() vEntries.push_back(std::make_shared(m_pTopLevel, *m_xBuilder, vEntryInfo[i].pText, vEntryInfo[i].pColor, ColorConfig::GetDefaultColor(static_cast(i)), -nCheckBoxLabelOffset, +m_nCheckBoxLabelOffset, vEntryInfo[i].bCheckBox, aModulesInstalled[vEntryInfo[i].eGroup])); } @@ -441,18 +443,12 @@ void ColorConfigWindow_Impl::CreateEntries() aExtConfig.GetComponentColorConfigValue(sComponentName, i); vEntries.push_back(std::make_shared(m_pTopLevel, *vExtBuilders.back(), "label", "button",
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/tabpages/border.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit ddfd6e7b93b906f16149608bfe86e859a28226bd Author: Kiyotaka Nishibori AuthorDate: Mon Jan 3 06:37:39 2022 +0900 Commit: Caolán McNamara CommitDate: Mon Jan 3 16:21:17 2022 +0100 changed CuiResId into SvxResId. though some translation entries for tooltip for border preset images were in svx.mo, cui/source/tabpages/border.cxx referred the entries to cui.mo with CuiResId route, and the translations was not gotten. this commit is alternative change. Change-Id: Ica7a7ea71f7afe7044104b9d953f1b3edf9c2503 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127771 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 64558279be60..2964a5535c64 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1374,7 +1375,7 @@ void SvxBorderTabPage::FillPresetVS() { m_xWndPresets->InsertItem( nVSIdx ); m_xWndPresets->SetItemImage(nVSIdx, m_aBorderImgVec[GetPresetImageId(nVSIdx) - 1]); -m_xWndPresets->SetItemText( nVSIdx, CuiResId( GetPresetStringId( nVSIdx ) ) ); +m_xWndPresets->SetItemText( nVSIdx, SvxResId( GetPresetStringId( nVSIdx ) ) ); } // show the control
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/tabpages/tpcolor.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 2a137f1c2ae882a0f4a75773ecfb1b5d042c683c Author: Caolán McNamara AuthorDate: Fri Dec 3 14:09:33 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 3 18:02:28 2021 +0100 some translations are searched for in the wrong .mo since... commit c895a6d8298a349784cd0aafff4bf518ac8d0a7d Date: Fri May 15 10:51:10 2020 +0200 Resolves tdf#132799 - Deleting of colors unclear Tooltips added for disabled states those ones are in cui.mo (CuiResId) not svx (SvxResId) Change-Id: I595bd5aadd8ead18291ff818405bec594c8d32db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126319 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 5669f73adc76..9639ed1ac342 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -129,7 +129,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* // disable modify buttons // Color palettes can't be modified m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR1) ); m_xMoreColors->set_from_icon_name("cmd/sc_additionsdialog.png"); m_xMoreColors->connect_clicked(LINK(this, SvxColorTabPage, OnMoreColorsClick)); @@ -375,7 +375,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void) m_xValSetColorList->InsertItem( nId + 1 , aCurrentColor, aName ); m_xValSetColorList->SelectItem( nId + 1 ); m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR2) ); ImpColorCountChanged(); } @@ -436,7 +436,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl, weld::Button&, void) else { m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR2) ); } } @@ -472,7 +472,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, weld::ComboBox&, void) if (nPos != 0) { m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR1) ); } m_xValSetColorList->Resize(); @@ -502,14 +502,14 @@ IMPL_LINK(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, pValSet, void) else { m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR1) ); } } if (pValSet == m_xValSetRecentList.get()) { m_xValSetColorList->SetNoSelection(); m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR2) ); } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/customize/cfg.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 61e84d25af25c9ad3a29e396afc054940892d65b Author: Caolán McNamara AuthorDate: Fri Nov 26 16:59:52 2021 + Commit: Caolán McNamara CommitDate: Sat Nov 27 20:04:28 2021 +0100 set png filter for import dialog in a more robust way Change-Id: Iec25e214b19e5a2ab8a7305aad307c3f03e67401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125913 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125946 diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 526aa4e9c411..29ca8ccb96f6 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -2888,8 +2889,9 @@ IMPL_LINK_NOARG(SvxIconSelectorDialog, ImportHdl, weld::Button&, void) false); } -aImportDialog.SetCurrentFilter( -"PNG - Portable Network Graphic"); +GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter(); +sal_uInt16 nFilter = rFilter.GetImportFormatNumberForShortName(u"png"); +aImportDialog.SetCurrentFilter(rFilter.GetImportFormatName(nFilter)); if ( ERRCODE_NONE == aImportDialog.Execute() ) {