diff options
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 27 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.hrc | 32 |
2 files changed, 26 insertions, 33 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index e0b5d259302d..1e34b2eee840 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -205,33 +205,26 @@ namespace svt { String sHelpURL( _rURL ); if ( COMPARE_EQUAL == sHelpURL.CompareIgnoreCaseToAscii( "HID:", sizeof( "HID:" ) - 1 ) ) - { - String sID = sHelpURL.Copy( sizeof( "HID:" ) - 1 ); - sal_Int32 nHelpId = sID.ToInt32(); + sHelpURL = sHelpURL.Copy( sizeof( "HID:" ) - 1 ); - if ( _bFileView ) - // the file view "overloaded" the SetHelpId - static_cast< SvtFileView* >( _pControl )->SetHelpId( nHelpId ); - else - _pControl->SetHelpId( nHelpId ); - } + // URLs should always be UTF8 encoded and escaped + rtl::OString sID( rtl::OUStringToOString( sHelpURL, RTL_TEXTENCODING_UTF8 ) ); + if ( _bFileView ) + // the file view "overloaded" the SetHelpId + static_cast< SvtFileView* >( _pControl )->SetHelpId( sID ); else - { - DBG_ERRORFILE( "OControlAccess::setHelpURL: unsupported help URL type!" ); - } + _pControl->SetHelpId( sID ); } //--------------------------------------------------------------------- ::rtl::OUString OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView ) { - sal_Int32 nHelpId = _pControl->GetHelpId(); + rtl::OString aHelpId = _pControl->GetHelpId(); if ( _bFileView ) // the file view "overloaded" the SetHelpId - nHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( ); - - ::rtl::OUString sHelpURL( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) ); - sHelpURL += ::rtl::OUString::valueOf( (sal_Int32)nHelpId ); + aHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( ); + rtl::OUString sHelpURL( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ) ); return sHelpURL; } diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc index 15f5121b0965..60374f226edf 100644 --- a/fpicker/source/office/iodlg.hrc +++ b/fpicker/source/office/iodlg.hrc @@ -86,22 +86,22 @@ #define SID_SFX_START 5000 #define SID_OPENURL (SID_SFX_START + 596) -#define HID_FILEDLG_STANDARD (HID_SFX_START + 27) -#define HID_FILEDLG_MANAGER (HID_SFX_START + 28) -#define HID_FILEDLG_URL (HID_SFX_START + 29) -#define HID_FILEDLG_USE_PASSWD (HID_SFX_START + 31) -#define HID_FILEDLG_READ_ONLY (HID_SFX_START + 32) - -#define HID_FILEDLG_AUTOCOMPLETEBOX (HID_SFX_START + 218) -#define HID_FILEDLG_SAVE_BTN (HID_SFX_START + 219) -#define HID_FILEDLG_SAVE_FILENAME (HID_SFX_START + 220) -#define HID_FILEDLG_SAVE_FILETYPE (HID_SFX_START + 221) -#define HID_FILEDLG_INSERT_BTN (HID_SFX_START + 222) -#define HID_FILEDLG_PATH_BTN (HID_SFX_START + 223) -#define HID_FILEDLG_PATH_FILENAME (HID_SFX_START + 224) -#define HID_FILEDLG_FOLDER_BTN (HID_SFX_START + 225) -#define HID_FILEDLG_FOLDER_FILENAME (HID_SFX_START + 226) -#define HID_FILEDLG_SRCHFOLDER_BTN (HID_SFX_START + 227) +#define HID_FILEDLG_STANDARD "FPICKER_HID_FILEDLG_STANDARD" +#define HID_FILEDLG_MANAGER "FPICKER_HID_FILEDLG_MANAGER" +#define HID_FILEDLG_URL "FPICKER_HID_FILEDLG_URL" +#define HID_FILEDLG_USE_PASSWD "FPICKER_HID_FILEDLG_USE_PASSWD" +#define HID_FILEDLG_READ_ONLY "FPICKER_HID_FILEDLG_READ_ONLY" + +#define HID_FILEDLG_AUTOCOMPLETEBOX "FPICKER_HID_FILEDLG_AUTOCOMPLETEBOX" +#define HID_FILEDLG_SAVE_BTN "FPICKER_HID_FILEDLG_SAVE_BTN" +#define HID_FILEDLG_SAVE_FILENAME "FPICKER_HID_FILEDLG_SAVE_FILENAME" +#define HID_FILEDLG_SAVE_FILETYPE "FPICKER_HID_FILEDLG_SAVE_FILETYPE" +#define HID_FILEDLG_INSERT_BTN "FPICKER_HID_FILEDLG_INSERT_BTN" +#define HID_FILEDLG_PATH_BTN "FPICKER_HID_FILEDLG_PATH_BTN" +#define HID_FILEDLG_PATH_FILENAME "FPICKER_HID_FILEDLG_PATH_FILENAME" +#define HID_FILEDLG_FOLDER_BTN "FPICKER_HID_FILEDLG_FOLDER_BTN" +#define HID_FILEDLG_FOLDER_FILENAME "FPICKER_HID_FILEDLG_FOLDER_FILENAME" +#define HID_FILEDLG_SRCHFOLDER_BTN "FPICKER_HID_FILEDLG_SRCHFOLDER_BTN" #endif |