[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/options/optaboutconfig.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 19630bc71b3753cb52b7ea477c312a8bde81f61f Author: Caolán McNamara AuthorDate: Mon Jan 18 12:01:43 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Tue Jan 19 13:27:20 2021 +0100 tdf#139332 reduce height of expert config dialog to about the height of help, options Change-Id: Icf2bebb2f2cc5aabea3e1f702d7095de8c31d726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109528 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 7f5e73a80b0e..1d9eb9925c21 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -141,7 +141,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* pParent) , m_bSorted(false) { m_xPrefBox->set_size_request(m_xPrefBox->get_approximate_digit_width() * 100, - m_xPrefBox->get_height_rows(28)); + m_xPrefBox->get_height_rows(23)); m_xPrefBox->connect_column_clicked(LINK(this, CuiAboutConfigTabPage, HeaderBarClick)); m_xEditBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, StandardHdl_Impl)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source svx/source
cui/source/tabpages/paragrph.cxx|6 ++ svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx |2 +- 2 files changed, 3 insertions(+), 5 deletions(-) New commits: commit cd4b646040b56c1b75dd9913c6d1f5b2751f155f Author: Jim Raykowski AuthorDate: Mon Jan 11 13:34:05 2021 -0900 Commit: Caolán McNamara CommitDate: Tue Jan 12 11:59:45 2021 +0100 tdf#83618 Make line spacing values agree crash fix The intent of this patch is to fix the crash reported at https:// bugzilla.redhat.com/show_bug.cgi?id=1913828 by reverting changes made to cui/source/tabpages/paragraph.cxx in commit 849b837d1a3b185a8dd893a8f6eaed53605bcab1 and changing the change made to svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx to use the already available pointer to the current SfxViewFrame instead of calling the SfxViewFrame::Current function again. Change-Id: I0c440c576c2afe4fb98ed54d51d91ea16a7f902a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109114 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 5f6ae38d3ad9..a39fc84c6d83 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -51,8 +51,6 @@ #include #include -#include - const sal_uInt16 SvxStdParagraphTabPage::pStdRanges[] = { SID_ATTR_PARA_LINESPACE,// 10033 @@ -232,7 +230,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) m_xLineDistAtMetricBox->get_value_changed_from_saved() ) ) { nWhich = GetWhich( SID_ATTR_PARA_LINESPACE ); -MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( nWhich ); +MapUnit eUnit = pPool->GetMetric( nWhich ); SvxLineSpacingItem aSpacing( static_cast(GetItemSet().Get( nWhich )) ); @@ -724,7 +722,7 @@ void SvxStdParagraphTabPage::SetLineSpacing_Impl const SvxLineSpacingItem ) { -MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( rAttr.Which() ); +MapUnit eUnit = GetItemSet().GetPool()->GetMetric( rAttr.Which() ); switch( rAttr.GetLineSpaceRule() ) { diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 4e52822f71c4..1f6618b360cf 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -115,7 +115,7 @@ void ParaLineSpacingControl::Initialize() if( eState >= SfxItemState::DEFAULT ) { -MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( currSPItem->Which() ); +MapUnit eUnit = pCurrent->GetPool().GetMetric(currSPItem->Which()); meLNSpaceUnit = eUnit; switch( currSPItem->GetLineSpaceRule() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source include/svtools svtools/source svx/source
cui/source/tabpages/numpages.cxx |6 +++--- include/svtools/valueset.hxx |2 +- svtools/source/control/valueset.cxx | 20 +--- svx/source/tbxctrls/bulletsnumbering.cxx |2 +- 4 files changed, 18 insertions(+), 12 deletions(-) New commits: commit 5d5f10b3fa7c59c25f1b85d909db6909548ee111 Author: Caolán McNamara AuthorDate: Mon Nov 23 16:40:23 2020 + Commit: Christian Lohmaier CommitDate: Wed Nov 25 14:14:56 2020 +0100 tdf#138430 toolbar bullet dropdown should have a scrolledwindow as should the matching dialog pages Change-Id: Ib327d3c02d1bc5ae11a6a76d52c9e17803f05534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106436 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index c271ebaaa858..b921e6cde953 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -163,7 +163,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(weld::Container* pPage, weld::D , bModified(false) , bPreset(false) , nNumItemId(SID_ATTR_NUMBERING_RULE) -, m_xExamplesVS(new SvxNumValueSet(nullptr)) +, m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin"))) , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) { SetExchangeSupport(); @@ -342,7 +342,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* pPage, weld::DialogC , bModified(false) , bPreset(false) , nNumItemId(SID_ATTR_NUMBERING_RULE) -, m_xExamplesVS(new SvxNumValueSet(nullptr)) +, m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin"))) , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) { SetExchangeSupport(); @@ -491,7 +491,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(weld::Container* pPage, weld::DialogControl , nNumItemId(SID_ATTR_NUMBERING_RULE) , bModified(false) , bPreset(false) -, m_xExamplesVS(new SvxNumValueSet(nullptr)) +, m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin"))) , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) { SetExchangeSupport(); diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index b27885d9b72b..d5c991d86a02 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -256,7 +256,7 @@ private: SVT_DLLPRIVATE void QueueReformat(); SVT_DLLPRIVATE void SetFirstLine(sal_uInt16 nNewFirstLine); // set mnFirstLine and update scrollbar to match SVT_DLLPRIVATE void RecalcScrollBar(); -SVT_DLLPRIVATE void TurnOffScrollBar(); +SVT_DLLPRIVATE bool TurnOffScrollBar(); SVT_DLLPRIVATE void TurnOnScrollBar(); DECL_DLLPRIVATE_LINK(ImplScrollHdl, weld::ScrolledWindow&, void); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 4070630fe44a..8e679562ad48 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -539,14 +539,15 @@ void ValueSet::RemoveItem( sal_uInt16 nItemId ) QueueReformat(); } -void ValueSet::TurnOffScrollBar() +bool ValueSet::TurnOffScrollBar() { if (mxScrolledWindow->get_vpolicy() == VclPolicyType::NEVER) -return; +return false; mxScrolledWindow->set_vpolicy(VclPolicyType::NEVER); weld::DrawingArea* pDrawingArea = GetDrawingArea(); Size aPrefSize(pDrawingArea->get_preferred_size()); pDrawingArea->set_size_request(aPrefSize.Width() + GetScrollWidth(), aPrefSize.Height()); +return true; } void ValueSet::TurnOnScrollBar() @@ -561,11 +562,16 @@ void ValueSet::TurnOnScrollBar() void ValueSet::RecalcScrollBar() { -// reset scrolled window state to initial value -// so it will get configured to the right adjustment -WinBits nStyle = GetStyle(); -if (mxScrolledWindow && (nStyle & WB_VSCROLL)) -TurnOffScrollBar(); +if (!mxScrolledWindow) +return; +const bool bScrollAllowed = GetStyle() & WB_VSCROLL; +if (!bScrollAllowed) +return; +// reset scrolled window state to initial value so it will get configured +// to the right adjustment on the next format which we toggle on to happen +// if the scrolledwindow wasn't in its initial state already +if (TurnOffScrollBar()) +mbFormat = true; } void ValueSet::Clear() diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index 430ca197457d..d30a6aabcfd0 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -68,7 +68,7 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& rController, : WeldToolbarPopup(rController.getFrameInterface(), pParent,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/customize/acccfg.cxx | 20 1 file changed, 12 insertions(+), 8 deletions(-) New commits: commit ea6d3f24e2fd8e5017aad7deffc85012a4c5222b Author: Caolán McNamara AuthorDate: Mon Nov 16 14:47:49 2020 + Commit: Xisco Fauli CommitDate: Tue Nov 17 17:09:44 2020 +0100 tdf#137403 ignore GetCurCommand if its empty Change-Id: I63cc33c33d36d53d882aae72b8f480ea9842e1b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105863 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 7e0a4820fc2e..2ae4f950120e 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1206,7 +1206,7 @@ IMPL_LINK(SfxAcceleratorConfigPage, SelectHdl, weld::TreeView&, rListBox, void) m_xRemoveButton->set_sensitive(false); m_xChangeButton->set_sensitive(false); -// #i36994 First selected can return zero! +// #i36994 First selected can return null! TAccInfo* pEntry = reinterpret_cast(m_xEntriesBox->get_selected_id().toInt64()); if (pEntry) { @@ -1216,19 +1216,23 @@ IMPL_LINK(SfxAcceleratorConfigPage, SelectHdl, weld::TreeView&, rListBox, void) { if (pEntry->isConfigured()) m_xRemoveButton->set_sensitive(true); -m_xChangeButton->set_sensitive(pEntry->m_sCommand != sPossibleNewCommand); +m_xChangeButton->set_sensitive(pEntry->m_sCommand != sPossibleNewCommand + && !sPossibleNewCommand.isEmpty()); } // update key box m_xKeyBox->clear(); -for (int i = 0, nCount = m_xEntriesBox->n_children(); i < nCount; ++i) +if (!sPossibleNewCommand.isEmpty()) { -TAccInfo* pUserData -= reinterpret_cast(m_xEntriesBox->get_id(i).toInt64()); -if (pUserData && pUserData->m_sCommand == sPossibleNewCommand) +for (int i = 0, nCount = m_xEntriesBox->n_children(); i < nCount; ++i) { - m_xKeyBox->append(OUString::number(reinterpret_cast(pUserData)), - pUserData->m_aKey.GetName()); +TAccInfo* pUserData += reinterpret_cast(m_xEntriesBox->get_id(i).toInt64()); +if (pUserData && pUserData->m_sCommand == sPossibleNewCommand) +{ + m_xKeyBox->append(OUString::number(reinterpret_cast(pUserData)), + pUserData->m_aKey.GetName()); +} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/tabpages/border.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit b89e61976dbf4d990f8cc74d90d6e73aba98a629 Author: Caolán McNamara AuthorDate: Thu Nov 12 11:56:31 2020 + Commit: Miklos Vajna CommitDate: Tue Nov 17 11:39:35 2020 +0100 tdf#138156 diagonal borders always set even if in don't care mode Change-Id: If55ac230c2f591e79a6c90df07870233a46eca5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105542 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 8dc87e8409bd..ed6c1add91c8 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -844,7 +844,8 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) SfxItemPool* pPool = rCoreAttrs->GetPool(); -if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR)) +if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR) && +m_aFrameSel.GetFrameBorderState(svx::FrameBorderType::TLBR) != svx::FrameBorderState::DontCare) { SvxLineItem aLineItem(*static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_BORDER_DIAG_TLBR))); aLineItem.SetLine(m_aFrameSel.GetFrameBorderStyle(svx::FrameBorderType::TLBR)); @@ -852,7 +853,8 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) bAttrsChanged = true; } -if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::BLTR)) +if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::BLTR) && +m_aFrameSel.GetFrameBorderState(svx::FrameBorderType::BLTR) != svx::FrameBorderState::DontCare) { SvxLineItem aLineItem(*static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_BORDER_DIAG_BLTR))); aLineItem.SetLine(m_aFrameSel.GetFrameBorderStyle(svx::FrameBorderType::BLTR)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source cui/uiconfig
cui/source/options/optgdlg.cxx | 40 cui/source/options/optgdlg.hxx |2 -- cui/uiconfig/ui/optviewpage.ui | 23 +++ 3 files changed, 3 insertions(+), 62 deletions(-) New commits: commit b4e5a0e06d50853f057c1a192f4ee6bd5ee90fe0 Author: Luboš Luňák AuthorDate: Fri Oct 16 12:22:38 2020 +0200 Commit: Caolán McNamara CommitDate: Mon Oct 26 22:11:35 2020 +0100 remove ui for 'forceskia' AKA 'ignore skia denylist' (tdf#137159) I originally copy this from the OpenGL code, but now that I think of it, having an easy checkbox to make LO use drivers that LO decides are faulty is a bad idea. There's still the expert configuration if somebody insists (and if they're not expert enough to find the expert setting then they better not mess with it), but this is asking for unnecessary trouble. This also solves the problem that the UI option is misleading. As the description in Common.xcs says, "This one forces the use of Skia even if the denylist would block the driver.", so the option is independent of the 'enable skia' option, but the UI didn't make it appear so. Change-Id: I74bf3574f16899405272dbb3aec54580a5e3f0bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104425 Tested-by: Jenkins Reviewed-by: Luboš Luňák (cherry picked from commit fea1d3a487faef85b2b7aa8a87075f81ea22af76) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104506 Reviewed-by: Caolán McNamara diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index b9122d3d00e2..1972354ccd3f 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -108,7 +108,6 @@ class SkiaCfg { private: bool mbUseSkia; -bool mbForceSkia; bool mbForceSkiaRaster; bool mbModified; @@ -117,11 +116,9 @@ public: ~SkiaCfg(); bool useSkia() const; -bool forceSkia() const; bool forceSkiaRaster() const; void setUseSkia(bool bSkia); -void setForceSkia(bool bSkia); void setForceSkiaRaster(bool bSkia); void reset(); @@ -136,7 +133,6 @@ SkiaCfg::SkiaCfg(): void SkiaCfg::reset() { mbUseSkia = officecfg::Office::Common::VCL::UseSkia::get(); -mbForceSkia = officecfg::Office::Common::VCL::ForceSkia::get(); mbForceSkiaRaster = officecfg::Office::Common::VCL::ForceSkiaRaster::get(); mbModified = false; } @@ -151,8 +147,6 @@ SkiaCfg::~SkiaCfg() std::shared_ptr batch(comphelper::ConfigurationChanges::create()); if (!officecfg::Office::Common::VCL::UseSkia::isReadOnly()) officecfg::Office::Common::VCL::UseSkia::set(mbUseSkia, batch); -if (!officecfg::Office::Common::VCL::ForceSkia::isReadOnly()) -officecfg::Office::Common::VCL::ForceSkia::set(mbForceSkia, batch); if (!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly()) officecfg::Office::Common::VCL::ForceSkiaRaster::set(mbForceSkiaRaster, batch); batch->commit(); @@ -167,11 +161,6 @@ bool SkiaCfg::useSkia() const return mbUseSkia; } -bool SkiaCfg::forceSkia() const -{ -return mbForceSkia; -} - bool SkiaCfg::forceSkiaRaster() const { return mbForceSkiaRaster; @@ -186,15 +175,6 @@ void SkiaCfg::setUseSkia(bool bSkia) } } -void SkiaCfg::setForceSkia(bool bSkia) -{ -if (mbForceSkia != bSkia) -{ -mbForceSkia = bSkia; -mbModified = true; -} -} - void SkiaCfg::setForceSkiaRaster(bool bSkia) { if (mbForceSkiaRaster != bSkia) @@ -696,7 +676,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel")) , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa")) , m_xUseSkia(m_xBuilder->weld_check_button("useskia")) -, m_xForceSkia(m_xBuilder->weld_check_button("forceskia")) , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster")) , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled")) , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled")) @@ -706,7 +685,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p if (Application::GetToolkitName() == "gtk3") { m_xUseSkia->hide(); -m_xForceSkia->hide(); m_xForceSkiaRaster->hide(); m_xSkiaStatusEnabled->hide(); m_xSkiaStatusDisabled->hide(); @@ -718,7 +696,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p // For now Skia is used mainly on Windows, hide the controls everywhere else. // It can also be used on Linux, but only with the rarely used 'gen' backend. m_xUseSkia->hide(); -m_xForceSkia->hide(); m_xForceSkiaRaster->hide(); m_xSkiaStatusEnabled->hide(); m_xSkiaStatusDisabled->hide(); @@ -726,7 +703,6 @@
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source vcl/source
cui/source/options/optaboutconfig.cxx |2 ++ vcl/source/app/salvtables.cxx |7 --- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 23614f72bb14bad45bce1966242e0763825260c4 Author: Caolán McNamara AuthorDate: Thu Oct 15 16:51:21 2020 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sun Oct 18 00:08:26 2020 +0200 tdf#137432 only do EnableInvalidate(false) optimization when not shown Change-Id: If7f35d19061a7a2db2e5df31227834526bbf0905 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104334 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 79a75bda69d3..7f5e73a80b0e 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -792,6 +792,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, SearchHdl_Impl, weld::Button&, void) { weld::WaitObject aWait(m_xDialog.get()); +m_xPrefBox->hide(); m_xPrefBox->clear(); m_xPrefBox->freeze(); @@ -845,6 +846,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, SearchHdl_Impl, weld::Button&, void) m_xPrefBox->expand_row(rEntry); return false; }); +m_xPrefBox->show(); } void CuiAboutConfigTabPage::InsertEntry(const prefBoxEntry& rEntry) diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 3108ff5a9440..acd296cf3223 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3195,7 +3195,8 @@ namespace UpdateGuard(SvTabListBox& rTreeView) : m_rTreeView(rTreeView) , m_bOrigUpdate(m_rTreeView.IsUpdateMode()) -, m_bOrigEnableInvalidate(m_rTreeView.GetModel()->IsEnableInvalidate()) +// tdf#137432 only do the EnableInvalidate(false) optimization if the widget is currently hidden +, m_bOrigEnableInvalidate(!m_rTreeView.IsVisible() && m_rTreeView.GetModel()->IsEnableInvalidate()) { if (m_bOrigUpdate) m_rTreeView.SetUpdateMode(false); @@ -3205,10 +3206,10 @@ namespace ~UpdateGuard() { -if (m_bOrigUpdate) -m_rTreeView.SetUpdateMode(true); if (m_bOrigEnableInvalidate) m_rTreeView.GetModel()->EnableInvalidate(true); +if (m_bOrigUpdate) +m_rTreeView.SetUpdateMode(true); } }; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/dialogs/cuicharmap.cxx | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) New commits: commit 252cf479c483022505efc2641b64fa7cfde385b1 Author: Caolán McNamara AuthorDate: Wed Oct 14 16:42:26 2020 +0100 Commit: Michael Stahl CommitDate: Fri Oct 16 11:04:26 2020 +0200 tdf#137294 don't change subset sensitivity after setting search mode Change-Id: Iaa76e2bc8029ac8f8a52b0c45f74b57395090088 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104307 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 13d3c8e7658b..bcc1dd16a454 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -643,11 +643,6 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBox&, void) m_xShowSet->SetFont( aFont ); m_xSearchSet->SetFont( aFont ); m_aShowChar.SetFont( aFont ); -if (isSearchMode) -{ -SearchUpdateHdl(*m_xSearchText); -SearchCharHighlightHdl(m_xSearchSet.get()); -} // setup unicode subset listbar with font specific subsets, // hide unicode subset listbar for symbol fonts @@ -675,6 +670,14 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBox&, void) m_xSubsetText->set_sensitive(bNeedSubset); m_xSubsetLB->set_sensitive(bNeedSubset); +if (isSearchMode) +{ +// tdf#137294 do this after modifying m_xSubsetLB sensitivity to +// restore insensitive for the search case +SearchUpdateHdl(*m_xSearchText); +SearchCharHighlightHdl(m_xSearchSet.get()); +} + // tdf#118304 reselect current glyph to see if its still there in new font selectCharByCode(Radix::hexadecimal); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/inc/numfmt.hxx |5 +++-- cui/source/tabpages/numfmt.cxx | 35 +++ 2 files changed, 34 insertions(+), 6 deletions(-) New commits: commit 893bdbe8ff9fcf96ca212f72d080bad141a5d99e Author: Eike Rathke AuthorDate: Sun Oct 4 00:57:08 2020 +0200 Commit: Caolán McNamara CommitDate: Sun Oct 4 15:17:30 2020 +0200 Fix format comment handling in number format dialog Clicking any format in the Format list could had applied the default 'User-defined' comment to that format. Also an edited comment for an already existing format when clicking on another format applied the new comment to that other format. Sometimes 'User-defined' was displayed instead of a real comment. Change-Id: I452d41f2860affed2475737e3bc925db687d96c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103907 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit cf40efa7518fb78c6ec12a6fa2c0fef284fa2a87) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103801 Reviewed-by: Caolán McNamara diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 54796c63b736..1be328d9414e 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -77,12 +77,13 @@ public: private: std::unique_ptrpNumItem; std::unique_ptr pNumFmtShell; -sal_uLong nInitFormat; +sal_uLong nInitFormat; +short m_nLbFormatSelPosEdComment; boolbNumItemFlag; ///< for handling with DocShell boolbOneAreaFlag; boolbLegacyAutomaticCurrency; -short nFixedCategory; +short nFixedCategory; OUString sAutomaticLangEntry; OUString sAutomaticCurrencyEntry; diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 4297cd52241e..5e3e4252a05b 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -195,6 +195,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage(weld::Container* pPage, weld::Dia const SfxItemSet& rCoreAttrs) : SfxTabPage(pPage, pController, "cui/ui/numberingformatpage.ui", "NumberingFormatPage", ) , nInitFormat(ULONG_MAX) +, m_nLbFormatSelPosEdComment(SELPOS_NONE) , bLegacyAutomaticCurrency(false) , sAutomaticLangEntry(CuiResId(RID_SVXSTR_AUTO_ENTRY)) , m_xFtCategory(m_xBuilder->weld_label("categoryft")) @@ -1166,6 +1167,18 @@ IMPL_LINK(SvxNumberFormatTabPage, SelFormatListBoxHdl_Impl, weld::ComboBox&, rLb void SvxNumberFormatTabPage::SelFormatHdl_Impl(weld::Widget* pLb) { +if (m_nLbFormatSelPosEdComment != SELPOS_NONE) +{ +// Click handler is called before focus change handler, so finish +// comment editing of previous format, otherwise a new format will have +// the old comment displayed after LostFocusHdl_Impl() is called +// later. Also, clicking into another category invalidates the format +// list and SvxNumberFormatShell::SetComment4Entry() could either +// access a wrong format from aCurEntryList[nEntry] or crash there if +// the new vector has less elements. +LostFocusHdl_Impl(*pLb); +} + if (pLb == m_xCbSourceFormat.get()) { EnableBySourceFormat_Impl();// enable/disable everything else @@ -1424,6 +1437,10 @@ bool SvxNumberFormatTabPage::Click_Impl(weld::Button& rIB) { if (!m_xEdComment->get_visible()) { +if (!m_xIbAdd->get_sensitive()) +// Editing for existing format. +m_nLbFormatSelPosEdComment = m_xLbFormat->get_selected_index(); + m_xEdComment->set_text(m_xFtComment->get_label()); m_xEdComment->show(); m_xFtComment->hide(); @@ -1432,6 +1449,7 @@ bool SvxNumberFormatTabPage::Click_Impl(weld::Button& rIB) else { m_xEdFormat->grab_focus(); +m_xFtComment->set_label( m_xEdComment->get_text()); m_xEdComment->hide(); m_xFtComment->show(); } @@ -1600,13 +1618,22 @@ IMPL_LINK_NOARG(SvxNumberFormatTabPage, LostFocusHdl_Impl, weld::Widget&, void) { if (!pNumFmtShell) return; -m_xFtComment->set_label(m_xEdComment->get_text()); + +const bool bAddSensitive = m_xIbAdd->get_sensitive(); +if (bAddSensitive || m_nLbFormatSelPosEdComment != SELPOS_NONE) +// Comment editing was possible. +m_xFtComment->set_label(m_xEdComment->get_text()); + m_xEdComment->hide(); m_xFtComment->show(); -if(!m_xIbAdd->get_sensitive()) +if (m_nLbFormatSelPosEdComment != SELPOS_NONE) +{ +// Save edited comment of existing format. +pNumFmtShell->SetComment4Entry( m_nLbFormatSelPosEdComment, m_xEdComment->get_text()); +m_nLbFormatSelPosEdComment = SELPOS_NONE; +} +if (!bAddSensitive) { -
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/inc/numpages.hxx |1 + cui/source/tabpages/numpages.cxx |7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit 0cad102659b14e978143388fa4c819472192d618 Author: Caolán McNamara AuthorDate: Mon Sep 14 14:44:25 2020 +0100 Commit: Miklos Vajna CommitDate: Tue Sep 15 09:57:42 2020 +0200 rhbz#1878275 should use value_changed for spinbutton changes Change-Id: I8d042eb9c288e9db69a49cb9e097b23cf765aae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102640 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 26ec055e249b..ebbe46625562 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -273,6 +273,7 @@ class SvxNumOptionsTabPage : public SfxTabPage DECL_LINK(RatioHdl_Impl, weld::ToggleButton&, void); DECL_LINK(CharFmtHdl_Impl, weld::ComboBox&, void); DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void); +DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void); DECL_LINK(AllLevelHdl_Impl, weld::SpinButton&, void); DECL_LINK(OrientHdl_Impl, weld::ComboBox&, void); DECL_LINK(SameLevelHdl_Impl, weld::ToggleButton&, void); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index b2b53a8e1898..c271ebaaa858 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1068,7 +1068,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC m_xWidthMF->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl)); m_xHeightMF->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl)); m_xRatioCB->connect_toggled(LINK(this, SvxNumOptionsTabPage, RatioHdl_Impl)); -m_xStartED->connect_changed(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl)); +m_xStartED->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SpinModifyHdl_Impl)); m_xPrefixED->connect_changed(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl)); m_xSuffixED->connect_changed(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl)); m_xAllLevelNF->connect_value_changed(LINK(this,SvxNumOptionsTabPage, AllLevelHdl_Impl)); @@ -2088,6 +2088,11 @@ IMPL_LINK(SvxNumOptionsTabPage, EditModifyHdl_Impl, weld::Entry&, rEdit, void) EditModifyHdl_Impl(); } +IMPL_LINK(SvxNumOptionsTabPage, SpinModifyHdl_Impl, weld::SpinButton&, rSpinButton, void) +{ +EditModifyHdl_Impl(); +} + void SvxNumOptionsTabPage::EditModifyHdl_Impl(const weld::Entry* pEdit) { bool bPrefix = pEdit == m_xPrefixED.get(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/dialogs/tipofthedaydlg.cxx | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit e21768ce2898453226aedd5f8ce19d8075f5bec5 Author: Heiko Tietze AuthorDate: Mon Aug 31 11:38:35 2020 +0200 Commit: Heiko Tietze CommitDate: Wed Sep 2 07:37:25 2020 +0200 Resolves tdf#135790 - Support for multiple %MOD1/2 entries While loop added Change-Id: I81386bb23381e5248f3c045ad2b998a92346ec34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101700 Tested-by: Jenkins Reviewed-by: Heiko Tietze (cherry picked from commit db5f204b1d3d96975d902b587d6d18bc06610eea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101860 diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index 7d6a05b72a0f..4775ed0578b9 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -89,11 +89,17 @@ void TipOfTheDayDialog::UpdateTip() #endif sal_Int32 aPos; aPos = aText.indexOf("%MOD1"); -if (aPos != -1) +while (aPos != -1) +{ aText = aText.replaceAt(aPos, 5, aMOD1); +aPos = aText.indexOf("%MOD1"); +} aPos = aText.indexOf("%MOD2"); -if (aPos != -1) +while (aPos != -1) +{ aText = aText.replaceAt(aPos, 5, aMOD2); +aPos = aText.indexOf("%MOD2"); +} m_pText->set_label(aText); // hyperlink ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source include/svx sc/source svx/source sw/source
cui/source/options/optaboutconfig.cxx |4 +++- include/svx/ctredlin.hxx |1 + sc/source/ui/dialogs/searchresults.cxx |4 +++- svx/source/dialog/ctredlin.cxx |4 +++- sw/source/ui/misc/bookmark.cxx |4 +++- sw/source/uibase/misc/redlndlg.cxx |4 6 files changed, 17 insertions(+), 4 deletions(-) New commits: commit c52ac477beefc46802148033adbca9edb9970ac1 Author: Caolán McNamara AuthorDate: Mon Aug 31 11:47:49 2020 +0100 Commit: Miklos Vajna CommitDate: Tue Sep 1 13:40:24 2020 +0200 Resolves: tdf#136189 don't try and sort until treeview is filled Change-Id: Ic5ac71d88bab7627e14220912f4b9c935f2f1f26 and... Related: tdf#136189 don't assert on unsetting non-existing previous sort column Change-Id: If2330cc83ace9ec0133b99eec8c2f0be3919013e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101710 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 44bacb1e1195..79a75bda69d3 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -181,7 +181,9 @@ IMPL_LINK(CuiAboutConfigTabPage, HeaderBarClick, int, nColumn, void) } else { -m_xPrefBox->set_sort_indicator(TRISTATE_INDET, m_xPrefBox->get_sort_column()); +int nOldSortColumn = m_xPrefBox->get_sort_column(); +if (nOldSortColumn != -1) +m_xPrefBox->set_sort_indicator(TRISTATE_INDET, nOldSortColumn); m_xPrefBox->set_sort_column(nColumn); } diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx index 55462c9dce28..08538bf18b02 100644 --- a/include/svx/ctredlin.hxx +++ b/include/svx/ctredlin.hxx @@ -104,6 +104,7 @@ public: void set_size_request(int nWidth, int nHeight); weld::TreeView& GetWidget() { return *pTreeView; } +bool IsSorted() const { return bSorted; } ~SvxRedlinTable(); diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index 950726a18c4e..0f94c64f32e7 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -196,7 +196,9 @@ IMPL_LINK(SearchResultsDlg, HeaderBarClick, int, nColumn, void) } else { -mxList->set_sort_indicator(TRISTATE_INDET, mxList->get_sort_column()); +int nOldSortColumn = mxList->get_sort_column(); +if (nOldSortColumn != -1) +mxList->set_sort_indicator(TRISTATE_INDET, nOldSortColumn); mxList->set_sort_column(nColumn); } diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 3374efde51b5..3116ec7ec5a5 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -110,7 +110,9 @@ IMPL_LINK(SvxRedlinTable, HeaderBarClick, int, nColumn, void) } else { -pTreeView->set_sort_indicator(TRISTATE_INDET, pTreeView->get_sort_column()); +int nOldSortColumn = pTreeView->get_sort_column(); +if (nOldSortColumn != -1) +pTreeView->set_sort_indicator(TRISTATE_INDET, nOldSortColumn); pTreeView->set_sort_column(nColumn); } diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 29f090f94ff6..be22962fcf8d 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -367,7 +367,9 @@ IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void) } else { -m_xBookmarksBox->set_sort_indicator(TRISTATE_INDET, m_xBookmarksBox->get_sort_column()); +int nOldSortColumn = m_xBookmarksBox->get_sort_column(); +if (nOldSortColumn != -1) +m_xBookmarksBox->set_sort_indicator(TRISTATE_INDET, nOldSortColumn); m_xBookmarksBox->set_sort_column(nColumn); } diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 9d510e5fa45c..a185064977c2 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -712,6 +712,8 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli pCurrRedline = nullptr; rTreeView.freeze(); +if (m_pTable->IsSorted()) +rTreeView.make_unsorted(); for (SwRedlineTable::size_type i = nStart; i <= nEnd; i++) { const SwRangeRedline& rRedln = pSh->GetRedline(i); @@ -758,6 +760,8 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli InsertChildren(pRedlineParent, rRedln, bHasRedlineAutoFormat); } rTreeView.thaw(); +if (m_pTable->IsSorted()) +rTreeView.make_sorted(); } void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/dialogs/about.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c6ccf624dad2095aff50d2b939fd3b0b7743ca68 Author: Mike Kaganski AuthorDate: Mon Aug 31 15:37:33 2020 +0200 Commit: Caolán McNamara CommitDate: Tue Sep 1 13:36:35 2020 +0200 Fix warning condition Missed that I needed to reverse the condition when replacing OSL_ENSURE with SAL_WARN_IF in 37f452bc2beeae9b4648013a3bf4f2e8b56c0c85. Thanks Julien for noticing! Change-Id: Id24216e11ca970b05aac40a09ed02cdbb4cf9865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101678 Reviewed-by: Julien Nabet Reviewed-by: Mike Kaganski Tested-by: Jenkins (cherry picked from commit ca7caf212a90b6e4290782159cbdbb36e4538f19) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101684 Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 917e5f4bd30d..99245b94b3ed 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -157,7 +157,7 @@ OUString AboutDialog::GetVersionString() { OUString AboutDialog::GetBuildString() { OUString sBuildId(utl::Bootstrap::getBuildIdData("")); - SAL_WARN_IF(!sBuildId.isEmpty(), "cui.dialogs", "No BUILDID in bootstrap file"); + SAL_WARN_IF(sBuildId.isEmpty(), "cui.dialogs", "No BUILDID in bootstrap file"); return sBuildId; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/inc/chardlg.hxx |9 - cui/source/tabpages/chardlg.cxx | 67 +--- 2 files changed, 57 insertions(+), 19 deletions(-) New commits: commit fdab135ddc845ddaf2014fd35b81e23a83e2c356 Author: Caolán McNamara AuthorDate: Tue Aug 25 13:53:46 2020 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 26 12:35:50 2020 +0200 tdf#127802 support tristate for hidden/unhidden text Change-Id: I9a8ad72ae3ee45ac2521e662b17d3d22d98aa055 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101168 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 06007847e9f2..e81284cc697a 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -168,6 +168,11 @@ private: sal_uInt16 m_nHtmlMode; bool m_bUnderlineColorDisabled; +weld::TriStateEnabled m_aOutlineState; +weld::TriStateEnabled m_aShadowState; +weld::TriStateEnabled m_aHiddenState; +weld::TriStateEnabled m_aIndividualWordsState; + std::unique_ptr m_xFontColorFT; std::unique_ptr m_xFontColorLB; std::unique_ptr m_xFontTransparencyFT; @@ -203,8 +208,10 @@ private: void SelectHdl_Impl(const weld::ComboBox*); DECL_LINK(SelectListBoxHdl_Impl, weld::ComboBox&, void); +DECL_LINK(OutlineBtnClickHdl, weld::ToggleButton&, void); +DECL_LINK(ShadowBtnClickHdl, weld::ToggleButton&, void); +DECL_LINK(HiddenBtnClickHdl, weld::ToggleButton&, void); DECL_LINK(CbClickHdl_Impl, weld::ToggleButton&, void); -DECL_LINK(TristClickHdl_Impl, weld::ToggleButton&, void); DECL_LINK(ColorBoxSelectHdl_Impl, ColorListBox&, void); DECL_LINK(ModifyFontTransparencyHdl_Impl, weld::MetricSpinButton&, void); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 307be4f93e22..077a62aec6b8 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1419,10 +1419,10 @@ void SvxCharEffectsPage::Initialize() m_xEffectsLB->set_active( 0 ); +m_xHiddenBtn->connect_toggled(LINK(this, SvxCharEffectsPage, HiddenBtnClickHdl)); m_xIndividualWordsBtn->connect_toggled(LINK(this, SvxCharEffectsPage, CbClickHdl_Impl)); -Link aLink2 = LINK(this, SvxCharEffectsPage, TristClickHdl_Impl); -m_xOutlineBtn->connect_toggled(aLink2); -m_xShadowBtn->connect_toggled(aLink2); +m_xOutlineBtn->connect_toggled(LINK(this, SvxCharEffectsPage, OutlineBtnClickHdl)); +m_xShadowBtn->connect_toggled(LINK(this, SvxCharEffectsPage, ShadowBtnClickHdl)); if ( !SvtLanguageOptions().IsAsianTypographyEnabled() ) { @@ -1498,7 +1498,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetCaseMap( eCaps == SvxCaseMap::SmallCaps ? SvxCaseMap::NotMapped : eCaps ); } -bool bWordLine = m_xIndividualWordsBtn->get_active(); +bool bWordLine = StateToAttr( m_xIndividualWordsBtn->get_state() ); rFont.SetWordLineMode( bWordLine ); rCJKFont.SetWordLineMode( bWordLine ); rCTLFont.SetWordLineMode( bWordLine ); @@ -1658,13 +1658,10 @@ void SvxCharEffectsPage::SelectHdl_Impl(const weld::ComboBox* pBox) UpdatePreview_Impl(); } -IMPL_LINK_NOARG(SvxCharEffectsPage, CbClickHdl_Impl, weld::ToggleButton&, void) +IMPL_LINK(SvxCharEffectsPage, CbClickHdl_Impl, weld::ToggleButton&, rToggle, void) { +m_aIndividualWordsState.ButtonToggled(rToggle); UpdatePreview_Impl(); -} - -IMPL_LINK_NOARG(SvxCharEffectsPage, TristClickHdl_Impl, weld::ToggleButton&, void) -{ UpdatePreview_Impl(); } @@ -1820,15 +1817,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) switch ( eState ) { case SfxItemState::UNKNOWN: +m_aIndividualWordsState.bTriStateEnabled = false; m_xIndividualWordsBtn->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: +m_aIndividualWordsState.bTriStateEnabled = false; m_xIndividualWordsBtn->set_sensitive(false); break; case SfxItemState::DONTCARE: +m_aIndividualWordsState.bTriStateEnabled = true; m_xIndividualWordsBtn->set_state( TRISTATE_INDET ); break; @@ -1840,6 +1840,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) rCJKFont.SetWordLineMode( rItem.GetValue() ); rCTLFont.SetWordLineMode( rItem.GetValue() ); +m_aIndividualWordsState.bTriStateEnabled = false; m_xIndividualWordsBtn->set_active(rItem.GetValue()); m_xIndividualWordsBtn->set_sensitive(bEnable); break; @@ -1954,15 +1955,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) switch ( eState ) { case SfxItemState::UNKNOWN: +m_aOutlineState.bTriStateEnabled = false; m_xOutlineBtn->hide();
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/dialogs/cuicharmap.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit fc7b4bfeba39a2479c9a2c9c8ef5ced5ab3c0de7 Author: Mike Kaganski AuthorDate: Tue Aug 25 00:01:03 2020 +0200 Commit: Caolán McNamara CommitDate: Tue Aug 25 10:11:49 2020 +0200 tdf#135997: properly check loop condition It should break when any of iterators reaches end, not only when both. Introduced in commit 710a39414569995bd5a8631a948c939dc73bcef9. The crash dump from the bug report points to one of these lines; this is a blind fix, since I cannot reproduce myself. Change-Id: Ie7f6b827256cdb7061901dc9b2ae5ee8e0222a38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101162 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 3b386467f2d4b2b96b7e697d9f5b133819f6180e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101163 Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 3f3651bce366..13d3c8e7658b 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -261,7 +261,7 @@ void SvxCharacterMap::updateRecentCharControl() { int i = 0; for ( std::deque< OUString >::iterator it = maRecentCharList.begin(), it2 = maRecentCharFontList.begin(); -it != maRecentCharList.end() || it2 != maRecentCharFontList.end(); +it != maRecentCharList.end() && it2 != maRecentCharFontList.end(); ++it, ++it2, i++) { m_aRecentCharView[i].SetText(*it); @@ -360,7 +360,7 @@ void SvxCharacterMap::updateFavCharControl() { int i = 0; for ( std::deque< OUString >::iterator it = maFavCharList.begin(), it2 = maFavCharFontList.begin(); -it != maFavCharList.end() || it2 != maFavCharFontList.end(); +it != maFavCharList.end() && it2 != maFavCharFontList.end(); ++it, ++it2, i++) { m_aFavCharView[i].SetText(*it); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/tabpages/border.cxx | 24 1 file changed, 12 insertions(+), 12 deletions(-) New commits: commit ce595857702734203a498fe4754ce990b17c5cb0 Author: Caolán McNamara AuthorDate: Fri Aug 21 15:18:13 2020 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sat Aug 22 04:30:28 2020 +0200 Resolves: tdf#135128 should get the old attr, not the default attr so we retain the original shadow distance if its not changed but the color is. Use GetOldAttr which is intended for that. Change-Id: I2d4b5a5b035c94cd8f2cc8f73bd239fab85b945f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101148 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 82f9b6c3e0ab..8dc87e8409bd 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -846,8 +846,7 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR)) { -sal_uInt16 nBorderDiagId = pPool->GetWhich(SID_ATTR_BORDER_DIAG_TLBR); -SvxLineItem aLineItem(*static_cast(rCoreAttrs->GetItem(nBorderDiagId))); +SvxLineItem aLineItem(*static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_BORDER_DIAG_TLBR))); aLineItem.SetLine(m_aFrameSel.GetFrameBorderStyle(svx::FrameBorderType::TLBR)); rCoreAttrs->Put(aLineItem); bAttrsChanged = true; @@ -855,8 +854,7 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::BLTR)) { -sal_uInt16 nBorderDiagId = pPool->GetWhich(SID_ATTR_BORDER_DIAG_BLTR); -SvxLineItem aLineItem(*static_cast(rCoreAttrs->GetItem(nBorderDiagId))); +SvxLineItem aLineItem(*static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_BORDER_DIAG_BLTR))); aLineItem.SetLine(m_aFrameSel.GetFrameBorderStyle(svx::FrameBorderType::BLTR)); rCoreAttrs->Put(aLineItem); bAttrsChanged = true; @@ -864,29 +862,29 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) if (m_xShadowControls && m_xShadowControls->get_value_changed_from_saved()) { -sal_uInt16 nShadowId = pPool->GetWhich(mnShadowSlot); -const SvxShadowItem& rOldShadowItem = *static_cast(rCoreAttrs->GetItem(nShadowId)); +const SvxShadowItem& rOldShadowItem = *static_cast(GetOldItem(*rCoreAttrs, mnShadowSlot)); rCoreAttrs->Put(m_xShadowControls->GetControlValue(rOldShadowItem)); bAttrsChanged = true; } if (m_xMarginControls && m_xMarginControls->get_value_changed_from_saved()) { -sal_uInt16 nAlignMarginId = pPool->GetWhich(SID_ATTR_ALIGN_MARGIN); -const SvxMarginItem& rOldMarginItem = *static_cast(rCoreAttrs->GetItem(nAlignMarginId)); +const SvxMarginItem& rOldMarginItem = *static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_ALIGN_MARGIN)); rCoreAttrs->Put(m_xMarginControls->GetControlValue(rOldMarginItem)); bAttrsChanged = true; } if (m_xMergeAdjacentBordersCB->get_state_changed_from_saved()) { -sal_uInt16 nMergeAdjacentBordersId = pPool->GetWhich(SID_SW_COLLAPSING_BORDERS); auto nState = m_xMergeAdjacentBordersCB->get_state(); if (nState == TRISTATE_INDET) +{ +sal_uInt16 nMergeAdjacentBordersId = pPool->GetWhich(SID_SW_COLLAPSING_BORDERS); rCoreAttrs->ClearItem(nMergeAdjacentBordersId); +} else { -std::unique_ptr xNewItem(static_cast(rCoreAttrs->Get(nMergeAdjacentBordersId).Clone())); +std::unique_ptr xNewItem(static_cast(GetOldItem(*rCoreAttrs, SID_SW_COLLAPSING_BORDERS)->Clone())); xNewItem->SetValue(static_cast(nState)); rCoreAttrs->Put(std::move(xNewItem)); } @@ -895,13 +893,15 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) if (m_xMergeWithNextCB->get_state_changed_from_saved()) { -sal_uInt16 nMergeWithNextId = pPool->GetWhich(SID_ATTR_BORDER_CONNECT); auto nState = m_xMergeWithNextCB->get_state(); if (nState == TRISTATE_INDET) +{ +sal_uInt16 nMergeWithNextId = pPool->GetWhich(SID_ATTR_BORDER_CONNECT); rCoreAttrs->ClearItem(nMergeWithNextId); +} else { -std::unique_ptr xNewItem(static_cast(rCoreAttrs->Get(nMergeWithNextId).Clone())); +std::unique_ptr xNewItem(static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_BORDER_CONNECT)->Clone())); xNewItem->SetValue(static_cast(nState)); rCoreAttrs->Put(std::move(xNewItem)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source include/unotools unotools/source
cui/source/dialogs/about.cxx | 17 + include/unotools/bootstrap.hxx |3 --- unotools/source/config/bootstrap.cxx | 11 --- 3 files changed, 5 insertions(+), 26 deletions(-) New commits: commit 0a796797ddfe2d1913ac91908074c397cf7c9c82 Author: Mike Kaganski AuthorDate: Tue Aug 18 22:23:30 2020 +0300 Commit: Caolán McNamara CommitDate: Wed Aug 19 15:47:41 2020 +0200 tdf#135133: Don't try to read BuildVersion The option to set it was removed in 5fdf2009d21fa220dfee70ea755bd698c16257a7, and now the check is redundant - and even harmful until the remnants of the setting is dropped from bootstrap.ini. Currently the dummy value found there makes the About dialog miss the build id, and copying info to clipboard gives instead of proper build id. Previously the string was always empty in most builds (including TDF), which made the code proceed to buildid. Bootstrap::getBuildVersion got unused now, and is removed. Change-Id: If59e456655da29bb9421edc0e15d421829d0a02b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100957 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100975 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index efeef5a9c002..917e5f4bd30d 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -19,7 +19,6 @@ #include -#include //OSL_ENSURE #include //osl_getProcessLocale #include //rtl::isAsciiHexDigit #include//SAL_WARN @@ -34,7 +33,7 @@ #include //SfxApplication::loadBrandSvg #include #include -#include //utl::Bootstrap::getBuildVersion +#include //utl::Bootstrap::getBuildIdData #include //ConfigManager:: #include @@ -155,16 +154,10 @@ OUString AboutDialog::GetVersionString() { return sVersion; } -OUString AboutDialog::GetBuildString() { - - OUString sDefault; - OUString sBuildId(utl::Bootstrap::getBuildVersion(sDefault)); - if (sBuildId.isEmpty()) -sBuildId = utl::Bootstrap::getBuildIdData(sDefault); - if (sBuildId.isEmpty()) { -sBuildId = sBuildId.getToken(0, '-'); - } - OSL_ENSURE(!sBuildId.isEmpty(), "No BUILDID in bootstrap file"); +OUString AboutDialog::GetBuildString() +{ + OUString sBuildId(utl::Bootstrap::getBuildIdData("")); + SAL_WARN_IF(!sBuildId.isEmpty(), "cui.dialogs", "No BUILDID in bootstrap file"); return sBuildId; } diff --git a/include/unotools/bootstrap.hxx b/include/unotools/bootstrap.hxx index 447c33b64942..3f87741408c4 100644 --- a/include/unotools/bootstrap.hxx +++ b/include/unotools/bootstrap.hxx @@ -46,9 +46,6 @@ namespace utl /// retrieve the BUILDID information item; uses the given default, if not found static OUString getBuildIdData(OUString const& _sDefault); -/// retrieve the BuildVersion information item; uses the given default, if not found -static OUString getBuildVersion(OUString const& _sDefault); - /// reload cached data static void reloadData(); diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 459d8e518945..a6c8eb228067 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -37,7 +37,6 @@ #define BOOTSTRAP_ITEM_PRODUCT_KEY "ProductKey" #define BOOTSTRAP_ITEM_VERSIONFILE "Location" #define BOOTSTRAP_ITEM_BUILDID "buildid" -#define BOOTSTRAP_ITEM_BUILDVERSION "BuildVersion" #define BOOTSTRAP_ITEM_BASEINSTALLATION "BRAND_BASE_DIR" #define BOOTSTRAP_ITEM_USERINSTALLATION "UserInstallation" @@ -546,16 +545,6 @@ OUString Bootstrap::getProductKey(OUString const& _sDefault) return data().getBootstrapValue( csProductKeyItem, _sDefault ); } -OUString Bootstrap::getBuildVersion(OUString const& _sDefault) -{ -OUString const csBuildVersionItem(BOOTSTRAP_ITEM_BUILDVERSION); - -OUString sBuildVersion; -// read BuildVersion from version.ini (versionrc) -utl::Bootstrap::Impl::getVersionValue( csBuildVersionItem, sBuildVersion, _sDefault ); -return sBuildVersion; -} - OUString Bootstrap::getBuildIdData(OUString const& _sDefault) { OUString const csBuildIdItem(BOOTSTRAP_ITEM_BUILDID); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/options/optjava.cxx | 19 ++- cui/source/options/optjava.hxx |1 + 2 files changed, 15 insertions(+), 5 deletions(-) New commits: commit 5fb474293af0b2ed2a68be6141941736a27bf34b Author: Stephan Bergmann AuthorDate: Mon Aug 17 13:06:50 2020 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Aug 17 17:31:51 2020 +0200 Always display highlighted JRE's location ...when opening the Advanced options page and after adding a new JRE via the "Add..." button, not only after highlighting another JRE line. (I suspect this broke with 1aa246a8e8c7d974ab0f7bdfa16cda36cb700e03 "weld SvxJavaOptionsPage" towards LO 6.4.) Change-Id: I5f9b63e2d33a351eeef09712969b703f1e99ef7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100860 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit f7fe1e93da753d74485a13d46fe15fb198411932) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100798 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 0eeaec393c6d..f3c9dcfee4a8 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -148,11 +149,7 @@ IMPL_LINK(SvxJavaOptionsPage, CheckHdl_Impl, const row_col&, rRowCol, void) IMPL_LINK_NOARG(SvxJavaOptionsPage, SelectHdl_Impl, weld::TreeView&, void) { -// set installation directory info -OUString sLocation = m_xJavaList->get_selected_id(); -// tdf#80646 insert LTR mark after label -OUString sInfo = m_sInstallText + u"\u200E" + sLocation; -m_xJavaPathText->set_label(sInfo); +UpdateJavaPathText(); } IMPL_LINK_NOARG(SvxJavaOptionsPage, AddHdl_Impl, weld::Button&, void) @@ -340,6 +337,7 @@ void SvxJavaOptionsPage::LoadJREs() if ( jfw_areEqualJavaInfo( pCmpInfo.get(), pSelectedJava.get() ) ) { HandleCheckEntry(i); +UpdateJavaPathText(); break; } ++i; @@ -378,6 +376,16 @@ void SvxJavaOptionsPage::HandleCheckEntry(int nCheckedRow) } } +void SvxJavaOptionsPage::UpdateJavaPathText() +{ +assert(m_xJavaList->get_selected_index() != -1); +// set installation directory info +OUString sLocation = m_xJavaList->get_selected_id(); +// tdf#80646 insert LTR mark after label +OUString sInfo = m_sInstallText + u"\u200E" + sLocation; +m_xJavaPathText->set_label(sInfo); +} + void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder ) { #if HAVE_FEATURE_JAVA @@ -420,6 +428,7 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder ) } HandleCheckEntry(nPos); +UpdateJavaPathText(); bStartAgain = false; } else if ( JFW_E_NOT_RECOGNIZED == eErr ) diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index f117746ebeec..df90e2824bdc 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -99,6 +99,7 @@ private: voidLoadJREs(); voidAddJRE( JavaInfo const * _pInfo ); voidHandleCheckEntry(int nCheckedRow); +voidUpdateJavaPathText(); voidAddFolder( const OUString& _rFolder ); voidRequestRestart( svtools::RestartReason eReason ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/customize/SvxMenuConfigPage.cxx|6 -- cui/source/customize/SvxToolbarConfigPage.cxx |6 -- 2 files changed, 8 insertions(+), 4 deletions(-) New commits: commit 16c7fd441c29f2fe9ca14d8e7ab615ce8fca61c8 Author: Julien Nabet AuthorDate: Fri Jul 31 09:51:21 2020 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 31 21:17:44 2020 +0200 tdf#135321: fix crash when right click empty in Command list See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=163797 Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=d54202ff690e4e97e018461cc6dc3dfadd36a702 author Sarper Akdemir 2020-02-14 13:17:46 +0300 committer Muhammet Kara 2020-02-28 18:32:54 +0100 commit d54202ff690e4e97e018461cc6dc3dfadd36a702 (patch) tree5f60f9c473b30e0f59bbf13a6f773595e1e4e759 parent 531f078f3371e909b03b358bc5c9d70df083555f (diff) tdf#112135: Provide controls through context menu in lists of Customize dialog Change-Id: I73031811257e1d128bb6bdc11c481f7a63bbc05e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99850 Tested-by: Xisco Fauli Tested-by: Jenkins Reviewed-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99876 Reviewed-by: Caolán McNamara diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx index a0c6d316a0e5..2adb561834fb 100644 --- a/cui/source/customize/SvxMenuConfigPage.cxx +++ b/cui/source/customize/SvxMenuConfigPage.cxx @@ -529,7 +529,8 @@ IMPL_LINK( SvxMenuConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEvt, // Select clicked entry std::unique_ptr xIter(rTreeView.make_iterator()); -rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false ); +if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false )) +return false; rTreeView.select(*xIter); SelectMenuEntry( rTreeView ); @@ -572,7 +573,8 @@ IMPL_LINK( SvxMenuConfigPage, FunctionContextMenuHdl, const CommandEvent&, rCEvt // Select clicked entry std::unique_ptr xIter(rTreeView.make_iterator()); -rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false ); +if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false )) +return false; rTreeView.select(*xIter); SelectFunctionHdl( rTreeView ); diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index dfe66d4e3721..ead5792c0373 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -896,7 +896,8 @@ IMPL_LINK( SvxToolbarConfigPage, ContentContextMenuHdl, const CommandEvent&, rCE // Select clicked entry std::unique_ptr rIter(rTreeView.make_iterator()); -rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter ); +if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter )) +return false; rTreeView.select(*rIter); SelectToolbarEntry( rTreeView ); @@ -941,7 +942,8 @@ IMPL_LINK( SvxToolbarConfigPage, FunctionContextMenuHdl, const CommandEvent&, rC // Select clicked entry std::unique_ptr rIter(rTreeView.make_iterator()); -rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter ); +if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter )) +return false; rTreeView.select(*rIter); SelectFunctionHdl( rTreeView ); std::unique_ptr xBuilder(Application::CreateBuilder( , "cui/ui/entrycontextmenu.ui" ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/dialogs/SpellDialog.cxx | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) New commits: commit 5511f3de1afe53088416d793ce08d61fd961dfa9 Author: Caolán McNamara AuthorDate: Wed Jul 29 11:09:46 2020 +0100 Commit: Caolán McNamara CommitDate: Wed Jul 29 14:53:28 2020 +0200 tdf#133958 only move the selection to the error if its not already there Change-Id: I3046c842cc6c8bcc867c79989a8978d382b08269 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99606 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 68bdb15339c2..b3b66d9e6bf0 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1672,8 +1672,17 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_Int32 nStart, sal_Int32 nEnd, aSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT_CTL)); m_xEditEngine->QuickSetAttribs(aSet, ESelection(0, nStart, 0, nEnd)); -// so the editview will autoscroll to make this visible -m_xEditView->SetSelection(ESelection(0, nStart)); + +// Set the selection so the editview will autoscroll to make this visible +// unless (tdf#133958) the selection already overlaps this range +ESelection aCurrentSelection = m_xEditView->GetSelection(); +aCurrentSelection.Adjust(); +bool bCurrentSelectionInRange = nStart <= aCurrentSelection.nEndPos && aCurrentSelection.nStartPos <= nEnd; +if (!bCurrentSelectionInRange) +{ +m_xEditView->SetSelection(ESelection(0, nStart)); +} + Invalidate(); m_nErrorStart = nStart; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source include/vcl vcl/source
cui/source/dialogs/about.cxx | 11 ++- include/vcl/svapp.hxx|2 +- vcl/source/app/svapp.cxx | 24 3 files changed, 23 insertions(+), 14 deletions(-) New commits: commit 5863e5a06069a005023f97013ffd170f121d3f8a Author: Heiko Tietze AuthorDate: Fri Jul 10 13:43:04 2020 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Wed Jul 29 03:17:40 2020 +0200 Resolves tdf#132066 - Localization of special text in about window Copy all version infos in English Change-Id: I6719e27f721b0ff9f06efb4ea63e286e6d58ebf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98498 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit b4b8665bd370a869196e2f63acc2cdde7a37a4df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99603 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 53f05d52b2e1..efeef5a9c002 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -250,16 +250,17 @@ OUString AboutDialog::GetCopyrightString() { return aCopyrightString; } +//special labels to comply with previous version info IMPL_LINK_NOARG(AboutDialog, HandleClick, weld::Button &, void) { css::uno::Reference xClipboard = css::datatransfer::clipboard::SystemClipboard::create( comphelper::getProcessComponentContext()); - OUString sInfo = "Version: " + m_pVersionLabel->get_label() // version - + "\nBuild ID: " + GetBuildString() // build id - + "\n" + m_pEnvLabel->get_label() + "; " + m_pUILabel->get_label() // env+UI - + "\nLocale: " + m_pLocaleLabel->get_label() // locale - + "\n" + m_pMiscLabel->get_label(); // misc + OUString sInfo = "Version: " + m_pVersionLabel->get_label() + "\n" // version + "Build ID: " + GetBuildString() + "\n" + // build id + Application::GetHWOSConfInfo(0,false) + "\n" // env+UI + "Locale: " + m_pLocaleLabel->get_label() + "\n" + // locale + m_pMiscLabel->get_label(); // misc vcl::unohelper::TextDataObject::CopyStringTo(sInfo, xClipboard); } diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 48a764b80125..6d520bb1d32d 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -906,7 +906,7 @@ public: * bSelection = 0 to return all info, 1 for environment only, * and 2 for VCL/render related infos */ -static OUString GetHWOSConfInfo(const int bSelection = 0); +static OUString GetHWOSConfInfo(const int bSelection = 0, bool bLocalize = true); /** Load a localized branding PNG file as a bitmap. diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index ea01d31c0829..faf2d6f90ab0 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1135,7 +1135,15 @@ OUString Application::GetAppName() enum {hwAll=0, hwEnv=1, hwUI=2}; -OUString Application::GetHWOSConfInfo(const int bSelection) +static OUString Localize(const char *pId, const bool bLocalize) +{ +if (bLocalize) +return VclResId(pId); +else +return Translate::get(pId, Translate::Create("vcl", LanguageTag("en-US"))); +} + +OUString Application::GetHWOSConfInfo(const int bSelection, const bool bLocalize) { ImplSVData* pSVData = ImplGetSVData(); OUStringBuffer aDetails; @@ -1147,7 +1155,7 @@ OUString Application::GetHWOSConfInfo(const int bSelection) }; if (bSelection != hwUI) { -appendDetails("; ", VclResId(SV_APP_CPUTHREADS) +appendDetails("; ", Localize(SV_APP_CPUTHREADS, bLocalize) + OUString::number(std::thread::hardware_concurrency())); OUString aVersion; @@ -1156,21 +1164,21 @@ OUString Application::GetHWOSConfInfo(const int bSelection) else aVersion = "-"; -appendDetails("; ", VclResId(SV_APP_OSVERSION) + aVersion); +appendDetails("; ", Localize(SV_APP_OSVERSION, bLocalize) + aVersion); } if (bSelection != hwEnv) { -appendDetails("; ", VclResId(SV_APP_UIRENDER)); +appendDetails("; ", Localize(SV_APP_UIRENDER, bLocalize)); #if HAVE_FEATURE_SKIA if ( SkiaHelper::isVCLSkiaEnabled() ) { switch(SkiaHelper::renderMethodToUse()) { case SkiaHelper::RenderVulkan: -appendDetails("", VclResId(SV_APP_SKIA_VULKAN)); +appendDetails("", Localize(SV_APP_SKIA_VULKAN, bLocalize)); break; case SkiaHelper::RenderRaster: -appendDetails("", VclResId(SV_APP_SKIA_RASTER)); +appendDetails("", Localize(SV_APP_SKIA_RASTER, bLocalize)); break; } } @@ -1178,10 +1186,10 @@ OUString
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/options/optgdlg.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 44d6c0f1e024ce2477d027b07069998eea044eb2 Author: Caolán McNamara AuthorDate: Thu Jul 2 10:26:38 2020 +0100 Commit: Caolán McNamara CommitDate: Thu Jul 2 18:21:00 2020 +0200 currency combobox doesn't have a selected entry possibly since... commit 5326d238d7f98b11886eb4be01f19db73f8eda39 Date: Tue Feb 4 00:14:17 2020 +0300 tdf#114694: Make default value in language settings the first element Change-Id: I6a543ee6bf59d6dfcaee47252cf8008e840e47e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97682 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 4959c58f4bef..b9122d3d00e2 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1482,7 +1482,8 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) // Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default. OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString(); -const NfCurrencyEntry* pCurr = reinterpret_cast(m_xCurrencyLB->get_active_id().toInt64()); +OUString sId = m_xCurrencyLB->get_active_id(); +const NfCurrencyEntry* pCurr = sId == "default" ? nullptr : reinterpret_cast(sId.toInt64()); OUString sNewCurr; if ( pCurr ) sNewCurr = SvtSysLocaleOptions::CreateCurrencyConfigString( @@ -1642,7 +1643,8 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) pCurr = SvNumberFormatter::GetCurrencyEntry( aAbbrev, eLang ); } // if pCurr==nullptr the SYSTEM entry is selected - m_xCurrencyLB->set_active_id(OUString::number(reinterpret_cast(pCurr))); +OUString sId = !pCurr ? OUString("default") : OUString::number(reinterpret_cast(pCurr)); +m_xCurrencyLB->set_active_id(sId); bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Currency); m_xCurrencyLB->set_sensitive(!bReadonly); m_xCurrencyFT->set_sensitive(!bReadonly); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source vcl/unx
cui/source/options/treeopt.cxx |9 + vcl/unx/gtk3/gtk3gtkinst.cxx |5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) New commits: commit eb4806aaf3ec63ba9260a57315cc2ee442150e12 Author: Caolán McNamara AuthorDate: Thu Jul 2 10:54:52 2020 +0100 Commit: Caolán McNamara CommitDate: Thu Jul 2 17:54:36 2020 +0200 focus grabbed to options extension page when browsing options Window::Show grabs focus to the window if its a system window by default and XWindow::set_visible calls Show with default args Change-Id: Ief3b44068b867fe22f829de5d9722832692a35fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97681 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 2d6b104e1d9b..0e63a774d394 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -2044,6 +2044,15 @@ void ExtensionsTabPage::Show() { if (!m_xPageParent.is()) return; + +VclPtr xPageParent = VCLUnoHelper::GetWindow(m_xPageParent); +if (xPageParent) +{ +// NoActivate otherwise setVisible will call Window::Show which will grab +// focus to the page by default +xPageParent->Show(true, ShowFlags::NoActivate); +} + m_xPageParent->setVisible(true); } diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 2eb237ef5009..e4449b121e41 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3670,7 +3670,8 @@ public: gtk_widget_set_can_focus(pWindow, true); g_object_unref(pWindow); -xEmbedWindow->Show(); +// NoActivate otherwise Show grab focus to this widget +xEmbedWindow->Show(true, ShowFlags::NoActivate); css::uno::Reference xWindow(xEmbedWindow->GetComponentInterface(), css::uno::UNO_QUERY); return xWindow; } @@ -15742,7 +15743,7 @@ weld::Builder* GtkInstance::CreateInterimBuilder(vcl::Window* pParent, const OUS SystemWindowData winData = {}; winData.bClipUsingNativeWidget = true; auto xEmbedWindow = VclPtr::Create(pParent, 0, , false); -xEmbedWindow->Show(); +xEmbedWindow->Show(true, ShowFlags::NoActivate); xEmbedWindow->set_expand(true); const SystemEnvData* pEnvData = xEmbedWindow->GetSystemData(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source include/svl sc/source svl/source
cui/source/tabpages/numfmt.cxx | 13 +++--- include/svl/zformat.hxx|4 + sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 14 +++--- sc/source/ui/view/formatsh.cxx |4 + sc/source/ui/view/viewfunc.cxx |4 - svl/source/numbers/zforlist.cxx|8 ++- svl/source/numbers/zformat.cxx | 43 + 7 files changed, 72 insertions(+), 18 deletions(-) New commits: commit 82365fe69c15c65589f709d539ed8e9c4f86a48e Author: Laurent BP AuthorDate: Sun May 24 22:30:41 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Jun 16 13:36:11 2020 +0200 tdf#103414 Add/Delete decimal for 100th second Use Add/Delete decimal to change precision of time and duration Apply only to 100th second Change-Id: I2ff1b01db7ee67645511fcf7ea6bf65055e92a8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94765 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit 1861363d623963461905f42aa0b9dc2301f2eaaa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96349 Reviewed-by: Xisco Fauli diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 109c9ef8982f..4297cd52241e 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -920,6 +920,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa case CAT_PERCENT: case CAT_CURRENCY: case CAT_FRACTION: +case CAT_TIME: m_xFtOptions->set_sensitive(true); if ( nCategory == CAT_FRACTION ) { @@ -931,8 +932,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa m_xFtDecimals->set_sensitive(true); m_xEdDecimals->set_sensitive(true); } -m_xFtLeadZeroes->set_sensitive(true); -m_xEdLeadZeroes->set_sensitive(true); +m_xFtLeadZeroes->set_sensitive( nCategory != CAT_TIME ); +m_xEdLeadZeroes->set_sensitive( nCategory != CAT_TIME ); m_xBtnNegRed->set_sensitive(true); if ( nCategory == CAT_NUMBER && m_xLbFormat->get_selected_index() == 0 ) m_xEdDecimals->set_text( "" ); //General format tdf#44399 @@ -941,12 +942,13 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa m_xEdDenominator->set_value( nDecimals ); else m_xEdDecimals->set_value( nDecimals ); -m_xEdLeadZeroes->set_value( nZeroes ); +if ( nCategory != CAT_TIME ) +m_xEdLeadZeroes->set_value( nZeroes ); m_xBtnNegRed->set_active( bNegRed ); if ( nCategory != CAT_SCIENTIFIC ) { -m_xBtnThousand->set_sensitive(true); -m_xBtnThousand->set_active( bThousand ); +m_xBtnThousand->set_sensitive( nCategory != CAT_TIME ); +m_xBtnThousand->set_active( bThousand && nCategory != CAT_TIME ); } break; @@ -954,7 +956,6 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool bCheckCatChange /*= sal_Fa case CAT_USERDEFINED: case CAT_TEXT: case CAT_DATE: -case CAT_TIME: case CAT_BOOLEAN: default: m_xFtOptions->set_sensitive(false); diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index abd805d187e5..089a4b0e48e6 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -305,6 +305,10 @@ public: /// Round fNumber to its fraction representation double GetRoundFractionValue ( double fNumber ) const; +/// Create a format string for time with a new precision +OUString GetFormatStringForTimePrecision( int nPrecision ) const; + + /** If the count of string elements (substrings, ignoring [modifiers] and so on) in a subformat code nNumFor (0..3) is equal to the given number. Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index eeb46ef316ad..324ebe8f8171 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -197,14 +197,14 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( sal_uInt16 nVal = pItem->GetValue(); mnCategorySelected = nVal; mxLbCategory->set_active(nVal); -if( nVal < 4 || // General, Number, Percent and Currency -nVal == 6 || // scientific also -nVal == 7 ) // fraction +if (nVal < 8 && // General, Number, Percent, Currency, Time, Scientific, Fraction +nVal != 4 ) //
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/customize/cfg.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d8da7169e3c94ee813a532932b71fe433f899f87 Author: Tomoyuki Kubota AuthorDate: Thu Jun 11 01:36:28 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Jun 16 13:10:15 2020 +0200 fix my own mistake Change-Id: I01f3b405e91175ab0ef532505bf9f275073d2fc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96044 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 9457326e17505c9a17f40b2f932b21a4436eeae1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96096 Reviewed-by: Xisco Fauli diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 6b2a83d38dc3..04664d511b2b 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -136,7 +136,7 @@ void printProperties( const OUString& prefix, const uno::Sequence< beans::PropertyValue >& aProp ) { -for (PropertyValue const & aPropVal : aProp) +for (beans::PropertyValue const & aPropVal : aProp) { OUString tmp; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/dialogs/SpellDialog.cxx | 58 - cui/source/inc/SpellDialog.hxx |5 +-- 2 files changed, 42 insertions(+), 21 deletions(-) New commits: commit 44041005186b0556a06695920de842c5998851f1 Author: Caolán McNamara AuthorDate: Mon Jun 15 20:33:47 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Jun 16 09:39:02 2020 +0200 tdf#132822 close open undo group before clearing undo stack when changing paragraph. previous para undo info needs to be discarded, but that cannot be done properly if there is an open undo group. So pass the optional undo group guard down to GetNextSentence_Impl which can close it before it needs to set the new paragraph. Change-Id: I595c3598b15b6b1fdace045c3879617ecfea3faa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96348 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index e1de0c8e0e8f..68bdb15339c2 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -344,14 +344,14 @@ void SpellDialog::UpdateBoxes_Impl(bool bCallFromSelectHdl) m_xDialog->resize_to_request(); } -void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrentError ) +void SpellDialog::SpellContinue_Impl(std::unique_ptr* pGuard, bool bUseSavedSentence, bool bIgnoreCurrentError) { //initially or after the last error of a sentence MarkNextError will fail //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->IsUndoEditMode() && m_xSentenceED->MarkNextError( bIgnoreCurrentError, xSpell )) || -( bNextSentence = GetNextSentence_Impl(bUseSavedSentence, m_xSentenceED->IsUndoEditMode()) && m_xSentenceED->MarkNextError( false, xSpell +( bNextSentence = GetNextSentence_Impl(pGuard, bUseSavedSentence, m_xSentenceED->IsUndoEditMode()) && m_xSentenceED->MarkNextError( false, xSpell return; SpellErrorDescription aSpellErrorDescription; @@ -389,7 +389,7 @@ IMPL_LINK_NOARG( SpellDialog, InitHdl, void*, void) m_xDialog->freeze(); //show or hide AutoCorrect depending on the modules abilities m_xAutoCorrPB->set_visible(rParent.HasAutoCorrection()); -SpellContinue_Impl(); +SpellContinue_Impl(nullptr); m_xSentenceED->ResetUndo(); m_xUndoPB->set_sensitive(false); @@ -506,6 +506,27 @@ IMPL_LINK_NOARG(SpellDialog, DoubleClickChangeHdl, weld::TreeView&, bool) return true; } +/* tdf#132822 start an undo group in ctor and close it in the dtor. This can + then be passed to SpellContinue_Impl which can delete it in advance of its + natural scope to force closing the undo group if SpellContinue_Impl needs to + fetch a new paragraph and discard all undo information which can only be + done properly if there are no open undo groups */ +class UndoChangeGroupGuard +{ +private: +SentenceEditWindow_Impl& m_rSentenceED; +public: +UndoChangeGroupGuard(SentenceEditWindow_Impl& rSentenceED) +: m_rSentenceED(rSentenceED) +{ +m_rSentenceED.UndoActionStart(SPELLUNDO_CHANGE_GROUP); +} +~UndoChangeGroupGuard() +{ +m_rSentenceED.UndoActionEnd(); +} +}; + IMPL_LINK_NOARG(SpellDialog, ChangeHdl, weld::Button&, void) { if (m_xSentenceED->IsUndoEditMode()) @@ -514,11 +535,10 @@ IMPL_LINK_NOARG(SpellDialog, ChangeHdl, weld::Button&, void) } else { -m_xSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP ); +auto xGuard(std::make_unique(*m_xSentenceED)); OUString aString = getReplacementString(); m_xSentenceED->ChangeMarkedWord(aString, GetSelectedLang_Impl()); -SpellContinue_Impl(); -m_xSentenceED->UndoActionEnd(); +SpellContinue_Impl(); } if(!m_xChangePB->get_sensitive()) m_xIgnorePB->grab_focus(); @@ -526,7 +546,7 @@ IMPL_LINK_NOARG(SpellDialog, ChangeHdl, weld::Button&, void) IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl, weld::Button&, void) { -m_xSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP ); +auto xGuard(std::make_unique(*m_xSentenceED)); OUString aString = getReplacementString(); LanguageType eLang = GetSelectedLang_Impl(); @@ -548,13 +568,12 @@ IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl, weld::Button&, void) } m_xSentenceED->ChangeMarkedWord(aString, eLang); -SpellContinue_Impl(); -m_xSentenceED->UndoActionEnd(); +SpellContinue_Impl(); } IMPL_LINK( SpellDialog, IgnoreAllHdl, weld::Button&, rButton, void ) { -m_xSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP ); +auto xGuard(std::make_unique(*m_xSentenceED)); // add word to IgnoreAll list Reference< XDictionary > aXDictionary =
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/customize/SvxNotebookbarConfigPage.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit 82b46d1683a0817583e8749b4076082b2de6782b Author: Caolán McNamara AuthorDate: Wed Jun 10 15:53:56 2020 +0100 Commit: Caolán McNamara CommitDate: Thu Jun 11 10:02:50 2020 +0200 Resolves: tdf#133862 crash in customize toolbar in embedded math Change-Id: I2fc7f3620145e48516c3ca73c0a5d08dce11d78a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96034 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 584767d6af5a..0fb05678b1e1 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -418,6 +418,8 @@ void SvxNotebookbarConfigPage::SelectElement() OString sUIFileUIPath = CustomNotebookbarGenerator::getSystemPath( CustomNotebookbarGenerator::getCustomizedUIPath()); xmlDocPtr pDoc = xmlParseFile(sUIFileUIPath.getStr()); +if (!pDoc) +return; xmlNodePtr pNodePtr = xmlDocGetRootElement(pDoc); std::vector aEntries; @@ -479,10 +481,7 @@ void SvxNotebookbarConfigPage::SelectElement() aEntries.clear(); -if (pDoc != nullptr) -{ -xmlFreeDoc(pDoc); -} +xmlFreeDoc(pDoc); } SvxNotebookbarEntriesListBox::SvxNotebookbarEntriesListBox(std::unique_ptr xParent, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/inc/autocdlg.hxx |2 +- cui/source/tabpages/autocdlg.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 9008b5718113e5b3ab7e9fbf35b999661c39 Author: Caolán McNamara AuthorDate: Sat Jun 6 20:27:24 2020 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sun Jun 7 00:58:22 2020 +0200 Resolves: tdf#125981 use original label, not current label Change-Id: Iddc1d3e38e70d91d60947d9867dcfb03cb5128d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95677 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index b94fd3d80fef..11eb7b9de89b 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -288,7 +288,7 @@ private: std::unique_ptr m_xDblEndQuotePB; std::unique_ptr m_xDblEndExFT; std::unique_ptr m_xDblStandardPB; -std::unique_ptr m_xStandard; +OUString m_sStandard; /// For anything but writer std::unique_ptr m_xCheckLB; /// Just for writer diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 74e1ef127659..4f1c0f3632e0 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -1563,7 +1563,7 @@ OfaQuoteTabPage::OfaQuoteTabPage(weld::Container* pPage, weld::DialogController* , m_xDblEndQuotePB(m_xBuilder->weld_button("enddouble")) , m_xDblEndExFT(m_xBuilder->weld_label("doubleendex")) , m_xDblStandardPB(m_xBuilder->weld_button("defaultdouble")) -, m_xStandard(m_xBuilder->weld_label("singlestartex")) +, m_sStandard(m_xSglStartExFT->get_label()) , m_xCheckLB(m_xBuilder->weld_tree_view("checklist")) , m_xSwCheckLB(m_xBuilder->weld_tree_view("list")) { @@ -1852,7 +1852,7 @@ IMPL_LINK(OfaQuoteTabPage, StdQuoteHdl, weld::Button&, rBtn, void) OUString OfaQuoteTabPage::ChangeStringExt_Impl( sal_UCS4 cChar ) { if (!cChar) -return m_xStandard->get_label(); +return m_sStandard; // convert codepoint value to unicode-hex string sal_UCS4 aStrCodes[32] = { 0, ' ', '(', 'U', '+', '0' }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/inc/optlingu.hxx |5 - cui/source/options/optlingu.cxx | 12 +--- 2 files changed, 13 insertions(+), 4 deletions(-) New commits: commit da9b3b9dba701d23dfcbd90e454c70a7138b698a Author: Caolán McNamara AuthorDate: Fri Jun 5 16:18:50 2020 +0100 Commit: Caolán McNamara CommitDate: Fri Jun 5 20:32:59 2020 +0200 crash on double-clicking an entry in Available language modules tools, options, language settings, writing aids, entry in Available language modules Change-Id: I0146a313cfae206bc9399c964a746dd00cba0fa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95560 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index bc12d3991daa..cbaaaefdf169 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -76,8 +76,9 @@ public: virtual ~SvxEditModulesDlg() override; }; -// class SvxLinguTabPage - +struct ImplSVEvent; +// class SvxLinguTabPage - class SvxLinguTabPage : public SfxTabPage { private: @@ -96,6 +97,8 @@ private: int nUPN_HYPH_MIN_LEADING; int nUPN_HYPH_MIN_TRAILING; +ImplSVEvent* m_nDlbClickEventId; + css::uno::Reference< css::linguistic2::XLinguProperties > xProp; diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 296451e6a380..dd5cda2d9cf4 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -836,6 +836,7 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController* , nUPN_HYPH_MIN_WORD_LENGTH(-1) , nUPN_HYPH_MIN_LEADING(-1) , nUPN_HYPH_MIN_TRAILING(-1) +, m_nDlbClickEventId(nullptr) , m_xLinguModulesFT(m_xBuilder->weld_label("lingumodulesft")) , m_xLinguModulesCLB(m_xBuilder->weld_tree_view("lingumodules")) , m_xLinguModulesEditPB(m_xBuilder->weld_button("lingumodulesedit")) @@ -903,6 +904,11 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController* SvxLinguTabPage::~SvxLinguTabPage() { +if (m_nDlbClickEventId) +{ +Application::RemoveUserEvent(m_nDlbClickEventId); +m_nDlbClickEventId = nullptr; +} pLinguData.reset(); } @@ -1282,13 +1288,12 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) IMPL_LINK(SvxLinguTabPage, BoxDoubleClickHdl_Impl, weld::TreeView&, rBox, bool) { -if ( == m_xLinguModulesCLB.get()) +if ( == m_xLinguModulesCLB.get() && !m_nDlbClickEventId) { //! in order to avoid a bug causing a GPF when double clicking //! on a module entry and exiting the "Edit Modules" dialog //! after that. -Application::PostUserEvent( LINK( -this, SvxLinguTabPage, PostDblClickHdl_Impl ), nullptr, true); +m_nDlbClickEventId = Application::PostUserEvent(LINK(this, SvxLinguTabPage, PostDblClickHdl_Impl)); } else if ( == m_xLinguOptionsCLB.get()) { @@ -1299,6 +1304,7 @@ IMPL_LINK(SvxLinguTabPage, BoxDoubleClickHdl_Impl, weld::TreeView&, rBox, bool) IMPL_LINK_NOARG(SvxLinguTabPage, PostDblClickHdl_Impl, void*, void) { +m_nDlbClickEventId = nullptr; ClickHdl_Impl(*m_xLinguModulesEditPB); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits