summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-07-22 13:00:15 +0200
committerJens-Heiner Rechtien <hr@openoffice.org>2010-07-22 13:00:15 +0200
commit67ea3a4eed50df6f6b968b925e8bb9ebc35af668 (patch)
tree6f51932caffb680038c97831241f86519951edac /editeng
parent3d7da49196d04ad091f66528edb6efa3b36972cd (diff)
parentde432231c123abae12659a4776047f11205f23db (diff)
CWS-TOOLING: integrate CWS tl81_OOO330
Diffstat (limited to 'editeng')
-rwxr-xr-xediteng/source/editeng/editview.cxx10
-rwxr-xr-xediteng/source/editeng/impedit2.cxx12
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/unolingu.cxx3
3 files changed, 12 insertions, 13 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 642b5e0d9f17..664512df414e 100755
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1044,7 +1044,8 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
{
PopupMenu aPopupMenu( EditResId( RID_MENU_SPELL ) );
PopupMenu *pAutoMenu = aPopupMenu.GetPopupMenu( MN_AUTOCORR );
- PopupMenu *pInsertMenu = aPopupMenu.GetPopupMenu( MN_INSERT );
+ PopupMenu *pInsertMenu = aPopupMenu.GetPopupMenu( MN_INSERT ); // add word to user-dictionaries
+ pInsertMenu->SetMenuFlags( MENU_FLAG_NOAUTOMNEMONICS ); //! necessary to retrieve the correct dictionary names later
EditPaM aPaM2( aPaM );
aPaM2.GetIndex()++;
@@ -1261,7 +1262,12 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
}
else if ( nId >= MN_DICTSTART )
{
- Reference< XDictionary > xDic( pDic[nId - MN_DICTSTART], UNO_QUERY );
+ String aDicName ( pInsertMenu->GetItemText(nId) );
+
+ uno::Reference< linguistic2::XDictionary > xDic;
+ if (xDicList.is())
+ xDic = xDicList->getDictionaryByName( aDicName );
+
if (xDic.is())
xDic->add( aSelected, sal_False, String() );
// save modified user-dictionary if it is persistent
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 778942730e71..148ca08816ae 100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4209,18 +4209,8 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT
DBG_ERROR("svx::ImpEditEngine::GetXPos(), index out of range!");
}
-#if 0
+ // old code restored see #i112788 (which leaves #i74188 unfixed again)
long nPosInPortion = pLine->GetCharPosArray().GetObject( nPos );
-#else
- // #i74188# (positioning the cursor after deleting components of combined indic characters)
- SvxFont aTmpFont( pParaPortion->GetNode()->GetCharAttribs().GetDefFont() );
- SeekCursor( pParaPortion->GetNode(), nPos+1, aTmpFont );
- aTmpFont.SetPhysFont( GetRefDevice() );
- ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() );
- String sSegment(*pParaPortion->GetNode(), pLine->GetStart(), nPos+1);
- long nPosInPortion = aTmpFont.QuickGetTextSize( GetRefDevice(),
- sSegment, 0, nPos+1, NULL ).Width();
-#endif
if ( !pPortion->IsRightToLeft() )
{
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index e95ce560023b..ae92fd1a01b8 100644..100755
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -1197,7 +1197,10 @@ uno::Reference< XDictionary > LinguMgr::GetStandard()
// add new dictionary to list
if (xTmp.is())
+ {
xTmpDicList->addDictionary( xTmp );
+ xTmp->setActive( sal_True );
+ }
xDic = uno::Reference< XDictionary > ( xTmp, UNO_QUERY );
}
#if OSL_DEBUG_LEVEL > 1