From 88dd798c08158af747b143b3c4994a184224f13b Mon Sep 17 00:00:00 2001 From: Maxime de Roucy Date: Thu, 8 Mar 2012 14:49:58 +0100 Subject: add SCWARN_EXPORT_MAXTAB and SCWARN_EXPORT_MAXCOL Create separate warnings when the maximum number of row, columns or sheets is reach in the export filter to xls forma. --- sc/inc/scerrors.hxx | 4 +++- sc/source/filter/excel/expop2.cxx | 7 +++++-- sc/source/ui/src/scerrors.src | 8 ++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'sc') diff --git a/sc/inc/scerrors.hxx b/sc/inc/scerrors.hxx index 735f7ba12970..fc6b9cbfbe4d 100644 --- a/sc/inc/scerrors.hxx +++ b/sc/inc/scerrors.hxx @@ -68,7 +68,9 @@ #define SCWARN_EXPORT_NONCONVERTIBLE_CHARS ( 1 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) #define SCWARN_EXPORT_ASCII ( 2 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) #define SCWARN_EXPORT_MAXROW ( 3 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) -#define SCWARN_EXPORT_DATALOST ( 4 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) +#define SCWARN_EXPORT_MAXCOL ( 4 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) +#define SCWARN_EXPORT_MAXTAB ( 5 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) +#define SCWARN_EXPORT_DATALOST ( 6 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) // ERRCODE_CLASS_GENERAL #define SCWARN_CORE_HARD_RECALC ( 1 | ERRCODE_CLASS_GENERAL | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC ) diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index a8a4ce1828b1..ab31d97a2cc3 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -124,10 +124,13 @@ FltError ExportBiff5::Write() sfx2::SaveOlePropertySet(xDocProps, xRootStrg ); } - //! TODO: separate warnings for columns and sheets const XclExpAddressConverter& rAddrConv = GetAddressConverter(); - if( rAddrConv.IsColTruncated() || rAddrConv.IsRowTruncated() || rAddrConv.IsTabTruncated() ) + if( rAddrConv.IsRowTruncated() ) return SCWARN_EXPORT_MAXROW; + if( rAddrConv.IsColTruncated() ) + return SCWARN_EXPORT_MAXCOL; + if( rAddrConv.IsTabTruncated() ) + return SCWARN_EXPORT_MAXTAB; return eERR_OK; } diff --git a/sc/source/ui/src/scerrors.src b/sc/source/ui/src/scerrors.src index 2a2e2ad47169..f77dcf006393 100644 --- a/sc/source/ui/src/scerrors.src +++ b/sc/source/ui/src/scerrors.src @@ -150,6 +150,14 @@ Resource RID_ERRHDLSC { Text [ en-US ] = "The document contains more rows than supported in the selected format.\nAdditional rows were not saved." ; }; + String SCWARN_EXPORT_MAXCOL & ERRCODE_RES_MASK + { + Text [ en-US ] = "The document contains more columns than supported in the selected format.\nAdditional columns were not saved." ; + }; + String SCWARN_EXPORT_MAXTAB & ERRCODE_RES_MASK + { + Text [ en-US ] = "The document contains more sheets than supported in the selected format.\nAdditional sheets were not saved." ; + }; String SCWARN_IMPORT_INFOLOST & ERRCODE_RES_MASK { Text [ en-US ] = "The document contains information not recognized by this program version.\nResaving the document will delete this information!" ; -- cgit