[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 sfx2/sdi

Thomas Arnhold thomas at arnhold.org
Wed Oct 16 11:36:45 PDT 2013


 cui/source/dialogs/cuihyperdlg.cxx |   30 ++++++------------------------
 cui/source/dialogs/hlinettp.cxx    |   22 ----------------------
 cui/source/dialogs/hlmarkwn.cxx    |   10 +++++-----
 cui/source/dialogs/hlmarkwn.hrc    |    2 +-
 cui/source/dialogs/hlmarkwn.src    |    4 ++--
 cui/source/dialogs/hltpbase.cxx    |    7 -------
 cui/source/inc/cuihyperdlg.hxx     |    4 +---
 cui/source/inc/hlinettp.hxx        |    1 -
 cui/source/inc/hlmarkwn.hxx        |    4 ++--
 cui/source/inc/hltpbase.hxx        |    1 -
 include/sfx2/cntids.hrc            |    1 -
 sfx2/sdi/sfx.sdi                   |   27 ---------------------------
 12 files changed, 17 insertions(+), 96 deletions(-)

New commits:
commit 556997bae75be8d8876d87a43d854cb969c12ce3
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Wed Oct 16 15:58:43 2013 +0200

    remove SID_INTERNET_ONLINE
    
    We have no online/offline concept for the office anymore.
    
    Change-Id: Id7e71d9c4383b47d3fae6f8cb5dc18ec22a55934

diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 0be013f..444f529 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -38,7 +38,6 @@ using ::com::sun::star::frame::XFrame;
 
 SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg )
 : SfxControllerItem ( _nId, rBindings )
-  ,aOnlineForwarder  ( SID_INTERNET_ONLINE , *this )
   ,aRdOnlyForwarder  ( SID_READONLY_MODE, *this )
 {
     pParent = pDlg;
@@ -51,11 +50,6 @@ void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
     {
         switch ( nSID )
         {
-            case SID_INTERNET_ONLINE :
-            {
-                pParent->EnableInetBrowse( !( (SfxBoolItem*)pState)->GetValue() );
-            }
-            break;
             case SID_HYPERLINK_GETLINK :
             {
                 pParent->SetPage ( (SvxHyperlinkItem*)pState);
@@ -332,19 +326,6 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
 
 /*************************************************************************
 |*
-|* Enable/Disable to browse targets in a html-doc
-|*
-|************************************************************************/
-
-void SvxHpLinkDlg::EnableInetBrowse( sal_Bool bEnable )
-{
-    SvxHyperlinkTabPageBase* pCurrentPage = ( SvxHyperlinkTabPageBase* )
-                                            GetTabPage ( GetCurPageId() );
-    pCurrentPage->SetOnlineMode( bEnable );
-}
-
-/*************************************************************************
-|*
 |* Enable/Disable ReadOnly mode
 |*
 |************************************************************************/
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 47c6e0d..b6d3802 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <comphelper/string.hxx>
 #include <unotools/pathoptions.hxx>
 #include <unotools/useroptions.hxx>
 #include <svl/adrparse.hxx>
@@ -480,25 +479,4 @@ void SvxHyperlinkInternetTp::SetMarkStr ( const OUString& aStrMark )
     maCbbTarget.SetText ( aStrURL );
 }
 
-/*************************************************************************
-|*
-|* Enable Browse-Button in subject to the office is in onlinemode
-|*
-|************************************************************************/
-
-void SvxHyperlinkInternetTp::SetOnlineMode( sal_Bool /*bEnable*/ )
-{
-    // State of target-button in subject to the current url-string
-    // ( Can't display any targets in an document, if there is no
-    //   valid url to a document )
-    OUString aStrCurrentTarget(comphelper::string::stripEnd(maCbbTarget.GetText(), ' '));
-
-    if( aStrCurrentTarget.isEmpty() ||
-        aStrCurrentTarget.equalsIgnoreAsciiCase( sHTTPScheme ) ||
-        aStrCurrentTarget.equalsIgnoreAsciiCase( sHTTPSScheme ) )
-        maBtTarget.Enable( sal_False );
-    else
-        maBtTarget.Enable( sal_True );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index f4673ed..d849ed9 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -309,13 +309,6 @@ void SvxHyperlinkTabPageBase::SetMarkStr ( const OUString& /*aStrMark*/ )
     // default-implemtation : do nothing
 }
 
-// This method will be called from the dialog-class if the state off
-// the online-mode has changed.
-void SvxHyperlinkTabPageBase::SetOnlineMode( sal_Bool /*bEnable*/ )
-{
-    // default-implemtation : do nothing
-}
-
 // Set initial focus
 void SvxHyperlinkTabPageBase::SetInitFocus()
 {
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index a372e5d..79411bb 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -40,7 +40,6 @@ class SvxHlinkCtrl : public SfxControllerItem
 private :
     SvxHpLinkDlg *pParent;
 
-    SfxStatusForwarder aOnlineForwarder;
     SfxStatusForwarder aRdOnlyForwarder;
 
 public :
@@ -83,7 +82,6 @@ public:
     virtual void            PageCreated( sal_uInt16 nId, IconChoicePage& rPage );
 
     sal_uInt16                  SetPage( SvxHyperlinkItem* pItem );
-    void                    EnableInetBrowse( sal_Bool bEnable = sal_True );
     void                    SetReadOnlyMode( sal_Bool bReadOnly = sal_False );
     inline sal_Bool     IsHTMLDoc() const { return mbIsHTMLDoc; }
 
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index 4e6b867..c30d1e6 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -87,7 +87,6 @@ public:
     static  IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet );
 
     virtual void        SetMarkStr ( const OUString& aStrMark );
-    virtual void        SetOnlineMode( sal_Bool bEnable );
 
     virtual void        SetInitFocus();
 };
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index 26eb00b..9584069 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -138,7 +138,6 @@ public:
 
     virtual sal_Bool AskApply ();
     virtual void DoApply ();
-    virtual void SetOnlineMode( sal_Bool bEnable );
     virtual void SetInitFocus();
     virtual void SetMarkStr ( const OUString& aStrMark );
     virtual void Reset( const SfxItemSet& );
diff --git a/include/sfx2/cntids.hrc b/include/sfx2/cntids.hrc
index 2facc52..1cb27f3 100644
--- a/include/sfx2/cntids.hrc
+++ b/include/sfx2/cntids.hrc
@@ -32,7 +32,6 @@
 #endif
 #define SID_TITLE                       (SID_SFX_START + 307)
 #define SID_DELETE                      (SID_SFX_START + 713)
-#define SID_INTERNET_ONLINE             (SID_SFX_START + 1370)
 
 // Don't let SID_CHAOS_END grow. Internal docking windows use the range between
 // SID_CHAOS_END and SID_LIB_START!! Look into sfxsids.hrc for more information!
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 2bc4c48..624e990 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3111,33 +3111,6 @@ SfxVoidItem InsertObjectFloatingFrame SID_INSERT_FLOATINGFRAME
 ]
 
 //--------------------------------------------------------------------------
-SfxBoolItem InternetOnline SID_INTERNET_ONLINE
-
-[
-    /* flags: */
-    AutoUpdate = TRUE,
-    Cachable = Cachable,
-    FastCall = FALSE,
-    HasCoreId = TRUE,
-    HasDialog = FALSE,
-    ReadOnlyDoc = TRUE,
-    Toggle = TRUE,
-    Container = TRUE,
-    RecordAbsolute = FALSE,
-    RecordPerSet;
-    Asynchron;
-
-    Readonly = FALSE,
-
-    /* config: */
-    AccelConfig = FALSE,
-    MenuConfig = FALSE,
-    StatusBarConfig = FALSE,
-    ToolBoxConfig = FALSE,
-    GroupId = GID_EXPLORER;
-]
-
-//--------------------------------------------------------------------------
 SfxBoolItem IsLoading SID_DOC_LOADING
 
 [
commit 4b1ebf998b344535d20a6205b915c21996fc06d7
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Wed Oct 16 19:09:41 2013 +0200

    fdo#63271: Close hyperlink dialog after hyperlink is inserted
    
    Also label it with "Ok" which reflects the new behavior better.
    
    Change-Id: If8adde315c2d822e3210a0dcae7055519e5e558d

diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index e0bb226..0be013f 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -137,7 +137,7 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
     GetOKButton().SetText ( CUI_RESSTR(RID_SVXSTR_HYPDLG_APPLYBUT) );
     GetCancelButton().SetText ( CUI_RESSTR(RID_SVXSTR_HYPDLG_CLOSEBUT) );
 
-    GetOKButton().SetClickHdl    ( LINK ( this, SvxHpLinkDlg, ClickApplyHdl_Impl ) );
+    GetOKButton().SetClickHdl    ( LINK ( this, SvxHpLinkDlg, ClickOkHdl_Impl ) );
     GetCancelButton().SetClickHdl( LINK ( this, SvxHpLinkDlg, ClickCloseHdl_Impl ) );
 }
 
@@ -219,11 +219,11 @@ void SvxHpLinkDlg::Move()
 
 /*************************************************************************
 |*
-|* Click on Apply-button
+|* Click on Ok-button
 |*
 |************************************************************************/
 
-IMPL_LINK_NOARG(SvxHpLinkDlg, ClickApplyHdl_Impl)
+IMPL_LINK_NOARG(SvxHpLinkDlg, ClickOkHdl_Impl)
 {
     SfxItemSet aItemSet( SFX_APP()->GetPool(), SID_HYPERLINK_GETLINK,
                          SID_HYPERLINK_SETLINK );
@@ -238,14 +238,15 @@ IMPL_LINK_NOARG(SvxHpLinkDlg, ClickApplyHdl_Impl)
         SvxHyperlinkItem *aItem = (SvxHyperlinkItem *)
                                   aItemSet.GetItem (SID_HYPERLINK_SETLINK);
 
-        OUString aStrEmpty;
-        if ( aItem->GetURL() != aStrEmpty )
+        if ( !aItem->GetURL().isEmpty() )
             GetDispatcher()->Execute( SID_HYPERLINK_SETLINK, SFX_CALLMODE_ASYNCHRON |
                                       SFX_CALLMODE_RECORD, aItem, 0L);
 
         ( (SvxHyperlinkTabPageBase*)GetTabPage ( GetCurPageId() ) )->DoApply();
     }
 
+    Close();
+
     return( 0L );
 }
 
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index e957e39..7bd2c76 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -121,7 +121,7 @@ void SvxHlmarkTreeLBox::Paint( const Rectangle& rRect )
 
 SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent )
 :   ModalDialog( (Window*)pParent, CUI_RES ( RID_SVXFLOAT_HYPERLINK_MARKWND ) ),
-    maBtApply( this, CUI_RES (BT_APPLY) ),
+    maBtOk( this, CUI_RES (BT_OK) ),
     maBtClose( this, CUI_RES (BT_CLOSE) ),
     maLbTree ( this, CUI_RES (TLB_MARK) ),
     mbUserMoved ( sal_False ),
@@ -130,9 +130,9 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent )
 {
     FreeResource();
 
-    maBtApply.SetClickHdl       ( LINK ( this, SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl ) );
+    maBtOk.SetClickHdl          ( LINK ( this, SvxHlinkDlgMarkWnd, ClickOkHdl_Impl ) );
     maBtClose.SetClickHdl       ( LINK ( this, SvxHlinkDlgMarkWnd, ClickCloseHdl_Impl ) );
-    maLbTree.SetDoubleClickHdl  ( LINK ( this, SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl ) );
+    maLbTree.SetDoubleClickHdl  ( LINK ( this, SvxHlinkDlgMarkWnd, ClickOkHdl_Impl ) );
 
     // add lines to the Tree-ListBox
     maLbTree.SetStyle( maLbTree.GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
@@ -532,11 +532,11 @@ bool SvxHlinkDlgMarkWnd::SelectEntry(OUString aStrMark)
 
 /*************************************************************************
 |*
-|* Click on Apply-Button / Doubleclick on item in tree
+|* Click on Ok-Button / Doubleclick on item in tree
 |*
 |************************************************************************/
 
-IMPL_LINK_NOARG(SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl)
+IMPL_LINK_NOARG(SvxHlinkDlgMarkWnd, ClickOkHdl_Impl)
 {
     SvTreeListEntry* pEntry = maLbTree.GetCurEntry();
 
diff --git a/cui/source/dialogs/hlmarkwn.hrc b/cui/source/dialogs/hlmarkwn.hrc
index 2c4b6ac..f937981 100644
--- a/cui/source/dialogs/hlmarkwn.hrc
+++ b/cui/source/dialogs/hlmarkwn.hrc
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#define BT_APPLY    1
+#define BT_OK       1
 #define BT_CLOSE    2
 #define TLB_MARK    3
 #define STR_MARK_TREE   5000
diff --git a/cui/source/dialogs/hlmarkwn.src b/cui/source/dialogs/hlmarkwn.src
index 10fc781..c035163 100644
--- a/cui/source/dialogs/hlmarkwn.src
+++ b/cui/source/dialogs/hlmarkwn.src
@@ -33,14 +33,14 @@ ModalDialog RID_SVXFLOAT_HYPERLINK_MARKWND
     SVLook = TRUE ;
     Size = MAP_APPFONT ( 109 , 185 ) ;
     Text [ en-US ] = "Target in Document" ;
-    PushButton BT_APPLY
+    PushButton BT_OK
     {
         HelpId = HID_HYPERLINK_MARKWND_APPLY;
         Pos = MAP_APPFONT ( 3 , 168 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
         TabStop = TRUE ;
         DefButton = TRUE ;
-        Text [ en-US ] = "Apply" ;
+        Text [ en-US ] = "Ok" ;
     };
     PushButton BT_CLOSE
     {
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index 9e976df..a372e5d 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -69,7 +69,7 @@ private:
     sal_Bool            mbReadOnly  : 1;
     sal_Bool            mbIsHTMLDoc : 1;
 
-    DECL_LINK (ClickApplyHdl_Impl, void * );
+    DECL_LINK (ClickOkHdl_Impl, void * );
     DECL_LINK (ClickCloseHdl_Impl, void * );
 
 protected:
diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx
index edb1013..f2ee1b0 100644
--- a/cui/source/inc/hlmarkwn.hxx
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -58,7 +58,7 @@ class SvxHlinkDlgMarkWnd : public ModalDialog //FloatingWindow
 private:
     friend class SvxHlmarkTreeLBox;
 
-    PushButton      maBtApply;
+    PushButton      maBtOk;
     PushButton      maBtClose;
     SvxHlmarkTreeLBox maLbTree;
 
@@ -80,7 +80,7 @@ protected:
 
     virtual void Move ();
 
-    DECL_LINK (ClickApplyHdl_Impl, void * );
+    DECL_LINK (ClickOkHdl_Impl, void * );
     DECL_LINK (ClickCloseHdl_Impl, void * );
 
 public:


More information about the Libreoffice-commits mailing list