|
|
@ -1238,14 +1238,14 @@ KMCommand::Result KMForwardInlineCommand::execute()
|
|
|
|
if (msgList.count() >= 2) { // Multiple forward
|
|
|
|
if (msgList.count() >= 2) { // Multiple forward
|
|
|
|
|
|
|
|
|
|
|
|
uint id = 0;
|
|
|
|
uint id = 0;
|
|
|
|
TQPtrList<KMMessage> lintdelist;
|
|
|
|
TQPtrList<KMMessage> linklist;
|
|
|
|
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
|
|
|
|
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
|
|
|
|
// set the identity
|
|
|
|
// set the identity
|
|
|
|
if (id == 0)
|
|
|
|
if (id == 0)
|
|
|
|
id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt();
|
|
|
|
id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt();
|
|
|
|
|
|
|
|
|
|
|
|
// msgText += msg->createForwardBody();
|
|
|
|
// msgText += msg->createForwardBody();
|
|
|
|
lintdelist.append( msg );
|
|
|
|
linklist.append( msg );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( id == 0 )
|
|
|
|
if ( id == 0 )
|
|
|
|
id = mIdentity; // use folder identity if no message had an id set
|
|
|
|
id = mIdentity; // use folder identity if no message had an id set
|
|
|
@ -1255,7 +1255,7 @@ KMCommand::Result KMForwardInlineCommand::execute()
|
|
|
|
fwdMsg->setCharset( "utf-8" );
|
|
|
|
fwdMsg->setCharset( "utf-8" );
|
|
|
|
// fwdMsg->setBody( msgText );
|
|
|
|
// fwdMsg->setBody( msgText );
|
|
|
|
|
|
|
|
|
|
|
|
for ( KMMessage *msg = lintdelist.first(); msg; msg = lintdelist.next() ) {
|
|
|
|
for ( KMMessage *msg = linklist.first(); msg; msg = linklist.next() ) {
|
|
|
|
TemplateParser parser( fwdMsg, TemplateParser::Forward );
|
|
|
|
TemplateParser parser( fwdMsg, TemplateParser::Forward );
|
|
|
|
parser.setSelection( msg->body() ); // FIXME: Why is this needed?
|
|
|
|
parser.setSelection( msg->body() ); // FIXME: Why is this needed?
|
|
|
|
parser.process( msg, 0, true );
|
|
|
|
parser.process( msg, 0, true );
|
|
|
@ -1541,14 +1541,14 @@ KMCommand::Result KMCustomForwardCommand::execute()
|
|
|
|
if (msgList.count() >= 2) { // Multiple forward
|
|
|
|
if (msgList.count() >= 2) { // Multiple forward
|
|
|
|
|
|
|
|
|
|
|
|
uint id = 0;
|
|
|
|
uint id = 0;
|
|
|
|
TQPtrList<KMMessage> lintdelist;
|
|
|
|
TQPtrList<KMMessage> linklist;
|
|
|
|
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
|
|
|
|
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
|
|
|
|
// set the identity
|
|
|
|
// set the identity
|
|
|
|
if (id == 0)
|
|
|
|
if (id == 0)
|
|
|
|
id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt();
|
|
|
|
id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt();
|
|
|
|
|
|
|
|
|
|
|
|
// msgText += msg->createForwardBody();
|
|
|
|
// msgText += msg->createForwardBody();
|
|
|
|
lintdelist.append( msg );
|
|
|
|
linklist.append( msg );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( id == 0 )
|
|
|
|
if ( id == 0 )
|
|
|
|
id = mIdentity; // use folder identity if no message had an id set
|
|
|
|
id = mIdentity; // use folder identity if no message had an id set
|
|
|
@ -1558,7 +1558,7 @@ KMCommand::Result KMCustomForwardCommand::execute()
|
|
|
|
fwdMsg->setCharset( "utf-8" );
|
|
|
|
fwdMsg->setCharset( "utf-8" );
|
|
|
|
// fwdMsg->setBody( msgText );
|
|
|
|
// fwdMsg->setBody( msgText );
|
|
|
|
|
|
|
|
|
|
|
|
for ( KMMessage *msg = lintdelist.first(); msg; msg = lintdelist.next() ) {
|
|
|
|
for ( KMMessage *msg = linklist.first(); msg; msg = linklist.next() ) {
|
|
|
|
TemplateParser parser( fwdMsg, TemplateParser::Forward );
|
|
|
|
TemplateParser parser( fwdMsg, TemplateParser::Forward );
|
|
|
|
parser.setSelection( msg->body() ); // FIXME: Why is this needed?
|
|
|
|
parser.setSelection( msg->body() ); // FIXME: Why is this needed?
|
|
|
|
parser.process( msg, 0, true );
|
|
|
|
parser.process( msg, 0, true );
|
|
|
|