summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/hldocntp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs/hldocntp.cxx')
-rw-r--r--cui/source/dialogs/hldocntp.cxx52
1 files changed, 12 insertions, 40 deletions
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 3d7942f4dadc..356416a61753 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -94,7 +94,7 @@ sal_Bool SvxHyperlinkNewDocTp::ImplGetURLObject( const String& rPath, const Stri
}
if ( bIsValidURL )
{
- USHORT nPos = maLbDocTypes.GetSelectEntryPos();
+ sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
aURLObject.SetExtension( ((DocumentTypeData*)maLbDocTypes.GetEntryData( nPos ))->aStrExt );
}
@@ -121,7 +121,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet&
maLbDocTypes ( this, CUI_RES (LB_DOCUMENT_TYPES) )
{
// Set HC bitmaps and disable display of bitmap names.
- maBtCreate.EnableTextDisplay (FALSE);
+ maBtCreate.EnableTextDisplay (sal_False);
InitStdControls();
FreeResource();
@@ -138,12 +138,15 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet&
maBtCreate.SetClickHdl ( LINK ( this, SvxHyperlinkNewDocTp, ClickNewHdl_Impl ) );
+ maBtCreate.SetAccessibleRelationMemberOf( &maGrpNewDoc );
+ maBtCreate.SetAccessibleRelationLabeledBy( &maFtPath );
+
FillDocumentList ();
}
SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp ()
{
- for ( USHORT n=0; n<maLbDocTypes.GetEntryCount(); n++ )
+ for ( sal_uInt16 n=0; n<maLbDocTypes.GetEntryCount(); n++ )
{
DocumentTypeData* pTypeData = (DocumentTypeData*)
maLbDocTypes.GetEntryData ( n );
@@ -169,37 +172,6 @@ void SvxHyperlinkNewDocTp::FillDlgFields ( String& /*aStrURL*/ )
#define INTERNETSHORTCUT_URL_TAG "URL"
#define INTERNETSHORTCUT_ICONID_TAG "IconIndex"
-void SvxHyperlinkNewDocTp::ReadURLFile( const String& rFile, String& rTitle, String& rURL, sal_Int32& rIconId, BOOL* pShowAsFolder )
-{
- // Open file
- Config aCfg( rFile );
- aCfg.SetGroup( INTERNETSHORTCUT_ID_TAG );
-
- // read URL
- rURL = aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_URL_TAG) ), RTL_TEXTENCODING_ASCII_US );
- SvtPathOptions aPathOpt;
- rURL = aPathOpt.SubstituteVariable( rURL );
-
- // read target
- if ( pShowAsFolder )
- {
- String aTemp( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_TARGET_TAG ) ), RTL_TEXTENCODING_ASCII_US ) );
- *pShowAsFolder = aTemp == String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_FOLDER_TAG ) );
- }
-
- // read image-ID
- String aStrIconId( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_ICONID_TAG ) ), RTL_TEXTENCODING_ASCII_US ) );
- rIconId = aStrIconId.ToInt32();
-
- // read title
- String aLangStr = aPathOpt.SubstituteVariable( DEFINE_CONST_UNICODE("$(vlang)") );
- ByteString aLang( aLangStr, RTL_TEXTENCODING_UTF8 );
- ByteString aGroup = INTERNETSHORTCUT_ID_TAG;
- ( ( aGroup += '-' ) += aLang ) += ".W";
- aCfg.SetGroup( aGroup );
- rTitle = String( aCfg.ReadKey( INTERNETSHORTCUT_TITLE_TAG ), RTL_TEXTENCODING_UTF7 );
-}
-
void SvxHyperlinkNewDocTp::FillDocumentList ()
{
EnterWait();
@@ -306,7 +278,7 @@ void SvxHyperlinkNewDocTp::SetInitFocus()
|*
\************************************************************************/
-BOOL SvxHyperlinkNewDocTp::AskApply()
+sal_Bool SvxHyperlinkNewDocTp::AskApply()
{
INetURLObject aINetURLObject;
sal_Bool bRet = ImplGetURLObject( maCbbPath.GetText(), maCbbPath.GetBaseURL(), aINetURLObject );
@@ -375,7 +347,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
if ( aStrNewName != aEmptyStr )
{
// get private-url
- USHORT nPos = maLbDocTypes.GetSelectEntryPos();
+ sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos();
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos=0;
String aStrDocName ( ( ( DocumentTypeData* )
@@ -454,14 +426,14 @@ IMPL_LINK ( SvxHyperlinkNewDocTp, ClickNewHdl_Impl, void *, EMPTYARG )
utl::LocalFileHelper::ConvertSystemPathToURL( aTempStrURL, maCbbPath.GetBaseURL(), aStrURL );
String aStrPath = aStrURL;
- BOOL bZeroPath = ( aStrPath.Len() == 0 );
- BOOL bHandleFileName = bZeroPath; // when path has length of 0, then the rest should always be handled
+ sal_Bool bZeroPath = ( aStrPath.Len() == 0 );
+ sal_Bool bHandleFileName = bZeroPath; // when path has length of 0, then the rest should always be handled
// as file name, otherwise we do not yet know
if( bZeroPath )
aStrPath = SvtPathOptions().GetWorkPath();
else if( !::utl::UCBContentHelper::IsFolder( aStrURL ) )
- bHandleFileName = TRUE;
+ bHandleFileName = sal_True;
xFolderPicker->setDisplayDirectory( aStrPath );
DisableClose( sal_True );
@@ -492,7 +464,7 @@ IMPL_LINK ( SvxHyperlinkNewDocTp, ClickNewHdl_Impl, void *, EMPTYARG )
maLbDocTypes.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
{
// get private-url
- USHORT nPos = maLbDocTypes.GetSelectEntryPos();
+ sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos();
aNewURL.setExtension( ( ( DocumentTypeData* ) maLbDocTypes.GetEntryData( nPos ) )->aStrExt );
}