sc/source/filter/inc/extlstcontext.hxx | 2 +- sc/source/filter/oox/condformatbuffer.cxx | 2 +- sc/source/filter/oox/extlstcontext.cxx | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 2f3b47ec80235318c4d9f843b2ef52e01611fa5c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Apr 18 10:52:21 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Apr 19 10:16:19 2024 +0200 rename rStyleIdx -> gnStyleIdx to make it obvious we are dealing with nasty global state here Change-Id: I7f2193600a6459c3a5cd51fece8151ac46aebe7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166242 Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/filter/inc/extlstcontext.hxx b/sc/source/filter/inc/extlstcontext.hxx index 077ebdbebf8e..c8c3f5ddb355 100644 --- a/sc/source/filter/inc/extlstcontext.hxx +++ b/sc/source/filter/inc/extlstcontext.hxx @@ -16,7 +16,7 @@ #include <vector> #include <memory> -extern sal_Int32 rStyleIdx; // Holds index of the <extlst> <cfRule> style (Will be reset by finalize import) +extern sal_Int32 gnStyleIdx; // Holds index of the <extlst> <cfRule> style (Will be reset by finalize import) struct ScDataBarFormatData; namespace oox { class AttributeList; } diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index d1ee97ca70ac..2b212352eaa7 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1354,7 +1354,7 @@ void CondFormatBuffer::finalizeImport() ++nExtCFIndex; } - rStyleIdx = 0; // Resets <extlst> <cfRule> style index. + gnStyleIdx = 0; // Resets <extlst> <cfRule> style index. } CondFormatRef CondFormatBuffer::importCondFormatting( SequenceInputStream& rStrm ) diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index d6af04240572..9e542b744b7f 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -30,7 +30,7 @@ using ::oox::core::ContextHandlerRef; using ::oox::xls::CondFormatBuffer; -sal_Int32 rStyleIdx = 0; +sal_Int32 gnStyleIdx = 0; // Holds index of the <extlst> <cfRule> style (Will be reset by finalize import) namespace oox::xls { @@ -292,10 +292,10 @@ void ExtConditionalFormattingContext::onEndElement() maModel.eOperator = ScConditionMode::Direct; } - if (Dxf* pDxf = getStyles().getExtDxfs().get(rStyleIdx).get()) + if (Dxf* pDxf = getStyles().getExtDxfs().get(gnStyleIdx).get()) pDxf->finalizeImport(); - maModel.aStyle = getStyles().createExtDxfStyle(rStyleIdx); - rStyleIdx++; + maModel.aStyle = getStyles().createExtDxfStyle(gnStyleIdx); + gnStyleIdx++; nFormulaCount = 0; maModels.push_back(maModel); }