[Libreoffice-commits] core.git: 3 commits - extras/source filter/source sc/AllLangResTarget_sc.mk sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk svtools/inc svtools/source

Caolán McNamara caolanm at redhat.com
Mon Apr 15 02:39:01 PDT 2013


 extras/source/glade/libreoffice-catalog.xml.in |    4 
 filter/source/msfilter/svdfppt.cxx             |   10 ++
 sc/AllLangResTarget_sc.mk                      |    1 
 sc/UIConfig_scalc.mk                           |    1 
 sc/inc/helpids.h                               |    2 
 sc/inc/sc.hrc                                  |    2 
 sc/inc/scabstdlg.hxx                           |    2 
 sc/source/ui/attrdlg/scdlgfact.cxx             |   21 ----
 sc/source/ui/attrdlg/scdlgfact.hxx             |    3 
 sc/source/ui/docshell/arealink.cxx             |    2 
 sc/source/ui/inc/linkarea.hrc                  |   35 -------
 sc/source/ui/inc/linkarea.hxx                  |   19 +--
 sc/source/ui/miscdlgs/linkarea.cxx             |   93 ++++++++-----------
 sc/source/ui/miscdlgs/linkarea.src             |  119 -------------------------
 sc/source/ui/view/cellsh1.cxx                  |    3 
 sc/uiconfig/scalc/ui/externaldata.ui           |   79 ++++++++++------
 svtools/inc/svtools/inettbc.hxx                |    9 -
 svtools/source/control/inettbc.cxx             |   30 ++++--
 18 files changed, 148 insertions(+), 287 deletions(-)

New commits:
commit 4f4ab917261e0f3fef242e54a2a5e45fb75aeb82
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 15 10:36:15 2013 +0100

    convert external data dialog to .ui
    
    Change-Id: I2dfaf152bd473f73fdeec08a8c2ac6b007d38352

diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 4867639..eac9600 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -106,7 +106,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
     sc/source/ui/miscdlgs/protectiondlg.src \
     sc/source/ui/miscdlgs/acredlin.src \
     sc/source/ui/miscdlgs/sharedocdlg.src \
-    sc/source/ui/miscdlgs/linkarea.src \
     sc/source/ui/formdlg/formdlgs.src \
     sc/source/ui/formdlg/dwfunctr.src \
     sc/source/core/src/compiler.src \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 8f800bf..4371959 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -63,6 +63,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
 	sc/uiconfig/scalc/ui/definename \
 	sc/uiconfig/scalc/ui/deletecells \
 	sc/uiconfig/scalc/ui/deletecontents \
+	sc/uiconfig/scalc/ui/externaldata \
 	sc/uiconfig/scalc/ui/formatcellsdialog \
 	sc/uiconfig/scalc/ui/insertname \
 	sc/uiconfig/scalc/ui/insertsheet \
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 6f210c8..fa4323c 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -196,8 +196,6 @@
 #define HID_DATAPILOT_SERVICE                                   "SC_HID_DATAPILOT_SERVICE"
 
 // Other help IDs (max.70) ---------------------------------------------------
-#define HID_SCDLG_LINKAREAURL                                   "SC_HID_SCDLG_LINKAREAURL"
-
 #define HID_SELECTTABLES                                        "SC_HID_SELECTTABLES"
 #define HID_SC_REPLCELLSWARN                                    "SC_HID_SC_REPLCELLSWARN"
 
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 4749970..d131092 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1064,7 +1064,7 @@
 #define RID_SCDLG_DAPISERVICE           (SC_DIALOGS_START + 130)
 #define RID_SCDLG_DAPIDATA              (SC_DIALOGS_START + 131)
 
-#define RID_SCDLG_LINKAREA              (SC_DIALOGS_START + 132)
+
 #define RID_SCDLG_DPDATAFIELD           (SC_DIALOGS_START + 133)
 #define RID_SCDLG_DPSUBTOTAL_OPT        (SC_DIALOGS_START + 134)
 #define RID_SCDLG_DPNUMGROUP            (SC_DIALOGS_START + 135)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 89997d4..026a03e 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -396,7 +396,7 @@ public:
 
     virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg
                                                           const std::vector<String> &rEntryList ) = 0;
-    virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg (  Window* pParent, int nId) = 0; //add for ScLinkedAreaDlg
+    virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg(Window* pParent) = 0; //add for ScLinkedAreaDlg
 
     virtual AbstractScMetricInputDlg * CreateScMetricInputDlg (  Window*        pParent, //add for ScMetricInputDlg
                                                                 sal_uInt16      nResId,     // derivative for every dialog!
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 98b656f..83f3c23 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -982,27 +982,12 @@ AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Wind
 }
 // add for ScSelEntryDlg end
 
-
-AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg (  Window* pParent,
-                                                                int nId)
+AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg(Window* pParent)
 {
-    ScLinkedAreaDlg * pDlg=NULL;
-    switch ( nId )
-    {
-        case RID_SCDLG_LINKAREA :
-            pDlg = new ScLinkedAreaDlg( pParent );
-            break;
-        default:
-            break;
-    }
-
-    if ( pDlg )
-        return new AbstractScLinkedAreaDlg_Impl( pDlg );
-    return 0;
+    ScLinkedAreaDlg* pDlg = new ScLinkedAreaDlg( pParent );
+    return new AbstractScLinkedAreaDlg_Impl( pDlg );
 }
 
-
-
 AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg (  Window*      pParent,
                                                                 sal_uInt16      nResId,     // Ableitung fuer jeden Dialog!
                                                                 long            nCurrent,
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 3383616..f88bb0e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -463,8 +463,7 @@ public:
     virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg
                                                           const std::vector<String> &rEntryList );
 
-    virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg (  Window* pParent, //add for ScLinkedAreaDlg
-                                                                int nId);
+    virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg(Window* pParent); //add for ScLinkedAreaDlg
 
     virtual AbstractScMetricInputDlg * CreateScMetricInputDlg (  Window*        pParent, //add for ScMetricInputDlg
                                                                 sal_uInt16      nResId,     // Ableitung fuer jeden Dialog!
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index bd48b87..df3c944 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -95,7 +95,7 @@ void ScAreaLink::Edit(Window* pParent, const Link& /* rEndEditHdl */ )
     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
     OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-    AbstractScLinkedAreaDlg* pDlg = pFact->CreateScLinkedAreaDlg( pParent, RID_SCDLG_LINKAREA);
+    AbstractScLinkedAreaDlg* pDlg = pFact->CreateScLinkedAreaDlg(pParent);
     OSL_ENSURE(pDlg, "Dialog create fail!");
     pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, GetRefreshDelay() );
     pImpl->m_pDialog = pDlg;
diff --git a/sc/source/ui/inc/linkarea.hrc b/sc/source/ui/inc/linkarea.hrc
deleted file mode 100644
index 36606f7..0000000
--- a/sc/source/ui/inc/linkarea.hrc
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sc.hrc>
-
-#define BTN_OK                  1
-#define BTN_CANCEL              2
-#define BTN_HELP                3
-#define FL_LOCATION             4
-#define CB_URL                  5
-#define BTN_BROWSE              6
-#define FT_HINT                 7
-#define FT_RANGES               8
-#define LB_RANGES               9
-#define BTN_RELOAD              10
-#define NF_DELAY                11
-#define FT_SECONDS              12
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index 2f035fb..5930daa 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -40,18 +40,13 @@ class ScDocShell;
 class ScLinkedAreaDlg : public ModalDialog
 {
 private:
-    FixedLine           aFlLocation;
-    SvtURLBox           aCbUrl;
-    PushButton          aBtnBrowse;
-    FixedInfo           aTxtHint;
-    FixedText           aFtRanges;
-    MultiListBox        aLbRanges;
-    CheckBox            aBtnReload;
-    NumericField        aNfDelay;
-    FixedText           aFtSeconds;
-    OKButton            aBtnOk;
-    CancelButton        aBtnCancel;
-    HelpButton          aBtnHelp;
+    SvtURLBox*    m_pCbUrl;
+    PushButton*   m_pBtnBrowse;
+    ListBox*      m_pLbRanges;
+    CheckBox*     m_pBtnReload;
+    NumericField* m_pNfDelay;
+    FixedText*    m_pFtSeconds;
+    OKButton*     m_pBtnOk;
 
     ScDocShell*             pSourceShell;
     sfx2::DocumentInserter* pDocInserter;
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 6e448ca..c88bbf7 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -34,7 +34,6 @@
 #include <vcl/waitobj.hxx>
 
 #include "linkarea.hxx"
-#include "linkarea.hrc"
 #include "scresid.hxx"
 #include "sc.hrc"
 #include "rangeutl.hxx"
@@ -43,37 +42,27 @@
 
 //==================================================================
 
-ScLinkedAreaDlg::ScLinkedAreaDlg( Window* pParent ) :
-    ModalDialog ( pParent, ScResId( RID_SCDLG_LINKAREA ) ),
-    //
-    aFlLocation ( this, ScResId( FL_LOCATION ) ),
-    aCbUrl      ( this, ScResId( CB_URL ) ),
-    aBtnBrowse  ( this, ScResId( BTN_BROWSE ) ),
-    aTxtHint    ( this, ScResId( FT_HINT ) ),
-    aFtRanges   ( this, ScResId( FT_RANGES ) ),
-    aLbRanges   ( this, ScResId( LB_RANGES ) ),
-    aBtnReload  ( this, ScResId( BTN_RELOAD ) ),
-    aNfDelay    ( this, ScResId( NF_DELAY ) ),
-    aFtSeconds  ( this, ScResId( FT_SECONDS ) ),
-    aBtnOk      ( this, ScResId( BTN_OK ) ),
-    aBtnCancel  ( this, ScResId( BTN_CANCEL ) ),
-    aBtnHelp    ( this, ScResId( BTN_HELP ) ),
-    //
-    pSourceShell( NULL ),
-    pDocInserter( NULL )
+ScLinkedAreaDlg::ScLinkedAreaDlg(Window* pParent)
+    : ModalDialog(pParent, "ExternalDataDialog", "modules/scalc/ui/externaldata.ui")
+    , pSourceShell(NULL)
+    , pDocInserter(NULL)
 
 {
-    FreeResource();
-
-    aCbUrl.SetHelpId( HID_SCDLG_LINKAREAURL );  // SvtURLBox ctor always sets SID_OPENURL
-    aCbUrl.SetSelectHdl( LINK( this, ScLinkedAreaDlg, FileHdl ) );
-    aBtnBrowse.SetClickHdl( LINK( this, ScLinkedAreaDlg, BrowseHdl ) );
-    aLbRanges.SetSelectHdl( LINK( this, ScLinkedAreaDlg, RangeHdl ) );
-    aBtnReload.SetClickHdl( LINK( this, ScLinkedAreaDlg, ReloadHdl ) );
+    get(m_pCbUrl, "url");
+    get(m_pLbRanges, "ranges");
+    m_pLbRanges->EnableMultiSelection(true);
+    m_pLbRanges->SetDropDownLineCount(8);
+    get(m_pBtnBrowse, "browse");
+    get(m_pBtnReload, "reload");
+    get(m_pNfDelay, "delay");
+    get(m_pFtSeconds, "secondsft");
+    get(m_pBtnOk, "ok");
+
+    m_pCbUrl->SetSelectHdl( LINK( this, ScLinkedAreaDlg, FileHdl ) );
+    m_pBtnBrowse->SetClickHdl( LINK( this, ScLinkedAreaDlg, BrowseHdl ) );
+    m_pLbRanges->SetSelectHdl( LINK( this, ScLinkedAreaDlg, RangeHdl ) );
+    m_pBtnReload->SetClickHdl( LINK( this, ScLinkedAreaDlg, ReloadHdl ) );
     UpdateEnable();
-
-    aNfDelay.SetAccessibleName(aBtnReload.GetText());
-    aNfDelay.SetAccessibleRelationLabeledBy(&aBtnReload);
 }
 
 ScLinkedAreaDlg::~ScLinkedAreaDlg()
@@ -109,7 +98,7 @@ IMPL_LINK_NOARG(ScLinkedAreaDlg, BrowseHdl)
 
 IMPL_LINK_NOARG(ScLinkedAreaDlg, FileHdl)
 {
-    OUString aEntered = aCbUrl.GetURL();
+    OUString aEntered = m_pCbUrl->GetURL();
     if (pSourceShell)
     {
         SfxMedium* pMed = pSourceShell->GetMedium();
@@ -179,10 +168,10 @@ void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilte
     if (pSourceShell)
     {
         SfxMedium* pMed = pSourceShell->GetMedium();
-        aCbUrl.SetText( pMed->GetName() );
+        m_pCbUrl->SetText( pMed->GetName() );
     }
     else
-        aCbUrl.SetText( EMPTY_STRING );
+        m_pCbUrl->SetText( EMPTY_STRING );
 
     UpdateSourceRanges();
 
@@ -190,13 +179,13 @@ void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilte
     for ( xub_StrLen i=0; i<nRangeCount; i++ )
     {
         String aRange = rSource.GetToken(i);
-        aLbRanges.SelectEntry( aRange );
+        m_pLbRanges->SelectEntry( aRange );
     }
 
     bool bDoRefresh = (nRefresh != 0);
-    aBtnReload.Check( bDoRefresh );
+    m_pBtnReload->Check( bDoRefresh );
     if (bDoRefresh)
-        aNfDelay.SetValue( nRefresh );
+        m_pNfDelay->SetValue( nRefresh );
 
     UpdateEnable();
 }
@@ -254,7 +243,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
 
         if ( !pSourceShell->GetError() )                    // only errors
         {
-            aCbUrl.SetText( pMed->GetName() );
+            m_pCbUrl->SetText( pMed->GetName() );
         }
         else
         {
@@ -262,7 +251,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
             pSourceShell = NULL;
             aSourceRef.Clear();
 
-            aCbUrl.SetText( EMPTY_STRING );
+            m_pCbUrl->SetText( EMPTY_STRING );
         }
     }
 
@@ -276,32 +265,32 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
 
 void ScLinkedAreaDlg::UpdateSourceRanges()
 {
-    aLbRanges.SetUpdateMode(false);
+    m_pLbRanges->SetUpdateMode(false);
 
-    aLbRanges.Clear();
+    m_pLbRanges->Clear();
     if ( pSourceShell )
     {
         ScAreaNameIterator aIter( pSourceShell->GetDocument() );
         ScRange aDummy;
         OUString aName;
         while ( aIter.Next( aName, aDummy ) )
-            aLbRanges.InsertEntry( aName );
+            m_pLbRanges->InsertEntry( aName );
     }
 
-    aLbRanges.SetUpdateMode(true);
+    m_pLbRanges->SetUpdateMode(true);
 
-    if ( aLbRanges.GetEntryCount() == 1 )
-        aLbRanges.SelectEntryPos(0);
+    if ( m_pLbRanges->GetEntryCount() == 1 )
+        m_pLbRanges->SelectEntryPos(0);
 }
 
 void ScLinkedAreaDlg::UpdateEnable()
 {
-    bool bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() );
-    aBtnOk.Enable( bEnable );
+    bool bEnable = ( pSourceShell && m_pLbRanges->GetSelectEntryCount() );
+    m_pBtnOk->Enable( bEnable );
 
-    bool bReload = aBtnReload.IsChecked();
-    aNfDelay.Enable( bReload );
-    aFtSeconds.Enable( bReload );
+    bool bReload = m_pBtnReload->IsChecked();
+    m_pNfDelay->Enable( bReload );
+    m_pFtSeconds->Enable( bReload );
 }
 
 OUString ScLinkedAreaDlg::GetURL()
@@ -337,20 +326,20 @@ OUString ScLinkedAreaDlg::GetOptions()
 OUString ScLinkedAreaDlg::GetSource()
 {
     OUStringBuffer aBuf;
-    sal_uInt16 nCount = aLbRanges.GetSelectEntryCount();
+    sal_uInt16 nCount = m_pLbRanges->GetSelectEntryCount();
     for (sal_uInt16 i=0; i<nCount; i++)
     {
         if (i > 0)
             aBuf.append(sal_Unicode(';'));
-        aBuf.append(aLbRanges.GetSelectEntry(i));
+        aBuf.append(m_pLbRanges->GetSelectEntry(i));
     }
     return aBuf.makeStringAndClear();
 }
 
 sal_uLong ScLinkedAreaDlg::GetRefresh()
 {
-    if ( aBtnReload.IsChecked() )
-        return sal::static_int_cast<sal_uLong>( aNfDelay.GetValue() );
+    if ( m_pBtnReload->IsChecked() )
+        return sal::static_int_cast<sal_uLong>( m_pNfDelay->GetValue() );
     else
         return 0;   // disabled
 }
diff --git a/sc/source/ui/miscdlgs/linkarea.src b/sc/source/ui/miscdlgs/linkarea.src
deleted file mode 100644
index e8fcb33d..0000000
--- a/sc/source/ui/miscdlgs/linkarea.src
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "linkarea.hrc"
-
-ModalDialog RID_SCDLG_LINKAREA
-{
-    HelpID = "sc:ModalDialog:RID_SCDLG_LINKAREA";
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    Size = MAP_APPFONT ( 274 , 190 ) ;
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT ( 218 , 8 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT ( 218 , 25 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    HelpButton BTN_HELP
-    {
-        Pos = MAP_APPFONT ( 218 , 49 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    FixedLine FL_LOCATION
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 204 , 8 ) ;
-        Text [ en-US ] = "URL of ~external data source";
-    };
-    ComboBox CB_URL
-    {
-        HelpID = "sc:ComboBox:RID_SCDLG_LINKAREA:CB_URL";
-        Pos = MAP_APPFONT ( 12 , 15 ) ;
-        Size = MAP_APPFONT ( 174 , 80 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-    };
-    PushButton BTN_BROWSE
-    {
-        HelpID = "sc:PushButton:RID_SCDLG_LINKAREA:BTN_BROWSE";
-        Pos = MAP_APPFONT ( 190 , 14 ) ;
-        Size = MAP_APPFONT ( 14 , 14 ) ;
-        Text = "~..." ;
-    };
-    FixedText FT_HINT
-    {
-        Pos = MAP_APPFONT ( 12 , 31 ) ;
-        Size = MAP_APPFONT ( 192 , 26 ) ;
-        WordBreak = TRUE ;
-        Text [ en-US ] = "(Enter the URL of the source document in the local file system or Internet here.)";
-    };
-    FixedText FT_RANGES
-    {
-        Pos = MAP_APPFONT ( 6 , 62 ) ;
-        Size = MAP_APPFONT ( 198 , 8 ) ;
-        Text [ en-US ] = "~Available tables/ranges";
-    };
-    MultiListBox LB_RANGES
-    {
-        HelpID = "sc:MultiListBox:RID_SCDLG_LINKAREA:LB_RANGES";
-        SimpleMode = TRUE ;
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 74 ) ;
-        Size = MAP_APPFONT ( 192 , 80 ) ;
-        AutoHScroll = TRUE ;
-    };
-    CheckBox BTN_RELOAD
-    {
-        HelpID = "sc:CheckBox:RID_SCDLG_LINKAREA:BTN_RELOAD";
-        Pos = MAP_APPFONT ( 12 , 168 ) ;
-        Size = MAP_APPFONT ( 100 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Update every";
-    };
-    NumericField NF_DELAY
-    {
-        HelpID = "sc:NumericField:RID_SCDLG_LINKAREA:NF_DELAY";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 113 , 166 ) ;
-        Size = MAP_APPFONT ( 32 , 12 ) ;
-        TabStop = TRUE ;
-        Spin = TRUE ;
-        Repeat = TRUE ;
-        Minimum = 1 ;
-        Maximum = 99999 ;
-        Value = 60 ;
-    };
-    FixedText FT_SECONDS
-    {
-        Pos = MAP_APPFONT ( 149 , 168 ) ;
-        Size = MAP_APPFONT ( 59 , 8 ) ;
-        Text [ en-US ] = "seconds";
-    };
-    Text [ en-US ] = "External Data";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 85fcf83..c4742b2 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2346,8 +2346,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
                     delete pImpl->m_pLinkedDlg;
                     pImpl->m_pLinkedDlg =
-                        pFact->CreateScLinkedAreaDlg( pTabViewShell->GetDialogParent(),
-                                                      RID_SCDLG_LINKAREA);
+                        pFact->CreateScLinkedAreaDlg(pTabViewShell->GetDialogParent());
                     OSL_ENSURE(pImpl->m_pLinkedDlg, "Dialog create fail!");
                     delete pImpl->m_pRequest;
                     pImpl->m_pRequest = new SfxRequest( rReq );
diff --git a/sc/uiconfig/scalc/ui/externaldata.ui b/sc/uiconfig/scalc/ui/externaldata.ui
index 4673442..a9b8f30 100644
--- a/sc/uiconfig/scalc/ui/externaldata.ui
+++ b/sc/uiconfig/scalc/ui/externaldata.ui
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkDialog" id="externaldata">
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">1</property>
+    <property name="upper">99999</property>
+    <property name="value">60</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkDialog" id="ExternalDataDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">External Data</property>
@@ -9,7 +16,7 @@
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
-        <property name="spacing">2</property>
+        <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
@@ -20,6 +27,8 @@
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -70,7 +79,7 @@
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">6</property>
+            <property name="spacing">12</property>
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
@@ -93,11 +102,15 @@
                           <object class="GtkBox" id="box3">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
+                            <property name="hexpand">True</property>
+                            <property name="spacing">12</property>
                             <child>
-                              <object class="GtkComboBox" id="combobox1">
+                              <object class="svtlo-SvtURLBox" id="url">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
+                                <property name="tooltip_text" translatable="yes">Enter the URL of the source document in the local file system or Internet here.</property>
+                                <property name="hexpand">True</property>
+                                <property name="has_entry">True</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -106,10 +119,12 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkImage" id="image1">
+                              <object class="GtkButton" id="browse">
+                                <property name="label" translatable="yes">_...</property>
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="stock">gtk-missing-image</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_underline">True</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -124,20 +139,6 @@
                             <property name="position">0</property>
                           </packing>
                         </child>
-                        <child>
-                          <object class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <property name="label" translatable="yes">(Enter the URL of the source document in the local file system or Internet here.)</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
                       </object>
                     </child>
                   </object>
@@ -148,6 +149,9 @@
                     <property name="can_focus">False</property>
                     <property name="label" translatable="yes">URL of _external data source</property>
                     <property name="use_underline">True</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
                   </object>
                 </child>
               </object>
@@ -161,18 +165,24 @@
               <object class="GtkFrame" id="frame2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
                 <property name="label_xalign">0</property>
                 <property name="shadow_type">none</property>
                 <child>
                   <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
                     <property name="top_padding">6</property>
                     <property name="left_padding">12</property>
                     <child>
                       <object class="GtkBox" id="box4">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
                         <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
@@ -181,7 +191,12 @@
                             <property name="can_focus">True</property>
                             <property name="shadow_type">in</property>
                             <child>
-                              <placeholder/>
+                              <object class="GtkTreeView" id="ranges">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="hexpand">True</property>
+                                <property name="vexpand">True</property>
+                              </object>
                             </child>
                           </object>
                           <packing>
@@ -194,9 +209,9 @@
                           <object class="GtkBox" id="box5">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
+                            <property name="spacing">12</property>
                             <child>
-                              <object class="GtkCheckButton" id="checkbutton1">
+                              <object class="GtkCheckButton" id="reload">
                                 <property name="label" translatable="yes">_Update every</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -204,6 +219,9 @@
                                 <property name="use_underline">True</property>
                                 <property name="xalign">0</property>
                                 <property name="draw_indicator">True</property>
+                                <accessibility>
+                                  <relation type="label-for" target="delay"/>
+                                </accessibility>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -217,10 +235,14 @@
                                 <property name="can_focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <object class="GtkSpinButton" id="spinbutton1">
+                                  <object class="GtkSpinButton" id="delay">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="invisible_char">•</property>
+                                    <property name="adjustment">adjustment1</property>
+                                    <accessibility>
+                                      <relation type="labelled-by" target="reload"/>
+                                    </accessibility>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
@@ -229,7 +251,7 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkLabel" id="label4">
+                                  <object class="GtkLabel" id="secondsft">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="label" translatable="yes">_seconds</property>
@@ -266,6 +288,9 @@
                     <property name="xalign">0.47999998927116394</property>
                     <property name="label" translatable="yes">_Available tables/ranges</property>
                     <property name="use_underline">True</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
                   </object>
                 </child>
               </object>
commit 8d124bc49a3b89705763e81e0acc2335f6e090f7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 15 10:35:01 2013 +0100

    make SvtURLBox ui buildable
    
    Change-Id: I13a917c84678d4dc5a0e6dae80a1a494909ca1d3

diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 9be1963..6992dc0f 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -151,6 +151,10 @@
                         generic-name="ComboBoxNumeric" parent="VclComboBoxText"
                         icon-name="widget-gtk-comboboxtext"/>
 
+    <glade-widget-class title="SvtURLBox" name="svtlo-SvtURLBox"
+                        generic-name="URLBox" parent="VclComboBoxText"
+                        icon-name="widget-gtk-comboboxtext"/>
+
     <glade-widget-class title="Reference Button" name="foruilo-RefButton"
                         generic-name="Reference Button" parent="GtkButton"
                         icon-name="widget-gtk-button"/>
diff --git a/svtools/inc/svtools/inettbc.hxx b/svtools/inc/svtools/inettbc.hxx
index c4419de..a8e85ea 100644
--- a/svtools/inc/svtools/inettbc.hxx
+++ b/svtools/inc/svtools/inettbc.hxx
@@ -51,8 +51,7 @@ friend class SvtURLBox_Impl;
     SVT_DLLPRIVATE void                         TryAutoComplete();
     SVT_DLLPRIVATE void                            UpdatePicklistForSmartProtocol_Impl();
     DECL_DLLPRIVATE_LINK(                      AutoCompleteHdl_Impl, void* );
-    using Window::ImplInit;
-    SVT_DLLPRIVATE void                            ImplInit();
+    SVT_DLLPRIVATE void             Init(bool bSetDefaultHelpID);
 
 protected:
     virtual long                    Notify( NotifyEvent& rNEvt );
@@ -61,9 +60,9 @@ protected:
     virtual long                    PreNotify( NotifyEvent& rNEvt );
 
 public:
-                                    SvtURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_NOT_VALID );
-                                    SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart = INET_PROT_NOT_VALID );
-                                    SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart = INET_PROT_NOT_VALID );
+                                    SvtURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
+                                    SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
+                                    SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
                                     ~SvtURLBox();
 
     void                            SetBaseURL( const String& rURL );
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index c7779c5..2859c10 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -41,10 +41,11 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
 #include <rtl/instance.hxx>
-#include <vcl/toolbox.hxx>
 #include <salhelper/thread.hxx>
 #include <osl/mutex.hxx>
+#include <vcl/builder.hxx>
 #include <vcl/svapp.hxx>
+#include <vcl/toolbox.hxx>
 #include <unotools/historyoptions.hxx>
 #include <svl/eitem.hxx>
 #include <svl/stritem.hxx>
@@ -843,7 +844,7 @@ void SvtURLBox::TryAutoComplete()
 }
 
 //-------------------------------------------------------------------------
-SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
+SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart, bool bSetDefaultHelpID )
     :   ComboBox( pParent , WB_DROPDOWN | WB_AUTOSIZE | WB_AUTOHSCROLL ),
         eSmartProtocol( eSmart ),
         bAutoCompleteMode( sal_False ),
@@ -853,7 +854,7 @@ SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
         bNoSelection( sal_False ),
         bIsAutoCompleteEnabled( sal_True )
 {
-    ImplInit();
+    Init(bSetDefaultHelpID);
 
     if ( GetDesktopRectPixel().GetWidth() > 800 )
         SetSizePixel( Size( 300, 240 ) );
@@ -862,7 +863,8 @@ SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
 }
 
 //-------------------------------------------------------------------------
-SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart )
+SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart,
+    bool bSetDefaultHelpID )
     :   ComboBox( pParent, _nStyle ),
         eSmartProtocol( eSmart ),
         bAutoCompleteMode( sal_False ),
@@ -872,11 +874,21 @@ SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart )
         bNoSelection( sal_False ),
         bIsAutoCompleteEnabled( sal_True )
 {
-    ImplInit();
+    Init(bSetDefaultHelpID);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvtURLBox(Window *pParent, VclBuilder::stringmap &)
+{
+    WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|
+                       WB_DROPDOWN|WB_AUTOSIZE|WB_AUTOHSCROLL;
+    SvtURLBox* pListBox = new SvtURLBox(pParent, nWinBits, INET_PROT_NOT_VALID, false);
+    pListBox->EnableAutoSize(true);
+    return pListBox;
 }
 
 //-------------------------------------------------------------------------
-SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart )
+SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart,
+    bool bSetDefaultHelpID )
     :   ComboBox( pParent , _rResId ),
         eSmartProtocol( eSmart ),
         bAutoCompleteMode( sal_False ),
@@ -886,14 +898,14 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart
         bNoSelection( sal_False ),
         bIsAutoCompleteEnabled( sal_True )
 {
-    ImplInit();
+    Init(bSetDefaultHelpID);
 }
 
-void SvtURLBox::ImplInit()
+void SvtURLBox::Init(bool bSetDefaultHelpID)
 {
     pImp = new SvtURLBox_Impl();
 
-    if ( GetHelpId().getLength() == 0 )
+    if (bSetDefaultHelpID && GetHelpId().isEmpty())
         SetHelpId( ".uno:OpenURL" );
     EnableAutocomplete( sal_False );
 
commit ca09d2df977d473341546882cf48c70ebd322d42
Author: Andre Fischer <af at apache.org>
Date:   Fri Jul 6 11:28:33 2012 +0000

    Resolves: #i119877# Fixed import of FillBitmapMode
    
    Reported by: Li Feng Wang
    Patch by: SunYing
    Reviewed by: Andre Fischer
    (cherry picked from commit 830bd984a9db75a76057a969a96a17233ed4d7ee)
    
    Conflicts:
    	filter/source/msfilter/svdfppt.cxx
    
    Change-Id: Ibf3b7ea395c552ca8d0205e4c2eb4a4f8075a246

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index f8530c1..104db58 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/text/XText.hpp>
 #include <com/sun/star/geometry/RealPoint2D.hpp>
 #include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
 #include <unotools/streamwrap.hxx>
 #include <filter/msfilter/svdfppt.hxx>
 #include <svx/xpoly.hxx>
@@ -7378,6 +7379,15 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
                         RTL_TEXTENCODING_ASCII_US);
 
                     xPropSet->setPropertyValue( OUString("FillBitmapURL"), Any( aURL ) );
+
+                    const XFillBmpStretchItem aStretchItem(( const XFillBmpStretchItem&)pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
+                    const XFillBmpTileItem aTileItem(( const XFillBmpTileItem&)pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
+                    if( aTileItem.GetValue() )
+                        xPropSet->setPropertyValue( "FillBitmapMode", Any( com::sun::star::drawing::BitmapMode_REPEAT ) );
+                    else if( aStretchItem.GetValue() )
+                        xPropSet->setPropertyValue( "FillBitmapMode", Any( com::sun::star::drawing::BitmapMode_STRETCH ) );
+                    else
+                        xPropSet->setPropertyValue( "FillBitmapMode", Any( com::sun::star::drawing::BitmapMode_NO_REPEAT ) );
                 }
             break;
             case XFILL_NONE :


More information about the Libreoffice-commits mailing list