[Libreoffice-commits] core.git: basctl/sdi basctl/source basctl/uiconfig include/sfx2 officecfg/registry sfx2/sdi

2023-02-23 Thread Rafael Lima (via logerrit)
 basctl/sdi/baside.sdi|   12 ++
 basctl/source/basicide/baside2.cxx   |   12 ++
 basctl/source/basicide/baside2.hxx   |4 
 basctl/source/basicide/basides1.cxx  |   58 
+-
 basctl/uiconfig/basicide/menubar/menubar.xml |2 
 include/sfx2/sfxsids.hrc |2 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   16 ++
 sfx2/sdi/sfx.sdi |   37 
++
 8 files changed, 142 insertions(+), 1 deletion(-)

New commits:
commit 11c69c57f045f364dd7466f49d9de5408b6a02b4
Author: Rafael Lima 
AuthorDate: Sun Feb 19 20:37:51 2023 -0300
Commit: Rafael Lima 
CommitDate: Thu Feb 23 12:34:21 2023 +

tdf#146518 Implement commands to toggle Watch/Stack windows

This patch implements the new .uno:WatchWindow and .uno:StackWindow 
commands in the Basic IDE to allow the user to toggle the Watch/Stack windows.

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

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 0d32339fc833..9e7229ca9712 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -248,6 +248,18 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
+SID_BASICIDE_WATCH
+[
+ExecMethod  = ExecuteGlobal;
+StateMethod = GetState;
+]
+
+SID_BASICIDE_STACK
+[
+ExecMethod  = ExecuteGlobal;
+StateMethod = GetState;
+]
+
 SID_BASICIDE_CREATEMACRO
 [
 ExecMethod  = ExecuteGlobal;
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index ad1dd3682b22..1df230f9bd92 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1511,6 +1511,18 @@ void ModulWindowLayout::BasicRemoveWatch ()
 aWatchWindow->RemoveSelectedWatch();
 }
 
+void ModulWindowLayout::ShowWatchWindow(bool bVisible)
+{
+aWatchWindow->Show(bVisible);
+ArrangeWindows();
+}
+
+void ModulWindowLayout::ShowStackWindow(bool bVisible)
+{
+aStackWindow->Show(bVisible);
+ArrangeWindows();
+}
+
 void ModulWindowLayout::OnFirstSize (tools::Long const nWidth, tools::Long 
const nHeight)
 {
 AddToLeft(, Size(nWidth * 0.20, nHeight * 0.75));
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 9a8700aecf3a..73b98ef7412e 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -409,6 +409,10 @@ public:
 public:
 void BasicAddWatch (OUString const&);
 void BasicRemoveWatch ();
+void ShowWatchWindow(bool bVisible);
+void ShowStackWindow(bool bVisible);
+bool IsWatchWindowVisible() { return aWatchWindow->IsVisible(); }
+bool IsStackWindowVisible() { return aStackWindow->IsVisible(); }
 Color const & GetSyntaxBackgroundColor () const { return 
aSyntaxColors.GetBackgroundColor(); }
 Color const & GetFontColor () const { return aSyntaxColors.GetFontColor(); 
}
 Color const & GetSyntaxColor (TokenType eType) const { return 
aSyntaxColors.GetColor(eType); }
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 5e985211aa42..66820cd21881 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -430,6 +430,30 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 pBindings->Invalidate(SID_BASICIDE_OBJCAT);
 break;
 
+case SID_BASICIDE_WATCH:
+{
+// Toggling the watch window can only be done from a ModulWindow
+if (!dynamic_cast(pLayout.get()))
+return;
+
+
pModulLayout->ShowWatchWindow(!pModulLayout->IsWatchWindowVisible());
+if (SfxBindings* pBindings = GetBindingsPtr())
+pBindings->Invalidate(SID_BASICIDE_WATCH);
+}
+break;
+
+case SID_BASICIDE_STACK:
+{
+// Toggling the stack window can only be done from a ModulWindow
+if (!dynamic_cast(pLayout.get()))
+return;
+
+
pModulLayout->ShowStackWindow(!pModulLayout->IsStackWindowVisible());
+if (SfxBindings* pBindings = GetBindingsPtr())
+pBindings->Invalidate(SID_BASICIDE_STACK);
+}
+break;
+
 case SID_BASICIDE_NAMECHANGEDONTAB:
 {
 DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
@@ -875,12 +899,44 @@ void Shell::GetState(SfxItemSet )
 rSet.DisableItem( nWh );
 }
 break;
+
 case SID_BASICIDE_OBJCAT:
+{
 if (pLayout)
 rSet.Put(SfxBoolItem(nWh, 

[Libreoffice-commits] core.git: basctl/sdi basctl/source

2023-02-22 Thread Rafael Lima (via logerrit)
 basctl/sdi/baside.sdi   |   12 +++
 basctl/source/basicide/basides1.cxx |   38 
 2 files changed, 50 insertions(+)

New commits:
commit 943b8b45d80e295b1333fdc28bc8cf7ca8f95902
Author: Rafael Lima 
AuthorDate: Sun Feb 12 17:15:52 2023 -0300
Commit: Rafael Lima 
CommitDate: Wed Feb 22 13:36:30 2023 +

tdf#153572 Implement .uno:ZoomPlus and .uno:ZoomMinus in the Basic IDE

This patch implements the commands .uno:ZoomPlus and .uno:ZoomMinus in the 
Basic IDE to allow the user to zoom in/out of the code editor. With these 
commands it is possible to create a keyboard shortcut for zooming in/out.

Notice that this patch only implements the commands, but it does not create 
a default shortcut, since defining which shortcut should be used needs to be 
discussed first.

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

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index c1fc9b4f39e3..0d32339fc833 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -337,6 +337,18 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
+SID_ZOOM_IN
+[
+ExecMethod  = ExecuteGlobal;
+StateMethod = GetState;
+]
+
+SID_ZOOM_OUT
+[
+ExecMethod  = ExecuteGlobal;
+StateMethod = GetState;
+]
+
 SID_BASICIDE_CURRENT_ZOOM
 [
 StateMethod = GetState;
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index c690dccddc54..5e985211aa42 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -58,6 +58,7 @@
 #include 
 #include 
 #include 
+#include 
 
 constexpr sal_Int32 TAB_HEIGHT_MARGIN = 10;
 
@@ -68,6 +69,17 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 
+static void lcl_InvalidateZoomSlots(SfxBindings* pBindings)
+{
+if (!pBindings)
+return;
+
+static sal_uInt16 const aInval[] = {
+SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, 0
+};
+pBindings->Invalidate(aInval);
+}
+
 void Shell::ExecuteSearch( SfxRequest& rReq )
 {
 if ( !pCurWin )
@@ -771,6 +783,22 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 
 if (pArgs && pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true,  
) == SfxItemState::SET)
 SetGlobalEditorZoomLevel(static_cast(pItem)->GetValue());
+
+lcl_InvalidateZoomSlots(GetBindingsPtr());
+}
+break;
+
+case SID_ZOOM_IN:
+case SID_ZOOM_OUT:
+{
+const sal_uInt16 nOldZoom = GetCurrentZoomSliderValue();
+sal_uInt16 nNewZoom;
+if (nSlot == SID_ZOOM_IN)
+nNewZoom = std::min(GetMaxZoom(), 
basegfx::zoomtools::zoomIn(nOldZoom));
+else
+nNewZoom = std::max(GetMinZoom(), 
basegfx::zoomtools::zoomOut(nOldZoom));
+SetGlobalEditorZoomLevel(nNewZoom);
+lcl_InvalidateZoomSlots(GetBindingsPtr());
 }
 break;
 
@@ -1137,6 +1165,16 @@ void Shell::GetState(SfxItemSet )
 }
 break;
 
+case SID_ZOOM_IN:
+case SID_ZOOM_OUT:
+{
+const sal_uInt16 nCurrentZoom = GetCurrentZoomSliderValue();
+if ((nWh == SID_ZOOM_IN && nCurrentZoom >= GetMaxZoom()) ||
+(nWh == SID_ZOOM_OUT && nCurrentZoom <= GetMinZoom()))
+rSet.DisableItem(nWh);
+}
+break;
+
 case SID_ATTR_ZOOMSLIDER:
 {
 // The zoom slider is only visible in a module window


[Libreoffice-commits] core.git: basctl/sdi basctl/source basctl/uiconfig include/sfx2 sfx2/sdi

2022-12-01 Thread Rafael Lima (via logerrit)
 basctl/sdi/baside.sdi|   11 
 basctl/source/basicide/baside2.hxx   |4 +
 basctl/source/basicide/baside2b.cxx  |   36 ++-
 basctl/source/basicide/basides1.cxx  |   54 +++
 basctl/source/basicide/basidesh.cxx  |   26 +++
 basctl/source/basicide/linenumberwindow.cxx  |5 +-
 basctl/source/inc/basidesh.hxx   |   13 +
 basctl/uiconfig/basicide/statusbar/statusbar.xml |2 
 include/sfx2/sfxsids.hrc |1 
 sfx2/sdi/sfx.sdi |   19 
 10 files changed, 165 insertions(+), 6 deletions(-)

New commits:
commit 0d9231f2133def9254e0220b8033a46e5fc17658
Author: Rafael Lima 
AuthorDate: Wed Nov 23 22:35:59 2022 +0100
Commit: Rafael Lima 
CommitDate: Thu Dec 1 12:33:45 2022 +0100

tdf#152078 Add a Zoom slider to the Basic IDE

This patch adds a ZoomSlider to thee Basic IDE. It has the following 
characteristics:
- The Zoom varies from 50% to 400% considering that 100% is the font size 
defined in Tools - Options - Fonts dialog.
- All open editor windows use the same Zoom factor
- The zoom level is saved and restored across sessions

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

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 192b6cdc06c4..c1fc9b4f39e3 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -331,6 +331,16 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
+SID_ATTR_ZOOMSLIDER
+[
+ExecMethod  = ExecuteGlobal;
+StateMethod = GetState;
+]
+
+SID_BASICIDE_CURRENT_ZOOM
+[
+StateMethod = GetState;
+]
 
 // Only, when BasicWindow up
 
@@ -657,4 +667,3 @@ shell basctl_DocShell
 {
 import BasicIDEDocument;
 }
-
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 38ca2aec6ea7..969f823b91a1 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -97,6 +97,7 @@ private:
 
 voidImpDoHighlight( sal_uInt32 nLineOff );
 voidImplSetFont();
+sal_uInt16  nCurrentZoomLevel;
 
 boolbHighlighting;
 boolbDoSyntaxHighlight;
@@ -154,6 +155,9 @@ public:
 voidChangeFontColor( Color aColor );
 voidUpdateSyntaxHighlighting ();
 
+voidSetEditorZoomLevel(sal_uInt16 nNewZoomLevel);
+sal_uInt16  GetCurrentZoom() { return nCurrentZoomLevel; }
+
 boolGetProcedureName(std::u16string_view rLine, OUString& 
rProcType, OUString& rProcName) const;
 
 FactoryFunction GetUITestFactory() const override;
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 2f768ed3077c..89edcec40f32 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -262,6 +263,10 @@ EditorWindow::EditorWindow (vcl::Window* pParent, 
ModulWindow* pModulWindow) :
 std::unique_lock g(mutex_);
 notifier_ = n;
 }
+
+// The zoom level applied to the editor window is the zoom slider value in 
the shell
+nCurrentZoomLevel = GetShell()->GetCurrentZoomSliderValue();
+
 const Sequence aPropertyNames{"FontHeight", "FontName"};
 n->addPropertiesChangeListener(aPropertyNames, listener_);
 }
@@ -1232,6 +1237,7 @@ void EditorWindow::UpdateSyntaxHighlighting ()
 
 void EditorWindow::ImplSetFont()
 {
+// Get default font name and height defined in the Options dialog
 OUString 
sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().value_or(OUString()));
 if (sFontName.isEmpty())
 {
@@ -1240,7 +1246,12 @@ void EditorWindow::ImplSetFont()
 
GetDefaultFontFlags::NONE, GetOutDev()));
 sFontName = aTmpFont.GetFamilyName();
 }
-Size aFontSize(0, 
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
+sal_uInt16 nDefaultFontHeight = 
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get();
+
+// Calculate font size considering zoom level
+sal_uInt16 nNewFontHeight = nDefaultFontHeight * 
(static_cast(nCurrentZoomLevel) / 100);
+Size aFontSize(0, nNewFontHeight);
+
 vcl::Font aFont(sFontName, aFontSize);
 aFont.SetColor(rModulWindow.GetLayout().GetFontColor());
 SetPointFont(*GetOutDev(), aFont); // FIXME RenderContext
@@ -1248,6 +1259,7 @@ void EditorWindow::ImplSetFont()
 
 rModulWindow.GetBreakPointWindow().SetFont(aFont);
 rModulWindow.GetLineNumberWindow().SetFont(aFont);
+

[Libreoffice-commits] core.git: basctl/sdi basctl/source dbaccess/source framework/source include/sfx2 officecfg/registry sfx2/sdi sfx2/source

2020-07-27 Thread Maxim Monastirsky (via logerrit)
 basctl/sdi/baside.sdi  |6 
 basctl/source/basicide/basides1.cxx|   16 
 dbaccess/source/ui/app/AppController.cxx   |   17 
 framework/source/uielement/popuptoolbarcontroller.cxx  |  174 
+++---
 include/sfx2/app.hxx   |1 
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |9 
 sfx2/sdi/appslots.sdi  |1 
 sfx2/source/appl/appopen.cxx   |4 
 8 files changed, 103 insertions(+), 125 deletions(-)

New commits:
commit 2446fdba3ec4a81d6e3b619a1d9e91b3c6dcbd54
Author: Maxim Monastirsky 
AuthorDate: Sun Jul 26 12:35:11 2020 +0300
Commit: Maxim Monastirsky 
CommitDate: Tue Jul 28 00:44:46 2020 +0200

tdf#134887 Rework last item handling in NewToolbarController

Just store the last used menu id, and consistently get all the
information (command name, image id, target frame etc.) from the menu
instance. Also implement the XSubToolbarController interface, so we get
a chance to update the image on icon size or theme change.

The initial action and icon of the button are based on the url passed
by the .uno:AddDirect status update, given that there is a corresponding
menu item. The only defined fallback now is to .uno:AddDirect itself for
both executing and getting the icon, but this shouldn't happen normally,
as I fixed all the affected cases I found so far, namely Base (including
windows like table design etc.) and the Basic IDE.

Actually these cases were partially broken anyway, and as a result now
completely fixed:

- In Base main app window, the button used to default to a new Writer
document, although its tooltip advertises Ctrl+N as the kb shortcut, and
pressing that shortcut actually opens the database creation wizard (as
expected).

- In the Basic IDE, the button was working, but not the Ctrl+N shortcut.

Change-Id: I6537b3f38e7d7001ec1b39d78285445464fd8cbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99514
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 447e5ad6fd71..455924549556 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -206,6 +206,12 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
+SID_NEWDOCDIRECT
+[
+ExecMethod  = ExecuteGlobal;
+StateMethod = GetState;
+]
+
 SID_SAVEDOC
 [
 ExecMethod  = ExecuteGlobal;
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 12399e823019..e42ad914390a 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -270,6 +271,14 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 sal_uInt16 nSlot = rReq.GetSlot();
 switch ( nSlot )
 {
+case SID_NEWDOCDIRECT:
+{
+// we do not have a new document factory,
+// so just forward to a fallback method.
+SfxGetpApp()->ExecuteSlot(rReq);
+}
+break;
+
 case SID_BASICSTOP:
 {
 // maybe do not simply stop if on breakpoint!
@@ -770,6 +779,13 @@ void Shell::GetState(SfxItemSet )
 {
 switch ( nWh )
 {
+case SID_NEWDOCDIRECT:
+{
+// we do not have a new document factory,
+// so just forward to a fallback method.
+SfxGetpApp()->GetSlotState(nWh, nullptr, );
+}
+break;
 case SID_DOCINFO:
 {
 rSet.DisableItem( nWh );
diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index b7036d149e25..958d5d9c7b4f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -532,6 +532,10 @@ FeatureState OApplicationController::GetState(sal_uInt16 
_nId) const
 {
 switch (_nId)
 {
+case SID_NEWDOCDIRECT:
+aReturn.bEnabled = true;
+aReturn.sTitle = "private:factory/sdatabase";
+break;
 case SID_OPENURL:
 aReturn.bEnabled = true;
 if ( m_xModel.is() )
@@ -1031,17 +1035,25 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 }
 }
 break;
+case SID_NEWDOCDIRECT:
 case SID_OPENDOC:
 {
 Reference < XDispatchProvider > xProv( getFrame(), 
UNO_QUERY );
 if ( xProv.is() )
 {
 URL aURL;
-

[Libreoffice-commits] core.git: basctl/sdi basctl/source chart2/source filter/source include/IwyuFilter_include.yaml include/svx oox/source reportdesign/source sc/sdi sc/source sd/qa sd/sdi sd/source

2019-06-11 Thread Gabor Kelemen (via logerrit)
 basctl/sdi/basslots.hrc  |
1 
 basctl/source/dlged/dlged.cxx|
2 +
 basctl/source/dlged/dlgedobj.cxx |
1 
 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx |
1 
 chart2/source/controller/main/ChartController_Tools.cxx  |
1 
 chart2/source/controller/sidebar/ChartLinePanel.cxx  |
1 
 filter/source/msfilter/msdffimp.cxx  |
2 +
 filter/source/msfilter/svdfppt.cxx   |
3 ++
 filter/source/svg/svgexport.cxx  |
1 
 include/IwyuFilter_include.yaml  |
9 
 include/svx/SvxNumOptionsTabPageHelper.hxx   |
3 --
 include/svx/SvxPresetListBox.hxx |
3 --
 include/svx/SvxShapeTypes.hxx|
3 --
 include/svx/sdr/contact/objectcontactofobjlistpainter.hxx|
1 
 include/svx/srchdlg.hxx  |
1 
 include/svx/svdetc.hxx   |
2 -
 include/svx/svdhdl.hxx   |
5 
 include/svx/svditer.hxx  |
1 
 include/svx/svdlayer.hxx |
1 
 include/svx/svdmark.hxx  |
1 
 include/svx/svdmodel.hxx |   
11 +-
 include/svx/svdoattr.hxx |
4 ---
 include/svx/svdobj.hxx   |
6 -
 include/svx/svdopath.hxx |
2 -
 include/svx/svdotext.hxx |
4 ---
 include/svx/svdoutl.hxx  |
2 -
 include/svx/svdpage.hxx  |
9 +---
 include/svx/svdpagv.hxx  |
2 -
 include/svx/svdpntv.hxx  |
1 
 include/svx/svdpool.hxx  |
1 
 include/svx/svdtrans.hxx |
5 +---
 include/svx/svdundo.hxx  |
1 
 include/svx/svdview.hxx  |
3 --
 include/svx/svdviter.hxx |
1 
 include/svx/svxdlg.hxx   |
1 
 include/svx/svxids.hrc   |
3 --
 include/svx/swframeexample.hxx   |
1 
 include/svx/swframeposstrings.hxx|
1 
 include/svx/swframevalidation.hxx|
1 
 include/svx/sxcaitm.hxx  |
1 
 include/svx/sxelditm.hxx |
1 
 include/svx/sxmuitm.hxx  |
2 -
 include/svx/transfrmhelper.hxx   |
1 
 oox/source/drawingml/shape.cxx   |
1 
 oox/source/shape/WpsContext.cxx  |
1 
 oox/source/vml/vmlshape.cxx  |
1 
 reportdesign/source/core/sdr/UndoEnv.cxx |
2 +
 reportdesign/source/ui/misc/UITools.cxx  |
1 
 reportdesign/source/ui/report/ReportController.cxx   |
2 +
 sc/sdi/scslots.hrc   |
1 
 sc/source/core/data/postit.cxx   |
1 
 sc/source/filter/excel/xeescher.cxx  |
1 
 sc/source/filter/excel/xiescher.cxx  |
4 +++
 sc/source/ui/app/typemap.cxx |
1 
 sc/source/ui/docshell/docsh3.cxx |
1 
 sc/source/ui/drawfunc/fuconcustomshape.cxx   |
1 
 sc/source/ui/pagedlg/tphf.cxx|
1 
 sc/source/ui/view/colrowba.cxx   |
1 
 sc/source/ui/view/drawview.cxx   |
2 +
 sd/qa/unit/dialogs-test.cxx

[Libreoffice-commits] core.git: basctl/sdi basctl/source include/sfx2 officecfg/registry sfx2/sdi

2018-04-21 Thread tagezi
 basctl/sdi/baside.sdi |   27 +-
 basctl/source/basicide/basides1.cxx   |  125 
+++---
 basctl/source/basicide/iderdll.cxx|6 
 basctl/source/basicide/iderdll2.hxx   |5 
 basctl/source/inc/basidesh.hxx|   32 +-
 include/sfx2/sfxsids.hrc  |1 
 officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu |5 
 sfx2/sdi/sfx.sdi  |   18 +
 8 files changed, 154 insertions(+), 65 deletions(-)

New commits:
commit 3322661414a558d29146c40c0cd5e9db0a7b21dd
Author: tagezi 
Date:   Wed Mar 28 21:25:33 2018 +0300

tdf#94498 add repeat search in Basic IDE by shortcut

additionally deduplicate code and remove unnecessary abstraction

Change-Id: Ib826b5cac74e95ce4ae8d02368b0983eb4942b29
Reviewed-on: https://gerrit.libreoffice.org/52027
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
Reviewed-by: Mike Kaganski 

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 180cdf2caa6a..5c413f89e6c4 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -99,30 +99,45 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
-SID_SEARCH_OPTIONS
+SID_GOTOLINE
 [
 ExecMethod  = ExecuteCurrent;
 StateMethod = GetState;
 ]
 
-SID_SEARCH_ITEM
+
+// Search in IDE Basic
+
+SID_SEARCH_OPTIONS
 [
-ExecMethod  = ExecuteCurrent;
+ExecMethod  = ExecuteSearch;
 StateMethod = GetState;
 ]
 
-SID_GOTOLINE
+SID_SEARCH_ITEM
 [
-ExecMethod  = ExecuteCurrent;
+ExecMethod  = ExecuteSearch;
 StateMethod = GetState;
 ]
 
 FID_SEARCH_NOW
 [
-ExecMethod  = ExecuteCurrent;
+ExecMethod  = ExecuteSearch;
 StateMethod = GetState;
 ]
 
+SID_BASICIDE_REPEAT_SEARCH
+[
+ExecMethod  = ExecuteSearch;
+StateMethod = GetState;
+]
+
+FID_SEARCH_ON // status()
+[
+ExecMethod = ExecuteSearch;
+Export = FALSE;
+]
+
 FID_SEARCH_OFF
 [
 ExecMethod  = ExecuteCurrent;
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 95025f859bf9..da1c86f1872d 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -44,7 +44,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -58,40 +57,56 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 
-void Shell::ExecuteCurrent( SfxRequest& rReq )
+void Shell::ExecuteSearch( SfxRequest& rReq )
 {
 if ( !pCurWin )
 return;
 
-switch ( rReq.GetSlot() )
+const SfxItemSet* pArgs = rReq.GetArgs();
+sal_uInt16 nSlot = rReq.GetSlot();
+
+// if searching has not been done before this time
+if (nSlot == SID_BASICIDE_REPEAT_SEARCH && !mpSearchItem)
 {
-case SID_BASICIDE_HIDECURPAGE:
-{
-pCurWin->StoreData();
-RemoveWindow( pCurWin, false );
-}
-break;
-case SID_BASICIDE_RENAMECURRENT:
-{
-pTabBar->StartEditMode( pTabBar->GetCurPageId() );
-}
-break;
+rReq.SetReturnValue(SfxBoolItem(nSlot, false));
+nSlot = 0;
+}
+
+switch ( nSlot )
+{
+case SID_SEARCH_OPTIONS:
+break;
+case SID_SEARCH_ITEM:
+mpSearchItem.reset( static_cast( 
pArgs->Get(SID_SEARCH_ITEM).Clone() ));
+break;
+case FID_SEARCH_ON:
+mbJustOpened = true;
+GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM);
+break;
+case SID_BASICIDE_REPEAT_SEARCH:
 case FID_SEARCH_NOW:
 {
 if (!pCurWin->HasActiveEditor())
 break;
-DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
-SfxItemSet const& rArgs = *rReq.GetArgs();
-// unfortunately I don't know the ID:
-sal_uInt16 nWhich = rArgs.GetWhichByPos( 0 );
-DBG_ASSERT( nWhich, "Which for SearchItem?" );
-SfxPoolItem const& rItem = rArgs.Get(nWhich);
-DBG_ASSERT(dynamic_cast(), "no 
searchitem!");
-SvxSearchItem const& rSearchItem = static_cast(rItem);
-// memorize item because of the adjustments...
-GetExtraData()->SetSearchItem(rSearchItem);
+
+// If it is a repeat searching
+if ( nSlot == SID_BASICIDE_REPEAT_SEARCH )
+{
+if( !mpSearchItem )
+mpSearchItem.reset( new 

[Libreoffice-commits] core.git: basctl/sdi basctl/source

2017-03-28 Thread Jens Carl
 basctl/sdi/baside.sdi   |   10 +-
 basctl/source/basicide/baside2.cxx  |6 +++---
 basctl/source/basicide/baside2b.cxx |6 +++---
 basctl/source/basicide/basides1.cxx |   10 +-
 basctl/source/basicide/basides2.cxx |2 +-
 basctl/source/basicide/basides3.cxx |2 +-
 basctl/source/basicide/basidesh.cxx |4 ++--
 basctl/source/basicide/bastype3.cxx |8 
 basctl/source/basicide/bastypes.cxx |2 +-
 basctl/source/basicide/brkdlg.cxx   |2 +-
 basctl/source/basicide/macrodlg.cxx |6 +++---
 basctl/source/basicide/moduldl2.cxx |8 
 basctl/source/basicide/moduldlg.cxx |   22 +++---
 13 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit a70ae479fe30db77354159d614dcacc87e4142c4
Author: Jens Carl 
Date:   Tue Mar 28 07:50:20 2017 +

tdf#39468 Translate German comments

Translate German comments and terms in basctl/

Change-Id: I9f284af4d92e61b53a3280c151a37b1dcbeed7c4
Reviewed-on: https://gerrit.libreoffice.org/35791
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 6433eccfc53a..180cdf2caa6a 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -25,7 +25,7 @@ shell basctl_Shell
 import BasicIDEView;
 
 
-// Current, je nach aktuellem Fenster:
+// Current, according to current window:
 
 SID_SHOWLINES
 [
@@ -130,7 +130,7 @@ shell basctl_Shell
 ]
 
 
-// Global: Egal, welches Fenster gerade aktiv ist:
+// Global: Whatever, which window is currently active:
 
 SID_BASICIDE_LIBSELECTOR
 [
@@ -209,7 +209,7 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
-// Ab hier normal...
+// From here on normal ...
 SID_BASICIDE_CHOOSEMACRO
 [
 ExecMethod  = ExecuteGlobal;
@@ -312,7 +312,7 @@ shell basctl_Shell
 ]
 
 
-// Nur, wenn BasicFenster oben
+// Only, when BasicWindow up
 
 SID_BASICRUN
 [
@@ -399,7 +399,7 @@ shell basctl_Shell
 ]
 
 
-// Nur, wenn Dialogfenster oben
+// Only, when dialog window up
 
 SID_CHOOSE_CONTROLS
 [
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 7f89adec43ea..bce9ce80480d 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -488,7 +488,7 @@ void ModulWindow::ImportDialog()
 
 void ModulWindow::ToggleBreakPoint( sal_uLong nLine )
 {
-DBG_ASSERT( XModule().is(), "Kein Modul!" );
+DBG_ASSERT( XModule().is(), "No Modul!" );
 
 if ( XModule().is() )
 {
@@ -514,7 +514,7 @@ void ModulWindow::ToggleBreakPoint( sal_uLong nLine )
 for ( sal_uInt16 nMethod = 0; nMethod < 
m_xModule->GetMethods()->Count(); nMethod++ )
 {
 SbMethod* pMethod = 
static_cast(m_xModule->GetMethods()->Get( nMethod ));
-assert(pMethod && "Methode nicht gefunden! (NULL)");
+assert(pMethod && "Method not found! (NULL)");
 pMethod->SetDebugFlags( pMethod->GetDebugFlags() | 
BasicDebugFlags::Break );
 }
 }
@@ -1279,7 +1279,7 @@ void ModulWindow::BasicStarted()
 for ( sal_uInt16 nMethod = 0; nMethod < 
m_xModule->GetMethods()->Count(); nMethod++ )
 {
 SbMethod* pMethod = 
static_cast(m_xModule->GetMethods()->Get( nMethod ));
-assert(pMethod && "Methode nicht gefunden! (NULL)");
+assert(pMethod && "Method not found! (NULL)");
 pMethod->SetDebugFlags( pMethod->GetDebugFlags() | 
BasicDebugFlags::Break );
 }
 }
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index d817a61c8eae..86d6afc49361 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1255,7 +1255,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong 
nPara )
 
 IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl, Timer *, void)
 {
-DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" );
+DBG_ASSERT( pEditView, "Not yet a View, but Syntax-Highlight?!" );
 
 bool const bWasModified = pEditEngine->IsModified();
 //pEditEngine->SetUpdateMode(false);
@@ -1309,7 +1309,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong 
nPara, bool bInserted )
 
 void EditorWindow::CreateProgress( const OUString& rText, sal_uLong nRange )
 {
-DBG_ASSERT( !pProgress, "ProgressInfo existiert schon" );
+DBG_ASSERT( !pProgress, "ProgressInfo exists already" );
 pProgress.reset(new ProgressInfo(
 GetShell()->GetViewFrame()->GetObjectShell(),
 rText,
@@ -2021,7 +2021,7 @@ IMPL_LINK(ComplexEditorWindow, ScrollHdl, ScrollBar *, 
pCurScrollBar, void )
 {
 if 

[Libreoffice-commits] core.git: basctl/sdi basctl/source include/editeng sc/sdi sc/source sd/sdi svx/sdi svx/source sw/sdi sw/source

2017-03-26 Thread Maxim Monastirsky
 basctl/sdi/baside.sdi|  119 +++
 basctl/source/basicide/baside3.cxx   |  364 +--
 basctl/source/basicide/basides1.cxx  |   25 ++
 basctl/source/basicide/basidesh.cxx  |   46 
 basctl/source/basicide/idetemp.hxx   |   57 -
 basctl/source/inc/baside3.hxx|1 
 basctl/source/inc/basidesh.hxx   |2 
 include/editeng/svxenum.hxx  |   10 
 sc/sdi/drawsh.sdi|   11 -
 sc/source/ui/app/typemap.cxx |1 
 sc/source/ui/drawfunc/drawsh5.cxx|7 
 sd/sdi/_drvwsh.sdi   |5 
 svx/sdi/fmslots.sdi  |   10 
 svx/sdi/svx.sdi  |   18 -
 svx/sdi/svxitems.sdi |   42 
 svx/source/form/fmshell.cxx  |6 
 sw/sdi/drwbassh.sdi  |   37 +++
 sw/sdi/wdrwbase.sdi  |   37 +++
 sw/source/uibase/shells/drwbassh.cxx |   16 -
 sw/source/uibase/shells/slotadd.cxx  |1 
 sw/source/uibase/uiview/view2.cxx|9 
 sw/source/uibase/uiview/viewstat.cxx |   21 --
 22 files changed, 419 insertions(+), 426 deletions(-)

New commits:
commit 12c6caa84a61f23df996a0396432fa4b8d5c4785
Author: Maxim Monastirsky 
Date:   Sat Mar 25 22:53:28 2017 +0300

Kill remaining PseudoSlots usage

Change-Id: I14a820b7c0baba8d8b17d07715bf17c42c73c8fb
TODO: Remove support code from idl and sfx2 modules
Reviewed-on: https://gerrit.libreoffice.org/35718
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index e61f737e0e14..f4993919e5ae 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -409,6 +409,125 @@ shell basctl_Shell
 
 SID_CHOOSE_CONTROLS
 [
+StateMethod = GetState;
+]
+SID_INSERT_PUSHBUTTON
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_CHECKBOX
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_RADIOBUTTON
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_SPINBUTTON
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_FIXEDTEXT
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_GROUPBOX
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_LISTBOX
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_COMBOBOX
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_EDIT
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_HSCROLLBAR
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_VSCROLLBAR
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_SELECT
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_IMAGECONTROL
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_PROGRESSBAR
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_HFIXEDLINE
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_VFIXEDLINE
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_DATEFIELD
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_TIMEFIELD
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_NUMERICFIELD
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_CURRENCYFIELD
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_FORMATTEDFIELD
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_PATTERNFIELD
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_FILECONTROL
+[
+ExecMethod  = ExecuteDialog;
+StateMethod = GetState;
+]
+SID_INSERT_TREECONTROL
+[
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 821c34176072..ffccb5e2f1cb 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -29,7 +29,6 @@
 #include 

[Libreoffice-commits] core.git: basctl/sdi basctl/source

2014-02-25 Thread Alexander Wilms
 basctl/sdi/baside.sdi  |   16 -
 basctl/sdi/basslots.sdi|2 -
 basctl/source/basicide/basicbox.cxx|8 ++--
 basctl/source/basicide/basicbox.hxx|2 -
 basctl/source/basicide/baside2.cxx |   18 +-
 basctl/source/basicide/baside2b.cxx|   36 ++---
 basctl/source/basicide/baside3.cxx |6 +--
 basctl/source/basicide/bastype2.cxx|6 +--
 basctl/source/basicide/bastypes.cxx|   30 -
 basctl/source/basicide/documentenumeration.hxx |   16 -
 basctl/source/basicide/iderdll.cxx |6 +--
 basctl/source/basicide/layout.cxx  |6 +--
 basctl/source/basicide/layout.hxx  |4 +-
 basctl/source/basicide/macrodlg.hxx|2 -
 basctl/source/basicide/moduldlg.cxx|   18 +-
 basctl/source/basicide/objdlg.hxx  |4 +-
 basctl/source/basicide/scriptdocument.cxx  |   12 +++
 basctl/source/dlged/dlged.cxx  |8 ++--
 basctl/source/dlged/dlgresid.src   |2 -
 basctl/source/inc/accessibledialogcontrolshape.hxx |4 +-
 basctl/source/inc/accessibledialogwindow.hxx   |4 +-
 basctl/source/inc/baside3.hxx  |4 +-
 basctl/source/inc/bastypes.hxx |   12 +++
 basctl/source/inc/dlged.hxx|8 ++--
 basctl/source/inc/dlgedclip.hxx|4 +-
 basctl/source/inc/dlgedfac.hxx |4 +-
 basctl/source/inc/dlgedfunc.hxx|   12 +++
 basctl/source/inc/dlgedlist.hxx|8 ++--
 basctl/source/inc/dlgedmod.hxx |4 +-
 basctl/source/inc/dlgedobj.hxx |8 ++--
 basctl/source/inc/dlgedpage.hxx|4 +-
 basctl/source/inc/dlgedview.hxx|4 +-
 basctl/source/inc/dlgresid.hrc |2 -
 basctl/source/inc/doceventnotifier.hxx |   16 -
 basctl/source/inc/docsignature.hxx |   12 +++
 basctl/source/inc/scriptdocument.hxx   |   16 -
 36 files changed, 164 insertions(+), 164 deletions(-)

New commits:
commit 2fbd9825bce67218de2083ea1e881e98af166bf8
Author: Alexander Wilms f.alexander.wi...@gmail.com
Date:   Tue Feb 25 17:39:11 2014 +0100

Remove visual noise from basctl

Change-Id: I3e6a238a0bafbb70a7c22bde1f2258b8014ed2d2
Reviewed-on: https://gerrit.libreoffice.org/8232
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 586b328..11ab061 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -27,9 +27,9 @@ shell basctl_Shell
 {
 import BasicIDEView [Automation];
 
-// 
+
 // Current, je nach aktuellem Fenster:
-// 
+
 SID_SHOWLINES
 [
 StateMethod = GetState;
@@ -132,9 +132,9 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
-// 
+
 // Global: Egal, welches Fenster gerade aktiv ist:
-// 
+
 SID_BASICIDE_LIBSELECTOR
 [
 StateMethod = GetState;
@@ -320,9 +320,9 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
-// 
+
 // Nur, wenn BasicFenster oben
-// 
+
 SID_BASICRUN
 [
 ExecMethod  = ExecuteBasic;
@@ -407,9 +407,9 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
-// 
+
 // Nur, wenn Dialogfenster oben
-// 
+
 SID_CHOOSE_CONTROLS
 [
 ExecMethod  = ExecuteDialog;
diff --git a/basctl/sdi/basslots.sdi b/basctl/sdi/basslots.sdi
index 9235fd8..f85923c 100644
--- a/basctl/sdi/basslots.sdi
+++ b/basctl/sdi/basslots.sdi
@@ -25,7 +25,7 @@ HelpText( BasicIDE )
 SlotIdFile( basslots.hrc )
 ]
 {
-//=
+
 include sfxitems.sdi
 include sfx.sdi
 include svxitems.sdi
diff --git a/basctl/source/basicide/basicbox.cxx 
b/basctl/source/basicide/basicbox.cxx
index 2ccad9b..1c98157 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -83,9 +83,9 @@ Window* LibBoxControl::CreateItemWindow( Window *pParent )
 return new LibBox( pParent, m_xFrame );
 }
 

[Libreoffice-commits] core.git: basctl/sdi basctl/source

2014-01-22 Thread Tsutomu Uchino
 basctl/sdi/baside.sdi  |1 +
 basctl/source/basicide/baside2.cxx |   13 -
 basctl/source/basicide/baside3.cxx |5 +
 3 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 4f03eb00fcb6b1c3a06709edab56c8e2508241d5
Author: Tsutomu Uchino ha...@apache.org
Date:   Wed Jan 22 07:41:16 2014 +

Related: #i50481# improve Select All command in Basic IDE

see also fdo#37211 i.e. commit 4bc2724240b11ce4dfb7adafbe1f1c260fa44030

(cherry picked from commit f841659faf09fec69c962959b9da032fa0bc2b16)

Conflicts:
basctl/source/basicide/baside2.cxx
basctl/source/basicide/baside2b.cxx
basctl/source/basicide/baside3.cxx

Change-Id: Id679b1e16b87ec8d81fb78039318728320b9d5bc

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 271441c..586b328 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -57,6 +57,7 @@ shell basctl_Shell
 SID_SELECTALL
 [
 ExecMethod  = ExecuteCurrent;
+StateMethod = GetState;
 ]
 
 SID_CUT
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 2f8744e..c9719ff 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -952,8 +952,13 @@ void ModulWindow::ExecuteCommand (SfxRequest rReq)
 break;
 }
 case SID_SELECTALL:
-GetEditView()-SetSelection( TextSelection( TextPaM( 0, 0 ), 
TextPaM( 0x, 0x ) ) );
+{
+TextSelection aSel( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, 
0x ) );
+TextView * pView = GetEditView();
+pView-SetSelection( aSel );
+pView-GetWindow()-GrabFocus();
 break;
+}
 case SID_BASICRUN:
 {
 BasicRun();
@@ -1170,6 +1175,12 @@ void ModulWindow::GetState( SfxItemSet rSet )
 rSet.Put(SfxBoolItem(nWh, bSourceLinesEnabled));
 break;
 }
+case SID_SELECTALL:
+{
+if ( !GetEditView() )
+rSet.DisableItem( nWh );
+}
+break;
 }
 }
 }
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index a7b0b20..14ef27f 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -409,6 +409,11 @@ void DialogWindow::GetState( SfxItemSet rSet )
 rSet.Put(SfxVisibilityItem(nWh, false));
 break;
 }
+case SID_SELECTALL:
+{
+rSet.DisableItem( nWh );
+}
+break;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits