summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-28 18:35:50 +0200
committerMichael Meeks <michael.meeks@collabora.com>2017-09-28 19:13:29 +0200
commit9e0be8a76e13ed3d71e792c1a30e5628b7e1056e (patch)
treee4160d64d915510ae5e39c7e8554d89a60475ac7 /tools
parent49564323e25d742ef11a9c93f5d7324459fdb95d (diff)
Remove dead code behind Calc "Live Data Streams" dialog's "scriptdata" button
...that has been disabled and hidden ever since 4c90ed782a09e2e4b8738b82028032c42d1a203d "Actually hide these two radio buttons (since there is no choice now)." This removes the sole user of SvScriptStream. (Unfortunately, removing the no longer needed #include <osl/process.h> from include/tools/stream.hxx triggered an avalanche of missing includes elsewhere.) Change-Id: I7b0e683b14c0eaf7f4737f62adc9d691826380c0 Reviewed-on: https://gerrit.libreoffice.org/42916 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/stream/stream.cxx57
1 files changed, 0 insertions, 57 deletions
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)
{