diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-25 21:36:08 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-25 21:41:15 +0200 |
commit | b6024aadaac08102a579ee51697e85ec2394c430 (patch) | |
tree | 4e63e626eeb33a23bed3867294e1b293ea71196f /writerfilter | |
parent | 35fe65fdaafdd3fcf88ed01b94e80b063557f91b (diff) |
writerfilter: unused WW8Sttbf class
Change-Id: Id6486b49a3ae6e32f48d3c0c11fa26f08b870ae0
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/Library_writerfilter.mk | 1 | ||||
-rw-r--r-- | writerfilter/source/doctok/WW8Sttbf.cxx | 103 | ||||
-rw-r--r-- | writerfilter/source/doctok/WW8Sttbf.hxx | 85 | ||||
-rw-r--r-- | writerfilter/source/doctok/resources.xmi | 3 |
4 files changed, 0 insertions, 192 deletions
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index ddbd3a4e2737..f608187d0c32 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 d584f9079de8..000000000000 --- 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 02e37a409146..000000000000 --- 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 e8270420bf14..f6d7e1d452e5 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> |