summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh2.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2001-04-06 13:37:54 +0000
committerNiklas Nebel <nn@openoffice.org>2001-04-06 13:37:54 +0000
commitbfee80f469b7d7b83b9213298efe093d65dad9f5 (patch)
tree493de4c2900d770d5c853be2f812181cec18781f /sc/source/ui/docshell/docsh2.cxx
parenta1f0cbc48543532c5e4f2f966acc217f75588cf3 (diff)
#85721# store forbidden characters with document
Diffstat (limited to 'sc/source/ui/docshell/docsh2.cxx')
-rw-r--r--sc/source/ui/docshell/docsh2.cxx34
1 files changed, 32 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 2d6489faf1f8..bd2627c15e09 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docsh2.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: nn $ $Date: 2001-02-08 15:02:10 $
+ * last change: $Author: nn $ $Date: 2001-04-06 14:37:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -325,6 +325,9 @@
#include <svx/svdoole2.hxx>
#include <vcl/svapp.hxx>
#include <offmgr/app.hxx>
+#include <svx/asiancfg.hxx>
+#include <svx/forbiddencharacterstable.hxx>
+#include <svx/unolingu.hxx>
@@ -340,6 +343,8 @@
#include "docfunc.hxx"
#include "sc.hrc"
+using namespace com::sun::star;
+
//------------------------------------------------------------------
BOOL __EXPORT ScDocShell::InitNew( SvStorage * pStor )
@@ -423,6 +428,31 @@ void ScDocShell::InitItems()
PutItem( SvxColorTableItem( OFF_APP()->GetStdColorTable() ) );
}
+
+ if ( !aDocument.GetForbiddenCharacters().isValid() )
+ {
+ // set forbidden characters if necessary
+ SvxAsianConfig aAsian;
+ uno::Sequence<lang::Locale> aLocales = aAsian.GetStartEndCharLocales();
+ if (aLocales.getLength())
+ {
+ vos::ORef<SvxForbiddenCharactersTable> xForbiddenTable =
+ new SvxForbiddenCharactersTable( aDocument.GetServiceManager() );
+
+ const lang::Locale* pLocales = aLocales.getConstArray();
+ for (sal_Int32 i = 0; i < aLocales.getLength(); i++)
+ {
+ i18n::ForbiddenCharacters aForbidden;
+ aAsian.GetStartEndChars( pLocales[i], aForbidden.beginLine, aForbidden.endLine );
+ LanguageType eLang = SvxLocaleToLanguage(pLocales[i]);
+ //pDoc->SetForbiddenCharacters( eLang, aForbidden );
+
+ xForbiddenTable->SetForbiddenCharacters( eLang, aForbidden );
+ }
+
+ aDocument.SetForbiddenCharacters( xForbiddenTable );
+ }
+ }
}
//------------------------------------------------------------------