summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-10-24 09:24:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-10-25 08:21:10 +0200
commit621caf93ce15a49a5f08599e45b047de08ee223d (patch)
tree9bd7163dd3c9a58c0275646792c8989e3190a780 /sfx2
parenta958e09409b94b97c0d0aa67dd605d321dc42615 (diff)
speedup saving large XLS file with lots of query formula(2)
reduce cost of OUString construction by avoiding initialising a temporary and then overwriting it. 12s to 10s Change-Id: I889152ba71947004ca7d5c96f073182c94d95ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175539 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 7d433aa7329e..b42e8261194c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1218,8 +1218,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
sal_uInt32 nIndex = aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM );
if ( seqValue.hasElements() )
{
- OUString sValue;
- aNumberFormatter.GetInputLineString( seqValue[0], nIndex, sValue );
+ OUString sValue = aNumberFormatter.GetInputLineString( seqValue[0], nIndex );
m_xShowSizeFT->set_label( CreateSizeText( sValue.toInt64( ) ) );
}
}
@@ -1926,7 +1925,7 @@ void CustomPropertiesWindow::ReloadLinesContent()
else if (rAny >>= nTmpValue)
{
sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex(NF_NUMBER_SYSTEM);
- m_aNumberFormatter.GetInputLineString(nTmpValue, nIndex, sValue);
+ sValue = m_aNumberFormatter.GetInputLineString(nTmpValue, nIndex);
pLine->m_xValueEdit->set_text(sValue);
nType = Custom_Type_Number;
}
@@ -2314,8 +2313,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM );
for (const auto& rValue : seqValue)
{
- OUString sValue;
- m_aNumberFormatter.GetInputLineString( rValue, nIndex, sValue );
+ OUString sValue = m_aNumberFormatter.GetInputLineString( rValue, nIndex );
std::unique_ptr<CmisValue> pValue(new CmisValue(m_xBox.get(), sValue));
pValue->m_xValueEdit->set_editable(bUpdatable);
pNewLine->m_aValues.push_back( std::move(pValue) );
@@ -2328,8 +2326,7 @@ void CmisPropertiesWindow::AddLine( const OUString& sId, const OUString& sName,
sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM );
for (const auto& rValue : seqValue)
{
- OUString sValue;
- m_aNumberFormatter.GetInputLineString( rValue, nIndex, sValue );
+ OUString sValue = m_aNumberFormatter.GetInputLineString( rValue, nIndex );
std::unique_ptr<CmisValue> pValue(new CmisValue(m_xBox.get(), sValue));
pValue->m_xValueEdit->set_editable(bUpdatable);
pNewLine->m_aValues.push_back( std::move(pValue) );