summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-09-03 16:47:06 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-09-03 19:32:28 +0200
commitf12050bfb15580b564e342b704d5c55128fac644 (patch)
treee4a825d72c93548bf7ec39e7a8325855d58b288e
parent07dcb0dab759d4ab535d99c0e6d326959906b87e (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
-rw-r--r--basic/source/runtime/methods.cxx6
-rw-r--r--basic/source/runtime/methods1.cxx2
-rw-r--r--basic/source/sbx/sbxdate.cxx2
-rw-r--r--basic/source/sbx/sbxscan.cxx2
-rw-r--r--chart2/source/tools/NumberFormatterWrapper.cxx2
-rw-r--r--cui/source/inc/numfmt.hxx2
-rw-r--r--cui/source/options/optupdt.cxx2
-rw-r--r--cui/source/tabpages/numfmt.cxx10
-rw-r--r--editeng/source/items/flditem.cxx4
-rw-r--r--include/svl/zforlist.hxx10
-rw-r--r--include/svl/zformat.hxx12
-rw-r--r--include/svx/numfmtsh.hxx10
-rw-r--r--include/vcl/formatter.hxx4
-rw-r--r--oox/source/drawingml/chart/datasourcecontext.cxx2
-rw-r--r--sc/inc/cellform.hxx4
-rw-r--r--sc/qa/unit/helper/csv_handler.hxx2
-rw-r--r--sc/source/core/data/column2.cxx8
-rw-r--r--sc/source/core/data/column3.cxx6
-rw-r--r--sc/source/core/data/column4.cxx2
-rw-r--r--sc/source/core/data/documen6.cxx2
-rw-r--r--sc/source/core/data/dpcache.cxx4
-rw-r--r--sc/source/core/data/dputil.cxx2
-rw-r--r--sc/source/core/data/formulacell.cxx2
-rw-r--r--sc/source/core/data/table4.cxx4
-rw-r--r--sc/source/core/tool/cellform.cxx6
-rw-r--r--sc/source/core/tool/interpr1.cxx6
-rw-r--r--sc/source/core/tool/interpr2.cxx2
-rw-r--r--sc/source/core/tool/rangeseq.cxx2
-rw-r--r--sc/source/core/tool/scmatrix.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx2
-rw-r--r--sc/source/filter/rtf/rtfexp.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx7
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/app/transobj.cxx2
-rw-r--r--sc/source/ui/dataprovider/datatransformation.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx8
-rw-r--r--sc/source/ui/docshell/docsh8.cxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx6
-rw-r--r--sc/source/ui/formdlg/formula.cxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx6
-rw-r--r--sc/source/ui/view/spelleng.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sc/source/ui/view/viewfun6.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
-rw-r--r--svl/qa/unit/svl.cxx9
-rw-r--r--svl/source/numbers/numfmuno.cxx12
-rw-r--r--svl/source/numbers/zforlist.cxx14
-rw-r--r--svl/source/numbers/zformat.cxx10
-rw-r--r--svl/source/numbers/zforscan.cxx6
-rw-r--r--svl/source/numbers/zforscan.hxx4
-rw-r--r--svx/source/fmcomp/gridcell.cxx26
-rw-r--r--svx/source/inc/gridcell.hxx26
-rw-r--r--svx/source/items/numfmtsh.cxx10
-rw-r--r--sw/source/core/crsr/bookmrk.cxx4
-rw-r--r--sw/source/core/edit/acorrect.cxx5
-rw-r--r--sw/source/core/fields/fldbas.cxx4
-rw-r--r--sw/source/core/fields/usrfld.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx8
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/table/autoformatpreview.cxx2
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx4
-rw-r--r--toolkit/source/awt/vclxwindows.cxx2
-rw-r--r--uui/source/iahndl-ssl.cxx2
70 files changed, 168 insertions, 171 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 7f43ee0c7c60..7fcf5cecd40a 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2259,7 +2259,7 @@ void SbRtl_Time(StarBASIC *, SbxArray & rPar, bool bWrite)
nSeconds += aTime.GetMin() * 60;
nSeconds += aTime.GetSec();
double nDays = static_cast<double>(nSeconds) * ( 1.0 / (24.0*3600.0) );
- Color* pCol;
+ const Color* pCol;
std::shared_ptr<SvNumberFormatter> pFormatter;
sal_uInt32 nIndex;
@@ -2305,7 +2305,7 @@ void SbRtl_Date(StarBASIC *, SbxArray & rPar, bool bWrite)
if( pMeth->IsString() )
{
OUString aRes;
- Color* pCol;
+ const Color* pCol;
std::shared_ptr<SvNumberFormatter> pFormatter;
sal_uInt32 nIndex;
@@ -3074,7 +3074,7 @@ void SbRtl_FileDateTime(StarBASIC *, SbxArray & rPar, bool)
double nDays = static_cast<double>(nSeconds) / (24.0*3600.0);
fSerial += nDays;
- Color* pCol;
+ const Color* pCol;
std::shared_ptr<SvNumberFormatter> pFormatter;
sal_uInt32 nIndex;
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 898fc0329672..fdf4e9560b1b 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -2327,7 +2327,7 @@ void SbRtl_FormatDateTime(StarBASIC *, SbxArray & rPar, bool)
LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
const sal_uInt32 nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType );
- Color* pCol;
+ const Color* pCol;
pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol );
break;
}
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index e716b57eeac8..ebfbda55aa02 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -280,7 +280,7 @@ start:
{
p->pOUString = new OUString;
}
- Color* pColor;
+ const Color* pColor;
LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
std::shared_ptr<SvNumberFormatter> pFormatter;
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 36b62376fbb0..fe86154e8a2b 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -693,7 +693,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
// locale in case the formatter wasn't default created with it.
sal_uInt32 nIndex = pFormatter->GetStandardIndex( eLangType);
double nNumber;
- Color* pCol;
+ const Color* pCol;
bool bSuccess = pFormatter->IsNumberFormat( aStr, nIndex, nNumber );
diff --git a/chart2/source/tools/NumberFormatterWrapper.cxx b/chart2/source/tools/NumberFormatterWrapper.cxx
index 50f6dc7fb132..ef40617b07dd 100644
--- a/chart2/source/tools/NumberFormatterWrapper.cxx
+++ b/chart2/source/tools/NumberFormatterWrapper.cxx
@@ -86,7 +86,7 @@ OUString NumberFormatterWrapper::getFormattedString( sal_Int32 nNumberFormatKey,
Color& rLabelColor, bool& rbColorChanged ) const
{
OUString aText;
- Color* pTextColor = nullptr;
+ const Color* pTextColor = nullptr;
if( !m_pNumberFormatter )
{
OSL_FAIL("Need a NumberFormatter");
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 54796c63b736..23e6806d3a2c 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -125,7 +125,7 @@ private:
void Obstructing();
void EnableBySourceFormat_Impl();
void SetCategory( sal_uInt16 nPos );
- OUString GetExpColorString( Color*& rpPreviewColor, const OUString& aFormatStr, short nTmpCatPos );
+ OUString GetExpColorString( const Color*& rpPreviewColor, const OUString& aFormatStr, short nTmpCatPos );
void MakePreviewText( const OUString& rFormat );
void ChangePreviewText( sal_uInt16 nPos );
void AddAutomaticLanguage_Impl(LanguageType eAutoLang, bool bSelect);
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 2f39687cc87d..203e98949e5a 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -121,7 +121,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType();
std::unique_ptr<SvNumberFormatter> pNumberFormatter(new SvNumberFormatter( ::comphelper::getProcessComponentContext(), eUILang ));
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
const Date& rNullDate = pNumberFormatter->GetNullDate();
sal_uInt32 nFormat = pNumberFormatter->GetStandardFormat( SvNumFormatType::DATE, eUILang );
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 4297cd52241e..c9826d2a7c3e 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -502,7 +502,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
FillCurrencyBox();
OUString aPrevString;
- Color* pDummy = nullptr;
+ const Color* pDummy = nullptr;
pNumFmtShell->GetInitSettings( nCatLbSelPos, eLangType, nFmtLbSelPos,
aFmtEntryList, aPrevString, pDummy );
@@ -820,7 +820,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt
short aPrivCat = pNumFmtShell->GetCategory4Entry( static_cast<short>(i) );
if(aPrivCat!=CAT_TEXT)
{
- Color* pPreviewColor = nullptr;
+ const Color* pPreviewColor = nullptr;
OUString aPreviewString( GetExpColorString( pPreviewColor, aEntry, aPrivCat ) );
m_xLbFormat->append_text(aPreviewString);
if (pPreviewColor)
@@ -1625,7 +1625,7 @@ IMPL_LINK_NOARG(SvxNumberFormatTabPage, LostFocusHdl_Impl, weld::Widget&, void)
#************************************************************************/
OUString SvxNumberFormatTabPage::GetExpColorString(
- Color*& rpPreviewColor, const OUString& rFormatStr, short nTmpCatPos)
+ const Color*& rpPreviewColor, const OUString& rFormatStr, short nTmpCatPos)
{
SvxNumValCategory i;
switch (nTmpCatPos)
@@ -1663,7 +1663,7 @@ OUString SvxNumberFormatTabPage::GetExpColorString(
void SvxNumberFormatTabPage::MakePreviewText( const OUString& rFormat )
{
OUString aPreviewString;
- Color* pPreviewColor = nullptr;
+ const Color* pPreviewColor = nullptr;
pNumFmtShell->MakePreviewString( rFormat, aPreviewString, pPreviewColor );
m_aWndPreview.NotifyChange( aPreviewString, pPreviewColor );
}
@@ -1671,7 +1671,7 @@ void SvxNumberFormatTabPage::MakePreviewText( const OUString& rFormat )
void SvxNumberFormatTabPage::ChangePreviewText( sal_uInt16 nPos )
{
OUString aPreviewString;
- Color* pPreviewColor = nullptr;
+ const Color* pPreviewColor = nullptr;
pNumFmtShell->FormatChanged( nPos, aPreviewString, pPreviewColor );
m_aWndPreview.NotifyChange( aPreviewString, pPreviewColor );
}
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 2b57402aef54..dcb70605e8b6 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -419,7 +419,7 @@ OUString SvxDateField::GetFormatted( Date const & aDate, SvxDateFormat eFormat,
double fDiffDate = aDate - rFormatter.GetNullDate();
OUString aStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
rFormatter.GetOutputString( fDiffDate, nFormatKey, aStr, &pColor );
return aStr;
}
@@ -682,7 +682,7 @@ OUString SvxExtTimeField::GetFormatted( tools::Time const & aTime, SvxTimeFormat
double fFracTime = aTime.GetTimeInDays();
OUString aStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
rFormatter.GetOutputString( fFracTime, nFormatKey, aStr, &pColor );
return aStr;
}
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
diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx b/oox/source/drawingml/chart/datasourcecontext.cxx
index 16cd509e4a63..1112ba2e5c39 100644
--- a/oox/source/drawingml/chart/datasourcecontext.cxx
+++ b/oox/source/drawingml/chart/datasourcecontext.cxx
@@ -125,7 +125,7 @@ void DoubleSequenceContext::onCharacters( const OUString& rChars )
else
{
double fValue = rChars.toDouble();
- ::Color* pColor = nullptr;
+ const ::Color* pColor = nullptr;
OUString aFormattedValue;
// tdf#91250: use UNLIMITED_PRECISION in case of GENERAL Number Format of category axis labels
if( pNumFrmt->GetStandardPrec() != SvNumberFormatter::UNLIMITED_PRECISION )
diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx
index 5d7de17f8344..335444c5e00d 100644
--- a/sc/inc/cellform.hxx
+++ b/sc/inc/cellform.hxx
@@ -35,12 +35,12 @@ public:
static void GetString(
const ScRefCellValue& rCell, sal_uInt32 nFormat, OUString& rString,
- Color** ppColor, SvNumberFormatter& rFormatter, const ScDocument* pDoc, bool bNullVals = true,
+ const Color** ppColor, SvNumberFormatter& rFormatter, const ScDocument* pDoc, bool bNullVals = true,
bool bFormula = false, bool bUseStarFormat = false );
static OUString GetString(
ScDocument& rDoc, const ScAddress& rPos, sal_uInt32 nFormat,
- Color** ppColor, SvNumberFormatter& rFormatter, bool bNullVals = true,
+ const Color** ppColor, SvNumberFormatter& rFormatter, bool bNullVals = true,
bool bFormula = false );
static void GetInputString(
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index cbd2b9bd09e5..8d24c38edaa3 100644
--- a/sc/qa/unit/helper/csv_handler.hxx
+++ b/sc/qa/unit/helper/csv_handler.hxx
@@ -22,7 +22,7 @@
inline OUString getConditionalFormatString(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab)
{
OUString aString;
- Color* pColor;
+ const Color* pColor;
ScRefCellValue aCell(*pDoc, ScAddress(nCol, nRow, nTab));
if (aCell.isEmpty())
return aString;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 9cf2be715011..c96d34679f68 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -282,7 +282,7 @@ long ScColumn::GetNeededSize(
if (!bEditEngine) // direct output
{
- Color* pColor;
+ const Color* pColor;
OUString aValStr;
ScCellFormat::GetString(
aCell, nFormat, aValStr, &pColor, *pFormatter, pDocument, true, rOptions.bFormula);
@@ -459,7 +459,7 @@ long ScColumn::GetNeededSize(
}
else
{
- Color* pColor;
+ const Color* pColor;
OUString aString;
ScCellFormat::GetString(
aCell, nFormat, aString, &pColor, *pFormatter, pDocument, true,
@@ -613,7 +613,7 @@ class MaxStrLenFinder
void checkLength(const ScRefCellValue& rCell)
{
- Color* pColor;
+ const Color* pColor;
OUString aValStr;
ScCellFormat::GetString(
rCell, mnFormat, aValStr, &pColor, *mrDoc.GetFormatTable(), &mrDoc);
@@ -699,7 +699,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
sal_uInt32 nFormat = pPattern->GetNumberFormat( pFormatter );
OUString aLongStr;
- Color* pColor;
+ const Color* pColor;
if (pParam->mnMaxTextRow >= 0)
{
ScRefCellValue aCell = GetCellValue(pParam->mnMaxTextRow);
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 011caea06a13..b5d7f4bd3162 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -788,7 +788,7 @@ bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellSt
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
OUString aStr;
- Color* pColor;
+ const Color* pColor;
sal_uInt32 nFormat = pPattern->GetNumberFormat(pFormatter, pCondSet);
ScCellFormat::GetString(aCell, nFormat, aStr, &pColor, *pFormatter, pDocument);
@@ -2915,7 +2915,7 @@ void ScColumn::GetString( const ScRefCellValue& aCell, SCROW nRow, OUString& rSt
aCell.mpFormula->MaybeInterpret();
sal_uInt32 nFormat = GetNumberFormat( pContext ? *pContext : GetDoc()->GetNonThreadedContext(), nRow);
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
ScCellFormat::GetString(aCell, nFormat, rString, &pColor,
pContext ? *(pContext->GetFormatTable()) : *(GetDoc()->GetFormatTable()), GetDoc());
}
@@ -3141,7 +3141,7 @@ class MaxStringLenHandler
void processCell(size_t nRow, const ScRefCellValue& rCell)
{
- Color* pColor;
+ const Color* pColor;
OUString aString;
sal_uInt32 nFormat = mrColumn.GetAttr(nRow, ATTR_VALUE_FORMAT).GetValue();
ScCellFormat::GetString(rCell, nFormat, aString, &pColor, *mpFormatter, mrColumn.GetDoc());
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index d3a2d3db6a53..1b1b18acc3e0 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1016,7 +1016,7 @@ private:
}
OUString aStr;
- Color* pColor;
+ const Color* pColor;
sal_uInt32 nFormat = pPat->GetNumberFormat(mpFormatter, pCondSet);
ScCellFormat::GetString(rCell, nFormat, aStr, &pColor, *mpFormatter, mrCol.GetDoc());
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index c2f2d2b0c4dd..e1b15bff8ad5 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -115,7 +115,7 @@ SvtScriptType ScDocument::GetCellScriptType( const ScAddress& rPos, sal_uInt32 n
if ( nStored != SvtScriptType::UNKNOWN ) // stored value valid?
return nStored; // use stored value
- Color* pColor;
+ const Color* pColor;
OUString aStr;
if( pCell )
ScCellFormat::GetString(*pCell, nNumberFormat, aStr, &pColor, *mxPoolHelper->GetFormTable(), this);
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 42fafd7fff1d..9bbeafa1bbb4 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -1203,7 +1203,7 @@ OUString ScDPCache::GetLocaleIndependentFormattedString( double fValue,
return GetLocaleIndependentFormattedNumberString( fValue);
OUString aStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
rFormatter.GetOutputString( fValue, nNumFormat, aStr, &pColor);
return aStr;
}
@@ -1225,7 +1225,7 @@ OUString ScDPCache::GetFormattedString(long nDim, const ScDPItemData& rItem, boo
return GetLocaleIndependentFormattedString( rItem.GetValue(), *pFormatter, nNumFormat);
OUString aStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
pFormatter->GetOutputString(rItem.GetValue(), nNumFormat, aStr, &pColor);
return aStr;
}
diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx
index 464f491ddd17..01145c6317cc 100644
--- a/sc/source/core/data/dputil.cxx
+++ b/sc/source/core/data/dputil.cxx
@@ -124,7 +124,7 @@ OUString ScDPUtil::getDateGroupName(
long nDays = aDate - pFormatter->GetNullDate();
const sal_uInt32 nFormat = pFormatter->GetFormatIndex(NF_DATE_SYS_DDMMM, ScGlobal::eLnge);
- Color* pColor;
+ const Color* pColor;
OUString aStr;
pFormatter->GetOutputString(nDays, nFormat, aStr, &pColor);
return aStr;
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 144e2e482a15..24d77cb2369a 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2693,7 +2693,7 @@ void ScFormulaCell::GetURLResult( OUString& rURL, OUString& rCellText )
{
OUString aCellString;
- Color* pColor;
+ const Color* pColor;
// Cell Text uses the Cell format while the URL uses
// the default format for the type.
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 426b14132e0c..69a63c981201 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -993,7 +993,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW
}
}
- Color* pColor;
+ const Color* pColor;
pDocument->GetFormatTable()->GetOutputString( nVal, nNumFmt, aValue, &pColor );
}
break;
@@ -1080,7 +1080,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW
else
{
//TODO: get number format according to Index?
- Color* pColor;
+ const Color* pColor;
sal_uInt32 nNumFmt = GetNumberFormat( nCol1, nRow1 );
pDocument->GetFormatTable()->GetOutputString( nStart, nNumFmt, aValue, &pColor );
}
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 1fe9b0e69ec7..d2cb1d7ece39 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -31,7 +31,7 @@
#include <editutil.hxx>
void ScCellFormat::GetString( const ScRefCellValue& rCell, sal_uInt32 nFormat, OUString& rString,
- Color** ppColor, SvNumberFormatter& rFormatter, const ScDocument* pDoc,
+ const Color** ppColor, SvNumberFormatter& rFormatter, const ScDocument* pDoc,
bool bNullVals, bool bFormula, bool bUseStarFormat )
{
*ppColor = nullptr;
@@ -106,7 +106,7 @@ void ScCellFormat::GetString( const ScRefCellValue& rCell, sal_uInt32 nFormat, O
}
OUString ScCellFormat::GetString(
- ScDocument& rDoc, const ScAddress& rPos, sal_uInt32 nFormat, Color** ppColor,
+ ScDocument& rDoc, const ScAddress& rPos, sal_uInt32 nFormat, const Color** ppColor,
SvNumberFormatter& rFormatter, bool bNullVals, bool bFormula )
{
OUString aString;
@@ -174,7 +174,7 @@ OUString ScCellFormat::GetOutputString( ScDocument& rDoc, const ScAddress& rPos,
else
{
// like in GetString for document (column)
- Color* pColor;
+ const Color* pColor;
sal_uInt32 nNumFmt = rDoc.GetNumberFormat(rPos);
GetString(rCell, nNumFmt, aVal, &pColor, *rDoc.GetFormatTable(), &rDoc);
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index e1f91800dff7..3c1fab117e96 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8779,7 +8779,7 @@ void ScInterpreter::ScCurrency()
fVal = ceil(fVal*fFac-0.5)/fFac;
else
fVal = floor(fVal*fFac+0.5)/fFac;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
if ( fDec < 0.0 )
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
@@ -8879,7 +8879,7 @@ void ScInterpreter::ScFixed()
fVal = ceil(fVal*fFac-0.5)/fFac;
else
fVal = floor(fVal*fFac+0.5)/fFac;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
if (fDec < 0.0)
fDec = 0.0;
sal_uLong nIndex = pFormatter->GetStandardFormat(
@@ -9616,7 +9616,7 @@ void ScInterpreter::ScText()
else
{
OUString aResult;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
LanguageType eCellLang;
const ScPatternAttr* pPattern = pDok->GetPattern(
aPos.Col(), aPos.Row(), aPos.Tab() );
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 96716236cfa5..5e17d8bf188e 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -3648,7 +3648,7 @@ void ScInterpreter::ScGetPivotData()
else
nNumFormat = pFormatter->GetStandardFormat( nCurFmtType, ScGlobal::eLnge);
}
- Color* pColor;
+ const Color* pColor;
pFormatter->GetOutputString( fDouble, nNumFormat, aFilters[i].MatchValueName, &pColor);
aFilters[i].MatchValue = ScDPCache::GetLocaleIndependentFormattedString(
fDouble, *pFormatter, nNumFormat);
diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx
index 909f5f3af9bb..cc20b1c7cb2f 100644
--- a/sc/source/core/tool/rangeseq.cxx
+++ b/sc/source/core/tool/rangeseq.cxx
@@ -223,7 +223,7 @@ bool ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix
else if ( pFormatter )
{
double fVal = pMatrix->GetDouble( nCol, nRow );
- Color* pColor;
+ const Color* pColor;
pFormatter->GetOutputString( fVal, 0, aStr, &pColor );
}
pColAry[nCol] = aStr;
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index e841cdfdc13d..eb392609a806 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -703,7 +703,7 @@ svl::SharedString ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE
sal_uInt32 nKey = rFormatter.GetStandardFormat( SvNumFormatType::LOGICAL,
ScGlobal::eLnge);
OUString aStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
rFormatter.GetOutputString( 0.0, nKey, aStr, &pColor);
return svl::SharedString( aStr); // string not interned
}
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 034939e05abb..8a0c65516933 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -166,7 +166,7 @@ void lclInsertUrl( XclImpRoot& rRoot, const OUString& rUrl, SCCOL nScCol, SCROW
{
sal_uInt32 nNumFmt = rDoc.getDoc().GetNumberFormat(rDoc.getDoc().GetNonThreadedContext(), aScPos);
SvNumberFormatter* pFormatter = rDoc.getDoc().GetFormatTable();
- Color* pColor;
+ const Color* pColor;
OUString aDisplText;
ScCellFormat::GetString(aCell, nNumFmt, aDisplText, &pColor, *pFormatter, &rDoc.getDoc());
if (aDisplText.isEmpty())
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 8fa70bce0259..ae3a8502653f 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1130,7 +1130,7 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC
OUString aStrOut;
bool bFieldText = false;
- Color* pColor;
+ const Color* pColor;
switch (aCell.meType)
{
case CELLTYPE_EDIT :
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index 60871111cd8e..340e3cdab7c7 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -178,7 +178,7 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
{
bValueData = pDoc->HasValueData(aPos);
sal_uInt32 nFormat = pAttr->GetNumberFormat(pFormatter);
- Color* pColor;
+ const Color* pColor;
aContent = ScCellFormat::GetString(*pDoc, aPos, nFormat, &pColor, *pFormatter);
}
}
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index db4ce95cda52..7d5d6894f8b8 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -929,9 +929,8 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
SvNumberFormatter* pNumForm = pDoc->GetFormatTable();
sal_uInt32 nfIndex = pNumForm->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_SYSTEM );
OUString aDate;
- Color* pColor = nullptr;
- Color** ppColor = &pColor;
- pNumForm->GetOutputString( fDate, nfIndex, aDate, ppColor );
+ const Color* pColor = nullptr;
+ pNumForm->GetOutputString( fDate, nfIndex, aDate, &pColor );
pNote->SetDate( aDate );
}
pNote->SetAuthor( mxAnnotationData->maAuthor );
@@ -1301,7 +1300,7 @@ OUString getOutputString( ScDocument* pDoc, const ScAddress& aCellPos )
default:
{
// like in GetString for document (column)
- Color* pColor;
+ const Color* pColor;
sal_uInt32 nNumFmt = pDoc->GetNumberFormat(aCellPos);
OUString aStr;
ScCellFormat::GetString(aCell, nNumFmt, aStr, &pColor, *pDoc->GetFormatTable(), pDoc);
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index c3f617acb96e..de07a3f7f347 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -217,7 +217,7 @@ OUString lcl_GetFormattedString(ScDocument* pDoc, const ScRefCellValue& rCell, c
case CELLTYPE_STRING:
{
OUString aStr;
- Color* pColor;
+ const Color* pColor;
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
sal_uInt32 nFormat = pDoc->GetNumberFormat(rAddr);
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5ffe1d83d205..6c8c6d9b2350 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1746,7 +1746,7 @@ static OUString lcl_Calculate( const OUString& rFormula, ScDocument* pDoc, const
sal_uInt32 nFormat = aFormatter.GetStandardFormat(
pCalc->GetFormatType(), ScGlobal::eLnge);
{
- Color* pColor;
+ const Color* pColor;
aFormatter.GetOutputString( aStr, nFormat,
aValue, &pColor );
}
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index ddb7ce5b670f..f329576d2bbc 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -319,7 +319,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt
SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
sal_uInt32 nNumFmt = pPattern->GetNumberFormat(pFormatter);
OUString aText;
- Color* pColor;
+ const Color* pColor;
ScCellFormat::GetString(aCell, nNumFmt, aText, &pColor, *pFormatter, m_pDoc.get());
if (!aText.isEmpty())
aEngine.SetTextCurrentDefaults(aText);
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index 8aceefe57f4f..5a7be1c023cb 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -836,7 +836,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
OUString aResult;
pFormatter->GetPreviewStringGuess("MMMM", nVal, aResult, &pColor, eLanguage);
rDoc.SetString(rCol, nRow, 0, aResult);
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 434be78d2c4a..3ef652c56ebe 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2089,7 +2089,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
if ( bFixedWidth || bSaveAsShown )
{
- Color* pDummy;
+ const Color* pDummy;
ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
bString = bSaveAsShown && rFormatter.IsTextFormat( nFormat);
}
@@ -2104,7 +2104,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( bSaveAsShown )
{
sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
- Color* pDummy;
+ const Color* pDummy;
ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
}
else
@@ -2117,7 +2117,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( bSaveAsShown )
{
sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
- Color* pDummy;
+ const Color* pDummy;
ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
}
else
@@ -2139,7 +2139,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
m_aDocument.GetNumberFormat( nCol, nRow, nTab, nFormat );
if ( bFixedWidth || bSaveAsShown )
{
- Color* pDummy;
+ const Color* pDummy;
ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, &m_aDocument);
bString = bSaveAsShown && rFormatter.IsTextFormat( nFormat);
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index d4bfa92931f3..d6ddd20047e2 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -717,7 +717,7 @@ void lcl_getLongVarCharEditString( OUString& rString,
void lcl_getLongVarCharString(
OUString& rString, ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, SvNumberFormatter& rNumFmt )
{
- Color* pColor;
+ const Color* pColor;
ScAddress aPos(nCol, nRow, nTab);
sal_uInt32 nFormat = rDoc.GetNumberFormat(aPos);
rString = ScCellFormat::GetString(rDoc, aPos, nFormat, &pColor, rNumFmt);
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index f87440b047b3..68cbfedfb4fc 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1695,7 +1695,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
}
else
{
- Color* pColor;
+ const Color* pColor;
ScCellFormat::GetString(aCell, nNumFmt, aCellStr, &pColor, *pFormatter, pDoc);
bool bMultiLineText = ( aCellStr.indexOf( '\n' ) != -1 );
@@ -1719,7 +1719,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
break;
case CELLTYPE_VALUE:
{
- Color* pColor;
+ const Color* pColor;
ScCellFormat::GetString(aCell, nNumFmt, aCellStr, &pColor, *pFormatter, pDoc);
lcl_WriteSimpleString( rStrm, aCellStr );
}
@@ -1728,7 +1728,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
break;
default:
{
- Color* pColor;
+ const Color* pColor;
ScCellFormat::GetString(aCell, nNumFmt, aCellStr, &pColor, *pFormatter, pDoc);
bool bMultiLineText = ( aCellStr.indexOf( '\n' ) != -1 );
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 4c756ca3b646..977ea5e827f6 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -324,7 +324,7 @@ bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult
if ( nErrCode == FormulaError::NONE || pFCell->IsMatrix() )
{
SvNumberFormatter& aFormatter = *(m_pDoc->GetFormatTable());
- Color* pColor;
+ const Color* pColor;
if (pFCell->IsMatrix())
{
rStrResult = pFCell->GetString().getString();
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 8fe7084643b9..c8a172f0a331 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -190,7 +190,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
bool bNumFormat = pCurData->GetIncludeValueFormat();
sal_uInt32 nNum;
double nVal;
- Color* pDummy = nullptr;
+ const Color* pDummy = nullptr;
sal_uInt16 nIndex = static_cast<sal_uInt16>(maArray.GetCellIndex(nCol, nRow, mbRTL));
switch (nIndex)
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 94bc85ba4492..ad8a7f0ea6c4 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2585,7 +2585,7 @@ sal_Int32 ScChart2DataSequence::FillCacheFromExternalRef(const ScTokenRef& pToke
if (pFormatter)
{
const double fVal = aItem.mfValue;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
sal_uInt32 nFmt = 0;
if (pTable)
{
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 8d4fe45c1e0c..e12fcfe69ce8 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -745,7 +745,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
OUString aPara;
- Color* pColor=nullptr;
+ const Color* pColor = nullptr;
switch( eFillDir )
{
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index f3d9031b33bd..62beb6a35a88 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -490,7 +490,7 @@ bool ScDrawStringsVars::SetText( const ScRefCellValue& rCell )
{
maLastCell = rCell; // store cell
- Color* pColor;
+ const Color* pColor;
sal_uLong nFormat = nValueFormat;
ScCellFormat::GetString( rCell,
nFormat, aString, &pColor,
@@ -2371,7 +2371,7 @@ bool ScOutputData::DrawEditParam::readCellContent(
sal_uInt32 nFormat = mpPattern->GetNumberFormat(
pDoc->GetFormatTable(), mpCondSet );
OUString aString;
- Color* pColor;
+ const Color* pColor;
ScCellFormat::GetString( maCell,
nFormat,aString, &pColor,
*pDoc->GetFormatTable(),
@@ -4697,7 +4697,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
sal_uInt32 nFormat = pPattern->GetNumberFormat(
mpDoc->GetFormatTable(), pCondSet );
OUString aString;
- Color* pColor;
+ const Color* pColor;
ScCellFormat::GetString( aCell,
nFormat,aString, &pColor,
*mpDoc->GetFormatTable(),
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 5035cd31a858..1f96526aac4e 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -255,7 +255,7 @@ void ScConversionEngineBase::FillFromCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
SvNumberFormatter* pFormatter = mrDoc.GetFormatTable();
sal_uInt32 nNumFmt = mrDoc.GetNumberFormat(aPos);
OUString aText;
- Color* pColor;
+ const Color* pColor;
ScCellFormat::GetString(aCell, nNumFmt, aText, &pColor, *pFormatter, &mrDoc);
SetTextCurrentDefaults(aText);
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index bc12783ff048..696f65839c73 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -131,7 +131,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode )
}
OUString aValStr;
- Color* pDummy;
+ const Color* pDummy;
pFormatter->GetOutputString( nVal, nNumFmt, aValStr, &pDummy );
aStr += aValStr;
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 638717d43184..179bd852e96a 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2207,7 +2207,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
const ScPatternAttr* pPattern = pDoc->GetPattern( nDestCol, nDestRow, nDestTab );
if ( pPattern )
nFormat = pPattern->GetNumberFormat( pFormatter );
- Color* p;
+ const Color* p;
pFormatter->GetOutputString( nSolveResult, nFormat, aResStr, &p );
if ( bExact )
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 1332f94e4f07..85676333cc7c 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -329,7 +329,7 @@ void ScViewFunc::InsertCurrentTime(SvNumFormatType nReqFmt, const OUString& rUnd
//nFormat = pFormatter->GetStandardFormat( fVal, nFormat, nReqFmt, nLang);
}
OUString aString;
- Color* pColor;
+ const Color* pColor;
pFormatter->GetOutputString( fVal, nFormat, aString, &pColor);
pInputHdl->DataChanging();
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 1dd68e6aadff..642d90f9c06f 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2744,7 +2744,7 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement )
// the ways of the Numberformatters are unfathomable, so try:
OUString aOut;
- Color* pCol;
+ const Color* pCol;
const_cast<SvNumberformat*>(pOldEntry)->GetOutputString( nVal, aOut, &pCol );
nPrecision = 0;
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index c32017f7aea6..beaf62ad39ec 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -431,9 +431,8 @@ void Test::checkPreviewString(SvNumberFormatter& aFormatter,
OUString const & sExpected)
{
OUString sStr;
- Color* pColor = nullptr;
- Color** ppColor = &pColor;
- if (!aFormatter.GetPreviewString(sCode, fPreviewNumber, sStr, ppColor, eLang))
+ const Color* pColor = nullptr;
+ if (!aFormatter.GetPreviewString(sCode, fPreviewNumber, sStr, &pColor, eLang))
{
OString aMessage = "GetPreviewString( \"" +
OUStringToOString( sCode, RTL_TEXTENCODING_ASCII_US ) +
@@ -1111,7 +1110,7 @@ void Test::checkDateInput( SvNumberFormatter& rFormatter, const char* pTimezone,
CPPUNIT_ASSERT_MESSAGE("Format parsed is not date.",
(rFormatter.GetType(nIndex) & SvNumFormatType::DATE));
OUString aOutString;
- Color *pColor;
+ const Color *pColor;
rFormatter.GetOutputString( fVal, nIndex, aOutString, &pColor);
CPPUNIT_ASSERT_EQUAL( aDate, aOutString);
}
@@ -1184,7 +1183,7 @@ void checkSpecificNumberFormats( SvNumberFormatter& rFormatter,
{
if (rVec[i].mnOutputIndex)
nIndex = rVec[i].mnOutputIndex;
- Color* pColor;
+ const Color* pColor;
rFormatter.GetOutputString( fNumber, nIndex, aString, &pColor);
CPPUNIT_ASSERT_EQUAL_MESSAGE( OString( pName + OStringLiteral(" ") + OString::number(i) + " mismatch").getStr(),
OUString::fromUtf8( rVec[i].mpOutput), aString);
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 6c5077c7a788..ba3a9e0cbe0d 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -181,7 +181,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToString( sal_Int32
if (!pFormatter)
throw uno::RuntimeException();
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
pFormatter->GetOutputString(fValue, nKey, aRet, &pColor);
return aRet;
@@ -199,7 +199,7 @@ sal_Int32 SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32 n
throw uno::RuntimeException();
OUString aStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
pFormatter->GetOutputString(fValue, nKey, aStr, &pColor);
if (pColor)
nRet = sal_uInt32(*pColor);
@@ -220,7 +220,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::formatString( sal_Int32 nKey,
throw uno::RuntimeException();
}
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
pFormatter->GetOutputString(aString, nKey, aRet, &pColor);
return aRet;
@@ -240,7 +240,7 @@ sal_Int32 SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32 n
}
OUString aStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
pFormatter->GetOutputString(aString, nKey, aStr, &pColor);
if (pColor)
{
@@ -280,7 +280,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToPreviewString( con
throw uno::RuntimeException();
LanguageType eLang = lcl_GetLanguage( nLocale );
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
bool bOk;
if ( bAllowEnglish )
@@ -309,7 +309,7 @@ sal_Int32 SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber( cons
OUString aOutString;
LanguageType eLang = lcl_GetLanguage( nLocale );
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
bool bOk;
if ( bAllowEnglish )
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index d113c6b9f767..de29679297aa 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -849,7 +849,7 @@ OUString SvNumberFormatter::GetFormatStringForExcel( sal_uInt32 nKey, const NfKe
{
// Build Boolean number format, which needs non-zero and zero
// subformat codes with TRUE and FALSE strings.
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
OUString aTemp;
const_cast< SvNumberformat* >( pEntry )->GetOutputString( 1.0, aTemp, &pColor );
aFormatStr += "\"" + aTemp + "\";\"" + aTemp + "\";\"";
@@ -1592,7 +1592,7 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
OUString& sOutString)
{
::osl::MutexGuard aGuard( GetInstanceMutex() );
- Color* pColor;
+ const Color* pColor;
sal_uInt32 nRealKey = nFIndex;
SvNumberformat* pFormat = ImpSubstituteEntry( GetFormatEntry( nFIndex ), &nRealKey);
if (!pFormat)
@@ -1652,7 +1652,7 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
void SvNumberFormatter::GetOutputString(const OUString& sString,
sal_uInt32 nFIndex,
OUString& sOutString,
- Color** ppColor,
+ const Color** ppColor,
bool bUseStarFormat )
{
::osl::MutexGuard aGuard( GetInstanceMutex() );
@@ -1686,7 +1686,7 @@ void SvNumberFormatter::GetOutputString(const OUString& sString,
void SvNumberFormatter::GetOutputString(const double& fOutNumber,
sal_uInt32 nFIndex,
OUString& sOutString,
- Color** ppColor,
+ const Color** ppColor,
bool bUseStarFormat )
{
::osl::MutexGuard aGuard( GetInstanceMutex() );
@@ -1709,7 +1709,7 @@ void SvNumberFormatter::GetOutputString(const double& fOutNumber,
bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString,
double fPreviewNumber,
OUString& sOutString,
- Color** ppColor,
+ const Color** ppColor,
LanguageType eLnge,
bool bUseStarFormat )
{
@@ -1763,7 +1763,7 @@ bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString,
bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString,
double fPreviewNumber,
OUString& sOutString,
- Color** ppColor,
+ const Color** ppColor,
LanguageType eLnge )
{
::osl::MutexGuard aGuard( GetInstanceMutex() );
@@ -1864,7 +1864,7 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString,
bool SvNumberFormatter::GetPreviewString( const OUString& sFormatString,
const OUString& sPreviewString,
OUString& sOutString,
- Color** ppColor,
+ const Color** ppColor,
LanguageType eLnge )
{
::osl::MutexGuard aGuard( GetInstanceMutex() );
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 471c350a7629..b0e90b4916f6 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -872,7 +872,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
}
else
{
- Color* pColor = pSc->GetColor( sStr);
+ const Color* pColor = pSc->GetColor( sStr);
NumFor[nIndex].SetColor( pColor, sStr);
if (pColor == nullptr)
{ // error
@@ -1919,7 +1919,7 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
for (ImpSvNumFor & rFormatter : NumFor)
{
OUString aColorName = rFormatter.GetColorName();
- Color* pColor = rScan.GetColor( aColorName );
+ const Color* pColor = rScan.GetColor( aColorName );
rFormatter.SetColor( pColor, aColorName );
}
}
@@ -2160,7 +2160,7 @@ static bool lcl_insertStarFillChar( OUStringBuffer& rBuf, sal_Int32 nPos, const
void SvNumberformat::GetOutputString(const OUString& sString,
OUString& OutString,
- Color** ppColor)
+ const Color** ppColor)
{
OUStringBuffer sOutBuff;
sal_uInt16 nIx;
@@ -2439,7 +2439,7 @@ sal_uInt16 SvNumberformat::GetSubformatIndex (double fNumber ) const
bool SvNumberformat::GetOutputString(double fNumber,
OUString& OutString,
- Color** ppColor)
+ const Color** ppColor)
{
bool bRes = false;
OUStringBuffer sBuff(64);
@@ -5039,7 +5039,7 @@ void SvNumberformat::GetConditions( SvNumberformatLimitOps& rOper1, double& rVal
rVal2 = fLimit2;
}
-Color* SvNumberformat::GetColor( sal_uInt16 nNumFor ) const
+const Color* SvNumberformat::GetColor( sal_uInt16 nNumFor ) const
{
if ( nNumFor > 3 )
{
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index b77670ce2be1..288623ef2a6c 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -106,7 +106,7 @@ const NfKeywordTable ImpSvNumberformatScan::sEnglishKeyword =
"WHITE" // NF_KEY_WHITE
};
-::std::vector<Color> ImpSvNumberformatScan::StandardColor{
+const ::std::vector<Color> ImpSvNumberformatScan::StandardColor{
COL_BLACK, COL_LIGHTBLUE, COL_LIGHTGREEN, COL_LIGHTCYAN, COL_LIGHTRED,
COL_LIGHTMAGENTA, COL_BROWN, COL_GRAY, COL_YELLOW, COL_WHITE
};
@@ -537,7 +537,7 @@ void ImpSvNumberformatScan::ChangeStandardPrec(sal_uInt16 nPrec)
nStandardPrec = nPrec;
}
-Color* ImpSvNumberformatScan::GetColor(OUString& sStr)
+const Color* ImpSvNumberformatScan::GetColor(OUString& sStr) const
{
OUString sString = pFormatter->GetCharClass()->uppercase(sStr);
const NfKeywordTable & rKeyword = GetKeywords();
@@ -595,7 +595,7 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr)
eColorKeywordConversion = ColorKeywordConversion::EnglishToGerman;
}
- Color* pResult = nullptr;
+ const Color* pResult = nullptr;
if (i >= NF_MAX_DEFAULT_COLORS)
{
const OUString& rColorWord = rKeyword[NF_KEY_COLOR];
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index b2ed7535c5b4..2120a58323fd 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -112,7 +112,7 @@ public:
}
sal_uInt16 GetStandardPrec() const { return nStandardPrec; }
static const Color& GetRedColor() { return StandardColor[4]; }
- Color* GetColor(OUString& sStr); // Set main colors or defines colors
+ const Color* GetColor(OUString& sStr) const; // Set main colors or defines colors
// the compatibility currency symbol for old automatic currency formats
const OUString& GetCurSymbol() const
@@ -176,7 +176,7 @@ public:
private: // Private section
NfKeywordTable sKeyword; // Syntax keywords
static const NfKeywordTable sEnglishKeyword; // English Syntax keywords
- static ::std::vector<Color> StandardColor; // Standard color array
+ static const ::std::vector<Color> StandardColor; // Standard color array
Date maNullDate; // 30Dec1899
OUString sNameStandardFormat; // "Standard"
sal_uInt16 nStandardPrec; // Default Precision for Standardformat
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index e822a89dc961..b7c14fbc2eab 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1142,7 +1142,7 @@ void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle&
DbLimitedLengthField::PaintFieldToCell( _rDev, _rRect, _rxField, _rxFormatter );
}
-OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
+OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, const Color** /*ppColor*/)
{
if (!_rxField.is())
return OUString();
@@ -1398,7 +1398,7 @@ void DbFormattedField::Init( BrowserDataWin& rParent, const Reference< XRowSet >
else
{
OUString sConverted;
- Color* pDummy;
+ const Color* pDummy;
pFormatterUsed->GetOutputString(::comphelper::getDouble(aDefault), 0, sConverted, &pDummy);
rControlFormatter.SetDefaultText(sConverted);
rPainterFormatter.SetDefaultText(sConverted);
@@ -1455,7 +1455,7 @@ void DbFormattedField::_propertyChanged( const PropertyChangeEvent& _rEvent )
}
}
-OUString DbFormattedField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** ppColor)
+OUString DbFormattedField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, const Color** ppColor)
{
// no color specification by default
if (ppColor != nullptr)
@@ -1709,7 +1709,7 @@ bool DbCheckBox::commitControl()
return true;
}
-OUString DbCheckBox::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbCheckBox::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, const Color** /*ppColor*/)
{
return OUString();
}
@@ -1775,7 +1775,7 @@ OUString DbPatternField::impl_formatText( const OUString& _rText )
return rPaintFormatter.get_widget().get_text();
}
-OUString DbPatternField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbPatternField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, const Color** /*ppColor*/)
{
bool bIsForPaint = _rxField != m_rColumn.GetField();
::std::unique_ptr< FormattedColumnValue >& rpFormatter = bIsForPaint ? m_pPaintFormatter : m_pValueFormatter;
@@ -1952,7 +1952,7 @@ namespace
}
}
-OUString DbNumericField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& _rxFormatter, Color** /*ppColor*/)
+OUString DbNumericField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& _rxFormatter, const Color** /*ppColor*/)
{
return lcl_setFormattedNumeric_nothrow(dynamic_cast<FormattedControlBase&>(*m_pPainter), *this, _rxField, _rxFormatter);
}
@@ -2072,7 +2072,7 @@ namespace
}
}
-OUString DbCurrencyField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& _rxFormatter, Color** /*ppColor*/)
+OUString DbCurrencyField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& _rxFormatter, const Color** /*ppColor*/)
{
return lcl_setFormattedCurrency_nothrow(dynamic_cast<FormattedControlBase&>(*m_pPainter), *this, _rxField, _rxFormatter);
}
@@ -2202,7 +2202,7 @@ namespace
}
}
-OUString DbDateField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbDateField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& /*xFormatter*/, const Color** /*ppColor*/)
{
return lcl_setFormattedDate_nothrow(*static_cast<DateControl*>(m_pPainter.get()), _rxField);
}
@@ -2313,7 +2313,7 @@ namespace
}
}
-OUString DbTimeField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbTimeField::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< css::util::XNumberFormatter >& /*xFormatter*/, const Color** /*ppColor*/)
{
return lcl_setFormattedTime_nothrow(*static_cast<TimeControl*>(m_pPainter.get()), _rxField);
}
@@ -2423,7 +2423,7 @@ CellControllerRef DbComboBox::CreateController() const
return new ComboBoxCellController(static_cast<ComboBoxControl*>(m_pWindow.get()));
}
-OUString DbComboBox::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
+OUString DbComboBox::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, const Color** /*ppColor*/)
{
const css::uno::Reference<css::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
::dbtools::FormattedColumnValue fmter( xFormatter, xPS );
@@ -2532,7 +2532,7 @@ CellControllerRef DbListBox::CreateController() const
return new ListBoxCellController(static_cast<ListBoxControl*>(m_pWindow.get()));
}
-OUString DbListBox::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbListBox::GetFormatText(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/, const Color** /*ppColor*/)
{
OUString sText;
if ( _rxField.is() )
@@ -3038,7 +3038,7 @@ void DbFilterField::Update()
rComboBox.append_text(rString);
}
-OUString DbFilterField::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
+OUString DbFilterField::GetFormatText(const Reference< XColumn >& /*_rxField*/, const Reference< XNumberFormatter >& /*xFormatter*/, const Color** /*ppColor*/)
{
return OUString();
}
@@ -3497,7 +3497,7 @@ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev,
try
{
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
OUString aText = GetText(_rxField, xFormatter, &pColor);
if (pColor != nullptr)
{
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 931bd28e2640..4e510e59d5e7 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -284,7 +284,7 @@ public:
bool Commit();
// Formatting the field data to output text
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) = 0;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) = 0;
virtual void Update(){}
// Refresh the control by the field data
@@ -393,7 +393,7 @@ public:
bool IsSimpleEdit() const { return m_bIsSimpleEdit; }
virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
virtual ::svt::CellControllerRef CreateController() const override;
virtual void PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect,
@@ -416,7 +416,7 @@ public:
virtual ~DbFormattedField() override;
virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
virtual ::svt::CellControllerRef CreateController() const override;
@@ -443,7 +443,7 @@ public:
virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect,
const css::uno::Reference< css::sdb::XColumn >& _rxField,
const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
protected:
// DbCellControl
@@ -459,7 +459,7 @@ public:
DbComboBox(DbGridColumn& _rColumn);
virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
virtual ::svt::CellControllerRef CreateController() const override;
@@ -486,7 +486,7 @@ public:
DbListBox(DbGridColumn& _rColumn);
virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
virtual ::svt::CellControllerRef CreateController() const override;
@@ -509,7 +509,7 @@ class DbPatternField : public DbCellControl
public:
DbPatternField( DbGridColumn& _rColumn, const css::uno::Reference<css::uno::XComponentContext>& _rContext );
virtual void Init( BrowserDataWin& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override;
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
virtual ::svt::CellControllerRef CreateController() const override;
@@ -556,7 +556,7 @@ class DbDateField : public DbSpinField
{
public:
DbDateField(DbGridColumn& _rColumn);
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
protected:
@@ -579,7 +579,7 @@ class DbTimeField : public DbSpinField
{
public:
DbTimeField(DbGridColumn& _rColumn);
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
protected:
@@ -602,7 +602,7 @@ class DbCurrencyField : public DbSpinField
{
public:
DbCurrencyField(DbGridColumn& _rColumn);
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
protected:
@@ -626,7 +626,7 @@ class DbNumericField : public DbSpinField
public:
DbNumericField(DbGridColumn& _rColumn);
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
protected:
@@ -657,7 +657,7 @@ public:
virtual ::svt::CellControllerRef CreateController() const override;
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override;
virtual void Update() override;
- virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override;
+ virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, const Color** ppColor = nullptr) override;
virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override;
const OUString& GetText() const {return m_aText;}
@@ -838,7 +838,7 @@ public:
OUString GetText(const css::uno::Reference< css::sdb::XColumn >& _rxField,
const css::uno::Reference< css::util::XNumberFormatter >& xFormatter,
- Color** ppColor = nullptr)
+ const Color** ppColor = nullptr)
{return m_pCellControl->GetFormatText(_rxField, xFormatter, ppColor);}
};
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 718728907e94..a32230c70dde 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -190,7 +190,7 @@ void SvxNumberFormatShell::LanguageChanged(LanguageType eLangType, short& rFmtSe
}
void SvxNumberFormatShell::FormatChanged(sal_uInt16 nFmtLbPos, OUString& rPreviewStr,
- Color*& rpFontColor)
+ const Color*& rpFontColor)
{
if (static_cast<size_t>(nFmtLbPos) < aCurEntryList.size())
{
@@ -371,7 +371,7 @@ void SvxNumberFormatShell::GetOptions(const OUString& rFormat, bool& rThousand,
}
void SvxNumberFormatShell::MakePreviewString(const OUString& rFormatStr, OUString& rPreviewStr,
- Color*& rpFontColor)
+ const Color*& rpFontColor)
{
rpFontColor = nullptr;
@@ -466,7 +466,7 @@ bool SvxNumberFormatShell::FindEntry(const OUString& rFmtString, sal_uInt32* pAt
void SvxNumberFormatShell::GetInitSettings(sal_uInt16& nCatLbPos, LanguageType& rLangType,
sal_uInt16& nFmtLbSelPos,
std::vector<OUString>& rFmtEntries,
- OUString& rPrevString, Color*& rpPrevColor)
+ OUString& rPrevString, const Color*& rpPrevColor)
{
// precondition: number formater found
DBG_ASSERT(pFormatter != nullptr, "Number formatter not found!");
@@ -1053,7 +1053,7 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl(std::vector<OUString>& rList,
return nSelPos;
}
-void SvxNumberFormatShell::GetPreviewString_Impl(OUString& rString, Color*& rpColor)
+void SvxNumberFormatShell::GetPreviewString_Impl(OUString& rString, const Color*& rpColor)
{
rpColor = nullptr;
@@ -1178,7 +1178,7 @@ void SvxNumberFormatShell::CategoryToPos_Impl(SvNumFormatType nCategory, sal_uIn
* Output: Output string rPreviewStr
*/
void SvxNumberFormatShell::MakePrevStringFromVal(const OUString& rFormatStr, OUString& rPreviewStr,
- Color*& rpFontColor, double nValue)
+ const Color*& rpFontColor, double nValue)
{
rpFontColor = nullptr;
pFormatter->GetPreviewString(rFormatStr, nValue, rPreviewStr, &rpFontColor, eCurLanguage);
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index b331270b592a..1dbcddd1db8d 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -966,7 +966,7 @@ namespace sw::mark
if (nFormat != NUMBERFORMAT_ENTRY_NOT_FOUND)
{
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
m_pNumberFormatter->GetOutputString(fDate, nFormat, sCurrentDate, &pCol, false);
}
return sCurrentDate;
@@ -1043,7 +1043,7 @@ namespace sw::mark
if (nFormat != NUMBERFORMAT_ENTRY_NOT_FOUND)
{
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
m_pNumberFormatter->GetOutputString(fDate, nFormat, sCurrentContent, &pCol, false);
}
return sCurrentContent;
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index d65607ef634e..8986d0a3f20c 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -550,11 +550,10 @@ bool SwAutoCorrDoc::TransliterateRTLWord( sal_Int32& rSttPos, sal_Int32 nEndPos
OUString sConverted;
if (pFormatter && !sWord.isEmpty())
{
- Color* pColor = nullptr;
- Color** ppColor = &pColor;
+ const Color* pColor = nullptr;
// Send text as NatNum12 prefix
OUString sPrefix("[NatNum12 " + sDisambiguatedWord.makeStringAndClear() + "]0");
- if (pFormatter->GetPreviewString(sPrefix, 0, sConverted, ppColor, LANGUAGE_USER_HUNGARIAN_ROVAS))
+ if (pFormatter->GetPreviewString(sPrefix, 0, sConverted, &pColor, LANGUAGE_USER_HUNGARIAN_ROVAS))
bRet = true;
}
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 39605e4786c2..00e4a6ef3419 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -511,7 +511,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
OUString sExpand;
SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
// Bug #60010
LanguageType nFormatLng = ::lcl_GetLanguageOfFormat( nLng, nFormat, *pFormatter );
@@ -770,7 +770,7 @@ OUString SwFormulaField::GetExpandedFormula() const
if (nFormat && nFormat != SAL_MAX_UINT32 && static_cast<SwValueFieldType *>(GetTyp())->UseFormat())
{
OUString sFormattedValue;
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 89914a2cc826..d2dca51b98d5 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -268,7 +268,7 @@ OUString SwUserFieldType::GetContent( sal_uInt32 nFormat )
if (nFormat && nFormat != SAL_MAX_UINT32)
{
OUString sFormattedValue;
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 45f5fb716633..0584de2c4164 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2090,7 +2090,7 @@ static void ChgNumToText( SwTableBox& rBox, sal_uLong nFormat )
bool bChgAlign = pDoc->IsInsTableAlignNum();
const SfxPoolItem* pItem;
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
if( getSwDefaultTextFormat() != nFormat )
{
// special text format:
@@ -2328,7 +2328,7 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
}
// format contents with the new value assigned and write to paragraph
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
OUString sNewText;
if( DBL_MAX == fVal )
{
@@ -2453,7 +2453,7 @@ bool SwTableBox::IsNumberChanged() const
GetTextNode()->GetRedlineText() );
lcl_DelTabsAtSttEnd( sOldText );
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
GetFrameFormat()->GetDoc()->GetNumberFormatter()->GetOutputString(
pValue->GetValue(), pNumFormat->GetValue(), sNewText, &pCol );
@@ -2583,7 +2583,7 @@ void SwTableBox::ActualiseValueBox()
ULONG_MAX != (nNdPos = IsValidNumTextNd()) )
{
double fVal = static_cast<const SwTableBoxValue*>(pValItem)->GetValue();
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
OUString sNewText;
pNumFormatr->GetOutputString( fVal, nFormatId, sNewText, &pCol );
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 1fc61a93e765..720a11695113 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1589,7 +1589,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const Date aDateDiff(pField->GetDate() - pNumFormatter->GetNullDate());
const sal_uLong nFormat = pNumFormatter->GetStandardFormat(SvNumFormatType::DATE, pField->GetLanguage());
OUString sDate;
- Color* pColor;
+ const Color* pColor;
pNumFormatter->GetOutputString(aDateDiff.GetDate(), nFormat, sDate, &pColor);
vcl::PDFNote aNote;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index f083e89c9f75..a630874b4a92 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1290,7 +1290,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if( pDBCol->nFormat &&
DBL_MAX != nValue )
{
- Color* pCol;
+ const Color* pCol;
if(rNumFormatr.GetType(pDBCol->nFormat) & SvNumFormatType::DATE)
{
::Date aStandard(1,1,1900);
diff --git a/sw/source/ui/table/autoformatpreview.cxx b/sw/source/ui/table/autoformatpreview.cxx
index 4ba0072172ab..5726b6e3784e 100644
--- a/sw/source/ui/table/autoformatpreview.cxx
+++ b/sw/source/ui/table/autoformatpreview.cxx
@@ -220,7 +220,7 @@ void AutoFormatPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nC
sal_Int32 nCheckPos;
sal_uInt32 nKey = mxNumFormat->GetIndexPuttingAndConverting(sFormat, eLng, eSys,
nType, bNew, nCheckPos);
- Color* pDummy;
+ const Color* pDummy;
mxNumFormat->GetOutputString(nVal, nKey, cellString, &pDummy);
}
else
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index a46bf67e9187..115f98fddc5e 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -245,7 +245,7 @@ void SwNumFormatBase::SetFormatType(const SvNumFormatType nFormatType)
const SvNumberformat* pFormat;
sal_Int32 i = 0;
- Color* pCol;
+ const Color* pCol;
double fVal = SwNumFormatBase::GetDefValue(nFormatType);
OUString sValue;
@@ -330,7 +330,7 @@ void SwNumFormatBase::SetDefFormat(const sal_uInt32 nDefaultFormat)
// No entry found:
OUString sValue;
- Color* pCol = nullptr;
+ const Color* pCol = nullptr;
if (nType == SvNumFormatType::TEXT)
{
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index ad85262917e3..7909612e562e 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -7056,7 +7056,7 @@ css::uno::Any SVTXFormattedField::convertEffectiveValue(const css::uno::Any& rVa
pFormatter = rFieldFormatter.StandardFormatter();
// should never fail
- Color* pDum;
+ const Color* pDum;
double d = 0.0;
rValue >>= d;
OUString sConverted;
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index da5d69e381c1..df156bc44e3a 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -116,7 +116,7 @@ getLocalizedDatTimeStr(
LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType();
SvNumberFormatter *pNumberFormatter = new SvNumberFormatter( xContext, eUILang );
OUString aTmpStr;
- Color* pColor = nullptr;
+ const Color* pColor = nullptr;
const Date& rNullDate = pNumberFormatter->GetNullDate();
sal_uInt32 nFormat
= pNumberFormatter->GetStandardFormat( SvNumFormatType::DATE, eUILang );