summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-08-14 12:56:39 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-08-14 12:56:39 +0200
commit377b88ece25a1c7117682d8887f3dc04cff5c71f (patch)
treea1d1ebc86aa0dbae526eb6332ba594aaac28d21e
parent2795bc817f1e783570c28428cec8e07b35cce7bb (diff)
GSOC work, renaming + options fix
Options now work correctly: I've added the missing function. Rename: renamed some variables and methods to kep the consistence( Autocorrect keywords -> Autocorrect). Change-Id: I6b4914575f1a06eb3268c133b8b990364e3d24e4
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--basic/source/classes/codecompletecache.cxx10
-rw-r--r--cui/source/options/optbasic.cxx6
-rw-r--r--cui/source/options/optbasic.hxx1
-rw-r--r--include/basic/codecompletecache.hxx6
5 files changed, 17 insertions, 10 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index c0c404645cf9..e408b299fcfe 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::IsAutoCorrectKeywordsOn() )
+ rKEvt.GetKeyCode().GetCode() == KEY_RETURN ) && CodeCompleteOptions::IsAutoCorrectOn() )
{
HandleAutoCorrect();
}
@@ -755,7 +755,7 @@ void EditorWindow::HandleCodeCompletition()
OUString sBaseName = aVect[0];//variable name
OUString sVarType = aCodeCompleteCache.GetVarType( sBaseName );
- if( !sVarType.isEmpty() && CodeCompleteOptions::IsAutoCorrectKeywordsOn() )
+ if( !sVarType.isEmpty() && CodeCompleteOptions::IsAutoCorrectOn() )
{//correct variable name
TextPaM aStart(nLine, aLine.indexOf(sBaseName) );
TextPaM aEnd(nLine, aLine.indexOf(sBaseName) + sBaseName.getLength() );
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx
index 999c3241eb50..9d78455cf2b9 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -29,7 +29,7 @@ namespace
CodeCompleteOptions::CodeCompleteOptions()
{
- bIsAutoCorrectKeywordsOn = officecfg::Office::BasicIDE::Autocomplete::AutoCorrect::get();
+ bIsAutoCorrectOn = officecfg::Office::BasicIDE::Autocomplete::AutoCorrect::get();
bIsAutoCloseParenthesisOn = officecfg::Office::BasicIDE::Autocomplete::AutocloseParenthesis::get();
bIsAutoCloseQuotesOn = officecfg::Office::BasicIDE::Autocomplete::AutocloseDoubleQuotes::get();
bIsProcedureAutoCompleteOn = officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::get();
@@ -87,14 +87,14 @@ void CodeCompleteOptions::SetAutoCloseParenthesisOn( const bool& b )
theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn = b;
}
-bool CodeCompleteOptions::IsAutoCorrectKeywordsOn()
+bool CodeCompleteOptions::IsAutoCorrectOn()
{
- return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCorrectKeywordsOn;
+ return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCorrectOn;
}
-void CodeCompleteOptions::SetAutoCorrectKeywordsOn( const bool& b )
+void CodeCompleteOptions::SetAutoCorrectOn( const bool& b )
{
- theCodeCompleteOptions::get().bIsAutoCorrectKeywordsOn = b;
+ theCodeCompleteOptions::get().bIsAutoCorrectOn = b;
}
std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache)
diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index 717f526854d2..21026b302782 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -155,4 +155,10 @@ SfxTabPage* SvxBasicIDEOptionsPage::Create( Window* pParent, const SfxItemSet& r
return ( new SvxBasicIDEOptionsPage( pParent, rAttrSet ) );
}
+void SvxBasicIDEOptionsPage::FillUserData()
+{
+ OUString aUserData;
+ SetUserData( aUserData );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optbasic.hxx b/cui/source/options/optbasic.hxx
index 2ca482024e1f..fe1b52e04d28 100644
--- a/cui/source/options/optbasic.hxx
+++ b/cui/source/options/optbasic.hxx
@@ -44,6 +44,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
+ virtual void FillUserData();
};
diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx
index a2186074fca2..d455fa75ec52 100644
--- a/include/basic/codecompletecache.hxx
+++ b/include/basic/codecompletecache.hxx
@@ -45,7 +45,7 @@ private:
bool bIsProcedureAutoCompleteOn;
bool bIsAutoCloseQuotesOn;
bool bIsAutoCloseParenthesisOn;
- bool bIsAutoCorrectKeywordsOn;
+ bool bIsAutoCorrectOn;
bool bExtendedTypeDeclarationOn;
SvtMiscOptions aMiscOptions;
@@ -67,8 +67,8 @@ public:
static bool IsAutoCloseParenthesisOn();
static void SetAutoCloseParenthesisOn( const bool& b );
- static bool IsAutoCorrectKeywordsOn();
- static void SetAutoCorrectKeywordsOn( const bool& b );
+ static bool IsAutoCorrectOn();
+ static void SetAutoCorrectOn( const bool& b );
};
class BASIC_DLLPUBLIC CodeCompleteDataCache