diff options
-rw-r--r-- | basctl/Library_basctl.mk | 2 | ||||
-rw-r--r-- | basctl/UIConfig_basicide.mk | 2 | ||||
-rw-r--r-- | basctl/sdi/baside.sdi | 2 | ||||
-rw-r--r-- | basctl/source/basicide/basicideoptionsdlg.cxx (renamed from basctl/source/basicide/codecompleteoptionsdlg.cxx) | 49 | ||||
-rw-r--r-- | basctl/source/basicide/basicideoptionsdlg.hxx | 59 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 5 | ||||
-rw-r--r-- | basctl/uiconfig/basicide/menubar/menubar.xml | 2 | ||||
-rw-r--r-- | basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui | 279 | ||||
-rw-r--r-- | basic/source/classes/codecompletecache.cxx | 20 | ||||
-rw-r--r-- | include/basic/codecompletecache.hxx | 7 | ||||
-rw-r--r-- | include/sfx2/sfxsids.hrc | 2 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/BasicIDE.xcu | 17 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu | 4 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs | 4 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 2 |
16 files changed, 383 insertions, 81 deletions
diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index 480023041cbb..9e4b94e36719 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -90,7 +90,7 @@ $(eval $(call gb_Library_add_exception_objects,basctl,\ basctl/source/basicide/linenumberwindow \ basctl/source/basicide/localizationmgr \ basctl/source/basicide/macrodlg \ - basctl/source/basicide/codecompleteoptionsdlg \ + basctl/source/basicide/basicideoptionsdlg \ basctl/source/basicide/moduldl2 \ basctl/source/basicide/moduldlg \ basctl/source/basicide/objdlg \ diff --git a/basctl/UIConfig_basicide.mk b/basctl/UIConfig_basicide.mk index 624f42683072..4be0d4d38b78 100644 --- a/basctl/UIConfig_basicide.mk +++ b/basctl/UIConfig_basicide.mk @@ -30,7 +30,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/BasicIDE,\ $(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\ basctl/uiconfig/basicide/ui/basicmacrodialog \ - basctl/uiconfig/basicide/ui/codecompleteoptionsdlg \ + basctl/uiconfig/basicide/ui/basicideoptionsdialog \ )) # vim: set noet sw=4 ts=4: diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi index 42873f6cd303..b00b65ec9e3e 100644 --- a/basctl/sdi/baside.sdi +++ b/basctl/sdi/baside.sdi @@ -36,7 +36,7 @@ shell basctl_Shell ExecMethod = ExecuteCurrent; ] - SID_BASICIDE_CODECOMPLETITION + SID_BASICIDE_IDEOPTIONS [ StateMethod = GetState; ExecMethod = ExecuteCurrent; diff --git a/basctl/source/basicide/codecompleteoptionsdlg.cxx b/basctl/source/basicide/basicideoptionsdlg.cxx index e8537c616528..765cffa3ca84 100644 --- a/basctl/source/basicide/codecompleteoptionsdlg.cxx +++ b/basctl/source/basicide/basicideoptionsdlg.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "codecompleteoptionsdlg.hxx" +#include "basicideoptionsdlg.hxx" #include <basic/codecompletecache.hxx> #include <svtools/miscopt.hxx> #include <basidesh.hrc> @@ -28,8 +28,8 @@ namespace basctl { -CodeCompleteOptionsDlg::CodeCompleteOptionsDlg( Window* pWindow ) -: ModalDialog(pWindow, "CodeCompleteOptionsDialog", "modules/BasicIDE/ui/codecompleteoptionsdlg.ui") +BasicIDEOptionsDlg::BasicIDEOptionsDlg( Window* pWindow ) +: ModalDialog(pWindow, "BasicIDEOptionsDlg", "modules/BasicIDE/ui/basicideoptionsdialog.ui") { get(pCancelBtn, "cancel"); get(pOkBtn, "ok"); @@ -38,78 +38,63 @@ CodeCompleteOptionsDlg::CodeCompleteOptionsDlg( Window* pWindow ) get(pAutocloseProcChk, "autoclose_proc"); get(pAutocloseParenChk, "autoclose_paren"); get(pAutocloseQuotesChk, "autoclose_quotes"); - get(pAutoCorrectSpellingChk, "autocorrect_spelling"); + get(pAutoCorrectKeywordsChk, "autocorrect_keywords"); get(pUseExtendedTypesChk, "extendedtypes_enable"); - pOkBtn->SetClickHdl( LINK( this, CodeCompleteOptionsDlg, OkHdl ) ); - pCancelBtn->SetClickHdl( LINK( this, CodeCompleteOptionsDlg, CancelHdl ) ); - - pCodeCompleteChk->SetToggleHdl( LINK(this, CodeCompleteOptionsDlg, CodeCompleteHdl) ); - pUseExtendedTypesChk->SetToggleHdl( LINK(this, CodeCompleteOptionsDlg, ExtendedTypesHdl) ); + pOkBtn->SetClickHdl( LINK( this, BasicIDEOptionsDlg, OkHdl ) ); + pCancelBtn->SetClickHdl( LINK( this, BasicIDEOptionsDlg, CancelHdl ) ); LoadConfig(); } -CodeCompleteOptionsDlg::~CodeCompleteOptionsDlg() +BasicIDEOptionsDlg::~BasicIDEOptionsDlg() { } -IMPL_LINK_NOARG(CodeCompleteOptionsDlg, OkHdl) +IMPL_LINK_NOARG(BasicIDEOptionsDlg, OkHdl) { CodeCompleteOptions::SetCodeCompleteOn( pCodeCompleteChk->IsChecked() ); CodeCompleteOptions::SetProcedureAutoCompleteOn( pAutocloseProcChk->IsChecked() ); CodeCompleteOptions::SetAutoCloseQuotesOn( pAutocloseQuotesChk->IsChecked() ); CodeCompleteOptions::SetAutoCloseParenthesisOn( pAutocloseParenChk->IsChecked() ); - CodeCompleteOptions::SetAutoCorrectSpellingOn( pAutoCorrectSpellingChk->IsChecked() ); - CodeCompleteOptions::SetExtendedTypeDeclaration( pAutoCorrectSpellingChk->IsChecked() ); + CodeCompleteOptions::SetAutoCorrectKeywordsOn( pAutoCorrectKeywordsChk->IsChecked() ); + CodeCompleteOptions::SetExtendedTypeDeclaration( pUseExtendedTypesChk->IsChecked() ); SaveConfig(); Close(); return 0; } -IMPL_LINK_NOARG(CodeCompleteOptionsDlg, CancelHdl) +IMPL_LINK_NOARG(BasicIDEOptionsDlg, CancelHdl) { Close(); return 0; } -IMPL_LINK_NOARG(CodeCompleteOptionsDlg, ExtendedTypesHdl) -{ - pCodeCompleteChk->Check( pUseExtendedTypesChk->IsChecked() ); - return 0; -} - -IMPL_LINK_NOARG(CodeCompleteOptionsDlg, CodeCompleteHdl) -{ - pUseExtendedTypesChk->Check( pCodeCompleteChk->IsChecked() ); - return 0; -} - -short CodeCompleteOptionsDlg::Execute() +short BasicIDEOptionsDlg::Execute() { return ModalDialog::Execute(); } -void CodeCompleteOptionsDlg::LoadConfig() +void BasicIDEOptionsDlg::LoadConfig() { bool bProcClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::get(); bool bExtended = officecfg::Office::BasicIDE::Autocomplete::UseExtended::get(); bool bCodeCompleteOn = officecfg::Office::BasicIDE::Autocomplete::CodeComplete::get(); bool bParenClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::get(); bool bQuoteClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::get(); - bool bCorrect = officecfg::Office::BasicIDE::Autocomplete::AutoCorrectSpelling::get(); + bool bCorrect = officecfg::Office::BasicIDE::Autocomplete::AutoCorrectKeywords::get(); pCodeCompleteChk->Check( bCodeCompleteOn ); pAutocloseProcChk->Check( bProcClose ); pAutocloseQuotesChk->Check( bQuoteClose ); pAutocloseParenChk->Check( bParenClose ); - pAutoCorrectSpellingChk->Check( bCorrect ); + pAutoCorrectKeywordsChk->Check( bCorrect ); pUseExtendedTypesChk->Check( bExtended ); } -void CodeCompleteOptionsDlg::SaveConfig() +void BasicIDEOptionsDlg::SaveConfig() { boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() ); officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::set( pAutocloseProcChk->IsChecked(), batch ); @@ -117,7 +102,7 @@ void CodeCompleteOptionsDlg::SaveConfig() officecfg::Office::BasicIDE::Autocomplete::UseExtended::set( pUseExtendedTypesChk->IsChecked(), batch ); officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::set( pAutocloseParenChk->IsChecked(), batch ); officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::set( pAutocloseQuotesChk->IsChecked(), batch ); - officecfg::Office::BasicIDE::Autocomplete::AutoCorrectSpelling::set( pAutoCorrectSpellingChk->IsChecked(), batch ); + officecfg::Office::BasicIDE::Autocomplete::AutoCorrectKeywords::set( pAutoCorrectKeywordsChk->IsChecked(), batch ); batch->commit(); } diff --git a/basctl/source/basicide/basicideoptionsdlg.hxx b/basctl/source/basicide/basicideoptionsdlg.hxx new file mode 100644 index 000000000000..1d3970daa314 --- /dev/null +++ b/basctl/source/basicide/basicideoptionsdlg.hxx @@ -0,0 +1,59 @@ +/* -*- 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/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef BASCTL_BASICIDEOPTIONSDLG_HXX +#define BASCTL_BASICIDEOPTIONSDLG_HXX + +#include <vcl/button.hxx> +#include <vcl/dialog.hxx> + +namespace basctl +{ + +class BasicIDEOptionsDlg: public ModalDialog +{ +private: + CancelButton* pCancelBtn; + OKButton* pOkBtn; + + CheckBox* pCodeCompleteChk; + CheckBox* pAutocloseProcChk; + CheckBox* pAutocloseParenChk; + CheckBox* pAutocloseQuotesChk; + CheckBox* pAutoCorrectKeywordsChk; + CheckBox* pUseExtendedTypesChk; + + DECL_LINK(OkHdl, void*); + DECL_LINK(CancelHdl, void*); + + void LoadConfig(); + void SaveConfig(); + +public: + BasicIDEOptionsDlg( Window* pWindow ); + ~BasicIDEOptionsDlg(); + + virtual short Execute(); +}; + +} // namespace basctl + +#endif //BASCTL_BASICIDEOPTIONSDLG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index ef7c5c9eb75b..ae17932dc48f 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -54,7 +54,7 @@ #include <cassert> #include <basic/codecompletecache.hxx> #include <svtools/miscopt.hxx> -#include "codecompleteoptionsdlg.hxx" +#include "basicideoptionsdlg.hxx" namespace basctl { @@ -1012,9 +1012,9 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq) rLayout.BasicRemoveWatch(); } break; - case SID_BASICIDE_CODECOMPLETITION: + case SID_BASICIDE_IDEOPTIONS: { - boost::scoped_ptr< CodeCompleteOptionsDlg > pDlg( new CodeCompleteOptionsDlg( this ) ); + boost::scoped_ptr< BasicIDEOptionsDlg > pDlg( new BasicIDEOptionsDlg( this ) ); pDlg->Execute(); } break; @@ -1164,7 +1164,7 @@ void ModulWindow::GetState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(nWh, bSourceLinesEnabled)); break; } - case SID_BASICIDE_CODECOMPLETITION: + case SID_BASICIDE_IDEOPTIONS: { SvtMiscOptions aMiscOptions; if( !aMiscOptions.IsExperimentalMode() ) diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 7349e8649fc6..4cd4258dcc12 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -510,7 +510,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) if( (rKEvt.GetKeyCode().GetCode() == KEY_SPACE || rKEvt.GetKeyCode().GetCode() == KEY_TAB || - rKEvt.GetKeyCode().GetCode() == KEY_RETURN ) && CodeCompleteOptions::IsAutoCorrectSpellingOn() ) + rKEvt.GetKeyCode().GetCode() == KEY_RETURN ) && CodeCompleteOptions::IsAutoCorrectKeywordsOn() ) { TextSelection aSel = GetEditView()->GetSelection(); sal_uLong nLine = aSel.GetStart().GetPara(); @@ -611,7 +611,6 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) if( nLine+1 == pEditEngine->GetParagraphCount() ) { //append to the end OUString sText("\nEnd "); - std::cerr << "sProcType: " << sProcType << std::endl; if( sProcType.equalsIgnoreAsciiCase("function") ) sText += OUString( "Function\n" ); if( sProcType.equalsIgnoreAsciiCase("sub") ) @@ -686,7 +685,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) OUString sBaseName = aVect[0];//variable name OUString sVarType = aCodeCompleteCache.GetVarType( sBaseName ); - if( !sVarType.isEmpty() && CodeCompleteOptions::IsAutoCorrectSpellingOn() )//correct variable name + if( !sVarType.isEmpty() && CodeCompleteOptions::IsAutoCorrectKeywordsOn() )//correct variable name { TextPaM aStart(nLine, aSel.GetStart().GetIndex() - sBaseName.getLength() ); TextSelection sTextSelection(aStart, TextPaM(nLine, aSel.GetStart().GetIndex())); diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml b/basctl/uiconfig/basicide/menubar/menubar.xml index 2bb4220ca28d..34288e2786fd 100644 --- a/basctl/uiconfig/basicide/menubar/menubar.xml +++ b/basctl/uiconfig/basicide/menubar/menubar.xml @@ -61,7 +61,7 @@ <menu:menuitem menu:id=".uno:StatusBarVisible"/> <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/> <menu:menuitem menu:id=".uno:ShowLines"/> - <menu:menuitem menu:id=".uno:CodeCompleteOptionsDialog"/> + <menu:menuitem menu:id=".uno:BasicIDEOptionsDialog"/> <menu:menuitem menu:id=".uno:GotoLine"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:FullScreen"/> diff --git a/basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui b/basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui new file mode 100644 index 000000000000..e293ccd43f63 --- /dev/null +++ b/basctl/uiconfig/basicide/ui/basicideoptionsdialog.ui @@ -0,0 +1,279 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="BasicIDEOptionsDlg"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">IDE Options</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child> + <object class="GtkFrame" id="frame3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="extendedtypes_enable"> + <property name="label" translatable="yes">Use extended types</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Language Features</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + <property name="image_position">right</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="codecomplete_enable"> + <property name="label" translatable="yes">Enable Code Completition</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Code Completition</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="autoclose_proc"> + <property name="label" translatable="yes">Autoclose Procedures</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="autoclose_paren"> + <property name="label" translatable="yes">Autoclose Parenthesis</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="autoclose_quotes"> + <property name="label" translatable="yes">Autoclose Quotes</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="autocorrect_keywords"> + <property name="label" translatable="yes">Autocorrect Keywords</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Code Suggestion</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="-1">cancel</action-widget> + <action-widget response="0">ok</action-widget> + </action-widgets> + </object> +</interface> diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx index 57239ccc01f3..172954331cf4 100644 --- a/basic/source/classes/codecompletecache.cxx +++ b/basic/source/classes/codecompletecache.cxx @@ -28,17 +28,13 @@ namespace } CodeCompleteOptions::CodeCompleteOptions() -/*: bIsCodeCompleteOn( false ), -bIsProcedureAutoCompleteOn( false ), -bIsAutoCloseQuotesOn( false ), -bIsAutoCloseParenthesisOn( false ), -bIsAutoCorrectSpellingOn( false )*/ { - bIsAutoCorrectSpellingOn = officecfg::Office::BasicIDE::Autocomplete::AutoCorrectSpelling::get(); + bIsAutoCorrectKeywordsOn = officecfg::Office::BasicIDE::Autocomplete::AutoCorrectKeywords::get(); bIsAutoCloseParenthesisOn = officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::get(); bIsAutoCloseQuotesOn = officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::get(); bIsProcedureAutoCompleteOn = officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::get(); bIsCodeCompleteOn = officecfg::Office::BasicIDE::Autocomplete::CodeComplete::get(); + bExtendedTypeDeclarationOn = officecfg::Office::BasicIDE::Autocomplete::UseExtended::get(); } bool CodeCompleteOptions::IsCodeCompleteOn() @@ -53,12 +49,12 @@ void CodeCompleteOptions::SetCodeCompleteOn( const bool& b ) bool CodeCompleteOptions::IsExtendedTypeDeclaration() { - return CodeCompleteOptions::IsCodeCompleteOn(); + return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bExtendedTypeDeclarationOn; } void CodeCompleteOptions::SetExtendedTypeDeclaration( const bool& b ) { - CodeCompleteOptions::SetCodeCompleteOn( b ); + theCodeCompleteOptions::get().bExtendedTypeDeclarationOn = b; } bool CodeCompleteOptions::IsProcedureAutoCompleteOn() @@ -91,14 +87,14 @@ void CodeCompleteOptions::SetAutoCloseParenthesisOn( const bool& b ) theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn = b; } -bool CodeCompleteOptions::IsAutoCorrectSpellingOn() +bool CodeCompleteOptions::IsAutoCorrectKeywordsOn() { - return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCorrectSpellingOn; + return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCorrectKeywordsOn; } -void CodeCompleteOptions::SetAutoCorrectSpellingOn( const bool& b ) +void CodeCompleteOptions::SetAutoCorrectKeywordsOn( const bool& b ) { - theCodeCompleteOptions::get().bIsAutoCorrectSpellingOn = b; + theCodeCompleteOptions::get().bIsAutoCorrectKeywordsOn = b; } std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache) diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx index 10c2f7335e91..a2186074fca2 100644 --- a/include/basic/codecompletecache.hxx +++ b/include/basic/codecompletecache.hxx @@ -45,7 +45,8 @@ private: bool bIsProcedureAutoCompleteOn; bool bIsAutoCloseQuotesOn; bool bIsAutoCloseParenthesisOn; - bool bIsAutoCorrectSpellingOn; + bool bIsAutoCorrectKeywordsOn; + bool bExtendedTypeDeclarationOn; SvtMiscOptions aMiscOptions; public: @@ -66,8 +67,8 @@ public: static bool IsAutoCloseParenthesisOn(); static void SetAutoCloseParenthesisOn( const bool& b ); - static bool IsAutoCorrectSpellingOn(); - static void SetAutoCorrectSpellingOn( const bool& b ); + static bool IsAutoCorrectKeywordsOn(); + static void SetAutoCorrectKeywordsOn( const bool& b ); }; class BASIC_DLLPUBLIC CodeCompleteDataCache diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index e6f9754c6168..bc26695585ba 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -671,7 +671,7 @@ #define SID_BASICIDE_ARG_DOCUMENT_MODEL ( SID_BASICIDE_START + 51 ) #define SID_BASICIDE_MANAGE_LANG ( SID_BASICIDE_START + 52 ) #define SID_BASICIDE_CURRENT_LANG ( SID_BASICIDE_START + 53 ) -#define SID_BASICIDE_CODECOMPLETITION ( SID_BASICIDE_START + 54 ) +#define SID_BASICIDE_IDEOPTIONS ( SID_BASICIDE_START + 54 ) // SlotIds for Apps -------------------------------------------------------- #define FN_PARAM (SID_SW_START + 1100) diff --git a/officecfg/registry/data/org/openoffice/Office/BasicIDE.xcu b/officecfg/registry/data/org/openoffice/Office/BasicIDE.xcu index d3f74988aa94..fc401938cbcc 100644 --- a/officecfg/registry/data/org/openoffice/Office/BasicIDE.xcu +++ b/officecfg/registry/data/org/openoffice/Office/BasicIDE.xcu @@ -18,21 +18,4 @@ --> <!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd"> <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:install="http://openoffice.org/2004/installation" oor:name="BasicIDE" oor:package="org.openoffice.Office"> - <!--<node oor:name="Autocomplete" oor:op="replace"> - <prop oor:name="CodeComplete"> - <value>false</value> - </prop> - <prop oor:name="AutocloseParenthesis"> - <value>false</value> - </prop> - <prop oor:name="AutocloseDoubleQuotes"> - <value>false</value> - </prop> - <prop oor:name="AutocloseProc"> - <value>false</value> - </prop> - <prop oor:name="AutoCorrectSpelling"> - <value>false</value> - </prop> - </node>!--> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu index f31895249141..a796ce1b6e99 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu @@ -8,9 +8,9 @@ <value xml:lang="en-US">Goto Line Number...</value> </prop> </node> - <node oor:name=".uno:CodeCompleteOptionsDialog" oor:op="replace"> + <node oor:name=".uno:BasicIDEOptionsDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Code Completition Options</value> + <value xml:lang="en-US">IDE options</value> </prop> </node> <node oor:name=".uno:ShowLines" oor:op="replace"> diff --git a/officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs b/officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs index 385f746a7dca..7aecd133a193 100644 --- a/officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs @@ -56,9 +56,9 @@ </info> <value>false</value> </prop> - <prop oor:name="AutoCorrectSpelling" oor:type="xs:boolean" oor:nillable="false"> + <prop oor:name="AutoCorrectKeywords" oor:type="xs:boolean" oor:nillable="false"> <info> - <desc>Sets the auto correct spelling on/off. Default is false.</desc> + <desc>Sets the auto correction of keywords on/off. Default is false.</desc> </info> <value>false</value> </prop> diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index d24b537ab6eb..353a27baecff 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -3819,7 +3819,7 @@ SfxVoidItem MatchGroup SID_BASICIDE_MATCHGROUP GroupId = GID_MACRO; ] -SfxVoidItem CodeCompleteOptionsDialog SID_BASICIDE_CODECOMPLETITION +SfxVoidItem BasicIDEOptionsDialog SID_BASICIDE_IDEOPTIONS [ /* flags: */ |