summaryrefslogtreecommitdiff
path: root/extensions/source/bibliography/general.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/bibliography/general.cxx')
-rw-r--r--extensions/source/bibliography/general.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 33cff121021b..63c813fe2a99 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -57,6 +57,7 @@
#include <algorithm>
#include <functional>
#include <vector>
+#include <tools/urlobj.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -463,12 +464,12 @@ void BibGeneralPage::CommitActiveControl()
}
//-----------------------------------------------------------------------------
void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::Point& rPos, const ::Size& rSize,
- String& rErrorString, String aColumnUIName, sal_uInt16 nHelpId, sal_uInt16 nIndexInFTArray )
+ String& rErrorString, String aColumnUIName, const rtl::OString& sHelpId, sal_uInt16 nIndexInFTArray )
{
// adds also the XControl and creates a map entry in nFT2CtrlMap[] for mapping between control and FT
INT16 nIndex = -1;
- uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, nHelpId, nIndex );
+ uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, sHelpId, nIndex );
if( xTmp.is() )
{
DBG_ASSERT( nIndexInFTArray < FIELD_COUNT, "*BibGeneralPage::AddControlWithError(): wrong array index!" );
@@ -487,7 +488,7 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::P
//-----------------------------------------------------------------------------
uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
const String& rName,
- ::Point rPos, ::Size rSize, sal_uInt16 nHelpId, INT16& rIndex )
+ ::Point rPos, ::Size rSize, const rtl::OString& sHelpId, INT16& rIndex )
{
uno::Reference< awt::XControlModel > xCtrModel;
try
@@ -509,11 +510,10 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
rtl::OUString uProp(C2U("HelpURL"));
if(xPropInfo->hasPropertyByName(uProp))
{
- String sId(C2S("HID:"));
- sId += String::CreateFromInt32(nHelpId);
- rtl::OUString uId(sId) ;
- uno::Any aVal; aVal <<= uId;
- xPropSet->setPropertyValue(uProp, aVal);
+ ::rtl::OUString sId = ::rtl::OUString::createFromAscii( INET_HID_SCHEME );
+ DBG_ASSERT( INetURLObject( rtl::OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
+ sId += ::rtl::OUString( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 );
+ xPropSet->setPropertyValue( uProp, makeAny( sId ) );
}
if(bTypeListBox)