summaryrefslogtreecommitdiff
path: root/basctl/source
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-08-12 13:53:09 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-08-12 13:53:09 +0200
commit12de061bcbc4af45403099dd0a0c855c20cba1d8 (patch)
tree062b6bac81e7ac120e18e6d7edb94c60191e5b6e /basctl/source
parent0064a463371d3a41ccd7b01398b2f3a92c61367c (diff)
GSOC work, Tool/Options/Basic IDE Options created
Created a new tab in Tools/Options/Basic IDE options instead of the ModalDialog. The original dialog under Basic IDE/View/IDE Options was removed. Tab page is disabled when experimetal flag is off, entry node in the treebox is visible. Change-Id: Iaad1ea5fadc3f05ca81f2240dceb513f25be35b9
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/basicideoptionsdlg.cxx111
-rw-r--r--basctl/source/basicide/basicideoptionsdlg.hxx59
-rw-r--r--basctl/source/basicide/baside2.cxx16
3 files changed, 0 insertions, 186 deletions
diff --git a/basctl/source/basicide/basicideoptionsdlg.cxx b/basctl/source/basicide/basicideoptionsdlg.cxx
deleted file mode 100644
index 765cffa3ca84..000000000000
--- a/basctl/source/basicide/basicideoptionsdlg.cxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- 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 .
- */
-
-#include "basicideoptionsdlg.hxx"
-#include <basic/codecompletecache.hxx>
-#include <svtools/miscopt.hxx>
-#include <basidesh.hrc>
-#include <iostream>
-#include <officecfg/Office/BasicIDE.hxx>
-#include <boost/shared_ptr.hpp>
-
-namespace basctl
-{
-
-BasicIDEOptionsDlg::BasicIDEOptionsDlg( Window* pWindow )
-: ModalDialog(pWindow, "BasicIDEOptionsDlg", "modules/BasicIDE/ui/basicideoptionsdialog.ui")
-{
- get(pCancelBtn, "cancel");
- get(pOkBtn, "ok");
-
- get(pCodeCompleteChk, "codecomplete_enable");
- get(pAutocloseProcChk, "autoclose_proc");
- get(pAutocloseParenChk, "autoclose_paren");
- get(pAutocloseQuotesChk, "autoclose_quotes");
- get(pAutoCorrectKeywordsChk, "autocorrect_keywords");
- get(pUseExtendedTypesChk, "extendedtypes_enable");
-
- pOkBtn->SetClickHdl( LINK( this, BasicIDEOptionsDlg, OkHdl ) );
- pCancelBtn->SetClickHdl( LINK( this, BasicIDEOptionsDlg, CancelHdl ) );
-
- LoadConfig();
-
-}
-
-BasicIDEOptionsDlg::~BasicIDEOptionsDlg()
-{
-}
-
-IMPL_LINK_NOARG(BasicIDEOptionsDlg, OkHdl)
-{
- CodeCompleteOptions::SetCodeCompleteOn( pCodeCompleteChk->IsChecked() );
- CodeCompleteOptions::SetProcedureAutoCompleteOn( pAutocloseProcChk->IsChecked() );
- CodeCompleteOptions::SetAutoCloseQuotesOn( pAutocloseQuotesChk->IsChecked() );
- CodeCompleteOptions::SetAutoCloseParenthesisOn( pAutocloseParenChk->IsChecked() );
- CodeCompleteOptions::SetAutoCorrectKeywordsOn( pAutoCorrectKeywordsChk->IsChecked() );
- CodeCompleteOptions::SetExtendedTypeDeclaration( pUseExtendedTypesChk->IsChecked() );
-
- SaveConfig();
- Close();
- return 0;
-}
-
-IMPL_LINK_NOARG(BasicIDEOptionsDlg, CancelHdl)
-{
- Close();
- return 0;
-}
-
-short BasicIDEOptionsDlg::Execute()
-{
- return ModalDialog::Execute();
-}
-
-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::AutoCorrectKeywords::get();
-
- pCodeCompleteChk->Check( bCodeCompleteOn );
- pAutocloseProcChk->Check( bProcClose );
- pAutocloseQuotesChk->Check( bQuoteClose );
- pAutocloseParenChk->Check( bParenClose );
- pAutoCorrectKeywordsChk->Check( bCorrect );
- pUseExtendedTypesChk->Check( bExtended );
-}
-
-void BasicIDEOptionsDlg::SaveConfig()
-{
- boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() );
- officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::set( pAutocloseProcChk->IsChecked(), batch );
- officecfg::Office::BasicIDE::Autocomplete::CodeComplete::set( pCodeCompleteChk->IsChecked(), batch );
- 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::AutoCorrectKeywords::set( pAutoCorrectKeywordsChk->IsChecked(), batch );
- batch->commit();
-}
-
-} // namespace basctl
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/basicideoptionsdlg.hxx b/basctl/source/basicide/basicideoptionsdlg.hxx
deleted file mode 100644
index 1d3970daa314..000000000000
--- a/basctl/source/basicide/basicideoptionsdlg.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- 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 a21cdb9140fb..22bbb4270a2b 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -54,7 +54,6 @@
#include <cassert>
#include <basic/codecompletecache.hxx>
#include <svtools/miscopt.hxx>
-#include "basicideoptionsdlg.hxx"
namespace basctl
{
@@ -1012,12 +1011,6 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
rLayout.BasicRemoveWatch();
}
break;
- case SID_BASICIDE_IDEOPTIONS:
- {
- boost::scoped_ptr< BasicIDEOptionsDlg > pDlg( new BasicIDEOptionsDlg( this ) );
- pDlg->Execute();
- }
- break;
case SID_CUT:
{
if ( !IsReadOnly() )
@@ -1164,15 +1157,6 @@ void ModulWindow::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(nWh, bSourceLinesEnabled));
break;
}
- case SID_BASICIDE_IDEOPTIONS:
- {
- SvtMiscOptions aMiscOptions;
- if( !aMiscOptions.IsExperimentalMode() )
- {
- rSet.Put( SfxVisibilityItem(nWh, false) );
- }
- }
- break;
}
}
}