[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/koffice-essen/libs/odf
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2010-12-04 23:52:02
Message-ID: 20101204235202.920BCAC8A4 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1203638 by clicea:

Add a background color to the KoCellStyle.

 M  +12 -0     KoCellStyle.cpp  
 M  +4 -0      KoCellStyle.h  


--- branches/work/koffice-essen/libs/odf/KoCellStyle.cpp #1203637:1203638
@@ -63,7 +63,19 @@
     return familyName;
 }
 
+QColor KoCellStyle::backgroundColor() const
+{
+    return m_backgroundColor;
+}
+
+void KoCellStyle::setBackgroundColor(const QColor& color)
+{
+    m_backgroundColor = color;
+}
+
+
 void KoCellStyle::prepareStyle( KoGenStyle& style ) const
 {
     m_borders->saveOdf(style);
+    style.addProperty("fo:background-color", m_backgroundColor.name());
 }
--- branches/work/koffice-essen/libs/odf/KoCellStyle.h #1203637:1203638
@@ -41,6 +41,9 @@
 
     KoBorder* borders();
 
+    void setBackgroundColor(const QColor& color);
+    QColor backgroundColor() const;
+
 protected:
     virtual void prepareStyle( KoGenStyle& style ) const;
     virtual QString defaultPrefix() const;
@@ -50,6 +53,7 @@
 
 private:
     KoBorder* m_borders;
+    QColor m_backgroundColor;
 };
 
 #endif
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic