From 412e91d33dfc392f15858614369f956e531785b9 Mon Sep 17 00:00:00 2001 From: Gergo Mocsi Date: Fri, 26 Jul 2013 13:57:29 +0200 Subject: GSOC work, implement "Autoclose parenthesis" function Autoclosing parenthesis function is working. Implementation is similar to autoclosing double quotes, except that this one does not need the HighlighPortion struct to use. Renamed the checkbox title to "Autoclose parenthesis". Change-Id: I4311cd8020f0dc0b62a2d8707e0eccbf57e0d2c2 --- basic/source/classes/codecompletecache.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'basic/source') diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx index 3e327c65ff7c..728dcb4a1d81 100644 --- a/basic/source/classes/codecompletecache.cxx +++ b/basic/source/classes/codecompletecache.cxx @@ -29,7 +29,8 @@ namespace CodeCompleteOptions::CodeCompleteOptions() : bIsCodeCompleteOn( false ), bIsProcedureAutoCompleteOn( false ), -bIsAutoCloseQuotesOn( false ) +bIsAutoCloseQuotesOn( false ), +bIsAutoCloseParenthesisOn( false ) { } @@ -68,6 +69,16 @@ void CodeCompleteOptions::SetAutoCloseQuotesOn( const bool& b ) theCodeCompleteOptions::get().bIsAutoCloseQuotesOn = b; } +bool CodeCompleteOptions::IsAutoCloseParenthesisOn() +{ + return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn; +} + +void CodeCompleteOptions::SetAutoCloseParenthesisOn( const bool& b ) +{ + theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn = b; +} + std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache) { aStream << "Global variables" << std::endl; -- cgit