<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>117676</bug_id>
          
          <creation_ts>2005-12-04 22:04:23 +0000</creation_ts>
          <short_desc>HTML export does not include location field</short_desc>
          <delta_ts>2005-12-19 20:51:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konsolekalendar</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Andre Srinivasan">andre</reporter>
          <assigned_to name="Allen Winter">winter</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>395601</commentid>
    <comment_count>0</comment_count>
    <who name="Andre Srinivasan">andre</who>
    <bug_when>2005-12-04 22:04:23 +0000</bug_when>
    <thetext>Version:           3.5 (using KDE 3.5.0-1.1.fc4.kde, Fedora Core release 4 (Stentz))
Compiler:          Target: i386-redhat-linux
OS:                Linux (i686) release 2.6.14-1.1637_FC4

Event list export to HTML or dumped to HTML via konsolekalendar do not include the location field.  Dumping to text via konsolekalendar also does not include the location field.  An XML dump via konsoleKalendar properly includes the location field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>400053</commentid>
    <comment_count>1</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2005-12-19 20:51:46 +0000</bug_when>
    <thetext>SVN commit 489798 by winterz:

Provide the ability to print the incidence&apos;s Location field to the html export.

In konsolekalendar, the incidence location will always be printed to the html.
In korganizer, the location field print is configurable.

Note that permission has been granted by the docs team to introduce
a new i18n string with this patch.

Note also that this patch partially fixes several other bugs, like
#56713 and #63626.

CCMAIL: reinhold@kainhofer.com
BUGS: 117676



 M  +9 -7      korganizer/exportwebdialog.cpp  
 M  +31 -0     libkcal/htmlexport.cpp  
 M  +4 -3      libkcal/htmlexport.h  
 M  +8 -0      libkcal/htmlexportsettings.kcfg  


--- branches/KDE/3.5/kdepim/korganizer/exportwebdialog.cpp #489797:489798
@@ -64,9 +64,9 @@
 #include &quot;exportwebdialog.moc&quot;
 
 
-// FIXME: The basic structure of this dialog has been copied from KPrefsDialog, 
-//        because we want custom buttons, a Tabbed dialog, and a different 
-//        headline... Maybe we should try to achieve the same without code 
+// FIXME: The basic structure of this dialog has been copied from KPrefsDialog,
+//        because we want custom buttons, a Tabbed dialog, and a different
+//        headline... Maybe we should try to achieve the same without code
 //        duplication.
 ExportWebDialog::ExportWebDialog( HTMLExportSettings *settings, QWidget *parent,
                                   const char *name)
@@ -83,7 +83,7 @@
 
   connect( this, SIGNAL( user1Clicked() ), SLOT( slotOk() ) );
   connect( this, SIGNAL( cancelClicked() ), SLOT( reject() ) );
-  
+
   readConfig();
 }
 
@@ -157,9 +157,9 @@
 
   QGroupBox *destGroup = new QVGroupBox(i18n(&quot;Destination&quot;), mGeneralPage );
   topLayout-&gt;addWidget(destGroup);
-  KPrefsWidPath *pathWid = addWidPath( mSettings-&gt;outputFileItem(), 
+  KPrefsWidPath *pathWid = addWidPath( mSettings-&gt;outputFileItem(),
                                        destGroup, &quot;text/html&quot;, KFile::File );
-  connect( pathWid-&gt;urlRequester(), SIGNAL( textChanged( const QString &amp; ) ), 
+  connect( pathWid-&gt;urlRequester(), SIGNAL( textChanged( const QString &amp; ) ),
            SLOT( slotTextChanged( const QString &amp; ) ) );
 
   topLayout-&gt;addStretch( 1 );
@@ -174,7 +174,7 @@
 {
   mTodoPage = addPage(i18n(&quot;To-dos&quot;));
   QVBoxLayout *topLayout = new QVBoxLayout( mTodoPage, 10 );
-  
+
   QHBox *hbox = new QHBox( mTodoPage );
   topLayout-&gt;addWidget( hbox );
   addWidString( mSettings-&gt;todoListTitleItem(), hbox );
@@ -182,6 +182,7 @@
   QVBox *vbox = new QVBox( mTodoPage );
   topLayout-&gt;addWidget( vbox );
   addWidBool( mSettings-&gt;taskDueDateItem(), vbox );
+  addWidBool( mSettings-&gt;taskLocationItem(), vbox );
   addWidBool( mSettings-&gt;taskCategoriesItem(), vbox );
   addWidBool( mSettings-&gt;taskAttendeesItem(), vbox );
 //  addWidBool( mSettings-&gt;taskExcludePrivateItem(), vbox );
@@ -201,6 +202,7 @@
 
   QVBox *vbox = new QVBox( mEventPage );
   topLayout-&gt;addWidget( vbox );
+  addWidBool( mSettings-&gt;eventLocationItem(), vbox );
   addWidBool( mSettings-&gt;eventCategoriesItem(), vbox );
   addWidBool( mSettings-&gt;eventAttendeesItem(), vbox );
 //  addWidBool( mSettings-&gt;eventExcludePrivateItem(), vbox );
--- branches/KDE/3.5/kdepim/libkcal/htmlexport.cpp #489797:489798
@@ -223,6 +223,10 @@
   *ts &lt;&lt; &quot;    &lt;th class=\&quot;sum\&quot;&gt;&quot; &lt;&lt; i18n(&quot;Start Time&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
   *ts &lt;&lt; &quot;    &lt;th&gt;&quot; &lt;&lt; i18n(&quot;End Time&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
   *ts &lt;&lt; &quot;    &lt;th&gt;&quot; &lt;&lt; i18n(&quot;Event&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
+  if ( mSettings-&gt;eventLocation() ) {
+    *ts &lt;&lt; &quot;    &lt;th&gt;&quot; &lt;&lt; i18n(&quot;Location&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
+    ++columns;
+  }
   if ( mSettings-&gt;eventCategories() ) {
     *ts &lt;&lt; &quot;    &lt;th&gt;&quot; &lt;&lt; i18n(&quot;Categories&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
     ++columns;
@@ -285,6 +289,12 @@
   }
   *ts &lt;&lt; &quot;    &lt;/td&gt;\n&quot;;
 
+  if ( mSettings-&gt;eventLocation() ) {
+    *ts &lt;&lt; &quot;  &lt;td&gt;\n&quot;;
+    formatLocation( ts, event );
+    *ts &lt;&lt; &quot;  &lt;/td&gt;\n&quot;;
+  }
+
   if ( mSettings-&gt;eventCategories() ) {
     *ts &lt;&lt; &quot;  &lt;td&gt;\n&quot;;
     formatCategories( ts, event );
@@ -346,6 +356,10 @@
     *ts &lt;&lt; &quot;    &lt;th&gt;&quot; &lt;&lt; i18n(&quot;Due Date&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
     ++columns;
   }
+  if ( mSettings-&gt;taskLocation() ) {
+    *ts &lt;&lt; &quot;    &lt;th&gt;&quot; &lt;&lt; i18n(&quot;Location&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
+    ++columns;
+  }
   if ( mSettings-&gt;taskCategories() ) {
     *ts &lt;&lt; &quot;    &lt;th&gt;&quot; &lt;&lt; i18n(&quot;Categories&quot;) &lt;&lt; &quot;&lt;/th&gt;\n&quot;;
     ++columns;
@@ -451,6 +465,14 @@
     *ts &lt;&lt; &quot;  &lt;/td&gt;\n&quot;;
   }
 
+  if ( mSettings-&gt;taskLocation() ) {
+    *ts &lt;&lt; &quot;  &lt;td&quot;;
+    if (completed) *ts &lt;&lt; &quot; class=\&quot;done\&quot;&quot;;
+    *ts &lt;&lt; &quot;&gt;\n&quot;;
+    formatLocation(ts,todo);
+    *ts &lt;&lt; &quot;  &lt;/td&gt;\n&quot;;
+  }
+
   if ( mSettings-&gt;taskCategories() ) {
     *ts &lt;&lt; &quot;  &lt;td&quot;;
     if (completed) *ts &lt;&lt; &quot; class=\&quot;done\&quot;&quot;;
@@ -502,6 +524,15 @@
   return false;
 }
 
+void HtmlExport::formatLocation (QTextStream *ts,Incidence *event)
+{
+  if (!event-&gt;location().isEmpty()) {
+    *ts &lt;&lt; &quot;    &quot; &lt;&lt; cleanChars(event-&gt;location()) &lt;&lt; &quot;\n&quot;;
+  } else {
+    *ts &lt;&lt; &quot;    &amp;nbsp;\n&quot;;
+  }
+}
+
 void HtmlExport::formatCategories (QTextStream *ts,Incidence *event)
 {
   if (!event-&gt;categoriesStr().isEmpty()) {
--- branches/KDE/3.5/kdepim/libkcal/htmlexport.h #489797:489798
@@ -69,17 +69,18 @@
     void createFreeBusyView( QTextStream *ts );
 
     void createTodo( QTextStream *ts, Todo *todo);
-    void createEvent( QTextStream *ts, Event *event, QDate date, 
+    void createEvent( QTextStream *ts, Event *event, QDate date,
                       bool withDescription = true);
     void createFooter( QTextStream *ts );
 
     bool checkSecrecy( Incidence * );
 
+    void formatLocation( QTextStream *ts, Incidence *event );
     void formatCategories( QTextStream *ts, Incidence *event );
     void formatAttendees( QTextStream *ts, Incidence *event );
- 
+
     QString breakString( const QString &amp;text );
-    
+
     QDate fromDate() const;
     QDate toDate() const;
     QString styleSheet() const;
--- branches/KDE/3.5/kdepim/libkcal/htmlexportsettings.kcfg #489797:489798
@@ -78,6 +78,10 @@
       &lt;default code=&quot;true&quot;&gt;i18n(&quot;Calendar&quot;)&lt;/default&gt;
     &lt;/entry&gt;
 
+    &lt;entry type=&quot;Bool&quot; name=&quot;EventLocation&quot; key=&quot;Export Location&quot;&gt;
+      &lt;label&gt;Export location of the events&lt;/label&gt;
+      &lt;default&gt;true&lt;/default&gt;
+    &lt;/entry&gt;
     &lt;entry type=&quot;Bool&quot; name=&quot;EventCategories&quot; key=&quot;Export Categories&quot;&gt;
       &lt;label&gt;Export categories of the events&lt;/label&gt;
       &lt;default&gt;true&lt;/default&gt;
@@ -103,6 +107,10 @@
       &lt;label&gt;Export due dates of the to-dos&lt;/label&gt;
       &lt;default&gt;true&lt;/default&gt;
     &lt;/entry&gt;
+    &lt;entry type=&quot;Bool&quot; name=&quot;TaskLocation&quot; key=&quot;Export Location&quot;&gt;
+      &lt;label&gt;Export location of the to-dos&lt;/label&gt;
+      &lt;default&gt;true&lt;/default&gt;
+    &lt;/entry&gt;
     &lt;entry type=&quot;Bool&quot; name=&quot;TaskCategories&quot; key=&quot;Export Categories&quot;&gt;
       &lt;label&gt;Export categories of the to-dos&lt;/label&gt;
       &lt;default&gt;true&lt;/default&gt;
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>