diff options
author | Daniel Rentz <dr@openoffice.org> | 2010-07-27 18:05:46 +0200 |
---|---|---|
committer | Daniel Rentz <dr@openoffice.org> | 2010-07-27 18:05:46 +0200 |
commit | 2d8dade23fc65c982f6beecad6fa39d48748967a (patch) | |
tree | dfdcf21622ae84ee608c7adae3c88f1291c1afdd /sw/source/ui | |
parent | 386df44d93bcb442a5bf9c9ba1131b09c972eb05 (diff) | |
parent | 0453ab6dd45bbdad0f4e91b25dc2a51f7b05a60a (diff) |
mib17: rebase to OOO330_m2
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/docvw/SidebarTxtControlAcc.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.cxx | 24 |
3 files changed, 18 insertions, 10 deletions
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx index 8b0f0293367c..bd613fc7c031 100644 --- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx @@ -80,7 +80,7 @@ class SidebarTextEditSource : public SvxEditSource, SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl ) : SvxEditSource() , mrSidebarTxtControl( rSidebarTxtControl ) - , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL ) + , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE ) , mViewForwarder( *(rSidebarTxtControl.GetTextView()) ) { if ( mrSidebarTxtControl.GetTextView() ) diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index e2e59e17831e..7b5741316cbb 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2261,7 +2261,7 @@ KEYINPUT_CHECKTABLE_INSDEL: BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); - BOOL bRunNext = pACorr->HasRunNext(); + BOOL bRunNext = pACorr && pACorr->HasRunNext(); if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && pACfg->IsAutoFmtByInput() && (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) && diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 934cfc19e22b..0c7d7909ad7a 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -398,7 +398,9 @@ bGrammarResults(false) { DBG_ASSERT(xSpellAlt.is(), "no spelling alternatives available"); - CreateAutoMnemonics(); +// CreateAutoMnemonics(); + SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + nCheckedLanguage = LANGUAGE_NONE; if (xSpellAlt.is()) { @@ -471,7 +473,8 @@ bGrammarResults(false) } pMenu = GetPopupMenu(MN_ADD_TO_DIC); - pMenu->CreateAutoMnemonics(); +// pMenu->CreateAutoMnemonics(); + pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below bEnable = FALSE; // enable MN_ADD_TO_DIC? uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); if (xDicList.is()) @@ -572,7 +575,6 @@ bGrammarResults(false) ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); - SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); } /*-------------------------------------------------------------------------- @@ -599,7 +601,8 @@ aInfo16( SW_RES(IMG_INFO_16) ) InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ ); SetItemImage( MN_SHORT_COMMENT, aInfo16 ); - CreateAutoMnemonics(); +// CreateAutoMnemonics(); + SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); InsertSeparator( nPos++ ); sal_Int32 nStringCount = aSuggestions.getLength(); @@ -705,7 +708,6 @@ aInfo16( SW_RES(IMG_INFO_16) ) ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); - SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); } /*-------------------------------------------------------------------------- @@ -821,12 +823,18 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); - USHORT nDicIdx = nId - MN_DICTIONARIES_START; DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); - if (nDicIdx < aDics.getLength()) + PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); + String aDicName ( pMenu->GetItemText(nId) ); + + uno::Reference< linguistic2::XDictionary > xDic; + uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); + if (xDicList.is()) + xDic = xDicList->getDictionaryByName( aDicName ); + + if (xDic.is()) { - uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx]; INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); |