Bug 69284 - Specified currency is ignored when formatting currency cells
Summary: Specified currency is ignored when formatting currency cells
Status: RESOLVED FIXED
Alias: None
Product: calligrasheets
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-29 15:57 UTC by Hamish Rodda
Modified: 2004-10-01 11:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to enable changing of the currency. (1.15 KB, patch)
2004-10-01 01:02 UTC, Tim Beaulen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hamish Rodda 2003-11-29 15:57:13 UTC
Version:           1.2.94 (using KDE 3.1.93 (CVS >= 20031111), compiled sources)
Compiler:          gcc version 3.3.2 (Debian)
OS:          Linux (i686) release 2.6.0-test9-mm5

My system is set to Australian dollars, so I get an A$ in front of currency cells, as expected.

When I specify US dollars in the formatting box for a cell, it 1) does not change the A$ to US$ as I would expect (ie. A$ is still displayed), and 2) opening the format dialog it has forgotten that I specified US dollars (it has changed to "()").

This is the latest CVS head koffice, and kdelibs from a few days ago.
Comment 1 henrik 2004-01-22 18:40:07 UTC
I have a similar problem in Denmark. KSpread (the last of the betas) used the $ sign by default, and even when choosing a different one in Cell Format, the newly selected currency is not applied. 
Comment 2 John Knottenbelt 2004-08-13 15:34:00 UTC
Same here, using debian unstable, KSpread 1.3.2 (Using KDE 3.2.3).
Comment 3 Tim Beaulen 2004-10-01 01:02:16 UTC
Created attachment 7739 [details]
Patch to enable changing of the currency.

The following patch works for me to enable changing of the currency.
Comment 4 Tomas Mecir 2004-10-01 11:26:09 UTC
CVS commit by mecir: 

Fix bug #69284 (Specified currency is ignored when formatting currency cells).
Patch by Tim Beaulen, tbscope <> gmail () com

CCMAIL: 69284-done@bugs.kde.org


  M +4 -1      kspread_style.cc   1.31


--- koffice/kspread/kspread_style.cc  #1.30:1.31
@@ -1189,4 +1189,5 @@ bool KSpreadStyle::loadXML( QDomElement 
       m_currency.symbol = format.attribute( "symbol" );
     }
+    m_featuresSet |= SFormatType;
   }
   if ( format.hasAttribute( "angle" ) )
@@ -1576,5 +1577,5 @@ KSpreadFormat::FormatType KSpreadStyle::
 KSpreadFormat::Currency const & KSpreadStyle::currency() const
 {
-  return ( !m_parent ? m_currency : m_parent->currency() );
+  return ( !m_parent || featureSet( SFormatType ) ? m_currency : m_parent->currency() );
 }
 
@@ -2067,8 +2068,10 @@ KSpreadStyle * KSpreadStyle::setCurrency
     KSpreadStyle * style = new KSpreadStyle( this );
     style->m_currency = currency;
+    style->m_featuresSet |= SFormatType;
     return style;
   }
 
   m_currency = currency;
+  m_featuresSet |= SFormatType;
   return this;
 }