From b306f535c0f76820dfe2cd221603def8a079f159 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 13 Mar 2017 15:06:14 +0100 Subject: force SvNumberformat::FormatterPrivateAccess for Get/SetLastInsertKey ... so only SvNumberFormatter can use it, as intended. Change-Id: I91875dfd00d1f83b3ae988bda922782336489f73 --- include/svl/zformat.hxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/svl') diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index cfb3e3a97368..85250ac23e08 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -226,10 +226,11 @@ public: sal_uInt16 GetFormatIntegerDigits() const { return NumFor[0].Info().nCntPre; } //! Read/write access on a special sal_uInt16 component, may only be used on the - //! standard format 0, 5000, ... and only by the number formatter! - sal_uInt16 GetLastInsertKey() const + //! standard format 0, 10000, ... and only by the number formatter! + struct FormatterPrivateAccess { friend SvNumberFormatter; private: FormatterPrivateAccess() {} }; + sal_uInt16 GetLastInsertKey( const FormatterPrivateAccess& ) const { return NumFor[0].Info().nThousand; } - void SetLastInsertKey(sal_uInt16 nKey) + void SetLastInsertKey( sal_uInt16 nKey, const FormatterPrivateAccess& ) { NumFor[0].Info().nThousand = nKey; } //! Only onLoad: convert from stored to current system language/country -- cgit