summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/hlnkitem.hxx22
-rw-r--r--svx/source/items/hlnkitem.cxx10
-rw-r--r--sw/source/ui/shells/drformsh.cxx4
3 files changed, 18 insertions, 18 deletions
diff --git a/include/svx/hlnkitem.hxx b/include/svx/hlnkitem.hxx
index 6913c412c96e..c6e5ce414db8 100644
--- a/include/svx/hlnkitem.hxx
+++ b/include/svx/hlnkitem.hxx
@@ -40,11 +40,11 @@ enum SvxLinkInsertMode
class SVX_DLLPUBLIC SvxHyperlinkItem : public SfxPoolItem
{
OUString sName;
- String sURL;
- String sTarget;
+ OUString sURL;
+ OUString sTarget;
SvxLinkInsertMode eType;
- String sIntName;
+ OUString sIntName;
SvxMacroTableDtor* pMacroTable;
sal_uInt16 nMacroEvents;
@@ -55,8 +55,8 @@ public:
SvxHyperlinkItem( sal_uInt16 _nWhich = SID_HYPERLINK_GETLINK ):
SfxPoolItem(_nWhich), pMacroTable(NULL) { eType = HLINK_DEFAULT; nMacroEvents=0; };
SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem );
- SvxHyperlinkItem( sal_uInt16 nWhich, String& rName, String& rURL,
- String& rTarget, String& rIntName,
+ SvxHyperlinkItem( sal_uInt16 nWhich, const OUString& rName, const OUString& rURL,
+ const OUString& rTarget, const OUString& rIntName,
SvxLinkInsertMode eTyp = HLINK_FIELD,
sal_uInt16 nEvents = 0,
SvxMacroTableDtor *pMacroTbl =NULL );
@@ -72,14 +72,14 @@ public:
const OUString& GetName() const { return sName; }
void SetName(const OUString& rName) { sName = rName; }
- const String& GetURL() const { return sURL; }
- void SetURL(const String& rURL) { sURL = rURL; }
+ const OUString& GetURL() const { return sURL; }
+ void SetURL(const OUString& rURL) { sURL = rURL; }
- const String& GetIntName () const { return sIntName; }
- void SetIntName(const String& rIntName) { sIntName = rIntName; }
+ const OUString& GetIntName () const { return sIntName; }
+ void SetIntName(const OUString& rIntName) { sIntName = rIntName; }
- const String& GetTargetFrame() const { return sTarget; }
- void SetTargetFrame(const String& rTarget) { sTarget = rTarget; }
+ const OUString& GetTargetFrame() const { return sTarget; }
+ void SetTargetFrame(const OUString& rTarget) { sTarget = rTarget; }
SvxLinkInsertMode GetInsertMode() const { return eType; }
void SetInsertMode( SvxLinkInsertMode eNew ) { eType = eNew; }
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index 9014196dd620..5faaef41b5f7 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -207,8 +207,8 @@ SvxHyperlinkItem::SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ):
};
-SvxHyperlinkItem::SvxHyperlinkItem( sal_uInt16 _nWhich, String& rName, String& rURL,
- String& rTarget, String& rIntName, SvxLinkInsertMode eTyp,
+SvxHyperlinkItem::SvxHyperlinkItem( sal_uInt16 _nWhich, const OUString& rName, const OUString& rURL,
+ const OUString& rTarget, const OUString& rIntName, SvxLinkInsertMode eTyp,
sal_uInt16 nEvents, SvxMacroTableDtor *pMacroTbl ):
SfxPoolItem (_nWhich),
sName (rName),
@@ -294,16 +294,16 @@ bool SvxHyperlinkItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMe
switch(nMemberId)
{
case MID_HLINK_NAME :
- rVal <<= OUString(sIntName.GetBuffer());
+ rVal <<= sIntName;
break;
case MID_HLINK_TEXT :
rVal <<= sName;
break;
case MID_HLINK_URL:
- rVal <<= OUString(sURL.GetBuffer());
+ rVal <<= sURL;
break;
case MID_HLINK_TARGET:
- rVal <<= OUString(sTarget.GetBuffer());
+ rVal <<= sTarget;
break;
case MID_HLINK_TYPE:
rVal <<= (sal_Int32) eType;
diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx
index 255aed0a97b5..1025e896b148 100644
--- a/sw/source/ui/shells/drformsh.cxx
+++ b/sw/source/ui/shells/drformsh.cxx
@@ -136,9 +136,9 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
aTmp <<= OUString(URIHelper::SmartRel2Abs(aAbs, rHLinkItem.GetURL()));
xPropSet->setPropertyValue( sTargetURL, aTmp );
- if( rHLinkItem.GetTargetFrame().Len() )
+ if( !rHLinkItem.GetTargetFrame().isEmpty() )
{
- aTmp <<= OUString(rHLinkItem.GetTargetFrame());
+ aTmp <<= rHLinkItem.GetTargetFrame();
xPropSet->setPropertyValue( "TargetFrame", aTmp );
}