LCOV - code coverage report
Current view: top level - sw/source/filter/ww8 - ww8glsy.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 6 0.0 %
Date: 2014-11-03 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8GLSY_HXX
      21             : #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8GLSY_HXX
      22             : 
      23             : #include <sot/storage.hxx>
      24             : #include "ww8scan.hxx"
      25             : 
      26             : class SwTextBlocks;
      27             : class SwNodeIndex;
      28             : 
      29             : /*
      30             :  * GlossaryFib takes the document fib and finds the glossary fib which may
      31             :  * not exist. The glossary fib has the offsets into the autotext subdocument
      32             :  * which is at the end of template .dot's
      33             :  */
      34             : class WW8GlossaryFib : public WW8Fib
      35             : {
      36             : public:
      37           0 :     WW8GlossaryFib( SvStream& rStrm, sal_uInt8 nWantedVersion ,
      38             :         SvStream& rTableStrm, const WW8Fib &rFib) : WW8Fib(rStrm,
      39           0 :         nWantedVersion,FindGlossaryFibOffset(rTableStrm,rStrm,rFib)) {}
      40             :     // fGlsy will indicate whether this has AutoText or not
      41           0 :     bool IsGlossaryFib() { return fGlsy; }
      42             : private:
      43             :     sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
      44             :         const WW8Fib &rFib);
      45             : };
      46             : 
      47             : /*
      48             :  * Imports glossaries from word, given the document it gets the usual word
      49             :  * doc information, then the glossary fib and uses the usual reader class to
      50             :  * wrap the autotext into a star doc. Afterwards taking each section entry and
      51             :  * making it a single star autotext entry.
      52             :  *
      53             :  * ToDo currently all autotext entries become resource hungry star autotext
      54             :  * formatted text, need to use a flag in the ww8reader class to determine if
      55             :  * an entry is formatted or not.
      56             :  */
      57             : class WW8Glossary
      58             : {
      59             : public:
      60             :     WW8Glossary( SvStorageStreamRef &refStrm, sal_uInt8 nVersion, SvStorage *pStg=0);
      61             :     bool Load( SwTextBlocks &rBlocks, bool bSaveRelFile );
      62           0 :     ~WW8Glossary()                  { delete pGlossary; }
      63           0 :     WW8GlossaryFib *GetFib()        { return pGlossary; }
      64           0 :     sal_uInt16 GetNoStrings() const     { return nStrings; }
      65             : 
      66             : private:
      67             :     WW8GlossaryFib *pGlossary;
      68             :     SvStorageStreamRef xTableStream;
      69             :     SvStorageStreamRef &rStrm;
      70             :     SvStorageRef xStg;
      71             :     sal_uInt16 nStrings;
      72             : 
      73             :     bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile,
      74             :         const ::std::vector<OUString>& rStrings,
      75             :         const ::std::vector<ww::bytes>& rExtra);
      76             :     bool HasBareGraphicEnd(SwDoc *pD,SwNodeIndex &rIdx);
      77             : 
      78             :     //No copying
      79             :     WW8Glossary(const WW8Glossary&);
      80             :     WW8Glossary& operator=(const WW8Glossary&);
      81             : };
      82             : #endif
      83             : 
      84             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10