[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/SpellDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1c7e820d444a8721ce9ef785ec0a5f3977424722 Author: Caolán McNamara AuthorDate: Wed Oct 18 16:47:20 2023 +0100 Commit: Xisco Fauli CommitDate: Thu Oct 19 10:27:00 2023 +0200 crashreporting: svx::SentenceEditWindow_Impl::CreateSpellPortions() cui/source/dialogs/SpellDialog.cxx:2005 aRet[ aRet.size() - 1 ].sText += aLeftOverText; presumably aRet is empty() here a) don't bother appending if aLeftOverText is empty() b) don't crah if aRet is empty() and aLeftOverText is not Change-Id: Ie9a9585f572d8afb17183b479fb6f2cce5952aa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158047 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 3c0db58e51a24bf08ca443af62489e761063f456) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158152 diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index b662da41a52c..2da88e9b98ca 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1992,7 +1992,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const aPortion2.sText = aLeftOverText.makeStringAndClear(); aRet.push_back( aPortion2 ); } -else +else if (!aLeftOverText.isEmpty() && !aRet.empty()) { // we just need to append the left-over text to the last portion (which had no errors) aRet[ aRet.size() - 1 ].sText += aLeftOverText; }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/SpellDialog.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 42481b165c2fd9814d482b72ca70f51966649c9c Author: Caolán McNamara AuthorDate: Tue Sep 12 10:23:19 2023 +0100 Commit: Christian Lohmaier CommitDate: Fri Sep 22 19:47:51 2023 +0200 tdf#157148 ensure we auto-scroll to current location to make it visible Change-Id: I03286c10e488adf3a882fa7fe2813724f27c66f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156745 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 5623a25541925b7389ac8203eb35e3d68485b064) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157120 Reviewed-by: Caolán McNamara Reviewed-by: Christian Lohmaier diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index f443aa4f..b662da41a52c 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1696,6 +1696,8 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_Int32 nStart, sal_Int32 nEnd, if (!bCurrentSelectionInRange) { m_xEditView->SetSelection(ESelection(0, nStart)); +// tdf#157148 ensure current location is auto-scrolled to be visible +m_xEditView->ShowCursor(); } Invalidate();
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source cui/uiconfig solenv/sanitizers
cui/source/inc/paragrph.hxx |1 + cui/source/tabpages/paragrph.cxx | 24 +--- cui/uiconfig/ui/paraindentspacing.ui | 22 ++ solenv/sanitizers/ui/cui.suppr |1 + 4 files changed, 37 insertions(+), 11 deletions(-) New commits: commit 82c808f88342430e18ef2b692bde5014d79c246f Author: Caolán McNamara AuthorDate: Mon Apr 24 15:10:32 2023 +0100 Commit: Christian Lohmaier CommitDate: Wed May 17 13:59:06 2023 +0200 Resolves: tdf#154958 add an empty spin button to use for the unused case instead of reusing the percentage one, which will set its min value under gtk Change-Id: I342f8f0588574c45c5752964b95232e419f752ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150944 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index c44374776d79..53bc8ec561c9 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -68,6 +68,7 @@ private: std::unique_ptr m_xLineDist; std::unique_ptr m_xLineDistAtPercentBox; std::unique_ptr m_xLineDistAtMetricBox; +std::unique_ptr m_xLineDistAtPlaceHolderBox; std::unique_ptr m_xLineDistAtLabel; std::unique_ptr m_xAbsDist; diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index ff6426b499aa..f03464c70d73 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -677,6 +677,7 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia , m_xLineDist(m_xBuilder->weld_combo_box("comboLB_LINEDIST")) , m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTPERCENT", FieldUnit::PERCENT)) , m_xLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTMETRIC", FieldUnit::CM)) +, m_xLineDistAtPlaceHolderBox(m_xBuilder->weld_metric_spin_button("spinED_BLANK", FieldUnit::CM)) , m_xLineDistAtLabel(m_xBuilder->weld_label("labelFT_LINEDIST")) , m_xAbsDist(m_xBuilder->weld_label("labelST_LINEDIST_ABS")) , m_xRegisterCB(m_xBuilder->weld_check_button("checkCB_REGISTER")) @@ -688,6 +689,8 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia SetExchangeSupport(); m_xLineDistAtMetricBox->hide(); +m_xLineDistAtPlaceHolderBox->hide(); +m_xLineDistAtPlaceHolderBox->set_text(OUString()); Init_Impl(); m_xFLineIndent->set_min(-, FieldUnit::NONE);// is set to 0 on default @@ -791,10 +794,9 @@ IMPL_LINK(SvxStdParagraphTabPage, LineDistHdl_Impl, weld::ComboBox&, rBox, void) case LLINESPACE_15: case LLINESPACE_2: m_xLineDistAtLabel->set_sensitive(false); -m_xLineDistAtPercentBox->set_sensitive(false); -m_xLineDistAtPercentBox->set_text(OUString()); -m_xLineDistAtMetricBox->set_sensitive(false); -m_xLineDistAtMetricBox->set_text(OUString()); +m_xLineDistAtPercentBox->hide(); +m_xLineDistAtMetricBox->hide(); +m_xLineDistAtPlaceHolderBox->show(); break; case LLINESPACE_DURCH: @@ -802,32 +804,32 @@ IMPL_LINK(SvxStdParagraphTabPage, LineDistHdl_Impl, weld::ComboBox&, rBox, void) // limit MS min(10, aPageSize) m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE); -if (m_xLineDistAtMetricBox->get_text().isEmpty()) +if (m_xLineDistAtPlaceHolderBox->get_visible()) m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(1), FieldUnit::NONE); +m_xLineDistAtPlaceHolderBox->hide(); m_xLineDistAtPercentBox->hide(); m_xLineDistAtMetricBox->show(); -m_xLineDistAtMetricBox->set_sensitive(true); m_xLineDistAtLabel->set_sensitive(true); break; case LLINESPACE_MIN: m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE); -if (m_xLineDistAtMetricBox->get_text().isEmpty()) +if (m_xLineDistAtPlaceHolderBox->get_visible()) m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(10), FieldUnit::TWIP); +m_xLineDistAtPlaceHolderBox->hide(); m_xLineDistAtPercentBox->hide(); m_xLineDistAtMetricBox->show(); -m_xLineDistAtMetricBox->set_sensitive(true); m_xLineDistAtLabel->set_sensitive(true); break; case LLINESPACE_PROP: -if (m_xLineDistAtPercentBox->get_text().isEmpty()) +if (m_xLineDistAtPlaceHolderBox->get_visible()) m_xLineDistAtPercentBox->set_value(m_xLineDistAtPercentBox->normalize(100), FieldUnit::TWIP); +m_xLineDistAtPlaceHolderBox->hide(); m_xLineDistAtMetricBox->hide(); m_xLineDistAtPercentBox->show(); -
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/cuicharmap.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit e80add00e316d46dceddbf7561926330380ff8dd Author: Mike Kaganski AuthorDate: Mon Apr 24 15:21:48 2023 +0300 Commit: Xisco Fauli CommitDate: Tue Apr 25 10:12:39 2023 +0200 tdf#154884: do not stop if the first pair is not what we looked for The same character can be added later with a different font, so keep searching Change-Id: I7b83438ca476ffab23ca08268cf957045d75f6f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150937 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 5a1d07a819bd0f14dd901b35ae245bcd681cb512) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150921 Reviewed-by: Xisco Fauli diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index c6994000e36d..15b48725c93a 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -276,8 +276,8 @@ findInPair(std::u16string_view str1, const std::deque& rContainer1, { assert(rContainer1.size() == rContainer2.size()); -if (auto it1 = std::find(rContainer1.begin(), rContainer1.end(), str1); -it1 != rContainer1.end()) +for (auto it1 = std::find(rContainer1.begin(), rContainer1.end(), str1); + it1 != rContainer1.end(); it1 = std::find(std::next(it1), rContainer1.end(), str1)) { auto it2 = rContainer2.begin() + (it1 - rContainer1.begin()); if (*it2 == str2)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source cui/uiconfig
cui/source/dialogs/FontFeaturesDialog.cxx | 30 -- cui/source/inc/FontFeaturesDialog.hxx |8 +++- cui/uiconfig/ui/fontfragment.ui |1 + 3 files changed, 32 insertions(+), 7 deletions(-) New commits: commit 23d303779440e8201ffc6fbcc08f9cffa5b585c9 Author: Caolán McNamara AuthorDate: Mon Apr 24 12:52:22 2023 +0100 Commit: خالد حسني CommitDate: Tue Apr 25 01:44:55 2023 +0200 Resolves: tdf#153441 use a TriStateEnabled helper Change-Id: I976e4271a072bfb53c676091509e1d4ef7dbcccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150915 Tested-by: Jenkins Reviewed-by: خالد حسني diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx index ab6063c9b6c3..b394495b3ae3 100644 --- a/cui/source/dialogs/FontFeaturesDialog.cxx +++ b/cui/source/dialogs/FontFeaturesDialog.cxx @@ -109,19 +109,21 @@ int FontFeaturesDialog::fillGrid(std::vector const& rFontFea { nIdx = nStylisticSets++; m_xStylisticSetsBox->set_visible(true); -m_aFeatureItems.emplace_back(m_xStylisticSetsGrid.get()); +m_aFeatureItems.emplace_back( +std::make_unique(m_xStylisticSetsGrid.get())); } else if (rFontFeature.isCharacterVariant()) { nIdx = nCharacterVariants++; m_xCharacterVariantsBox->set_visible(true); -m_aFeatureItems.emplace_back(m_xCharacterVariantsGrid.get()); +m_aFeatureItems.emplace_back( + std::make_unique(m_xCharacterVariantsGrid.get())); } else { nIdx = nOtherFeatures++; m_xContentBox->set_visible(true); -m_aFeatureItems.emplace_back(m_xContentGrid.get()); + m_aFeatureItems.emplace_back(std::make_unique(m_xContentGrid.get())); } int32_t nValue = 0; @@ -130,7 +132,7 @@ int FontFeaturesDialog::fillGrid(std::vector const& rFontFea else nValue = aDefinition.getDefault(); -FontFeatureItem& aCurrentItem = m_aFeatureItems.back(); +FontFeatureItem& aCurrentItem = *m_aFeatureItems.back(); aCurrentItem.m_aFeatureCode = nFontFeatureCode; aCurrentItem.m_nDefault = aDefinition.getDefault(); @@ -158,11 +160,19 @@ int FontFeaturesDialog::fillGrid(std::vector const& rFontFea else { if (nValue < 0) +{ aCurrentItem.m_xCheck->set_state(TRISTATE_INDET); +aCurrentItem.m_aTriStateEnabled.bTriStateEnabled = true; +aCurrentItem.m_aTriStateEnabled.eState = TRISTATE_INDET; +} else +{ aCurrentItem.m_xCheck->set_state(nValue > 0 ? TRISTATE_TRUE : TRISTATE_FALSE); +aCurrentItem.m_aTriStateEnabled.bTriStateEnabled = false; +aCurrentItem.m_aTriStateEnabled.eState = aCurrentItem.m_xCheck->get_state(); +} aCurrentItem.m_xCheck->set_label(aDefinition.getDescription()); -aCurrentItem.m_xCheck->connect_toggled(aCheckBoxToggleHandler); +aCurrentItem.m_aToggleHdl = aCheckBoxToggleHandler; aCurrentItem.m_xCheck->show(); } @@ -188,6 +198,13 @@ void FontFeaturesDialog::updateFontPreview() m_aPreviewWindow.SetFont(rPreviewFont, rPreviewFontCJK, rPreviewFontCTL); } +IMPL_LINK(FontFeatureItem, CheckBoxToggledHdl, weld::Toggleable&, rToggle, void) +{ +m_aTriStateEnabled.ButtonToggled(rToggle); +m_aTriStateEnabled.bTriStateEnabled = false; +m_aToggleHdl.Call(rToggle); +} + IMPL_LINK_NOARG(FontFeaturesDialog, CheckBoxToggledHdl, weld::Toggleable&, void) { updateFontPreview(); @@ -204,8 +221,9 @@ OUString FontFeaturesDialog::createFontNameWithFeatures() OUStringBuffer sNameSuffix; bool bFirst = true; -for (const FontFeatureItem& rItem : m_aFeatureItems) +for (const auto& rEntry : m_aFeatureItems) { +const FontFeatureItem& rItem(*rEntry); if (rItem.m_xCheck->get_visible()) { if (rItem.m_xCheck->get_state() != TRISTATE_INDET) diff --git a/cui/source/inc/FontFeaturesDialog.hxx b/cui/source/inc/FontFeaturesDialog.hxx index c4eb43b79e98..93ba0cb9f80d 100644 --- a/cui/source/inc/FontFeaturesDialog.hxx +++ b/cui/source/inc/FontFeaturesDialog.hxx @@ -29,21 +29,27 @@ struct FontFeatureItem , m_xCombo(m_xBuilder->weld_combo_box("combo")) , m_xCheck(m_xBuilder->weld_check_button("check")) { +m_xCheck->connect_toggled(LINK(this, FontFeatureItem, CheckBoxToggledHdl)); } sal_uInt32 m_aFeatureCode; sal_Int32 m_nDefault; +weld::TriStateEnabled m_aTriStateEnabled; +Link m_aToggleHdl; std::unique_ptr m_xBuilder; std::unique_ptr m_xContainer; std::unique_ptr m_xText; std::unique_ptr m_xCombo; std::unique_ptr m_xCheck; +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/hyphen.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7584e403d57097ed4cc2d827d68895ec35cf805f Author: Caolán McNamara AuthorDate: Sat Apr 15 20:25:36 2023 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon Apr 17 06:51:26 2023 +0200 Resolves: tdf#153958 Hyphenation crashes with -Alte... nPos2 is 0 due to the -, so aLeft is empty, nPos is set to 0 then incremented to 1, aLeft.replaceFirst is run after its end pos so crashes/asserts. Presumably we can do nothing meaningful here so skip if nPos2 is 0 Change-Id: I09754c4b2567fe5c1b4c36de0b36ee99f575244d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150327 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index ccd7de8c..259ec5d03395 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -161,7 +161,7 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl() // 2) remove all hyphenation positions from the start that are not considered by the core const std::u16string_view aSearchRange( aTxt.subView( 0, nPos1 ) ); size_t nPos2 = aSearchRange.rfind( '-' ); // the '-' position the core will use by default -if (nPos2 != std::u16string_view::npos ) +if (nPos2 != std::u16string_view::npos && nPos2 != 0) { OUString aLeft( aSearchRange.substr( 0, nPos2 ) ); nPos = 0;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/customize/SvxNotebookbarConfigPage.cxx | 20 ++-- cui/source/inc/SvxNotebookbarConfigPage.hxx |5 + 2 files changed, 19 insertions(+), 6 deletions(-) New commits: commit 6524b8efecaab39486f54d8b95a4e124d1482b08 Author: Jim Raykowski AuthorDate: Thu Mar 23 12:50:49 2023 -0800 Commit: Adolfo Jayme Barrientos CommitDate: Mon Mar 27 09:19:50 2023 + tdf#154296 Fix customize notebook bar regression caused by commit e79741488cc740f49ebd4426c40b45e7139ff663 Change-Id: I04fe66124af831c73834b7f695458e1667198ddb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149470 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit 48b7cf3182cc8fb0b728860f9cbb489390074101) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149600 Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 91ce6352ddca..319cfb9ece5e 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -240,7 +240,7 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId if (xImage.is()) rTreeView.set_image(rIter, xImage, -1); rTreeView.set_text(rIter, aName, 0); -rTreeView.set_id(rIter, sUIItemCommand); +rTreeView.set_id(rIter, sUIItemId); } } @@ -435,6 +435,7 @@ void SvxNotebookbarConfigPage::SelectElement() aEntries = std::move(aTempEntries); + static_cast(m_xContentsListBox.get())->GetTooltipMap().clear(); weld::TreeView& rTreeView = m_xContentsListBox->get_widget(); rTreeView.bulk_insert_for_each( aEntries.size(), [this, , ](weld::TreeIter& rIter, int nIdx) { @@ -451,6 +452,13 @@ void SvxNotebookbarConfigPage::SelectElement() } InsertEntryIntoNotebookbarTabUI(aEntries[nIdx].sClassId, aEntries[nIdx].sDisplayName, aEntries[nIdx].sActionName, rTreeView, rIter); +if (aEntries[nIdx].sClassId != u"GtkSeparatorMenuItem" +&& aEntries[nIdx].sClassId != u"GtkSeparator") +{ + static_cast(m_xContentsListBox.get()) +->GetTooltipMap()[aEntries[nIdx].sDisplayName] += aEntries[nIdx].sActionName; +} }); aEntries.clear(); @@ -543,16 +551,16 @@ IMPL_LINK(SvxNotebookbarEntriesListBox, KeyInputHdl, const KeyEvent&, rKeyEvent, IMPL_LINK(SvxNotebookbarEntriesListBox, QueryTooltip, const weld::TreeIter&, rIter, OUString) { -OUString sCommand = m_xControl->get_id(rIter); -if (sCommand.isEmpty()) +const OUString& rsCommand = m_aTooltipMap[m_xControl->get_id(rIter)]; +if (rsCommand.isEmpty()) return OUString(); OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(m_pPage->GetFrame())); -auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sCommand, aModuleName); -OUString sTooltipLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sCommand, aProperties, +auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(rsCommand, aModuleName); +OUString sTooltipLabel = vcl::CommandInfoProvider::GetTooltipForCommand(rsCommand, aProperties, m_pPage->GetFrame()); return CuiResId(RID_CUISTR_COMMANDLABEL) + ": " + m_xControl->get_text(rIter).replaceFirst("~", "") + "\n" - + CuiResId(RID_CUISTR_COMMANDNAME) + ": " + sCommand + "\n" + + CuiResId(RID_CUISTR_COMMANDNAME) + ": " + rsCommand + "\n" + CuiResId(RID_CUISTR_COMMANDTIP) + ": " + sTooltipLabel.replaceFirst("~", ""); } diff --git a/cui/source/inc/SvxNotebookbarConfigPage.hxx b/cui/source/inc/SvxNotebookbarConfigPage.hxx index 2f239161dfb6..672d2e8299e4 100644 --- a/cui/source/inc/SvxNotebookbarConfigPage.hxx +++ b/cui/source/inc/SvxNotebookbarConfigPage.hxx @@ -74,6 +74,9 @@ public: class SvxNotebookbarEntriesListBox final : public SvxMenuEntriesListBox { +typedef std::unordered_map TooltipMap; +TooltipMap m_aTooltipMap; + void ChangedVisibility(int nRow); DECL_LINK(CheckButtonHdl, const weld::TreeView::iter_col&, void); DECL_LINK(KeyInputHdl, const KeyEvent&, bool); @@ -82,6 +85,8 @@ class SvxNotebookbarEntriesListBox final : public SvxMenuEntriesListBox public: SvxNotebookbarEntriesListBox(std::unique_ptr xControl, SvxConfigPage* pPg); virtual ~SvxNotebookbarEntriesListBox() override; + +TooltipMap& GetTooltipMap() { return m_aTooltipMap; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source framework/source include/vcl offapi/com officecfg/registry vcl/osx vcl/qt5 vcl/unx vcl/win
cui/source/customize/acccfg.cxx|8 framework/source/accelerators/keymapping.cxx |1 + include/vcl/keycodes.hxx |1 + offapi/com/sun/star/awt/Key.idl|2 ++ officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |3 +-- vcl/osx/salframe.cxx |1 + vcl/osx/salmenu.cxx|3 +++ vcl/qt5/QtFrame.cxx|3 +++ vcl/qt5/QtWidget.cxx |3 +++ vcl/unx/generic/app/saldisp.cxx|7 +++ vcl/unx/gtk3/gtkframe.cxx |2 ++ vcl/win/app/salinst.cxx|1 + vcl/win/window/salframe.cxx|3 +++ 13 files changed, 36 insertions(+), 2 deletions(-) New commits: commit a9f718eaf505148f0ffd0994b8aa5e4e0d1dac11 Author: Julien Nabet AuthorDate: Mon Jan 13 20:29:20 2020 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sat Mar 18 18:09:16 2023 + Related tdf#129547 and tdf#154136: add COLON key Change-Id: I17978dbb100fbfa6f6ddbbbdf96872076bc2a289 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86713 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit e056c1ce10779b42ae17866913cf4db06b86a491) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149033 Reviewed-by: Patrick Luby Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 1a37964fb8c8..760dc7a11d66 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -184,6 +184,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1, KEY_MOD1 | KEY_X, KEY_MOD1 | KEY_Y, KEY_MOD1 | KEY_Z, + KEY_MOD1 | KEY_COLON, KEY_MOD1 | KEY_SEMICOLON, KEY_MOD1 | KEY_QUOTELEFT, KEY_MOD1 | KEY_QUOTERIGHT, @@ -268,6 +269,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1, KEY_SHIFT | KEY_MOD1 | KEY_X, KEY_SHIFT | KEY_MOD1 | KEY_Y, KEY_SHIFT | KEY_MOD1 | KEY_Z, + KEY_SHIFT | KEY_MOD1 | KEY_COLON, KEY_SHIFT | KEY_MOD1 | KEY_SEMICOLON, KEY_SHIFT | KEY_MOD1 | KEY_QUOTELEFT, KEY_SHIFT | KEY_MOD1 | KEY_QUOTERIGHT, @@ -348,6 +350,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1, KEY_MOD2 | KEY_X, KEY_MOD2 | KEY_Y, KEY_MOD2 | KEY_Z, + KEY_MOD2 | KEY_COLON, KEY_MOD2 | KEY_SEMICOLON, KEY_MOD2 | KEY_QUOTELEFT, KEY_MOD2 | KEY_QUOTERIGHT, @@ -426,6 +429,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1, KEY_SHIFT | KEY_MOD2 | KEY_X, KEY_SHIFT | KEY_MOD2 | KEY_Y, KEY_SHIFT | KEY_MOD2 | KEY_Z, + KEY_SHIFT | KEY_MOD2 | KEY_COLON, KEY_SHIFT | KEY_MOD2 | KEY_SEMICOLON, KEY_SHIFT | KEY_MOD2 | KEY_QUOTELEFT, KEY_SHIFT | KEY_MOD2 | KEY_QUOTERIGHT, @@ -505,6 +509,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1, KEY_MOD1 | KEY_MOD2 | KEY_X, KEY_MOD1 | KEY_MOD2 | KEY_Y, KEY_MOD1 | KEY_MOD2 | KEY_Z, + KEY_MOD1 | KEY_MOD2 | KEY_COLON, KEY_MOD1 | KEY_MOD2 | KEY_SEMICOLON, KEY_MOD1 | KEY_MOD2 | KEY_QUOTELEFT, KEY_MOD1 | KEY_MOD2 | KEY_QUOTERIGHT, @@ -583,6 +588,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1, KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_X, KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_Y, KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_Z, + KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_COLON, KEY_SHIFT | KEY_MOD1 |
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source cui/uiconfig include/svx svx/source
cui/source/dialogs/cuicharmap.cxx|2 ++ cui/uiconfig/ui/specialcharacters.ui |4 +++- include/svx/searchcharmap.hxx|1 + svx/source/dialog/searchcharmap.cxx | 11 --- 4 files changed, 14 insertions(+), 4 deletions(-) New commits: commit c5460594c21bab12db2d5a6601db84ea9726c416 Author: Caolán McNamara AuthorDate: Fri Mar 10 11:13:17 2023 + Commit: Adolfo Jayme Barrientos CommitDate: Sun Mar 12 18:51:28 2023 + Resolves: tdf#154087 update scrollbar range when search criteria change Change-Id: Iaf5f20c8952b15f3dcccb65277dadb171a705605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148607 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 457b5238ccdd..c6994000e36d 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -885,6 +885,8 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, weld::Entry&, void) if(!sName.isEmpty() && sName.toAsciiLowerCase().indexOf(aKeyword.toAsciiLowerCase()) >= 0) m_xSearchSet->AppendCharToList(sChar); } + +m_xSearchSet->UpdateScrollRange(); } else { diff --git a/cui/uiconfig/ui/specialcharacters.ui b/cui/uiconfig/ui/specialcharacters.ui index b8a7261f20af..a397c2e5762d 100644 --- a/cui/uiconfig/ui/specialcharacters.ui +++ b/cui/uiconfig/ui/specialcharacters.ui @@ -1,5 +1,5 @@ - + @@ -855,6 +855,8 @@ True True True +never +always in diff --git a/include/svx/searchcharmap.hxx b/include/svx/searchcharmap.hxx index 33d7432096d8..1af4ce5fe1a6 100644 --- a/include/svx/searchcharmap.hxx +++ b/include/svx/searchcharmap.hxx @@ -50,6 +50,7 @@ public: virtual voidSelectIndex( int index, bool bFocus = false ) override; voidAppendCharToList(sal_UCS4 cChar); voidClearPreviousData(); +voidUpdateScrollRange(); virtual sal_Int32 getMaxCharCount() const override; diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx index 034ebd317a5a..2d8eeaab8967 100644 --- a/svx/source/dialog/searchcharmap.cxx +++ b/svx/source/dialog/searchcharmap.cxx @@ -307,9 +307,7 @@ void SvxSearchCharSet::RecalculateFont(vcl::RenderContext& rRenderContext) nX = aSize.Width() / COLUMN_COUNT; nY = aSize.Height() / ROW_COUNT; -//scrollbar settings -- error -int nLastRow = (nCount - 1 + COLUMN_COUNT) / COLUMN_COUNT; -mxScrollArea->vadjustment_configure(mxScrollArea->vadjustment_get_value(), 0, nLastRow, 1, ROW_COUNT - 1, ROW_COUNT); +UpdateScrollRange(); // rearrange CharSet element in sync with nX- and nY-multiples Size aDrawSize(nX * COLUMN_COUNT, nY * ROW_COUNT); @@ -319,6 +317,13 @@ void SvxSearchCharSet::RecalculateFont(vcl::RenderContext& rRenderContext) mbRecalculateFont = false; } +void SvxSearchCharSet::UpdateScrollRange() +{ +//scrollbar settings +int nLastRow = (nCount - 1 + COLUMN_COUNT) / COLUMN_COUNT; +mxScrollArea->vadjustment_configure(mxScrollArea->vadjustment_get_value(), 0, nLastRow, 1, ROW_COUNT - 1, ROW_COUNT); +} + void SvxSearchCharSet::SelectIndex(int nNewIndex, bool bFocus) { if (!mxFontCharMap.is())
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/tabpages/autocdlg.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 7eacbe2c6d1b304aadc80159296e542c7bb91cf8 Author: Michael Weghorn AuthorDate: Wed Feb 22 09:53:06 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 2 09:16:46 2023 + tdf#142942 Drop unused checkbox col in sw AutoCorrect opts dialog While the extra checkbox column enabled by weld::TreeView::enable_toggle_buttons(weld::ColumnToggleType::Check) is used for the non-Writer case in the "Options" and "Localized Options" tabs in the AutoCorrect options dialog, they are not used in the case of Writer, where there are two columns of checkboxes handled separately ("[M]: Replace while modifying existing text" and "[T]: AutoCorrect while typing"). Before commit 714b2b617e9baef02510c482c6fd028e6e72acd8 Date: Tue Jun 30 15:03:31 2020 +0100 tdf#134270 rearrange so we know the final treeview width , setting column widths manually by calling `weld::TreeView::set_column_fixed_widths` would disable the extra space for the (unused) checkboxes (by setting `m_bDisableCheckBoxAutoWidth`). Since that commit, it no longer does, causing the separately handled real checkbox in the first visible column to be unnecessarily positioned further to the right in this dialog for Writer for the non-gtk case. Fix this by dropping the use of the unused checkbox column for the Writer case, i.e. the `bShowSWOptions` case in `OfaQuoteTabPage::OfaQuoteTabPage` and in `OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage`. The handling for the non-Writer modules (i.e. `!bShowSWOptions` case in `OfaQuoteTabPage::OfaQuoteTabPage` and `OfaAutocorrOptionsPage`) remains unchanged. Change-Id: If7bd216fc4efda506817cffb55230722bb2ac89b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147454 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit abdb918f146ceb6ea7d310968a96cdeb6f801a8f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147437 Reviewed-by: Caolán McNamara diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 2c978a835922..bc3f3bcc7be7 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -375,7 +375,6 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage(weld::Container* pPage, weld::D { m_xCheckLB->connect_changed(LINK(this, OfaSwAutoFmtOptionsPage, SelectHdl)); m_xCheckLB->connect_row_activated(LINK(this, OfaSwAutoFmtOptionsPage, DoubleClickEditHdl)); -m_xCheckLB->enable_toggle_buttons(weld::ColumnToggleType::Check); std::vector aWidths { @@ -1586,7 +1585,6 @@ OfaQuoteTabPage::OfaQuoteTabPage(weld::Container* pPage, weld::DialogController* if ( bShowSWOptions ) { -m_xSwCheckLB->enable_toggle_buttons(weld::ColumnToggleType::Check); std::vector aWidths { o3tl::narrowing(m_xSwCheckLB->get_pixel_size(m_xSwCheckLB->get_column_title(0)).Width() * 2),
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/FontFeaturesDialog.cxx | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) New commits: commit 4b53ed912331e457722cf51cf3fe034d784de172 Author: خالد حسني AuthorDate: Sun Feb 26 18:14:29 2023 + Commit: Adolfo Jayme Barrientos CommitDate: Mon Feb 27 04:01:09 2023 + Revert "Mark ssXX and cvXX off by default in font features dialog" This reverts commit 3f9a8a3b7656470cfcf04c18a46a7b7bbeca8950. Reason for revert: Needs more work, currently causes all ssXX and cvXX to be added to font string when the dialog is used. Change-Id: I07eff710a2813e60fa4de3c23eb0a3c31d40e41d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147811 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx index f4f53f8c8655..ab6063c9b6c3 100644 --- a/cui/source/dialogs/FontFeaturesDialog.cxx +++ b/cui/source/dialogs/FontFeaturesDialog.cxx @@ -158,15 +158,7 @@ int FontFeaturesDialog::fillGrid(std::vector const& rFontFea else { if (nValue < 0) -{ -// If feature is not set, we don’t know if it is enabled by -// default or not. But we know that stylistic sets and -// character variants are not enabled by default. -if (rFontFeature.isStylisticSet() || rFontFeature.isCharacterVariant()) -aCurrentItem.m_xCheck->set_state(TRISTATE_FALSE); -else -aCurrentItem.m_xCheck->set_state(TRISTATE_INDET); -} +aCurrentItem.m_xCheck->set_state(TRISTATE_INDET); else aCurrentItem.m_xCheck->set_state(nValue > 0 ? TRISTATE_TRUE : TRISTATE_FALSE); aCurrentItem.m_xCheck->set_label(aDefinition.getDescription());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/options/optchart.cxx | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) New commits: commit ba52bd3c43ab786224f4bf24be1a140a7c3bb536 Author: Noel Grandin AuthorDate: Wed Feb 15 11:30:01 2023 +0200 Commit: Xisco Fauli CommitDate: Wed Feb 15 14:30:58 2023 + tdf#153172 Options > Charts > Default Colors no longer persistent regression from commit b95142c11e80c58b70dff68bfd7f3792657b9ee2 Author: Noel Grandin Date: Mon Jun 20 19:17:00 2022 +0200 tdf#58134 Reset Button in Options Dialogs Change-Id: Idef9880e29c322ae2d11641354baf8a241fc7fb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147049 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 9d6c5f13ff031c18d3c117e4de212e2550d24e8c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147061 Reviewed-by: Xisco Fauli diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index 9b1e6c9c92f2..af9b92322802 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -157,16 +157,7 @@ bool SvxDefaultColorOptPage::FillItemSet( SfxItemSet* rOutAttrs ) void SvxDefaultColorOptPage::Reset( const SfxItemSet* ) { -if( m_SvxChartColorTableUniquePtr ) -{ -m_SvxChartColorTableUniquePtr->useDefault(); - -FillBoxChartColorLB(); - -m_xLbChartColors->grab_focus(); -m_xLbChartColors->select( 0 ); -m_xPBRemove->set_sensitive(true); -} +m_xLbChartColors->select( 0 ); } void SvxDefaultColorOptPage::FillPaletteLB()
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source cui/uiconfig include/vcl officecfg/registry vcl/inc vcl/osx vcl/source vcl/unx vcl/win
cui/source/options/optgdlg.cxx | 33 +++- cui/source/options/optgdlg.hxx |2 cui/uiconfig/ui/optviewpage.ui | 106 ++--- include/vcl/settings.hxx |3 officecfg/registry/schema/org/openoffice/Office/Common.xcs | 25 +++ vcl/inc/osx/salframe.h |1 vcl/inc/salframe.hxx |2 vcl/inc/unx/gtk/gtkframe.hxx |1 vcl/inc/win/salframe.h |1 vcl/osx/salframe.cxx | 28 ++- vcl/source/app/settings.cxx| 20 ++ vcl/unx/gtk3/gtkframe.cxx | 48 - vcl/win/gdi/salnativewidgets-luna.cxx | 49 +++--- vcl/win/window/salframe.cxx| 51 +- 14 files changed, 308 insertions(+), 62 deletions(-) New commits: commit f0814dca8f05f524068b8217a9f1eabd8266cdc4 Author: Caolán McNamara AuthorDate: Mon Feb 6 20:53:55 2023 + Commit: Xisco Fauli CommitDate: Wed Feb 15 11:05:14 2023 + tdf#153229 add a switch to override honoring system dark mode Change-Id: Iafb6182e05dc65d20d0809476ee58908f7426d39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146597 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit f7c03364e24da285ea95cea0cc688a7a120fc163) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146745 Reviewed-by: Sophie Gautier Reviewed-by: Xisco Fauli diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index eea8868a646c..3b1f652adbcf 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -528,6 +528,8 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize")) , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize")) , m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize")) +, m_xDarkModeFrame(m_xBuilder->weld_widget("darkmode")) +, m_xAppearanceStyleLB(m_xBuilder->weld_combo_box("appearance")) , m_xIconStyleLB(m_xBuilder->weld_combo_box("iconstyle")) , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont")) , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom")) @@ -548,9 +550,14 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest")) , m_sAutoStr(m_xIconStyleLB->get_text(0)) { -if (Application::GetToolkitName().startsWith("gtk")) +OUString sToolKitName(Application::GetToolkitName()); +if (sToolKitName.startsWith("gtk")) m_xMenuIconBox->hide(); +const bool bHasDarkMode = sToolKitName.startsWith("gtk") || sToolKitName == "osx" || sToolKitName == "win"; +if (!bHasDarkMode) +m_xDarkModeFrame->hide(); + m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, OnAntialiasingToggled ) ); m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled)); @@ -671,6 +678,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) { bool bModified = false; bool bMenuOptModified = false; +bool bDarkModeOptModified = false; bool bRepaintWindows(false); std::shared_ptr xChanges(comphelper::ConfigurationChanges::create()); @@ -784,6 +792,12 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) bAppearanceChanged = true; } +if (m_xAppearanceStyleLB->get_value_changed_from_saved()) +{ +bDarkModeOptModified = true; +bModified = true; +} + if (m_xContextMenuShortcutsLB->get_value_changed_from_saved()) { officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::set( @@ -827,12 +841,20 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) xChanges->commit(); -if( bMenuOptModified ) +if (bMenuOptModified || bDarkModeOptModified) { // Set changed settings to the application instance AllSettings aAllSettings = Application::GetSettings(); -StyleSettings aStyleSettings = aAllSettings.GetStyleSettings(); -aAllSettings.SetStyleSettings(aStyleSettings); + +if (bMenuOptModified) +{ +StyleSettings aStyleSettings = aAllSettings.GetStyleSettings(); +aAllSettings.SetStyleSettings(aStyleSettings); +} + +if (bDarkModeOptModified) +MiscSettings::SetDarkMode(m_xAppearanceStyleLB->get_active()); + Application::MergeSystemSettings( aAllSettings ); Application::SetSettings(aAllSettings); } @@ -918,6 +940,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_xIconStyleLB->set_active(nStyleLB_InitialSelection);
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/options/optgdlg.cxx | 26 -- cui/source/options/optgdlg.hxx |3 +++ 2 files changed, 19 insertions(+), 10 deletions(-) New commits: commit 71a37d733cb81d478af61425859e4c80f0f1e2f0 Author: Caolán McNamara AuthorDate: Fri Feb 10 12:53:33 2023 + Commit: Adolfo Jayme Barrientos CommitDate: Fri Feb 10 22:55:21 2023 + Resolves: tdf#153497 update automatic icon-theme name on dark mode change Change-Id: I6b41d04ad902d5b123a110b52426ea2c2de79e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146774 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 88cee07ee023899ffd482bbe52bf0c02c58890d0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146794 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 4405fdb3e76b..eea8868a646c 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -546,6 +546,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle")) , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons")) , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest")) +, m_sAutoStr(m_xIconStyleLB->get_text(0)) { if (Application::GetToolkitName().startsWith("gtk")) m_xMenuIconBox->hide(); @@ -554,8 +555,18 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled)); +UpdateIconThemes(); + +m_xIconStyleLB->set_active(0); + +m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); +m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); +m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); +} + +void OfaViewTabPage::UpdateIconThemes() +{ // Set known icon themes -OUString sAutoStr( m_xIconStyleLB->get_text( 0 ) ); m_xIconStyleLB->clear(); StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings(); mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes(); @@ -565,9 +576,7 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme(); const vcl::IconThemeInfo& autoIconTheme = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId); -OUString entryForAuto = sAutoStr + " (" + -autoIconTheme.GetDisplayName() + -")"; +OUString entryForAuto = m_sAutoStr + " (" + autoIconTheme.GetDisplayName() + ")"; m_xIconStyleLB->append("auto", entryForAuto); // index 0 means choose style automatically // separate auto and other icon themes @@ -575,12 +584,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p for (auto const& installIconTheme : mInstalledIconThemes) m_xIconStyleLB->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName()); - -m_xIconStyleLB->set_active(0); - -m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png"); -m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick)); -m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick)); } OfaViewTabPage::~OfaViewTabPage() @@ -899,6 +902,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_xNotebookbarIconSizeLB->set_active(nNotebookbarSizeLB_InitialSelection); m_xNotebookbarIconSizeLB->save_value(); +// tdf#153497 set name of automatic icon theme, it may have changed due to "Apply" while this page is visible +UpdateIconThemes(); + if (aMiscOptions.IconThemeWasSetAutomatically()) { nStyleLB_InitialSelection = 0; } diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index a4c686cc2b27..0e0796e0db62 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -113,6 +113,8 @@ private: std::unique_ptr m_xMoreIcons; std::unique_ptr m_xRunGPTests; +OUString m_sAutoStr; + DECL_LINK(OnAntialiasingToggled, weld::Toggleable&, void); DECL_LINK(OnUseSkiaToggled, weld::Toggleable&, void); DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void); @@ -120,6 +122,7 @@ private: void UpdateSkiaStatus(); void HideSkiaWidgets(); void UpdateHardwareAccelStatus(); +void UpdateIconThemes(); public: OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/SpellDialog.cxx |6 +- cui/source/inc/SpellDialog.hxx |2 +- 2 files changed, 6 insertions(+), 2 deletions(-) New commits: commit 3d98527de0f3a39cd5b7b068f5d603e51efa2221 Author: Noel Grandin AuthorDate: Thu Jan 26 10:12:15 2023 +0200 Commit: Michael Stahl CommitDate: Fri Jan 27 10:38:24 2023 + fix online crash in SpellDialog program/libmergedlo.so EditEngine::GetUndoManager() /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173 program/libcuilo.so svx::SpellDialog::InitHdl(void*) cui/source/dialogs/SpellDialog.cxx:2016 program/libmergedlo.so ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) include/rtl/ref.hxx:128 program/libmergedlo.so SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) vcl/headless/svpinst.cxx:317 Change-Id: Icd79faea8b066e0725c5d96f5d9b64445578f3a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146091 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit f6de8eac453b11d5fcfd823ac926521a5e398f9d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146200 Reviewed-by: Michael Stahl diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 4ca5bcfe2d17..f443aa4f 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -161,6 +161,7 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow, : SfxModelessDialogController (_pBindings, pChildWindow, pParent, "cui/ui/spellingdialog.ui", "SpellingDialog") , aDialogUndoLink(LINK (this, SpellDialog, DialogUndoHdl)) +, m_pInitHdlEvent(nullptr) , bFocusLocked(true) , rParent(*pChildWindow) , pImpl( new SpellDialog_Impl ) @@ -219,11 +220,13 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow, //InitHdl wants to use virtual methods, so it //can't be called during the ctor, so init //it on next event cycle post-ctor -Application::PostUserEvent(LINK(this, SpellDialog, InitHdl)); +m_pInitHdlEvent = Application::PostUserEvent(LINK(this, SpellDialog, InitHdl)); } SpellDialog::~SpellDialog() { +if (m_pInitHdlEvent) +Application::RemoveUserEvent(m_pInitHdlEvent); if (pImpl) { // save possibly modified user-dictionaries @@ -387,6 +390,7 @@ void SpellDialog::SpellContinue_Impl(std::unique_ptr* pGua */ IMPL_LINK_NOARG( SpellDialog, InitHdl, void*, void) { +m_pInitHdlEvent = nullptr; m_xDialog->freeze(); //show or hide AutoCorrect depending on the modules abilities m_xAutoCorrPB->set_visible(rParent.HasAutoCorrection()); diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 315e7febdcb1..3c6a7b229ebb 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -130,7 +130,7 @@ private: OUStringm_sTitleSpellingGrammar; Link aDialogUndoLink; - +ImplSVEvent * m_pInitHdlEvent; boolbFocusLocked; svx::SpellDialogChildWindow& rParent;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/tabpages/numfmt.cxx | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) New commits: commit 0d31e4efae148e4c08a841fa52eb2849a093150b Author: Caolán McNamara AuthorDate: Tue Jan 17 12:15:22 2023 + Commit: Xisco Fauli CommitDate: Wed Jan 18 11:38:20 2023 + tdf#152637 format cells example text black on dark background with application colors, scheme: LibreOffice Dark enabled Change-Id: I56ac48ec2e6afd77f20a8581c6d872942618d802 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145589 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index ea52910f9fd1..e6e669de6422 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -111,9 +111,19 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, mnPos = -1; } } -svtools::ColorConfig aColorConfig; -Color aWindowTextColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); -aPrevCol = pColor ? *pColor : aWindowTextColor; +if (pColor) +aPrevCol = *pColor; +else +{ +svtools::ColorConfig aColorConfig; +Color aFgColor = aColorConfig.GetColorValue(svtools::FONTCOLOR, false).nColor; +if (aFgColor == COL_AUTO) +{ +Color aBgColor = aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor; +aFgColor = aBgColor.IsDark() ? COL_WHITE : COL_BLACK; +} +aPrevCol = aFgColor; +} Invalidate(); } @@ -133,8 +143,12 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:: rRenderContext.Push(vcl::PushFlags::ALL); svtools::ColorConfig aColorConfig; - rRenderContext.SetTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); - rRenderContext.SetBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); +Color aBgColor = aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor; +Color aFgColor = aColorConfig.GetColorValue(svtools::FONTCOLOR, false).nColor; +if (aFgColor == COL_AUTO) +aFgColor = aBgColor.IsDark() ? COL_WHITE : COL_BLACK; +rRenderContext.SetBackground(aBgColor); +rRenderContext.SetTextColor(aFgColor); rRenderContext.Erase(); vcl::Font aDrawFont = rRenderContext.GetFont();
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source sw/source
cui/source/options/treeopt.cxx |8 sw/source/uibase/shells/textsh1.cxx |8 2 files changed, 16 insertions(+) New commits: commit 41caa548b4655ab9be5e778cb7835584add8470c Author: Aron Budea AuthorDate: Mon Jan 9 04:10:33 2023 +0100 Commit: Xisco Fauli CommitDate: Thu Jan 12 08:22:35 2023 + Make DeepL translator experimental for now Needs documentation. Change-Id: If77436a37b5ec40f3eb08a32f0315c1696428c12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145184 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 0a2b048482e079e4e83307ad00ba7704a4cc815e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145232 Reviewed-by: Xisco Fauli diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 805ddfc48317..8004c7f15a11 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1418,6 +1418,14 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) nPageId = static_cast(SID_LANGUAGE_OPTIONS_RES[i].second); if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) continue; + +// Disable DeepL translation settings, if experimental mode is not enabled +if( RID_SVXPAGE_DEEPL_OPTIONS == nPageId ) +{ +if( ! officecfg::Office::Common::Misc::ExperimentalMode::get() ) +continue; +} + if ( ( RID_SVXPAGE_JSEARCH_OPTIONS != nPageId || SvtCJKOptions::IsJapaneseFindEnabled() ) && ( RID_SVXPAGE_ASIAN_LAYOUT != nPageId|| SvtCJKOptions::IsAsianTypographyEnabled() ) && ( RID_SVXPAGE_OPTIONS_CTL != nPageId || aCTLLanguageOptions.IsCTLFontEnabled() ) ) diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 3b6f8baa9626..832f6d7820c1 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -105,6 +105,8 @@ #include #include #if !ENABLE_WASM_STRIP_EXTRA +#include +#include #include #include #endif // ENABLE_WASM_STRIP_EXTRA @@ -2065,6 +2067,12 @@ void SwTextShell::GetState( SfxItemSet ) case SID_FM_TRANSLATE: { #if !ENABLE_WASM_STRIP_EXTRA +if (!officecfg::Office::Common::Misc::ExperimentalMode::get() +&& !comphelper::LibreOfficeKit::isActive()) +{ +rSet.Put(SfxVisibilityItem(nWhich, false)); +break; +} const SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get(); if (rDeeplOptions.getAPIUrl().isEmpty() || rDeeplOptions.getAuthKey().isEmpty()) {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source sd/qa sw/qa uitest/impress_tests
cui/source/tabpages/tpbitmap.cxx |8 +--- sd/qa/uitest/impress_tests/tdf152295.py | 55 +++ sw/qa/uitest/writer_tests3/pageDialog.py |8 ++-- uitest/impress_tests/backgrounds.py |4 +- 4 files changed, 63 insertions(+), 12 deletions(-) New commits: commit 64a444eefc2fd1821349222eb07a720e46ea1494 Author: Tibor Nagy AuthorDate: Thu Dec 8 11:37:47 2022 +0100 Commit: Thorsten Behrens CommitDate: Sun Jan 8 11:49:08 2023 + tdf#152295 sw sd UI: don't reset tiled image size by Area tab The background tiling images become larger when opening and closing Area tab: reopening the image properties in the Area tab shows that the Width and Height got reset to the original values of the image. Regression from commit 686349476e03f951f4a9ff9755b9f71951b64ea5 "[GSoC] Move all fill style tabs inside area tab". Change-Id: Ibc4dfd73dedd81b1b7fe17574198dd4999aab967 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143819 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 4a4f58f06f802e7bc057e0a6e7180b595bd4a379) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144794 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index bf3b742a19d2..b515d6bd9a36 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -316,15 +316,9 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) if(rAttrs->GetItemState(XATTR_FILLBMP_SIZELOG) != SfxItemState::DONTCARE) { if (rAttrs->Get( XATTR_FILLBMP_SIZELOG ).GetValue()) -{ m_xTsbScale->set_state(TRISTATE_FALSE); -m_bLogicalSize = true; -} else -{ m_xTsbScale->set_state(TRISTATE_TRUE); -m_bLogicalSize = false; -} } else m_xTsbScale->set_state(TRISTATE_INDET); @@ -337,6 +331,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) nWidth = rBitmapSize.Width(); else if(nWidth < 0) { +m_bLogicalSize = true; eRelative = TRISTATE_TRUE; nWidth = std::abs(nWidth); } @@ -349,6 +344,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) nHeight = rBitmapSize.Height(); else if(nHeight < 0) { +m_bLogicalSize = true; eRelative = TRISTATE_TRUE; nHeight = std::abs(nHeight); } diff --git a/sd/qa/uitest/impress_tests/tdf152295.py b/sd/qa/uitest/impress_tests/tdf152295.py new file mode 100644 index ..e6994d09ee61 --- /dev/null +++ b/sd/qa/uitest/impress_tests/tdf152295.py @@ -0,0 +1,55 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/. +# + +from uitest.framework import UITestCase +from uitest.uihelper.common import get_state_as_dict, select_pos +from uitest.uihelper.common import change_measurement_unit + +class tdf152295(UITestCase): +def test_tdf152295(self): +with self.ui_test.create_doc_in_start_center("impress") as document: +change_measurement_unit(self, "Centimeter") +TemplateDialog = self.xUITest.getTopFocusWindow() +close = TemplateDialog.getChild("close") +self.ui_test.close_dialog_through_button(close) + +with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: +xTabs = DrawPageDialog.getChild("tabcontrol") +select_pos(xTabs, "1") +btnbitmap = DrawPageDialog.getChild("btnbitmap") +btnbitmap.executeAction("CLICK",tuple()) +width = DrawPageDialog.getChild("width") +for _ in range(50): +width.executeAction("UP",tuple()) +height = DrawPageDialog.getChild("height") +for _ in range(50): +height.executeAction("UP",tuple()) + +with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: +xTabs = DrawPageDialog.getChild("tabcontrol") +select_pos(xTabs, "1") +btnbitmap = DrawPageDialog.getChild("btnbitmap") +btnbitmap.executeAction("CLICK",tuple()) + +with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: +xTabs = DrawPageDialog.getChild("tabcontrol") +select_pos(xTabs, "1") +btnbitmap = DrawPageDialog.getChild("btnbitmap") +btnbitmap.executeAction("CLICK",tuple()) +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/QrCodeGenDialog.cxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 7f5a8384824b8570547ac982e07b6fb912af6e93 Author: Brett T. Warden AuthorDate: Fri Dec 30 08:43:25 2022 +0100 Commit: Caolán McNamara CommitDate: Fri Dec 30 22:33:33 2022 + Remove dependency on BitArray.h from zxing-1.2.0 In zxing-1.4.0, numerous headers are no longer public. Rework the ConvertToSVGFormat method so it uses bitmatrix.get instead of bitmatrix.getRow, similar to the ToSVG method in zxing itself. See https://github.com/zxing-cpp/zxing-cpp/issues/361 Change-Id: Ie25eb8f782e8799fbd57c24ef79bba92acf0f9ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144895 Tested-by: René Engelhard Reviewed-by: René Engelhard Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index f8cbac1d758d..817be7f21ede 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -27,7 +27,6 @@ #endif #include -#include #include #include #include @@ -79,7 +78,6 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix) OStringBuffer sb; const int width = bitmatrix.width(); const int height = bitmatrix.height(); -ZXing::BitArray row(width); sb.append("\n" "http://www.w3.org/2000/svg\; version=\"1.1\" viewBox=\"0 0 " + OString::number(width) + " " + OString::number(height) @@ -87,10 +85,9 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix) "
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/tabpages/numfmt.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 48310b25eac39534b429a5a36cd6a303f5307722 Author: Caolán McNamara AuthorDate: Thu Dec 22 10:45:52 2022 + Commit: Caolán McNamara CommitDate: Thu Dec 22 17:52:15 2022 + Related: tdf#152637 Erase after changing background color Change-Id: Ic63714304c32f066347a2654510e1fa1fbd16184 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144721 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index f48a3b60c95e..ea52910f9fd1 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -135,6 +135,7 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:: svtools::ColorConfig aColorConfig; rRenderContext.SetTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); rRenderContext.SetBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); +rRenderContext.Erase(); vcl::Font aDrawFont = rRenderContext.GetFont(); Size aSzWnd(GetOutputSizePixel());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source desktop/source extensions/source include/svx scripting/source sc/source sd/source sfx2/source svx/source sw/source
cui/source/dialogs/SignSignatureLineDialog.cxx|8 + cui/source/dialogs/srchxtra.cxx | 62 - cui/source/dialogs/zoom.cxx |8 - cui/source/tabpages/autocdlg.cxx |3 cui/source/tabpages/border.cxx|3 cui/source/tabpages/chardlg.cxx |7 - cui/source/tabpages/numfmt.cxx|8 - cui/source/tabpages/numpages.cxx | 15 +- cui/source/tabpages/page.cxx |3 cui/source/tabpages/paragrph.cxx |6 desktop/source/lib/init.cxx |8 - extensions/source/bibliography/general.cxx|3 include/svx/ClassificationDialog.hxx |5 sc/source/ui/attrdlg/attrdlg.cxx |2 sc/source/ui/drawfunc/drtxtob.cxx | 13 +- sc/source/ui/styleui/styledlg.cxx |3 sc/source/ui/view/editsh.cxx |5 scripting/source/protocolhandler/scripthandler.cxx|3 sd/source/ui/animations/CustomAnimationDialog.cxx |3 sd/source/ui/app/sdmod2.cxx |5 sd/source/ui/sidebar/SlideBackground.cxx | 54 +--- sd/source/ui/view/drviews2.cxx| 34 +++-- sfx2/source/dialog/securitypage.cxx |8 - svx/source/dialog/ClassificationDialog.cxx|7 - svx/source/form/datanavi.cxx |2 svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 75 ++-- svx/source/sidebar/nbdtmg.cxx |8 - svx/source/tbxctrls/fillctrl.cxx | 27 ++-- svx/source/tbxctrls/linectrl.cxx |8 - sw/source/core/edit/edfcol.cxx| 16 +- sw/source/ui/dialog/docstdlg.cxx |4 sw/source/ui/fldui/fldedt.cxx |4 sw/source/uibase/app/docsh2.cxx | 50 sw/source/uibase/ribbar/workctrl.cxx |8 - sw/source/uibase/shells/annotsh.cxx |5 sw/source/uibase/shells/drwtxtex.cxx |3 sw/source/uibase/sidebar/PageStylesPanel.cxx | 112 ++ sw/source/uibase/sidebar/StylePresetsPanel.cxx| 15 +- sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 20 +-- 39 files changed, 348 insertions(+), 285 deletions(-) New commits: commit 8e807647c266ea0ebf4c10ed61187690cfd65f52 Author: Caolán McNamara AuthorDate: Fri Dec 16 12:11:38 2022 + Commit: Caolán McNamara CommitDate: Sat Dec 17 14:41:39 2022 + check SfxObjectShell::Current() SfxObjectShell::Current() can return null, it's based on the equally vile SfxViewFrame::Current() Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144355 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx index 1f1bd4551080..94306764b201 100644 --- a/cui/source/dialogs/SignSignatureLineDialog.cxx +++ b/cui/source/dialogs/SignSignatureLineDialog.cxx @@ -156,7 +156,7 @@ IMPL_LINK_NOARG(SignSignatureLineDialog, chooseCertificate, weld::Button&, void) { // Document needs to be saved before selecting a certificate SfxObjectShell* pShell = SfxObjectShell::Current(); -if (!pShell->PrepareForSigning(m_xDialog.get())) +if (!pShell || !pShell->PrepareForSigning(m_xDialog.get())) return; Reference xSignCertificate @@ -193,6 +193,12 @@ void SignSignatureLineDialog::Apply() } SfxObjectShell* pShell = SfxObjectShell::Current(); +if (!pShell) +{ +SAL_WARN("cui.dialogs", "No SfxObjectShell!"); +return; +} + Reference xValidGraphic = getSignedGraphic(true); Reference xInvalidGraphic = getSignedGraphic(false); pShell->SignSignatureLine(m_xDialog.get(), m_aSignatureLineId, m_xSelectedCertifate, diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index d857f77c42df..40c2e369ab6b 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -64,9 +64,7 @@ void SvxSearchFormatDialog::PageCreated(const OString& rId, SfxTabPage& rPage) if (rId == "font") { const FontList* pApm_pFontList = nullptr; -SfxObjectShell* pSh = SfxObjectShell::Current(); - -if ( pSh ) +if (SfxObjectShell* pSh = SfxObjectShell::Current()) { const SvxFontListItem* pFLItem = static_cast( pSh->GetItem( SID_ATTR_CHAR_FONTLIST )); @@ -119,42 +117,44 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent, SfxObjectShell* pSh =
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source desktop/source
cui/source/customize/CustomNotebookbarGenerator.cxx | 13 - desktop/source/lib/init.cxx | 12 2 files changed, 16 insertions(+), 9 deletions(-) New commits: commit c53083fed88e979a55f1cf3cdc9de2628738c073 Author: Caolán McNamara AuthorDate: Thu Dec 15 20:15:45 2022 + Commit: Xisco Fauli CommitDate: Fri Dec 16 07:50:17 2022 + misc: check SfxViewFrame::Current() these ones look potentially worth backporting Change-Id: Ie01c0b598c3408f4766318267de8438e997dd1a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144260 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index 9fb71562160a..bae85525ebd6 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -74,11 +74,14 @@ static OUString lcl_getAppName(vcl::EnumContext::Application eApp) static OUString getAppNameRegistryPath() { vcl::EnumContext::Application eApp = vcl::EnumContext::Application::Any; -const Reference& xFrame -= SfxViewFrame::Current()->GetFrame().GetFrameInterface(); -const Reference xModuleManager -= frame::ModuleManager::create(::comphelper::getProcessComponentContext()); -eApp = vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xFrame)); + +if (SfxViewFrame* pViewFrame = SfxViewFrame::Current()) +{ +const Reference& xFrame = pViewFrame->GetFrame().GetFrameInterface(); +const Reference xModuleManager += frame::ModuleManager::create(::comphelper::getProcessComponentContext()); +eApp = vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xFrame)); +} OUString sAppName(lcl_getAppName(eApp)); return "org.openoffice.Office.UI.ToolbarMode/Applications/" + sAppName; diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c777bc7bb731..fd99214e6daa 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -792,6 +792,10 @@ void ExecuteMarginULChange( // Main function which toggles page orientation of the Writer doc. Needed by ToggleOrientation void ExecuteOrientationChange() { +SfxViewFrame* pViewFrm = SfxViewFrame::Current(); +if (!pViewFrm) +return; + std::unique_ptr pPageItem(new SvxPageItem(SID_ATTR_PAGE)); // 1mm in twips rounded @@ -799,22 +803,22 @@ void ExecuteOrientationChange() constexpr tools::Long MINBODY = o3tl::toTwips(1, o3tl::Length::mm); css::uno::Reference< css::document::XUndoManager > mxUndoManager( -getUndoManager( SfxViewFrame::Current()->GetFrame().GetFrameInterface() ) ); +getUndoManager( pViewFrm->GetFrame().GetFrameInterface() ) ); if ( mxUndoManager.is() ) mxUndoManager->enterUndoContext( "" ); const SvxSizeItem* pSizeItem; - SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE, pSizeItem); +pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE, pSizeItem); std::unique_ptr pPageSizeItem(pSizeItem->Clone()); const SvxLongLRSpaceItem* pLRSpaceItem; - SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_LRSPACE, pLRSpaceItem); +pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_LRSPACE, pLRSpaceItem); std::unique_ptr pPageLRMarginItem(pLRSpaceItem->Clone()); const SvxLongULSpaceItem* pULSpaceItem; - SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_ULSPACE, pULSpaceItem); +pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_ULSPACE, pULSpaceItem); std::unique_ptr pPageULMarginItem(pULSpaceItem->Clone()); {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/dialogs/thesdlg.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 2390c63e311497892f56e7e16a213195098c87b4 Author: Caolán McNamara AuthorDate: Mon Dec 12 16:58:46 2022 + Commit: Caolán McNamara CommitDate: Mon Dec 12 20:58:08 2022 + Resolves: tdf#139749 set initial focus to combobox Change-Id: Ib8fd0dd4a4b5d4c137794c4538e61bfbf33b9a1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144015 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 1d98480973ee..ea98a44a3c9e 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -315,6 +315,8 @@ SvxThesaurusDialog::SvxThesaurusDialog( // disable controls if service is missing if (!xThesaurus.is()) m_xDialog->set_sensitive(false); +else +m_xWordCB->grab_focus(); } SvxThesaurusDialog::~SvxThesaurusDialog()
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source cui/uiconfig
cui/source/customize/eventdlg.cxx |1 cui/source/customize/macropg.cxx | 64 +- cui/source/customize/macropg_impl.hxx |1 cui/source/inc/macropg.hxx|2 + cui/uiconfig/ui/eventsconfigpage.ui | 14 +++ cui/uiconfig/ui/macroassignpage.ui| 14 +++ 6 files changed, 87 insertions(+), 9 deletions(-) New commits: commit 3fc3403313b53f4271079839d7fcc65db24a08b2 Author: Caolán McNamara AuthorDate: Thu Dec 8 16:47:32 2022 + Commit: Caolán McNamara CommitDate: Sat Dec 10 11:37:05 2022 + Related: tdf#152266 add a remove all button Change-Id: Ibf6b749089d2d6da71a9ce00779bce8886453856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143833 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit e1de95f72b1e6467510f7c3b32b25d7528c93a75) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143873 diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 7aa67e3f5a81..755fd16b416a 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -44,6 +44,7 @@ SvxEventConfigPage::SvxEventConfigPage(weld::Container* pPage, weld::DialogContr mpImpl->xEventLB = m_xBuilder->weld_tree_view("events"); mpImpl->xAssignPB = m_xBuilder->weld_button("macro"); mpImpl->xDeletePB = m_xBuilder->weld_button("delete"); +mpImpl->xDeleteAllPB = m_xBuilder->weld_button("deleteall"); mpImpl->xAssignComponentPB = m_xBuilder->weld_button("component"); mpImpl->xEventLB->set_size_request(mpImpl->xEventLB->get_approximate_digit_width() * 70, diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 34eb44849d84..3980c8b6c3f7 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -61,21 +61,20 @@ MacroEventListBox::MacroEventListBox(std::unique_ptr xTreeView) // and it is not read only void SvxMacroTabPage_::EnableButtons() { +mpImpl->xDeleteAllPB->set_sensitive(m_nAssignedEvents != 0); int nEvent = mpImpl->xEventLB->get_selected_index(); -if (nEvent != -1) -{ -const EventPair* pEventPair = LookupEvent(mpImpl->xEventLB->get_id(nEvent)); -const bool bAssigned = pEventPair && !pEventPair->second.isEmpty(); -mpImpl->xDeletePB->set_sensitive(!mpImpl->bReadOnly && bAssigned); -mpImpl->xAssignPB->set_sensitive( !mpImpl->bReadOnly ); -if( mpImpl->xAssignComponentPB ) -mpImpl->xAssignComponentPB->set_sensitive( !mpImpl->bReadOnly ); -} +const EventPair* pEventPair = nEvent == -1 ? nullptr : LookupEvent(mpImpl->xEventLB->get_id(nEvent)); +const bool bAssigned = pEventPair && !pEventPair->second.isEmpty(); +mpImpl->xDeletePB->set_sensitive(!mpImpl->bReadOnly && bAssigned); +mpImpl->xAssignPB->set_sensitive(!mpImpl->bReadOnly); +if (mpImpl->xAssignComponentPB) +mpImpl->xAssignComponentPB->set_sensitive( !mpImpl->bReadOnly ); } SvxMacroTabPage_::SvxMacroTabPage_(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet& rAttrSet) : SfxTabPage(pPage, pController, rUIXMLDescription, rID, ) +, m_nAssignedEvents(0) , bDocModified(false) , bAppEvents(false) , bInitialized(false) @@ -308,6 +307,7 @@ void SvxMacroTabPage_::DisplayAppEvents( bool appEvents) mpImpl->xEventLB->freeze(); mpImpl->xEventLB->clear(); +m_nAssignedEvents = 0; EventsHash* eventsHash; Reference< container::XNameReplace> nameReplace; if(bAppEvents) @@ -348,6 +348,9 @@ void SvxMacroTabPage_::DisplayAppEvents( bool appEvents) mpImpl->xEventLB->append(sEventName, displayName); mpImpl->xEventLB->set_image(nRow, GetEventDisplayImage(eventURL), 1); mpImpl->xEventLB->set_text(nRow, OUString(GetEventDisplayText(eventURL)), 2); + +if (!eventURL.isEmpty()) +++m_nAssignedEvents; } mpImpl->xEventLB->thaw(); @@ -427,6 +430,9 @@ void SvxMacroTabPage_::GenericHandler_Impl(const weld::Button* pBtn) sEventURL = pEventPair->second; } +if (!sEventURL.isEmpty()) +--m_nAssignedEvents; + bool bDoubleClick = (pBtn == nullptr); bool bUNOAssigned = sEventURL.startsWith( aVndSunStarUNO ); if (pBtn == mpImpl->xDeletePB.get()) @@ -484,6 +490,9 @@ void SvxMacroTabPage_::GenericHandler_Impl(const weld::Button* pBtn) h_it->second.second = sEventURL; } +if (!sEventURL.isEmpty()) +++m_nAssignedEvents; + rListBox.set_image(nEntry, GetEventDisplayImage(sEventURL), 1); rListBox.set_text(nEntry, OUString(GetEventDisplayText(sEventURL)), 2); @@ -493,6 +502,41 @@ void SvxMacroTabPage_::GenericHandler_Impl(const weld::Button* pBtn) EnableButtons(); } +IMPL_LINK_NOARG(SvxMacroTabPage_, DeleteAllHdl_Impl, weld::Button&, void) +{
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source sfx2/source
cui/source/customize/cfg.cxx | 12 cui/source/inc/cfg.hxx |1 + sfx2/source/appl/appserv.cxx | 13 - 3 files changed, 21 insertions(+), 5 deletions(-) New commits: commit 406597a2dad66cdc53bb4091fc61f59a4ca85a51 Author: Caolán McNamara AuthorDate: Fri Dec 9 21:26:00 2022 + Commit: Caolán McNamara CommitDate: Sat Dec 10 11:36:26 2022 + Related: tdf#152266 open 'event' page by default for SID_CONFIGEVENT Change-Id: I7a3f6def8bda00588ef2846e5d3b5ed5d1da04de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143872 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 236bd7b728e1..52c70410ac8a 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -222,13 +222,17 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe OUString text = static_cast(pItem)->GetValue(); if (text.startsWith( ITEM_TOOLBAR_URL ) ) SetCurPageId("toolbars"); +else if (text.startsWith( ITEM_EVENT_URL) ) +SetCurPageId("events"); } #if HAVE_FEATURE_SCRIPTING -// for the "assign" button in the Basic Macros chooser automatically switch -// to the keyboard tab in which this macro will be pre-selected for assigning -// to a keystroke -if (pInSet->GetItemIfSet(SID_MACROINFO)) +else if (pInSet->GetItemIfSet(SID_MACROINFO)) +{ +// for the "assign" button in the Basic Macros chooser automatically switch +// to the keyboard tab in which this macro will be pre-selected for assigning +// to a keystroke SetCurPageId("keyboard"); +} #endif } diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 87b17b1c912f..7f826c47c747 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -53,6 +53,7 @@ inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName"; inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar"; inline constexpr OUStringLiteral ITEM_TOOLBAR_URL = u"private:resource/toolbar/"; +inline constexpr OUStringLiteral ITEM_EVENT_URL = u"private:resource/event/"; inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_"; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 17e677277e9f..d20d8c54200d 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -403,14 +403,25 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) SfxItemSetFixed aSet( GetPool() ); +// SID_CONFIG property will determine the default page shown if ( pStringItem ) { aSet.Put( SfxStringItem( SID_CONFIG, pStringItem->GetValue() ) ); } +else if (rReq.GetSlot() == SID_CONFIGEVENT) +{ +aSet.Put( SfxStringItem( +SID_CONFIG, "private:resource/event/" ) ); +} +else if (rReq.GetSlot() == SID_TOOLBOXOPTIONS) +{ +aSet.Put( SfxStringItem( +SID_CONFIG, "private:resource/toolbar/" ) ); +} #if HAVE_FEATURE_SCRIPTING -// Preselect a macro: +// Preselect a macro in the 'keyboard' page if (auto const item = rReq.GetArg(SID_MACROINFO)) { aSet.Put(*item); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/tabpages/macroass.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit e75e427d3ffed3b3a29a6c987d24b7796f4d10cb Author: Caolán McNamara AuthorDate: Thu Dec 8 16:53:47 2022 + Commit: Caolán McNamara CommitDate: Sat Dec 10 10:08:14 2022 + update assign/delete state after positioning cursor in treeview Change-Id: I9fe2d9d4a3575e0b67c8421d215f65f46c2ac1f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143832 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit c2c7c378ff8c1e3ba12420aa75189b9b1fe8515b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143731 diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index e80e471ff228..baff7c87b0ae 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -221,7 +221,10 @@ void SfxMacroTabPage::Reset( const SfxItemSet* rSet ) weld::TreeView& rListBox = mpImpl->m_xEventLB->GetListBox(); std::unique_ptr xIter(rListBox.make_iterator()); if (rListBox.get_iter_first(*xIter)) +{ rListBox.set_cursor(*xIter); +EnableButtons(); +} } bool SfxMacroTabPage::IsReadOnly() const
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/customize/macropg.cxx | 45 ++- cui/source/inc/macropg.hxx |6 +++-- 2 files changed, 30 insertions(+), 21 deletions(-) New commits: commit 006f7d03d6f29ae2d4a751bf86f399b4cad38313 Author: Caolán McNamara AuthorDate: Fri Dec 9 10:47:05 2022 + Commit: Caolán McNamara CommitDate: Sat Dec 10 10:06:38 2022 + Related: tdf#152266 give feedback which events are assigned where assigned is means an event is assigned to a non-empty url, now the delete button is only enabled when there is something to delete, bringing the customizie event page into line with the sheet event page and the writer frame event assignment page Change-Id: I7e016bf578dff24b7d47312fd5f7cc63883d1e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143848 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 83eb2796d1f4a6778d40a5e2e94c4b536163fecb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143868 diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index a1fe3dab39dc..34eb44849d84 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -64,7 +64,9 @@ void SvxMacroTabPage_::EnableButtons() int nEvent = mpImpl->xEventLB->get_selected_index(); if (nEvent != -1) { -mpImpl->xDeletePB->set_sensitive( !mpImpl->bReadOnly ); +const EventPair* pEventPair = LookupEvent(mpImpl->xEventLB->get_id(nEvent)); +const bool bAssigned = pEventPair && !pEventPair->second.isEmpty(); +mpImpl->xDeletePB->set_sensitive(!mpImpl->bReadOnly && bAssigned); mpImpl->xAssignPB->set_sensitive( !mpImpl->bReadOnly ); if( mpImpl->xAssignComponentPB ) mpImpl->xAssignComponentPB->set_sensitive( !mpImpl->bReadOnly ); @@ -384,6 +386,24 @@ IMPL_LINK_NOARG( SvxMacroTabPage_, DoubleClickHdl_Impl, weld::TreeView&, bool) return true; } +const EventPair* SvxMacroTabPage_::LookupEvent(const OUString& rEventName) +{ +const EventPair* pRet = nullptr; +if (bAppEvents) +{ +EventsHash::iterator h_it = m_appEventsHash.find(rEventName); +if (h_it != m_appEventsHash.end() ) +pRet = _it->second; +} +else +{ +EventsHash::iterator h_it = m_docEventsHash.find(rEventName); +if (h_it != m_docEventsHash.end() ) +pRet = _it->second; +} +return pRet; +} + // handler for double click on the listbox, and for the assign/delete buttons void SvxMacroTabPage_::GenericHandler_Impl(const weld::Button* pBtn) { @@ -401,23 +421,10 @@ void SvxMacroTabPage_::GenericHandler_Impl(const weld::Button* pBtn) OUString sEventURL; OUString sEventType; -if (bAppEvents) +if (const EventPair* pEventPair = LookupEvent(sEventName)) { -EventsHash::iterator h_it = m_appEventsHash.find(sEventName); -if (h_it != m_appEventsHash.end() ) -{ -sEventType = h_it->second.first; -sEventURL = h_it->second.second; -} -} -else -{ -EventsHash::iterator h_it = m_docEventsHash.find(sEventName); -if (h_it != m_docEventsHash.end() ) -{ -sEventType = h_it->second.first; -sEventURL = h_it->second.second; -} +sEventType = pEventPair->first; +sEventURL = pEventPair->second; } bool bDoubleClick = (pBtn == nullptr); @@ -548,7 +555,7 @@ void SvxMacroTabPage_::InitAndSetHandler( const Reference< container::XNameRepla // returns the two props EventType & Script for a given event name Any SvxMacroTabPage_::GetPropsByName( const OUString& eventName, EventsHash& eventsHash ) { -const std::pair< OUString, OUString >& rAssignedEvent( eventsHash[ eventName ] ); +const EventPair& rAssignedEvent(eventsHash[eventName]); Any aReturn; ::comphelper::NamedValueCollection aProps; @@ -564,7 +571,7 @@ Any SvxMacroTabPage_::GetPropsByName( const OUString& eventName, EventsHash& eve // converts the Any returned by GetByName into a pair which can be stored in // the EventHash -std::pair< OUString, OUString > SvxMacroTabPage_::GetPairFromAny( const Any& aAny ) +EventPair SvxMacroTabPage_::GetPairFromAny( const Any& aAny ) { Sequence< beans::PropertyValue > props; OUString type, url; diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx index ef9e16c51bba..7c934e33799d 100644 --- a/cui/source/inc/macropg.hxx +++ b/cui/source/inc/macropg.hxx @@ -30,7 +30,8 @@ #include #include -typedef std::unordered_map< OUString, std::pair< OUString, OUString > > EventsHash; +typedef std::pair EventPair; +typedef std::unordered_map EventsHash; struct EventDisplayName { @@ -56,6 +57,7 @@ class SvxMacroTabPage_ : public SfxTabPage DECL_LINK( DoubleClickHdl_Impl, weld::TreeView&, bool ); void GenericHandler_Impl(const weld::Button* pBtn); +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source
cui/source/customize/cfg.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit e6d6901dcce10d226599206c26f4fda82f640af2 Author: Caolán McNamara AuthorDate: Fri Dec 9 20:56:06 2022 + Commit: Caolán McNamara CommitDate: Sat Dec 10 10:05:39 2022 + switch to the 'keyboard' tab if a SID_MACROINFO is set Change-Id: Ie615ab2598309b0324daa11732e5345d1a927437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143870 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 030307879738..236bd7b728e1 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -91,6 +92,7 @@ #include #include #include +#include namespace uno = com::sun::star::uno; namespace frame = com::sun::star::frame; @@ -215,17 +217,19 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe AddTabPage("keyboard", CreateKeyboardConfigPage, nullptr); AddTabPage("events", CreateSvxEventConfigPage, nullptr); -const SfxPoolItem* pItem = pInSet->GetItem( SID_CONFIG ); - -if ( pItem ) +if (const SfxPoolItem* pItem = pInSet->GetItem(SID_CONFIG)) { OUString text = static_cast(pItem)->GetValue(); - if (text.startsWith( ITEM_TOOLBAR_URL ) ) -{ SetCurPageId("toolbars"); -} } +#if HAVE_FEATURE_SCRIPTING +// for the "assign" button in the Basic Macros chooser automatically switch +// to the keyboard tab in which this macro will be pre-selected for assigning +// to a keystroke +if (pInSet->GetItemIfSet(SID_MACROINFO)) +SetCurPageId("keyboard"); +#endif } void SvxConfigDialog::ActivatePage(const OString& rPage)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - cui/source cui/uiconfig
cui/source/dialogs/QrCodeGenDialog.cxx |6 +- cui/uiconfig/ui/qrcodegen.ui |4 2 files changed, 1 insertion(+), 9 deletions(-) New commits: commit 2344f5ac296a6a29d031c6fadc67fad0523ac0e7 Author: Caolán McNamara AuthorDate: Fri Dec 9 12:45:11 2022 + Commit: Caolán McNamara CommitDate: Fri Dec 9 20:35:57 2022 + Related: tdf#146395 drop default text Change-Id: Iaeedf11df5f1d5739ec247222cc4fc1f10abe1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143861 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index e028d4d10e94..f8cbac1d758d 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -171,18 +171,14 @@ QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference xModel m_xEdittext->get_height_rows(6)); if (!bEditExisting) { -OUString sSelection; // TODO: This only works in Writer doc. Should also work in shapes Reference xSelections(m_xModel->getCurrentSelection(), UNO_QUERY); if (xSelections.is()) { Reference xSelection(xSelections->getByIndex(0), UNO_QUERY); if (xSelection.is()) -sSelection = xSelection->getString(); +m_xEdittext->set_text(xSelection->getString()); } -if (!sSelection.isEmpty()) -m_xEdittext->set_text(sSelection); -m_xEdittext->select_region(0, -1); return; } diff --git a/cui/uiconfig/ui/qrcodegen.ui b/cui/uiconfig/ui/qrcodegen.ui index 7078e3aa44a5..2a55eaa01901 100644 --- a/cui/uiconfig/ui/qrcodegen.ui +++ b/cui/uiconfig/ui/qrcodegen.ui @@ -8,9 +8,6 @@ 1 10 - -www.libreoffice.org - False 6 @@ -347,7 +344,6 @@ True True True -textbuffer1 The text from which to generate the code.