sd/Library_sd.mk | 1 sd/inc/sdiocmpt.hxx | 57 ------------------- sd/source/core/sdiocmpt.cxx | 117 ---------------------------------------- solenv/clang-format/excludelist | 2 4 files changed, 177 deletions(-)
New commits: commit 7437b842c420a43b85156f34146f27fc6b34c729 Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Thu Apr 25 16:45:26 2024 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Apr 26 12:24:27 2024 +0200 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.ext...@allotropia.de> 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: */ diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 654b613e5b64..c1c2506ef286 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -9349,7 +9349,6 @@ sd/inc/sdcommands.h sd/inc/sddll.hxx sd/inc/sderror.hxx sd/inc/sdfilter.hxx -sd/inc/sdiocmpt.hxx sd/inc/sdmod.hxx sd/inc/sdpage.hxx sd/inc/sdpptwrp.hxx @@ -9446,7 +9445,6 @@ sd/source/core/drawdoc2.cxx sd/source/core/drawdoc3.cxx sd/source/core/drawdoc4.cxx sd/source/core/pglink.cxx -sd/source/core/sdiocmpt.cxx sd/source/core/sdpage.cxx sd/source/core/sdpage2.cxx sd/source/core/sdpage_animations.cxx