diff options
author | Mathias Bauer <mba@openoffice.org> | 2002-04-08 15:57:17 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2002-04-08 15:57:17 +0000 |
commit | 94bb4bf8a4b2fc5f1a782de6edbc824faa81e6f0 (patch) | |
tree | da8092191720ab40be4fc0798d9f5fbf06722395 /svx/source/items/hlnkitem.cxx | |
parent | 0e7f221060c1e8f8e49a466302c0f7cf24baa382 (diff) |
#98405#: prepare items and slots for new recording
Diffstat (limited to 'svx/source/items/hlnkitem.cxx')
-rw-r--r-- | svx/source/items/hlnkitem.cxx | 59 |
1 files changed, 57 insertions, 2 deletions
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx index f2d8ab4103af..d7461f95881a 100644 --- a/svx/source/items/hlnkitem.cxx +++ b/svx/source/items/hlnkitem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: hlnkitem.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $ + * last change: $Author: mba $ $Date: 2002-04-08 16:53:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -395,4 +395,59 @@ void SvxHyperlinkItem::SetMacroTable( const SvxMacroTableDtor& rTbl ) pMacroTable = new SvxMacroTableDtor ( rTbl ); } +BOOL SvxHyperlinkItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +{ + switch(nMemberId) + { + case MID_HLINK_NAME : + rVal <<= ::rtl::OUString(sName.GetBuffer()); + break; + case MID_HLINK_URL: + rVal <<= ::rtl::OUString(sURL.GetBuffer()); + break; + case MID_HLINK_TARGET: + rVal <<= ::rtl::OUString(sTarget.GetBuffer()); + break; + case MID_HLINK_TYPE: + rVal <<= (sal_Int32) eType; + break; + default: + return FALSE; + } + + return TRUE; +} + +BOOL SvxHyperlinkItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +{ + ::rtl::OUString aStr; + sal_Int32 nVal; + switch(nMemberId) + { + case MID_HLINK_NAME : + if(!(rVal >>= aStr)) + return sal_False; + sName = aStr.getStr(); + break; + case MID_HLINK_URL: + if(!(rVal >>= aStr)) + return sal_False; + sURL = aStr.getStr(); + break; + case MID_HLINK_TARGET: + if(!(rVal >>= aStr)) + return sal_False; + sTarget = aStr.getStr(); + break; + case MID_HLINK_TYPE: + if(!(rVal >>= nVal)) + return sal_False; + eType = (SvxLinkInsertMode) (sal_uInt16) nVal; + break; + default: + return FALSE; + } + + return TRUE; +} |