diff options
author | Sascha Ballach <sab@openoffice.org> | 2001-04-23 16:27:57 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2001-04-23 16:27:57 +0000 |
commit | a7ad29076e142b09de4565c8257323d927bc22fd (patch) | |
tree | a376a73b078e5ef70235a25331b70ea4e9cbb1aa /sc | |
parent | 803227d93c593f350683b9e412f4e486d3aad05f (diff) |
add export/import of refresh-delay on database range
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 11 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldrani.cxx | 19 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldrani.hxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.hxx | 7 |
5 files changed, 32 insertions, 15 deletions
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index 5b317a999b76..0d4f8cdb3b2a 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLExportDatabaseRanges.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sab $ $Date: 2001-04-03 06:06:30 $ + * last change: $Author: sab $ $Date: 2001-04-23 17:27:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -753,6 +753,13 @@ void ScXMLExportDatabaseRanges::WriteDatabaseRanges(const com::sun::star::uno::R rExport.AddAttributeASCII(XML_NAMESPACE_TABLE, sXML_orientation, sXML_column); } } + sal_Int32 nRefresh( pDBData->GetRefreshDelay() ); + if( nRefresh ) + { + rtl::OUStringBuffer sBuffer; + SvXMLUnitConverter::convertTime( sBuffer, (double)nRefresh / 86400 ); + rExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_refresh_delay, sBuffer.makeStringAndClear() ); + } SvXMLElementExport aElemDR(rExport, XML_NAMESPACE_TABLE, sXML_database_range, sal_True, sal_True); rExport.CheckAttrList(); WriteImportDescriptor(xDatabaseRange->getImportDescriptor()); diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx index a063ee8b5fd2..a894ab552853 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.11 $ + * $Revision: 1.12 $ * - * last change: $Author: er $ $Date: 2001-04-23 09:44:43 $ + * last change: $Author: sab $ $Date: 2001-04-23 17:27:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -93,6 +93,9 @@ #include <xmloff/xmltkmap.hxx> #include <xmloff/nmspmap.hxx> #include <xmloff/xmlkywd.hxx> +#ifndef _XMLOFF_XMLUCONV_HXX +#include <xmloff/xmluconv.hxx> +#endif #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XDatabaseRanges.hpp> #include <com/sun/star/sheet/XDatabaseRange.hpp> @@ -157,6 +160,7 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : SvXMLImportContext( rImport, nPrfx, rLName ), + nRefresh(0), bIsSelection(sal_False), bKeepFormats(sal_False), bMoveCells(sal_False), @@ -240,6 +244,13 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport, sRangeAddress = sValue; } break; + case XML_TOK_DATABASE_RANGE_ATTR_REFRESH_DELAY : + { + double fTime; + if( SvXMLUnitConverter::convertTime( fTime, sValue ) ) + nRefresh = Max( (sal_Int32)(fTime * 86400.0), (sal_Int32)0 ); + } + break; } } } @@ -435,10 +446,6 @@ void ScXMLDatabaseRangeContext::EndElement() } if ( pDBData->HasImportParam() && !pDBData->HasImportSelection() ) { - ULONG nRefresh = 0; -//!!!!!!! -//! TODO: (erAck 23.04.01) export/import refresh delay -//!!!!!!! pDBData->SetRefreshDelay( nRefresh ); pDBData->SetRefreshHandler( pDBCollection->GetRefreshHandler() ); pDBData->SetRefreshControl( pDoc->GetRefreshTimerControlAddress() ); diff --git a/sc/source/filter/xml/xmldrani.hxx b/sc/source/filter/xml/xmldrani.hxx index 288ee8c4b740..b2329c1e8909 100644 --- a/sc/source/filter/xml/xmldrani.hxx +++ b/sc/source/filter/xml/xmldrani.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmldrani.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: nn $ $Date: 2001-03-16 14:16:31 $ + * last change: $Author: sab $ $Date: 2001-04-23 17:27:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -125,6 +125,7 @@ class ScXMLDatabaseRangeContext : public SvXMLImportContext com::sun::star::table::CellAddress aFilterOutputPosition; com::sun::star::table::CellRangeAddress aFilterConditionSourceRangeAddress; com::sun::star::sheet::DataImportMode nSourceType; + sal_Int32 nRefresh; sal_Int16 nSubTotalsUserListIndex; sal_Int16 nSubTotalRuleGroupFieldNumber; sal_Bool bNative : 1; diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 739be88361cd..5bded6c53dc9 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.51 $ + * $Revision: 1.52 $ * - * last change: $Author: nn $ $Date: 2001-04-06 14:47:00 $ + * last change: $Author: sab $ $Date: 2001-04-23 17:27:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -570,6 +570,7 @@ static __FAR_DATA SvXMLTokenMapEntry aDatabaseRangeAttrTokenMap[] = { XML_NAMESPACE_TABLE, sXML_contains_header, XML_TOK_DATABASE_RANGE_ATTR_CONTAINS_HEADER }, { XML_NAMESPACE_TABLE, sXML_display_filter_buttons, XML_TOK_DATABASE_RANGE_ATTR_DISPLAY_FILTER_BUTTONS }, { XML_NAMESPACE_TABLE, sXML_target_range_address, XML_TOK_DATABASE_RANGE_ATTR_TARGET_RANGE_ADDRESS }, + { XML_NAMESPACE_TABLE, sXML_refresh_delay, XML_TOK_DATABASE_RANGE_ATTR_REFRESH_DELAY }, XML_TOKEN_MAP_END }; diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index c58788bbb692..57cdc105e681 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlimprt.hxx,v $ * - * $Revision: 1.45 $ + * $Revision: 1.46 $ * - * last change: $Author: dr $ $Date: 2001-04-05 10:57:41 $ + * last change: $Author: sab $ $Date: 2001-04-23 17:27:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -398,7 +398,8 @@ enum ScXMLDatabaseRangeAttrTokens XML_TOK_DATABASE_RANGE_ATTR_ORIENTATION, XML_TOK_DATABASE_RANGE_ATTR_CONTAINS_HEADER, XML_TOK_DATABASE_RANGE_ATTR_DISPLAY_FILTER_BUTTONS, - XML_TOK_DATABASE_RANGE_ATTR_TARGET_RANGE_ADDRESS + XML_TOK_DATABASE_RANGE_ATTR_TARGET_RANGE_ADDRESS, + XML_TOK_DATABASE_RANGE_ATTR_REFRESH_DELAY }; enum ScXMLDatabaseRangeSourceSQLAttrTokens |