summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx1
-rw-r--r--fpicker/source/office/OfficeControlAccess.cxx22
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx1
-rw-r--r--sfx2/inc/sfx2/filedlghelper.hxx1
-rw-r--r--sfx2/inc/sfx2/opengrf.hxx3
-rw-r--r--sfx2/source/appl/opengrf.cxx5
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx18
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx1
-rw-r--r--sfx2/source/dialog/taskpane.cxx11
-rw-r--r--svx/inc/pch/precompiled_svx.hxx1
-rw-r--r--svx/inc/pfiledlg.hxx2
-rw-r--r--svx/source/dialog/docrecovery.cxx1
-rw-r--r--svx/source/dialog/pfiledlg.cxx5
-rw-r--r--svx/source/fmcomp/fmgridif.cxx10
14 files changed, 27 insertions, 55 deletions
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index d82ecc6cb6b5..9d432f73a731 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -739,7 +739,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"
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index 7d33030ed2a9..50e99f2b590b 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -33,9 +33,8 @@
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ControlActions.hpp>
#include <vcl/lstbox.hxx>
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HPP_
#include <com/sun/star/uno/Sequence.hxx>
-#endif
+#include <tools/urlobj.hxx>
#include <algorithm>
#include <functional>
@@ -201,14 +200,15 @@ namespace svt
}
//---------------------------------------------------------------------
- void OControlAccess::setHelpURL( Window* _pControl, const ::rtl::OUString& _rURL, sal_Bool _bFileView )
+ void OControlAccess::setHelpURL( Window* _pControl, const ::rtl::OUString& sHelpURL, sal_Bool _bFileView )
{
- String sHelpURL( _rURL );
- if ( COMPARE_EQUAL == sHelpURL.CompareIgnoreCaseToAscii( "HID:", sizeof( "HID:" ) - 1 ) )
- sHelpURL = sHelpURL.Copy( sizeof( "HID:" ) - 1 );
+ rtl::OUString sHelpID( sHelpURL );
+ INetURLObject aHID( sHelpURL );
+ if ( aHID.GetProtocol() == INET_PROT_HID )
+ sHelpID = aHID.GetURLPath();
// URLs should always be UTF8 encoded and escaped
- rtl::OString sID( rtl::OUStringToOString( sHelpURL, RTL_TEXTENCODING_UTF8 ) );
+ rtl::OString sID( rtl::OUStringToOString( sHelpID, RTL_TEXTENCODING_UTF8 ) );
if ( _bFileView )
// the file view "overloaded" the SetHelpId
static_cast< SvtFileView* >( _pControl )->SetHelpId( sID );
@@ -224,8 +224,12 @@ namespace svt
// the file view "overloaded" the SetHelpId
aHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( );
- ::rtl::OUString sHelpURL( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) );
- sHelpURL += rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 );
+ ::rtl::OUString sHelpURL;
+ ::rtl::OUString aTmp( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ) );
+ INetURLObject aHID( aTmp );
+ if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
+ sHelpURL = rtl::OUString::createFromAscii( INET_HID_SCHEME );
+ sHelpURL += aTmp;
return sHelpURL;
}
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index b43dba7d6673..1d4003fa44e6 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -543,7 +543,6 @@
#include "svl/ownlist.hxx"
#include "svtools/parhtml.hxx"
#include "unotools/pathoptions.hxx"
-#include "svl/pickerhelper.hxx"
#include "svl/poolitem.hxx"
#include "svtools/printoptions.hxx"
#include "unotools/printwarningoptions.hxx"
diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
index e56aea052d18..619358f077ac 100644
--- a/sfx2/inc/sfx2/filedlghelper.hxx
+++ b/sfx2/inc/sfx2/filedlghelper.hxx
@@ -282,7 +282,6 @@ public:
a corresponding element herein.
*/
void SetControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId );
- void SetDialogHelpId( const rtl::OString& _nHelpId );
void CreateMatcher( const String& rName );
/** sets the context of the dialog and trigger necessary actions e.g. loading config, setting help id
diff --git a/sfx2/inc/sfx2/opengrf.hxx b/sfx2/inc/sfx2/opengrf.hxx
index 1c307111cdd0..df8ae09f90a3 100644
--- a/sfx2/inc/sfx2/opengrf.hxx
+++ b/sfx2/inc/sfx2/opengrf.hxx
@@ -54,10 +54,7 @@ public:
String GetCurrentFilter() const;
void SetCurrentFilter(const String&);
- /// Set dialog help id at FileDlgHelper
void SetControlHelpIds( const INT16* _pControlId, const char** _pHelpId );
- /// Set control help ids at FileDlgHelper
- void SetDialogHelpId( const rtl::OString& _rHelpId );
private:
// disable copy and assignment
SFX2_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&);
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index d83e93157902..fd2043a9a431 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -289,7 +289,4 @@ void SvxOpenGraphicDialog::SetControlHelpIds( const INT16* _pControlId, const ch
mpImpl->aFileDlg.SetControlHelpIds( _pControlId, _pHelpId );
}
-void SvxOpenGraphicDialog::SetDialogHelpId( const rtl::OString& _nHelpId )
-{
- mpImpl->aFileDlg.SetDialogHelpId( _nHelpId );
-}
+
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 552dc8f11fc9..874a430b6bda 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1213,13 +1213,14 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
// forward these ids to the file picker
try
{
- const ::rtl::OUString sHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) );
+ const ::rtl::OUString sHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( INET_HID_SCHEME ) );
// the ids for the single controls
uno::Reference< XFilePickerControlAccess > xControlAccess( mxFileDlg, UNO_QUERY );
if ( xControlAccess.is() )
{
while ( *_pControlId )
{
+ DBG_ASSERT( INetURLObject( rtl::OStringToOUString( *_pHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
::rtl::OUString sId( sHelpIdPrefix );
sId += ::rtl::OUString( *_pHelpId, strlen( *_pHelpId ), RTL_TEXTENCODING_UTF8 );
xControlAccess->setValue( *_pControlId, ControlActions::SET_HELP_URL, makeAny( sId ) );
@@ -1235,12 +1236,6 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
}
// ------------------------------------------------------------------------
-void FileDialogHelper_Impl::setDialogHelpId( const rtl::OString& _nHelpId )
-{
- svt::SetDialogHelpId( mxFileDlg, _nHelpId );
-}
-
-// ------------------------------------------------------------------------
IMPL_LINK( FileDialogHelper_Impl, InitControls, void*, NOTINTERESTEDIN )
{
(void)NOTINTERESTEDIN;
@@ -2344,9 +2339,6 @@ void FileDialogHelper_Impl::SetContext( FileDialogHelper::Context _eNewContext )
const OUString* pConfigId = GetLastFilterConfigId( _eNewContext );
if( pConfigId )
LoadLastUsedFilter( *pConfigId );
-
-// if( nNewHelpId )
-// this->setDialogHelpId( nNewHelpId );
}
// ------------------------------------------------------------------------
@@ -2497,12 +2489,6 @@ void FileDialogHelper::SetControlHelpIds( const sal_Int16* _pControlId, const ch
mpImp->setControlHelpIds( _pControlId, _pHelpId );
}
-// ------------------------------------------------------------------------
-void FileDialogHelper::SetDialogHelpId( const rtl::OString& _nHelpId )
-{
- mpImp->setDialogHelpId( _nHelpId );
-}
-
void FileDialogHelper::SetContext( Context _eNewContext )
{
mpImp->SetContext( _eNewContext );
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 30b516a84ac5..91190b575e1c 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -143,7 +143,6 @@ namespace sfx2
void correctVirtualDialogType();
void setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId );
- void setDialogHelpId( const rtl::OString& );
sal_Bool CheckFilterOptionsCapability( const SfxFilter* _pFilter );
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index d684e3cf124a..3ef6a96bdaf4 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -60,7 +60,7 @@
#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-
+#include <tools/urlobj.hxx>
#include <boost/noncopyable.hpp>
//......................................................................................................................
@@ -410,10 +410,11 @@ namespace sfx2
static rtl::OString lcl_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 );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 95ed1449c846..b53064312a38 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -805,7 +805,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"
diff --git a/svx/inc/pfiledlg.hxx b/svx/inc/pfiledlg.hxx
index 694881920f8d..93d99c4774a2 100644
--- a/svx/inc/pfiledlg.hxx
+++ b/svx/inc/pfiledlg.hxx
@@ -54,8 +54,6 @@ public:
static bool IsAvailable (USHORT nKind);
- // setting HelpId and/or context of FileDialogHelper
- void SetDialogHelpId( const rtl::OString& nHelpId );
void SetContext( sfx2::FileDialogHelper::Context eNewContext );
};
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index b4ee4dd2956f..1b77364b6c7e 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -1585,7 +1585,6 @@ void BrokenRecoveryDialog::impl_askForSavePath()
{
css::uno::Reference< css::ui::dialogs::XFolderPicker > xFolderPicker(
m_pCore->getSMGR()->createInstance(SERVICENAME_FOLDERPICKER), css::uno::UNO_QUERY_THROW);
-// svt::SetDialogHelpId( xFolderPicker, HID_OPTIONS_PATHS_SELECTFOLDER );
INetURLObject aURL(m_sSavePath, INET_PROT_FILE);
xFolderPicker->setDisplayDirectory(aURL.GetMainURL(INetURLObject::NO_DECODE));
diff --git a/svx/source/dialog/pfiledlg.cxx b/svx/source/dialog/pfiledlg.cxx
index f53ba885f2a0..af8d283185a6 100644
--- a/svx/source/dialog/pfiledlg.cxx
+++ b/svx/source/dialog/pfiledlg.cxx
@@ -274,11 +274,6 @@ bool SvxPluginFileDlg::IsAvailable (sal_uInt16 nKind)
return bFound;
}
-void SvxPluginFileDlg::SetDialogHelpId( const rtl::OString& _nHelpId )
-{
- maFileDlg.SetDialogHelpId( _nHelpId );
-}
-
void SvxPluginFileDlg::SetContext( sfx2::FileDialogHelper::Context _eNewContext )
{
maFileDlg.SetContext( _eNewContext );
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 9d596d529774..5a033cd77d44 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -38,6 +38,7 @@
#include "sdbdatacolumn.hxx"
#include "svx/fmgridcl.hxx"
#include "svx/svxids.hrc"
+#include <tools/urlobj.hxx>
/** === begin UNO includes === **/
#include <com/sun/star/awt/PosSize.hpp>
@@ -1973,11 +1974,10 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
}
else if ( 0 == PropertyName.compareTo( FM_PROP_HELPURL ) )
{
- String sHelpURL(::comphelper::getString(Value));
- String sPattern;
- sPattern.AssignAscii("HID:");
- if (sHelpURL.Equals(sPattern, 0, sPattern.Len()))
- pGrid->SetHelpId(rtl::OUStringToOString(sHelpURL, RTL_TEXTENCODING_UTF8));
+ INetURLObject aHID( ::comphelper::getString(Value) );
+ DBG_ASSERT( aHID.GetProtocol() == INET_PROT_HID, "Wrong HelpURL!" );
+ if ( aHID.GetProtocol() == INET_PROT_HID )
+ pGrid->SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) );
}
else if ( 0 == PropertyName.compareTo( FM_PROP_DISPLAYSYNCHRON ) )
{