diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-26 09:32:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-26 20:52:42 +0200 |
commit | 49433bb67d8602898cdeaed87eb0ebfa4ec3058f (patch) | |
tree | b8c5ae69152799aae9f57d7aa8050d955243959a /svx/source/tbxctrls/fontworkgallery.cxx | |
parent | 5714eb5fe369672cde2459e8fe4ec0169190dff0 (diff) |
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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/tbxctrls/fontworkgallery.cxx')
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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(); |