summaryrefslogtreecommitdiffstats
path: root/include/tools
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2013-07-11 18:30:38 +0200
committerAndras Timar <atimar@suse.com>2013-07-16 13:31:53 +0000
commitc66e9cd24c28ff00f15770037ae9a8dd852fdada (patch)
treeacb0aa67c05bc46a8093fa9646bf25a19e9cc1ad /include/tools
parentUpdated core (diff)
downloadcore-c66e9cd24c28ff00f15770037ae9a8dd852fdada.tar.gz
core-c66e9cd24c28ff00f15770037ae9a8dd852fdada.zip
Delete SvCacheStream class
I changed SvCacheStream class to SvMemoryStream class in the following: MSE40HTMLClipFormatObj, SfxLockBytesItem, SwEditShell, INetMIMEMessageStream classes, MakeLockBytes_Impl function and SwUnoCursorHelper namespace. I modified header the precompiled_sw.hxx, wrtsh1.cxx, unoobj2.cxx. I added two functions in SvMemoryStream class: GetBuffer and GetSize, and I renamed the old GetSize function to GetBufSize. I deleted SvCacheStream class. Change-Id: I929236538dfbe23cccfd1eb85f10c1d5411baa8d Reviewed-on: https://gerrit.libreoffice.org/4847 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/cachestr.hxx64
-rw-r--r--include/tools/stream.hxx7
2 files changed, 4 insertions, 67 deletions
diff --git a/include/tools/cachestr.hxx b/include/tools/cachestr.hxx
deleted file mode 100644
index 6d980566a96a..000000000000
--- a/include/tools/cachestr.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _CACHESTR_HXX
-#define _CACHESTR_HXX
-
-#include <tools/stream.hxx>
-#include "tools/toolsdllapi.h"
-
-class TempFile;
-
-class TOOLS_DLLPUBLIC SvCacheStream : public SvStream
-{
-private:
- OUString aFileName;
- sal_uIntPtr nMaxSize;
- bool bPersistent;
-
- SvStream* pSwapStream;
- SvStream* pCurrentStream;
- TempFile* pTempFile;
-
- TOOLS_DLLPRIVATE virtual sal_uIntPtr GetData( void* pData,
- sal_uIntPtr nSize );
- TOOLS_DLLPRIVATE virtual sal_uIntPtr PutData( const void* pData,
- sal_uIntPtr nSize );
- TOOLS_DLLPRIVATE virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
- TOOLS_DLLPRIVATE virtual void FlushData();
- TOOLS_DLLPRIVATE virtual void SetSize( sal_uIntPtr nSize );
-
-public:
- SvCacheStream( sal_uIntPtr nMaxMemSize = 0 );
- ~SvCacheStream();
-
- void SetFilename( const OUString& rFN ) { aFileName = rFN; } // call only from FilenameHdl
- const OUString& GetFilename() const { return aFileName; }
-
- void SwapOut();
- const void* GetBuffer();
- sal_uIntPtr GetSize();
-
- bool IsPersistent() { return bPersistent; }
- void SetPersistence( bool b = true ) { bPersistent = b; }
- void SetSwapStream( SvStream *p ) { pSwapStream = p; } // call only from FilenameHdl
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 8aed53c1fd15..d71f1587d18c 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -702,8 +702,7 @@ class TOOLS_DLLPUBLIC SvMemoryStream : public SvStream
SvMemoryStream (const SvMemoryStream&);
SvMemoryStream & operator= (const SvMemoryStream&);
- friend class SvCacheStream;
- sal_Size GetSize() const { return nSize; }
+ sal_Size GetBufSize() const { return nSize; }
protected:
sal_Size nSize;
@@ -744,6 +743,8 @@ public:
virtual void ResetError();
+ const void* GetBuffer();
+ sal_uIntPtr GetSize();
sal_Size GetEndOfData() const { return nEndOfData; }
const void* GetData() { Flush(); return pBuf; }
operator const void*() { Flush(); return pBuf; }
@@ -757,7 +758,7 @@ public:
bool IsObjectMemoryOwner() { return bOwnsData; }
void SetResizeOffset( sal_Size nNewResize ) { nResize = nNewResize; }
sal_Size GetResizeOffset() const { return nResize; }
- virtual sal_Size remainingSize() { return GetSize() - Tell(); }
+ virtual sal_Size remainingSize() { return GetBufSize() - Tell(); }
};
/** Data Copy Stream