Kaydet (Commit) 2fb8d40b authored tarafından Caolán McNamara's avatar Caolán McNamara

fix string

Change-Id: I3116dbf41b5672bb90c255b22403c8ce0ff57265
üst d63a69a0
...@@ -903,7 +903,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) ...@@ -903,7 +903,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox)
sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttach, '.'); sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttach, '.');
if( 2 > nTokenCount) if( 2 > nTokenCount)
{ {
sAttach += '.'; sAttach += OUString('.');
++nTokenCount; ++nTokenCount;
} }
sAttach = comphelper::string::setToken(sAttach, nTokenCount - 1, '.', lcl_GetExtensionForDocType( nDocType )); sAttach = comphelper::string::setToken(sAttach, nTokenCount - 1, '.', lcl_GetExtensionForDocType( nDocType ));
...@@ -1058,7 +1058,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) ...@@ -1058,7 +1058,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttach, '.'); sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttach, '.');
if (2 > nTokenCount) if (2 > nTokenCount)
{ {
sAttach += '.'; sAttach += OUString('.');
++nTokenCount; ++nTokenCount;
} }
sAttach = comphelper::string::setToken(sAttach, nTokenCount - 1, '.', lcl_GetExtensionForDocType( sAttach = comphelper::string::setToken(sAttach, nTokenCount - 1, '.', lcl_GetExtensionForDocType(
...@@ -1198,10 +1198,10 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) ...@@ -1198,10 +1198,10 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttachment, '.'); sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttachment, '.');
if (2 > nTokenCount) if (2 > nTokenCount)
{ {
sAttachment += '.'; sAttachment += OUString('.');
sAttachment = comphelper::string::setToken(sAttachment, nTokenCount, '.', sExtension); sAttachment = comphelper::string::setToken(sAttachment, nTokenCount, '.', sExtension);
} }
else if(sAttachment.GetToken( nTokenCount - 1, '.') != sExtension) else if (sAttachment.getToken( nTokenCount - 1, '.') != sExtension)
sAttachment += sExtension; sAttachment += sExtension;
aDesc.sAttachmentName = sAttachment; aDesc.sAttachmentName = sAttachment;
aDesc.sMimeType = sMimeType; aDesc.sMimeType = sMimeType;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "view.hxx" #include "view.hxx"
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <unomid.h> #include <unomid.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment