summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koimportoldialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index cc13395..c4d5f06 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -223,66 +223,66 @@ void KOImportOLdialog::readCalendarData( DWORD folder )
223 { 223 {
224 qApp->processEvents(); 224 qApp->processEvents();
225 if ( ! bar.isVisible() ) 225 if ( ! bar.isVisible() )
226 return ; 226 return ;
227 bar.setProgress( i ); 227 bar.setProgress( i );
228 indx = (long)i; 228 indx = (long)i;
229 itm = folderItems.Item(indx.Detach()); 229 itm = folderItems.Item(indx.Detach());
230 _AppointmentItem * pItem = (_AppointmentItem *)&itm; 230 _AppointmentItem * pItem = (_AppointmentItem *)&itm;
231 ol2kopiCalendar( pItem ); 231 ol2kopiCalendar( pItem );
232 itm->Release(); 232 itm->Release();
233 } 233 }
234} 234}
235void KOImportOLdialog::slotOk() 235void KOImportOLdialog::slotOk()
236{ 236{
237 QDialog::accept(); 237 QDialog::accept();
238} 238}
239 239
240void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRecurrence ) 240void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRecurrence )
241{ 241{
242 KCal::Event* event = new KCal::Event(); 242 KCal::Event* event = new KCal::Event();
243 if ( aItem->GetAllDayEvent() ){ 243 if ( aItem->GetAllDayEvent() ){
244 event->setDtStart( QDateTime( mDdate2Qdtr( aItem->GetStart()).date(),QTime(0,0,0 ) )); 244 event->setDtStart( QDateTime( mDdate2Qdtr( aItem->GetStart()).date(),QTime(0,0,0 ) ));
245 event->setDtEnd( QDateTime( mDdate2Qdtr( aItem->GetEnd()) .date(),QTime(0,0,0 )).addDays(-1)); 245 event->setDtEnd( QDateTime( mDdate2Qdtr( aItem->GetEnd()) .date(),QTime(0,0,0 )).addDays(-1));
246 event->setFloats( true ); 246 event->setFloats( true );
247 } else { 247 } else {
248 event->setDtStart( mDdate2Qdtr( aItem->GetStart()) ); 248 event->setDtStart( mDdate2Qdtr( aItem->GetStart()) );
249 event->setDtEnd( mDdate2Qdtr( aItem->GetEnd()) ); 249 event->setDtEnd( mDdate2Qdtr( aItem->GetEnd()) );
250 event->setFloats( false ); 250 event->setFloats( false );
251 } 251 }
252 event->setSummary( QString::fromUcs2( aItem->GetSubject().GetBuffer()) ); 252 event->setSummary( QString::fromUcs2( aItem->GetSubject().GetBuffer()) );
253 event->setLocation( QString::fromUcs2( aItem->GetLocation().GetBuffer()) ); 253 event->setLocation( QString::fromUcs2( aItem->GetLocation().GetBuffer()) );
254 event->setDescription( QString::fromUcs2( aItem->GetBody().GetBuffer()).replace( QRegExp("\\r"), "") ); 254 event->setDescription( QString::fromUcs2( aItem->GetBody().GetBuffer()).replace( QRegExp("\\r"), "") );
255 QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()); 255 QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("; "), ";");
256 event->setCategories( QStringList::split( ";", cat )); 256 event->setCategories( QStringList::split( ";", cat ) );
257 if ( aItem->GetReminderSet() ) { 257 if ( aItem->GetReminderSet() ) {
258 event->clearAlarms(); 258 event->clearAlarms();
259 Alarm* alarm = event->newAlarm(); 259 Alarm* alarm = event->newAlarm();
260 alarm->setStartOffset( -aItem->GetReminderMinutesBeforeStart()*60 ); 260 alarm->setStartOffset( -aItem->GetReminderMinutesBeforeStart()*60 );
261 alarm->setEnabled( true ); 261 alarm->setEnabled( true );
262 if ( aItem->GetReminderPlaySound() ) { 262 if ( aItem->GetReminderPlaySound() ) {
263 alarm->setType( Alarm::Audio ); 263 alarm->setType( Alarm::Audio );
264 alarm->setAudioFile( QString::fromUcs2( aItem->GetReminderSoundFile().GetBuffer())); 264 alarm->setAudioFile( QString::fromUcs2( aItem->GetReminderSoundFile().GetBuffer()));
265 } 265 }
266 else 266 else
267 alarm->setType( Alarm::Display ); 267 alarm->setType( Alarm::Display );
268 alarm->setRepeatCount( aItem->GetReplyTime() ); 268 alarm->setRepeatCount( aItem->GetReplyTime() );
269 } 269 }
270 // OL :pub 0 - pers 1 - priv 2 - conf 3 270 // OL :pub 0 - pers 1 - priv 2 - conf 3
271 // KO : pub 0 - priv 1 - conf 2 271 // KO : pub 0 - priv 1 - conf 2
272 int sec = aItem->GetSensitivity() ; 272 int sec = aItem->GetSensitivity() ;
273 if ( sec > 1 )// mapping pers -> private 273 if ( sec > 1 )// mapping pers -> private
274 --sec; 274 --sec;
275 event->setSecrecy( sec ); 275 event->setSecrecy( sec );
276 if ( aItem->GetBusyStatus() == 0 ) 276 if ( aItem->GetBusyStatus() == 0 )
277 event->setTransparency( Event::Transparent);// OL free 277 event->setTransparency( Event::Transparent);// OL free
278 else 278 else
279 event->setTransparency( Event::Opaque);//OL all other 279 event->setTransparency( Event::Opaque);//OL all other
280 280
281 if ( aItem->GetIsRecurring() && computeRecurrence ) { //recur 281 if ( aItem->GetIsRecurring() && computeRecurrence ) { //recur
282 282
283 RecurrencePattern recpat = aItem->GetRecurrencePattern(); 283 RecurrencePattern recpat = aItem->GetRecurrencePattern();
284 284
285 QDate startDate = mDdate2Qdtr(recpat.GetPatternStartDate()).date(); 285 QDate startDate = mDdate2Qdtr(recpat.GetPatternStartDate()).date();
286 int freq = recpat.GetInterval(); 286 int freq = recpat.GetInterval();
287 287
288 bool hasEndDate = !recpat.GetNoEndDate(); 288 bool hasEndDate = !recpat.GetNoEndDate();