From bfee80f469b7d7b83b9213298efe093d65dad9f5 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 6 Apr 2001 13:37:54 +0000 Subject: #85721# store forbidden characters with document --- sc/source/core/data/column2.cxx | 6 +- sc/source/core/data/documen2.cxx | 6 +- sc/source/core/data/documen9.cxx | 23 +++++++- sc/source/ui/app/inputhdl.cxx | 7 ++- sc/source/ui/docshell/docsh2.cxx | 34 +++++++++++- sc/source/ui/unoobj/confuno.cxx | 75 ++++++++++++++----------- sc/source/ui/unoobj/docuno.cxx | 12 +++- sc/source/ui/unoobj/forbiuno.cxx | 117 +++++++++++++++++++++++++++++++++++++++ sc/source/ui/unoobj/makefile.mk | 6 +- sc/source/ui/unoobj/servuno.cxx | 9 ++- sc/source/ui/view/output2.cxx | 9 ++- 11 files changed, 254 insertions(+), 50 deletions(-) create mode 100644 sc/source/ui/unoobj/forbiuno.cxx (limited to 'sc/source') diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index e9c7057115ce..26ed48e40351 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: column2.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-11-23 20:29:33 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:31:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,6 +72,7 @@ #include #include #include +#include #include #include #include @@ -1353,6 +1354,7 @@ void ScColumn::RemoveEditAttribs( USHORT nStartRow, USHORT nEndRow ) pEngine = new ScFieldEditEngine( pDocument->GetEditPool() ); // EE_CNTRL_ONLINESPELLING falls schon Fehler drin sind pEngine->SetControlWord( pEngine->GetControlWord() | EE_CNTRL_ONLINESPELLING ); + pEngine->SetForbiddenCharsTable( pDocument->GetForbiddenCharacters() ); } pEngine->SetText( *pData ); USHORT nParCount = pEngine->GetParagraphCount(); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 724c47794a35..05d49b8d69a3 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: documen2.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: sab $ $Date: 2001-02-22 18:06:27 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:31:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -252,6 +252,7 @@ #include "scitems.hxx" #include +#include #include #include #include @@ -600,6 +601,7 @@ ScFieldEditEngine& ScDocument::GetEditEngine() pEditEngine->SetUpdateMode( FALSE ); pEditEngine->EnableUndo( FALSE ); pEditEngine->SetRefMapMode( MAP_100TH_MM ); + pEditEngine->SetForbiddenCharsTable( xForbiddenCharacters ); } return *pEditEngine; } diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index e74635c5fcab..0f02689dcde1 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -2,9 +2,9 @@ * * $RCSfile: documen9.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: sab $ $Date: 2001-04-05 15:53:33 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:31:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,6 +70,7 @@ #include "scitems.hxx" #include #include +#include #include #include #include @@ -100,6 +101,7 @@ #include "docpool.hxx" #include "chartarr.hxx" #include "detfunc.hxx" // for UpdateAllComments +#include "editutil.hxx" // ----------------------------------------------------------------------- @@ -282,6 +284,8 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) UpdateDrawPrinter(); if (bImportingXML) pDrawLayer->EnableAdjust(FALSE); + + pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); } } @@ -850,3 +854,18 @@ void ScDocument::SetImportingXML( BOOL bVal ) pDrawLayer->EnableAdjust(!bImportingXML); } +vos::ORef ScDocument::GetForbiddenCharacters() +{ + return xForbiddenCharacters; +} + +void ScDocument::SetForbiddenCharacters( const vos::ORef xNew ) +{ + xForbiddenCharacters = xNew; + if ( pEditEngine ) + pEditEngine->SetForbiddenCharsTable( xForbiddenCharacters ); + if ( pDrawLayer ) + pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); +} + + diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 84ccbad6476b..e5b661f7a00e 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: inputhdl.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: nn $ $Date: 2001-03-23 13:52:19 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:32:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,6 +75,7 @@ #include #include #include +#include #include #include #include @@ -486,6 +487,8 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) nCntrl |= EE_CNTRL_AUTOCORRECT; if ( nCntrl != nOld ) pEngine->SetControlWord(nCntrl); + + pEngine->SetForbiddenCharsTable( pViewData->GetDocument()->GetForbiddenCharacters() ); } // language is set separately, so the speller is needed only if online 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 #include #include +#include +#include +#include @@ -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 aLocales = aAsian.GetStartEndCharLocales(); + if (aLocales.getLength()) + { + vos::ORef 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 ); + } + } } //------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 6c07b559220a..dc3141c46a63 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: confuno.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: sab $ $Date: 2001-04-05 18:13:29 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:36:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,8 +71,11 @@ #include "scdll.hxx" #include "docsh.hxx" #include "miscuno.hxx" +#include "forbiuno.hxx" #include "viewopti.hxx" +#include + #ifndef _SFX_PRINTER_HXX #include #endif @@ -82,7 +85,9 @@ using namespace com::sun::star; -#define SCDOCUMENTCONFIGURATION_SERVICE "com.sun.star.sheet.DocumentConfiguration" +#define SCCOMPSCPREADSHEETSETTINGS_SERVICE "com.sun.star.comp.SpreadsheetSettings" +#define SCDOCUMENTSETTINGS_SERVICE "com.sun.star.document.Settings" + const SfxItemPropertyMap* lcl_GetConfigPropertyMap() { @@ -107,6 +112,7 @@ const SfxItemPropertyMap* lcl_GetConfigPropertyMap() {MAP_CHAR_LEN(SC_UNO_AUTOCALC), 0, &getBooleanCppuType(), 0}, {MAP_CHAR_LEN(SC_UNO_PRINTERNAME), 0, &getCppuType((rtl::OUString*)0), 0}, {MAP_CHAR_LEN(SC_UNO_APPLYDOCINF), 0, &getBooleanCppuType(), 0}, + {MAP_CHAR_LEN(SC_UNO_FORBIDDEN), 0, &getCppuType((uno::Reference*)0), beans::PropertyAttribute::READONLY}, {0,0,0,0} }; return aConfigPropertyMap_Impl; @@ -121,11 +127,6 @@ ScDocumentConfiguration::ScDocumentConfiguration(ScDocShell* pDocSh) pDocShell->GetDocument()->AddUnoObject(*this); } -ScDocumentConfiguration::ScDocumentConfiguration() - : aPropSet ( lcl_GetConfigPropertyMap() ) -{ -} - ScDocumentConfiguration::~ScDocumentConfiguration() { if (pDocShell) @@ -143,28 +144,6 @@ void ScDocumentConfiguration::Notify( SfxBroadcaster& rBC, const SfxHint& rHint } } -uno::Reference SAL_CALL ScDocumentConfiguration_CreateInstance( - const uno::Reference& rSMgr ) -{ - ScUnoGuard aGuard; - SC_DLL()->Load(); // load module - static uno::Reference xInst = (cppu::OWeakObject*)new ScDocumentConfiguration(); - return xInst; -} - -rtl::OUString ScDocumentConfiguration::getImplementationName_Static() -{ - return rtl::OUString::createFromAscii( "stardiv.StarCalc.ScDocumentConfiguration" ); -} - -uno::Sequence ScDocumentConfiguration::getSupportedServiceNames_Static() -{ - uno::Sequence aRet(1); - rtl::OUString* pArray = aRet.getArray(); - pArray[0] = rtl::OUString::createFromAscii( SCDOCUMENTCONFIGURATION_SERVICE ); - return aRet; -} - // XPropertySet uno::Reference SAL_CALL ScDocumentConfiguration::getPropertySetInfo() @@ -241,6 +220,10 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( } else if ( aPropertyName.compareToAscii( SC_UNO_APPLYDOCINF ) == 0 ) pDocShell->GetDocInfo().SetUseUserData( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); + else if ( aPropertyName.compareToAscii( SC_UNO_FORBIDDEN ) == 0 ) + { + // read-only - should not be set + } else { ScGridOptions aGridOpt(aViewOpt.GetGridOptions()); @@ -317,6 +300,11 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString } else if ( aPropertyName.compareToAscii( SC_UNO_APPLYDOCINF ) == 0 ) ScUnoHelpFunctions::SetBoolInAny( aRet, pDocShell->GetDocInfo().IsUseUserData() ); + else if ( aPropertyName.compareToAscii( SC_UNO_FORBIDDEN ) == 0 ) + { + uno::Reference xForbidden = new ScForbiddenCharsObj( pDocShell ); + aRet <<= xForbidden; + } else { const ScGridOptions& aGridOpt = aViewOpt.GetGridOptions(); @@ -348,6 +336,31 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString } SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDocumentConfiguration ) -SC_SIMPLE_SERVICE_INFO( ScDocumentConfiguration, "ScDocumentConfiguration", SCDOCUMENTCONFIGURATION_SERVICE ) + +// XServiceInfo + +rtl::OUString SAL_CALL ScDocumentConfiguration::getImplementationName() throw(uno::RuntimeException) +{ + return rtl::OUString::createFromAscii( "ScDocumentConfiguration" ); +} + +sal_Bool SAL_CALL ScDocumentConfiguration::supportsService( const rtl::OUString& rServiceName ) + throw(uno::RuntimeException) +{ + String aServiceStr( rServiceName ); + return aServiceStr.EqualsAscii( SCCOMPSCPREADSHEETSETTINGS_SERVICE ) || + aServiceStr.EqualsAscii( SCDOCUMENTSETTINGS_SERVICE ); +} + +uno::Sequence SAL_CALL ScDocumentConfiguration::getSupportedServiceNames() + throw(uno::RuntimeException) +{ + uno::Sequence aRet(2); + rtl::OUString* pArray = aRet.getArray(); + pArray[0] = rtl::OUString::createFromAscii( SCCOMPSCPREADSHEETSETTINGS_SERVICE ); + pArray[1] = rtl::OUString::createFromAscii( SCDOCUMENTSETTINGS_SERVICE ); + return aRet; +} //------------------------------------------------------------------------- + diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 5ef84afcaa0e..0319ef14747d 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docuno.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: sab $ $Date: 2001-04-05 16:09:23 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:36:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,6 +80,7 @@ #include #include #include +#include #include "docuno.hxx" #include "cellsuno.hxx" @@ -93,6 +94,7 @@ #include "targuno.hxx" #include "convuno.hxx" #include "optuno.hxx" +#include "forbiuno.hxx" #include "docsh.hxx" #include "hints.hxx" #include "docfunc.hxx" @@ -127,6 +129,7 @@ const SfxItemPropertyMap* lcl_GetDocOptPropertyMap() {MAP_CHAR_LEN(SC_UNO_COLLABELRNG), 0, &getCppuType((uno::Reference*)0), 0}, {MAP_CHAR_LEN(SC_UNO_DDELINKS), 0, &getCppuType((uno::Reference*)0), 0}, {MAP_CHAR_LEN(SC_UNO_DEFTABSTOP), 0, &getCppuType((sal_Int16*)0), 0}, + {MAP_CHAR_LEN(SC_UNO_FORBIDDEN), 0, &getCppuType((uno::Reference*)0), beans::PropertyAttribute::READONLY}, {MAP_CHAR_LEN(SC_UNO_IGNORECASE), 0, &getBooleanCppuType(), 0}, {MAP_CHAR_LEN(SC_UNO_ITERENABLED), 0, &getBooleanCppuType(), 0}, {MAP_CHAR_LEN(SC_UNO_ITERCOUNT), 0, &getCppuType((sal_Int32*)0), 0}, @@ -935,6 +938,11 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa sal_Bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : sal_False; ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoControlFocus ); } + else if ( aString.EqualsAscii( SC_UNO_FORBIDDEN ) ) + { + uno::Reference xForbidden = new ScForbiddenCharsObj( pDocShell ); + aRet <<= xForbidden; + } } return aRet; diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx new file mode 100644 index 000000000000..e175ef753500 --- /dev/null +++ b/sc/source/ui/unoobj/forbiuno.cxx @@ -0,0 +1,117 @@ +/************************************************************************* + * + * $RCSfile: forbiuno.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: nn $ $Date: 2001-04-06 14:34:23 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PCH +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include + +#include "forbiuno.hxx" +#include "docsh.hxx" + +using namespace ::com::sun::star; + +//------------------------------------------------------------------------ + +vos::ORef lcl_GetForbidden( ScDocShell* pDocSh ) +{ + vos::ORef xRet; + if ( pDocSh ) + xRet = pDocSh->GetDocument()->GetForbiddenCharacters(); + return xRet; +} + +ScForbiddenCharsObj::ScForbiddenCharsObj( ScDocShell* pDocSh ) : + SvxUnoForbiddenCharsTable( lcl_GetForbidden( pDocSh ) ), + pDocShell( pDocSh ) +{ + if (pDocShell) + pDocShell->GetDocument()->AddUnoObject(*this); +} + +ScForbiddenCharsObj::~ScForbiddenCharsObj() +{ + if (pDocShell) + pDocShell->GetDocument()->RemoveUnoObject(*this); +} + +void ScForbiddenCharsObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) +{ + if ( rHint.ISA( SfxSimpleHint ) && + ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING ) + { + pDocShell = NULL; // document gone + } +} + +void ScForbiddenCharsObj::onChange() +{ + if (pDocShell) + { + pDocShell->GetDocument()->SetForbiddenCharacters( mxForbiddenChars ); + pDocShell->PostPaintGridAll(); + pDocShell->SetDocumentModified(); + } +} + diff --git a/sc/source/ui/unoobj/makefile.mk b/sc/source/ui/unoobj/makefile.mk index 02fc86403551..44b5ae944d4f 100644 --- a/sc/source/ui/unoobj/makefile.mk +++ b/sc/source/ui/unoobj/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.8 $ +# $Revision: 1.9 $ # -# last change: $Author: sab $ $Date: 2001-03-29 05:39:48 $ +# last change: $Author: nn $ $Date: 2001-04-06 14:36:18 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -105,6 +105,7 @@ CXXFILES = \ chartuno.cxx \ shapeuno.cxx \ pageuno.cxx \ + forbiuno.cxx \ styleuno.cxx \ afmtuno.cxx \ fmtuno.cxx \ @@ -138,6 +139,7 @@ SLOFILES = \ $(SLO)$/chartuno.obj \ $(SLO)$/shapeuno.obj \ $(SLO)$/pageuno.obj \ + $(SLO)$/forbiuno.obj \ $(SLO)$/styleuno.obj \ $(SLO)$/afmtuno.obj \ $(SLO)$/fmtuno.obj \ diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 92c6a00db955..54daaa969908 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: servuno.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: sab $ $Date: 2001-03-29 05:34:13 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:36:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -112,7 +112,8 @@ static const sal_Char* __FAR_DATA aProvNames[SC_SERVICE_COUNT] = "com.sun.star.text.NumberingRules", // SC_SERVICE_NUMRULES "com.sun.star.sheet.Defaults", // SC_SERVICE_DOCDEFLTS "com.sun.star.drawing.Defaults", // SC_SERVICE_DRAWDEFLTS - "com.sun.star.sheet.DocumentConfiguration" // SC_SERVICE_DOCCONF + "com.sun.star.comp.SpreadsheetSettings", // SC_SERVICE_DOCSPRSETT + "com.sun.star.document.Settings" // SC_SERVICE_DOCCONF }; // @@ -144,6 +145,7 @@ static const sal_Char* __FAR_DATA aOldNames[SC_SERVICE_COUNT] = "", // SC_SERVICE_NUMRULES "", // SC_SERVICE_DOCDEFLTS "", // SC_SERVICE_DRAWDEFLTS + "", // SC_SERVICE_DOCSPRSETT "" // SC_SERVICE_DOCCONF }; @@ -260,6 +262,7 @@ uno::Reference ScServiceProvider::MakeInstance( if (pDocShell) xRet = SvxCreateNumRule( pDocShell->MakeDrawLayer() ); break; + case SC_SERVICE_DOCSPRSETT: case SC_SERVICE_DOCCONF: if (pDocShell) xRet = (beans::XPropertySet*)new ScDocumentConfiguration(pDocShell); diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index d521294d345e..3eb770089daf 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: output2.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-11-23 20:24:45 $ + * last change: $Author: nn $ $Date: 2001-04-06 14:33:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,7 @@ #include #include #include +#include #include #include #include @@ -671,6 +672,8 @@ inline BOOL StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAtt return TRUE; else if ( &rpNewPattern->GetItem( ATTR_ROTATE_VALUE ) != &rpOldPattern->GetItem( ATTR_ROTATE_VALUE ) ) return TRUE; + else if ( &rpNewPattern->GetItem( ATTR_FORBIDDEN_RULES ) != &rpOldPattern->GetItem( ATTR_FORBIDDEN_RULES ) ) + return TRUE; else { rpOldPattern = rpNewPattern; @@ -1564,6 +1567,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic, double nScaleX, double nScaleY) if ( eType == OUTTYPE_PRINTER ) nCtrl &= ~EE_CNTRL_MARKFIELDS; pEngine->SetControlWord( nCtrl ); + pEngine->SetForbiddenCharsTable( pDoc->GetForbiddenCharacters() ); } else lcl_ClearEdit( *pEngine ); @@ -2316,6 +2320,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) if ( eType == OUTTYPE_PRINTER ) nCtrl &= ~EE_CNTRL_MARKFIELDS; pEngine->SetControlWord( nCtrl ); + pEngine->SetForbiddenCharsTable( pDoc->GetForbiddenCharacters() ); } else lcl_ClearEdit( *pEngine ); -- cgit