svx/source/tbxctrls/fontworkgallery.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 49433bb67d8602898cdeaed87eb0ebfa4ec3058f Author: Caolán McNamara <[email protected]> AuthorDate: Tue Oct 26 09:32:05 2021 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Oct 26 20:52:42 2021 +0200 Related: tdf#145296 use last spacing value as default for custom so its not always 100% in the custom value dialog, but whatever is the current spacing value Change-Id: I7a2690b2a38d2c49652830ad65d5dcf7bc80ba90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124171 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index a0071644d09f..754209a06760 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -477,6 +477,7 @@ private: std::unique_ptr<weld::ToggleButton> mxVeryLoose; std::unique_ptr<weld::ToggleButton> mxCustom; std::unique_ptr<weld::CheckButton> mxKernPairs; + sal_Int32 mnCharacterSpacing; bool mbSettingValue; DECL_LINK( KernSelectHdl, weld::Toggleable&, void ); @@ -501,6 +502,7 @@ FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::PopupWindowC , mxVeryLoose(m_xBuilder->weld_toggle_button("veryloose")) , mxCustom(m_xBuilder->weld_toggle_button("custom")) , mxKernPairs(m_xBuilder->weld_check_button("kernpairs")) + , mnCharacterSpacing(0) , mbSettingValue(false) { mxVeryTight->connect_clicked(LINK(this, FontworkCharacterSpacingWindow, SelectHdl)); @@ -568,6 +570,8 @@ void FontworkCharacterSpacingWindow::implSetCharacterSpacing( sal_Int32 nCharact !mxLoose->get_active() && !mxVeryLoose->get_active()); + mnCharacterSpacing = nCharacterSpacing; + mbSettingValue = bSettingValue; } @@ -640,7 +644,7 @@ IMPL_LINK(FontworkCharacterSpacingWindow, SelectHdl, weld::Button&, rButton, voi { Sequence< PropertyValue > aArgs( 1 ); aArgs[0].Name = OUString(gsFontworkCharacterSpacing).copy(5); - aArgs[0].Value <<= sal_Int32(100); + aArgs[0].Value <<= mnCharacterSpacing; rtl::Reference<svt::PopupWindowController> xControl(mxControl); xControl->EndPopupMode();
