diff options
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/codecompletecache.cxx | 31 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 1 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 1 |
3 files changed, 17 insertions, 16 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx index e2993c28581a..8f03797c32dd 100644 --- a/basic/source/classes/codecompletecache.cxx +++ b/basic/source/classes/codecompletecache.cxx @@ -19,13 +19,16 @@ #include <basic/codecompletecache.hxx> #include <iostream> -#include <rtl/instance.hxx> #include <officecfg/Office/BasicIDE.hxx> #include <officecfg/Office/Common.hxx> namespace { - class theCodeCompleteOptions: public ::rtl::Static< CodeCompleteOptions, theCodeCompleteOptions >{}; +CodeCompleteOptions& theCodeCompleteOptions() +{ + static CodeCompleteOptions SINGLETON; + return SINGLETON; +} } CodeCompleteOptions::CodeCompleteOptions() @@ -40,62 +43,62 @@ CodeCompleteOptions::CodeCompleteOptions() bool CodeCompleteOptions::IsCodeCompleteOn() { - return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsCodeCompleteOn; + return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions().bIsCodeCompleteOn; } void CodeCompleteOptions::SetCodeCompleteOn( bool b ) { - theCodeCompleteOptions::get().bIsCodeCompleteOn = b; + theCodeCompleteOptions().bIsCodeCompleteOn = b; } bool CodeCompleteOptions::IsExtendedTypeDeclaration() { - return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bExtendedTypeDeclarationOn; + return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions().bExtendedTypeDeclarationOn; } void CodeCompleteOptions::SetExtendedTypeDeclaration( bool b ) { - theCodeCompleteOptions::get().bExtendedTypeDeclarationOn = b; + theCodeCompleteOptions().bExtendedTypeDeclarationOn = b; } bool CodeCompleteOptions::IsProcedureAutoCompleteOn() { - return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsProcedureAutoCompleteOn; + return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions().bIsProcedureAutoCompleteOn; } void CodeCompleteOptions::SetProcedureAutoCompleteOn( bool b ) { - theCodeCompleteOptions::get().bIsProcedureAutoCompleteOn = b; + theCodeCompleteOptions().bIsProcedureAutoCompleteOn = b; } bool CodeCompleteOptions::IsAutoCloseQuotesOn() { - return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsAutoCloseQuotesOn; + return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions().bIsAutoCloseQuotesOn; } void CodeCompleteOptions::SetAutoCloseQuotesOn( bool b ) { - theCodeCompleteOptions::get().bIsAutoCloseQuotesOn = b; + theCodeCompleteOptions().bIsAutoCloseQuotesOn = b; } bool CodeCompleteOptions::IsAutoCloseParenthesisOn() { - return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn; + return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions().bIsAutoCloseParenthesisOn; } void CodeCompleteOptions::SetAutoCloseParenthesisOn( bool b ) { - theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn = b; + theCodeCompleteOptions().bIsAutoCloseParenthesisOn = b; } bool CodeCompleteOptions::IsAutoCorrectOn() { - return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions::get().bIsAutoCorrectOn; + return officecfg::Office::Common::Misc::ExperimentalMode::get() && theCodeCompleteOptions().bIsAutoCorrectOn; } void CodeCompleteOptions::SetAutoCorrectOn( bool b ) { - theCodeCompleteOptions::get().bIsAutoCorrectOn = b; + theCodeCompleteOptions().bIsAutoCorrectOn = b; } std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index f9d378ea8865..9e1d31fb4ac1 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -32,7 +32,6 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/weakref.hxx> -#include <rtl/instance.hxx> #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 11699093e022..00c90e30379d 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -41,7 +41,6 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -#include <rtl/instance.hxx> #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/character.hxx> |