diff options
author | Eike Rathke <erack@redhat.com> | 2017-03-13 15:06:14 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-03-13 15:08:21 +0100 |
commit | b306f535c0f76820dfe2cd221603def8a079f159 (patch) | |
tree | 6b814cbba60a66c60a98f3055919b0fea185f857 /include | |
parent | f2b4d849715b5dfcbaf422846327fd41d3576ba1 (diff) |
force SvNumberformat::FormatterPrivateAccess for Get/SetLastInsertKey
... so only SvNumberFormatter can use it, as intended.
Change-Id: I91875dfd00d1f83b3ae988bda922782336489f73
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/zformat.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
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 |