From 61ee2598b18890eb5798a3943fbedd22a24e7aea Mon Sep 17 00:00:00 2001 From: Gergo Mocsi Date: Tue, 23 Jul 2013 12:42:37 +0200 Subject: GSOC work, code complete option, menu entry fixes Menu entry is added under View->Enable Code Completition when in Experimental mode. Fixed the call of funtion SbModule::GetCodeCompleteDataFromParse() to be called only when code completition is enabled. Replaced the occurences of SvtMiscOptions to CodeCompleteOptions. Change-Id: If0520123ab5f612d7d24fb98f8e9bf6881af76cb --- include/basic/codecompletecache.hxx | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'include/basic') diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx index a1428e351624..9033b89e2a1a 100644 --- a/include/basic/codecompletecache.hxx +++ b/include/basic/codecompletecache.hxx @@ -26,12 +26,31 @@ #include #include #include +#include typedef boost::unordered_map< OUString, OUString, OUStringHash > CodeCompleteVarTypes; /* variable name, type */ typedef boost::unordered_map< OUString, CodeCompleteVarTypes, OUStringHash > CodeCompleteVarScopes; /* procedure, CodeCompleteVarTypes */ +class BASIC_DLLPUBLIC CodeCompleteOptions +{ +/* + * class to store basic code completition + * options + * */ +private: + bool bIsCodeCompleteOn; + SvtMiscOptions aMiscOptions; + +public: + CodeCompleteOptions(); + + static bool IsCodeCompleteOn(); + static void SetCodeCompleteOn( const bool& b ); + static bool IsExtendedTypeDeclaration(); +}; + class BASIC_DLLPUBLIC CodeCompleteDataCache { /* @@ -48,7 +67,7 @@ public: CodeCompleteDataCache(){} virtual ~CodeCompleteDataCache(){} - friend std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache); + friend BASIC_DLLPUBLIC std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache); void SetVars( const CodeCompleteVarScopes& aScopes ); const CodeCompleteVarScopes& GetVars() const; -- cgit