summaryrefslogtreecommitdiff
path: root/basic/source/classes/codecompletecache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/classes/codecompletecache.cxx')
-rw-r--r--basic/source/classes/codecompletecache.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx
index aad0e4fcd622..71de600c0af0 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -97,6 +97,23 @@ void CodeCompleteOptions::SetAutoCorrectOn( const bool& b )
theCodeCompleteOptions::get().bIsAutoCorrectOn = b;
}
+OUString CodeCompleteOptions::AddUnoPrefix( const OUString& sTypeName )
+{
+ OUString sNewTypeName = sTypeName;
+ if( sNewTypeName.toAsciiLowerCase().startsWith("css.") )
+ {//enables shorthand "css" instead of "com.sun.star"
+ sNewTypeName = sNewTypeName.replaceFirst("css","com.sun.star");
+ }
+ else
+ {
+ if( !sNewTypeName.toAsciiLowerCase().startsWith("com.sun.star.") )
+ {//if "com.sun.star" left out, add it
+ sNewTypeName = OUString("com.sun.star.") + sTypeName;
+ }
+ }
+ return sNewTypeName;
+}
+
std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache)
{
aStream << "Global variables" << std::endl;