summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/basides1.cxx
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2022-12-05 11:33:32 +0000
committerJim Raykowski <raykowj@gmail.com>2022-12-08 08:25:16 +0000
commitbe6024a2d4fc11c908aeb29b58ce33f851dab6bc (patch)
tree294e8a3a5efa068871aeee13ef0572aa012b5841 /basctl/source/basicide/basides1.cxx
parent705b2924a14841883b4a8cac549f7af326d7a185 (diff)
tdf#152078 Enable Ctrl+Wheel zoom in Basic code editor
Change-Id: Ic68ae67c311a83e4003da2ca7486fcbf6698bdc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143584 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'basctl/source/basicide/basides1.cxx')
-rw-r--r--basctl/source/basicide/basides1.cxx21
1 files changed, 3 insertions, 18 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 490a4dc0b0e3..fd0fb7acccff 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -770,23 +770,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if ( pArgs && pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) == SfxItemState::SET )
- {
- nCurrentZoomSliderValue = static_cast<const SvxZoomSliderItem*>(pItem)->GetValue();
- // Apply zoom to all open windows
- for (auto const& window : aWindowTable)
- {
- ModulWindow* pModuleWindow = dynamic_cast<ModulWindow*>(window.second.get());
- if (pModuleWindow)
- {
- EditorWindow& pEditorWindow = pModuleWindow->GetEditorWindow();
- pEditorWindow.SetEditorZoomLevel(nCurrentZoomSliderValue);
- }
- }
-
- if (SfxBindings* pBindings = GetBindingsPtr())
- pBindings->Invalidate( SID_BASICIDE_CURRENT_ZOOM );
- }
+ if (pArgs && pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) == SfxItemState::SET)
+ SetGlobalEditorZoomLevel(static_cast<const SvxZoomSliderItem*>(pItem)->GetValue());
}
break;
@@ -1046,7 +1031,7 @@ void Shell::GetState(SfxItemSet &rSet)
if (pModuleWindow)
{
OUString sZoom;
- sZoom = OUString::number(nCurrentZoomSliderValue) + "%";
+ sZoom = OUString::number(m_nCurrentZoomSliderValue) + "%";
SfxStringItem aItem( SID_BASICIDE_CURRENT_ZOOM, sZoom );
rSet.Put( aItem );
}