writerfilter/Library_writerfilter.mk | 1 writerfilter/source/doctok/WW8Sttbf.cxx | 151 ------------------------------- writerfilter/source/doctok/WW8Sttbf.hxx | 114 ----------------------- writerfilter/source/doctok/resources.xmi | 3 4 files changed, 269 deletions(-)
New commits: commit b6024aadaac08102a579ee51697e85ec2394c430 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Oct 25 21:36:08 2013 +0200 writerfilter: unused WW8Sttbf class Change-Id: Id6486b49a3ae6e32f48d3c0c11fa26f08b870ae0 diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index ddbd3a4..f608187 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -133,7 +133,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ writerfilter/source/doctok/WW8PropertySetImpl \ writerfilter/source/doctok/WW8ResourceModelImpl \ writerfilter/source/doctok/WW8StructBase \ - writerfilter/source/doctok/WW8Sttbf \ writerfilter/source/doctok/WW8Table \ writerfilter/source/doctok/WW8Text \ writerfilter/source/filter/ImportFilter \ diff --git a/writerfilter/source/doctok/WW8Sttbf.cxx b/writerfilter/source/doctok/WW8Sttbf.cxx deleted file mode 100644 index d584f90..0000000 --- a/writerfilter/source/doctok/WW8Sttbf.cxx +++ /dev/null @@ -1,103 +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 <WW8Sttbf.hxx> -#include <doctok/resources.hxx> - -namespace writerfilter { -namespace doctok -{ - -WW8Sttbf::WW8Sttbf(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 nCount) -: WW8StructBase(rStream, nOffset, nCount) -{ - sal_uInt32 nComplexOffset = 0; - if (getU16(0) == 0xffff) - { - mbComplex = true; - nComplexOffset = 2; - } - - mnCount = getU16(nComplexOffset); - mnExtraDataCount = getU16(nComplexOffset + 2); - - nOffset = (mbComplex ? 2 : 0) + 4; - - for (sal_uInt32 n = 0; n < mnCount; ++n) - { - mEntryOffsets.push_back(nOffset); - - sal_uInt32 nStringLength = getU16(nOffset); - - nOffset += 2 + nStringLength * (mbComplex ? 2 : 1); - - mExtraOffsets.push_back(nOffset); - - nOffset += mnExtraDataCount; - } -} - -sal_uInt32 WW8Sttbf::getEntryOffset(sal_uInt32 nPos) const -{ - return mEntryOffsets[nPos]; -} - -sal_uInt32 WW8Sttbf::getEntryCount() const -{ - return mnCount; -} - -OUString WW8Sttbf::getEntry(sal_uInt32 nPos) const -{ - return getString(getEntryOffset(nPos)); -} - -sal_uInt32 WW8SttbRgtplc::getEntryCount() -{ - return getU16(2); -} - -::writerfilter::Reference<Properties>::Pointer_t -WW8SttbRgtplc::getEntry(sal_uInt32 nIndex) -{ - ::writerfilter::Reference<Properties>::Pointer_t pResult; - - sal_uInt32 nOffset = 6; - - for (sal_uInt32 i = 0; i < nIndex; ++i) - { - sal_uInt16 nCount = getU16(nOffset); - nOffset = nOffset + 2 + nCount; - } - - sal_uInt16 nCount = getU16(nOffset); - - if (nCount > 0) - { - WW8Tplc * pTplc = new WW8Tplc(*this, nOffset + 2, nCount); - - pResult.reset(pTplc); - } - - return pResult; -} - -}} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/doctok/WW8Sttbf.hxx b/writerfilter/source/doctok/WW8Sttbf.hxx deleted file mode 100644 index 02e37a4..0000000 --- a/writerfilter/source/doctok/WW8Sttbf.hxx +++ /dev/null @@ -1,85 +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 INCLUDED_WW8_STTBF_HXX -#define INCLUDED_WW8_STTBF_HXX - -#include "WW8StructBase.hxx" -#include "WW8ResourceModelImpl.hxx" - -#include <boost/shared_ptr.hpp> -#include <vector> - -namespace writerfilter { -namespace doctok -{ - -using namespace ::std; - -/** - A string table in file. - - The string table contains strings that each can have extra data. - */ -class WW8Sttbf : public WW8StructBase -{ - /// true if strings contain two-byte characters - bool mbComplex; - - /// the number of entries - sal_uInt32 mnCount; - - /// the size of the extra data (per string) - sal_uInt32 mnExtraDataCount; - - /// offsets for the strings - vector<sal_uInt32> mEntryOffsets; - - /// offsets for the extra data - vector<sal_uInt32> mExtraOffsets; - - /** - Return offset of an entry. - - @param nPos the index of the entry - */ - sal_uInt32 getEntryOffset(sal_uInt32 nPos) const; - -public: - typedef boost::shared_ptr<WW8Sttbf> Pointer_t; - - WW8Sttbf(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 nCount); - - /** - Return the number of entries. - */ - sal_uInt32 getEntryCount() const; - - /** - Return the string of an entry. - - @param nPos the index of the entry - */ - OUString getEntry(sal_uInt32 nPos) const; -}; - -}} -#endif // INCLUDED_WW8_STTBF - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index e827042..f6d7e1d 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -3009,9 +3009,6 @@ <!--Class LFO--> <!--Class SttbRgtplc--> <UML:Class xmi.id="SttbRgtplc" name="SttbRgtplc"> - <UML:ModelElement.stereotype> - <UML:Stereotype xmi.idref="ww8resource"/> - </UML:ModelElement.stereotype> <UML:ModelElement.taggedValue> <UML:TaggedValue> <UML:TaggedValue.dataValue>rtf:SttbRgtplc</UML:TaggedValue.dataValue> commit 35fe65fdaafdd3fcf88ed01b94e80b063557f91b Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Oct 25 21:34:49 2013 +0200 writerfilter: unused WW8StringProperty class Change-Id: I9870ec5b0d28a3e69a5be9a123c390c727fd5956 diff --git a/writerfilter/source/doctok/WW8Sttbf.cxx b/writerfilter/source/doctok/WW8Sttbf.cxx index 8f586d2..d584f90 100644 --- a/writerfilter/source/doctok/WW8Sttbf.cxx +++ b/writerfilter/source/doctok/WW8Sttbf.cxx @@ -68,27 +68,6 @@ OUString WW8Sttbf::getEntry(sal_uInt32 nPos) const return getString(getEntryOffset(nPos)); } -SAL_WNODEPRECATED_DECLARATIONS_PUSH -WW8StringProperty::WW8StringProperty(sal_uInt32 nId, WW8StringValue::Pointer_t pValue) -: mnId(nId), mpValue(pValue) -{ -} -SAL_WNODEPRECATED_DECLARATIONS_POP - -WW8StringProperty::~WW8StringProperty() -{ -} - -void WW8StringProperty::resolve(Properties & rProperties) -{ - rProperties.attribute(mnId, *mpValue); -} - -string WW8StringProperty::getType() const -{ - return "WW8StringProperty"; -} - sal_uInt32 WW8SttbRgtplc::getEntryCount() { return getU16(2); diff --git a/writerfilter/source/doctok/WW8Sttbf.hxx b/writerfilter/source/doctok/WW8Sttbf.hxx index 81add1c..02e37a4 100644 --- a/writerfilter/source/doctok/WW8Sttbf.hxx +++ b/writerfilter/source/doctok/WW8Sttbf.hxx @@ -79,22 +79,6 @@ public: OUString getEntry(sal_uInt32 nPos) const; }; -class WW8StringProperty : public ::writerfilter::Reference<Properties> -{ - sal_uInt32 mnId; - WW8StringValue::Pointer_t mpValue; - -public: - SAL_WNODEPRECATED_DECLARATIONS_PUSH - WW8StringProperty(sal_uInt32 nId, WW8StringValue::Pointer_t pValue); - SAL_WNODEPRECATED_DECLARATIONS_POP - virtual ~WW8StringProperty(); - - void resolve(Properties & rProperties); - - string getType() const; -}; - }} #endif // INCLUDED_WW8_STTBF commit 2367cfe03fa3e6be055fc65bed33faed108478ed Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Oct 25 21:33:40 2013 +0200 writerfilter: unused WW8SttbTableResource class Change-Id: I54d7dc0f4dfac803ba6c474c36d22607d7da2e5b diff --git a/writerfilter/source/doctok/WW8Sttbf.cxx b/writerfilter/source/doctok/WW8Sttbf.cxx index 68b1c92..8f586d2 100644 --- a/writerfilter/source/doctok/WW8Sttbf.cxx +++ b/writerfilter/source/doctok/WW8Sttbf.cxx @@ -68,33 +68,6 @@ OUString WW8Sttbf::getEntry(sal_uInt32 nPos) const return getString(getEntryOffset(nPos)); } -WW8SttbTableResource::WW8SttbTableResource(WW8Sttbf::Pointer_t pSttbf) -: mpSttbf(pSttbf) -{ -} - -WW8SttbTableResource::~WW8SttbTableResource() -{ -} - -void WW8SttbTableResource::resolve(Table & rTable) -{ - sal_uInt32 nCount = mpSttbf->getEntryCount(); - - for (sal_uInt32 n = 0; n < nCount; n++) - { - WW8StringValue::Pointer_t pVal(new WW8StringValue(mpSttbf->getEntry(n))); - ::writerfilter::Reference<Properties>::Pointer_t pProps(new WW8StringProperty(0, pVal)); - - rTable.entry(n, pProps); - } -} - -string WW8SttbTableResource::getType() const -{ - return "WW8SttbTableResource"; -} - SAL_WNODEPRECATED_DECLARATIONS_PUSH WW8StringProperty::WW8StringProperty(sal_uInt32 nId, WW8StringValue::Pointer_t pValue) : mnId(nId), mpValue(pValue) diff --git a/writerfilter/source/doctok/WW8Sttbf.hxx b/writerfilter/source/doctok/WW8Sttbf.hxx index 8f58842..81add1c 100644 --- a/writerfilter/source/doctok/WW8Sttbf.hxx +++ b/writerfilter/source/doctok/WW8Sttbf.hxx @@ -79,19 +79,6 @@ public: OUString getEntry(sal_uInt32 nPos) const; }; -class WW8SttbTableResource : public ::writerfilter::Reference<Table> -{ - WW8Sttbf::Pointer_t mpSttbf; - -public: - WW8SttbTableResource(WW8Sttbf::Pointer_t pSttbf); - virtual ~WW8SttbTableResource(); - - void resolve(Table & rTable); - - string getType() const; -}; - class WW8StringProperty : public ::writerfilter::Reference<Properties> { sal_uInt32 mnId; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits