diff options
-rw-r--r-- | sc/inc/scerrors.hxx | 7 | ||||
-rw-r--r-- | sc/inc/xmlwrap.hxx | 9 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldrani.cxx | 20 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 38 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlsubti.cxx | 27 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 127 | ||||
-rw-r--r-- | sc/source/ui/src/scerrors.src | 83 |
7 files changed, 261 insertions, 50 deletions
diff --git a/sc/inc/scerrors.hxx b/sc/inc/scerrors.hxx index bc99e3dbcfe2..c23544128857 100644 --- a/sc/inc/scerrors.hxx +++ b/sc/inc/scerrors.hxx @@ -2,9 +2,9 @@ * * $RCSfile: scerrors.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: er $ $Date: 2001-07-20 18:47:36 $ + * last change: $Author: sab $ $Date: 2001-10-08 08:03:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,6 +82,9 @@ #define SCWARN_IMPORT_OPEN_FM3 ( 13 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) #define SCWARN_IMPORT_WRONG_FM3 ( 14 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) #define SCWARN_IMPORT_INFOLOST ( 15 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) +#define SCERR_IMPORT_FILE_ROWCOL ( 16 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC ) +#define SCERR_IMPORT_FORMAT_ROWCOL ( 17 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC ) +#define SCWARN_IMPORT_FILE_ROWCOL ( 18 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) // ERRCODE_CLASS_WRITE - file related, displays "Write-Error" in MsgBox #define SCERR_EXPORT_CONNECT ( 1 | ERRCODE_CLASS_WRITE | ERRCODE_AREA_SC ) diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx index 7a4247b0ed8d..c6684b467f4b 100644 --- a/sc/inc/xmlwrap.hxx +++ b/sc/inc/xmlwrap.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlwrap.hxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: sab $ $Date: 2001-07-26 14:08:37 $ + * last change: $Author: sab $ $Date: 2001-10-08 08:03:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,12 +87,13 @@ class ScXMLImportWrapper com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel); com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> GetStatusIndicator(); - sal_Bool ImportFromComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory, + sal_uInt32 ImportFromComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory, com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xXMLParser, com::sun::star::xml::sax::InputSource& aParserInput, const rtl::OUString& sComponentName, const rtl::OUString& sDocName, const rtl::OUString& sOldDocName, - com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs); + com::sun::star::uno::Sequence<com::sun::star::uno::Any>& aArgs, + sal_Bool bMustBeSuccessfull); sal_Bool ExportToComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceFactory, com::sun::star::uno::Reference<com::sun::star::frame::XModel>& xModel, diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx index 8164c3951143..0245f38fb579 100644 --- a/sc/source/filter/xml/xmldrani.cxx +++ b/sc/source/filter/xml/xmldrani.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmldrani.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: sab $ $Date: 2001-09-25 10:37:31 $ + * last change: $Author: sab $ $Date: 2001-10-08 08:06:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -98,6 +98,9 @@ #ifndef _XMLOFF_XMLUCONV_HXX #include <xmloff/xmluconv.hxx> #endif +#ifndef _XMLOFF_XMLERROR_HXX +#include <xmloff/xmlerror.hxx> +#endif #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XDatabaseRanges.hpp> #include <com/sun/star/sheet/XDatabaseRange.hpp> @@ -108,6 +111,9 @@ #ifndef _COM_SUN_STAR_UNO_RUNTIMEEXCEPTION_HPP_ #include <com/sun/star/uno/RuntimeException.hpp> #endif +#ifndef _COM_SUN_STAR_XML_SAX_XLOCATOR_HPP_ +#include <com/sun/star/xml/sax/XLocator.hpp> +#endif #define SC_ENABLEUSERSORTLIST "EnableUserSortList" #define SC_USERSORTLISTINDEX "UserSortListIndex" @@ -348,9 +354,17 @@ void ScXMLDatabaseRangeContext::EndElement() { xDatabaseRanges->addNewByName(sDatabaseRangeName, aCellRangeAddress); } - catch ( uno::RuntimeException& ) + catch ( uno::RuntimeException& rRuntimeException ) { bInsert = sal_False; + rtl::OUString sErrorMessage(RTL_CONSTASCII_USTRINGPARAM("DatabaseRange ")); + sErrorMessage += sDatabaseRangeName; + sErrorMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" could not be created with the range ")); + sErrorMessage += sRangeAddress; + uno::Sequence<rtl::OUString> aSeq(1); + aSeq[0] = sErrorMessage; + uno::Reference<xml::sax::XLocator> xLocator; + GetScImport().SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rRuntimeException.Message, xLocator); } if (bInsert) { diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 85e9f1538f9f..789564932125 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlimprt.cxx,v $ * - * $Revision: 1.70 $ + * $Revision: 1.71 $ * - * last change: $Author: sab $ $Date: 2001-09-27 11:12:54 $ + * last change: $Author: sab $ $Date: 2001-10-08 08:06:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,6 +95,9 @@ #ifndef _XMLOFF_XMLTOKEN_HXX #include <xmloff/xmltoken.hxx> #endif +#ifndef _XMLOFF_XMLERROR_HXX +#include <xmloff/xmlerror.hxx> +#endif #include "xmlimprt.hxx" #include "document.hxx" @@ -1917,13 +1920,13 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const rtl::OUString& rCurrency) { - rtl::OUString sTemp; uno::Reference <util::XNumberFormatsSupplier> xNumberFormatsSupplier = GetNumberFormatsSupplier(); if (xNumberFormatsSupplier.is()) { uno::Reference <util::XNumberFormats> xNumberFormats = xNumberFormatsSupplier->getNumberFormats(); if (xNumberFormats.is()) { + rtl::OUString sFormatString; try { uno::Reference <beans::XPropertySet> xProperties = xNumberFormats->getByKey(nKey); @@ -1944,14 +1947,21 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const rtl::OUStri aBuffer.append(rCurrency); aBuffer.appendAscii("]"); UnlockSolarMutex(); - sTemp = aBuffer.makeStringAndClear(); - return xNumberFormats->addNew(sTemp, aLocale); + sFormatString = aBuffer.makeStringAndClear(); + return xNumberFormats->addNew(sFormatString, aLocale); } } } - catch ( uno::Exception& ) + catch ( util::MalformedNumberFormatException& rException ) { - DBG_ERROR("Numberformat not found"); + rtl::OUString sErrorMessage(RTL_CONSTASCII_USTRINGPARAM("Fehler im Formatstring ")); + sErrorMessage += sFormatString; + sErrorMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" an Position ")); + sErrorMessage += rtl::OUString::valueOf(rException.CheckPos); + uno::Sequence<rtl::OUString> aSeq(1); + aSeq[0] = sErrorMessage; + uno::Reference<xml::sax::XLocator> xLocator; + SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rException.Message, xLocator); } } } @@ -1966,18 +1976,14 @@ sal_Bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const rtl: uno::Reference <util::XNumberFormats> xNumberFormats = xNumberFormatsSupplier->getNumberFormats(); if (xNumberFormats.is()) { - try + uno::Reference <beans::XPropertySet> xNumberPropertySet = xNumberFormats->getByKey(nNumberFormat); + if (xNumberPropertySet.is()) { - uno::Reference <beans::XPropertySet> xNumberPropertySet = xNumberFormats->getByKey(nNumberFormat); uno::Any aCurrencySymbol = xNumberPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_CURRENCYSYMBOL))); rtl::OUString sTemp; if ( aCurrencySymbol >>= sTemp) return sCurrencySymbol.equals(sTemp); } - catch ( uno::Exception& ) - { - DBG_ERROR("Numberformat not found"); - } } } return sal_False; @@ -2013,7 +2019,7 @@ void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties, if (xNumberFormatsSupplier.is()) xNumberFormats = xNumberFormatsSupplier->getNumberFormats(); } - try + if (xNumberFormats.is()) { uno::Reference < beans::XPropertySet> xNumberFormatProperties = xNumberFormats->getByKey(rNumberFormat); if (xNumberFormatProperties.is()) @@ -2041,10 +2047,6 @@ void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties, } } } - catch ( uno::Exception& ) - { - DBG_ERROR("Numberformat not found"); - } } else { diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx index d86c6a971405..cbdb8c5d7c71 100644 --- a/sc/source/filter/xml/xmlsubti.cxx +++ b/sc/source/filter/xml/xmlsubti.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlsubti.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: sab $ $Date: 2001-09-25 10:37:31 $ + * last change: $Author: sab $ $Date: 2001-10-08 08:06:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,6 +89,9 @@ #ifndef _XMLOFF_XMLUCONV_HXX #include <xmloff/xmluconv.hxx> #endif +#ifndef _XMLOFF_XMLERROR_HXX +#include <xmloff/xmlerror.hxx> +#endif #ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETDOCUMENT_HPP_ #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> @@ -265,7 +268,7 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, const rtl::OUString& { xSheets->insertNewByName(sTableName, nCurrentSheet); } - catch ( uno::RuntimeException& ) + catch ( uno::RuntimeException& rRuntimeException ) { ScDocument *pDoc = ScXMLConverter::GetScDocument(rImport.GetModel()); if (pDoc) @@ -276,6 +279,14 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, const rtl::OUString& rtl::OUString sOUTabName(sTabName); xSheets->insertNewByName(sOUTabName, nCurrentSheet); rImport.UnlockSolarMutex(); + rtl::OUString sErrorMessage(RTL_CONSTASCII_USTRINGPARAM("Could not create a table with the name ")); + sErrorMessage += sTableName; + sErrorMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(". The new name is ")); + sErrorMessage += sOUTabName; + uno::Sequence<rtl::OUString> aSeq(1); + aSeq[0] = sErrorMessage; + uno::Reference<xml::sax::XLocator> xLocator; + rImport.SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rRuntimeException.Message, xLocator); } } } @@ -294,7 +305,7 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, const rtl::OUString& { xNamed->setName(sTableName); } - catch ( uno::RuntimeException& ) + catch ( uno::RuntimeException& rRuntimeException ) { ScDocument *pDoc = ScXMLConverter::GetScDocument(rImport.GetModel()); if (pDoc) @@ -305,6 +316,14 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, const rtl::OUString& rtl::OUString sOUTabName(sTabName); xNamed->setName(sOUTabName); rImport.UnlockSolarMutex(); + rtl::OUString sErrorMessage(RTL_CONSTASCII_USTRINGPARAM("Could not create a table with the name ")); + sErrorMessage += sTableName; + sErrorMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(". The new name is ")); + sErrorMessage += sOUTabName; + uno::Sequence<rtl::OUString> aSeq(1); + aSeq[0] = sErrorMessage; + uno::Reference<xml::sax::XLocator> xLocator; + rImport.SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rRuntimeException.Message, xLocator); } } } diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index d0ed258e9bda..6490afb73b61 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlwrap.cxx,v $ * - * $Revision: 1.38 $ + * $Revision: 1.39 $ * - * last change: $Author: sab $ $Date: 2001-08-03 18:38:43 $ + * last change: $Author: sab $ $Date: 2001-10-08 08:06:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -136,6 +136,9 @@ #ifndef __GLOBSTR_HRC_ #include "globstr.hrc" #endif +#ifndef _SCERRORS_HXX +#include "scerrors.hxx" +#endif #ifndef SEQTYPE #if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500) @@ -208,11 +211,12 @@ uno::Reference <task::XStatusIndicator> ScXMLImportWrapper::GetStatusIndicator() return xStatusIndicator; } -sal_Bool ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiServiceFactory>& xServiceFactory, +sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiServiceFactory>& xServiceFactory, uno::Reference<frame::XModel>& xModel, uno::Reference<uno::XInterface>& xXMLParser, xml::sax::InputSource& aParserInput, const rtl::OUString& sComponentName, const rtl::OUString& sDocName, - const rtl::OUString& sOldDocName, uno::Sequence<uno::Any>& aArgs) + const rtl::OUString& sOldDocName, uno::Sequence<uno::Any>& aArgs, + sal_Bool bMustBeSuccessfull) { SvStorageStreamRef xDocStream; if ( !pStorage && pMedium ) @@ -299,7 +303,70 @@ sal_Bool ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiServ { xParser->parseStream( aParserInput ); } - catch( xml::sax::SAXParseException e ) + catch( xml::sax::SAXParseException& r ) + { + if( bEncrypted ) + return ERRCODE_SFX_WRONGPASSWORD; + +#ifdef DEBUG + ByteString aError( "SAX parse exception catched while importing:\n" ); + aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); + DBG_ERROR( aError.GetBuffer() ); +#endif + + String sErr( String::CreateFromInt32( r.LineNumber )); + sErr += ','; + sErr += String::CreateFromInt32( r.ColumnNumber ); + + if( sDocName.getLength() ) + { + return *new TwoStringErrorInfo( + (bMustBeSuccessfull ? SCERR_IMPORT_FILE_ROWCOL + : SCWARN_IMPORT_FILE_ROWCOL), + sDocName, sErr, + ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); + } + else + { + DBG_ASSERT( bMustBeSuccessfull, "Warnings are not supported" ); + return *new StringErrorInfo( SCERR_IMPORT_FORMAT_ROWCOL, sErr, + ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); + } + } + catch( xml::sax::SAXException& r ) + { + if( bEncrypted ) + return ERRCODE_SFX_WRONGPASSWORD; + +#ifdef DEBUG + ByteString aError( "SAX exception catched while importing:\n" ); + aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); + DBG_ERROR( aError.GetBuffer() ); +#endif + return SCERR_IMPORT_FORMAT; + } + catch( io::IOException& r ) + { +#ifdef DEBUG + ByteString aError( "IO exception catched while importing:\n" ); + aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); + DBG_ERROR( aError.GetBuffer() ); +#endif + return SCERR_IMPORT_OPEN; + } + catch( uno::Exception& r ) + { +#ifdef DEBUG + ByteString aError( "uno exception catched while importing:\n" ); + aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); + DBG_ERROR( aError.GetBuffer() ); +#endif + return SCERR_IMPORT_UNKNOWN; + } + + // success! + return 0; +/* catch( xml::sax::SAXParseException e ) { bRet = sal_False; bFormatError = sal_True; @@ -325,7 +392,7 @@ sal_Bool ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiServ pMedium->SetError( ERRCODE_SFX_WRONGPASSWORD ); } - return bRet; + return bRet;*/ } sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly) @@ -379,6 +446,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly) xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ProgressRange")), aProgRange); } + sal_uInt32 nMetaRetval(0); if(!bStylesOnly) { uno::Sequence<uno::Any> aMetaArgs(1); @@ -387,10 +455,11 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly) RTL_LOGFILE_CONTEXT_TRACE( aLog, "meta import start" ); - sal_Bool bMetaRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, + nMetaRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLMetaImporter")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("meta.xml")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Meta.xml")), aMetaArgs); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Meta.xml")), aMetaArgs, + sal_False); RTL_LOGFILE_CONTEXT_TRACE( aLog, "meta import end" ); } @@ -420,33 +489,34 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly) pStylesArgs[2] <<= xObjectResolver; pStylesArgs[3] <<= xInfoSet; - sal_Bool bStylesRetval(sal_False); + sal_uInt32 nStylesRetval(0); { RTL_LOGFILE_CONTEXT_TRACE( aLog, "styles import start" ); - bStylesRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, + nStylesRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLStylesImporter")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("styles.xml")), - sEmpty, aStylesArgs); + sEmpty, aStylesArgs, sal_True); RTL_LOGFILE_CONTEXT_TRACE( aLog, "styles import end" ); } + sal_uInt32 nSettingsRetval(0); if (!bStylesOnly) { uno::Sequence<uno::Any> aSettingsArgs(0); RTL_LOGFILE_CONTEXT_TRACE( aLog, "settings import start" ); - sal_Bool bSettingsRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, + nSettingsRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLSettingsImporter")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("settings.xml")), - sEmpty, aSettingsArgs); + sEmpty, aSettingsArgs, sal_False); RTL_LOGFILE_CONTEXT_TRACE( aLog, "settings import end" ); } - sal_Bool bDocRetval(sal_False); + sal_uInt32 nDocRetval(0); if (!bStylesOnly) { uno::Sequence<uno::Any> aDocArgs(4); @@ -458,10 +528,11 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly) RTL_LOGFILE_CONTEXT_TRACE( aLog, "content import start" ); - bDocRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, + nDocRetval = ImportFromComponent(xServiceFactory, xModel, xXMLParser, aParserInput, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLContentImporter")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content.xml")), aDocArgs); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content.xml")), aDocArgs, + sal_True); RTL_LOGFILE_CONTEXT_TRACE( aLog, "content import end" ); } @@ -474,8 +545,30 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly) if (xStatusIndicator.is()) xStatusIndicator->end(); + sal_Bool bRet(sal_False); + if (bStylesOnly) + { + if (nStylesRetval) + pStorage->SetError(nStylesRetval); + else + bRet = sal_True; + } + else + { + if (nDocRetval) + pStorage->SetError(nDocRetval); + else if (nStylesRetval) + pStorage->SetError(nStylesRetval); + else if (nMetaRetval) + pStorage->SetError(nMetaRetval); + else if (nSettingsRetval) + pStorage->SetError(nSettingsRetval); + else + bRet = sal_True; + } + // Don't test bStylesRetval and bMetaRetval, because it could be an older file which not contain such streams - return !bStylesOnly ? bDocRetval : bStylesRetval; + return bRet;//!bStylesOnly ? bDocRetval : bStylesRetval; } return sal_False; } diff --git a/sc/source/ui/src/scerrors.src b/sc/source/ui/src/scerrors.src index 88ad12b3f3ae..3d356a0870c2 100644 --- a/sc/source/ui/src/scerrors.src +++ b/sc/source/ui/src/scerrors.src @@ -2,9 +2,9 @@ * * $RCSfile: scerrors.src,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: kz $ $Date: 2001-07-26 22:39:12 $ + * last change: $Author: sab $ $Date: 2001-10-08 08:09:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -388,6 +388,59 @@ Resource RID_ERRHDLSC Text[ catalan ] = "El archivo contiene datos por debajo de la fila 8192, por lo que no puede ser ledo."; Text[ finnish ] = "Tss tiedostossa on tietoja rivin 8192 jlkeen, joten tiedostoa ei voida lukea."; }; + String SCERR_IMPORT_FILE_ROWCOL & SH_MAX + { + TEXT = "Formatfehler in Teildokument $(ARG1) an Position $(ARG2)(Zeile,Spalte) in der Datei entdeckt" ; + TEXT [ English ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)" ; + TEXT[ english_us ] = "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ portuguese ] = "Erro de formato no sub-documento $(ARG1) do ficheiro, na posio $(ARG2)(linha,coluna)"; + TEXT[ russian ] = " $(ARG1) $(ARG2)(, ) ."; + TEXT[ greek ] = " $(ARG1) $(ARG2)(, )"; + TEXT[ dutch ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ french ] = "Erreur de format dans le sous-document $(ARG1), position $(ARG2)(ligne,colonne), du fichier."; + TEXT[ spanish ] = "En el documento parcial $(ARG1) del archivo existe un error de formato en la posicin $(ARG2)(fila,columna)"; + TEXT[ italian ] = "Errore di formato nel sottodocumento $(ARG1) del file nel punto $(ARG2)(riga,colonna)"; + TEXT[ danish ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ swedish ] = "Det har upptckts ett formatfel i filen: deldokument $(ARG1), position $(ARG2)(rad,kolumn)"; + TEXT[ polish ] = "Wykryto bd w formacie dokumentu podrzdnego $(ARG1) na pozycji $(ARG2)(wiersz, kolumna)"; + TEXT[ portuguese_brazilian ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ japanese ] = "ファイルの $(ARG2)(行、列)にある部分ドキュメント $(ARG1) に書式エラーが見つかりました。"; + TEXT[ korean ] = "파일의 $(ARG2)(행, 열)위치에 있는 부분 문서 $(ARG1)의 포맷 오류 발견"; + TEXT[ chinese_simplified ] = "发现文件的子文档$(ARG1)内含错误,位置在 $(ARG2)(行,列)"; + TEXT[ chinese_traditional ] = "發現檔案的子文件$(ARG1)內含錯誤,位置在 $(ARG2)(行,欄)"; + TEXT[ turkish ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ arabic ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ catalan ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ finnish ] = "Formatfehler in Teildokument $(ARG1) an Position $(ARG2)(Zeile,Spalte) in der Datei entdeckt"; + Text[ language_user1 ] = "should be the same text like in the writer"; + }; + String SCERR_IMPORT_FORMAT_ROWCOL & SH_MAX + { + TEXT = "Formatfehler an Position $(ARG1)(Zeile,Spalte) in der Datei entdeckt" ; + TEXT [ English ] = "File format error at $(ARG1)(row,col)" ; + Text [ english_us ] = "File format error found at $(ARG1)(row,col)" ; + Text [ italian ] = " stato trovato un errore di formato nel file alla posizione $(ARG1)(riga, colonna)" ; + Text [ spanish ] = "Se ha descubierto un error de formato en el archivo en la posicin $(ARG1)(fila,columna)" ; + Text [ french ] = "Erreur de format la position $(ARG1)(ligne,colonne) du fichier" ; + Text [ dutch ] = "Formaatfout ontdekt op positie $(ARG1)(cel,kolom) in het bestand" ; + Text [ swedish ] = "Formatfel vid position $(ARG1)(rad,kolumn) upptckt i filen" ; + Text [ danish ] = "Der blev opdaget en formatfejl i filen p position $(ARG1)(rkke,spalte)" ; + Text [ portuguese ] = "Descoberto erro de formato na posio $(ARG1)(linha, coluna) do ficheiro" ; + Text [ portuguese_brazilian ] = "Formatfehler an Position $(ARG1)(Zeile,Spalte) in der Datei entdeckt" ; + Text[ chinese_simplified ] = "文件格式错误 $(ARG1)(行,列)"; + Text[ russian ] = " $(ARG1)(,) "; + Text[ polish ] = "Znaleziono w pliku bd formatu przy pozycji $(ARG1)(Wiersz, kolumna)"; + Text[ japanese ] = "ファイルの $(ARG1)(行、列)に書式エラーが見つかりました。"; + Text[ chinese_traditional ] = "檔案格式錯誤 $(ARG1)(行,列)"; + Text[ arabic ] = " $(ARG1)(ѡ) "; + Text[ greek ] = " $(ARG1)(,) "; + Text[ korean ] = "파일서식 오류가 $(ARG1)(행,열)에서 발견되었습니다."; + Text[ turkish ] = "Dosya format hatas $(ARG1)(satr, stun) bulundu"; + Text[ catalan ] = "Se ha descubierto un error de formato en el archivo en la posicin $(ARG1)(fila,columna)"; + Text[ finnish ] = "Tiedostomuotovirhe ilmeni kohteessa $(ARG1)(rivi,sarake)"; + Text[ language_user1 ] = "should be the same text like in the writer"; + }; + // Export ---------------------------------------------------- String SCERR_EXPORT_CONNECT & SH_MAX { @@ -683,6 +736,32 @@ Resource RID_ERRHDLSC Text[ arabic ] = "The following characters could not be converted to the selected character set\nand were written as Ӓ surrogates:\n\n$(ARG1)"; Text[ catalan ] = "The following characters could not be converted to the selected character set\nand were written as Ӓ surrogates:\n\n$(ARG1)"; }; + String SCWARN_IMPORT_FILE_ROWCOL & SH_MAX + { + TEXT = "Formatfehler in Teildokument $(ARG1) an Position $(ARG2)(Zeile,Spalte) in der Datei entdeckt" ; + TEXT [ English ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)" ; + TEXT[ english_us ] = "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ portuguese ] = "Erro de formato no sub-documento $(ARG1) do ficheiro, na posio(ARG2)(linha,coluna)"; + TEXT[ russian ] = " $(ARG1) $(ARG2)(,) ."; + TEXT[ greek ] = " $(ARG1) $(ARG2)(,)"; + TEXT[ dutch ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ french ] = "Erreur de format dans le sous-document $(ARG1), position $(ARG2)(ligne,colonne), du fichier."; + TEXT[ spanish ] = "En el documento parcial $(ARG1) del archivo existe un error de formato en la posicin $(ARG2)(fila,columna)"; + TEXT[ italian ] = "Errore di formato nel sottodocumento $(ARG1) del file nel punto $(ARG2)(riga,colonna)"; + TEXT[ danish ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ swedish ] = "Det har upptckts ett formatfel i filen: deldokument $(ARG1), position $(ARG2)(rad,kolumn)"; + TEXT[ polish ] = "Wykryto bd w formacie dokumentu podrzdnego $(ARG1) na pozycji $(ARG2)(wiersz, kolumna)"; + TEXT[ portuguese_brazilian ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ japanese ] = "ファイルの $(ARG2)(行、列) にある部分ドキュメント $(ARG1) に書式エラーが見つかりました。"; + TEXT[ korean ] = "파일의 $(ARG2)(행,열) 위치에 있는 부분 문서 $(ARG1)의 포맷 오류 발견"; + TEXT[ chinese_simplified ] = "发现文件的子文档$(ARG1)内含错误,位置在 $(ARG2)(行,列)"; + TEXT[ chinese_traditional ] = "發現檔案的子文件$(ARG1)內含錯誤,位置在 $(ARG2)(行,欄)"; + TEXT[ turkish ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ arabic ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ catalan ] = "File format error in sub-document $(ARG1) at $(ARG2)(row,col)"; + TEXT[ finnish ] = "Formatfehler in Teildokument $(ARG1) an Position $(ARG2)(Zeile,Spalte) in der Datei entdeckt"; + Text[ language_user1 ] = "should be the same text like in the writer"; + }; }; |