diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-09-03 16:47:06 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-09-03 19:32:28 +0200 |
commit | f12050bfb15580b564e342b704d5c55128fac644 (patch) | |
tree | e4a825d72c93548bf7ec39e7a8325855d58b288e /include | |
parent | 07dcb0dab759d4ab535d99c0e6d326959906b87e (diff) |
Make ImpSvNumberformatScan::GetColor const
Change-Id: Idbcce18029944ab884cdde03e21190cbb574a00f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102005
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/zforlist.hxx | 10 | ||||
-rw-r--r-- | include/svl/zformat.hxx | 12 | ||||
-rw-r--r-- | include/svx/numfmtsh.hxx | 10 | ||||
-rw-r--r-- | include/vcl/formatter.hxx | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index 2cc857b5e6cb..2639ac138998 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -551,13 +551,13 @@ public: /// Format a number according to a format index, return string and color void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex, - OUString& sOutString, Color** ppColor, bool bUseStarFormat = false ); + OUString& sOutString, const Color** ppColor, bool bUseStarFormat = false ); /** Format a string according to a format index, return string and color. Formats only if the format code is of type text or the 4th subcode of a format code is specified, otherwise sOutString will be == "" */ void GetOutputString( const OUString& sString, sal_uInt32 nFIndex, - OUString& sOutString, Color** ppColor, bool bUseStarFormat = false ); + OUString& sOutString, const Color** ppColor, bool bUseStarFormat = false ); /** Format a number according to the standard default format matching the given format index */ @@ -572,14 +572,14 @@ public: bool GetPreviewString(const OUString& sFormatString, double fPreviewNumber, OUString& sOutString, - Color** ppColor, + const Color** ppColor, LanguageType eLnge, bool bUseStarFormat = false ); /** Same as <method>GetPreviewString</method> but the format code string may be either language/country eLnge or en_US english US */ bool GetPreviewStringGuess( const OUString& sFormatString, double fPreviewNumber, - OUString& sOutString, Color** ppColor, + OUString& sOutString, const Color** ppColor, LanguageType eLnge = LANGUAGE_DONTKNOW ); /** Format a string according to a format code string to be scanned. @@ -588,7 +588,7 @@ public: <TRUE/> else, in which case the string and color are returned. */ bool GetPreviewString( const OUString& sFormatString, const OUString& sPreviewString, - OUString& sOutString, Color** ppColor, + OUString& sOutString, const Color** ppColor, LanguageType eLnge = LANGUAGE_DONTKNOW ); /** Test whether the format code string is already present in container diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 089a4b0e48e6..3309c7bbc0f4 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -115,8 +115,8 @@ public: // Get count of substrings (symbols) sal_uInt16 GetCount() const { return nStringsCnt;} - Color* GetColor() const { return pColor; } - void SetColor( Color* pCol, OUString const & rName ) + const Color* GetColor() const { return pColor; } + void SetColor(const Color* pCol, OUString const& rName) { pColor = pCol; sColorName = rName; } const OUString& GetColorName() const { return sColorName; } @@ -134,7 +134,7 @@ public: private: ImpSvNumberformatInfo aI; // helper struct for remaining information OUString sColorName; // color name - Color* pColor; // pointer to color of subformat + const Color* pColor; // pointer to color of subformat sal_uInt16 nStringsCnt; // count of symbols SvNumberNatNum aNatNum; // DoubleByteNumber @@ -241,8 +241,8 @@ public: */ bool GetOutputString( double fNumber, sal_uInt16 nCharCount, OUString& rOutString ) const; - bool GetOutputString( double fNumber, OUString& OutString, Color** ppColor ); - void GetOutputString( const OUString& sString, OUString& OutString, Color** ppColor ); + bool GetOutputString( double fNumber, OUString& OutString, const Color** ppColor ); + void GetOutputString( const OUString& sString, OUString& OutString, const Color** ppColor ); // True if type text bool IsTextFormat() const { return bool(eType & SvNumFormatType::TEXT); } @@ -444,7 +444,7 @@ public: // used in XML export void GetConditions( SvNumberformatLimitOps& rOper1, double& rVal1, SvNumberformatLimitOps& rOper2, double& rVal2 ) const; - Color* GetColor( sal_uInt16 nNumFor ) const; + const Color* GetColor( sal_uInt16 nNumFor ) const; void GetNumForInfo( sal_uInt16 nNumFor, SvNumFormatType& rScannedType, bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt ) const; diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx index 2e4f8fb2716f..9e5a0a8a18ee 100644 --- a/include/svx/numfmtsh.hxx +++ b/include/svx/numfmtsh.hxx @@ -88,7 +88,7 @@ public: sal_uInt16& nFmtLbSelPos, std::vector<OUString>& rFmtEntries, OUString& rPrevString, - Color*& rpPrevColor ); + const Color*& rpPrevColor ); void CategoryChanged( sal_uInt16 nCatLbPos, short& rFmtSelPos, @@ -100,7 +100,7 @@ public: void FormatChanged( sal_uInt16 nFmtLbPos, OUString& rPreviewStr, - Color*& rpFontColor ); + const Color*& rpFontColor ); bool AddFormat( OUString& rFormat, sal_Int32& rErrPos, @@ -131,11 +131,11 @@ public: void MakePreviewString( const OUString& rFormatStr, OUString& rPreviewStr, - Color*& rpFontColor ); + const Color*& rpFontColor ); void MakePrevStringFromVal( const OUString& rFormatStr, OUString& rPreviewStr, - Color*& rpFontColor, + const Color*& rpFontColor, double nValue); bool IsUserDefined( const OUString& rFmtString ); @@ -218,7 +218,7 @@ private: SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetAdded_Impl( size_t nKey ); SVX_DLLPRIVATE void GetPreviewString_Impl( OUString& rString, - Color*& rpColor ); + const Color*& rpColor ); SVX_DLLPRIVATE static void PosToCategory_Impl(sal_uInt16 nPos, SvNumFormatType& rCategory); SVX_DLLPRIVATE static void CategoryToPos_Impl(SvNumFormatType nCategory, sal_uInt16& rPos); }; diff --git a/include/vcl/formatter.hxx b/include/vcl/formatter.hxx index 99d45fb40ea3..946e7e77b727 100644 --- a/include/vcl/formatter.hxx +++ b/include/vcl/formatter.hxx @@ -136,7 +136,7 @@ protected: OUString m_sDefaultText; // The last color from the Formatter at the last output operation (not we would use it, but you can get it) - Color* m_pLastOutputColor; + const Color* m_pLastOutputColor; bool m_bUseInputStringForFormatting; @@ -248,7 +248,7 @@ public: // The last colour from the Formatter's last output operation. Output operations get triggered by: // SetValue, SetTextValue, SetTextFormatted, also indirectly via SetMin - / -MaxValue - Color* GetLastOutputColor() const { return m_pLastOutputColor; } + const Color* GetLastOutputColor() const { return m_pLastOutputColor; } /** reformats the current text. Interesting if the user entered some text in an "input format", and this should be formatted in the "output format" (which may differ, e.g. by additional numeric |