summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno/unomod.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-07-20 14:50:49 +0200
committerMathias Bauer <mba@openoffice.org>2010-07-20 14:50:49 +0200
commit659fb7a4ae2d2ac140f328959b98944c43a094aa (patch)
treefbbc7d70c9a0f028f5132d13580a8f5afbe91cfc /sw/source/ui/uno/unomod.cxx
parentf60b366882b4281061199daf2df24055f94f1ba0 (diff)
CWS changehid: #i111784#: consolidate usage of HID schema; remove unused SetDialogHelpId methods
Diffstat (limited to 'sw/source/ui/uno/unomod.cxx')
-rw-r--r--sw/source/ui/uno/unomod.cxx13
1 files changed, 6 insertions, 7 deletions
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();