summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-07-27 12:03:39 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-07-27 12:03:39 +0200
commit5c01c9c6b2447cac2e92a4e8685f40493cfa5090 (patch)
tree73a46152318782ebec1c80da58953bf730ff6720 /forms
parent6c657296f109ce4c0c74ab6b7c13f2c1c31fec64 (diff)
lcl_getFormatTable result is used non-const
Change-Id: I9fbd62c24190c28752fd9f4cf37d84d1fd466983
Diffstat (limited to 'forms')
-rw-r--r--forms/source/misc/limitedformats.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx
index ab13dc710c9e..33e5b37547af 100644
--- a/forms/source/misc/limitedformats.cxx
+++ b/forms/source/misc/limitedformats.cxx
@@ -84,13 +84,13 @@ namespace frm
};
//---------------------------------------------------------------------
- static const FormatEntry* lcl_getFormatTable(sal_Int16 nTableId)
+ static FormatEntry* lcl_getFormatTable(sal_Int16 nTableId)
{
switch (nTableId)
{
case FormComponentType::TIMEFIELD:
{
- static const FormatEntry s_aFormats[] = {
+ static FormatEntry s_aFormats[] = {
{ "HH:MM", -1, ltEnglishUS },
{ "HH:MM:SS", -1, ltEnglishUS },
{ "HH:MM AM/PM", -1, ltEnglishUS },
@@ -103,7 +103,7 @@ namespace frm
}
case FormComponentType::DATEFIELD:
{
- static const FormatEntry s_aFormats[] = {
+ static FormatEntry s_aFormats[] = {
{ "T-M-JJ", -1, ltGerman },
{ "TT-MM-JJ", -1, ltGerman },
{ "TT-MM-JJJJ", -1, ltGerman },
@@ -151,7 +151,7 @@ namespace frm
//---------------------------------------------------------------------
void OLimitedFormats::ensureTableInitialized(const sal_Int16 _nTableId)
{
- const FormatEntry* pFormatTable = lcl_getFormatTable(_nTableId);
+ FormatEntry* pFormatTable = lcl_getFormatTable(_nTableId);
if (-1 == pFormatTable->nKey)
{
::osl::MutexGuard aGuard(s_aMutex);
@@ -166,7 +166,7 @@ namespace frm
if (xStandardFormats.is())
{
// loop through the table
- FormatEntry* pLoopFormats = const_cast<FormatEntry*>(pFormatTable);
+ FormatEntry* pLoopFormats = pFormatTable;
while (pLoopFormats->pDescription)
{
// get the key for the description
@@ -206,8 +206,8 @@ namespace frm
void OLimitedFormats::clearTable(const sal_Int16 _nTableId)
{
::osl::MutexGuard aGuard(s_aMutex);
- const FormatEntry* pFormats = lcl_getFormatTable(_nTableId);
- FormatEntry* pResetLoop = const_cast<FormatEntry*>(pFormats);
+ FormatEntry* pFormats = lcl_getFormatTable(_nTableId);
+ FormatEntry* pResetLoop = pFormats;
while (pResetLoop->pDescription)
{
pResetLoop->nKey = -1;