summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell/docshel3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/docshell/docshel3.cxx')
-rw-r--r--sd/source/ui/docshell/docshel3.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 35f8a38ebe0d..f9c5eb47b5ee 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -121,7 +121,8 @@ static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString &rLangua
for( size_t nObj = 0; nObj < nObjCount; ++nObj )
{
SdrObject *pObj = pPage->GetObj( nObj );
- lcl_setLanguageForObj( pObj, nLang, bLanguageNone );
+ if (pObj->GetObjIdentifier() != OBJ_PAGE)
+ lcl_setLanguageForObj( pObj, nLang, bLanguageNone );
}
}
}
@@ -297,6 +298,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
const OUString aDocumentLangPrefix("Default_");
const OUString aStrNone("LANGUAGE_NONE");
const OUString aStrResetLangs("RESET_LANGUAGES");
+ SdDrawDocument* pDoc = mpViewShell->GetDoc();
sal_Int32 nPos = -1;
if (-1 != (nPos = aNewLangTxt.indexOf( aDocumentLangPrefix )))
{
@@ -307,11 +309,18 @@ void DrawDocShell::Execute( SfxRequest& rReq )
break;
}
if (aNewLangTxt == aStrNone)
- lcl_setLanguage( mpViewShell->GetDoc(), OUString() );
+ lcl_setLanguage( pDoc, OUString(), true );
else if (aNewLangTxt == aStrResetLangs)
- lcl_setLanguage( mpViewShell->GetDoc(), OUString(), true );
+ lcl_setLanguage( pDoc, OUString() );
else
- lcl_setLanguage( mpViewShell->GetDoc(), aNewLangTxt );
+ lcl_setLanguage( pDoc, aNewLangTxt );
+
+ mpViewShell->GetFrame()->GetBindings().Invalidate( SID_LANGUAGE_STATUS );
+
+ if ( pDoc->GetOnlineSpell() )
+ {
+ pDoc->StartOnlineSpelling();
+ }
}
}
}