core.git: basctl/inc basctl/Library_basctl.mk basctl/sdi basctl/source basctl/uiconfig

2024-01-23 Thread Rafael Lima (via logerrit)
 basctl/Library_basctl.mk  |1 
 basctl/inc/strings.hrc|1 
 basctl/sdi/baside.sdi |1 
 basctl/source/basicide/LineStatusControl.cxx  |   45 
 basctl/source/basicide/baside2.cxx|   12 +++
 basctl/source/basicide/basidesh.cxx   |2 
 basctl/source/basicide/moduldl2.cxx   |   31 +++-
 basctl/source/basicide/moduldlg.hxx   |8 +-
 basctl/source/inc/LineStatusControl.hxx   |   30 
 basctl/uiconfig/basicide/ui/gotolinedialog.ui |   92 +++---
 10 files changed, 162 insertions(+), 61 deletions(-)

New commits:
commit d9d9ec70395ed5ad8ac4b985b8c9215af7436258
Author: Rafael Lima 
AuthorDate: Mon Jan 15 18:08:12 2024 +0100
Commit: Rafael Lima 
CommitDate: Tue Jan 23 12:11:33 2024 +0100

tdf#158749 Open "Go to Line" dialog from the statusbar in Basic IDE

With this change, if the user clicks the StatusGetPosition item in the 
status bar, the Go To Line dialog will be shown.

Change-Id: Iba75e2dbf6ba83fce24e1af237bdf9813d4ecb69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162108
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index 13d3bce29e41..cb41fa9e461c 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -95,6 +95,7 @@ $(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/basicide/iderdll \
basctl/source/basicide/layout \
basctl/source/basicide/linenumberwindow \
+   basctl/source/basicide/LineStatusControl \
basctl/source/basicide/localizationmgr \
basctl/source/basicide/macrodlg \
basctl/source/basicide/moduldl2 \
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc
index 44efc2f52ed8..ee83fbb543b0 100644
--- a/basctl/inc/strings.hrc
+++ b/basctl/inc/strings.hrc
@@ -113,6 +113,7 @@
 #define RID_STR_READONLYNC_("RID_STR_READONLY", 
"Read-only")
 #define RID_STR_MODULE_READONLY NC_("RID_STR_READONLY_WARNING", 
"This module is read-only and cannot be edited.")
 #define RID_STR_DIALOG_READONLY NC_("RID_STR_READONLY_WARNING", 
"This dialog is read-only and cannot be edited.")
+#define RID_LINE_STATUS_CONTROL NC_("RID_LINE_STATUS_CONTROL", 
"Current line and character. Click to open 'Go to Line' dialog.")
 
 // Color scheme names
 #define RID_STR_COLORSCHEME_DEFAULT NC_("RID_STR_COLORSCHEME_DEFAULT", 
"Default")
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 40ddd8b3bfd7..74b425cf6db4 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -618,6 +618,7 @@ shell basctl_Shell
 
 SID_BASICIDE_STAT_POS
 [
+ExecMethod  = ExecuteGlobal;
 StateMethod = GetState;
 ]
 
diff --git a/basctl/source/basicide/LineStatusControl.cxx 
b/basctl/source/basicide/LineStatusControl.cxx
new file mode 100644
index ..fd716b3901f7
--- /dev/null
+++ b/basctl/source/basicide/LineStatusControl.cxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace basctl
+{
+SFX_IMPL_STATUSBAR_CONTROL(LineStatusControl, SfxStringItem);
+
+LineStatusControl::LineStatusControl(sal_uInt16 _nSlotId, sal_uInt16 _nId, 
StatusBar& rStb)
+: SfxStatusBarControl(_nSlotId, _nId, rStb)
+{
+}
+
+LineStatusControl::~LineStatusControl() {}
+
+void LineStatusControl::StateChangedAtStatusBarControl(sal_uInt16 /*nSID*/, 
SfxItemState eState,
+   const SfxPoolItem* 
pState)
+{
+if (eState == SfxItemState::DEFAULT)
+{
+// Can access pState
+GetStatusBar().SetItemText(GetId(), static_cast(pState)->GetValue());
+GetStatusBar().SetQuickHelpText(GetId(), 
IDEResId(RID_LINE_STATUS_CONTROL));
+}
+else
+{
+GetStatusBar().SetItemText(GetId(), u""_ustr);
+GetStatusBar().SetQuickHelpText(GetId(), u""_ustr);
+}
+}
+
+} // namespace basctl
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 74c25d6f4631..98f016a57236 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include "moduldlg.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -1027,12 +1028,15 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
 break;
 case SID_GOTOLINE:
 {
-GotoLineDialog aGotoDlg(GetFrameWeld());
+

core.git: basctl/inc basctl/Library_basctl.mk basctl/sdi basctl/source basctl/uiconfig basctl/UIConfig_basicide.mk include/sfx2 officecfg/registry svx/sdi

2024-01-08 Thread Rafael Lima (via logerrit)
 basctl/Library_basctl.mk  |2 
 basctl/UIConfig_basicide.mk   |1 
 basctl/inc/strings.hrc|9 
 basctl/sdi/baside.sdi |6 
 basctl/source/basicide/BasicColorConfig.cxx   |  114 

 basctl/source/basicide/ColorSchemeDialog.cxx  |  148 
+
 basctl/source/basicide/baside2.cxx|  153 
+++--
 basctl/source/basicide/baside2.hxx|   14 
 basctl/source/basicide/basides1.cxx   |   53 +
 basctl/source/basicide/basidesh.cxx   |4 
 basctl/source/inc/BasicColorConfig.hxx|   99 
+++
 basctl/source/inc/ColorSchemeDialog.hxx   |   57 ++
 basctl/source/inc/basidesh.hxx|6 
 basctl/source/inc/colorscheme.hxx |   44 +
 basctl/uiconfig/basicide/menubar/menubar.xml  |1 
 basctl/uiconfig/basicide/ui/colorscheme.ui|  214 
+++
 include/sfx2/sfxsids.hrc  |1 
 officecfg/registry/data/org/openoffice/Office/BasicIDE.xcu|  284 
++
 officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu |8 
 officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs  |  122 

 svx/sdi/svx.sdi   |   17 
 21 files changed, 1300 insertions(+), 57 deletions(-)

New commits:
commit 076e21f4e3c47f8be5218ab683f972eef1de3e18
Author: Rafael Lima 
AuthorDate: Wed Aug 23 15:23:25 2023 +0200
Commit: Rafael Lima 
CommitDate: Mon Jan 8 19:13:38 2024 +0100

tdf#156925 Add Color Scheme selector to the Basic IDE

This patch implements a color scheme selector for the Basic IDE. With this 
new feature the user can either:
1) Choose to stick with "Application Colors", meaning that the colors 
defined in "Tools - Options - Application Colors" are applied.
2) Use one of the available color schemes in the dialog

To access the color scheme dialog, go to View - Color Scheme.

A color schema was defined in the "BasicIDE.xcs" file and six color schemes 
were defined in "BasicIDE.xcu" to be shipped with LibreOffice.

This way, it is possible to install more color schemes via extensions;

Change-Id: I5d382d19f982d02ba3c0fda5d1596aed2c38f13c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155928
Tested-by: Jenkins
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 
Reviewed-by: Andreas Heinisch 
Reviewed-by: Rafael Lima 

diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index bbd9a0047578..13d3bce29e41 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -99,6 +99,8 @@ $(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/basicide/macrodlg \
basctl/source/basicide/moduldl2 \
basctl/source/basicide/moduldlg \
+   basctl/source/basicide/BasicColorConfig \
+   basctl/source/basicide/ColorSchemeDialog \
basctl/source/basicide/ObjectCatalog \
basctl/source/basicide/sbxitem \
basctl/source/basicide/scriptdocument \
diff --git a/basctl/UIConfig_basicide.mk b/basctl/UIConfig_basicide.mk
index 2c23fbfb58af..217ea6c01708 100644
--- a/basctl/UIConfig_basicide.mk
+++ b/basctl/UIConfig_basicide.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\
basctl/uiconfig/basicide/ui/basicmacrodialog \
basctl/uiconfig/basicide/ui/breakpointmenus \
basctl/uiconfig/basicide/ui/codecomplete \
+   basctl/uiconfig/basicide/ui/colorscheme \
basctl/uiconfig/basicide/ui/combobox \
basctl/uiconfig/basicide/ui/defaultlanguage \
basctl/uiconfig/basicide/ui/deletelangdialog \
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc
index 324b6ba1d44b..44efc2f52ed8 100644
--- a/basctl/inc/strings.hrc
+++ b/basctl/inc/strings.hrc
@@ -114,6 +114,15 @@
 #define RID_STR_MODULE_READONLY NC_("RID_STR_READONLY_WARNING", 
"This module is read-only and cannot be edited.")
 #define RID_STR_DIALOG_READONLY NC_("RID_STR_READONLY_WARNING", 
"This dialog is read-only and cannot be edited.")
 
+// Color scheme names
+#define RID_STR_COLORSCHEME_DEFAULT NC_("RID_STR_COLORSCHEME_DEFAULT", 
"Default")
+#define RID_STR_COLORSCHEME_LIGHT   NC_("RID_STR_COLORSCHEME_LIGHT", 
"%PRODUCTNAME Light")
+#define RID_STR_COLORSCHEME_DARKNC_("RID_STR_COLORSCHEME_DARK", 
"%PRODUCTNAME Dark")
+#define RID_STR_COLORSCHEME_BREEZE_LIGHT
NC_("RID_STR_COLORSCHEME_BREEZE_LIGHT", "Breeze Light")
+#define