basctl/source/basicide/baside2b.cxx | 4 ++-- basic/source/classes/codecompletecache.cxx | 10 +++++----- cui/source/options/optbasic.cxx | 6 ++++++ cui/source/options/optbasic.hxx | 1 + include/basic/codecompletecache.hxx | 6 +++--- 5 files changed, 17 insertions(+), 10 deletions(-)
New commits: commit 377b88ece25a1c7117682d8887f3dc04cff5c71f Author: Gergo Mocsi <gmocs...@gmail.com> Date: Wed Aug 14 12:56:39 2013 +0200 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 diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index c0c4046..e408b29 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 999c324..9d78455 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 717f526..21026b3 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 2ca4820..fe1b52e 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 a218607..d455fa7 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits