From 2f3b47ec80235318c4d9f843b2ef52e01611fa5c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 18 Apr 2024 10:52:21 +0200 Subject: [PATCH] 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 Reviewed-by: Noel Grandin --- 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(-) 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 #include -extern sal_Int32 rStyleIdx; // Holds index of the style (Will be reset by finalize import) +extern sal_Int32 gnStyleIdx; // Holds index of the 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 style index. + gnStyleIdx = 0; // Resets 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 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); }