summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2019-10-17 20:33:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-03 17:11:32 +0100
commit48101a1a0d574db3db1f99c782bd67e885b232bb (patch)
treeafd2f88944d73f43762b3a31df2ff81c8115ba9e /include/xmloff
parentab285c743afa1c8769581871d7b56374fd8c49f1 (diff)
size some stringbuffer to prevent re-alloc
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512. Change-Id: I55fe36b31cd3d40f86e5729337a927cf920f2af6 Reviewed-on: https://gerrit.libreoffice.org/81960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/xmloff')
-rw-r--r--include/xmloff/xmlnumfi.hxx4
-rw-r--r--include/xmloff/xmluconv.hxx3
2 files changed, 5 insertions, 2 deletions
diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx
index de071b6ec624..4a1eaca5b256 100644
--- a/include/xmloff/xmlnumfi.hxx
+++ b/include/xmloff/xmlnumfi.hxx
@@ -132,8 +132,8 @@ class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext
bool bAutoDec; // set in AddNumber
bool bAutoInt; // set in AddNumber
bool bHasExtraText;
- OUStringBuffer aFormatCode;
- OUStringBuffer aConditions;
+ OUStringBuffer aFormatCode{64};
+ OUStringBuffer aConditions{32};
bool bHasLongDoW;
bool bHasEra;
bool bHasDateTime;
diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx
index cc7c4736e6c7..d791f6cb633d 100644
--- a/include/xmloff/xmluconv.hxx
+++ b/include/xmloff/xmluconv.hxx
@@ -119,6 +119,9 @@ public:
void convertMeasureToXML( OUStringBuffer& rBuffer,
sal_Int32 nMeasure ) const;
+ /** convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit */
+ OUString convertMeasureToXML( sal_Int32 nMeasure ) const;
+
/** convert string to enum using given enum map, if the enum is
not found in the map, this method will return false */
template<typename EnumT>