Kaydet (Commit) 6964157b authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Provide a version that takes rtl::OUString.

üst d36dd33f
......@@ -114,12 +114,16 @@ public:
sal_Bool InsertDDELink( SvBaseLink* );
// Connect the links to a pseudo-object and add to the list
sal_Bool InsertFileLink( sfx2::SvBaseLink&,
bool InsertFileLink( sfx2::SvBaseLink&,
sal_uInt16 nFileType,
const String& rTxt,
const String& rFileNm,
const String* pFilterNm = 0,
const String* pRange = 0 );
bool InsertFileLink(
sfx2::SvBaseLink& rLink, sal_uInt16 nFileType, const rtl::OUString& rFileNm,
const rtl::OUString* pFilterNm = NULL, const rtl::OUString* pRange = NULL);
void ReconnectDdeLink(SfxObjectShell& rServer);
/**
......
......@@ -467,14 +467,14 @@ void LinkManager::LinkServerShell(const OUString& rPath, SfxObjectShell& rServer
}
}
sal_Bool LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
bool LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
sal_uInt16 nFileType,
const String& rFileNm,
const String* pFilterNm,
const String* pRange )
{
if( !( OBJECT_CLIENT_SO & rLink.GetObjType() ))
return sal_False;
return false;
String sCmd( rFileNm );
sCmd += ::sfx2::cTokenSeperator;
......@@ -486,6 +486,30 @@ sal_Bool LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
return InsertLink( &rLink, nFileType, sfx2::LINKUPDATE_ONCALL, &sCmd );
}
bool LinkManager::InsertFileLink(
sfx2::SvBaseLink& rLink, sal_uInt16 nFileType, const rtl::OUString& rFileNm,
const rtl::OUString* pFilterNm, const rtl::OUString* pRange)
{
if (!(OBJECT_CLIENT_SO & rLink.GetObjType()))
return false;
rtl::OUStringBuffer aBuf;
aBuf.append(rFileNm);
aBuf.append(sfx2::cTokenSeperator);
if (pRange)
aBuf.append(*pRange);
if (pFilterNm)
{
aBuf.append(sfx2::cTokenSeperator);
aBuf.append(*pFilterNm);
}
String aCmd = aBuf.makeStringAndClear();
return InsertLink(&rLink, nFileType, sfx2::LINKUPDATE_ONCALL, &aCmd);
}
// A transfer is aborted, so cancel all download media
// (for now this is only of interest for the file links!)
void LinkManager::CancelTransfers()
......
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