[Libreoffice-commits] .: cui/source

Andras Timar timar at kemper.freedesktop.org
Fri Jun 17 12:49:58 PDT 2011


 cui/source/dialogs/hlinettp.cxx |   29 +++++++----------------------
 cui/source/dialogs/hyperdlg.src |   18 +-----------------
 cui/source/inc/hlinettp.hxx     |    2 --
 3 files changed, 8 insertions(+), 41 deletions(-)

New commits:
commit 739af17084c662747f84820bbd7a30a6c88d46dd
Author: Andras Timar <atimar at suse.com>
Date:   Fri Jun 17 21:47:57 2011 +0200

    small improvement of Insert -> Hyperlink -> Internet dialog

diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 2e2b58d..4926b66 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -34,9 +34,6 @@
 #include "hyperdlg.hrc"
 #include "hlmarkwn_def.hxx"
 
-#define STD_DOC_SUBPATH		"internal"
-#define STD_DOC_NAME		"url_transfer.htm"
-
 sal_Char const sAnonymous[]    = "anonymous";
 sal_Char const sHTTPScheme[]   = INET_HTTP_SCHEME;
 sal_Char const sHTTPSScheme[]  = INET_HTTPS_SCHEME;
@@ -44,7 +41,7 @@ sal_Char const sFTPScheme[]    = INET_FTP_SCHEME;
 
 /*************************************************************************
 |*
-|* Contructor / Destructor
+|* Constructor / Destructor
 |*
 |************************************************************************/
 
@@ -79,19 +76,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent,
     maCbbTarget.Show();
     maCbbTarget.SetHelpId( HID_HYPERDLG_INET_PATH );
 
-    // Find Path to Std-Doc
-    String aStrBasePaths( SvtPathOptions().GetTemplatePath() );
-    for( xub_StrLen n = 0; n < aStrBasePaths.GetTokenCount(); n++ )
-    {
-        INetURLObject aURL( aStrBasePaths.GetToken( n ) );
-        aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_SUBPATH ) ) );
-        aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_NAME ) ) );
-        if ( FileExists( aURL ) )
-        {
-            maStrStdDocURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
-            break;
-        }
-    }
     SetExchangeSupport ();
 
     ///////////////////////////////////////
@@ -103,7 +87,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent,
     maEdPassword.Show( sal_False );
     maCbAnonymous.Show( sal_False );
     maBtTarget.Enable( sal_False );
-    maBtBrowse.Enable( maStrStdDocURL != aEmptyStr );
+    maBtBrowse.Enable( sal_True );
 
     ///////////////////////////////////////
     // overload handlers
@@ -250,7 +234,7 @@ void SvxHyperlinkInternetTp::SetInitFocus()
 
 /*************************************************************************
 |*
-|* Contens of editfield "Taregt" modified
+|* Contents of editfield "Target" modified
 |*
 |************************************************************************/
 
@@ -269,7 +253,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl, void *, EMPTYARG )
 
 /*************************************************************************
 |*
-|* If target-field was modify, to browse the new doc afeter timeout
+|* If target-field was modify, to browse the new doc after timeout
 |*
 |************************************************************************/
 
@@ -281,7 +265,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
 
 /*************************************************************************
 |*
-|* Contens of editfield "Login" modified
+|* Contents of editfield "Login" modified
 |*
 |************************************************************************/
 
@@ -442,7 +426,8 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, void *, EMPTYARG )
     /////////////////////////////////////////////////
     // Open URL if available
 
-    SfxStringItem aName( SID_FILE_NAME, maStrStdDocURL );
+    SfxStringItem aName( SID_FILE_NAME, UniString::CreateFromAscii(
+                                RTL_CONSTASCII_STRINGPARAM( "http://" ) ) );
     SfxStringItem aRefererItem( SID_REFERER, UniString::CreateFromAscii(
                                 RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) );
     SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_True );
diff --git a/cui/source/dialogs/hyperdlg.src b/cui/source/dialogs/hyperdlg.src
index d986593..d52257b 100644
--- a/cui/source/dialogs/hyperdlg.src
+++ b/cui/source/dialogs/hyperdlg.src
@@ -117,7 +117,7 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET
         TabStop = TRUE ;
         Text [ en-US ] = "WWW Browser";
 
-        QuickHelpText [ en-US ] = "WWW Browser" ;
+        QuickHelpText [ en-US ] = "Open web browser, copy an URL, and paste it to Target field" ;
         ButtonImage = Image
         {
             ImageBitmap = Bitmap { File = "browse.bmp" ; };
@@ -125,22 +125,6 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET
         };
     };
 
-    ImageButton BTN_TARGET
-    {
-        HelpID = "cui:ImageButton:RID_SVXPAGE_HYPERLINK_INTERNET:BTN_TARGET";
-        Pos = MAP_APPFONT ( 235, 40+2 ) ;
-        Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_HEIGHT, HYPERDLG_IMGBUTTON_HEIGHT );
-        TabStop = TRUE ;
-        Text [ en-US ] = "Target in Document";
-
-        QuickHelpText [ en-US ] = "Target in Document" ;
-        ButtonImage = Image
-        {
-            ImageBitmap = Bitmap { File = "target.bmp" ; };
-            MASKCOLOR
-        };
-    };
-
     FixedLine GRP_MORE
     {
         Pos = MAP_APPFONT ( 6 , 92 ) ;
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index 73f99df..f1888b3 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -59,8 +59,6 @@ private:
 
     sal_Bool				mbMarkWndOpen;
 
-    String				maStrStdDocURL;
-
     DECL_LINK (Click_SmartProtocol_Impl  , void * );	    // Radiobutton clicked: Type HTTP or FTP
     DECL_LINK (ClickAnonymousHdl_Impl    , void * );		// Checkbox : Anonymous User
     DECL_LINK (ClickBrowseHdl_Impl       , void * );		// Button : Browse


More information about the Libreoffice-commits mailing list