summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-03-13 15:06:14 +0100
committerEike Rathke <erack@redhat.com>2017-03-13 15:08:21 +0100
commitb306f535c0f76820dfe2cd221603def8a079f159 (patch)
tree6b814cbba60a66c60a98f3055919b0fea185f857 /svl
parentf2b4d849715b5dfcbaf422846327fd41d3576ba1 (diff)
force SvNumberformat::FormatterPrivateAccess for Get/SetLastInsertKey
... so only SvNumberFormatter can use it, as intended. Change-Id: I91875dfd00d1f83b3ae988bda922782336489f73
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9266c4399ea0..294777360c2e 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -514,7 +514,7 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
delete pOldEntry;
}
pFormatScanner->SetConvertMode(false);
- pStdFormat->SetLastInsertKey( sal_uInt16(nLastKey - nCLOffset) );
+ pStdFormat->SetLastInsertKey( sal_uInt16(nLastKey - nCLOffset), SvNumberformat::FormatterPrivateAccess() );
// append new system additional formats
css::uno::Reference< css::i18n::XNumberFormatCode > xNFC = i18n::NumberFormatMapper::create( m_xContext );
@@ -605,7 +605,7 @@ bool SvNumberFormatter::PutEntry(OUString& rString,
else
{
SvNumberformat* pStdFormat = GetFormatEntry(CLOffset + ZF_STANDARD);
- sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey();
+ sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey( SvNumberformat::FormatterPrivateAccess() );
if (nPos+1 - CLOffset >= SV_COUNTRY_LANGUAGE_OFFSET)
{
SAL_WARN( "svl.numbers", "SvNumberFormatter::PutEntry: too many formats for CL");
@@ -620,7 +620,7 @@ bool SvNumberFormatter::PutEntry(OUString& rString,
{
bCheck = true;
nKey = nPos+1;
- pStdFormat->SetLastInsertKey((sal_uInt16) (nKey-CLOffset));
+ pStdFormat->SetLastInsertKey((sal_uInt16) (nKey-CLOffset), SvNumberformat::FormatterPrivateAccess());
}
}
}
@@ -2265,7 +2265,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
}
pStdFormat->SetType( css::util::NumberFormat::NUMBER );
pStdFormat->SetStandard();
- pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE );
+ pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE, SvNumberformat::FormatterPrivateAccess() );
}
else
{
@@ -2683,7 +2683,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
SAL_WARN( "svl.numbers", "ImpGenerateAdditionalFormats: no GENERAL format" );
return ;
}
- sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey();
+ sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey( SvNumberformat::FormatterPrivateAccess() );
css::lang::Locale aLocale = GetLanguageTag().getLocale();
sal_Int32 j;
@@ -2751,7 +2751,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
}
}
- pStdFormat->SetLastInsertKey( (sal_uInt16)(nPos - CLOffset) );
+ pStdFormat->SetLastInsertKey( (sal_uInt16)(nPos - CLOffset), SvNumberformat::FormatterPrivateAccess() );
}
@@ -3114,7 +3114,7 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter
else
{
SvNumberformat* pStdFormat = GetFormatEntry(nCLOffset + ZF_STANDARD);
- sal_uInt32 nPos = nCLOffset + pStdFormat->GetLastInsertKey();
+ sal_uInt32 nPos = nCLOffset + pStdFormat->GetLastInsertKey( SvNumberformat::FormatterPrivateAccess() );
nNewKey = nPos+1;
if (nNewKey - nCLOffset >= SV_COUNTRY_LANGUAGE_OFFSET)
{
@@ -3128,7 +3128,8 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter
}
else
{
- pStdFormat->SetLastInsertKey((sal_uInt16) (nNewKey - nCLOffset));
+ pStdFormat->SetLastInsertKey((sal_uInt16) (nNewKey - nCLOffset),
+ SvNumberformat::FormatterPrivateAccess());
}
}
if (nNewKey != nOldKey) // new index