diff options
-rw-r--r-- | cui/source/dialogs/about.cxx | 2 | ||||
-rw-r--r-- | include/tools/stream.hxx | 28 | ||||
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/docshell/datastream.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/datastream.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/datastreamdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/datastreamdlg.cxx | 9 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/datastreams.ui | 46 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 1 | ||||
-rw-r--r-- | tools/source/stream/stream.cxx | 57 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 2 |
13 files changed, 9 insertions, 151 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 6a4baa7ce75b..ea46ac3f8807 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -18,7 +18,7 @@ */ #include <config_features.h> - +#include <osl/process.h> #include <vcl/layout.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 0a4164e8dfa6..b4d1be9517bf 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -20,7 +20,6 @@ #define INCLUDED_TOOLS_STREAM_HXX #include <limits> -#include <osl/process.h> #include <tools/toolsdllapi.h> #include <tools/lineend.hxx> #include <tools/ref.hxx> @@ -678,33 +677,6 @@ public: virtual sal_uInt64 remainingSize() override { FlushBuffer(true); return GetEndOfData() - Tell(); } }; -class TOOLS_DLLPUBLIC SvScriptStream: public SvStream -{ - oslProcess mpProcess; - oslFileHandle mpHandle; - -public: - SvScriptStream(const OUString& rUrl); - virtual ~SvScriptStream() override; - - /** Read a line of bytes. - - @param nMaxBytesToRead - Maximum of bytes to read, if line is longer it will be - truncated. - - @note NOTE that the default is one character less than STRING_MAXLEN to - prevent problems after conversion to String that may be lurking - in various places doing something like - @code - for (sal_uInt16 i=0; i < aString.Len(); ++i) - @endcode - causing endless loops ... - */ - virtual bool ReadLine(OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE ) override; - virtual bool good() const override; -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index d907ccbcb29f..d627ebd0500f 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -25,6 +25,7 @@ #include <iterator> #include <set> #include <com/sun/star/i18n/ScriptType.hpp> +#include <rtl/tencinfo.h> #include <vcl/font.hxx> #include <svl/zformat.hxx> #include <svl/itempool.hxx> diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index a153726e06a2..f99384142ed0 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -401,11 +401,7 @@ void DataStream::StartImport() if (!mxReaderThread.is()) { - SvStream *pStream = nullptr; - if (mnSettings & SCRIPT_STREAM) - pStream = new SvScriptStream(msURL); - else - pStream = new SvFileStream(msURL, StreamMode::READ); + SvStream *pStream = new SvFileStream(msURL, StreamMode::READ); mxReaderThread = new datastreams::ReaderThread(pStream, maStartRange.aEnd.Col() - maStartRange.aStart.Col() + 1); mxReaderThread->launch(); } diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx index e70b5e47626e..b60de3fb852e 100644 --- a/sc/source/ui/inc/datastream.hxx +++ b/sc/source/ui/inc/datastream.hxx @@ -66,7 +66,7 @@ public: typedef std::vector<Line> LinesType; enum MoveType { NO_MOVE, RANGE_DOWN, MOVE_DOWN, MOVE_UP }; - enum { SCRIPT_STREAM = 1, VALUES_IN_LINE = 2 }; + enum { VALUES_IN_LINE = 2 }; static void MakeToolbarVisible(); static DataStream* Set(ScDocShell *pShell, const OUString& rURL, const ScRange& rRange, diff --git a/sc/source/ui/inc/datastreamdlg.hxx b/sc/source/ui/inc/datastreamdlg.hxx index 74fba3ff6de4..c728f87402cf 100644 --- a/sc/source/ui/inc/datastreamdlg.hxx +++ b/sc/source/ui/inc/datastreamdlg.hxx @@ -31,8 +31,6 @@ class DataStreamDlg : public ModalDialog VclPtr<SvtURLBox> m_pCbUrl; VclPtr<PushButton> m_pBtnBrowse; - VclPtr<RadioButton> m_pRBDirectData; - VclPtr<RadioButton> m_pRBScriptData; VclPtr<RadioButton> m_pRBValuesInLine; VclPtr<RadioButton> m_pRBAddressValue; VclPtr<CheckBox> m_pCBRefreshOnEmpty; diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx index 8a657492c29d..f447f48dc277 100644 --- a/sc/source/ui/miscdlgs/datastreamdlg.cxx +++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx @@ -23,8 +23,6 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, vcl::Window* pParent) { get(m_pCbUrl, "url"); get(m_pBtnBrowse, "browse"); - get(m_pRBDirectData, "directdata"); - get(m_pRBScriptData, "scriptdata"); get(m_pRBValuesInLine, "valuesinline"); get(m_pRBAddressValue, "addressvalue"); get(m_pCBRefreshOnEmpty, "refresh_ui"); @@ -42,9 +40,6 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, vcl::Window* pParent) m_pCbUrl->SetSelectHdl( LINK( this, DataStreamDlg, UpdateComboBoxHdl ) ); m_pRBAddressValue->SetClickHdl( LINK( this, DataStreamDlg, UpdateClickHdl ) ); m_pRBAddressValue->Enable(false); - m_pRBScriptData->Enable(false); - m_pRBDirectData->Hide(); - m_pRBScriptData->Hide(); m_pRBNoMove->Hide(); m_pRBValuesInLine->SetClickHdl( LINK( this, DataStreamDlg, UpdateClickHdl ) ); m_pEdRange->SetModifyHdl( LINK( this, DataStreamDlg, UpdateHdl ) ); @@ -61,8 +56,6 @@ void DataStreamDlg::dispose() { m_pCbUrl.clear(); m_pBtnBrowse.clear(); - m_pRBDirectData.clear(); - m_pRBScriptData.clear(); m_pRBValuesInLine.clear(); m_pRBAddressValue.clear(); m_pCBRefreshOnEmpty.clear(); @@ -200,8 +193,6 @@ void DataStreamDlg::StartStream() nLimit = m_pEdLimit->GetText().toInt32(); OUString rURL = m_pCbUrl->GetText(); sal_uInt32 nSettings = 0; - if (m_pRBScriptData->IsChecked()) - nSettings |= DataStream::SCRIPT_STREAM; if (m_pRBValuesInLine->IsChecked()) nSettings |= DataStream::VALUES_IN_LINE; diff --git a/sc/uiconfig/scalc/ui/datastreams.ui b/sc/uiconfig/scalc/ui/datastreams.ui index 8063776c7af4..e41d8ef51f68 100644 --- a/sc/uiconfig/scalc/ui/datastreams.ui +++ b/sc/uiconfig/scalc/ui/datastreams.ui @@ -98,52 +98,6 @@ </packing> </child> <child> - <object class="GtkBox" id="box13"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkRadioButton" id="directdata"> - <property name="label" translatable="yes" context="datastreams|directdata">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" context="datastreams|scriptdata">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="frame4"> <property name="visible">True</property> <property name="can_focus">False</property> diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 1588187afeca..727247803e09 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -24,7 +24,7 @@ #include <rtl/ustrbuf.hxx> #include <rtl/strbuf.hxx> #include <rtl/character.hxx> - +#include <rtl/tencinfo.h> #include <tools/tenccvt.hxx> #include <tools/datetime.hxx> #include <unotools/datetime.hxx> diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index bf31cea26892..8eb0cb86a504 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> +#include <osl/time.h> #include <svx/svdmark.hxx> #include <svx/svdetc.hxx> #include <svx/svdobj.hxx> diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 3a4b88e8e11c..21406ab98fb9 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -24,6 +24,7 @@ #include "writerwordglue.hxx" #include "ww8par.hxx" #include "fmtcntnt.hxx" +#include <rtl/tencinfo.h> #include <svtools/rtfkeywd.hxx> #include <editeng/fontitem.hxx> #include <editeng/tstpitem.hxx> diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index a45fce1159f2..6a24a45f5570 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1893,63 +1893,6 @@ void SvMemoryStream::SetSize(sal_uInt64 const nNewSize) ReAllocateMemory( nDiff ); } -SvScriptStream::SvScriptStream(const OUString& rUrl): - mpProcess(nullptr), mpHandle(nullptr) -{ - oslProcessError rc; - rc = osl_executeProcess_WithRedirectedIO( - rUrl.pData, - nullptr, 0, - osl_Process_HIDDEN, - nullptr, - nullptr, - nullptr, 0, - &mpProcess, - nullptr, &mpHandle, nullptr); - if (osl_Process_E_None != rc) - { - mpProcess = nullptr; - mpHandle = nullptr; - } -} - -SvScriptStream::~SvScriptStream() -{ - if (mpProcess) - { - osl_terminateProcess(mpProcess); - osl_freeProcessHandle(mpProcess); - } - if (mpHandle) - osl_closeFile(mpHandle); -} - -bool SvScriptStream::ReadLine(OString &rStr, sal_Int32) -{ - rStr.clear(); - 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 != nullptr; -} - //Create a OString of nLen bytes from rStream OString read_uInt8s_ToOString(SvStream& rStrm, std::size_t nLen) { diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 0de51f0d3e2b..7f7bf257aa4a 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -25,7 +25,7 @@ #include <com/sun/star/linguistic2/LinguServiceManager.hpp> #include <comphelper/processfactory.hxx> - +#include <osl/file.h> #include <vcl/textrectinfo.hxx> #include <vcl/virdev.hxx> #include <vcl/bitmapaccess.hxx> |