LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/source/filter/html - htmlfly.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 10 0.0 %
Date: 2013-07-09 Functions: 0 11 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 _HTMLFLY_HXX
      21             : #define _HTMLFLY_HXX
      22             : 
      23             : #include <tools/solar.h>
      24             : #include <o3tl/sorted_vector.hxx>
      25             : 
      26             : class SdrObject;
      27             : class SwFrmFmt;
      28             : class SwNodeIndex;
      29             : class SwPosFlyFrm;
      30             : 
      31             : // ACHTUNG: Die Werte dieses Enumgs gehen direkt in die
      32             : // Augabe Tabelle!!!
      33             : enum SwHTMLFrmType
      34             : {
      35             :     HTML_FRMTYPE_TABLE,
      36             :     HTML_FRMTYPE_TABLE_CAP,
      37             :     HTML_FRMTYPE_MULTICOL,
      38             :     HTML_FRMTYPE_EMPTY,
      39             :     HTML_FRMTYPE_TEXT,
      40             :     HTML_FRMTYPE_GRF,
      41             :     HTML_FRMTYPE_PLUGIN,
      42             :     HTML_FRMTYPE_APPLET,
      43             :     HTML_FRMTYPE_IFRAME,
      44             :     HTML_FRMTYPE_OLE,
      45             :     HTML_FRMTYPE_MARQUEE,
      46             :     HTML_FRMTYPE_CONTROL,
      47             :     HTML_FRMTYPE_DRAW,
      48             :     HTML_FRMTYPE_END
      49             : };
      50             : 
      51             : #define HTML_OUT_TBLNODE    0x00
      52             : #define HTML_OUT_GRFNODE    0x01
      53             : #define HTML_OUT_OLENODE    0x02
      54             : #define HTML_OUT_DIV        0x03
      55             : #define HTML_OUT_MULTICOL   0x04
      56             : #define HTML_OUT_SPACER     0x05
      57             : #define HTML_OUT_CONTROL    0x06
      58             : #define HTML_OUT_AMARQUEE   0x07
      59             : #define HTML_OUT_MARQUEE    0x08
      60             : #define HTML_OUT_GRFFRM     0x09
      61             : #define HTML_OUT_OLEGRF     0x0a
      62             : #define HTML_OUT_SPAN       0x0b
      63             : #define HTML_OUT_MASK       0x0f
      64             : 
      65             : #define HTML_POS_PREFIX     0x00
      66             : #define HTML_POS_BEFORE     0x10
      67             : #define HTML_POS_INSIDE     0x20
      68             : #define HTML_POS_ANY        0x30
      69             : #define HTML_POS_MASK       0x30
      70             : 
      71             : #define HTML_CNTNR_NONE     0x00
      72             : #define HTML_CNTNR_SPAN     0x40
      73             : #define HTML_CNTNR_DIV      0x80
      74             : #define HTML_CNTNR_MASK     0xc0
      75             : 
      76             : 
      77             : const sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END;
      78             : const sal_uInt16 MAX_BROWSERS = 4;
      79             : 
      80             : extern sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
      81             : extern sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
      82             : extern sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
      83             : extern sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
      84             : extern sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
      85             : 
      86             : class SwHTMLPosFlyFrm
      87             : {
      88             :     const SwFrmFmt      *pFrmFmt;       // der Rahmen
      89             :     const SdrObject     *pSdrObject;    // ggf. Sdr-Objekt
      90             :     SwNodeIndex         *pNdIdx;        // Node-Index
      91             :     sal_uInt32              nOrdNum;        // Aus SwPosFlyFrm
      92             :     xub_StrLen          nCntntIdx;      // seine Position im Content
      93             :     sal_uInt8               nOutputMode;    // Ausgabe-Infos
      94             : 
      95             : public:
      96             : 
      97             :     SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
      98             :                      const SdrObject *pSdrObj, sal_uInt8 nOutMode );
      99             : 
     100             :     bool operator==( const SwHTMLPosFlyFrm& ) const { return false; }
     101             :     bool operator<( const SwHTMLPosFlyFrm& ) const;
     102             : 
     103           0 :     const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
     104           0 :     const SdrObject *GetSdrObject() const { return pSdrObject; }
     105             : 
     106           0 :     const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
     107             : 
     108           0 :     xub_StrLen GetCntntIndex() const    { return nCntntIdx; }
     109             : 
     110           0 :     sal_uInt8 GetOutMode() const { return nOutputMode; }
     111             : 
     112           0 :     static sal_uInt8 GetOutFn( sal_uInt8 nMode ) { return nMode & HTML_OUT_MASK; }
     113             :     static sal_uInt8 GetOutPos( sal_uInt8 nMode ) { return nMode & HTML_POS_MASK; }
     114           0 :     static sal_uInt8 GetOutCntnr( sal_uInt8 nMode ) { return nMode & HTML_CNTNR_MASK; }
     115             : 
     116           0 :     sal_uInt8 GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
     117           0 :     sal_uInt8 GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
     118             :     sal_uInt8 GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
     119             : };
     120             : 
     121           0 : class SwHTMLPosFlyFrms
     122             :     : public o3tl::sorted_vector<SwHTMLPosFlyFrm*,
     123             :                 o3tl::less_ptr_to<SwHTMLPosFlyFrm>,
     124             :                 o3tl::find_partialorder_ptrequals>
     125             : {};
     126             : 
     127             : #endif
     128             : 
     129             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10