[Libreoffice-commits] core.git: Branch 'private/matus/sc-hacks' - 288 commits - android/CustomTarget_android_desktop.mk android/CustomTarget_lo4android.mk android/CustomTarget_sdremote.mk animations/source basctl/source basegfx/source bin/fixincludeguards.sh bin/update_pch.sh bin/verify-custom-widgets-libs bluez_bluetooth/inc bluez_bluetooth/README bridges/Library_cpp_uno.mk bridges/Module_bridges.mk canvas/source chart2/inc codemaker/source comphelper/source config_host/config_oauth2.h.in config_host.mk.in configure.ac connectivity/source crashrep/Executable_crashrep.mk cui/inc cui/source dbaccess/inc dbaccess/source desktop/Library_libreoffice.mk desktop/source download.lst drawinglayer/source editeng/source extensions/source external/accessories external/bluez_bluetooth external/firebird external/hyphen external/icu external/libatomic_ops external/libexttextcat external/libxmlsec external/mingw-externals external/Module_external.mk external/mythes external/nss external/openssl external /postgresql external/sane external/twain external/unixODBC extras/AllLangPackage_accessoriessamplesadvertisement.mk extras/AllLangPackage_accessoriessamplesdocumentation.mk extras/AllLangPackage_accessoriessamples.mk extras/AllLangPackage_accessoriessamplesnonfreeadvertisement.mk extras/AllLangPackage_accessoriessamplesnonfreedocumentation.mk extras/AllLangPackage_accessoriessamplesnonfree.mk extras/AllLangPackage_accessoriestemplateseducate.mk extras/AllLangPackage_accessoriestemplatesfinance.mk extras/AllLangPackage_accessoriestemplatesforms.mk extras/AllLangPackage_accessoriestemplateslabels.mk extras/AllLangPackage_accessoriestemplateslayout.mk extras/AllLangPackage_accessoriestemplatesmisc.mk extras/AllLangPackage_accessoriestemplates.mk extras/AllLangPackage_accessoriestemplatesnonfreeeducate.mk extras/AllLangPackage_accessoriestemplatesnonfreefinance.mk extras/AllLangPackage_accessoriestemplatesnonfreeforms.mk extras/AllLangPackage_accessoriestemplatesnonfreelabels.mk extras/AllLangPackage_accessoriestemplatesnonfreelayout.mk extras/AllLangPackage_accessoriestemplatesnonfreemisc.mk extras/AllLangPackage_accessoriestemplatesnonfree.mk extras/AllLangPackage_accessoriestemplatesnonfreeofficorr.mk extras/AllLangPackage_accessoriestemplatesnonfreeoffimisc.mk extras/AllLangPackage_accessoriestemplatesnonfreepersonal.mk extras/AllLangPackage_accessoriestemplatesnonfreepresent.mk extras/AllLangPackage_accessoriestemplatesofficorr.mk extras/AllLangPackage_accessoriestemplatesoffimisc.mk extras/AllLangPackage_accessoriestemplatespersonal.mk extras/AllLangPackage_accessoriestemplatespresent.mk extras/ExternalPackage_accessoriesgallerydrawspeople.mk extras/ExternalPackage_accessoriesgalleryelementsbullets2.mk extras/ExternalPackage_accessoriesgallery.mk extras/ExternalPackage_accessoriesgallerynonfree.mk extras/ExternalPackage_accessoriesgalleryphotosbuildings.mk extras/ExternalPackage_accessoriesgalleryphotoscelebration.mk extras/ExternalPackage_ac cessoriesgalleryphotoscities.mk extras/ExternalPackage_accessoriesgalleryphotosfauna.mk extras/ExternalPackage_accessoriesgalleryphotosflowers.mk extras/ExternalPackage_accessoriesgalleryphotosfoodsanddrinks.mk extras/ExternalPackage_accessoriesgalleryphotoshumans.mk extras/ExternalPackage_accessoriesgalleryphotoslandscapes.mk extras/ExternalPackage_accessoriesgalleryphotosobjects.mk extras/ExternalPackage_accessoriesgalleryphotosplants.mk extras/ExternalPackage_accessoriesgalleryphotosspace.mk extras/ExternalPackage_accessoriesgalleryphotosstatues.mk extras/ExternalPackage_accessoriesgalleryphotostravel.mk extras/ExternalPackage_accessoriestemplatescommoneducate.mk extras/ExternalPackage_accessoriestemplatescommonfinance.mk extras/ExternalPackage_accessoriestemplatescommonforms.mk extras/ExternalPackage_accessoriestemplatescommonlabels.mk extras/ExternalPackage_accessoriestemplatescommonlayout.mk extras/ExternalPackage_accessoriestemplatescommonmisc.mk extras/ExternalPackag e_accessoriestemplatescommon.mk extras/ExternalPackage_accessoriestemplatescommonofficorr.mk extras/ExternalPackage_accessoriestemplatescommonoffimisc.mk extras/ExternalPackage_accessoriestemplatescommonpersonal.mk extras/ExternalPackage_accessoriestemplatescommonpresent.mk extras/ExternalPackage_extra_fonts.mk extras/Module_extras.mk extras/UnpackedTarball_fonts_pack.mk extras/UnpackedTarball_gallery_pack.mk extras/UnpackedTarball_samples_pack.mk extras/UnpackedTarball_templates_pack.mk filter/Configuration_filter.mk filter/source forms/source formula/source framework/inc framework/source helpcontent2 i18nlangtag/source i18npool/Library_localedata_euro.mk i18npool/Library_localedata_others.mk i18npool/qa i18npool/source idl/inc idl/source include/basegfx include/com include/comphelper include/drawinglayer include/editeng include/formula include/i18nlangtag include/linguistic include/rtl include/sfx2 include/svl include/svx include/tools include/unotools include/vcl instseto o_native/util io/Library_acceptor.mk io/Library_connector.mk io/Library_io.mk io/Library_streams.mk io/Library_textinstream.mk io/Library_textoutstream.mk io/Module_io.mk ios/CustomTarget_LibreOffice_app.mk ios/experimental io/source l10ntools/inc libxmlsec/ExternalPackage_xmlsec.mk libxmlsec/ExternalProject_xmlsec.mk libxmlsec/include libxmlsec/Makefile libxmlsec/Module_libxmlsec.mk libxmlsec/README libxmlsec/src libxmlsec/UnpackedTarball_xmlsec.mk libxmlsec/xmlsec1-1.2.14-ansi.patch libxmlsec/xmlsec1-1.2.14_fix_extern_c.patch libxmlsec/xmlsec1-android.patch libxmlsec/xmlsec1-configure-libxml-libxslt.patch libxmlsec/xmlsec1-configure.patch libxmlsec/xmlsec1-customkeymanage.patch libxmlsec/xmlsec1-mingw32.patch libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch libxmlsec/xmlsec1-noverify.patch libxmlsec/xmlsec1-nssdisablecallbacks.patch libxmlsec/xmlsec1-nssmangleciphers.patch libxmlsec/xmlsec1-olderlibxml2.patch libxmlsec/xmlsec1-oldlibtool.patch libxmlsec/xmlsec1-vc.patch lingu istic/inc linguistic/source linguistic/workben Makefile.in odk/CustomTarget_check.mk odk/Package_share_readme.mk offapi/com officecfg/Configuration_officecfg.mk officecfg/registry oox/inc postprocess/CustomTarget_images.mk postprocess/CustomTarget_registry.mk readlicense_oo/CustomTarget_license.mk readlicense_oo/html readlicense_oo/license readlicense_oo/odt readlicense_oo/Package_files.mk readlicense_oo/txt reportdesign/source RepositoryExternal.mk Repository.mk RepositoryModule_host.mk sal/cpprt sal/Library_sal.mk sal/rtl sane/inc sane/README sc/inc sc/Library_sc.mk scp2/source sc/qa scripting/source sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk sd/AllLangResTarget_sd.mk sd/CppunitTest_sd_import_tests.mk sdext/source sd/inc sd/Library_sd.mk sd/qa sd/source sd/uiconfig sd/UIConfig_simpress.mk sfx2/inc sfx2/source sfx2/uiconfig shell/Executable_lngconvex.mk shell/inc shell/Library_ooofilt.mk shell/Library_ooofilt_x64.mk shell/Library_propertyhdl.mk shell/Library_property hdl_x64.mk shell/Library_shlxthdl.mk shell/Library_shlxthdl_x64.mk shell/source shell/StaticLibrary_shlxthandler_common.mk shell/StaticLibrary_shlxthandler_common_x64.mk smoketest/Executable_libtest.mk smoketest/libtest.cxx solenv/bin solenv/doc solenv/gbuild starmath/inc starmath/source stoc/source stoc/test svgio/source svl/source svtools/inc svtools/source svx/inc svx/source sw/inc sw/qa sw/source toolkit/source tools/source tubes/source twain/inc twain/README ucbhelper/source ucb/source ucb/workben unixODBC/inc unixODBC/README unodevtools/inc unodevtools/source unoidl/source unotest/source unotools/source unoxml/source ure/Rdb_ure.mk vcl/aqua vcl/generic vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source vcl/unx vcl/win writerfilter/inc writerfilter/source xmlhelp/source xmloff/inc xmloff/source xmlsecurity/source

Matúš Kukan matus.kukan at gmail.com
Fri Nov 8 22:21:46 CET 2013


Rebased ref, commits from common ancestor:
commit 7cbcab6a285db7ea369a50a5af2a9520b94764d5
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Fri Nov 8 22:15:36 2013 +0100

    WIP: implement data streams

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 3cd88db..25ca17b 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -440,6 +440,8 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 	sc/source/ui/miscdlgs/autofmt \
 	sc/source/ui/miscdlgs/conflictsdlg \
 	sc/source/ui/miscdlgs/crnrdlg \
+	sc/source/ui/miscdlgs/datastreams \
+	sc/source/ui/miscdlgs/datastreamsdlg \
 	sc/source/ui/miscdlgs/highred \
 	sc/source/ui/miscdlgs/optsolver \
 	sc/source/ui/miscdlgs/protectiondlg \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 6ec6ee4..dceaf9a 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -66,6 +66,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
 	sc/uiconfig/scalc/ui/consolidatedialog \
 	sc/uiconfig/scalc/ui/createnamesdialog \
 	sc/uiconfig/scalc/ui/dataform \
+	sc/uiconfig/scalc/ui/datastreams \
 	sc/uiconfig/scalc/ui/definedatabaserangedialog \
 	sc/uiconfig/scalc/ui/definename \
 	sc/uiconfig/scalc/ui/deletecells \
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index b44eb9f..a4a6975 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -33,17 +33,24 @@ class SvxClipboardFmtItem;
 class TransferableDataHelper;
 class TransferableClipboardListener;
 class AbstractScLinkedAreaDlg;
+class DataStreams;
 
 struct CellShell_Impl
 {
     TransferableClipboardListener*  m_pClipEvtLstnr;
     AbstractScLinkedAreaDlg*        m_pLinkedDlg;
+    DataStreams*                    m_pDataStreams;
     SfxRequest*                     m_pRequest;
 
     CellShell_Impl() :
         m_pClipEvtLstnr( NULL ),
         m_pLinkedDlg( NULL ),
+        m_pDataStreams( NULL ),
         m_pRequest( NULL ) {}
+    ~CellShell_Impl()
+    {
+        delete m_pDataStreams;
+    }
 };
 
 class ScCellShell: public ScFormatShell
diff --git a/sc/source/ui/inc/datastreams.hxx b/sc/source/ui/inc/datastreams.hxx
new file mode 100644
index 0000000..f0b1d35
--- /dev/null
+++ b/sc/source/ui/inc/datastreams.hxx
@@ -0,0 +1,41 @@
+/* -*- 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/.
+ */
+
+#include <sal/config.h>
+
+#include <rtl/ustring.hxx>
+#include <refreshtimer.hxx>
+
+class Dialog;
+class ScDocShell;
+class ScDocument;
+class ScRange;
+class SvStream;
+
+class DataStreams : public ScRefreshTimer
+{
+    ScDocShell *mpScDocShell;
+    ScDocument *mpScDocument;
+    Dialog *mpDialog;
+    ScRange *mpRange;
+    SvStream *mpStream;
+
+public:
+    DataStreams(ScDocShell *pScDocShell);
+    virtual ~DataStreams();
+    void Run();
+    void Start();
+    void Stop();
+    void Set(const OUString& rUrl, bool bIsScript, const OUString& rRange);
+
+private:
+    DECL_LINK(Fill, void *);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/datastreams.cxx b/sc/source/ui/miscdlgs/datastreams.cxx
new file mode 100644
index 0000000..72436f2
--- /dev/null
+++ b/sc/source/ui/miscdlgs/datastreams.cxx
@@ -0,0 +1,93 @@
+/* -*- 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/.
+ */
+
+#include <datastreams.hxx>
+
+#include <rtl/strbuf.hxx>
+#include <asciiopt.hxx>
+#include <docsh.hxx>
+#include <impex.hxx>
+
+DataStreams::DataStreams(ScDocShell *pScDocShell):
+    ScRefreshTimer(0, true)
+    , mpScDocShell(pScDocShell)
+    , mpScDocument(mpScDocShell->GetDocument())
+    , mpDialog(NULL)
+    , mpRange(NULL)
+    , mpStream(NULL)
+{
+    SAL_DEBUG("START DataStreams");
+    SetRefreshHandler( LINK( this, DataStreams, Fill ) );
+    SetRefreshControl( mpScDocument->GetRefreshTimerControlAddress() );
+}
+
+DataStreams::~DataStreams()
+{
+    SAL_DEBUG("ENDING ~DataStreams");
+    StopRefreshTimer();
+}
+
+void DataStreams::Set(const OUString& rUrl, bool bIsScript, const OUString& rRange)
+{
+    mpRange = new ScRange();
+    mpRange->Parse(rRange, mpScDocument);
+    if (bIsScript)
+        mpStream = new SvScriptStream(rUrl);
+    else
+        mpStream = new SvFileStream(rUrl, STREAM_READ);
+}
+
+void DataStreams::Start()
+{
+    SetTimeout(200);
+    AutoTimer::Start();
+}
+
+void DataStreams::Stop()
+{
+    AutoTimer::Stop();
+}
+
+IMPL_LINK_NOARG(DataStreams, Fill)
+{
+    if (!mpStream->good())
+    {
+        SAL_DEBUG("not good");
+        return 1;
+    }
+
+    if (!mpRange->IsValid())
+        SAL_DEBUG("Invalid range!");
+    sal_Int32 nHeight = mpRange->aEnd.Row() - mpRange->aStart.Row() + 1;
+    SAL_DEBUG("Height : " << nHeight);
+    if (nHeight <= 0)
+        SAL_DEBUG("not positive heigth ?");
+    OStringBuffer aBuf;
+    OString sTmp;
+    while (nHeight--)
+    {
+        mpStream->ReadLine(sTmp);
+        aBuf.append(sTmp);
+        aBuf.append('\n');
+    }
+    SvMemoryStream aMemoryStream((void *)aBuf.getStr(), aBuf.getLength(), STREAM_READ);
+    ScImportExport aImport(mpScDocument, *mpRange);
+    ScAsciiOptions aOptions;
+    aOptions.SetFieldSeps( ",;" );
+    aImport.SetExtOptions(aOptions);
+    aImport.ImportStream(aMemoryStream, OUString(), FORMAT_STRING);
+    /*
+    if (!mpScDocShell->AdjustRowHeight(mpRange->aStart.Row(), mpRange->aEnd.Row(), mpRange->aStart.Tab()))
+        mpScDocShell->PostPaint(*mpRange, PAINT_GRID);
+    */
+    
+    return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/datastreamsdlg.cxx b/sc/source/ui/miscdlgs/datastreamsdlg.cxx
new file mode 100644
index 0000000..f433b06
--- /dev/null
+++ b/sc/source/ui/miscdlgs/datastreamsdlg.cxx
@@ -0,0 +1,127 @@
+/* -*- 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/.
+ */
+
+#include <sfx2/filedlghelper.hxx>
+#include <svtools/inettbc.hxx>
+#include <vcl/dialog.hxx>
+#include <datastreams.hxx>
+
+namespace {
+
+class DataStreamsDlg : public ModelessDialog
+{
+    DataStreams *mpDataStreams;
+
+    SvtURLBox*      m_pCbUrl;
+    PushButton*     m_pBtnBrowse;
+    PushButton*     m_pBtnStop;
+    RadioButton*    m_pRBDirectData;
+    RadioButton*    m_pRBScriptData;
+    RadioButton*    m_pRBDataDown;
+    RadioButton*    m_pRBRangeDown;
+    RadioButton*    m_pRBNoMove;
+    RadioButton*    m_pRBMaxLimit;
+    RadioButton*    m_pRBUnlimited;
+    Edit*           m_pEdRange;
+    Edit*           m_pEdLimit;
+    OKButton*       m_pBtnOk;
+
+    DECL_LINK(UpdateHdl, void *);
+    DECL_LINK(BrowseHdl, void *);
+    DECL_LINK(StartHdl, void *);
+    DECL_LINK(StopHdl, void *);
+
+    void UpdateEnable();
+
+public:
+    DataStreamsDlg(DataStreams *pDataStreams, Window* pParent);
+    ~DataStreamsDlg();
+};
+
+DataStreamsDlg::DataStreamsDlg(DataStreams *pDataStreams, Window* pParent)
+    : ModelessDialog(pParent, "DataStreamsDialog", "modules/scalc/ui/datastreams.ui")
+      , mpDataStreams(pDataStreams)
+{
+    get(m_pCbUrl, "url");
+    get(m_pBtnBrowse, "browse");
+    get(m_pBtnStop, "stop");
+    get(m_pRBDirectData, "directdata");
+    get(m_pRBScriptData, "scriptdata");
+    get(m_pRBDataDown, "datadown");
+    get(m_pRBRangeDown, "rangedown");
+    get(m_pRBNoMove, "nomove");
+    get(m_pRBMaxLimit, "maxlimit");
+    get(m_pRBUnlimited, "unlimited");
+    get(m_pEdRange, "range");
+    get(m_pEdLimit, "limit");
+    get(m_pBtnOk, "ok");
+
+    m_pCbUrl->SetSelectHdl( LINK( this, DataStreamsDlg, UpdateHdl ) );
+    m_pEdRange->SetModifyHdl( LINK( this, DataStreamsDlg, UpdateHdl ) );
+    m_pBtnBrowse->SetClickHdl( LINK( this, DataStreamsDlg, BrowseHdl ) );
+    m_pBtnStop->SetClickHdl( LINK( this, DataStreamsDlg, StopHdl ) );
+    m_pBtnOk->SetClickHdl( LINK( this, DataStreamsDlg, StartHdl ) );
+    m_pBtnOk->SetClickHdl( LINK( this, DataStreamsDlg, StartHdl ) );
+    UpdateEnable();
+    Show();
+}
+
+DataStreamsDlg::~DataStreamsDlg()
+{
+}
+
+IMPL_LINK_NOARG(DataStreamsDlg, BrowseHdl)
+{
+    sfx2::FileDialogHelper aFileDialog(0, 0);
+    if ( aFileDialog.Execute() != ERRCODE_NONE )
+        return 0;
+
+    m_pCbUrl->SetText( aFileDialog.GetPath() );
+    UpdateEnable();
+    return 0;
+}
+
+IMPL_LINK_NOARG(DataStreamsDlg, StartHdl)
+{
+    bool bIsScript = m_pRBScriptData->IsChecked();
+    mpDataStreams->Set(m_pCbUrl->GetText(), bIsScript, m_pEdRange->GetText());
+    mpDataStreams->Start();
+    UpdateEnable();
+    return 0;
+}
+
+IMPL_LINK_NOARG(DataStreamsDlg, StopHdl)
+{
+    mpDataStreams->Stop();
+    return 0;
+}
+
+IMPL_LINK_NOARG(DataStreamsDlg, UpdateHdl)
+{
+    UpdateEnable();
+    return 0;
+}
+
+void DataStreamsDlg::UpdateEnable()
+{
+    bool bOk = !m_pEdRange->GetText().isEmpty();
+    bOk = bOk && !m_pCbUrl->GetURL().isEmpty();
+    m_pBtnOk->Enable(bOk);
+}
+
+}
+
+void DataStreams::Run()
+{
+    if (!mpDialog)
+        mpDialog = new DataStreamsDlg(this, NULL);
+    mpDialog->Show();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 12a46a8..7952c37 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -56,6 +56,7 @@
 #include "scabstdlg.hxx"
 #include "impex.hxx"
 #include "asciiopt.hxx"
+#include "datastreams.hxx"
 #include "queryentry.hxx"
 #include "markdata.hxx"
 
@@ -733,6 +734,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
             }
             break;
         case SID_DATA_STREAMS:
+            if (!pImpl->m_pDataStreams)
+                pImpl->m_pDataStreams = new DataStreams(GetViewData()->GetDocShell());
+            pImpl->m_pDataStreams->Run();
             break;
         case SID_MANAGE_XML_SOURCE:
             ExecuteXMLSourceDialog();
commit 03bd0d049ec74932be089b840f041e4643c177aa
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Thu Nov 7 15:25:25 2013 +0100

    add data streams dialog .ui file
    
    Change-Id: I184f824804f93cc4f094cf4f77d3f3263575316b

diff --git a/sc/uiconfig/scalc/ui/datastreams.ui b/sc/uiconfig/scalc/ui/datastreams.ui
new file mode 100644
index 0000000..de211ec
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/datastreams.ui
@@ -0,0 +1,488 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkDialog" id="DataStreamsDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Live Data Streams</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkBox" id="dialog-vbox2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkFrame" id="frame">
+                <property name="visible">True</property>
+                <property name="can_focus">False</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="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="orientation">vertical</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkBox" id="box12">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <property name="spacing">12</property>
+                            <child>
+                              <object class="GtkLabel" id="label6">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">URL</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="svtlo-SvtURLBox" id="url">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="has_tooltip">True</property>
+                                <property name="tooltip_markup" translatable="yes">Enter the URL of the source document in the local file system or Internet here.</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>
+                                <property name="entry_text_column">0</property>
+                                <property name="id_column">1</property>
+                                <property name="max_width_chars">48</property>
+                                <child internal-child="entry">
+                                  <object class="GtkEntry" id="URLBox-entry">
+                                    <property name="can_focus">False</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="browse">
+                                <property name="label" translatable="yes">_...</property>
+                                <property name="visible">True</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>
+                                <property name="fill">True</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox" id="box13">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkRadioButton" id="directdata">
+                                <property name="label" translatable="yes">Direct data feed</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="xalign">0</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">scriptdata</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="scriptdata">
+                                <property name="label" translatable="yes">Script to execute to obtain the data</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="xalign">0</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">directdata</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkFrame" id="frame1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label_xalign">0</property>
+                            <property name="shadow_type">none</property>
+                            <child>
+                              <object class="GtkAlignment" id="alignment1">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="top_padding">6</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <object class="GtkEntry" id="range">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="invisible_char">●</property>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" id="rangelabel">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">_Fill data into range</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Source stream</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">6</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkBox" id="box1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkRadioButton" id="datadown">
+                            <property name="label" translatable="yes">Move existing data down</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">rangedown</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="rangedown">
+                            <property name="label" translatable="yes">Move the range down</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">datadown</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="nomove">
+                            <property name="label" translatable="yes">Overwrite existing data</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">datadown</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">When new data arrives</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">6</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkBox" id="box9">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkBox" id="box10">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkRadioButton" id="maxlimit">
+                                <property name="label" translatable="yes">Limit to</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">unlimited</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="limit">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">●</property>
+                                <property name="text" translatable="yes">1000</property>
+                                <property name="invisible_char_set">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="padding">6</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="unlimited">
+                            <property name="label" translatable="yes">_Unlimited</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">maxlimit</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Maximal amount of rows</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">6</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <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>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="stop">
+                <property name="label" translatable="yes">Stop</property>
+                <property name="visible">True</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>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+      <action-widget response="0">stop</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">1</property>
+    <property name="upper">99999</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+</interface>
commit 5b81ceba1f7c4f071550caf29944d7747fd2f426
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Fri Nov 8 16:37:21 2013 +0100

    implement very simple SvScriptStream to read from process
    
    It inherits from SvStream, so it could be used easily.
    Basically, it's just a simple wrapper around
    osl_executeProcess_WithRedirectedIO() and osl_readFile().
    
    Change-Id: Ifa225c87d2c9be7e71ea113b0832a4fe83ec65b3

diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index de8dbbd..e390407 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -20,7 +20,8 @@
 #define INCLUDED_TOOLS_STREAM_HXX
 
 #include <limits>
-#include "tools/toolsdllapi.h"
+#include <osl/process.h>
+#include <tools/toolsdllapi.h>
 #include <tools/solar.h>
 #include <tools/lineend.hxx>
 #include <tools/errinf.hxx>
@@ -362,7 +363,7 @@ public:
               @endcode
               causing endless loops ...
     */
-    bool            ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE );
+    virtual bool    ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE );
     bool            WriteLine( const OString& rStr );
 
     /** Read a line of bytes.
@@ -470,10 +471,10 @@ public:
     friend SvStream& operator<<( SvStream& rStr, SvStrPtr f ); // for Manips
 
     /// end of input seen during previous i/o operation
-    bool            eof() const { return bIsEof; }
+    virtual bool eof() const { return bIsEof; }
 
     /// stream is broken
-    bool            bad() const { return GetError() != 0; }
+    virtual bool bad() const { return GetError() != 0; }
 
     /** Get state
 
@@ -488,7 +489,7 @@ public:
         If we try to read into a variable v and the operation fails, the value
         of v should be unchanged,
     */
-    bool good() const { return !(eof() || bad()); }
+    virtual bool good() const { return !(eof() || bad()); }
 };
 
 inline SvStream& operator<<( SvStream& rStr, SvStrPtr f )
@@ -759,6 +760,19 @@ public:
     virtual sal_Size remainingSize() { return GetBufSize() - Tell(); }
 };
 
+class TOOLS_DLLPUBLIC SvScriptStream: public SvStream
+{
+    oslProcess mpProcess;
+    oslFileHandle mpHandle;
+
+public:
+    SvScriptStream(const OUString& rUrl);
+    ~SvScriptStream();
+
+    virtual bool ReadLine(OString &rStr, sal_Int32) SAL_OVERRIDE;
+    virtual bool good() const SAL_OVERRIDE;
+};
+
 /** Data Copy Stream
 
     This class is the foundation for all classes, using SvData
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 32babd9..ce03ec5 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1961,6 +1961,63 @@ void SvMemoryStream::SetSize( sal_Size nNewSize )
     ReAllocateMemory( nDiff );
 }
 
+SvScriptStream::SvScriptStream(const OUString& rUrl):
+    mpProcess(NULL), mpHandle(NULL)
+{
+    oslProcessError rc;
+    rc = osl_executeProcess_WithRedirectedIO(
+        rUrl.pData,
+        NULL, 0,
+        osl_Process_HIDDEN,
+        NULL,
+        NULL,
+        NULL, 0,
+        &mpProcess,
+        NULL, &mpHandle, NULL);
+    if (osl_Process_E_None != rc)
+    {
+        mpProcess = NULL;
+        mpHandle = NULL;
+    }
+}
+
+SvScriptStream::~SvScriptStream()
+{
+    if (mpProcess)
+    {
+        osl_joinProcess(mpProcess);
+        osl_freeProcessHandle(mpProcess);
+    }
+    if (mpHandle)
+        osl_closeFile(mpHandle);
+}
+
+bool SvScriptStream::ReadLine(OString &rStr, sal_Int32)
+{
+    rStr = OString();
+    if (!good())
+        return false;
+
+    OStringBuffer sBuf;
+    sal_Char aChar('\n');
+    sal_uInt64 nBytesRead;
+    while (osl_File_E_None == osl_readFile(mpHandle, &aChar, 1, &nBytesRead)
+            && nBytesRead == 1 && aChar != '\n')
+    {
+        sBuf.append( aChar );
+    }
+    rStr = sBuf.makeStringAndClear();
+    if (!rStr.isEmpty())
+        return true;
+
+    return false;
+}
+
+bool SvScriptStream::good() const
+{
+    return mpHandle != NULL;
+}
+
 TYPEINIT0 ( SvDataCopyStream )
 
 void SvDataCopyStream::Assign( const SvDataCopyStream& )
commit 8e1df8a9c33037340f87e6972d041822f140fce3
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Thu Nov 7 15:51:31 2013 +0100

    add menu item for data streams dialog
    
    Change-Id: I2f27afbaf91b31be2711fcb581bfd86bc103f1cb

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 8a025ea..b04b2e2 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1272,6 +1272,11 @@
           <value xml:lang="en-US">Select ~Range...</value>
         </prop>
       </node>
+      <node oor:name=".uno:DataStreams" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Strea~ms...</value>
+        </prop>
+      </node>
       <node oor:name=".uno:ManageXMLSource" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">~XML Source...</value>
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 73d9a15..40c43a6 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -91,6 +91,8 @@
 #define SID_SCFORMULAOPTIONS    (SC_VIEW_START + 20)
 #define SID_SCDEFAULTSOPTIONS   (SC_VIEW_START + 21)
 
+#define SID_DATA_STREAMS        (SC_VIEW_START + 35)
+
 // slot-IDs for attributes
 #define SID_SCATTR_PROTECTION   (SC_VIEW_START + 36)    // protection-page
 
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index d9e1893..f06d848 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -51,6 +51,7 @@ interface CellSelection
     SID_REFRESH_DBAREA      [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_SBA_BRW_INSERT      [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_SELECT_DB           [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
+    SID_DATA_STREAMS        [ ExecMethod = ExecuteDB; ]
     SID_MANAGE_XML_SOURCE   [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_SORT                [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_DATA_FORM           [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 2f5024a..8d1a4e7 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -6076,6 +6076,30 @@ SfxVoidItem SelectDB SID_SELECT_DB
     GroupId = GID_DATA;
 ]
 
+SfxVoidItem DataStreams SID_DATA_STREAMS
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = TRUE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Synchron;
+
+    /* config: */
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_DATA;
+]
+
 SfxVoidItem ManageXMLSource SID_MANAGE_XML_SOURCE
 (SfxStringItem DbName SID_MANAGE_XML_SOURCE)
 [
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index c373d2d..12a46a8 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -732,7 +732,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
                 }
             }
             break;
-
+        case SID_DATA_STREAMS:
+            break;
         case SID_MANAGE_XML_SOURCE:
             ExecuteXMLSourceDialog();
         break;
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 6271a36..bd3102e 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -443,6 +443,7 @@
             <menu:menuitem menu:id=".uno:SelectDB"/>
             <menu:menuitem menu:id=".uno:DataAreaRefresh"/>
             <menu:menuseparator/>
+            <menu:menuitem menu:id=".uno:DataStreams"/>
             <menu:menuitem menu:id=".uno:ManageXMLSource"/>
             <menu:menuseparator/>
             <menu:menuitem menu:id=".uno:DataSort"/>
commit 0e98ea10f6d0c9e91644a9da748224fb23dcafe9
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Mon Nov 4 12:58:37 2013 +0100

    ScRefreshTimer: allow to run in another thread
    
    Change-Id: Ie817f55ebeadda78225aafd9a2014d2d2c206a00

diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index ff8fb12..a0ac982 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -23,6 +23,8 @@
 #include <vcl/timer.hxx>
 #include <osl/mutex.hxx>
 
+class CallerThread;
+
 class ScRefreshTimerControl
 {
     ::osl::Mutex    aMutex;
@@ -37,11 +39,13 @@ public:
 
 class ScRefreshTimer : public AutoTimer
 {
+    CallerThread *mpThread;
     ScRefreshTimerControl * const * ppControl;
+    const bool mbRunInAnotherThread;
 
 public:
-    ScRefreshTimer();
-    ScRefreshTimer( sal_uLong nSeconds );
+    ScRefreshTimer( bool bRunInAnotherThread = false );
+    ScRefreshTimer( sal_uLong nSeconds, bool bRunInAnotherThread = false );
     ScRefreshTimer( const ScRefreshTimer& r );
     virtual ~ScRefreshTimer();
 
@@ -49,6 +53,7 @@ public:
     sal_Bool operator==( const ScRefreshTimer& r ) const;
     sal_Bool operator!=( const ScRefreshTimer& r ) const;
 
+    void MakeCall();
     void StartRefreshTimer();
     void SetRefreshControl( ScRefreshTimerControl * const * pp );
     void SetRefreshHandler( const Link& rLink );
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index 9834aae..7723fd3 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -20,6 +20,31 @@
 #include "refreshtimer.hxx"
 #include "refreshtimerprotector.hxx"
 
+#include <osl/conditn.hxx>
+#include <salhelper/thread.hxx>
+
+class CallerThread : public salhelper::Thread
+{
+public:
+    osl::Condition maCall;
+    ScRefreshTimer *mpScRefreshTimer;
+    bool mbEnd;
+    CallerThread(ScRefreshTimer *pScRefreshTimer): Thread("CallerThread"),
+        mpScRefreshTimer(pScRefreshTimer), mbEnd(false) {}
+
+private:
+    virtual void execute()
+    {
+        while (!mbEnd)
+        {
+            maCall.wait();
+            maCall.reset();
+            if (!mbEnd)
+                mpScRefreshTimer->MakeCall();
+        };
+    }
+};
+
 void ScRefreshTimerControl::SetAllowRefresh( sal_Bool b )
 {
     if ( b && nBlockRefresh )
@@ -46,23 +71,43 @@ ScRefreshTimerProtector::~ScRefreshTimerProtector()
         (*ppControl)->SetAllowRefresh( true );
 }
 
-ScRefreshTimer::ScRefreshTimer() : ppControl(0)
+ScRefreshTimer::ScRefreshTimer( bool bRunInAnotherThread ) : ppControl(0)
+    ,mbRunInAnotherThread(bRunInAnotherThread)
 {
+    if (mbRunInAnotherThread)
+    {
+        mpThread = new CallerThread(this);
+        mpThread->launch();
+    }
     SetTimeout( 0 );
 }
 
-ScRefreshTimer::ScRefreshTimer( sal_uLong nSeconds ) : ppControl(0)
+ScRefreshTimer::ScRefreshTimer( sal_uLong nSeconds, bool bRunInAnotherThread ) : ppControl(0)
+    ,mbRunInAnotherThread(bRunInAnotherThread)
 {
+    if (mbRunInAnotherThread)
+    {
+        mpThread = new CallerThread(this);
+        mpThread->launch();
+    }
     SetTimeout( nSeconds * 1000 );
     Start();
 }
 
 ScRefreshTimer::ScRefreshTimer( const ScRefreshTimer& r ) : AutoTimer( r ), ppControl(0)
+    ,mbRunInAnotherThread(false)
 {
 }
 
 ScRefreshTimer::~ScRefreshTimer()
 {
+    if (mbRunInAnotherThread)
+    {
+        mpThread->mbEnd = true;
+        mpThread->maCall.set();
+        mpThread->join();
+        delete mpThread;
+    }
     if ( IsActive() )
         Stop();
 }
@@ -119,13 +164,20 @@ void ScRefreshTimer::SetRefreshDelay( sal_uLong nSeconds )
         Start();
 }
 
+void ScRefreshTimer::MakeCall()
+{
+    maTimeoutHdl.Call( this );
+}
+
 void ScRefreshTimer::Timeout()
 {
     if ( ppControl && *ppControl && (*ppControl)->IsRefreshAllowed() )
     {
-        // now we COULD make the call in another thread ...
         ::osl::MutexGuard aGuard( (*ppControl)->GetMutex() );
-        maTimeoutHdl.Call( this );
+        if (mbRunInAnotherThread)
+            mpThread->maCall.set();
+        else
+            MakeCall();
         // restart from now on, don't execute immediately again if timed out
         // a second time during refresh
         if ( IsActive() )
commit 7823073aabb40830b354a9f367d4d13c30e36706
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Thu Oct 31 10:56:15 2013 +0100

    ScRefreshTimer: implement methods in source file
    
    And don't export any of them.
    
    Change-Id: Ib29eec6765f0fe71c9c7fbc82b0531f562b6404a

diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index bbc5a9f..ff8fb12 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -22,80 +22,44 @@
 
 #include <vcl/timer.hxx>
 #include <osl/mutex.hxx>
-#include "scdllapi.h"
 
 class ScRefreshTimerControl
 {
-private:
-    ::osl::Mutex   aMutex;
-    sal_uInt16         nBlockRefresh;
+    ::osl::Mutex    aMutex;
+    sal_uInt16      nBlockRefresh;
 
 public:
     ScRefreshTimerControl() : nBlockRefresh(0) {}
-
-    void SetAllowRefresh( sal_Bool b )
-    {
-        if ( b && nBlockRefresh )
-            --nBlockRefresh;
-        else if ( !b && nBlockRefresh < (sal_uInt16)(~0) )
-            ++nBlockRefresh;
-    }
-
+    void SetAllowRefresh( sal_Bool b );
     sal_Bool IsRefreshAllowed() const { return !nBlockRefresh; }
-
     ::osl::Mutex& GetMutex() { return aMutex; }
 };
 
 class ScRefreshTimer : public AutoTimer
 {
-private:
     ScRefreshTimerControl * const * ppControl;
 
-    void Start()
-    {
-        if ( GetTimeout() )
-            AutoTimer::Start();
-    }
-
 public:
-    ScRefreshTimer() : ppControl(0) { SetTimeout( 0 ); }
-
-    ScRefreshTimer( sal_uLong nSeconds ) : ppControl(0)
-    {
-        SetTimeout( nSeconds * 1000 );
-        Start();
-    }
-
-    ScRefreshTimer( const ScRefreshTimer& r ) : AutoTimer( r ), ppControl(0) {}
-
+    ScRefreshTimer();
+    ScRefreshTimer( sal_uLong nSeconds );
+    ScRefreshTimer( const ScRefreshTimer& r );
     virtual ~ScRefreshTimer();
 
-    ScRefreshTimer& operator=( const ScRefreshTimer& r )
-    {
-        SetRefreshControl(0);
-        AutoTimer::operator=( r );
-        return *this;
-    }
-
-    sal_Bool operator==( const ScRefreshTimer& r ) const
-        { return GetTimeout() == r.GetTimeout(); }
-
-    sal_Bool operator!=( const ScRefreshTimer& r ) const
-        { return !ScRefreshTimer::operator==( r ); }
-
-    void StartRefreshTimer() { Start(); }
+    ScRefreshTimer& operator=( const ScRefreshTimer& r );
+    sal_Bool operator==( const ScRefreshTimer& r ) const;
+    sal_Bool operator!=( const ScRefreshTimer& r ) const;
 
-    void SetRefreshControl( ScRefreshTimerControl * const * pp ) { ppControl = pp; }
+    void StartRefreshTimer();
+    void SetRefreshControl( ScRefreshTimerControl * const * pp );
+    void SetRefreshHandler( const Link& rLink );
+    sal_uLong GetRefreshDelay() const;
+    void StopRefreshTimer();
 
-    void SetRefreshHandler( const Link& rLink ) { SetTimeoutHdl( rLink ); }
+    virtual void SetRefreshDelay( sal_uLong nSeconds );
+    virtual void Timeout();
 
-    sal_uLong GetRefreshDelay() const { return GetTimeout() / 1000; }
-
-    void StopRefreshTimer() { Stop(); }
-
-    SC_DLLPUBLIC virtual void SetRefreshDelay( sal_uLong nSeconds );
-
-    SC_DLLPUBLIC virtual void Timeout();
+private:
+    void Start();
 };
 
 #endif // SC_REFRESHTIMER_HXX
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index 1c9900e..9834aae 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -20,6 +20,14 @@
 #include "refreshtimer.hxx"
 #include "refreshtimerprotector.hxx"
 
+void ScRefreshTimerControl::SetAllowRefresh( sal_Bool b )
+{
+    if ( b && nBlockRefresh )
+        --nBlockRefresh;
+    else if ( !b && nBlockRefresh < (sal_uInt16)(~0) )
+        ++nBlockRefresh;
+}
+
 ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const * pp )
         :
         ppControl( pp )
@@ -38,12 +46,68 @@ ScRefreshTimerProtector::~ScRefreshTimerProtector()
         (*ppControl)->SetAllowRefresh( true );
 }
 
+ScRefreshTimer::ScRefreshTimer() : ppControl(0)
+{
+    SetTimeout( 0 );
+}
+
+ScRefreshTimer::ScRefreshTimer( sal_uLong nSeconds ) : ppControl(0)
+{
+    SetTimeout( nSeconds * 1000 );
+    Start();
+}
+
+ScRefreshTimer::ScRefreshTimer( const ScRefreshTimer& r ) : AutoTimer( r ), ppControl(0)
+{
+}
+
 ScRefreshTimer::~ScRefreshTimer()
 {
     if ( IsActive() )
         Stop();
 }
 
+ScRefreshTimer& ScRefreshTimer::operator=( const ScRefreshTimer& r )
+{
+    SetRefreshControl(0);
+    AutoTimer::operator=( r );
+    return *this;
+}
+
+sal_Bool ScRefreshTimer::operator==( const ScRefreshTimer& r ) const
+{
+    return GetTimeout() == r.GetTimeout();
+}
+
+sal_Bool ScRefreshTimer::operator!=( const ScRefreshTimer& r ) const
+{
+    return !ScRefreshTimer::operator==( r );
+}
+
+void ScRefreshTimer::StartRefreshTimer()
+{
+    Start();
+}
+
+void ScRefreshTimer::SetRefreshControl( ScRefreshTimerControl * const * pp )
+{
+    ppControl = pp;
+}
+
+void ScRefreshTimer::SetRefreshHandler( const Link& rLink )
+{
+    SetTimeoutHdl( rLink );
+}
+
+sal_uLong ScRefreshTimer::GetRefreshDelay() const
+{
+    return GetTimeout() / 1000;
+}
+
+void ScRefreshTimer::StopRefreshTimer()
+{
+    Stop();
+}
 
 void ScRefreshTimer::SetRefreshDelay( sal_uLong nSeconds )
 {
@@ -55,7 +119,6 @@ void ScRefreshTimer::SetRefreshDelay( sal_uLong nSeconds )
         Start();
 }
 
-
 void ScRefreshTimer::Timeout()
 {
     if ( ppControl && *ppControl && (*ppControl)->IsRefreshAllowed() )
@@ -70,4 +133,10 @@ void ScRefreshTimer::Timeout()
     }
 }
 
+void ScRefreshTimer::Start()
+{
+    if ( GetTimeout() )
+        AutoTimer::Start();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 94fdca37300ccc1392566cb2ae0369a74ae300f9
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Thu Oct 31 10:14:53 2013 +0100

    move ScRefreshTimerProtector into its own header file
    
    So that, we don't have to include "refreshtimer.hxx" in docsh.hxx.
    Also implement destructor in source file.
    
    Change-Id: Ie0251ad3511b44cf1dd6dae34e22ade0ab32cec4

diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index 0ee9a37..bbc5a9f 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -46,21 +46,6 @@ public:
     ::osl::Mutex& GetMutex() { return aMutex; }
 };
 
-class ScRefreshTimerProtector
-{
-private:
-    ScRefreshTimerControl * const * ppControl;
-
-public:
-    ScRefreshTimerProtector( ScRefreshTimerControl * const * pp );
-
-    ~ScRefreshTimerProtector()
-    {
-        if ( ppControl && *ppControl )
-            (*ppControl)->SetAllowRefresh( true );
-    }
-};
-
 class ScRefreshTimer : public AutoTimer
 {
 private:
diff --git a/sc/inc/refreshtimerprotector.hxx b/sc/inc/refreshtimerprotector.hxx
new file mode 100644
index 0000000..d2169cd
--- /dev/null
+++ b/sc/inc/refreshtimerprotector.hxx
@@ -0,0 +1,28 @@
+/* -*- 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/.
+ */
+
+#ifndef SC_REFRESHTIMERPROTECTOR_HXX
+#define SC_REFRESHTIMERPROTECTOR_HXX
+
+#include <sal/config.h>
+
+class ScRefreshTimerControl;
+
+class ScRefreshTimerProtector
+{
+    ScRefreshTimerControl * const * ppControl;
+
+public:
+    ScRefreshTimerProtector( ScRefreshTimerControl * const * pp );
+    ~ScRefreshTimerProtector();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 23a4bcf..6c112d5 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -89,6 +89,7 @@
 #include "formulacell.hxx"
 #include "clipcontext.hxx"
 #include "refupdatecontext.hxx"
+#include "refreshtimerprotector.hxx"
 #include "scopetools.hxx"
 #include "formulagroup.hxx"
 
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index 0ee309e..1c9900e 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "refreshtimer.hxx"
-
+#include "refreshtimerprotector.hxx"
 
 ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const * pp )
         :
@@ -32,6 +32,11 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const
     }
 }
 
+ScRefreshTimerProtector::~ScRefreshTimerProtector()
+{
+    if ( ppControl && *ppControl )
+        (*ppControl)->SetAllowRefresh( true );
+}
 
 ScRefreshTimer::~ScRefreshTimer()
 {
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 20a4833..818a63f 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -33,7 +33,7 @@
 #include "appoptio.hxx"
 #include "formulaopt.hxx"
 #include "shellids.hxx"
-#include "refreshtimer.hxx"
+#include "refreshtimerprotector.hxx"
 #include "optutil.hxx"
 #include "docuno.hxx"
 
@@ -61,6 +61,7 @@ class VirtualDevice;
 class ScImportOptions;
 class ScDocShellModificator;
 class ScOptSolverSave;
+class ScRefreshTimer;
 class ScSheetSaveData;
 class ScFlatBoolRowSegments;
 class HelperModelObj;
commit 63ce8673cff538a49165259e0579f122b5879444
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 18:28:46 2013 +0100

    gbuild: Extension: avoid re-build on missing translation description.xml
    
    Change-Id: I6292f4ec235f8880176c2671ec7c8533168cdbeb

diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index 8ec2fc4..419deb6 100644
--- a/solenv/gbuild/Extension.mk
+++ b/solenv/gbuild/Extension.mk
@@ -131,9 +131,9 @@ $(if $(filter nodeliver,$(3)),,$(call gb_Extension__Extension_deliver,$(1),Exten
 
 ifneq ($(strip $(gb_WITH_LANG)),)
 $(call gb_Extension_get_target,$(1)) : \
-	POFILES := $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po)
+	POFILES := $(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po))
 $(call gb_Extension_get_workdir,$(1))/description.xml : \
-	$(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po)
+	$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po))
 $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(2).po) :
 endif
 
commit 7217ad84a3dc3984ec943409d09a35d545f93632
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 18:20:40 2013 +0100

    gbuild: HelpTarget: avoid spurious rebuilds on missing translation
    
    ... if the darn files are allowed to be missing, use wildcard to avoid
    dependencies on them.
    
    Change-Id: I36a83413f8fb65b081681a8f351ec6afcf15fe6d

diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index d3ae728..748eb88 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -81,11 +81,10 @@ $(call gb_HelpTranslatePartTarget_get_clean_target,%) :
 # gb_HelpTranslatePartTarget_HelpTranslatePartTarget target lang dir
 define gb_HelpTranslatePartTarget_HelpTranslatePartTarget
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) : HELP_LANG := $(2)
-$(call gb_HelpTranslatePartTarget_get_target,$(1)) : POFILES := $(gb_POLOCATION)/$(2)/$(3).po
+$(call gb_HelpTranslatePartTarget_get_target,$(1)) : POFILES := $(3)
 
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE)
-$(call gb_HelpTranslatePartTarget_get_target,$(1)) : $(gb_POLOCATION)/$(2)/$(3).po
-$(gb_POLOCATION)/$(2)/$(3).po :
+$(call gb_HelpTranslatePartTarget_get_target,$(1)) : $(3)
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) :| $(dir $(call gb_HelpTranslatePartTarget_get_target,$(1))).dir
 $(call gb_HelpTranslatePartTarget_get_target,$(1)) :| $(call gb_HelpTranslatePartTarget_get_workdir,$(1))/.dir
 
@@ -137,9 +136,10 @@ $(call gb_HelpTranslateTarget_get_target,$(1)) :| $(dir $(call gb_HelpTranslateT
 
 endef
 
+# use wildcard to avoid spurious rebuilds if translation is missing
 # gb_HelpTranslateTarget__make_part module part lang dir
 define gb_HelpTranslateTarget__make_part
-$(call gb_HelpTranslatePartTarget_HelpTranslatePartTarget,$(2),$(3),$(patsubst %/,%,$(4)))
+$(call gb_HelpTranslatePartTarget_HelpTranslatePartTarget,$(2),$(3),$(wildcard $(gb_POLOCATION)/$(3)/$(patsubst %/,%,$(4)).po))
 
 $(call gb_HelpTranslateTarget_get_target,$(1)) : $(call gb_HelpTranslatePartTarget_get_target,$(2))
 $(call gb_HelpTranslateTarget_get_clean_target,$(1)) : $(call gb_HelpTranslatePartTarget_get_clean_target,$(2))
@@ -244,13 +244,13 @@ endef
 define gb_HelpTreeTarget__set_pofiles
 $(call gb_HelpTreeTarget_get_target,$(1)) : POFILES := $(2)
 $(call gb_HelpTreeTarget_get_target,$(1)) : $(2)
-$(2) :
 
 endef
 
+# use wildcard to avoid spurious rebuilds if translation is missing
 # gb_HelpTreeTarget_set_treefile target treefile
 define gb_HelpTreeTarget_set_treefile
-$(call gb_HelpTreeTarget__set_pofiles,$(1),$(gb_POLOCATION)/$(lastword $(subst /, ,$(1)))/$(patsubst %/,%,$(dir $(2))).po)
+$(call gb_HelpTreeTarget__set_pofiles,$(1),$(wildcard $(gb_POLOCATION)/$(lastword $(subst /, ,$(1)))/$(patsubst %/,%,$(dir $(2))).po))
 
 $(call gb_HelpTreeTarget_get_target,$(1)) : HELP_TREE := $(SRCDIR)/$(2).tree
 $(call gb_HelpTreeTarget_get_target,$(1)) : $(SRCDIR)/$(2).tree
commit 967391dca2fd8f30e38598433b2d2153020988d5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 18:10:58 2013 +0100

    gbuild: AllLangResTarget: avoid spurious rebuilds on missing translation
    
    ... if the darn files are allowed to be missing, use wildcard to avoid
    dependencies on them.
    
    Change-Id: I5232efcb17342d0b2a1e909da6449b08c4148245

diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index 24bd656..c1bf16a 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -62,8 +62,10 @@ $(call gb_SrsPartMergeTarget_get_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY)
 		$(call gb_SrsPartMergeTarget__command,$@,$*,$<),\
 		mkdir -p $(dir $@) && cp $< $@)
 
+# translations are optional - use "wildcard" to avoid spurious re-builds
+# when they don't exist
 define gb_SrsPartMergeTarget_SrsPartMergeTarget
-$(call gb_SrsPartMergeTarget__SrsPartMergeTarget_impl,$(1),$(if $(2),$(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po)))
+$(call gb_SrsPartMergeTarget__SrsPartMergeTarget_impl,$(1),$(if $(2),$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po))))
 endef
 
 define gb_SrsPartMergeTarget__SrsPartMergeTarget_impl
commit 8c766a4993e56bd453dfe18b36c5ea76915afe1c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 8 17:31:34 2013 +0100

    gbuild: SdiTarget: .hxx file is always out-of-date
    
    ... so touch it to avoid that, just to avoid the "true" rule from being
    invoked every time.
    
    Change-Id: I6f27c6e4b0d071b9877a38dc1f4cd3c3eb10bfc0

diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index 28943be..a877695 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -40,7 +40,7 @@ $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi $(gb_SdiTarget_SVIDLDEPS)
 
 # rule necessary to rebuild cxx files that include the header
 $(call gb_SdiTarget_get_target,%.hxx) : $(call gb_SdiTarget_get_target,%)
-	@true
+	touch $@
 
 ifeq ($(gb_FULLDEPS),$(true))
 $(dir $(call gb_SdiTarget_get_dep_target,%)).dir :
commit 75601529a807f15fa648c22e3636281981cd7623
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date:   Thu Nov 7 17:27:20 2013 +0100

    fdo#70797 add Excel 2010 functions
    
    CHISQ.DIST, CHISQ.INV, CHISQ.TEST, CHISQ.DIST.RT, CHISQ.INV.RT
    
    Change-Id: If32530a82b2e5fa1aa30a8c80090742be5acf3eb
    Reviewed-on: https://gerrit.libreoffice.org/6611
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index 3843d25..f67ac77 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -285,6 +285,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
     String SC_OPCODE_T_DIST { Text = "LEGACY.TDIST" ; };
     String SC_OPCODE_F_DIST { Text = "LEGACY.FDIST" ; };
     String SC_OPCODE_CHI_DIST { Text = "LEGACY.CHIDIST" ; };
+    String SC_OPCODE_CHI_DIST_MS { Text = "COM.MICROSOFT.CHISQ.DIST.RT" ; };
     String SC_OPCODE_WEIBULL { Text = "WEIBULL" ; };
     String SC_OPCODE_NEG_BINOM_VERT { Text = "NEGBINOMDIST" ; };
     String SC_OPCODE_KRIT_BINOM { Text = "CRITBINOM" ; };
@@ -328,11 +329,13 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
     String SC_OPCODE_RKP { Text = "LOGEST" ; };
     String SC_OPCODE_FORECAST { Text = "FORECAST" ; };
     String SC_OPCODE_CHI_INV { Text = "LEGACY.CHIINV" ; };
+    String SC_OPCODE_CHI_INV_MS { Text = "COM.MICROSOFT.CHISQ.INV.RT" ; };
     String SC_OPCODE_GAMMA_DIST { Text = "GAMMADIST" ; };
     String SC_OPCODE_GAMMA_INV { Text = "GAMMAINV" ; };
     String SC_OPCODE_T_INV { Text = "TINV" ; };
     String SC_OPCODE_F_INV { Text = "LEGACY.FINV" ; };
     String SC_OPCODE_CHI_TEST { Text = "LEGACY.CHITEST" ; };
+    String SC_OPCODE_CHI_TEST_MS { Text = "COM.MICROSOFT.CHISQ.TEST" ; };
     String SC_OPCODE_LOG_INV { Text = "LOGINV" ; };
     String SC_OPCODE_TABLE_OP { Text = "MULTIPLE.OPERATIONS" ; };
     String SC_OPCODE_BETA_DIST { Text = "BETADIST" ; };
@@ -358,7 +361,9 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
     String SC_OPCODE_NUMBERVALUE { Text = "NUMBERVALUE" ; };
     String SC_OPCODE_GAMMA { Text = "GAMMA" ; };
     String SC_OPCODE_CHISQ_DIST { Text = "CHISQDIST" ; };
+    String SC_OPCODE_CHISQ_DIST_MS { Text = "COM.MICROSOFT.CHISQ.DIST" ; };
     String SC_OPCODE_CHISQ_INV { Text = "CHISQINV" ;};
+    String SC_OPCODE_CHISQ_INV_MS { Text = "COM.MICROSOFT.CHISQ.INV" ;};
     String SC_OPCODE_BITAND        { Text = "BITAND" ;};
     String SC_OPCODE_BITOR         { Text = "BITOR" ;};
     String SC_OPCODE_BITXOR        { Text = "BITXOR" ;};
@@ -643,6 +648,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
     String SC_OPCODE_T_DIST { Text = "TDIST" ; };
     String SC_OPCODE_F_DIST { Text = "FDIST" ; };
     String SC_OPCODE_CHI_DIST { Text = "CHIDIST" ; };
+    String SC_OPCODE_CHI_DIST_MS { Text = "CHISQ.DIST.RT" ; };
     String SC_OPCODE_WEIBULL { Text = "WEIBULL" ; };
     String SC_OPCODE_NEG_BINOM_VERT { Text = "NEGBINOMDIST" ; };
     String SC_OPCODE_KRIT_BINOM { Text = "CRITBINOM" ; };
@@ -686,11 +692,13 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
     String SC_OPCODE_RKP { Text = "LOGEST" ; };
     String SC_OPCODE_FORECAST { Text = "FORECAST" ; };
     String SC_OPCODE_CHI_INV { Text = "CHIINV" ; };
+    String SC_OPCODE_CHI_INV_MS { Text = "CHISQ.INV.RT" ; };
     String SC_OPCODE_GAMMA_DIST { Text = "GAMMADIST" ; };
     String SC_OPCODE_GAMMA_INV { Text = "GAMMAINV" ; };
     String SC_OPCODE_T_INV { Text = "TINV" ; };
     String SC_OPCODE_F_INV { Text = "FINV" ; };
     String SC_OPCODE_CHI_TEST { Text = "CHITEST" ; };
+    String SC_OPCODE_CHI_TEST_MS { Text = "CHISQ.TEST" ; };
     String SC_OPCODE_LOG_INV { Text = "LOGINV" ; };
     String SC_OPCODE_TABLE_OP { Text = "TABLE" ; };
     String SC_OPCODE_BETA_DIST { Text = "BETADIST" ; };
@@ -716,6 +724,8 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
     String SC_OPCODE_NUMBERVALUE { Text = "NUMBERVALUE" ; };
     String SC_OPCODE_GAMMA { Text = "GAMMA" ; };
     String SC_OPCODE_CHISQ_DIST { Text = "CHISQDIST" ; };
+    String SC_OPCODE_CHISQ_DIST_MS { Text = "CHISQ.DIST" ; };
+    String SC_OPCODE_CHISQ_INV_MS { Text = "CHISQ.INV" ;};
     String SC_OPCODE_CHISQ_INV { Text = "CHISQINV" ;};
     String SC_OPCODE_BITAND    { Text = "BITAND" ;};
     String SC_OPCODE_BITOR    { Text = "BITOR" ;};
@@ -1712,6 +1722,10 @@ Resource RID_STRLIST_FUNCTION_NAMES
     {
         Text [ en-US ] = "CHIDIST" ;
     };
+    String SC_OPCODE_CHI_DIST_MS
+    {
+        Text [ en-US ] = "CHISQ.DIST.RT" ;
+    };
     String SC_OPCODE_WEIBULL
     {
         Text [ en-US ] = "WEIBULL" ;
@@ -1884,6 +1898,10 @@ Resource RID_STRLIST_FUNCTION_NAMES
     {
         Text [ en-US ] = "CHIINV" ;
     };
+    String SC_OPCODE_CHI_INV_MS
+    {
+        Text [ en-US ] = "CHISQ.INV.RT" ;
+    };
     String SC_OPCODE_GAMMA_DIST
     {
         Text [ en-US ] = "GAMMADIST" ;
@@ -1904,6 +1922,10 @@ Resource RID_STRLIST_FUNCTION_NAMES
     {
         Text [ en-US ] = "CHITEST" ;
     };
+    String SC_OPCODE_CHI_TEST_MS
+    {
+        Text [ en-US ] = "CHISQ.TEST" ;
+    };
     String SC_OPCODE_LOG_INV
     {
         Text [ en-US ] = "LOGINV" ;
@@ -2000,10 +2022,18 @@ Resource RID_STRLIST_FUNCTION_NAMES
     {
         Text [ en-US ] = "CHISQDIST" ;
     };
+    String SC_OPCODE_CHISQ_DIST_MS
+    {
+        Text [ en-US ] = "CHISQ.DIST" ;
+    };
     String SC_OPCODE_CHISQ_INV
     {
         Text [ en-US ] = "CHISQINV" ;
     };
+    String SC_OPCODE_CHISQ_INV_MS
+    {
+        Text [ en-US ] = "CHISQ.INV" ;
+    };
     String SC_OPCODE_BITAND
     {
         Text [ en-US ] = "BITAND" ;
diff --git a/include/formula/compiler.hrc b/include/formula/compiler.hrc
index 323d540..92a4cfa 100644
--- a/include/formula/compiler.hrc
+++ b/include/formula/compiler.hrc
@@ -418,8 +418,13 @@
 #define SC_OPCODE_BETA_INV_MS       420
 #define SC_OPCODE_BINOM_DIST_MS     421
 #define SC_OPCODE_BINOM_INV         422
+#define SC_OPCODE_CHI_DIST_MS       423
+#define SC_OPCODE_CHI_INV_MS        424
+#define SC_OPCODE_CHI_TEST_MS       425
+#define SC_OPCODE_CHISQ_DIST_MS     426
+#define SC_OPCODE_CHISQ_INV_MS      427
 
-#define SC_OPCODE_STOP_2_PAR        423     /* last function with two or more parameters' OpCode + 1 */
+#define SC_OPCODE_STOP_2_PAR        428     /* last function with two or more parameters' OpCode + 1 */
 #define SC_OPCODE_STOP_FUNCTION     SC_OPCODE_STOP_2_PAR            /* last function's OpCode + 1 */
 #define SC_OPCODE_LAST_OPCODE_ID    (SC_OPCODE_STOP_FUNCTION - 1)   /* last OpCode */
 
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index 3c14bae..8dcfbe9 100644
--- a/include/formula/opcode.hxx
+++ b/include/formula/opcode.hxx
@@ -327,8 +327,11 @@ enum OpCodeEnum
         ocTDist             = SC_OPCODE_T_DIST,
         ocFDist             = SC_OPCODE_F_DIST,
         ocChiDist           = SC_OPCODE_CHI_DIST,
+        ocChiDist_MS        = SC_OPCODE_CHI_DIST_MS,
         ocChiSqDist         = SC_OPCODE_CHISQ_DIST,
+        ocChiSqDist_MS      = SC_OPCODE_CHISQ_DIST_MS,
         ocChiSqInv          = SC_OPCODE_CHISQ_INV,
+        ocChiSqInv_MS       = SC_OPCODE_CHISQ_INV_MS,
         ocWeibull           = SC_OPCODE_WEIBULL,
         ocNegBinomVert      = SC_OPCODE_NEG_BINOM_VERT,
         ocKritBinom         = SC_OPCODE_KRIT_BINOM,
@@ -371,11 +374,13 @@ enum OpCodeEnum
         ocRKP               = SC_OPCODE_RKP,
         ocForecast          = SC_OPCODE_FORECAST,
         ocChiInv            = SC_OPCODE_CHI_INV,
+        ocChiInv_MS         = SC_OPCODE_CHI_INV_MS,
         ocGammaDist         = SC_OPCODE_GAMMA_DIST,
         ocGammaInv          = SC_OPCODE_GAMMA_INV,
         ocTInv              = SC_OPCODE_T_INV,
         ocFInv              = SC_OPCODE_F_INV,
         ocChiTest           = SC_OPCODE_CHI_TEST,
+        ocChiTest_MS        = SC_OPCODE_CHI_TEST_MS,
         ocLogInv            = SC_OPCODE_LOG_INV,
         ocTableOp           = SC_OPCODE_TABLE_OP,
         ocBetaDist          = SC_OPCODE_BETA_DIST,
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 12c39d6..71bb83e 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -688,5 +688,10 @@
 #define HID_FUNC_BETAINV_MS                                     "SC_HID_FUNC_BETAINV_MS"
 #define HID_FUNC_BINOM_DIST_MS                                  "SC_HID_FUNC_BINOM_DIST_MS"
 #define HID_FUNC_BINOM_INV_MS                                   "SC_HID_FUNC_BINOM_INV_MS"
+#define HID_FUNC_CHIINV_MS                                      "SC_HID_FUNC_CHIINV_MS"
+#define HID_FUNC_CHIVERT_MS                                     "SC_HID_FUNC_CHIVERT_MS"
+#define HID_FUNC_CHITEST_MS                                     "SC_HID_FUNC_CHITEST_MS"
+#define HID_FUNC_CHISQDIST_MS                                   "SC_HID_FUNC_CHISQDIST_MS"
+#define HID_FUNC_CHISQINV_MS                                    "SC_HID_FUNC_CHISQINV_MS"
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 0b34f81..3c9cd72 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -2366,6 +2366,11 @@ void Test::testFunctionLists()
         "BINOMDIST",
         "CHIDIST",
         "CHIINV",
+        "CHISQ.DIST",
+        "CHISQ.DIST.RT",
+        "CHISQ.INV",
+        "CHISQ.INV.RT",
+        "CHISQ.TEST",
         "CHISQDIST",
         "CHISQINV",
         "CHITEST",
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 35488e5..53fdcd2 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -4111,8 +4111,10 @@ StackVar ScInterpreter::Interpret()
                 case ocLogNormDist      : ScLogNormDist();              break;
                 case ocTDist            : ScTDist();                    break;
                 case ocFDist            : ScFDist();                    break;
-                case ocChiDist          : ScChiDist();                  break;
-                case ocChiSqDist        : ScChiSqDist();                break;
+                case ocChiDist          :
+                case ocChiDist_MS       : ScChiDist();                  break;
+                case ocChiSqDist        :
+                case ocChiSqDist_MS     : ScChiSqDist();                break;
                 case ocStandard         : ScStandard();                 break;
                 case ocAveDev           : ScAveDev();                   break;
                 case ocDevSq            : ScDevSq();                    break;
@@ -4162,9 +4164,12 @@ StackVar ScInterpreter::Interpret()
                 case ocGamma            : ScGamma();                    break;
                 case ocGammaDist        : ScGammaDist();                break;
                 case ocGammaInv         : ScGammaInv();                 break;
-                case ocChiTest          : ScChiTest();                  break;
-                case ocChiInv           : ScChiInv();                   break;
-                case ocChiSqInv         : ScChiSqInv();                 break;
+                case ocChiTest          :
+                case ocChiTest_MS       : ScChiTest();                  break;
+                case ocChiInv           :
+                case ocChiInv_MS        : ScChiInv();                   break;
+                case ocChiSqInv         :
+                case ocChiSqInv_MS      : ScChiSqInv();                 break;
                 case ocTInv             : ScTInv();                     break;
                 case ocFInv             : ScFInv();                     break;
                 case ocLogInv           : ScLogNormInv();               break;
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 343a46f..6d159bd 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -438,7 +438,12 @@ static const XclFunctionInfo saFuncTable_2010[] =
     EXC_FUNCENTRY_V_VR(         ocBetaDist_MS,   4,  6,  0,  "BETA.DIST" ),
     EXC_FUNCENTRY_V_VR(         ocBetaInv_MS,    3,  5,  0,  "BETA.INV" ),
     EXC_FUNCENTRY_V_VR(         ocBinomDist_MS,  4,  4,  0,  "BINOM.DIST" ),
-    EXC_FUNCENTRY_V_VR(         ocBinomInv,      3,  3,  0,  "BINOM.INV" )
+    EXC_FUNCENTRY_V_VR(         ocBinomInv,      3,  3,  0,  "BINOM.INV" ),
+    EXC_FUNCENTRY_V_VR(         ocChiSqDist_MS,  3,  3,  0,  "CHISQ.DIST" ),
+    EXC_FUNCENTRY_V_VR(         ocChiSqInv_MS,   2,  2,  0,  "CHISQ.INV" ),
+    EXC_FUNCENTRY_V_VR(         ocChiDist_MS,    2,  2,  0,  "CHISQ.DIST.RT" ),
+    EXC_FUNCENTRY_V_VR(         ocChiInv_MS,     2,  2,  0,  "CHISQ.INV.RT" ),
+    EXC_FUNCENTRY_V_VR(         ocChiTest_MS,    2,  2,  0,  "CHISQ.TEST" )
 };
 
 /** Functions new in Excel 2013.
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index e5bd94c..582ea14 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -756,7 +756,12 @@ static const FunctionData saFuncTable2010[] =
     { "COM.MICROSOFT.BETA.DIST",              "BETA.DIST"  ,         NOID,    NOID,   4,  6,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "COM.MICROSOFT.BETA.INV",               "BETA.INV",            NOID,    NOID,   3,  5,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
     { "COM.MICROSOFT.BINOM.DIST",             "BINOM.DIST",          NOID,    NOID,   4,  4,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
-    { "COM.MICROSOFT.BINOM.INV",              "BINOM.INV",           NOID,    NOID,   3,  3,  V, { VR }, FUNCFLAG_MACROCALL_NEW }
+    { "COM.MICROSOFT.BINOM.INV",              "BINOM.INV",           NOID,    NOID,   3,  3,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
+    { "COM.MICROSOFT.CHISQ.DIST",             "CHISQ.DIST",          NOID,    NOID,   3,  3,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
+    { "COM.MICROSOFT.CHISQ.INV",              "CHISQ.INV",           NOID,    NOID,   2,  2,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
+    { "COM.MICROSOFT.CHISQ.DIST.RT",          "CHISQ.DIST.RT",       NOID,    NOID,   2,  2,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
+    { "COM.MICROSOFT.CHISQ.INV.RT",           "CHISQ.INV.RT",        NOID,    NOID,   2,  2,  V, { VR }, FUNCFLAG_MACROCALL_NEW },
+    { "COM.MICROSOFT.CHISQ.TEST",             "CHISQ.TEST",          NOID,    NOID,   2,  2,  V, { VA }, FUNCFLAG_MACROCALL_NEW }
 };
 
 /** Functions new in Excel 2013.
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index b686082..60d8a8e 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -7185,7 +7185,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
             Text [ en-US ] = "The degrees of freedom in the denominator of the F distribution." ;
         };
     };
-     // -=*# Resource for function CHIVERT #*=-
+     // -=*# Resource for function CHIDIST #*=-
     Resource SC_OPCODE_CHI_DIST
     {
         String 1 // Description
@@ -7217,6 +7217,39 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
             Text [ en-US ] = "The degrees of freedom of the chi square distribution." ;
         };
     };
+     // -=*# Resource for function CHISQ.DIST.RT #*=-
+    Resource SC_OPCODE_CHI_DIST_MS
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Returns the right-tail probability of the chi-square distribution." ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_STATISTIC;
+            U2S( HID_FUNC_CHIVERT_MS );
+            2;  0;  0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Number" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The value for which the chi square distribution is to be calculated." ;
+        };
+        String 4 // Name of Parameter 2
+        {
+            Text [ en-US ] = "degrees_freedom" ;
+        };
+        String 5 // Description of Parameter 2
+        {
+            Text [ en-US ] = "The degrees of freedom of the chi square distribution." ;
+        };
+    };
+
 
      // -=*# Resource for function CHISQDIST #*=-
     Resource SC_OPCODE_CHISQ_DIST
@@ -7259,6 +7292,47 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
         };
     };
 
+     // -=*# Resource for function CHISQ.DIST #*=-
+    Resource SC_OPCODE_CHISQ_DIST_MS
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Returns left-tail probability of the cumulative distribution function or values of the probability density function of the chi-square distribution." ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_STATISTIC;
+            U2S( HID_FUNC_CHISQDIST_MS );
+            3;  0;  0;  0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Number" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The value for which the probability density function or cumulative distribution function is to be calculated." ;
+        };
+        String 4 // Name of Parameter 2
+        {
+            Text [ en-US ] = "Degrees of Freedom" ;
+        };
+        String 5 // Description of Parameter 2
+        {
+            Text [ en-US ] = "The degrees of freedom of the chi-square distribution." ;
+        };
+        String 6 // Name of Parameter 3
+        {
+            Text [ en-US ] = "Cumulative" ;
+        };
+        String 7 // Description of Parameter 3
+        {
+            Text [ en-US ] = "0 or FALSE calculates the probability density function. Any other value or TRUE or omitted calculates the cumulative distribution function." ;
+        };
+    };
+
 
      // -=*# Resource for function CHIINV #*=-
     Resource SC_OPCODE_CHI_INV
@@ -7293,6 +7367,39 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
         };
     };
 
+     // -=*# Resource for function CHISQ.INV.RT #*=-
+    Resource SC_OPCODE_CHI_INV_MS
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Values of the inverse of CHIDIST(x; DegreesOfFreedom)." ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_STATISTIC;
+            U2S( HID_FUNC_CHIINV_MS );
+            2;  0;  0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "number" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The probability value for which the inverse chi square distribution is to be calculated." ;
+        };
+        String 4 // Name of Parameter 2
+        {
+            Text [ en-US ] = "degrees_freedom" ;
+        };
+        String 5 // Description of Parameter 2
+        {
+            Text [ en-US ] = "The degrees of freedom of the chi square distribution." ;
+        };
+    };
+
      // -=*# Resource for function CHISQINV #*=-
     Resource SC_OPCODE_CHISQ_INV
     {
@@ -7326,6 +7433,39 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
         };
     };
 
+     // -=*# Resource for function CHISQ.INV #*=-
+    Resource SC_OPCODE_CHISQ_INV_MS
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Values of the inverse of CHISQ.DIST(x;DegreesOfFreedom;TRUE())." ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_STATISTIC;
+            U2S( HID_FUNC_CHISQINV_MS );
+            2;  0;  0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Probability" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The probability value for which the inverse of the chi square distribution is to be calculated." ;
+        };
+        String 4 // Name of Parameter 2
+        {
+            Text [ en-US ] = "Degrees of Freedom" ;
+        };
+        String 5 // Description of Parameter 2
+        {
+            Text [ en-US ] = "The degrees of freedom of the chi square distribution." ;
+        };
+    };
+
      // -=*# Resource for function STANDARDISIERUNG #*=-
     Resource SC_OPCODE_STANDARD
     {
@@ -7542,6 +7682,38 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
             Text [ en-US ] = "The expected data array." ;
         };
     };
+     // -=*# Resource for function CHISQ.TEST.RT #*=-
+    Resource SC_OPCODE_CHI_TEST_MS
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Returns the chi square independence test." ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_STATISTIC;
+            U2S( HID_FUNC_CHITEST_MS );
+            2;  0;  0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Data_B" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The observed data array." ;
+        };
+        String 4 // Name of Parameter 2
+        {
+            Text [ en-US ] = "data_E" ;
+        };
+        String 5 // Description of Parameter 2
+        {
+            Text [ en-US ] = "The expected data array." ;
+        };
+    };
      // -=*# Resource for function FTEST #*=-
     Resource SC_OPCODE_F_TEST
     {
commit c69ed33628ec0b7abf6296539cf280d6c4265930
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 8 18:27:44 2013 +0100

    Don't unnecessarily wrap RuntimeExceptions
    
    (and IllegalArgumentException is a RuntimeException now)
    
    Change-Id: Ic18f11ff7675878c7f6b5e9ee52453bbb9f1e787

diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 5457a32..49ee470 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -351,7 +351,7 @@ ExtensionManager::getExtensionsWithSameIdentifier(
     {
         throw;
     }
-    catch (const lang::IllegalArgumentException &)
+    catch (css::uno::RuntimeException &)
     {
         throw;
     }
commit 02f80eef3c60385582f1bc2d8f2fbccb8d55b7ff
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 8 15:32:06 2013 +0000

    longparas: these sal_uInt16s are really xub_StrLens
    
    Change-Id: I54ecd08c4073f1de6dd28e7d6824d8cfde98254a

diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 978a891..4599911 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -124,7 +124,7 @@ public:
     virtual bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
     virtual bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
 
-    static sal_uInt16   GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc, unsigned nHint = 0);
+    static xub_StrLen   GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc, unsigned nHint = 0);
     // #i82544#
     void                SetLateInitialization() { bLateInitialization = true;}
 };
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 2b14a2e..a5836b5 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -126,7 +126,7 @@ protected:
     xub_StrLen m_nEnd;
 
 public:
-    SwTxtAttrEnd( SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
+    SwTxtAttrEnd( SfxPoolItem& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
 
     using SwTxtAttr::GetEnd;
     virtual xub_StrLen* GetEnd();
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index f6a1c70..2770ab1 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -469,8 +469,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
                 (rSTxt.*fnMove->fnSearch)( sCleanStr, &nProxyStart, &nProxyEnd, 0 ) &&
                 !(bZeroMatch = (nProxyStart == nProxyEnd)))
         {
-            nStart = (sal_uInt16)nProxyStart;
-            nEnd = (sal_uInt16)nProxyEnd;
+            nStart = (xub_StrLen)nProxyStart;
+            nEnd = (xub_StrLen)nProxyEnd;
             // set section correctly
             *GetPoint() = *pPam->GetPoint();
             SetMark();
@@ -478,24 +478,25 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
             // adjust start and end
             if( !aFltArr.empty() )
             {
-                xub_StrLen n, nNew;
                 // if backward search, switch positions temporarily
-                if( !bSrchForward ) { n = nStart; nStart = nEnd; nEnd = n; }
+                if( !bSrchForward ) { std::swap(nStart, nEnd); }
 
-                for( n = 0, nNew = nStart;
+                xub_StrLen nNew(nStart);
+                for (size_t n = 0;
                     n < aFltArr.size() && aFltArr[ n ] <= nStart;
                     ++n, ++nNew )
                     ;
 
                 nStart = nNew;
-                for( n = 0, nNew = nEnd;
+                nNew = nEnd;
+                for(size_t n = 0;
                     n < aFltArr.size() && aFltArr[ n ] < nEnd;
                     ++n, ++nNew )
                     ;
 
                 nEnd = nNew;
                 // if backward search, switch positions temporarily
-                if( !bSrchForward ) { n = nStart; nStart = nEnd; nEnd = n; }
+                if( !bSrchForward ) { std::swap(nStart, nEnd); }
             }
             GetMark()->nContent = nStart;
             GetPoint()->nContent = nEnd;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 11c9a11..0e5540e 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -100,8 +100,8 @@ public:
 // the content positions of each portion need to be saved
 struct SpellContentPosition
 {
-    sal_uInt16 nLeft;
-    sal_uInt16 nRight;
+    xub_StrLen nLeft;
+    xub_StrLen nRight;
 };
 
 typedef std::vector<SpellContentPosition>  SpellContentPositions;
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 6bde38b..bc0559b 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -51,7 +51,7 @@ class SwTxtFrm: public SwCntntFrm
     friend class SwTestFormat;
     friend class WidowsAndOrphans;
     friend class SwTxtFrmLocker;        // duerfen Lock()/Unlock()
-    friend bool sw_ChangeOffset( SwTxtFrm* pFrm, sal_uInt16 nNew );
+    friend bool sw_ChangeOffset( SwTxtFrm* pFrm, xub_StrLen nNew );
 
     static SwCache *pTxtCache;  //Pointer auf den Line-Cache
     static long nMinPrtLine;    //Diese Linie darf beim Drucken nicht
@@ -219,11 +219,11 @@ public:
     void Init();
 
     // Wird von FormatSpelling( ) gerufen
-    SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, sal_uInt16 );
+    SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, xub_StrLen );
     // is called from the FormatSpelling( ) method
-    SwRect SmartTagScan( SwCntntNode* , sal_uInt16 );
+    SwRect SmartTagScan( SwCntntNode* , xub_StrLen );
     // Wird vom CollectAutoCmplWords gerufen
-    void CollectAutoCmplWrds( SwCntntNode* , sal_uInt16 );
+    void CollectAutoCmplWrds( SwCntntNode* , xub_StrLen );
 
     // Returns the screen position of rPos. The values are relative to the upper
     // left position of the page frame.
@@ -302,10 +302,10 @@ public:
     // Methoden zur Verwaltung von FolgeFrames
            SwCntntFrm *SplitFrm( const xub_StrLen nTxtPos );
            SwCntntFrm *JoinFrm();
-    inline sal_uInt16      GetOfst() const { return nOfst; }
-           void        _SetOfst( const sal_uInt16 nNewOfst );
-    inline void        SetOfst ( const sal_uInt16 nNewOfst );
-    inline void        ManipOfst ( const sal_uInt16 nNewOfst ){ nOfst = nNewOfst; }
+    inline xub_StrLen  GetOfst() const { return nOfst; }
+           void        _SetOfst( const xub_StrLen nNewOfst );
+    inline void        SetOfst ( const xub_StrLen nNewOfst );
+    inline void        ManipOfst ( const xub_StrLen nNewOfst ){ nOfst = nNewOfst; }
            SwTxtFrm   *GetFrmAtPos ( const SwPosition &rPos);
     inline const SwTxtFrm *GetFrmAtPos ( const SwPosition &rPos) const;
            // OD 07.10.2003 #110978# - return <reference> instead of <pointer>
@@ -503,10 +503,10 @@ public:
     sal_uInt16 FirstLineHeight() const;
 
     // Haengt FlyInCntFrm um, wenn nEnd > Index >= nStart ist.
-    void MoveFlyInCnt( SwTxtFrm *pNew, sal_uInt16 nStart, sal_uInt16 nEnd );
+    void MoveFlyInCnt( SwTxtFrm *pNew, xub_StrLen nStart, xub_StrLen nEnd );
 
     // Berechnet die Position von FlyInCntFrms
-    sal_uInt16 CalcFlyPos( SwFrmFmt* pSearch );
+    xub_StrLen CalcFlyPos( SwFrmFmt* pSearch );
 
     // Ermittelt die Startposition und Schrittweite des Registers
     sal_Bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 9fc42da..47c99f9 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -337,8 +337,8 @@ xub_StrLen SwAttrIter::GetNextAttr( ) const
     }
     if (m_pTxtNode!=NULL) {
         //TODO maybe use hints like FieldHints for this instead of looking at the text...
-        int l=(nNext<m_pTxtNode->Len()?nNext:m_pTxtNode->Len());
-        sal_uInt16 p=nPos;
+        xub_StrLen l=(nNext<m_pTxtNode->Len()?nNext:m_pTxtNode->Len());
+        xub_StrLen p=nPos;
         while (p<l && m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FIELDSTART
                    && m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FIELDEND
                    && m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FORMELEMENT)
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 8dfa6a3..e463548 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2320,7 +2320,7 @@ void SwTxtNode::GCAttr()
         return;
 
     bool   bChanged = false;
-    sal_uInt16 nMin = m_Text.getLength(),
+    xub_StrLen nMin = m_Text.getLength(),
            nMax = 0;
     bool bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
                            // INet-Formate entfernt.
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 6223046..c824a3b 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -205,8 +205,8 @@ void SwTxtAttrIterator::SearchNextChg()
         for( ; nAttrPos < pHts->Count(); ++nAttrPos )
         {
             const SwTxtAttr* pHt = (*pHts)[ nAttrPos ];
-            const sal_uInt16* pEnd = pHt->GetEnd();
-            const sal_uInt16 nHtStt = *pHt->GetStart();
+            const xub_StrLen* pEnd = pHt->GetEnd();
+            const xub_StrLen nHtStt = *pHt->GetStart();
             if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt ))
                 continue;
 
commit 3fa85c871637ee378450c12f10219f94dd692525
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 8 15:24:15 2013 +0000

    longparas: these sal_uLongs are really xub_StrLens
    
    Change-Id: Iebe3d5edccb6737da64aba5c3d61b9509ce7ec9d

diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index dd01534..f6a1c70 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -47,7 +47,7 @@ OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam );
 
 static OUString
 lcl_CleanStr(const SwTxtNode& rNd, xub_StrLen const nStart, xub_StrLen& rEnd,
-             std::vector<sal_uLong> &rArr, bool const bRemoveSoftHyphen)
+             std::vector<xub_StrLen> &rArr, bool const bRemoveSoftHyphen)
 {
     OUStringBuffer buf(rNd.GetTxt());
     rArr.clear();
@@ -392,7 +392,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
     SwNodeIndex& rNdIdx = pPam->GetPoint()->nNode;
     const SwNode* pSttNd = &rNdIdx.GetNode();
     OUString sCleanStr;
-    std::vector<sal_uLong> aFltArr;
+    std::vector<xub_StrLen> aFltArr;
     LanguageType eLastLang = 0;
     // if the search string contains a soft hypen,
     // we don't strip them from the text:
commit 4536eefa32f634658a939f747e4791a678032bcb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 8 15:27:16 2013 +0000

    longparas: these sal_uInt64s are really xub_StrLens
    
    Change-Id: I5d6222372e79e6ccbcd6529ce5c88b3f082934c6

diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 9c5c007..e695fcb 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1055,7 +1055,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
                 SwNodes &rDestNodes = GetDoc()->GetNodes();
                 xub_StrLen nDestStart = PCURCRSR->GetPoint()->nNode.GetIndex() - nNodesCnt;
 
-                for ( sal_uInt64 nIdx = 0; nIdx <= nNodesCnt; nIdx++ )
+                for (xub_StrLen nIdx = 0; nIdx <= nNodesCnt; ++nIdx)
                 {
                     SwTxtNode *pTxtNode = rDestNodes[ nDestStart + nIdx ]->GetTxtNode();
                     if ( pTxtNode )
commit cc7deac7054709fada9b0867d25644f3fdbe2d06
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 8 15:30:40 2013 +0000

    longparas: same variable used for two different loops of different types
    
    Change-Id: I1efdeb3f9bbda47d8f465a04fb36164e7ffc347b

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index fb3e00b..e9ed157 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -359,7 +359,6 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const OUString& rTx
     // Is the word a compounded word separated by delimiters?
     // If so, keep track of all delimiters so each constituent
     // word can be checked for two initial capital letters.
-    xub_StrLen n = 0;
     std::deque<xub_StrLen> aDelimiters;
 
     // Always check for two capitals at the beginning
@@ -367,13 +366,12 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const OUString& rTx
     aDelimiters.push_back(nSttPos);
 
     // Find all compound word delimiters
-    for (n = nSttPos; n < nEndPos; n++)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list