diff options
author | Gabor Kelemen <gabor.kelemen.extern@allotropia.de> | 2024-04-25 16:45:26 +0200 |
---|---|---|
committer | Gabor Kelemen <gabor.kelemen.extern@allotropia.de> | 2024-04-26 12:24:27 +0200 |
commit | 7437b842c420a43b85156f34146f27fc6b34c729 (patch) | |
tree | 84f60bcf6cf9f5794978099c09ca1d834277308a /sd | |
parent | 54fced70718828bb73f5485b54445501ebf4fcdc (diff) |
Drop now unused sdiocmpt.cxx
Change-Id: Ibba331a536bbd6f228df005c3488a722a3631d4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166634
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/Library_sd.mk | 1 | ||||
-rw-r--r-- | sd/inc/sdiocmpt.hxx | 57 | ||||
-rw-r--r-- | sd/source/core/sdiocmpt.cxx | 117 |
3 files changed, 0 insertions, 175 deletions
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index dc9b38f011f3..12296242bedb 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -165,7 +165,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/core/drawdoc4 \ sd/source/core/drawdoc_animations \ sd/source/core/pglink \ - sd/source/core/sdiocmpt \ sd/source/core/sdpage \ sd/source/core/sdpage2 \ sd/source/core/sdpage_animations \ diff --git a/sd/inc/sdiocmpt.hxx b/sd/inc/sdiocmpt.hxx deleted file mode 100644 index 9f1395fd7c22..000000000000 --- a/sd/inc/sdiocmpt.hxx +++ /dev/null @@ -1,57 +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 . - */ - -#pragma once - -#include <tools/stream.hxx> -#include "sddllapi.h" - - -class old_SdrDownCompat -{ -protected: - SvStream& rStream; - sal_uInt32 nSubRecSiz; - sal_uInt32 nSubRecPos; - StreamMode nMode; - bool bOpen; - -protected: - void Write(); - -public: - old_SdrDownCompat(SvStream& rNewStream, StreamMode nNewMode); - ~old_SdrDownCompat(); - void OpenSubRecord(); - void CloseSubRecord(); -}; - -#define SDIOCOMPAT_VERSIONDONTKNOW sal_uInt16(0xffff) - -class SD_DLLPUBLIC SdIOCompat : public old_SdrDownCompat -{ -public: - // nNewMode: StreamMode::READ or StreamMode::WRITE - // nVer: specify only when writing - SdIOCompat(SvStream& rNewStream, StreamMode nNewMode, - sal_uInt16 nVer = SDIOCOMPAT_VERSIONDONTKNOW); - ~SdIOCompat(); -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx deleted file mode 100644 index 67de6a64d71d..000000000000 --- a/sd/source/core/sdiocmpt.cxx +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <tools/debug.hxx> - -#include <sdiocmpt.hxx> - -old_SdrDownCompat::old_SdrDownCompat(SvStream& rNewStream, StreamMode nNewMode) -: rStream(rNewStream), - nSubRecSiz(0), - nSubRecPos(0), - nMode(nNewMode), - bOpen(false) -{ - OpenSubRecord(); -} - -old_SdrDownCompat::~old_SdrDownCompat() -{ - if(bOpen) - CloseSubRecord(); -} - -void old_SdrDownCompat::Write() -{ - rStream.WriteUInt32( nSubRecSiz ); -} - -void old_SdrDownCompat::OpenSubRecord() -{ - if(rStream.GetError()) - return; - - nSubRecPos = rStream.Tell(); - - if(nMode == StreamMode::READ) - { - rStream.ReadUInt32( nSubRecSiz ); - } - else if(nMode == StreamMode::WRITE) - { - Write(); - } - - bOpen = true; -} - -void old_SdrDownCompat::CloseSubRecord() -{ - if(rStream.GetError()) - return; - - sal_uInt32 nCurrentPos(rStream.Tell()); - - if(nMode == StreamMode::READ) - { - sal_uInt32 nReadCnt(nCurrentPos - nSubRecPos); - if(nReadCnt != nSubRecSiz) - { - rStream.Seek(nSubRecPos + nSubRecSiz); - } - } - else if(nMode == StreamMode::WRITE) - { - nSubRecSiz = nCurrentPos - nSubRecPos; - rStream.Seek(nSubRecPos); - Write(); - rStream.Seek(nCurrentPos); - } - - bOpen = false; -} - -/************************************************************************* -|* -|* Constructor, writes and reads version number -|* -\************************************************************************/ - -SdIOCompat::SdIOCompat(SvStream& rNewStream, StreamMode nNewMode, sal_uInt16 nVersion) -: old_SdrDownCompat(rNewStream, nNewMode) -{ - if (nNewMode == StreamMode::WRITE) - { - DBG_ASSERT(nVersion != SDIOCOMPAT_VERSIONDONTKNOW, - "can't write unknown version"); - rNewStream.WriteUInt16( nVersion ); - } - else if (nNewMode == StreamMode::READ) - { - DBG_ASSERT(nVersion == SDIOCOMPAT_VERSIONDONTKNOW, - "referring to the version while reading is silly!"); - rNewStream.ReadUInt16( nVersion ); - } -} - -SdIOCompat::~SdIOCompat() -{ -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |