summaryrefslogtreecommitdiff
path: root/sc/source/filter/inc
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2021-06-02 09:17:02 +0200
committerLászló Németh <nemeth@numbertext.org>2021-06-21 10:46:17 +0200
commit11cc770ad2af1f31c1e5c9512e5688dff38f009b (patch)
treed6fe3d8bcee57f73cb57c5362383757cc92e03c7 /sc/source/filter/inc
parentb30e329bfac7279d888908273baec8c7d8dd32ee (diff)
tdf#142607 XLSX export: keep formatted dates in standard filter
Do not convert the formatted string filter criteria values to 'double' if they are numbers (dates). Also export the equal relation criteria into XML_filters tag instead of XML_customFilters. Previously the formatted dates replaced with numbers in standard filter criteria, first during the export, and after the import, in the standard filter dialog window. Note: fix and optimize also filtering by formatted dates by allowing CanOptimizeQueryStringToNumber() to create double values for them. This unifies the same dates with different date formatting. Follow-up to commit 1f755525189884e4b2824889a6b9dea8933402db "tdf#142402 sc UI: store formatted values in standard filter". Change-Id: If4c22e8b0142720ccfda038f89367061058693aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116566 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/source/filter/inc')
-rw-r--r--sc/source/filter/inc/excrecds.hxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index e997be8958e6..2e4885a8856d 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -338,7 +338,6 @@ class ExcFilterCondition
private:
sal_uInt8 nType;
sal_uInt8 nOper;
- double fVal;
std::unique_ptr<XclExpString>
pText;
@@ -350,7 +349,7 @@ public:
bool IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); }
std::size_t GetTextBytes() const;
- void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, const OUString* pT );
+ void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, const OUString* pT );
void Save( XclExpStream& rStrm );
void SaveXml( XclExpXmlStream& rStrm );
@@ -376,8 +375,7 @@ private:
std::vector<std::pair<::Color, bool>> maColorValues; // first->Color, second->bIsBackgroundColor (vs. TextColor)
bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType,
- sal_uInt8 nOp, double fVal, const OUString* pText,
- bool bSimple = false );
+ sal_uInt8 nOp, const OUString* pText, bool bSimple = false );
virtual void WriteBody( XclExpStream& rStrm ) override;