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

List:       koffice-devel
Subject:    Re: Review Request: as per koffice 2.2,
From:       Dag Andersen <danders () get2net ! dk>
Date:       2010-12-06 8:25:05
Message-ID: 201012060925.06447.danders () get2net ! dk
[Download RAW message or body]

Made a patch that includes needed changes to kplato and implements Jaroslaws 
comment.
(I don't think Adam has much time today)

Cyrrille, is this something that should go in before RC1?

-- 
Mvh.
Dag Andersen

Søndag 05 december 2010 21:11:08 skrev Jaroslaw Staniek:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6055/#review9141
> -----------------------------------------------------------
> 
> Ship it!
> 
> 
> To avoid broken translation I propose to wait with changing to i18n("Data
> Source"). Other changes look good.
> 
> 
> - Jaroslaw
> 
> On 2010-12-05 19:51:31, Adam Pigg wrote:
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > http://svn.reviewboard.kde.org/r/6055/
> > -----------------------------------------------------------
> > 
> > (Updated 2010-12-05 19:51:31)
> > 
> > 
> > Review request for KOffice.
> > 
> > 
> > Summary
> > -------
> > 
> > For some reason, brances/2.2 contains a change not in trunk or -essen,
> > that is, before the release of 2.2, when the file format of reports was
> > reviewed, we changed the attribute for the data source of an item to
> > report:item-data-source, from report:control-source.  This patch changes
> > branch/2.3 to match, and should be applied to trunk and -essen also.
> > 
> > KPlato will need a small change to align to this
> > 
> > 
> > Diffs
> > -----
> > 
> >   branches/koffice/2.3/koffice/libs/koreport/items/check/KoReportItemChec
> >   k.cpp 1203861
> >   branches/koffice/2.3/koffice/libs/koreport/items/field/KoReportItemFie
> >   ld.cpp 1203861
> >   branches/koffice/2.3/koffice/libs/koreport/items/image/KoReportItemIma
> >   ge.cpp 1203861
> >   branches/koffice/2.3/koffice/libs/koreport/items/text/KoReportItemText
> >   .cpp 1203861
> >   branches/koffice/2.3/koffice/plugins/reporting/barcode/KoReportItemBar
> >   code.cpp 1203861
> > 
> > Diff: http://svn.reviewboard.kde.org/r/6055/diff
> > 
> > 
> > Testing
> > -------
> > 
> > I have diffed all associated files and this is the only change that needs
> > applied.
> > 
> > 
> > Thanks,
> > 
> > Adam

["reportdatasource.diff" (text/x-patch)]

Index: plugins/reporting/barcode/KoReportItemBarcode.cpp
===================================================================
--- plugins/reporting/barcode/KoReportItemBarcode.cpp	(revision 1203480)
+++ plugins/reporting/barcode/KoReportItemBarcode.cpp	(working copy)
@@ -34,7 +34,7 @@
     QDomNode node;
 
     m_name->setValue(element.toElement().attribute("report:name"));
-    m_controlSource->setValue(element.toElement().attribute("report:control-source"));
 +    m_controlSource->setValue(element.toElement().attribute("report:item-data-source"));
  Z = element.toElement().attribute("report:z-index").toDouble();
     m_horizontalAlignment->setValue(element.toElement().attribute("report:horizontal-align"));
                
     m_maxLength->setValue(element.toElement().attribute("report:barcode-max-length"));
 @@ -105,7 +105,7 @@
 
     QStringList keys, strings;
 
-    m_controlSource = new KoProperty::Property("control-source", QStringList(), \
QStringList(), QString(), i18n("Control Source")); +    m_controlSource = new \
KoProperty::Property("item-data-source", QStringList(), QStringList(), QString(), \
i18n("Control Source"));  
     keys << "left" << "center" << "right";
     strings << i18n("Left") << i18n("Center") << i18n("Right");
Index: libs/koreport/items/image/KoReportItemImage.cpp
===================================================================
--- libs/koreport/items/image/KoReportItemImage.cpp	(revision 1203480)
+++ libs/koreport/items/image/KoReportItemImage.cpp	(working copy)
@@ -34,12 +34,12 @@
     QDomNode node;
 
     m_name->setValue(element.toElement().attribute("report:name"));
-    m_controlSource->setValue(element.toElement().attribute("report:control-source"));
 +    m_controlSource->setValue(element.toElement().attribute("report:item-data-source"));
                
     m_resizeMode->setValue(element.toElement().attribute("report:resize-mode", \
"stretch"));  Z = element.toElement().attribute("report:z-index").toDouble();
 
     parseReportRect(element.toElement(), &m_pos, &m_size);
-    
+
     for (int i = 0; i < nl.count(); i++) {
         node = nl.item(i);
         n = node.nodeName();
@@ -107,7 +107,7 @@
 {
     m_set = new KoProperty::Set(0, "Image");
 
-    m_controlSource = new KoProperty::Property("control-source", QStringList(), \
QStringList(), QString(), i18n("Control Source")); +    m_controlSource = new \
KoProperty::Property("item-data-source", QStringList(), QStringList(), QString(), \
i18n("Control Source"));  
     QStringList keys, strings;
     keys << "clip" << "stretch";
@@ -141,7 +141,7 @@
 int KoReportItemImage::render(OROPage* page, OROSection* section,  QPointF offset, \
QVariant data, KRScriptHandler *script)  {
     Q_UNUSED(script)
-    
+
     QString uudata;
     QByteArray imgdata;
     if (!isInline()) {
Index: libs/koreport/items/field/KoReportItemField.cpp
===================================================================
--- libs/koreport/items/field/KoReportItemField.cpp	(revision 1203480)
+++ libs/koreport/items/field/KoReportItemField.cpp	(working copy)
@@ -37,13 +37,13 @@
     QDomNode node;
 
     m_name->setValue(element.toElement().attribute("report:name"));
-    m_controlSource->setValue(element.toElement().attribute("report:control-source"));
 +    m_controlSource->setValue(element.toElement().attribute("report:item-data-source"));
  Z = element.toElement().attribute("report:z-index").toDouble();
     m_horizontalAlignment->setValue(element.toElement().attribute("report:horizontal-align"));
                
     m_verticalAlignment->setValue(element.toElement().attribute("report:vertical-align"));
  
     parseReportRect(element.toElement(), &m_pos, &m_size);
-    
+
     for (int i = 0; i < nl.count(); i++) {
         node = nl.item(i);
         n = node.nodeName();
@@ -76,7 +76,7 @@
 
     QStringList keys, strings;
 
-    m_controlSource = new KoProperty::Property("control-source", QStringList(), \
QStringList(), QString(), i18n("Control Source")); +    m_controlSource = new \
KoProperty::Property("item-data-source", QStringList(), QStringList(), QString(), \
i18n("Control Source"));  
     m_controlSource->setOption("extraValueAllowed", "true");
 
@@ -217,7 +217,7 @@
     } else {
         str = data.toString();
     }
-    
+
     tb->setText(str);
     if (page)
         page->addPrimitive(tb);
Index: libs/koreport/items/text/KoReportItemText.cpp
===================================================================
--- libs/koreport/items/text/KoReportItemText.cpp	(revision 1203480)
+++ libs/koreport/items/text/KoReportItemText.cpp	(working copy)
@@ -34,14 +34,14 @@
 
     createProperties();
     m_name->setValue(element.toElement().attribute("report:name"));
-    m_controlSource->setValue(element.toElement().attribute("report:control-source"));
 +    m_controlSource->setValue(element.toElement().attribute("report:item-data-source"));
  Z = element.toElement().attribute("report:z-index").toDouble();
     m_horizontalAlignment->setValue(element.toElement().attribute("report:horizontal-align"));
                
     m_verticalAlignment->setValue(element.toElement().attribute("report:vertical-align"));
                
     m_bottomPadding = \
element.toElement().attribute("report:bottom-padding").toDouble();  
     parseReportRect(element.toElement(), &m_pos, &m_size);
-    
+
     for (int i = 0; i < nl.count(); i++) {
         node = nl.item(i);
         n = node.nodeName();
@@ -105,7 +105,7 @@
     QStringList keys, strings;
 
     //_query = new KoProperty::Property ( "Query", QStringList(), QStringList(), \
                "Data Source", "Query" );
-    m_controlSource = new KoProperty::Property("control-source", QStringList(), \
QStringList(), QString(), i18n("Control Source")); +    m_controlSource = new \
KoProperty::Property("item-data-source", QStringList(), QStringList(), QString(), \
i18n("Control Source"));  
     keys << "left" << "center" << "right";
     strings << i18n("Left") << i18n("Center") << i18n("Right");
@@ -189,7 +189,7 @@
 int KoReportItemText::render(OROPage* page, OROSection* section,  QPointF offset, \
QVariant data, KRScriptHandler *script)  {
     Q_UNUSED(script);
-    
+
     QString qstrValue;
 
     QString cs = itemDataSource();
Index: libs/koreport/items/check/KoReportItemCheck.cpp
===================================================================
--- libs/koreport/items/check/KoReportItemCheck.cpp	(revision 1203480)
+++ libs/koreport/items/check/KoReportItemCheck.cpp	(working copy)
@@ -34,7 +34,7 @@
     QDomNode node;
 
     m_name->setValue(element.toElement().attribute("report:name"));
-    m_controlSource->setValue(element.toElement().attribute("report:control-source"));
 +    m_controlSource->setValue(element.toElement().attribute("report:item-data-source"));
  Z = element.toElement().attribute("report:z-index").toDouble();
     m_foregroundColor->setValue(element.toElement().attribute("fo:foreground-color"));
                
     m_checkStyle->setValue(element.toElement().attribute("report:check-style"));
@@ -74,7 +74,7 @@
     strings << i18n("Cross") << i18n("Tick") << i18n("Dot");
     m_checkStyle = new KoProperty::Property("check-style", keys, strings, "Cross", \
i18n("Style"));  
-    m_controlSource = new KoProperty::Property("control-source", QStringList(), \
QStringList(), QString(), i18n("Control Source")); +    m_controlSource = new \
KoProperty::Property("item-data-source", QStringList(), QStringList(), QString(), \
i18n("Control Source"));  m_controlSource->setOption("extraValueAllowed", "true");
 
     m_foregroundColor = new KoProperty::Property("foreground-color", Qt::black, \
i18n("Foreground Color")); @@ -141,7 +141,7 @@
         kDebug() << "Check Value:" << str;
         if (str == "t" || str == "true" || str == "1")
             v = true;
-    
+
     } else {
         v = value();
     }
Index: kplato/kptview.cpp
===================================================================
--- kplato/kptview.cpp	(revision 1203480)
+++ kplato/kptview.cpp	(working copy)
@@ -2948,7 +2948,7 @@
     s += "<report:page-style report:print-orientation=\"portrait\" \
fo:margin-bottom=\"1,00cm\" fo:margin-top=\"1,00cm\" fo:margin-left=\"1,00cm\" \
fo:margin-right=\"1,00cm\" report:page-size=\"A4\" >predefined</report:page-style>";  \
                s += "<report:body>";
     s += "<report:section svg:height=\"1,75cm\" fo:background-color=\"#ffffff\" \
                report:section-type=\"header-page-any\" >";
-    s += "<report:field report:name=\"field16\" report:horizontal-align=\"left\" \
report:control-source=\"=project.Manager()\" svg:x=\"13cm\" svg:width=\"5.9714cm\" \
svg:y=\"0cm\" report:vertical-align=\"bottom\" svg:height=\"0.9388cm\" \
report:z-index=\"-2\" >"; +    s += "<report:field report:name=\"field16\" \
report:horizontal-align=\"left\" report:item-data-source=\"=project.Manager()\" \
svg:x=\"13cm\" svg:width=\"5.9714cm\" svg:y=\"0cm\" report:vertical-align=\"bottom\" \
svg:height=\"0.9388cm\" report:z-index=\"-2\" >";  s += "<report:text-style \
fo:font-weight=\"bold\" fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" \
fo:font-size=\"10\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" \
                fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
     s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" \
report:line-color=\"#000000\" />";  s += "</report:field>";
@@ -2956,7 +2956,7 @@
     s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" \
fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" \
fo:font-style=\"italic\" fo:background-color=\"#ffffff\" \
                fo:background-opacity=\"100%\" />";
     s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" \
report:line-color=\"#000000\" />";  s += "</report:label>";
-    s += "<report:field report:name=\"field17\" report:horizontal-align=\"left\" \
report:control-source=\"=project.Name()\" svg:x=\"0cm\" svg:width=\"12.5cm\" \
svg:y=\"0cm\" report:vertical-align=\"bottom\" svg:height=\"1cm\" \
report:z-index=\"-1\" >"; +    s += "<report:field report:name=\"field17\" \
report:horizontal-align=\"left\" report:item-data-source=\"=project.Name()\" \
svg:x=\"0cm\" svg:width=\"12.5cm\" svg:y=\"0cm\" report:vertical-align=\"bottom\" \
svg:height=\"1cm\" report:z-index=\"-1\" >";  s += "<report:text-style \
fo:font-weight=\"bold\" fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" \
fo:font-size=\"10\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" \
                fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
     s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" \
report:line-color=\"#000000\" />";  s += "</report:field>";
@@ -2975,11 +2975,11 @@
     s += "</report:label>";
     s += "</report:section>";
     s += "<report:section svg:height=\"2,50cm\" fo:background-color=\"#ffffff\" \
                report:section-type=\"footer-page-any\" >";
-    s += "<report:field report:name=\"field10\" report:horizontal-align=\"right\" \
report:control-source=\"=constants.PageNumber()\" svg:x=\"6.75cm\" \
svg:width=\"0.75cm\" svg:y=\"0.25cm\" report:vertical-align=\"center\" \
svg:height=\"0.75cm\" report:z-index=\"0\" >"; +    s += "<report:field \
report:name=\"field10\" report:horizontal-align=\"right\" \
report:item-data-source=\"=constants.PageNumber()\" svg:x=\"6.75cm\" \
svg:width=\"0.75cm\" svg:y=\"0.25cm\" report:vertical-align=\"center\" \
svg:height=\"0.75cm\" report:z-index=\"0\" >";  s += "<report:text-style \
fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" \
fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" \
                fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
     s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" \
report:line-color=\"#000000\" />";  s += "</report:field>";
-    s += "<report:field report:name=\"field11\" report:horizontal-align=\"left\" \
report:control-source=\"=constants.PageTotal()\" svg:x=\"8.25cm\" svg:width=\"3cm\" \
svg:y=\"0.25cm\" report:vertical-align=\"center\" svg:height=\"0.75cm\" \
report:z-index=\"0\" >"; +    s += "<report:field report:name=\"field11\" \
report:horizontal-align=\"left\" report:item-data-source=\"=constants.PageTotal()\" \
svg:x=\"8.25cm\" svg:width=\"3cm\" svg:y=\"0.25cm\" report:vertical-align=\"center\" \
svg:height=\"0.75cm\" report:z-index=\"0\" >";  s += "<report:text-style \
fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" \
fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" \
                fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
     s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" \
report:line-color=\"#000000\" />";  s += "</report:field>";
@@ -3002,7 +3002,7 @@
         s += "<report:text-style fo:letter-spacing=\"0%\" \
style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" \
fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" \
                fo:background-opacity=\"100%\" />";
         s += "<report:line-style report:line-style=\"nopen\" \
report:line-weight=\"1\" report:line-color=\"#000000\" />";  s += "</report:label>";
-    s += "<report:field report:name=\"field8\" report:horizontal-align=\"left\" \
report:control-source=\"Parent\" svg:x=\"0.5cm\" svg:width=\"8cm\" svg:y=\"1cm\" \
report:vertical-align=\"center\" svg:height=\"0.689cm\" report:z-index=\"0\" >"; +    \
s += "<report:field report:name=\"field8\" report:horizontal-align=\"left\" \
report:item-data-source=\"Parent\" svg:x=\"0.5cm\" svg:width=\"8cm\" svg:y=\"1cm\" \
report:vertical-align=\"center\" svg:height=\"0.689cm\" report:z-index=\"0\" >";  s \
+= "<report:text-style fo:font-weight=\"bold\" fo:letter-spacing=\"0%\" \
style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" \
fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" \
                fo:background-opacity=\"100%\" />";
         s += "<report:line-style report:line-style=\"nopen\" \
report:line-weight=\"1\" report:line-color=\"#000000\" />";  s += "</report:field>";
@@ -3013,11 +3013,11 @@
     s += "</report:section>";
     s += "</report:group>";
     s += "<report:section svg:height=\"0,50cm\" fo:background-color=\"#ffffff\" \
                report:section-type=\"detail\" >";
-    s += "<report:field report:name=\"field7\" report:horizontal-align=\"left\" \
report:control-source=\"NodeName\" svg:x=\"0.5cm\" svg:width=\"3.75cm\" svg:y=\"0cm\" \
report:vertical-align=\"center\" svg:height=\"0.5cm\" report:z-index=\"0\" >"; +    s \
+= "<report:field report:name=\"field7\" report:horizontal-align=\"left\" \
report:item-data-source=\"NodeName\" svg:x=\"0.5cm\" svg:width=\"3.75cm\" \
svg:y=\"0cm\" report:vertical-align=\"center\" svg:height=\"0.5cm\" \
report:z-index=\"0\" >";  s += "<report:text-style fo:letter-spacing=\"0%\" \
style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" \
fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" \
                fo:background-opacity=\"100%\" />";
     s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" \
report:line-color=\"#000000\" />";  s += "</report:field>";
-    s += "<report:field report:name=\"field9\" report:horizontal-align=\"center\" \
report:control-source=\"NodeCompleted\" svg:x=\"4.25cm\" svg:width=\"4.25cm\" \
svg:y=\"0cm\" report:vertical-align=\"center\" svg:height=\"0.5cm\" \
report:z-index=\"0\" >"; +    s += "<report:field report:name=\"field9\" \
report:horizontal-align=\"center\" report:item-data-source=\"NodeCompleted\" \
svg:x=\"4.25cm\" svg:width=\"4.25cm\" svg:y=\"0cm\" report:vertical-align=\"center\" \
svg:height=\"0.5cm\" report:z-index=\"0\" >";  s += "<report:text-style \
fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" \
fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" \
                fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
     s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" \
report:line-color=\"#000000\" />";  s += "</report:field>";



_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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