sfx2/source/view/viewsh.cxx | 91 +++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 47 deletions(-)
New commits: commit eeaff77389b43e2e3b30be598d54cfc44dc00e48 Author: Thomas Arnhold <tho...@arnhold.org> Date: Mon Apr 8 11:21:31 2013 +0200 viewsh: correct indentation after 31fedbe9f782976b6aa4615b6fd171ed52137c94 Change-Id: I2ac895e0808a0d8d04bbb82d72cf1295297b07b9 diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index d0d299c..9c1d0f2 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -517,60 +517,57 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) break; - { - SfxMailModel aModel; - OUString aDocType; + SfxMailModel aModel; + OUString aDocType; - SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, sal_False ); - if ( pMailSubject ) - aModel.SetSubject( pMailSubject->GetValue() ); + SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, sal_False ); + if ( pMailSubject ) + aModel.SetSubject( pMailSubject->GetValue() ); - SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, sal_False ); - if ( pMailRecipient ) - { - String aRecipient( pMailRecipient->GetValue() ); - String aMailToStr(OUString("mailto:")); + SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, sal_False ); + if ( pMailRecipient ) + { + String aRecipient( pMailRecipient->GetValue() ); + String aMailToStr(OUString("mailto:")); - if ( aRecipient.Search( aMailToStr ) == 0 ) - aRecipient = aRecipient.Erase( 0, aMailToStr.Len() ); - aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO ); - } - SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, sal_False ); - if ( pMailDocType ) - aDocType = pMailDocType->GetValue(); - - uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); - SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR; - - if ( nId == SID_MAIL_SENDDOC ) - eResult = aModel.SaveAndSend( xFrame, OUString() ); - else if ( nId == SID_MAIL_SENDDOCASPDF ) - eResult = aModel.SaveAndSend( xFrame, OUString( "pdf_Portable_Document_Format" )); - else if ( nId == SID_MAIL_SENDDOCASMS ) - { - aDocType = impl_searchFormatTypeForApp(xFrame, E_MS_DOC); - if (!aDocType.isEmpty()) - eResult = aModel.SaveAndSend( xFrame, aDocType ); - } - else if ( nId == SID_MAIL_SENDDOCASOOO ) - { - aDocType = impl_searchFormatTypeForApp(xFrame, E_OOO_DOC); - if (!aDocType.isEmpty()) - eResult = aModel.SaveAndSend( xFrame, aDocType ); - } + if ( aRecipient.Search( aMailToStr ) == 0 ) + aRecipient = aRecipient.Erase( 0, aMailToStr.Len() ); + aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO ); + } + SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, sal_False ); + if ( pMailDocType ) + aDocType = pMailDocType->GetValue(); - if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) - { - InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL )); - aBox.Execute(); - rReq.Ignore(); - } - else - rReq.Done(); + uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); + SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_ERROR; + + if ( nId == SID_MAIL_SENDDOC ) + eResult = aModel.SaveAndSend( xFrame, OUString() ); + else if ( nId == SID_MAIL_SENDDOCASPDF ) + eResult = aModel.SaveAndSend( xFrame, OUString( "pdf_Portable_Document_Format" )); + else if ( nId == SID_MAIL_SENDDOCASMS ) + { + aDocType = impl_searchFormatTypeForApp(xFrame, E_MS_DOC); + if (!aDocType.isEmpty()) + eResult = aModel.SaveAndSend( xFrame, aDocType ); + } + else if ( nId == SID_MAIL_SENDDOCASOOO ) + { + aDocType = impl_searchFormatTypeForApp(xFrame, E_OOO_DOC); + if (!aDocType.isEmpty()) + eResult = aModel.SaveAndSend( xFrame, aDocType ); } - break; + if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) + { + InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL )); + aBox.Execute(); + rReq.Ignore(); + } + else + rReq.Done(); } + break; case SID_BLUETOOTH_SENDDOC: { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits