diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-07-20 14:50:49 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-07-20 14:50:49 +0200 |
commit | 659fb7a4ae2d2ac140f328959b98944c43a094aa (patch) | |
tree | fbbc7d70c9a0f028f5132d13580a8f5afbe91cfc | |
parent | f60b366882b4281061199daf2df24055f94f1ba0 (diff) |
CWS changehid: #i111784#: consolidate usage of HID schema; remove unused SetDialogHelpId methods
-rw-r--r-- | sw/source/ui/app/docsh2.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uno/unomod.cxx | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 685de346be52..ebdbf91a6281 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1238,8 +1238,6 @@ void SwDocShell::Execute(SfxRequest& rReq) const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds; aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds ); -// aDlgHelper.SetDialogHelpId( bCreateHtml ? HID_SEND_HTML_DIALOG : HID_SEND_MASTER_DIALOG ); - uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); const SfxFilter* pFlt; diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 272e7033ceeb..45df3b9646d8 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -799,13 +799,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c OUString sHelpURL; if ( ! ( rValue >>= sHelpURL ) ) throw IllegalArgumentException(); - SwEditWin &rEditWin = pView->GetEditWin(); - OUString sPrefix = sHelpURL.copy ( 0, 4 ); - // Make sure we have a valid string...should be in the format HID:12345 - if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) ) + + INetURLObject aHID( sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + pView->GetEditWin().SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) ); + else throw IllegalArgumentException (); - OUString aID = sHelpURL.copy ( 4 ); - rEditWin.SetHelpId ( rtl::OUStringToOString( aID, RTL_TEXTENCODING_UTF8 ) ); } else throw UnknownPropertyException(); @@ -984,7 +983,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { bBool = sal_False; OUStringBuffer sHelpURL; - sHelpURL.appendAscii ( "HID:" ); + sHelpURL.appendAscii ( INET_HID_SCHEME ); SwEditWin &rEditWin = pView->GetEditWin(); sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); rValue <<= sHelpURL.makeStringAndClear(); |