summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-20 15:04:53 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-20 16:36:53 -0500
commitd36dd33fd263c5e34d6e8a78428f0b3a505bad36 (patch)
tree4b0539cecf44531f3ab7f342ef9d396529df55ef
parent1b9b886afbbf8a6203abfa072c676b06b5b0d495 (diff)
Provide a version that takes rtl::OUString.
-rw-r--r--sfx2/inc/sfx2/linkmgr.hxx6
-rw-r--r--sfx2/source/appl/linkmgr2.cxx24
2 files changed, 25 insertions, 5 deletions
diff --git a/sfx2/inc/sfx2/linkmgr.hxx b/sfx2/inc/sfx2/linkmgr.hxx
index 698eca8962b2..5aeaa7f08f97 100644
--- a/sfx2/inc/sfx2/linkmgr.hxx
+++ b/sfx2/inc/sfx2/linkmgr.hxx
@@ -132,12 +132,16 @@ public:
void LinkServerShell(const ::rtl::OUString& rPath, SfxObjectShell& rServer, ::sfx2::SvBaseLink& rLink) const;
// Obtain the string for the dialog
- sal_Bool GetDisplayNames( const SvBaseLink *,
+ bool GetDisplayNames( const SvBaseLink *,
String* pType,
String* pFile = 0,
String* pLink = 0,
String* pFilter = 0 ) const;
+ bool GetDisplayNames(
+ const SvBaseLink* pLink, rtl::OUString* pType, rtl::OUString* pFile = NULL,
+ rtl::OUString* pLinkStr = NULL, rtl::OUString* pFilter = NULL) const;
+
SvLinkSourceRef CreateObj( SvBaseLink* );
void UpdateAllLinks( sal_Bool bAskUpdate = sal_True,
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index b7a4970f4f2f..4984e6e21c87 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -231,13 +231,13 @@ sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink )
// Obtain the string for the dialog
-sal_Bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
+bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
String* pType,
String* pFile,
String* pLinkStr,
String* pFilter ) const
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
const String sLNm( pLink->GetLinkSourceName() );
if( sLNm.Len() )
{
@@ -266,7 +266,7 @@ sal_Bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
? RID_SVXSTR_FILELINK
: RID_SVXSTR_GRAFIKLINK ));
}
- bRet = sal_True;
+ bRet = true;
}
break;
case OBJECT_CLIENT_DDE:
@@ -282,7 +282,7 @@ sal_Bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
*pFile = sTopic;
if( pLinkStr )
*pLinkStr = sCmd.Copy( nTmp );
- bRet = sal_True;
+ bRet = true;
}
break;
default:
@@ -293,6 +293,22 @@ sal_Bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
return bRet;
}
+bool LinkManager::GetDisplayNames(
+ const SvBaseLink* pLink, rtl::OUString* pType, rtl::OUString* pFile,
+ rtl::OUString* pLinkStr, rtl::OUString* pFilter) const
+{
+ String aType, aFile, aLinkStr, aFilter;
+ bool bRet = GetDisplayNames(pLink, &aType, &aFile, &aLinkStr, &aFilter);
+ if (pType)
+ *pType = aType;
+ if (pFile)
+ *pFile = aFile;
+ if (pLinkStr)
+ *pLinkStr = aLinkStr;
+ if (pFilter)
+ *pFilter = aFilter;
+ return bRet;
+}
void LinkManager::UpdateAllLinks(
sal_Bool bAskUpdate,