CWS changehid: #i111784#: consolidate usage of HID schema; remove unused SetDialogHelpId methods

This commit is contained in:
Mathias Bauer 2010-07-20 14:50:49 +02:00
parent c737e5bb65
commit 37500bb0ef
10 changed files with 24 additions and 27 deletions

View File

@ -806,7 +806,6 @@
#include "svtools/parhtml.hxx"
#include "svtools/parrtf.hxx"
#include "unotools/pathoptions.hxx"
#include "svl/pickerhelper.hxx"
#include "svl/poolitem.hxx"
#include "unotools/printwarningoptions.hxx"
#include "svl/ptitem.hxx"

View File

@ -1504,7 +1504,6 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTi
m_pFileDlg = new sfx2::FileDialogHelper( nDialogType, 0 );
m_pFileDlg->SetTitle( rTitle );
// m_pFileDlg->SetDialogHelpId( bSave ? HID_CONFIG_SAVE : HID_CONFIG_LOAD );
m_pFileDlg->AddFilter( aFilterAllStr, DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) );
m_pFileDlg->AddFilter( aFilterCfgStr, DEFINE_CONST_UNICODE( "*.cfg" ) );

View File

@ -40,7 +40,6 @@
#include <svx/gallery1.hxx>
#include <svx/galtheme.hxx>
#include "cuigaldlg.hxx"
#include <svl/pickerhelper.hxx>
#include "helpid.hrc"
#include <unotools/syslocale.hxx>
#include <cppuhelper/implbase1.hxx>
@ -1035,7 +1034,6 @@ IMPL_LINK( TPGalleryThemeProperties, ClickSearchHdl, void *, EMPTYARG )
if ( xFolderPicker.is() )
{
// svt::SetDialogHelpId( xFolderPicker, HID_GALLERY_NEWTHEME_FINDFILES );
String aDlgPathName( SvtPathOptions().GetGraphicPath() );
xFolderPicker->setDisplayDirectory(aDlgPathName);
@ -1146,7 +1144,6 @@ IMPL_LINK( TPGalleryThemeProperties, ClickTakeHdl, void*, EMPTYARG )
if( !aLbxFound.GetSelectEntryCount() || !bEntriesFound )
{
SvxOpenGraphicDialog aDlg(String( RTL_CONSTASCII_USTRINGPARAM( "Gallery" ) ) );
// aDlg.SetDialogHelpId( HID_GALLERY_NEWTHEME_ADDFILES );
aDlg.EnableLink(sal_False);
aDlg.AsLink(sal_False);

View File

@ -35,7 +35,6 @@
#include <vcl/msgbox.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/app.hxx>
#include <svl/pickerhelper.hxx>
#include <svl/aeitem.hxx>
#include <svtools/svtabbx.hxx>
#include <svtools/filedlg.hxx>
@ -639,8 +638,6 @@ IMPL_LINK( SvxPathTabPage, PathHdl_Impl, PushButton *, EMPTYARG )
xFolderPicker = ::com::sun::star::uno::Reference< XFolderPicker >(
xFactory->createInstance( aService ), UNO_QUERY );
// svt::SetDialogHelpId( xFolderPicker, HID_OPTIONS_PATHS_SELECTFOLDER );
INetURLObject aURL( sWritable, INET_PROT_FILE );
xFolderPicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::NO_DECODE ) );

View File

@ -2269,7 +2269,6 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton )
Size aSize;
sal_Bool bSucc(sal_False);
SvxOpenGraphicDialog aGrfDlg( CUI_RES(RID_STR_EDIT_GRAPHIC) );
// aGrfDlg.SetDialogHelpId( HID_NUMBERINGOPT_SEL_GRF_FROM_FILE );
if(MN_GALLERY_ENTRY <= nItemId )
{

View File

@ -1436,7 +1436,7 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUS
Reference< XPropertySetInfo > xPropInfo = xPropSet->getPropertySetInfo();
if (xPropInfo->hasPropertyByName(uProp))
{
::rtl::OUString sId = ::rtl::OUString::createFromAscii( "HID:" );
::rtl::OUString sId = ::rtl::OUString::createFromAscii( INET_HID_SCHEME );
sId += ::rtl::OUString::createFromAscii( HID_BIB_DB_GRIDCTRL );
xPropSet->setPropertyValue( uProp, makeAny( sId ) );
}

View File

@ -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;
@ -509,7 +510,8 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
rtl::OUString uProp(C2U("HelpURL"));
if(xPropInfo->hasPropertyByName(uProp))
{
::rtl::OUString sId = ::rtl::OUString::createFromAscii( "HID:" );
::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 ) );
}

View File

@ -39,6 +39,7 @@
#include <com/sun/star/util/MeasureUnit.hpp>
/** === end UNO includes === **/
#include <rtl/ustrbuf.hxx>
#include <tools/urlobj.hxx>
//............................................................................
namespace pcr
@ -53,10 +54,11 @@ namespace pcr
//------------------------------------------------------------------------
rtl::OString HelpIdUrl::getHelpId( const ::rtl::OUString& _rHelpURL )
{
rtl::OString aHelpId( _rHelpURL, _rHelpURL.getLength(), RTL_TEXTENCODING_UTF8 );
if ( 0 == _rHelpURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "HID:" ) ) )
aHelpId = aHelpId.copy( sizeof( "HID:" ) - 1 );
return aHelpId;
INetURLObject aHID( _rHelpURL );
if ( aHID.GetProtocol() == INET_PROT_HID )
return rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 );
else
return rtl::OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 );
}
//------------------------------------------------------------------------
@ -64,7 +66,9 @@ namespace pcr
{
::rtl::OUStringBuffer aBuffer;
::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 );
aBuffer.appendAscii( "HID:" );
INetURLObject aHID( aTmp );
if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
aBuffer.appendAscii( INET_HID_SCHEME );
aBuffer.append( aTmp.getStr() );
return aBuffer.makeStringAndClear();
}

View File

@ -69,6 +69,7 @@
#include <com/sun/star/resource/XResourceBundleLoader.hpp>
#include "updatehdl.hrc"
#include <tools/urlobj.hxx>
#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
@ -158,7 +159,7 @@ void UpdateHandler::setDownloadBtnLabel( bool bAppendDots )
aLabel += UNISTRING( "..." );
setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("Label"), uno::Any( aLabel ) );
setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) );
setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) );
mbDownloadBtnHasDots = bAppendDots;
}
@ -1174,7 +1175,7 @@ void UpdateHandler::createDialog()
xPropSet->setPropertyValue( UNISTRING("PositionY"), uno::Any(sal_Int32( 100 )) );
xPropSet->setPropertyValue( UNISTRING("Width"), uno::Any(sal_Int32( DIALOG_WIDTH )) );
xPropSet->setPropertyValue( UNISTRING("Height"), uno::Any(sal_Int32( DIALOG_HEIGHT )) );
xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DLG ) ) );
xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DLG ) ) );
}
{ // Label (fixed text) <status>
uno::Sequence< beans::NamedValue > aProps(1);
@ -1201,7 +1202,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) );
setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) );
setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) );
setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_STATUS ) ) );
setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_STATUS ) ) );
insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_STATUS,
awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET,
@ -1232,7 +1233,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msPauseBtn ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_PAUSE ) ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_PAUSE ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[PAUSE_BUTTON],
awt::Rectangle( BOX1_BTN_X, BOX1_BTN_Y, BUTTON_WIDTH, BUTTON_HEIGHT ),
@ -1245,7 +1246,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msResumeBtn ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_RESUME ) ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_RESUME ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[RESUME_BUTTON],
awt::Rectangle( BOX1_BTN_X,
@ -1261,7 +1262,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msCancelBtn ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CANCEL ) ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CANCEL ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[CANCEL_BUTTON],
awt::Rectangle( BOX1_BTN_X,
@ -1295,7 +1296,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) );
setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) );
setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) );
setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DESCRIPTION ) ) );
setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DESCRIPTION ) ) );
insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_DESCRIPTION,
awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET,
@ -1325,7 +1326,7 @@ void UpdateHandler::createDialog()
// setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_CANCEL) ) );
// [property] string Label // only if PushButtonType_STANDARD
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msClose ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CLOSE ) ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CLOSE ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[ CLOSE_BUTTON ],
awt::Rectangle( CLOSE_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@ -1338,7 +1339,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msInstall ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_INSTALL ) ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_INSTALL ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[INSTALL_BUTTON],
awt::Rectangle( INSTALL_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@ -1351,7 +1352,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msDownload ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD ) ) );
setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[DOWNLOAD_BUTTON],
awt::Rectangle( DOWNLOAD_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),

View File

@ -41,7 +41,6 @@
#include <com/sun/star/security/SerialNumberAdapter.hpp>
#include <comphelper/sequence.hxx>
#include <sfx2/filedlghelper.hxx>
#include <svl/pickerhelper.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>